Defines resource record types and constants. More...
Data Structures | |
struct | sldns_struct_rr_descriptor |
Contains all information about resource record types. More... | |
Macros | |
#define | LDNS_MAX_LABELLEN 63 |
Maximum length of a dname label. | |
#define | LDNS_MAX_DOMAINLEN 255 |
Maximum length of a complete dname. | |
#define | LDNS_MAX_POINTERS 65535 |
Maximum number of pointers in 1 dname. | |
#define | LDNS_RR_OVERHEAD 10 |
The bytes TTL, CLASS and length use up in an rr. | |
#define | LDNS_DNSSEC_KEYPROTO 3 |
#define | LDNS_KEY_ZONE_KEY 0x0100 /* set for ZSK&KSK, rfc 4034 */ |
#define | LDNS_KEY_SEP_KEY 0x0001 /* set for KSK, rfc 4034 */ |
#define | LDNS_KEY_REVOKE_KEY 0x0080 /* used to revoke KSK, rfc 5011 */ |
#define | LDNS_RDATA_FIELD_DESCRIPTORS_COMMON 259 |
#define | LDNS_MAX_RDFLEN 65535 |
#define | LDNS_RDF_SIZE_BYTE 1 |
#define | LDNS_RDF_SIZE_WORD 2 |
#define | LDNS_RDF_SIZE_DOUBLEWORD 4 |
#define | LDNS_RDF_SIZE_6BYTES 6 |
#define | LDNS_RDF_SIZE_8BYTES 8 |
#define | LDNS_RDF_SIZE_16BYTES 16 |
#define | LDNS_NSEC3_VARS_OPTOUT_MASK 0x01 |
#define | LDNS_APL_IP4 1 |
#define | LDNS_APL_IP6 2 |
#define | LDNS_APL_MASK 0x7f |
#define | LDNS_APL_NEGATION 0x80 |
#define | LDNS_EDNS_MASK_DO_BIT 0x8000 |
#define | LDNS_TSIG_ERROR_NOERROR 0 |
TSIG and TKEY extended rcodes (16bit), 0-15 are the normal rcodes. | |
#define | LDNS_TSIG_ERROR_BADSIG 16 |
#define | LDNS_TSIG_ERROR_BADKEY 17 |
#define | LDNS_TSIG_ERROR_BADTIME 18 |
#define | LDNS_TSIG_ERROR_BADMODE 19 |
#define | LDNS_TSIG_ERROR_BADNAME 20 |
#define | LDNS_TSIG_ERROR_BADALG 21 |
#define | LDNS_EXT_RCODE_BADCOOKIE 23 |
DNS Cookie extended rcode. | |
Typedefs | |
typedef enum sldns_enum_rr_class | sldns_rr_class |
typedef enum sldns_enum_rr_compress | sldns_rr_compress |
typedef enum sldns_enum_rr_type | sldns_rr_type |
typedef enum sldns_enum_rdf_type | sldns_rdf_type |
typedef enum sldns_enum_algorithm | sldns_algorithm |
typedef enum sldns_enum_hash | sldns_hash |
typedef enum sldns_enum_cert_algorithm | sldns_cert_algorithm |
typedef enum sldns_enum_edns_option | sldns_edns_option |
typedef enum sldns_enum_ede_code | sldns_ede_code |
typedef struct sldns_struct_rr_descriptor | sldns_rr_descriptor |
Enumerations | |
enum | sldns_enum_rr_class { LDNS_RR_CLASS_IN = 1 , LDNS_RR_CLASS_CH = 3 , LDNS_RR_CLASS_HS = 4 , LDNS_RR_CLASS_NONE = 254 , LDNS_RR_CLASS_ANY = 255 , LDNS_RR_CLASS_FIRST = 0 , LDNS_RR_CLASS_LAST = 65535 , LDNS_RR_CLASS_COUNT = LDNS_RR_CLASS_LAST - LDNS_RR_CLASS_FIRST + 1 } |
The different RR classes. More... | |
enum | sldns_enum_rr_compress { LDNS_RR_COMPRESS , LDNS_RR_NO_COMPRESS } |
Used to specify whether compression is allowed. More... | |
enum | sldns_enum_rr_type { LDNS_RR_TYPE_A = 1 , LDNS_RR_TYPE_NS = 2 , LDNS_RR_TYPE_MD = 3 , LDNS_RR_TYPE_MF = 4 , LDNS_RR_TYPE_CNAME = 5 , LDNS_RR_TYPE_SOA = 6 , LDNS_RR_TYPE_MB = 7 , LDNS_RR_TYPE_MG = 8 , LDNS_RR_TYPE_MR = 9 , LDNS_RR_TYPE_NULL = 10 , LDNS_RR_TYPE_WKS = 11 , LDNS_RR_TYPE_PTR = 12 , LDNS_RR_TYPE_HINFO = 13 , LDNS_RR_TYPE_MINFO = 14 , LDNS_RR_TYPE_MX = 15 , LDNS_RR_TYPE_TXT = 16 , LDNS_RR_TYPE_RP = 17 , LDNS_RR_TYPE_AFSDB = 18 , LDNS_RR_TYPE_X25 = 19 , LDNS_RR_TYPE_ISDN = 20 , LDNS_RR_TYPE_RT = 21 , LDNS_RR_TYPE_NSAP = 22 , LDNS_RR_TYPE_NSAP_PTR = 23 , LDNS_RR_TYPE_SIG = 24 , LDNS_RR_TYPE_KEY = 25 , LDNS_RR_TYPE_PX = 26 , LDNS_RR_TYPE_GPOS = 27 , LDNS_RR_TYPE_AAAA = 28 , LDNS_RR_TYPE_LOC = 29 , LDNS_RR_TYPE_NXT = 30 , LDNS_RR_TYPE_EID = 31 , LDNS_RR_TYPE_NIMLOC = 32 , LDNS_RR_TYPE_SRV = 33 , LDNS_RR_TYPE_ATMA = 34 , LDNS_RR_TYPE_NAPTR = 35 , LDNS_RR_TYPE_KX = 36 , LDNS_RR_TYPE_CERT = 37 , LDNS_RR_TYPE_A6 = 38 , LDNS_RR_TYPE_DNAME = 39 , LDNS_RR_TYPE_SINK = 40 , LDNS_RR_TYPE_OPT = 41 , LDNS_RR_TYPE_APL = 42 , LDNS_RR_TYPE_DS = 43 , LDNS_RR_TYPE_SSHFP = 44 , LDNS_RR_TYPE_IPSECKEY = 45 , LDNS_RR_TYPE_RRSIG = 46 , LDNS_RR_TYPE_NSEC = 47 , LDNS_RR_TYPE_DNSKEY = 48 , LDNS_RR_TYPE_DHCID = 49 , LDNS_RR_TYPE_NSEC3 = 50 , LDNS_RR_TYPE_NSEC3PARAM = 51 , LDNS_RR_TYPE_NSEC3PARAMS = 51 , LDNS_RR_TYPE_TLSA = 52 , LDNS_RR_TYPE_SMIMEA = 53 , LDNS_RR_TYPE_HIP = 55 , LDNS_RR_TYPE_NINFO = 56 , LDNS_RR_TYPE_RKEY = 57 , LDNS_RR_TYPE_TALINK = 58 , LDNS_RR_TYPE_CDS = 59 , LDNS_RR_TYPE_CDNSKEY = 60 , LDNS_RR_TYPE_OPENPGPKEY = 61 , LDNS_RR_TYPE_CSYNC = 62 , LDNS_RR_TYPE_ZONEMD = 63 , LDNS_RR_TYPE_SVCB = 64 , LDNS_RR_TYPE_HTTPS = 65 , LDNS_RR_TYPE_SPF = 99 , LDNS_RR_TYPE_UINFO = 100 , LDNS_RR_TYPE_UID = 101 , LDNS_RR_TYPE_GID = 102 , LDNS_RR_TYPE_UNSPEC = 103 , LDNS_RR_TYPE_NID = 104 , LDNS_RR_TYPE_L32 = 105 , LDNS_RR_TYPE_L64 = 106 , LDNS_RR_TYPE_LP = 107 , LDNS_RR_TYPE_EUI48 = 108 , LDNS_RR_TYPE_EUI64 = 109 , LDNS_RR_TYPE_TKEY = 249 , LDNS_RR_TYPE_TSIG = 250 , LDNS_RR_TYPE_IXFR = 251 , LDNS_RR_TYPE_AXFR = 252 , LDNS_RR_TYPE_MAILB = 253 , LDNS_RR_TYPE_MAILA = 254 , LDNS_RR_TYPE_ANY = 255 , LDNS_RR_TYPE_URI = 256 , LDNS_RR_TYPE_CAA = 257 , LDNS_RR_TYPE_AVC = 258 , LDNS_RR_TYPE_TA = 32768 , LDNS_RR_TYPE_DLV = 32769 , LDNS_RR_TYPE_FIRST = 0 , LDNS_RR_TYPE_LAST = 65535 , LDNS_RR_TYPE_COUNT = LDNS_RR_TYPE_LAST - LDNS_RR_TYPE_FIRST + 1 } |
The different RR types. More... | |
enum | sldns_enum_rdf_type { LDNS_RDF_TYPE_NONE , LDNS_RDF_TYPE_DNAME , LDNS_RDF_TYPE_INT8 , LDNS_RDF_TYPE_INT16 , LDNS_RDF_TYPE_INT32 , LDNS_RDF_TYPE_A , LDNS_RDF_TYPE_AAAA , LDNS_RDF_TYPE_STR , LDNS_RDF_TYPE_APL , LDNS_RDF_TYPE_B32_EXT , LDNS_RDF_TYPE_B64 , LDNS_RDF_TYPE_HEX , LDNS_RDF_TYPE_NSEC , LDNS_RDF_TYPE_TYPE , LDNS_RDF_TYPE_CLASS , LDNS_RDF_TYPE_CERT_ALG , LDNS_RDF_TYPE_ALG , LDNS_RDF_TYPE_UNKNOWN , LDNS_RDF_TYPE_TIME , LDNS_RDF_TYPE_PERIOD , LDNS_RDF_TYPE_TSIGTIME , LDNS_RDF_TYPE_HIP , LDNS_RDF_TYPE_INT16_DATA , LDNS_RDF_TYPE_SERVICE , LDNS_RDF_TYPE_LOC , LDNS_RDF_TYPE_WKS , LDNS_RDF_TYPE_NSAP , LDNS_RDF_TYPE_ATMA , LDNS_RDF_TYPE_IPSECKEY , LDNS_RDF_TYPE_NSEC3_SALT , LDNS_RDF_TYPE_NSEC3_NEXT_OWNER , LDNS_RDF_TYPE_ILNP64 , LDNS_RDF_TYPE_EUI48 , LDNS_RDF_TYPE_EUI64 , LDNS_RDF_TYPE_TAG , LDNS_RDF_TYPE_LONG_STR , LDNS_RDF_TYPE_TSIGERROR , LDNS_RDF_TYPE_SVCPARAM , LDNS_RDF_TYPE_BITMAP = LDNS_RDF_TYPE_NSEC } |
The different types of RDATA fields. More... | |
enum | sldns_enum_algorithm { LDNS_RSAMD5 = 1 , LDNS_DH = 2 , LDNS_DSA = 3 , LDNS_ECC = 4 , LDNS_RSASHA1 = 5 , LDNS_DSA_NSEC3 = 6 , LDNS_RSASHA1_NSEC3 = 7 , LDNS_RSASHA256 = 8 , LDNS_RSASHA512 = 10 , LDNS_ECC_GOST = 12 , LDNS_ECDSAP256SHA256 = 13 , LDNS_ECDSAP384SHA384 = 14 , LDNS_ED25519 = 15 , LDNS_ED448 = 16 , LDNS_INDIRECT = 252 , LDNS_PRIVATEDNS = 253 , LDNS_PRIVATEOID = 254 } |
Algorithms used in dns. | |
enum | sldns_enum_hash { LDNS_SHA1 = 1 , LDNS_SHA256 = 2 , LDNS_HASH_GOST = 3 , LDNS_SHA384 = 4 } |
Hashing algorithms used in the DS record. | |
enum | sldns_enum_cert_algorithm { LDNS_CERT_PKIX = 1 , LDNS_CERT_SPKI = 2 , LDNS_CERT_PGP = 3 , LDNS_CERT_IPKIX = 4 , LDNS_CERT_ISPKI = 5 , LDNS_CERT_IPGP = 6 , LDNS_CERT_ACPKIX = 7 , LDNS_CERT_IACPKIX = 8 , LDNS_CERT_URI = 253 , LDNS_CERT_OID = 254 } |
algorithms used in CERT rrs | |
enum | sldns_enum_edns_option { LDNS_EDNS_LLQ = 1 , LDNS_EDNS_UL = 2 , LDNS_EDNS_NSID = 3 , LDNS_EDNS_DAU = 5 , LDNS_EDNS_DHU = 6 , LDNS_EDNS_N3U = 7 , LDNS_EDNS_CLIENT_SUBNET = 8 , LDNS_EDNS_COOKIE = 10 , LDNS_EDNS_KEEPALIVE = 11 , LDNS_EDNS_PADDING = 12 , LDNS_EDNS_EDE = 15 , LDNS_EDNS_CLIENT_TAG = 16 , LDNS_EDNS_UNBOUND_CACHEDB_TESTFRAME_TEST = 65534 } |
EDNS option codes. | |
enum | sldns_enum_ede_code { LDNS_EDE_NONE = -1 , LDNS_EDE_OTHER = 0 , LDNS_EDE_UNSUPPORTED_DNSKEY_ALG = 1 , LDNS_EDE_UNSUPPORTED_DS_DIGEST = 2 , LDNS_EDE_STALE_ANSWER = 3 , LDNS_EDE_FORGED_ANSWER = 4 , LDNS_EDE_DNSSEC_INDETERMINATE = 5 , LDNS_EDE_DNSSEC_BOGUS = 6 , LDNS_EDE_SIGNATURE_EXPIRED = 7 , LDNS_EDE_SIGNATURE_NOT_YET_VALID = 8 , LDNS_EDE_DNSKEY_MISSING = 9 , LDNS_EDE_RRSIGS_MISSING = 10 , LDNS_EDE_NO_ZONE_KEY_BIT_SET = 11 , LDNS_EDE_NSEC_MISSING = 12 , LDNS_EDE_CACHED_ERROR = 13 , LDNS_EDE_NOT_READY = 14 , LDNS_EDE_BLOCKED = 15 , LDNS_EDE_CENSORED = 16 , LDNS_EDE_FILTERED = 17 , LDNS_EDE_PROHIBITED = 18 , LDNS_EDE_STALE_NXDOMAIN_ANSWER = 19 , LDNS_EDE_NOT_AUTHORITATIVE = 20 , LDNS_EDE_NOT_SUPPORTED = 21 , LDNS_EDE_NO_REACHABLE_AUTHORITY = 22 , LDNS_EDE_NETWORK_ERROR = 23 , LDNS_EDE_INVALID_DATA = 24 , LDNS_EDE_SIGNATURE_EXPIRED_BEFORE_VALID = 25 , LDNS_EDE_TOO_EARLY = 26 , LDNS_EDE_UNSUPPORTED_NSEC3_ITERATIONS = 27 , LDNS_EDE_BADPROXYPOLICY = 28 , LDNS_EDE_SYNTHESIZED = 29 } |
Functions | |
const sldns_rr_descriptor * | sldns_rr_descript (uint16_t type) |
returns the resource record descriptor for the given rr type. More... | |
size_t | sldns_rr_descriptor_minimum (const sldns_rr_descriptor *descriptor) |
returns the minimum number of rdata fields of the rr type this descriptor describes. More... | |
size_t | sldns_rr_descriptor_maximum (const sldns_rr_descriptor *descriptor) |
returns the maximum number of rdata fields of the rr type this descriptor describes. More... | |
sldns_rdf_type | sldns_rr_descriptor_field_type (const sldns_rr_descriptor *descriptor, size_t field) |
returns the rdf type for the given rdata field number of the rr type for the given descriptor. More... | |
sldns_rr_type | sldns_get_rr_type_by_name (const char *name) |
retrieves a rrtype by looking up its name. More... | |
sldns_rr_class | sldns_get_rr_class_by_name (const char *name) |
retrieves a class by looking up its name. More... | |
Variables | |
struct sldns_struct_lookup_table * | sldns_rr_classes |
lookuptable for rr classes | |
Defines resource record types and constants.
enum sldns_enum_rr_class |
enum sldns_enum_rr_type |
The different RR types.
enum sldns_enum_rdf_type |
The different types of RDATA fields.
const sldns_rr_descriptor* sldns_rr_descript | ( | uint16_t | type | ) |
returns the resource record descriptor for the given rr type.
[in] | type | the type value of the rr type |
Referenced by analyze_rr(), calc_size(), canonical_compare(), decompress_rr_into_buffer(), lowercase_rdata(), print_ext(), rrinternal_parse_rdata(), sldns_wire2str_rdata_scan(), sldns_wire2str_type_print(), and type_rdata_compressable().
size_t sldns_rr_descriptor_minimum | ( | const sldns_rr_descriptor * | descriptor | ) |
returns the minimum number of rdata fields of the rr type this descriptor describes.
[in] | descriptor | for an rr type |
References sldns_struct_rr_descriptor::_minimum.
Referenced by sldns_wire2str_rdata_scan().
size_t sldns_rr_descriptor_maximum | ( | const sldns_rr_descriptor * | descriptor | ) |
returns the maximum number of rdata fields of the rr type this descriptor describes.
[in] | descriptor | for an rr type |
References sldns_struct_rr_descriptor::_maximum, sldns_struct_rr_descriptor::_variable, and LDNS_RDF_TYPE_NONE.
Referenced by sldns_wire2str_rdata_scan().
sldns_rdf_type sldns_rr_descriptor_field_type | ( | const sldns_rr_descriptor * | descriptor, |
size_t | field | ||
) |
returns the rdf type for the given rdata field number of the rr type for the given descriptor.
[in] | descriptor | for an rr type |
[in] | field | the field number |
References sldns_struct_rr_descriptor::_variable, sldns_struct_rr_descriptor::_wireformat, and LDNS_RDF_TYPE_NONE.
Referenced by lowercase_rdata(), and sldns_wire2str_rdata_scan().
sldns_rr_type sldns_get_rr_type_by_name | ( | const char * | name | ) |
retrieves a rrtype by looking up its name.
[in] | name | a string with the name |
Referenced by do_flush_type(), massage_type(), and qlist_parse_line().
sldns_rr_class sldns_get_rr_class_by_name | ( | const char * | name | ) |
retrieves a class by looking up its name.
[in] | name | string with the name |
Referenced by massage_class(), and qlist_parse_line().