rr.h
Go to the documentation of this file.
/*
* rr.h - resource record definitions
*
* a Net::DNS like library for C
*
* (c) NLnet Labs, 2005-2006
*
* See the file LICENSE for the license
*/
#ifndef LDNS_RR_H
#define LDNS_RR_H
#include <ldns/common.h>
#include <ldns/rdata.h>
#include <ldns/buffer.h>
#include <ldns/error.h>
#ifdef __cplusplus
extern "C" {
#endif
#define LDNS_MAX_LABELLEN 63
#define LDNS_MAX_DOMAINLEN 255
#define LDNS_MAX_POINTERS 65535
#define LDNS_RR_OVERHEAD 10
enum ldns_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
};
typedef enum ldns_enum_rr_class ldns_rr_class;
enum ldns_enum_rr_compress
{
LDNS_RR_COMPRESS,
LDNS_RR_NO_COMPRESS
};
typedef enum ldns_enum_rr_compress ldns_rr_compress;
enum ldns_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, /* RFC 4255 */
LDNS_RR_TYPE_IPSECKEY = 45, /* RFC 4025 */
LDNS_RR_TYPE_RRSIG = 46, /* RFC 4034 */
LDNS_RR_TYPE_NSEC = 47, /* RFC 4034 */
LDNS_RR_TYPE_DNSKEY = 48, /* RFC 4034 */
LDNS_RR_TYPE_DHCID = 49, /* RFC 4701 */
/* NSEC3 */
LDNS_RR_TYPE_NSEC3 = 50, /* RFC 5155 */
LDNS_RR_TYPE_NSEC3PARAM = 51, /* RFC 5155 */
LDNS_RR_TYPE_NSEC3PARAMS = 51,
LDNS_RR_TYPE_TLSA = 52, /* RFC 6698 */
LDNS_RR_TYPE_SMIMEA = 53, /* RFC 8162 */
LDNS_RR_TYPE_HIP = 55, /* RFC 5205 */
LDNS_RR_TYPE_NINFO = 56,
LDNS_RR_TYPE_RKEY = 57,
LDNS_RR_TYPE_TALINK = 58,
LDNS_RR_TYPE_CDS = 59, /* RFC 7344 */
LDNS_RR_TYPE_CDNSKEY = 60, /* RFC 7344 */
LDNS_RR_TYPE_OPENPGPKEY = 61, /* RFC 7929 */
LDNS_RR_TYPE_CSYNC = 62, /* RFC 7477 */
LDNS_RR_TYPE_ZONEMD = 63, /* RFC 8976 */
LDNS_RR_TYPE_SVCB = 64, /* RFC 9460 */
LDNS_RR_TYPE_HTTPS = 65, /* RFC 9460 */
LDNS_RR_TYPE_SPF = 99, /* RFC 4408 */
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, /* RFC 6742 */
LDNS_RR_TYPE_L32 = 105, /* RFC 6742 */
LDNS_RR_TYPE_L64 = 106, /* RFC 6742 */
LDNS_RR_TYPE_LP = 107, /* RFC 6742 */
LDNS_RR_TYPE_EUI48 = 108, /* RFC 7043 */
LDNS_RR_TYPE_EUI64 = 109, /* RFC 7043 */
LDNS_RR_TYPE_NXNAME = 128, /* draft-ietf-dnsop-compact-denial-of-existence */
LDNS_RR_TYPE_TKEY = 249, /* RFC 2930 */
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, /* RFC 7553 */
LDNS_RR_TYPE_CAA = 257, /* RFC 6844 */
LDNS_RR_TYPE_AVC = 258, /* Cisco's DNS-AS RR, see www.dns-as.org */
LDNS_RR_TYPE_DOA = 259, /* draft-durand-doa-over-dns */
LDNS_RR_TYPE_AMTRELAY = 260,
LDNS_RR_TYPE_RESINFO = 261,
LDNS_RR_TYPE_WALLET = 262,
LDNS_RR_TYPE_TA = 32768,
/* RFC 4431, 5074, DNSSEC Lookaside Validation */
LDNS_RR_TYPE_DLV = 32769,
/* type codes from nsec3 experimental phase
LDNS_RR_TYPE_NSEC3 = 65324,
LDNS_RR_TYPE_NSEC3PARAMS = 65325, */
LDNS_RR_TYPE_FIRST = 0,
LDNS_RR_TYPE_LAST = 65535,
LDNS_RR_TYPE_COUNT = LDNS_RR_TYPE_LAST - LDNS_RR_TYPE_FIRST + 1
};
typedef enum ldns_enum_rr_type ldns_rr_type;
/* The first fields are contiguous and can be referenced instantly */
#define LDNS_RDATA_FIELD_DESCRIPTORS_COMMON (LDNS_RR_TYPE_WALLET + 1)
struct ldns_struct_rr
{
ldns_rdf *_owner;
uint32_t _ttl;
size_t _rd_count;
ldns_rr_type _rr_type;
ldns_rr_class _rr_class;
/* everything in the rdata is in network order */
ldns_rdf **_rdata_fields;
bool _rr_question;
};
typedef struct ldns_struct_rr ldns_rr;
struct ldns_struct_rr_list
{
size_t _rr_count;
size_t _rr_capacity;
ldns_rr **_rrs;
};
typedef struct ldns_struct_rr_list ldns_rr_list;
struct ldns_struct_rr_descriptor
{
ldns_rr_type _type;
const char *_name;
uint8_t _minimum;
uint8_t _maximum;
const ldns_rdf_type *_wireformat;
ldns_rdf_type _variable;
ldns_rr_compress _compress;
uint8_t _dname_count;
};
typedef struct ldns_struct_rr_descriptor ldns_rr_descriptor;
ldns_status ldns_rdf_bitmap_known_rr_types_space(ldns_rdf** rdf);
ldns_status ldns_rdf_bitmap_known_rr_types(ldns_rdf** rdf);
ldns_rr* ldns_rr_new(void);
ldns_rr* ldns_rr_new_frm_type(ldns_rr_type t);
void ldns_rr_free(ldns_rr *rr);
ldns_status ldns_rr_new_frm_str(ldns_rr **n, const char *str,
uint32_t default_ttl, const ldns_rdf *origin,
ldns_rdf **prev);
ldns_status ldns_rr_new_question_frm_str(ldns_rr **n, const char *str,
const ldns_rdf *origin, ldns_rdf **prev);
ldns_status ldns_rr_new_frm_fp(ldns_rr **rr, FILE *fp, uint32_t *default_ttl, ldns_rdf **origin, ldns_rdf **prev);
ldns_status ldns_rr_new_frm_fp_l(ldns_rr **rr, FILE *fp, uint32_t *default_ttl, ldns_rdf **origin, ldns_rdf **prev, int *line_nr);
void ldns_rr_set_owner(ldns_rr *rr, ldns_rdf *owner);
void ldns_rr_set_question(ldns_rr *rr, bool question);
void ldns_rr_set_ttl(ldns_rr *rr, uint32_t ttl);
void ldns_rr_set_rd_count(ldns_rr *rr, size_t count);
void ldns_rr_set_type(ldns_rr *rr, ldns_rr_type rr_type);
void ldns_rr_set_class(ldns_rr *rr, ldns_rr_class rr_class);
ldns_rdf* ldns_rr_set_rdf(ldns_rr *rr, const ldns_rdf *f, size_t position);
bool ldns_rr_push_rdf(ldns_rr *rr, const ldns_rdf *f);
ldns_rdf* ldns_rr_pop_rdf(ldns_rr *rr);
ldns_rdf* ldns_rr_rdf(const ldns_rr *rr, size_t nr);
ldns_rdf* ldns_rr_owner(const ldns_rr *rr);
bool ldns_rr_is_question(const ldns_rr *rr);
uint32_t ldns_rr_ttl(const ldns_rr *rr);
size_t ldns_rr_rd_count(const ldns_rr *rr);
ldns_rr_type ldns_rr_get_type(const ldns_rr *rr);
ldns_rr_class ldns_rr_get_class(const ldns_rr *rr);
/* rr_lists */
size_t ldns_rr_list_rr_count(const ldns_rr_list *rr_list);
void ldns_rr_list_set_rr_count(ldns_rr_list *rr_list, size_t count);
ldns_rr * ldns_rr_list_set_rr(ldns_rr_list *rr_list, const ldns_rr *r, size_t count);
ldns_rr* ldns_rr_list_rr(const ldns_rr_list *rr_list, size_t nr);
ldns_rr_list* ldns_rr_list_new(void);
void ldns_rr_list_free(ldns_rr_list *rr_list);
void ldns_rr_list_deep_free(ldns_rr_list *rr_list);
bool ldns_rr_list_cat(ldns_rr_list *left, const ldns_rr_list *right);
ldns_rr_list* ldns_rr_list_cat_clone(const ldns_rr_list *left, const ldns_rr_list *right);
bool ldns_rr_list_push_rr(ldns_rr_list *rr_list, const ldns_rr *rr);
bool ldns_rr_list_push_rr_list(ldns_rr_list *rr_list, const ldns_rr_list *push_list);
ldns_rr* ldns_rr_list_pop_rr(ldns_rr_list *rr_list);
ldns_rr_list* ldns_rr_list_pop_rr_list(ldns_rr_list *rr_list, size_t size);
bool ldns_rr_list_contains_rr(const ldns_rr_list *rr_list, const ldns_rr *rr);
bool ldns_is_rrset(const ldns_rr_list *rr_list);
bool ldns_rr_set_push_rr(ldns_rr_list *rr_list, ldns_rr *rr);
ldns_rr* ldns_rr_set_pop_rr(ldns_rr_list *rr_list);
ldns_rr_list *ldns_rr_list_pop_rrset(ldns_rr_list *rr_list);
ldns_rr_type ldns_get_rr_type_by_name(const char *name);
ldns_rr_class ldns_get_rr_class_by_name(const char *name);
ldns_rr* ldns_rr_clone(const ldns_rr *rr);
ldns_rr_list* ldns_rr_list_clone(const ldns_rr_list *rrlist);
void ldns_rr_list_sort(ldns_rr_list *unsorted);
int ldns_rr_compare(const ldns_rr *rr1, const ldns_rr *rr2);
int ldns_rr_compare_no_rdata(const ldns_rr *rr1, const ldns_rr *rr2);
int ldns_rr_compare_wire(const ldns_buffer *rr1_buf, const ldns_buffer *rr2_buf);
bool ldns_rr_compare_ds(const ldns_rr *rr1, const ldns_rr *rr2);
int ldns_rr_list_compare(const ldns_rr_list *rrl1, const ldns_rr_list *rrl2);
size_t ldns_rr_uncompressed_size(const ldns_rr *r);
void ldns_rr2canonical(ldns_rr *rr);
void ldns_rr_list2canonical(const ldns_rr_list *rr_list);
uint8_t ldns_rr_label_count(const ldns_rr *rr);
const ldns_rr_descriptor *ldns_rr_descript(uint16_t type);
size_t ldns_rr_descriptor_minimum(const ldns_rr_descriptor *descriptor);
size_t ldns_rr_descriptor_maximum(const ldns_rr_descriptor *descriptor);
ldns_rdf_type ldns_rr_descriptor_field_type(const ldns_rr_descriptor *descriptor, size_t field);
ldns_rr_list *ldns_rr_list_subtype_by_rdf(const ldns_rr_list *l, const ldns_rdf *r, size_t pos);
ldns_rr_type ldns_rdf2rr_type(const ldns_rdf *rd);
ldns_rr_type
ldns_rr_list_type(const ldns_rr_list *rr_list);
ldns_rdf *
ldns_rr_list_owner(const ldns_rr_list *rr_list);
#ifdef __cplusplus
}
#endif
#endif /* LDNS_RR_H */
buffer.h
This file contains the definition of ldns_buffer, and functions to manipulate those.
common.h
Common definitions for LDNS.
error.h
Defines error numbers and functions to translate those to a readable string.
ldns_status
enum ldns_enum_status ldns_status
Definition error.h:148
rdata.h
Defines ldns_rdf and functions to manipulate those.
ldns_rdf_type
enum ldns_enum_rdf_type ldns_rdf_type
Definition rdata.h:151
ldns_rr_list_free
void ldns_rr_list_free(ldns_rr_list *rr_list)
frees an rr_list structure.
Definition rr.c:1015
ldns_get_rr_class_by_name
ldns_rr_class ldns_get_rr_class_by_name(const char *name)
retrieves a class by looking up its name.
Definition rr.c:2742
ldns_rr_ttl
uint32_t ldns_rr_ttl(const ldns_rr *rr)
returns the ttl of an rr structure.
Definition rr.c:935
ldns_rr_pop_rdf
ldns_rdf * ldns_rr_pop_rdf(ldns_rr *rr)
removes a rd_field member, it will be popped from the last position.
Definition rr.c:884
ldns_rdf2rr_type
ldns_rr_type ldns_rdf2rr_type(const ldns_rdf *rd)
convert an rdf of type LDNS_RDF_TYPE_TYPE to an actual LDNS_RR_TYPE.
Definition rr.c:2762
ldns_enum_rr_compress
ldns_enum_rr_compress
Used to specify whether compression is allowed.
Definition rr.h:67
LDNS_RR_NO_COMPRESS
@ LDNS_RR_NO_COMPRESS
Definition rr.h:70
LDNS_RR_COMPRESS
@ LDNS_RR_COMPRESS
compression is allowed
Definition rr.h:69
ldns_rr_list_deep_free
void ldns_rr_list_deep_free(ldns_rr_list *rr_list)
frees an rr_list structure and all rrs contained therein.
Definition rr.c:1024
ldns_rr_free
void ldns_rr_free(ldns_rr *rr)
frees an RR structure
Definition rr.c:81
ldns_rr_set_owner
void ldns_rr_set_owner(ldns_rr *rr, ldns_rdf *owner)
sets the owner in the rr structure.
Definition rr.c:808
ldns_rr_list_new
ldns_rr_list * ldns_rr_list_new(void)
creates a new rr_list structure.
Definition rr.c:1004
ldns_rr_list_type
ldns_rr_type ldns_rr_list_type(const ldns_rr_list *rr_list)
Returns the type of the first element of the RR If there are no elements present, 0 is returned.
Definition rr.c:2779
ldns_rr_list_pop_rr
ldns_rr * ldns_rr_list_pop_rr(ldns_rr_list *rr_list)
pops the last rr from an rrlist.
Definition rr.c:1181
ldns_rr_new_frm_str
ldns_status ldns_rr_new_frm_str(ldns_rr **n, const char *str, uint32_t default_ttl, const ldns_rdf *origin, ldns_rdf **prev)
creates an rr from a string.
Definition rr.c:676
ldns_rr_set_pop_rr
ldns_rr * ldns_rr_set_pop_rr(ldns_rr_list *rr_list)
pops the last rr from an rrset.
Definition rr.c:1346
ldns_rr_list_owner
ldns_rdf * ldns_rr_list_owner(const ldns_rr_list *rr_list)
Returns the owner domain name rdf of the first element of the RR If there are no elements present,...
Definition rr.c:2789
ldns_rr_set_push_rr
signed char ldns_rr_set_push_rr(ldns_rr_list *rr_list, ldns_rr *rr)
pushes an rr to an rrset (which really are rr_list's).
Definition rr.c:1298
ldns_rr_list_pop_rrset
ldns_rr_list * ldns_rr_list_pop_rrset(ldns_rr_list *rr_list)
pops the first rrset from the list, the list must be sorted, so that all rr's from each rrset are nex...
Definition rr.c:1352
ldns_rr_new
ldns_rr * ldns_rr_new(void)
creates a new rr structure.
Definition rr.c:30
ldns_rr_list_contains_rr
signed char ldns_rr_list_contains_rr(const ldns_rr_list *rr_list, const ldns_rr *rr)
returns true if the given rr is one of the rrs in the list, or if it is equal to one
Definition rr.c:1244
ldns_rr_list_sort
void ldns_rr_list_sort(ldns_rr_list *unsorted)
sorts an rr_list (canonical wire format).
Definition rr.c:1520
ldns_rr_type
enum ldns_enum_rr_type ldns_rr_type
Definition rr.h:251
ldns_rr_new_frm_type
ldns_rr * ldns_rr_new_frm_type(ldns_rr_type t)
creates a new rr structure, based on the given type.
Definition rr.c:48
ldns_rr_set_type
void ldns_rr_set_type(ldns_rr *rr, ldns_rr_type rr_type)
sets the type in the rr.
Definition rr.c:832
ldns_enum_rr_type
ldns_enum_rr_type
The different RR types.
Definition rr.h:78
LDNS_RR_TYPE_MF
@ LDNS_RR_TYPE_MF
a mail forwarder (Obsolete - use MX)
Definition rr.h:86
LDNS_RR_TYPE_CERT
@ LDNS_RR_TYPE_CERT
RFC2538.
Definition rr.h:152
LDNS_RR_TYPE_RP
@ LDNS_RR_TYPE_RP
RFC1183.
Definition rr.h:112
LDNS_RR_TYPE_KX
@ LDNS_RR_TYPE_KX
RFC2230.
Definition rr.h:150
LDNS_RR_TYPE_DOA
@ LDNS_RR_TYPE_DOA
Definition rr.h:228
LDNS_RR_TYPE_SPF
@ LDNS_RR_TYPE_SPF
Definition rr.h:198
LDNS_RR_TYPE_RESINFO
@ LDNS_RR_TYPE_RESINFO
RFC 9606.
Definition rr.h:234
LDNS_RR_TYPE_OPT
@ LDNS_RR_TYPE_OPT
OPT record RFC 6891.
Definition rr.h:160
LDNS_RR_TYPE_RRSIG
@ LDNS_RR_TYPE_RRSIG
DNSSEC.
Definition rr.h:170
LDNS_RR_TYPE_SINK
@ LDNS_RR_TYPE_SINK
dnsind-kitchen-sink-02.txt
Definition rr.h:158
LDNS_RR_TYPE_A
@ LDNS_RR_TYPE_A
a host address
Definition rr.h:80
LDNS_RR_TYPE_HIP
@ LDNS_RR_TYPE_HIP
Definition rr.h:182
LDNS_RR_TYPE_LP
@ LDNS_RR_TYPE_LP
Definition rr.h:208
LDNS_RR_TYPE_ISDN
@ LDNS_RR_TYPE_ISDN
RFC1183.
Definition rr.h:118
LDNS_RR_TYPE_IXFR
@ LDNS_RR_TYPE_IXFR
Definition rr.h:217
LDNS_RR_TYPE_MINFO
@ LDNS_RR_TYPE_MINFO
mailbox or mail list information
Definition rr.h:106
LDNS_RR_TYPE_L32
@ LDNS_RR_TYPE_L32
Definition rr.h:206
LDNS_RR_TYPE_GPOS
@ LDNS_RR_TYPE_GPOS
RFC1712.
Definition rr.h:132
LDNS_RR_TYPE_TKEY
@ LDNS_RR_TYPE_TKEY
Definition rr.h:215
LDNS_RR_TYPE_ZONEMD
@ LDNS_RR_TYPE_ZONEMD
Definition rr.h:194
LDNS_RR_TYPE_DNSKEY
@ LDNS_RR_TYPE_DNSKEY
Definition rr.h:172
LDNS_RR_TYPE_FIRST
@ LDNS_RR_TYPE_FIRST
Definition rr.h:247
LDNS_RR_TYPE_SOA
@ LDNS_RR_TYPE_SOA
marks the start of a zone of authority
Definition rr.h:90
LDNS_RR_TYPE_UINFO
@ LDNS_RR_TYPE_UINFO
Definition rr.h:200
LDNS_RR_TYPE_SSHFP
@ LDNS_RR_TYPE_SSHFP
SSH Key Fingerprint.
Definition rr.h:166
LDNS_RR_TYPE_TSIG
@ LDNS_RR_TYPE_TSIG
Definition rr.h:216
LDNS_RR_TYPE_X25
@ LDNS_RR_TYPE_X25
RFC1183.
Definition rr.h:116
LDNS_RR_TYPE_WKS
@ LDNS_RR_TYPE_WKS
a well known service description
Definition rr.h:100
LDNS_RR_TYPE_TLSA
@ LDNS_RR_TYPE_TLSA
Definition rr.h:179
LDNS_RR_TYPE_PX
@ LDNS_RR_TYPE_PX
RFC2163.
Definition rr.h:130
LDNS_RR_TYPE_RT
@ LDNS_RR_TYPE_RT
RFC1183.
Definition rr.h:120
LDNS_RR_TYPE_NSEC
@ LDNS_RR_TYPE_NSEC
Definition rr.h:171
LDNS_RR_TYPE_DNAME
@ LDNS_RR_TYPE_DNAME
RFC2672.
Definition rr.h:156
LDNS_RR_TYPE_OPENPGPKEY
@ LDNS_RR_TYPE_OPENPGPKEY
Definition rr.h:192
LDNS_RR_TYPE_COUNT
@ LDNS_RR_TYPE_COUNT
Definition rr.h:249
LDNS_RR_TYPE_AMTRELAY
@ LDNS_RR_TYPE_AMTRELAY
RFC 8777.
Definition rr.h:231
LDNS_RR_TYPE_DS
@ LDNS_RR_TYPE_DS
RFC4034, RFC3658.
Definition rr.h:164
LDNS_RR_TYPE_KEY
@ LDNS_RR_TYPE_KEY
2535typecode
Definition rr.h:128
LDNS_RR_TYPE_NULL
@ LDNS_RR_TYPE_NULL
a null RR (EXPERIMENTAL)
Definition rr.h:98
LDNS_RR_TYPE_NSEC3PARAM
@ LDNS_RR_TYPE_NSEC3PARAM
Definition rr.h:177
LDNS_RR_TYPE_RKEY
@ LDNS_RR_TYPE_RKEY
draft-reid-dnsext-rkey
Definition rr.h:187
LDNS_RR_TYPE_LAST
@ LDNS_RR_TYPE_LAST
Definition rr.h:248
LDNS_RR_TYPE_NXT
@ LDNS_RR_TYPE_NXT
2535typecode
Definition rr.h:138
LDNS_RR_TYPE_DLV
@ LDNS_RR_TYPE_DLV
Definition rr.h:242
LDNS_RR_TYPE_SIG
@ LDNS_RR_TYPE_SIG
2535typecode
Definition rr.h:126
LDNS_RR_TYPE_CNAME
@ LDNS_RR_TYPE_CNAME
the canonical name for an alias
Definition rr.h:88
LDNS_RR_TYPE_NID
@ LDNS_RR_TYPE_NID
Definition rr.h:205
LDNS_RR_TYPE_NSEC3
@ LDNS_RR_TYPE_NSEC3
Definition rr.h:176
LDNS_RR_TYPE_UID
@ LDNS_RR_TYPE_UID
Definition rr.h:201
LDNS_RR_TYPE_MAILA
@ LDNS_RR_TYPE_MAILA
A request for mail agent RRs (Obsolete - see MX)
Definition rr.h:222
LDNS_RR_TYPE_DHCID
@ LDNS_RR_TYPE_DHCID
Definition rr.h:174
LDNS_RR_TYPE_CDNSKEY
@ LDNS_RR_TYPE_CDNSKEY
Definition rr.h:191
LDNS_RR_TYPE_NSEC3PARAMS
@ LDNS_RR_TYPE_NSEC3PARAMS
Definition rr.h:178
LDNS_RR_TYPE_TA
@ LDNS_RR_TYPE_TA
DNSSEC Trust Authorities.
Definition rr.h:240
LDNS_RR_TYPE_NXNAME
@ LDNS_RR_TYPE_NXNAME
Definition rr.h:213
LDNS_RR_TYPE_LOC
@ LDNS_RR_TYPE_LOC
LOC record RFC1876.
Definition rr.h:136
LDNS_RR_TYPE_TXT
@ LDNS_RR_TYPE_TXT
text strings
Definition rr.h:110
LDNS_RR_TYPE_PTR
@ LDNS_RR_TYPE_PTR
a domain name pointer
Definition rr.h:102
LDNS_RR_TYPE_AAAA
@ LDNS_RR_TYPE_AAAA
ipv6 address
Definition rr.h:134
LDNS_RR_TYPE_EUI64
@ LDNS_RR_TYPE_EUI64
Definition rr.h:211
LDNS_RR_TYPE_MD
@ LDNS_RR_TYPE_MD
a mail destination (Obsolete - use MX)
Definition rr.h:84
LDNS_RR_TYPE_A6
@ LDNS_RR_TYPE_A6
RFC2874.
Definition rr.h:154
LDNS_RR_TYPE_NS
@ LDNS_RR_TYPE_NS
an authoritative name server
Definition rr.h:82
LDNS_RR_TYPE_MR
@ LDNS_RR_TYPE_MR
a mail rename domain name (EXPERIMENTAL)
Definition rr.h:96
LDNS_RR_TYPE_AXFR
@ LDNS_RR_TYPE_AXFR
Definition rr.h:218
LDNS_RR_TYPE_ANY
@ LDNS_RR_TYPE_ANY
any type (wildcard)
Definition rr.h:224
LDNS_RR_TYPE_WALLET
@ LDNS_RR_TYPE_WALLET
https://iana.org/assignments/dns-parameters/WALLET/wallet-completed-template
Definition rr.h:237
LDNS_RR_TYPE_CAA
@ LDNS_RR_TYPE_CAA
Definition rr.h:226
LDNS_RR_TYPE_SVCB
@ LDNS_RR_TYPE_SVCB
Definition rr.h:195
LDNS_RR_TYPE_EUI48
@ LDNS_RR_TYPE_EUI48
Definition rr.h:210
LDNS_RR_TYPE_HTTPS
@ LDNS_RR_TYPE_HTTPS
Definition rr.h:196
LDNS_RR_TYPE_MB
@ LDNS_RR_TYPE_MB
a mailbox domain name (EXPERIMENTAL)
Definition rr.h:92
LDNS_RR_TYPE_NINFO
@ LDNS_RR_TYPE_NINFO
draft-reid-dnsext-zs
Definition rr.h:185
LDNS_RR_TYPE_TALINK
@ LDNS_RR_TYPE_TALINK
draft-ietf-dnsop-trust-history
Definition rr.h:189
LDNS_RR_TYPE_ATMA
@ LDNS_RR_TYPE_ATMA
http://www.jhsoft.com/rfc/af-saa-0069.000.rtf
Definition rr.h:146
LDNS_RR_TYPE_HINFO
@ LDNS_RR_TYPE_HINFO
host information
Definition rr.h:104
LDNS_RR_TYPE_CSYNC
@ LDNS_RR_TYPE_CSYNC
Definition rr.h:193
LDNS_RR_TYPE_EID
@ LDNS_RR_TYPE_EID
draft-ietf-nimrod-dns-01.txt
Definition rr.h:140
LDNS_RR_TYPE_AFSDB
@ LDNS_RR_TYPE_AFSDB
RFC1183.
Definition rr.h:114
LDNS_RR_TYPE_L64
@ LDNS_RR_TYPE_L64
Definition rr.h:207
LDNS_RR_TYPE_NSAP
@ LDNS_RR_TYPE_NSAP
RFC1706.
Definition rr.h:122
LDNS_RR_TYPE_URI
@ LDNS_RR_TYPE_URI
Definition rr.h:225
LDNS_RR_TYPE_AVC
@ LDNS_RR_TYPE_AVC
Definition rr.h:227
LDNS_RR_TYPE_CDS
@ LDNS_RR_TYPE_CDS
Definition rr.h:190
LDNS_RR_TYPE_NAPTR
@ LDNS_RR_TYPE_NAPTR
RFC2915.
Definition rr.h:148
LDNS_RR_TYPE_SMIMEA
@ LDNS_RR_TYPE_SMIMEA
Definition rr.h:180
LDNS_RR_TYPE_SRV
@ LDNS_RR_TYPE_SRV
SRV record RFC2782.
Definition rr.h:144
LDNS_RR_TYPE_IPSECKEY
@ LDNS_RR_TYPE_IPSECKEY
IPsec Key.
Definition rr.h:168
LDNS_RR_TYPE_MAILB
@ LDNS_RR_TYPE_MAILB
A request for mailbox-related records (MB, MG or MR)
Definition rr.h:220
LDNS_RR_TYPE_APL
@ LDNS_RR_TYPE_APL
RFC3123.
Definition rr.h:162
LDNS_RR_TYPE_MX
@ LDNS_RR_TYPE_MX
mail exchange
Definition rr.h:108
LDNS_RR_TYPE_NIMLOC
@ LDNS_RR_TYPE_NIMLOC
draft-ietf-nimrod-dns-01.txt
Definition rr.h:142
LDNS_RR_TYPE_GID
@ LDNS_RR_TYPE_GID
Definition rr.h:202
LDNS_RR_TYPE_MG
@ LDNS_RR_TYPE_MG
a mail group member (EXPERIMENTAL)
Definition rr.h:94
LDNS_RR_TYPE_UNSPEC
@ LDNS_RR_TYPE_UNSPEC
Definition rr.h:203
LDNS_RR_TYPE_NSAP_PTR
@ LDNS_RR_TYPE_NSAP_PTR
RFC1348.
Definition rr.h:124
ldns_rr_list_cat_clone
ldns_rr_list * ldns_rr_list_cat_clone(const ldns_rr_list *left, const ldns_rr_list *right)
concatenates two ldns_rr_lists together, but makes clones of the rr's (instead of pointer copying).
Definition rr.c:1063
ldns_rr_list_push_rr
signed char ldns_rr_list_push_rr(ldns_rr_list *rr_list, const ldns_rr *rr)
pushes an rr to an rrlist.
Definition rr.c:1136
ldns_rr_list_push_rr_list
signed char ldns_rr_list_push_rr_list(ldns_rr_list *rr_list, const ldns_rr_list *push_list)
pushes an rr_list to an rrlist.
Definition rr.c:1167
ldns_rr_is_question
signed char ldns_rr_is_question(const ldns_rr *rr)
returns the question flag of an rr structure.
Definition rr.c:929
ldns_rr2canonical
void ldns_rr2canonical(ldns_rr *rr)
converts each dname in a rr to its canonical form.
Definition rr.c:1785
ldns_rr_rd_count
size_t ldns_rr_rd_count(const ldns_rr *rr)
returns the rd_count of an rr structure.
Definition rr.c:941
ldns_rr_descriptor_field_type
ldns_rdf_type ldns_rr_descriptor_field_type(const ldns_rr_descriptor *descriptor, size_t field)
returns the rdf type for the given rdata field number of the rr type for the given descriptor.
Definition rr.c:2688
ldns_rr_rdf
ldns_rdf * ldns_rr_rdf(const ldns_rr *rr, size_t nr)
returns the rdata field member counter.
Definition rr.c:913
ldns_rr_list_pop_rr_list
ldns_rr_list * ldns_rr_list_pop_rr_list(ldns_rr_list *rr_list, size_t size)
pops an rr_list of size s from an rrlist.
Definition rr.c:1214
ldns_rr_list_subtype_by_rdf
ldns_rr_list * ldns_rr_list_subtype_by_rdf(const ldns_rr_list *l, const ldns_rdf *r, size_t pos)
Return the rr_list which matches the rdf at position field.
Definition rr.c:1102
ldns_rr_label_count
uint8_t ldns_rr_label_count(const ldns_rr *rr)
counts the number of labels of the ownername.
Definition rr.c:1846
ldns_rr_list_rr_count
size_t ldns_rr_list_rr_count(const ldns_rr_list *rr_list)
returns the number of rr's in an rr_list.
Definition rr.c:961
ldns_rr_compare_wire
int ldns_rr_compare_wire(const ldns_buffer *rr1_buf, const ldns_buffer *rr2_buf)
compares the wireformat of two rrs, contained in the given buffers.
Definition rr.c:1604
ldns_rr_list2canonical
void ldns_rr_list2canonical(const ldns_rr_list *rr_list)
converts each dname in each rr in a rr_list to its canonical form.
Definition rr.c:1837
ldns_rr_get_type
ldns_rr_type ldns_rr_get_type(const ldns_rr *rr)
returns the type of the rr.
Definition rr.c:947
ldns_rr_set_ttl
void ldns_rr_set_ttl(ldns_rr *rr, uint32_t ttl)
sets the ttl in the rr structure.
Definition rr.c:820
ldns_rr_set_rdf
ldns_rdf * ldns_rr_set_rdf(ldns_rr *rr, const ldns_rdf *f, size_t position)
sets a rdf member, it will be set on the position given.
Definition rr.c:844
ldns_rr_clone
ldns_rr * ldns_rr_clone(const ldns_rr *rr)
clones a rr and all its data
Definition rr.c:1404
ldns_rr_set_question
void ldns_rr_set_question(ldns_rr *rr, signed char question)
sets the question flag in the rr structure.
ldns_rr_descriptor_maximum
size_t ldns_rr_descriptor_maximum(const ldns_rr_descriptor *descriptor)
returns the maximum number of rdata fields of the rr type this descriptor describes.
Definition rr.c:2673
ldns_rr_compare_ds
signed char ldns_rr_compare_ds(const ldns_rr *rr1, const ldns_rr *rr2)
returns true of the given rr's are equal.
Definition rr.c:1714
ldns_rr_compare_no_rdata
int ldns_rr_compare_no_rdata(const ldns_rr *rr1, const ldns_rr *rr2)
compares two rrs, up to the rdata.
Definition rr.c:1563
ldns_rr_get_class
ldns_rr_class ldns_rr_get_class(const ldns_rr *rr)
returns the class of the rr.
Definition rr.c:953
ldns_rr_list_set_rr
ldns_rr * ldns_rr_list_set_rr(ldns_rr_list *rr_list, const ldns_rr *r, size_t count)
set a rr on a specific index in a ldns_rr_list
Definition rr.c:971
ldns_rr_class
enum ldns_enum_rr_class ldns_rr_class
Definition rr.h:61
ldns_rr_set_rd_count
void ldns_rr_set_rd_count(ldns_rr *rr, size_t count)
sets the rd_count in the rr.
Definition rr.c:826
ldns_rr_list_rr
ldns_rr * ldns_rr_list_rr(const ldns_rr_list *rr_list, size_t nr)
returns a specific rr of an rrlist.
Definition rr.c:994
ldns_rr_new_frm_fp
ldns_status ldns_rr_new_frm_fp(ldns_rr **rr, FILE *fp, uint32_t *default_ttl, ldns_rdf **origin, ldns_rdf **prev)
creates a new rr from a file containing a string.
Definition rr.c:719
ldns_rdf_bitmap_known_rr_types_space
ldns_status ldns_rdf_bitmap_known_rr_types_space(ldns_rdf **rdf)
Create a rr type bitmap rdf providing enough space to set all known (to ldns) rr types.
Definition rr.c:2629
ldns_rr_set_class
void ldns_rr_set_class(ldns_rr *rr, ldns_rr_class rr_class)
sets the class in the rr.
Definition rr.c:838
ldns_is_rrset
signed char ldns_is_rrset(const ldns_rr_list *rr_list)
checks if an rr_list is a rrset.
Definition rr.c:1263
ldns_rr_list_cat
signed char ldns_rr_list_cat(ldns_rr_list *left, const ldns_rr_list *right)
concatenates two ldns_rr_lists together.
Definition rr.c:1040
ldns_rr_list_compare
int ldns_rr_list_compare(const ldns_rr_list *rrl1, const ldns_rr_list *rrl2)
compares two rr lists.
Definition rr.c:1741
ldns_rr_new_frm_fp_l
ldns_status ldns_rr_new_frm_fp_l(ldns_rr **rr, FILE *fp, uint32_t *default_ttl, ldns_rdf **origin, ldns_rdf **prev, int *line_nr)
creates a new rr from a file containing a string.
Definition rr.c:800
ldns_rr_push_rdf
signed char ldns_rr_push_rdf(ldns_rr *rr, const ldns_rdf *f)
sets rd_field member, it will be placed in the next available spot.
Definition rr.c:861
ldns_rr_list_clone
ldns_rr_list * ldns_rr_list_clone(const ldns_rr_list *rrlist)
clones an rrlist.
Definition rr.c:1435
ldns_rr_owner
ldns_rdf * ldns_rr_owner(const ldns_rr *rr)
returns the owner name of an rr structure.
Definition rr.c:923
ldns_rr_compare
int ldns_rr_compare(const ldns_rr *rr1, const ldns_rr *rr2)
compares two rrs.
Definition rr.c:1642
ldns_rr_new_question_frm_str
ldns_status ldns_rr_new_question_frm_str(ldns_rr **n, const char *str, const ldns_rdf *origin, ldns_rdf **prev)
creates an rr for the question section from a string, i.e.
Definition rr.c:690
ldns_rr_list_set_rr_count
void ldns_rr_list_set_rr_count(ldns_rr_list *rr_list, size_t count)
sets the number of rr's in an rr_list.
Definition rr.c:987
ldns_rr_compress
enum ldns_enum_rr_compress ldns_rr_compress
Definition rr.h:72
ldns_enum_rr_class
ldns_enum_rr_class
The different RR classes.
Definition rr.h:45
LDNS_RR_CLASS_NONE
@ LDNS_RR_CLASS_NONE
None class, dynamic update.
Definition rr.h:53
LDNS_RR_CLASS_IN
@ LDNS_RR_CLASS_IN
the Internet
Definition rr.h:47
LDNS_RR_CLASS_LAST
@ LDNS_RR_CLASS_LAST
Definition rr.h:58
LDNS_RR_CLASS_CH
@ LDNS_RR_CLASS_CH
Chaos class.
Definition rr.h:49
LDNS_RR_CLASS_COUNT
@ LDNS_RR_CLASS_COUNT
Definition rr.h:59
LDNS_RR_CLASS_HS
@ LDNS_RR_CLASS_HS
Hesiod (Dyer 87)
Definition rr.h:51
LDNS_RR_CLASS_ANY
@ LDNS_RR_CLASS_ANY
Any class.
Definition rr.h:55
LDNS_RR_CLASS_FIRST
@ LDNS_RR_CLASS_FIRST
Definition rr.h:57
ldns_rr_descriptor_minimum
size_t ldns_rr_descriptor_minimum(const ldns_rr_descriptor *descriptor)
returns the minimum number of rdata fields of the rr type this descriptor describes.
Definition rr.c:2663
ldns_rr_descript
const ldns_rr_descriptor * ldns_rr_descript(uint16_t type)
returns the resource record descriptor for the given rr type.
Definition rr.c:2644
ldns_rr_uncompressed_size
size_t ldns_rr_uncompressed_size(const ldns_rr *r)
calculates the uncompressed size of an RR.
Definition rr.c:1768
ldns_rdf_bitmap_known_rr_types
ldns_status ldns_rdf_bitmap_known_rr_types(ldns_rdf **rdf)
Create a rr type bitmap rdf with at least all known (to ldns) rr types set.
Definition rr.c:2635
ldns_get_rr_type_by_name
ldns_rr_type ldns_get_rr_type_by_name(const char *name)
retrieves a rrtype by looking up its name.
Definition rr.c:2702
ldns_struct_buffer
implementation of buffers to ease operations
Definition buffer.h:51
ldns_struct_rdf
Resource record data field.
Definition rdata.h:197
ldns_struct_rr_descriptor
Contains all information about resource record types.
Definition rr.h:359
ldns_struct_rr_descriptor::_maximum
uint8_t _maximum
Maximum number of rdata fields in the RRs of this type.
Definition rr.h:367
ldns_struct_rr_descriptor::_compress
ldns_rr_compress _compress
Specifies whether compression can be used for dnames in this RR type.
Definition rr.h:373
ldns_struct_rr_descriptor::_name
const char * _name
Textual name of the RR type.
Definition rr.h:363
ldns_struct_rr_descriptor::_variable
ldns_rdf_type _variable
Special rdf types.
Definition rr.h:371
ldns_struct_rr_descriptor::_type
ldns_rr_type _type
Type of the RR that is described here.
Definition rr.h:361
ldns_struct_rr_descriptor::_dname_count
uint8_t _dname_count
The number of DNAMEs in the _wireformat string, for parsing.
Definition rr.h:375
ldns_struct_rr_descriptor::_minimum
uint8_t _minimum
Minimum number of rdata fields in the RRs of this type.
Definition rr.h:365
ldns_struct_rr_descriptor::_wireformat
const ldns_rdf_type * _wireformat
Wireformat specification for the rr, i.e.
Definition rr.h:369
ldns_struct_rr_list
List or Set of Resource Records.
Definition rr.h:346
ldns_struct_rr_list::_rr_capacity
size_t _rr_capacity
Definition rr.h:348
ldns_struct_rr_list::_rrs
ldns_rr ** _rrs
Definition rr.h:349
ldns_struct_rr_list::_rr_count
size_t _rr_count
Definition rr.h:347
ldns_struct_rr
Resource Record.
Definition rr.h:318
ldns_struct_rr::_rr_type
ldns_rr_type _rr_type
the type of the RR.
Definition rr.h:326
ldns_struct_rr::_owner
ldns_rdf * _owner
Owner name, uncompressed.
Definition rr.h:320
ldns_struct_rr::_rdata_fields
ldns_rdf ** _rdata_fields
The array of rdata's.
Definition rr.h:331
ldns_struct_rr::_rr_question
signed char _rr_question
question rr [it would be nicer if thous is after _rd_count] ABI change: Fix this in next major releas...
Definition rr.h:335
ldns_struct_rr::_ttl
uint32_t _ttl
Time to live
Definition rr.h:322
ldns_struct_rr::_rr_class
ldns_rr_class _rr_class
Class of the resource record.
Definition rr.h:328
ldns_struct_rr::_rd_count
size_t _rd_count
Number of data fields.
Definition rr.h:324