public enum ContextOptionName extends java.lang.Enum<ContextOptionName>
This contains possible context option names that can be used while configuring the context manually.
HashMapoptions = new HashMap (); options.put(ContextOptionName.DNS_TRANSPORT, ContextOptionValue.GETDNS_TRANSPORT_UDP_ONLY); IGetDNSContextSync context = GetDNSFactory.createSync(1, options);
Enum Constant and Description |
---|
APPEND_NAME
This is used to Specify a suffix to the query string before the API
starts resolving a name.
|
DNS_ROOT_SERVERS
The value of dns_root_servers is a list of dictionaries containing
addresses to be used for looking up top-level domains.
|
DNS_TRANSPORT
Specifies what transport is used for DNS lookups.
|
DNSSEC_ALLOWED_SKEW
This takes values as number of seconds of skew that is allowed in
either direction when checking an RRSIG’s Expiration and Inception fields.
|
DNSSEC_TRUST_ANCHOR
This takes values as a list of DNSSEC trust anchors, expressed as
RDATAs from DNSKEY resource records.
|
EDNS_DO_BIT
This takes values as an integer valued either 0 or 1.
|
EDNS_EXTENDED_RCODE
This takes values as an integer between 0 and 255, inclusive.
|
EDNS_MAXIMUM_UDP_PAYLOADSIZE
This takes values as an integer between 512 and 65535, inclusive.
|
EDNS_VERSION
This takes values as an integer between 0 and 255, inclusive.
|
FOLLOW_REDIRECT
Specifies whether or not DNS queries follow redirects.
|
LIMIT_OUTSTANDING_QUERIES
Specifies limit (an integer value) on the number of outstanding DNS
queries.
|
NAMESPACE
The namespaces attribute takes an ordered list of namespaces that will be
queried.
|
RESOLUTION_TYPE
Specifies whether DNS queries are performed with nonrecursive lookups or as
a stub resolver.
|
RETURN_DNSSEC_STATUS
Specifies whether DNSSEC status should be returned in dns response
the value is either true or false |
STUB
Specifies whether DNS queries are performed with stub or recursive
resolver.
|
SUFFIX
This takes values as a list of strings to be appended based on
append_name.
|
TIMEOUT
This takes values as an integer specifying a timeout for a query,
expressed in milliseconds.
|
UPSTREAMS
An application can change the quering mechanism of a context to be to act
as a stub resolver.
|
USE_THREADS
This takes values as an boolean either true or false.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName() |
static ContextOptionName |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ContextOptionName[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ContextOptionName APPEND_NAME
This is used to Specify a suffix to the query string before the API starts resolving a name. Its value must be one of
public static final ContextOptionName DNS_ROOT_SERVERS
The value of dns_root_servers is a list of dictionaries containing
addresses to be used for looking up top-level domains. Each dict contains:
address_data: a string representation of an IPv4 or IPv6 address
For example, the addresses list could look like:
HashMap<ContextOptionNames, Object> options = new HashMap<ContextOptionNames, Object>();
Object[][] list = { { "8.8.8.8"}, { "2001:4860:4860::8888"} }
options.put(ContextOptionNames.DNS_ROOT_SERVERS, list)
IGetDNSContext context = null;
context = GetDNSFactory.create(1, options);
public static final ContextOptionName DNS_TRANSPORT
Specifies what transport is used for DNS lookups. The value must be one of getdns:
public static final ContextOptionName DNSSEC_ALLOWED_SKEW
This takes values as number of seconds of skew that is allowed in either direction when checking an RRSIG’s Expiration and Inception fields. The default is 0.
public static final ContextOptionName DNSSEC_TRUST_ANCHOR
This takes values as a list of DNSSEC trust anchors, expressed as RDATAs from DNSKEY resource records.
public static final ContextOptionName EDNS_DO_BIT
This takes values as an integer valued either 0 or 1. The default is 0.
public static final ContextOptionName EDNS_EXTENDED_RCODE
This takes values as an integer between 0 and 255, inclusive. The default is 0.
public static final ContextOptionName EDNS_MAXIMUM_UDP_PAYLOADSIZE
This takes values as an integer between 512 and 65535, inclusive. The default is 512.
public static final ContextOptionName EDNS_VERSION
This takes values as an integer between 0 and 255, inclusive. The default is 0.
public static final ContextOptionName FOLLOW_REDIRECT
Specifies whether or not DNS queries follow redirects. The value must be one of getdns.GETDNS_REDIRECTS_FOLLOW for normal following of redirects though CNAME and DNAME; or getdns.GETDNS_REDIRECTS_DO_NOT_FOLLOW to cause any lookups that would have gone through CNAME and DNAME to return the CNAME or DNAME, not the eventual target.
public static final ContextOptionName LIMIT_OUTSTANDING_QUERIES
Specifies limit (an integer value) on the number of outstanding DNS queries. The API will block itself from sending more queries if it is about to exceed this value, and instead keep those queries in an internal queue. The a value of 0 indicates that the number of outstanding DNS queries is unlimited.
public static final ContextOptionName NAMESPACE
The namespaces attribute takes an ordered list of namespaces that will be queried. (Important: this context setting is ignored for the getdns.general() function; it is used for the other functions.)
The allowed values are:
When a normal lookup is done, the API does the lookups in the order given and stops when it gets the first result; a different method with the same result would be to run the queries in parallel and return when it gets the first result. Because lookups might be done over different mechanisms because of the different namespaces, there can be information leakage that is similar to that seen with POSIX getaddrinfo(). The default is determined by the OS.
public static final ContextOptionName RESOLUTION_TYPE
Specifies whether DNS queries are performed with nonrecursive lookups or as a stub resolver. The value is either getdns.GETDNS_RESOLUTION_RECURSING or getdns.GETDNS_RESOLUTION_STUB. If an implementation of this API is only able to act as a recursive resolver, setting resolution_type to getdns.GETDNS_RESOLUTION_STUB will throw an exception.
public static final ContextOptionName RETURN_DNSSEC_STATUS
Specifies whether DNSSEC status should be returned in dns response
the value is either true or false
public static final ContextOptionName STUB
Specifies whether DNS queries are performed with stub or recursive
resolver.
true for stub and false for recursive.
public static final ContextOptionName SUFFIX
This takes values as a list of strings to be appended based on append_name. The list elements must follow the rules in RFC 4343
public static final ContextOptionName TIMEOUT
This takes values as an integer specifying a timeout for a query, expressed in milliseconds.
public static final ContextOptionName UPSTREAMS
An application can change the quering mechanism of a context to be to act as a stub resolver.
Usage:
HashMap<ContextOptionName, Object> options = new HashMap<ContextOptionName, Object>();
options.put(ContextOptionName.STUB, true);
Object[][] list = { { "8.8.8.8" }, { "127.0.0.1", 80 } };
options.put(ContextOptionName.UPSTREAMS, list);
IGetDNSContextSync context = GetDNSFactory.createSync(1, options);
public static final ContextOptionName USE_THREADS
This takes values as an boolean either true or false.
public java.lang.String getName()
public static ContextOptionName valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static ContextOptionName[] values()
for (ContextOptionName c : ContextOptionName.values()) System.out.println(c);