com.verisign.getdns

Enum ExtensionName

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ExtensionName>


    public enum ExtensionName
    extends java.lang.Enum<ExtensionName>

    This contains extension names that can be used during any query.

    • Enum Constant Summary

      Enum Constants 
      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.
    • Method Summary

      Methods 
      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.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • ADD_OPT_PARAM_DO_BIT

        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.

      • ADD_OPT_PARAM_EXTENDED_RCODE

        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.

      • ADD_OPT_PARAM_MAX_UDP_PAYLOAD

        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.

      • ADD_OPT_PARAM_OPTIONS

        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).

      • ADD_OPT_PARAM_VERSION

        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.

      • ADD_OPT_PARAMETERS

        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:

        • maximum_udp_payload_size: an integer between 512 and 65535 inclusive. If not specified it defaults to the value in the getdns context.
        • extended_rcode: an integer between 0 and 255 inclusive. If not specified it defaults to the value in the getdns context.
        • version: an integer betwen 0 and 255 inclusive. If not specified it defaults to 0.
        • do_bit: must be either 0 or 1. If not specified it defaults to the value in the getdns context.
        • 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).
        It is very important to note that the OPT resource record specified in the add_opt_parameters extension might not be the same the one that the API sends in the query. For example, if the application also includes any of the DNSSEC extensions, the API will make sure that the OPT resource record sets the resource record appropriately, making the needed changes to the settings from the add_opt_parameters extension.
         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);
         
         

      • ADD_WARNING_FOR_BAD_DNS

        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:

        • GETDNS_BAD_DNS_CNAME_IN_TARGET A DNS query type that does not allow a target to be a CNAME pointed to a CNAME
        • GETDNS_BAD_DNS_ALL_NUMERIC_LABEL One or more labels in a returned domain name is all-numeric; this is not legal for a hostname
        • GETDNS_BAD_DNS_CNAME_RETURNED_FOR_OTHER_TYPE A DNS query for a type other than CNAME returned a CNAME response

      • DNSSEC_RETURN_ONLY_SECURE

        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.

      • DNSSEC_RETURN_STATUS

        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.

      • DNSSEC_RETURN_VALIDATION_CHAIN

        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.

      • RETURN_BOTH_V4_AND_V6

        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.

      • RETURN_CALL_DEBUGGING

        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:

        • query_name (a bindata) is the name that was sent
        • query_type (an int) is the type that was queried for
        • query_to (a bindata) is the address to which the query was sent
        • start_time (a bindata) is the time the query started in milliseconds since the epoch, represented as a uint64_t
        • end_time (a bindata) is the time the query was received in milliseconds since the epoch, represented as a uint64_t
        • entire_reply (a bindata) is the entire response received
        • dnssec_result (an int) is the DNSSEC status
        • GETDNS_DNSSEC_NOT_PERFORMED if DNSSEC validation was not performed

      • SPECIFY_CLASS

        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.

    • Method Detail

      • getName

        public java.lang.String getName()
      • valueOf

        public static ExtensionName valueOf(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • values

        public static ExtensionName[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ExtensionName c : ExtensionName.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared