public enum ExtensionName extends java.lang.Enum<ExtensionName>
This contains extension names that can be used during any query.
Enum Constant and Description |
---|
ADD_OPT_PARAM_DO_BIT
This takes value either 0 or 1.
|
ADD_OPT_PARAM_EXTENDED_RCODE
This takes values as an integer between 0 and 255 inclusive.
|
ADD_OPT_PARAM_MAX_UDP_PAYLOAD
This takes values as an integer between 512 and 65535 inclusive.
|
ADD_OPT_PARAM_OPTIONS
take a list containing dictionaries for each option to be specified.
|
ADD_OPT_PARAM_VERSION
This takes values as an integer betwen 0 and 255 inclusive.
|
ADD_OPT_PARAMETERS
For lookups that need an OPT resource record in the Additional Data
section, use the add_opt_parameters extension.
|
ADD_WARNING_FOR_BAD_DNS
To receive a warning if a particular response violates some parts of the
DNS standard, use theadd_warning_for_bad_dns extension.
|
DNSSEC_RETURN_ONLY_SECURE
If instead of returning the status, you want to only see secure results,
use the dnssec_return_only_secure extension.
|
DNSSEC_RETURN_STATUS
This is used to return the DNSSEC status for DNS record in the replies_tree
list, use the dnssec_return_status extension.
|
DNSSEC_RETURN_VALIDATION_CHAIN
This is used by applications that want to handle their own validation by
getting DNSSEC-related records for a particular response.
|
RETURN_BOTH_V4_AND_V6
This is used to get both IPV4 and IPV6 address in single call.
|
RETURN_CALL_DEBUGGING
An application might want to see debugging information for queries such as
the length of time it takes for each query to return to the API.
|
SPECIFY_CLASS
The vast majority of DNS requests are made with the Internet (IN) class.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName() |
static ExtensionName |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ExtensionName[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ExtensionName ADD_OPT_PARAM_DO_BIT
This takes value either 0 or 1. If not specified it defaults to the value in the getdns context.
public static final ExtensionName ADD_OPT_PARAM_EXTENDED_RCODE
This takes values as an integer between 0 and 255 inclusive. If not specified it defaults to the value in the getdns context.
public static final ExtensionName ADD_OPT_PARAM_MAX_UDP_PAYLOAD
This takes values as an integer between 512 and 65535 inclusive. If not specified it defaults to the value in the getdns context.
public static final ExtensionName ADD_OPT_PARAM_OPTIONS
take a list containing dictionaries for each option to be specified. Each dictionary contains two keys: option_code (an integer) and option_data (in the form appropriate for that option code).
public static final ExtensionName ADD_OPT_PARAM_VERSION
This takes values as an integer betwen 0 and 255 inclusive. If not specified it defaults to 0.
public static final ExtensionName ADD_OPT_PARAMETERS
For lookups that need an OPT resource record in the Additional Data section, use the add_opt_parameters extension. The extension’s value (a dict) contains the parameters; these are described in more detail in RFC 2671.
They are:
HashMap<String, Object> optParams = new HashMap<String, Object>();
optParams.put(ExtensionNames.ADD_OPT_PARAM_EXTENDED_RCODE.getName(), 128);
HashMap<ExtensionNames, Object> extensions = new HashMap<ExtensionNames, Object>();
extensions.put(ExtensionNames.ADD_OPT_PARAMETERS, optParams);
public static final ExtensionName ADD_WARNING_FOR_BAD_DNS
To receive a warning if a particular response violates some parts of the DNS standard, use theadd_warning_for_bad_dns extension. The extension's value (an int) is set to GETDNS_EXTENSION_TRUE to cause each reply in the replies_tree to contain an additional name, bad_dns (a list). The list is zero or more ints that indicate types of bad DNS found in that reply.
The list of values is:
public static final ExtensionName DNSSEC_RETURN_ONLY_SECURE
If instead of returning the status, you want to only see secure results, use the dnssec_return_only_secure extension. The extension’s value is set to getdns.GETDNS_EXTENSION_TRUE to cause only records that the API can validate as secure with DNSSEC to be returned in the replies_tree and replies_full lists. No additional names are added to the dict of the record; the change is that some records might not appear in the results. When this context option is set, if the API receives DNS replies but none are determined to be secure, the error code at the top level of the response object is getdns.GETDNS_RESPSTATUS_NO_SECURE_ANSWERS.
public static final ExtensionName DNSSEC_RETURN_STATUS
This is used to return the DNSSEC status for DNS record in the replies_tree list, use the dnssec_return_status extension. Set the extension’s value to getdns.GETDNS_EXTENSION_TRUE to cause the returned status to have the name dnssec_status added to the other names in the record’s dictionary (“header”, “question”, and so on). The potential values for that name are getdns.GETDNS_DNSSEC_SECURE, getdns.GETDNS_DNSSEC_BOGUS, getdns.GETDNS_DNSSEC_INDETERMINATE, and getdns.GETDNS_DNSSEC_INSECURE.
public static final ExtensionName DNSSEC_RETURN_VALIDATION_CHAIN
This is used by applications that want to handle their own validation by getting DNSSEC-related records for a particular response. Use the dnssec_return_validation_chain extension. Set the extension’s value to getdns.GETDNS_EXTENSION_TRUE to cause a set of additional DNSSEC-related records needed for validation to be returned in the response object. This set comes as validation_chain (a list) at the top level of the response object. This list includes all resource record dicts for all the resource records (DS, DNSKEY and their RRSIGs) that are needed to perform the validation from the root up.
public static final ExtensionName RETURN_BOTH_V4_AND_V6
This is used to get both IPV4 and IPV6 address in single call. Many applications want to get both IPv4 and IPv6 addresses in a single call so that the results can be processed together. The address() method is able to do this automatically. If you are using the general() method, you can enable this with the return_both_v4_and_v6 extension. The extension’s value must be set to getdns.GETDNS_EXTENSION_TRUE to cause the results to be the lookup of either A or AAAA records to include any A and AAAA records for the queried name (otherwise, the extension does nothing). These results are expected to be usable with Happy Eyeballs systems that will find the best socket for an application.
public static final ExtensionName RETURN_CALL_DEBUGGING
An application might want to see debugging information for queries such as the length of time it takes for each query to return to the API. Use the return_call_debugging extension. The extension's value (an int) is set toGETDNS_EXTENSION_TRUE to add the name call_debugging (a list) to the top level of the response object. Each member of the list is a dict that represents one call made for the call to the API.
Each member has the following names:
public static final ExtensionName SPECIFY_CLASS
The vast majority of DNS requests are made with the Internet (IN) class. To make a request in a different DNS class, use, the specify_class extension. The extension's value (an int) contains the class number. Few applications will ever use this extension.
public java.lang.String getName()
public static ExtensionName 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 ExtensionName[] values()
for (ExtensionName c : ExtensionName.values()) System.out.println(c);