19 #define LDNS_SYNTAX_DATALEN 16
20 #define LDNS_TTL_DATALEN 21
21 #define LDNS_RRLIST_INIT 8
113 ldns_rr_new_frm_str_internal(
ldns_rr **newrr,
const char *str,
114 uint32_t default_ttl,
const ldns_rdf *origin,
132 const char *delimiters;
136 int was_unknown_rr_format = 0;
149 uint16_t hex_data_size;
150 char *hex_data_str = NULL;
151 uint16_t cur_hex_data_size;
153 uint8_t *hex_data = NULL;
166 rr_buf->
_data = NULL;
169 rd_buf->
_data = NULL;
171 if (!
new || !owner || !ttl || !clas || !rdata ||
172 !rr_buf || !rd_buf || !rd || !xtok) {
193 if (strlen(ttl) > 0 && !isdigit((
int) ttl[0])) {
195 if (default_ttl == 0) {
198 ttl_val = default_ttl;
215 strncpy(type, ttl, strlen(ttl) + 1);
234 strncpy(type, clas, strlen(clas) + 1);
259 if (strlen(owner) <= 1 && strncmp(owner,
"@", 1) == 0) {
262 }
else if (prev && *prev) {
278 if (strlen(owner) == 0) {
341 for (done =
false, r_cnt = 0; !done && r_cnt < r_max; r_cnt++) {
354 default : delimiters =
"\n\t ";
357 if (ldns_rdf_type_maybe_quoted(
360 ldns_buffer_remaining(rd_buf) > 0){
363 while (*(ldns_buffer_current(rd_buf)) ==
' ') {
364 ldns_buffer_skip(rd_buf, 1);
367 if (*(ldns_buffer_current(rd_buf)) ==
'\"') {
369 ldns_buffer_skip(rd_buf, 1);
384 while (ldns_buffer_position(rd_buf) < ldns_buffer_limit(rd_buf)
385 && *(ldns_buffer_current(rd_buf)) ==
' '
388 ldns_buffer_skip(rd_buf, 1);
391 pre_data_pos = ldns_buffer_position(rd_buf);
402 rd_strlen = strlen(rd);
405 if (strncmp(rd,
"\\#", 2) == 0 && !quoted &&
406 (rd_strlen == 2 || rd[2]==
' ')) {
408 was_unknown_rr_format = 1;
412 ldns_buffer_set_position(rd_buf, pre_data_pos);
413 delimiters =
"\n\t ";
424 hex_data_size = (uint16_t) atoi(rd);
431 cur_hex_data_size = 0;
432 while(cur_hex_data_size < 2 * hex_data_size) {
436 rd_strlen = strlen(rd);
439 (
size_t)cur_hex_data_size + rd_strlen >
440 2 * (
size_t)hex_data_size) {
445 strncpy(hex_data_str + cur_hex_data_size, rd,
448 cur_hex_data_size += rd_strlen;
450 hex_data_str[cur_hex_data_size] =
'\0';
462 ldns_write_uint16(hex_data, hex_data_size);
464 hex_data + 2, hex_data_str);
466 hex_data_size + 2, &hex_pos);
484 }
else if(rd_strlen > 0 || quoted) {
494 if (r_cnt == r_max - 1) {
498 (void) strncat(rd, xtok,
525 (void) strncat(rd,
" ",
528 (void) strncat(rd, xtok,
538 (void) strncat(rd,
" ",
541 (void) strncat(rd, xtok,
576 }
else if (r && rd_strlen >= 1 && origin &&
598 if (ldns_buffer_available(rd_buf, 1)) {
599 ldns_buffer_skip(rd_buf, 1);
610 if (ldns_buffer_remaining(rd_buf) > 0) {
617 if (!question && desc && !was_unknown_rr_format &&
635 if (rd_buf && rd_buf->
_data) {
640 if (rr_buf && rr_buf->
_data) {
660 uint32_t default_ttl,
const ldns_rdf *origin,
663 return ldns_rr_new_frm_str_internal(newrr,
675 return ldns_rr_new_frm_str_internal(newrr,
685 ldns_strip_ws(
char *line)
689 for (s = line; *s && isspace((
unsigned char)*s); s++)
692 for (e = strchr(s, 0); e > s+2 && isspace((
unsigned char)e[-1]) && e[-2] !=
'\\'; e--)
745 if (strncmp(line,
"$ORIGIN", 7) == 0 && isspace((
unsigned char)line[7])) {
751 ldns_strip_ws(line + 8));
759 }
else if (strncmp(line,
"$TTL", 4) == 0 && isspace((
unsigned char)line[4])) {
762 ldns_strip_ws(line + 5), &endptr);
765 }
else if (strncmp(line,
"$INCLUDE", 8) == 0) {
767 }
else if (!*ldns_strip_ws(line)) {
771 if (origin && *origin) {
832 if (position < rd_count) {
971 assert(count <= rr_list->_rr_capacity);
979 return rr_list->
_rrs[nr];
989 if(!rr_list)
return NULL;
992 rr_list->
_rrs = NULL;
1038 for(i = 0; i < r_rr_count; i++) {
1071 for(i = 0; i < l_rr_count; i++) {
1076 for(i = 0; i < r_rr_count; i++) {
1127 if(rr_count+1 > cap) {
1137 rr_list->
_rrs = rrs;
1171 if (rr_count == 0) {
1289 if (rr_count == 0) {
1315 for(i = 0; i < rr_count; i++) {
1446 qsort_schwartz_rr_compare(
const void *a,
const void *b)
1457 ldns_rr *canonical_a, *canonical_b;
1512 if(!sortables)
return;
1513 for (i = 0; i < item_count; i++) {
1531 qsort_schwartz_rr_compare);
1532 for (i = 0; i < item_count; i++) {
1550 assert(rr1 != NULL);
1551 assert(rr2 != NULL);
1575 if (offset > rr1_len || offset > rr2_len) {
1576 if (rr1_len == rr2_len) {
1579 return ((
int) rr2_len - (
int) rr1_len);
1587 size_t rr1_len, rr2_len, min_len, i, offset;
1589 rr1_len = ldns_buffer_capacity(rr1_buf);
1590 rr2_len = ldns_buffer_capacity(rr2_buf);
1595 while (offset < rr1_len && *ldns_buffer_at(rr1_buf, offset) != 0) {
1596 offset += *ldns_buffer_at(rr1_buf, offset) + 1;
1601 min_len = (rr1_len < rr2_len) ? rr1_len : rr2_len;
1603 for(i = offset; i < min_len; i++) {
1604 if (*ldns_buffer_at(rr1_buf,i) < *ldns_buffer_at(rr2_buf,i)) {
1606 }
else if (*ldns_buffer_at(rr1_buf,i) > *ldns_buffer_at(rr2_buf,i)) {
1612 if (rr1_len < rr2_len) {
1614 }
else if (rr1_len > rr2_len) {
1626 size_t rr1_len, rr2_len;
1668 ldns_rr_compare_ds_dnskey(
ldns_rr *ds,
1672 bool result =
false;
1675 if (!dnskey || !ds ||
1707 result = ldns_rr_compare_ds_dnskey(rr1, rr2);
1710 result = ldns_rr_compare_ds_dnskey(rr2, rr1);
1727 assert(rrl1 != NULL);
1728 assert(rrl2 != NULL);
1846 LDNS_RDF_TYPE_PERIOD
1953 #ifdef RRTYPE_OPENPGPKEY
1997 LDNS_RDF_TYPE_INT16_DATA
2185 #ifdef RRTYPE_OPENPGPKEY
2446 #define LDNS_RDATA_FIELD_DESCRIPTORS_COUNT \
2447 (sizeof(rdata_field_descriptors)/sizeof(rdata_field_descriptors[0]))
2491 ldns_rdf_bitmap_known_rr_types_set(
ldns_rdf** rdf,
int value)
2495 uint16_t windows[256]
2504 uint8_t* data = NULL;
2507 assert(rdf != NULL);
2511 for (d=rdata_field_descriptors; d < rdata_field_descriptors_end; d++) {
2512 window = d->
_type >> 8;
2513 subtype = d->
_type & 0xff;
2514 if (windows[window] < subtype) {
2515 windows[window] = subtype;
2522 for (i = 0; i < 256; i++) {
2524 sz += windows[i] / 8 + 3;
2531 memset(data, value, sz);
2535 for (i = 0; i < 256; i++) {
2537 *dptr++ = (uint8_t)i;
2538 *dptr++ = (uint8_t)(windows[i] / 8 + 1);
2556 return ldns_rdf_bitmap_known_rr_types_set(rdf, 0);
2562 return ldns_rdf_bitmap_known_rr_types_set(rdf, 255);
2573 return &rdata_field_descriptors[type];
2579 if (rdata_field_descriptors[i]._type == type) {
2580 return &rdata_field_descriptors[i];
2583 return &rdata_field_descriptors[0];
2616 assert(descriptor != NULL);
2617 assert(index < descriptor->_maximum
2619 if (index < descriptor->_maximum) {
2630 const char *desc_name;
2634 if (strlen(name) > 4 && strncasecmp(name,
"TYPE", 4) == 0) {
2635 return atoi(name + 4);
2640 desc = &rdata_field_descriptors[i];
2641 desc_name = desc->
_name;
2643 strlen(name) == strlen(desc_name) &&
2644 strncasecmp(name, desc_name, strlen(desc_name)) == 0) {
2651 if (strlen(name) == 4 && strncasecmp(name,
"IXFR", 4) == 0) {
2653 }
else if (strlen(name) == 4 && strncasecmp(name,
"AXFR", 4) == 0) {
2655 }
else if (strlen(name) == 5 && strncasecmp(name,
"MAILB", 5) == 0) {
2657 }
else if (strlen(name) == 5 && strncasecmp(name,
"MAILA", 5) == 0) {
2659 }
else if (strlen(name) == 3 && strncasecmp(name,
"ANY", 3) == 0) {
2672 if (strlen(name) > 5 && strncasecmp(name,
"CLASS", 5) == 0) {
2673 return atoi(name + 5);
ldns_rdf * ldns_rr_rdf(const ldns_rr *rr, size_t nr)
returns the rdata field member counter.
_Bool ldns_dname_str_absolute(const char *dname_str)
Checks whether the given dname string is absolute (i.e.
implementation of buffers to ease operations
mailbox or mail list information
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.
ldns_rr * ldns_rr_clone(const ldns_rr *rr)
clones a rr and all its data
void ldns_rdf_deep_free(ldns_rdf *rd)
frees a rdf structure and frees the data.
void ldns_rr_set_rd_count(ldns_rr *rr, size_t count)
sets the rd_count in the rr.
void ldns_rr_set_type(ldns_rr *rr, ldns_rr_type rr_type)
sets the type in the rr.
uint8_t ldns_dname_label_count(const ldns_rdf *r)
count the number of labels inside a LDNS_RDF_DNAME type rdf.
void ldns_rr2canonical(ldns_rr *rr)
converts each dname in a rr to its canonical form.
the canonical name for an alias
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.
int ldns_dname_compare(const ldns_rdf *dname1, const ldns_rdf *dname2)
Compares the two dname rdf's according to the algorithm for ordering in RFC4034 Section 6...
enum ldns_enum_rr_class ldns_rr_class
List or Set of Resource Records.
uint8_t ldns_rdf2native_int8(const ldns_rdf *rd)
returns the native uint8_t representation from the rdf.
_Bool ldns_rr_list_cat(ldns_rr_list *left, const ldns_rr_list *right)
concatenates two ldns_rr_lists together.
#define LDNS_RDATA_FIELD_DESCRIPTORS_COUNT
computes the number of rdata fields
ldns_rdf_type ldns_rr_descriptor_field_type(const ldns_rr_descriptor *descriptor, size_t index)
returns the rdf type for the given rdata field number of the rr type for the given descriptor...
#define LDNS_XMALLOC(type, count)
size_t ldns_rdf_size(const ldns_rdf *rd)
returns the size of the rdf.
enum ldns_enum_hash ldns_hash
void ldns_rr_list_deep_free(ldns_rr_list *rr_list)
frees an rr_list structure and all rrs contained therein.
void ldns_buffer_free(ldns_buffer *buffer)
frees the buffer.
ldns_rr_class _rr_class
Class of the resource record.
ldns_rr * ldns_rr_new_frm_type(ldns_rr_type t)
creates a new rr structure, based on the given type.
ldns_rdf * ldns_rdf_clone(const ldns_rdf *rd)
clones a rdf structure.
http://www.jhsoft.com/rfc/af-saa-0069.000.rtf
void ldns_dname2canonical(const ldns_rdf *rd)
Put a dname into canonical fmt - ie.
uint8_t _maximum
Maximum number of rdata fields in the RRs of this type.
size_t ldns_rr_rd_count(const ldns_rr *rr)
returns the rd_count of an rr structure.
#define LDNS_MAX_PACKETLEN
void ldns_rr_free(ldns_rr *rr)
frees an RR structure
ldns_lookup_table ldns_rr_classes[]
rr types
ssize_t ldns_bget_token(ldns_buffer *b, char *token, const char *delim, size_t limit)
returns a token/char from the buffer b.
ldns_rr_type ldns_get_rr_type_by_name(const char *name)
retrieves a rrtype by looking up its name.
void ldns_rr_list_free(ldns_rr_list *rr_list)
frees an rr_list structure.
_Bool ldns_is_rrset(const ldns_rr_list *rr_list)
checks if an rr_list is a rrset.
size_t ldns_rr_uncompressed_size(const ldns_rr *r)
calculates the uncompressed size of an RR.
#define LDNS_XREALLOC(ptr, type, count)
const ldns_rr_descriptor * ldns_rr_descript(uint16_t type)
returns the resource record descriptor for the given rr type.
A non-zero sequence of US-ASCII letters and numbers in lower case.
A encoding of the value field as specified [RFC1035], Section 5.1., encoded as remaining rdata.
void ldns_buffer_new_frm_data(ldns_buffer *buffer, const void *data, size_t size)
creates a buffer with the specified data.
#define INLINE
splint static inline workaround
a mailbox domain name (EXPERIMENTAL)
size_t _rd_count
Number of data fields.
Including this file will include all ldns files, and define some lookup tables.
ldns_status ldns_rr_new_question_frm_str(ldns_rr **newrr, const char *str, const ldns_rdf *origin, ldns_rdf **prev)
creates an rr for the question section from a string, i.e.
ldns_rdf * ldns_dname_new_frm_str(const char *str)
creates a new dname rdf from a string.
marks the start of a zone of authority
uint8_t * ldns_rdf_data(const ldns_rdf *rd)
returns the data of the rdf.
ldns_rr * ldns_rr_list_rr(const ldns_rr_list *rr_list, size_t nr)
returns a specific rr of an rrlist.
void ldns_rr_set_class(ldns_rr *rr, ldns_rr_class rr_class)
sets the class in the rr.
enum ldns_enum_rdf_type ldns_rdf_type
void ldns_rdf_set_type(ldns_rdf *rd, ldns_rdf_type type)
sets the size of the rdf.
Since RFC7218 TLSA records can be given with mnemonics, hence these rdata field types.
_Bool ldns_rr_compare_ds(const ldns_rr *orr1, const ldns_rr *orr2)
returns true of the given rr's are equal.
ldns_rdf_type _variable
Special rdf types.
_Bool 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).
#define LDNS_MAX_DOMAINLEN
Maximum length of a complete dname.
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.
bogus section, if not interested
_Bool ldns_rr_list_push_rr_list(ldns_rr_list *rr_list, const ldns_rr_list *push_list)
pushes an rr_list to an rrlist.
uint8_t ldns_rr_label_count(const ldns_rr *rr)
counts the number of labels of the ownername.
ldns_rr * ldns_rr_list_pop_rr(ldns_rr_list *rr_list)
pops the last rr from an rrlist.
variable length any type rdata where the length is specified by the first 2 bytes ...
_Bool ldns_rr_push_rdf(ldns_rr *rr, const ldns_rdf *f)
sets rd_field member, it will be placed in the next available spot.
uint16_t ldns_rdf2native_int16(const ldns_rdf *rd)
returns the native uint16_t representation from the rdf.
_Bool 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 ...
Structure to do a Schwartzian-like transformation, for instance when sorting.
ldns_rr_list * ldns_rr_list_new(void)
creates a new rr_list structure.
ldns_rdf * ldns_rr_pop_rdf(ldns_rr *rr)
removes a rd_field member, it will be popped from the last position.
ldns_rr * ldns_rr_set_pop_rr(ldns_rr_list *rr_list)
pops the last rr from an rrset.
ldns_status ldns_rr2buffer_wire_canonical(ldns_buffer *buffer, const ldns_rr *rr, int section)
Copies the rr data to the buffer in wire format, in canonical format according to RFC3597 (every dnam...
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.
a well known service description
ldns_rdf * ldns_rdf_new_frm_str(ldns_rdf_type type, const char *str)
creates a new rdf from a string.
dnsind-kitchen-sink-02.txt
ldns_status ldns_rr2buffer_wire(ldns_buffer *buffer, const ldns_rr *rr, int section)
Copies the rr data to the buffer in wire format.
Contains all information about resource record types.
int ldns_rr_compare(const ldns_rr *rr1, const ldns_rr *rr2)
compares two rrs.
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.
#define LDNS_RDATA_FIELD_DESCRIPTORS_COMMON
ldns_rr_list * ldns_rr_list_clone(const ldns_rr_list *rrlist)
clones an rrlist.
ldns_rr_list * ldns_rr_list_pop_rr_list(ldns_rr_list *rr_list, size_t howmany)
pops an rr_list of size s from an rrlist.
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...
ssize_t ldns_fget_token_l(FILE *f, char *token, const char *delim, size_t limit, int *line_nr)
returns a token/char from the stream F.
ldns_rdf_type ldns_rdf_get_type(const ldns_rdf *rd)
returns the type of the rdf.
void ldns_rr_set_owner(ldns_rr *rr, ldns_rdf *owner)
sets the owner in the rr structure.
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
ldns_rr_type ldns_rr_get_type(const ldns_rr *rr)
returns the type of the rr.
DNSSEC Trust Authorities.
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...
uint32_t ldns_str2period(const char *nptr, const char **endptr)
converts a ttl value (like 5d2h) to a long.
int ldns_rr_compare_no_rdata(const ldns_rr *rr1, const ldns_rr *rr2)
compares two rrs, up to the rdata.
draft-ietf-nimrod-dns-01.txt
nsec3 base32 string (with length byte on wire
a mail group member (EXPERIMENTAL)
void ldns_rr_set_ttl(ldns_rr *rr, uint32_t ttl)
sets the ttl in the rr structure.
enum ldns_enum_status ldns_status
a mail destination (Obsolete - use MX)
#define LDNS_MALLOC(type)
Memory management macros.
ldns_buffer * ldns_buffer_new(size_t capacity)
creates a new buffer with the specified capacity.
ldns_rdf * ldns_rdf_new(ldns_rdf_type type, size_t size, void *data)
allocates a new rdf structure and fills it.
A general purpose lookup table.
#define LDNS_PARSE_SKIP_SPACE
ldns_status ldns_rr_new_frm_fp_l(ldns_rr **newrr, 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.
_Bool ldns_rr_list_push_rr(ldns_rr_list *rr_list, const ldns_rr *rr)
pushes an rr to an rrlist.
4 shorts represented as 4 * 16 bit hex numbers separated by colons.
ldns_rdf * _owner
Owner name, uncompressed.
ldns_status ldns_rr_new_frm_str(ldns_rr **newrr, const char *str, uint32_t default_ttl, const ldns_rdf *origin, ldns_rdf **prev)
creates an rr from a string.
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.
int ldns_hexstring_to_data(uint8_t *data, const char *str)
Converts a hex string to binary data.
uint8_t _minimum
Minimum number of rdata fields in the RRs of this type.
a mail rename domain name (EXPERIMENTAL)
uint32_t _ttl
Time to live.
void ldns_rr_list2canonical(const ldns_rr_list *rr_list)
converts each dname in each rr in a rr_list to its canonical form.
Resource record data field.
ldns_lookup_table * ldns_lookup_by_name(ldns_lookup_table *table, const char *name)
Represents the Public Key Algorithm, HIT and Public Key fields for the HIP RR types.
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)...
ldns_rr_class ldns_get_rr_class_by_name(const char *name)
retrieves a class by looking up its name.
ldns_rdf * ldns_rr_owner(const ldns_rr *rr)
returns the owner name of an rr structure.
ldns_rr * ldns_rr_new(void)
creates a new rr structure.
size_t ldns_rr_list_rr_count(const ldns_rr_list *rr_list)
returns the number of rr's in an rr_list.
void * transformed_object
enum ldns_enum_rr_type ldns_rr_type
const char * _name
Textual name of the RR type.
an authoritative name server
ldns_rdf ** _rdata_fields
The array of rdata's.
void ldns_rr_set_question(ldns_rr *rr, _Bool 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...
int ldns_rr_list_compare(const ldns_rr_list *rrl1, const ldns_rr_list *rrl2)
compares two rr listss.
uint32_t ldns_rr_ttl(const ldns_rr *rr)
returns the ttl of an rr structure.
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...
uint8_t * _data
The data contained in the buffer.
#define LDNS_SYNTAX_DATALEN
_Bool ldns_rr_is_question(const ldns_rr *rr)
returns the question flag of an rr structure.
ldns_rr_class ldns_rr_get_class(const ldns_rr *rr)
returns the class of the rr.
draft-ietf-dnsop-trust-history
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.
ldns_status ldns_dname_cat(ldns_rdf *rd1, const ldns_rdf *rd2)
concatenates rd2 after rd1 (rd2 is copied, rd1 is modified)
#define LDNS_RR_OVERHEAD
The bytes TTL, CLASS and length use up in an rr.
8 * 8 bit hex numbers separated by dashes.
ldns_rr_type _rr_type
the type of the RR.
6 * 8 bit hex numbers separated by dashes.
void ldns_rr_list_sort(ldns_rr_list *unsorted)
sorts an rr_list (canonical wire format).
draft-ietf-nimrod-dns-01.txt
int ldns_rdf_compare(const ldns_rdf *rd1, const ldns_rdf *rd2)
compares two rdf's on their wire formats.
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.
ldns_status ldns_rr_new_frm_fp(ldns_rr **newrr, FILE *fp, uint32_t *ttl, ldns_rdf **origin, ldns_rdf **prev)
creates a new rr from a file containing a string.
a mail forwarder (Obsolete - use MX)
ldns_status ldns_wire2rdf(ldns_rr *rr, const uint8_t *wire, size_t max, size_t *pos)
converts the data on the uint8_t bytearray (in wire format) to DNS rdata fields, and adds them to the...
ldns_rr_type _type
Type of the RR that is described here.
const ldns_rdf_type * _wireformat
Wireformat specification for the rr, i.e.
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.
ldns_rr * ldns_key_rr2ds(const ldns_rr *key, ldns_hash h)
returns a new DS rr that represents the given key rr.