14 if(!new_rrs)
return NULL;
37 ldns_dnssec_rrs_free_internal(rrs, 0);
43 ldns_dnssec_rrs_free_internal(rrs, 1);
70 new_rrs->
rr = rrs->
rr;
85 fprintf(out,
"; <void>");
108 if(!new_rrsets)
return NULL;
109 new_rrsets->
rrs = NULL;
110 new_rrsets->
type = 0;
112 new_rrsets->
next = NULL;
121 ldns_dnssec_rrs_free_internal(rrsets->
rrs, deep);
124 ldns_dnssec_rrsets_free_internal(rrsets->
next, deep);
127 ldns_dnssec_rrs_free_internal(rrsets->
signatures, deep);
136 ldns_dnssec_rrsets_free_internal(rrsets, 0);
142 ldns_dnssec_rrsets_free_internal(rrsets, 1);
167 ldns_dnssec_rrsets_new_frm_rr(
ldns_rr *rr)
183 new_rrsets->
rrs->
rr = rr;
188 new_rrsets->
type = rr_type;
200 if (!rrsets || !rr) {
214 rrsets->
rrs->
rr = rr;
215 rrsets->
type = rr_type;
219 rrsets->
type = rr_type;
228 new_rrsets = ldns_dnssec_rrsets_new_frm_rr(rr);
229 rrsets->
next = new_rrsets;
235 new_rrsets->
rrs = rrsets->
rrs;
241 rrsets->
rrs->
rr = rr;
248 rrsets->
type = rr_type;
249 rrsets->
next = new_rrsets;
264 rrsets->
rrs->
rr = rr;
280 fprintf(out,
"; <void>\n");
293 if (follow && rrsets->
next) {
294 ldns_dnssec_rrsets_print_soa_fmt(out, fmt,
295 rrsets->
next, follow, show_soa);
306 ldns_dnssec_rrsets_print_soa_fmt(out, fmt, rrsets, follow,
true);
364 ldns_dnssec_rrsets_free_internal(name->
rrsets, deep);
366 if (name->
nsec && deep) {
385 ldns_dnssec_name_free_internal(name, 0);
391 ldns_dnssec_name_free_internal(name, 1);
416 if (rrset && dname) {
499 if (result->
type == type) {
502 result = result->
next;
515 if (!zone || !dname || !zone->
names) {
535 ldns_dnssec_rrsets_print_soa_fmt(out, fmt,
536 name->
rrsets,
true, show_soa);
538 fprintf(out,
";; Empty nonterminal: ");
550 fprintf(out,
"; <void>\n");
559 ldns_dnssec_name_print_soa_fmt(out, fmt, name,
true);
573 if(!zone)
return NULL;
595 #define FASTER_DNSSEC_ZONE_NEW_FRM_FP 1
598 ldns_dnssec_zone_add_empty_nonterminals_nsec3(
602 ldns_todo_nsec3_ents_node_free(
ldns_rbnode_t *node,
void *arg) {
637 #ifdef FASTER_DNSSEC_ZONE_NEW_FRM_FP
641 uint32_t my_ttl = default_ttl;
645 bool ttl_from_TTL =
false;
646 bool explicit_ttl =
false;
651 #ifdef FASTER_DNSSEC_ZONE_NEW_FRM_FP
656 if (!newzone || !todo_nsec3s || !todo_nsec3_rrsigs ) {
671 #ifdef FASTER_DNSSEC_ZONE_NEW_FRM_FP
688 my_ttl = default_ttl;
690 &my_prev, line_nr, &explicit_ttl);
694 #ifndef FASTER_DNSSEC_ZONE_NEW_FRM_FP
741 if (rr_is_rrsig_covering(cur_rr,
757 #ifndef FASTER_DNSSEC_ZONE_NEW_FRM_FP
758 default_ttl = my_ttl;
789 new_node->
data = cur_rr;
798 if (todo_nsec3_ents.
count > 0)
799 (void) ldns_dnssec_zone_add_empty_nonterminals_nsec3(
800 newzone, &todo_nsec3_ents);
815 #ifdef FASTER_DNSSEC_ZONE_NEW_FRM_FP
822 ldns_todo_nsec3_ents_node_free, NULL);
852 ldns_dnssec_name_node_deep_free(
ldns_rbnode_t *node,
void *arg) {
859 ldns_hashed_names_node_free(
ldns_rbnode_t *node,
void *arg) {
870 ldns_hashed_names_node_free, NULL);
876 ldns_dnssec_name_node_free,
890 ldns_hashed_names_node_free, NULL);
896 ldns_dnssec_name_node_deep_free,
915 ldns_dnssec_zone_hashed_names_from_nsec3(
921 assert(zone != NULL);
922 assert(nsec3rr != NULL);
926 ldns_hashed_names_node_free, NULL);
943 ldns_dnssec_name_make_hashed_name(zone, current_name, nsec3rr);
954 assert(name != NULL);
959 ldns_dnssec_zone_hashed_names_from_nsec3(zone, nsec3rr);
961 }
else if (! nsec3rr) {
970 new_node->
data = name;
987 ldns_dnssec_zone_hashed_names_from_nsec3(zone, rr);
993 if (hashed_name == NULL) {
1025 cur_node = ldns_dnssec_zone_find_nsec3_original(zone, rr);
1042 cur_node->
data = cur_name;
1044 ldns_dnssec_name_make_hashed_name(zone, cur_name, NULL);
1050 zone->
soa = cur_name;
1066 ldns_dnssec_name_print_soa_fmt(out, fmt, name, print_soa);
1068 fprintf(out,
";\n");
1087 fprintf(out,
";; Zone: ");
1090 fprintf(out,
"\n;\n");
1098 fprintf(out,
";\n");
1103 zone->
names,
false);
1115 ldns_dnssec_zone_add_empty_nonterminals_nsec3(
1124 uint16_t i, cur_label_count, next_label_count;
1125 uint16_t soa_label_count = 0;
1151 if (! cur_node->
data || ! next_node->
data) {
1166 for (i = 1; i < next_label_count - soa_label_count; i++) {
1167 lpos = (int)cur_label_count - (
int)next_label_count + (int)i;
1193 if (!(ent_hashed_name =
1219 new_name->
name = ent_name;
1228 new_node->
key = new_name->
name;
1229 new_node->
data = new_name;
1231 ldns_dnssec_name_make_hashed_name(
1232 zone, new_name, NULL);
1245 cur_node = next_node;
1256 return ldns_dnssec_zone_add_empty_nonterminals_nsec3(zone, NULL);
1444 dnssec_zone_rr_iter_set_state_for_next_name(i);
1484 dnssec_zone_rr_iter_set_state_for_next_name(i);
1499 memset(i, 0,
sizeof(*i));
1519 dnssec_zone_rr_iter_set_state_for_next_name(i);
1520 return dnssec_zone_rr_iter_next(i);
1552 { memset(zd, 0,
sizeof(*zd)); }
1601 uint8_t data[65536];
1607 buf.
_limit =
sizeof(data);
1628 uint8_t *data = NULL;
1672 zone_digester_export(
1736 if (!zone || !zd || !zone->
soa || !zone->
soa->
name)
1740 for ( rr = dnssec_zone_rr_iter_first(&rr_iter, zone)
1742 ; rr = dnssec_zone_rr_iter_next(&rr_iter)) {
1753 st = zone_digester_update(zd, rr);
1768 size_t valid_zonemds;
1805 if (!soa || !soa->
rrs || !soa->
rrs->
rr)
1808 soa_rr = soa->
rrs->
rr;
1813 zone_digester_init(&zd);
1814 for (rrs = zonemd->
rrs; rrs; rrs = rrs->
next) {
1826 zone_digester_add(&zd,
1830 if (!zone_digester_set(&zd))
1833 if ((st = ldns_digest_zone(zone, &zd)))
1842 for (rrs = zonemd->
rrs; rrs; rrs = rrs->
next) {
1887 if (!rr_list || !rrs)
1929 zone_digester_init(&zd);
1938 if ((st = ldns_digest_zone(zone, &zd)))
1943 if (!soa_rrset || !soa_rrset->
rrs || !soa_rrset->
rrs->
rr)
1945 soa_rr = soa_rrset->
rrs->
rr;
1947 if (!(zonemd_rr_list = zone_digester_export(&zd, soa_rr, &st)))
1953 rrset_ref = &(*rrset_ref)->
next;
1956 zonemd_rrset = *rrset_ref;
1958 zonemd_rrset->
rrs = NULL;
1964 if (!zonemd_rrset) {
1969 zonemd_rrset->
next = *rrset_ref;
1970 *rrset_ref = zonemd_rrset;
1973 st = rr_list2dnssec_rrs( zonemd_rrsigs
1976 st = rr_list2dnssec_rrs( zonemd_rr_list
1977 , &zonemd_rrset->
rrs, new_rrs);
ldns_rdf * ldns_dname_clone_from(const ldns_rdf *d, uint16_t n)
Clones the given dname from the nth label on.
signed char ldns_dname_is_subdomain(const ldns_rdf *sub, const ldns_rdf *parent)
test whether the name sub falls under parent (i.e.
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.
uint8_t ldns_dname_label_count(const ldns_rdf *r)
count the number of labels inside a LDNS_RDF_DNAME type rdf.
ldns_rdf * ldns_dname_label(const ldns_rdf *rdf, uint8_t labelpos)
look inside the rdf and if it is an LDNS_RDF_TYPE_DNAME try and retrieve a specific label.
ldns_rdf * ldns_nsec_get_bitmap(const ldns_rr *nsec)
Returns the rdata field that contains the bitmap of the covered types of the given NSEC record.
signed char ldns_nsec_bitmap_covers_type(const ldns_rdf *bitmap, ldns_rr_type type)
Check if RR type t is enumerated and set in the RR type bitmap rdf.
signed char ldns_nsec3_optout(const ldns_rr *nsec3_rr)
Returns true if the opt-out flag has been set in the given NSEC3 RR.
ldns_rdf * ldns_nsec3_hash_name_frm_nsec3(const ldns_rr *nsec, const ldns_rdf *name)
Calculates the hashed name using the parameters of the given NSEC3 RR.
ldns_rr_list * ldns_sign_public(ldns_rr_list *rrset, ldns_key_list *keys)
Sign an rrset.
#define LDNS_SIGN_WITH_ZONEMD_SIMPLE_SHA384
#define LDNS_SIGN_WITH_ZONEMD_SIMPLE_SHA512
ldns_status ldns_dnssec_zone_new_frm_fp_l(ldns_dnssec_zone **z, FILE *fp, const ldns_rdf *origin, uint32_t default_ttl, ldns_rr_class c __attribute__((unused)), int *line_nr)
void ldns_dnssec_rrsets_free(ldns_dnssec_rrsets *rrsets)
Frees the list of rrsets and their rrs, but not the ldns_rr records in the sets.
void ldns_dnssec_zone_print_fmt(FILE *out, const ldns_output_format *fmt, const ldns_dnssec_zone *zone)
Prints the complete zone to the given file descriptor.
struct dnssec_zone_rr_iter dnssec_zone_rr_iter
void ldns_dnssec_zone_names_print_fmt(FILE *out, const ldns_output_format *fmt, const ldns_rbtree_t *tree, signed char print_soa)
Prints the rbtree of ldns_dnssec_name structures to the file descriptor.
ldns_status ldns_dnssec_zone_verify_zonemd(ldns_dnssec_zone *zone)
ldns_dnssec_rrsets * ldns_dnssec_zone_find_rrset(const ldns_dnssec_zone *zone, const ldns_rdf *dname, ldns_rr_type type)
Find the RRset with the given name and type in the zone.
void ldns_dnssec_name_set_nsec(ldns_dnssec_name *rrset, ldns_rr *nsec)
Sets the NSEC(3) RR of the given dnssec_name structure.
void ldns_dnssec_rrs_deep_free(ldns_dnssec_rrs *rrs)
Frees the list of rrs, and the individual ldns_rr records contained in the list.
void ldns_dnssec_name_set_name(ldns_dnssec_name *rrset, ldns_rdf *dname)
Sets the domain name of the given dnssec_name structure.
ldns_status ldns_dnssec_rrs_add_rr(ldns_dnssec_rrs *rrs, ldns_rr *rr)
Adds an RR to the list of RRs.
ldns_status dnssec_zone_equip_zonemd(ldns_dnssec_zone *zone, ldns_rr_list *new_rrs, ldns_key_list *key_list, int signflags)
void ldns_dnssec_zone_print(FILE *out, const ldns_dnssec_zone *zone)
Prints the complete zone to the given file descriptor.
void ldns_dnssec_name_deep_free(ldns_dnssec_name *name)
Frees the name structure and its rrs and rrsets.
void ldns_dnssec_rrsets_print(FILE *out, const ldns_dnssec_rrsets *rrsets, signed char follow)
Print the given list of rrsets to the given file descriptor.
void ldns_dnssec_name_free(ldns_dnssec_name *name)
Frees the name structure and its rrs and rrsets.
ldns_dnssec_name * ldns_dnssec_name_new(void)
Create a new data structure for a dnssec name.
ldns_status ldns_dnssec_name_add_rr(ldns_dnssec_name *name, ldns_rr *rr)
Inserts the given rr at the right place in the current dnssec_name No checking is done whether the na...
void ldns_dnssec_zone_names_print(FILE *out, const ldns_rbtree_t *tree, signed char print_soa)
Prints the rbtree of ldns_dnssec_name structures to the file descriptor.
void ldns_dnssec_rrs_print_fmt(FILE *out, const ldns_output_format *fmt, const ldns_dnssec_rrs *rrs)
Prints the given rrs to the file descriptor.
ldns_status ldns_dnssec_zone_add_rr(ldns_dnssec_zone *zone, ldns_rr *rr)
Adds the given RR to the zone.
ldns_status ldns_dnssec_rrsets_add_rr(ldns_dnssec_rrsets *rrsets, ldns_rr *rr)
Add an ldns_rr to the corresponding RRset in the given list of RRsets.
void ldns_dnssec_rrs_free(ldns_dnssec_rrs *rrs)
Frees the list of rrs, but not the individual ldns_rr records contained in the list.
ldns_dnssec_name * ldns_dnssec_name_new_frm_rr(ldns_rr *rr)
Create a new data structure for a dnssec name for the given RR.
ldns_status ldns_dnssec_zone_new_frm_fp(ldns_dnssec_zone **z, FILE *fp, const ldns_rdf *origin, uint32_t ttl, ldns_rr_class c __attribute__((unused)))
ldns_dnssec_rrsets * ldns_dnssec_rrsets_new(void)
Creates a new list (entry) of RRsets.
ldns_status ldns_dnssec_zone_add_empty_nonterminals(ldns_dnssec_zone *zone)
Adds explicit dnssec_name structures for the empty nonterminals in this zone.
ldns_rdf * ldns_dnssec_name_name(const ldns_dnssec_name *name)
Returns the domain name of the given dnssec_name structure.
signed char ldns_dnssec_name_is_glue(const ldns_dnssec_name *name)
Returns if dnssec_name structure is marked as glue.
void ldns_dnssec_zone_free(ldns_dnssec_zone *zone)
Frees the given zone structure, and its rbtree of dnssec_names Individual ldns_rr RRs within those na...
signed char ldns_dnssec_zone_is_nsec3_optout(const ldns_dnssec_zone *zone)
If a NSEC3PARAM is available in the apex, walks the zone and returns true on the first optout nsec3.
void ldns_dnssec_rrs_print(FILE *out, const ldns_dnssec_rrs *rrs)
Prints the given rrs to the file descriptor.
enum enum_zonemd_hash zonemd_hash
void ldns_dnssec_rrsets_deep_free(ldns_dnssec_rrsets *rrsets)
Frees the list of rrsets and their rrs, and the ldns_rr records in the sets.
void ldns_dnssec_name_print_fmt(FILE *out, const ldns_output_format *fmt, const ldns_dnssec_name *name)
Prints the RRs in the dnssec name structure to the given file descriptor.
ldns_dnssec_rrs * ldns_dnssec_rrs_new(void)
Creates a new entry for 1 pointer to an rr and 1 pointer to the next rrs.
enum enum_zonemd_scheme zonemd_scheme
void ldns_dnssec_zone_deep_free(ldns_dnssec_zone *zone)
Frees the given zone structure, and its rbtree of dnssec_names Individual ldns_rr RRs within those na...
void ldns_dnssec_rrsets_print_fmt(FILE *out, const ldns_output_format *fmt, const ldns_dnssec_rrsets *rrsets, signed char follow)
Print the given list of rrsets to the given file descriptor.
ldns_dnssec_rrsets * ldns_dnssec_name_find_rrset(const ldns_dnssec_name *name, ldns_rr_type type)
Find the RRset with the given type in within this name structure.
ldns_status ldns_dnssec_rrsets_set_type(ldns_dnssec_rrsets *rrsets, ldns_rr_type type)
Sets the RR type of the rrset (that is head of the given list)
void ldns_dnssec_name_print(FILE *out, const ldns_dnssec_name *name)
Prints the RRs in the dnssec name structure to the given file descriptor.
int ldns_dname_compare_v(const void *a, const void *b)
Given in dnssec_zone.c, also used in dnssec_sign.c:w.
int ldns_dnssec_name_cmp(const void *a, const void *b)
Compares the domain names of the two arguments in their canonical ordering.
dnssec_zone_rr_iter_state
@ DNSSEC_ZONE_RR_ITER_RRSIGs_NSEC
@ DNSSEC_ZONE_RR_ITER_LT_RRSIG
@ DNSSEC_ZONE_RR_ITER_REST
@ DNSSEC_ZONE_RR_ITER_FINI
@ DNSSEC_ZONE_RR_ITER_RRSIGs_NSEC_REST
@ DNSSEC_ZONE_RR_ITER_RRSIGs_NO_NSEC
@ DNSSEC_ZONE_RR_ITER_NSEC3
ldns_dnssec_zone * ldns_dnssec_zone_new(void)
Creates a new dnssec_zone structure.
ldns_rr_type ldns_dnssec_rrsets_type(const ldns_dnssec_rrsets *rrsets)
Returns the rr type of the rrset (that is head of the given list)
@ LDNS_STATUS_DNSSEC_NSEC3_ORIGINAL_NOT_FOUND
@ LDNS_STATUS_SYNTAX_INCLUDE_ERR_NOTIMPL
@ LDNS_STATUS_ZONEMD_UNKNOWN_SCHEME
@ LDNS_STATUS_ZONEMD_DOUBLE_OCCURRENCE
@ LDNS_STATUS_ZONEMD_UNKNOWN_HASH
@ LDNS_STATUS_SYNTAX_EMPTY
@ LDNS_STATUS_ZONEMD_INVALID_SOA
@ LDNS_STATUS_NO_VALID_ZONEMD
@ LDNS_STATUS_SYNTAX_INCLUDE
@ LDNS_STATUS_SYNTAX_ORIGIN
enum ldns_enum_status ldns_status
void ldns_rdf_print(FILE *output, const ldns_rdf *rdf)
Prints the data in the rdata field to the given file stream (in presentation format)
const ldns_output_format * ldns_output_format_default
The default output format record.
void ldns_rr_print_fmt(FILE *output, const ldns_output_format *fmt, const ldns_rr *rr)
Prints the data in the resource record to the given file stream (in presentation format)
#define LDNS_COMMENT_LAYOUT
Print mark up.
ldns_status ldns_rr2buffer_wire_canonical(ldns_buffer *output, const ldns_rr *rr, int section)
Copies the rr data to the buffer in wire format, in canonical format according to RFC3597 (every dnam...
Including this file will include all ldns files, and define some lookup tables.
ldns_rbtree_t * ldns_rbtree_create(int(*cmpf)(const void *, const void *))
Create new tree (malloced) with given key compare function.
ldns_rbnode_t * ldns_rbtree_next(ldns_rbnode_t *rbtree)
Returns next larger node in the tree.
void ldns_traverse_postorder(ldns_rbtree_t *tree, void(*func)(ldns_rbnode_t *, void *), void *arg)
Call function for all elements in the redblack tree, such that leaf elements are called before parent...
ldns_rbnode_t * ldns_rbtree_first(const ldns_rbtree_t *rbtree)
Returns first (smallest) node in the tree.
#define LDNS_RBTREE_NULL
The nullpointer, points to empty node.
ldns_rbnode_t * ldns_rbtree_search(ldns_rbtree_t *rbtree, const void *key)
Find key in tree.
void ldns_rbtree_init(ldns_rbtree_t *rbtree, int(*cmpf)(const void *, const void *))
Init a new tree (malloced by caller) with given key compare function.
ldns_rbnode_t * ldns_rbtree_insert(ldns_rbtree_t *rbtree, ldns_rbnode_t *data)
Insert data into the tree.
ldns_rdf_type ldns_rdf_get_type(const ldns_rdf *rd)
returns the type of the rdf.
ldns_rdf * ldns_native2rdf_int8(ldns_rdf_type type, uint8_t value)
returns the rdf containing the native uint8_t repr.
void ldns_rdf_deep_free(ldns_rdf *rd)
frees a rdf structure and frees the data.
ldns_rdf * ldns_rdf_new(ldns_rdf_type type, size_t size, void *data)
allocates a new rdf structure and fills it.
uint32_t ldns_rdf2native_int32(const ldns_rdf *rd)
returns the native uint32_t representation from the rdf.
uint8_t ldns_rdf2native_int8(const ldns_rdf *rd)
returns the native uint8_t representation from the rdf.
@ LDNS_RDF_TYPE_INT32
32 bits
@ LDNS_RDF_TYPE_HEX
hex string
@ LDNS_RDF_TYPE_INT8
8 bits
size_t ldns_rdf_size(const ldns_rdf *rd)
returns the size of the rdf.
uint8_t * ldns_rdf_data(const ldns_rdf *rd)
returns the data of the rdf.
ldns_rdf * ldns_rdf_clone(const ldns_rdf *rd)
clones a rdf structure.
void ldns_rr_list_free(ldns_rr_list *rr_list)
frees an rr_list structure.
ldns_rr * ldns_rr_list_rr(const ldns_rr_list *rr_list, size_t nr)
returns a specific rr of an rrlist.
ldns_rr * ldns_rr_list_pop_rr(ldns_rr_list *rr_list)
pops the last rr from an rrlist.
uint32_t ldns_rr_ttl(const ldns_rr *rr)
returns the ttl of an rr structure.
ldns_rdf * ldns_rr_owner(const ldns_rr *rr)
returns the owner name of an rr structure.
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.
void ldns_rr_list_deep_free(ldns_rr_list *rr_list)
frees an rr_list structure and all rrs contained therein.
void ldns_rr_free(ldns_rr *rr)
frees an RR structure
void ldns_rr_set_owner(ldns_rr *rr, ldns_rdf *owner)
sets the owner in the rr structure.
ldns_rr * ldns_rr_new_frm_type(ldns_rr_type t)
creates a new rr structure, based on the given type.
enum ldns_enum_rr_type ldns_rr_type
@ LDNS_RR_TYPE_RRSIG
DNSSEC.
@ LDNS_RR_TYPE_SOA
marks the start of a zone of authority
@ LDNS_RR_TYPE_NSEC3PARAM
@ LDNS_RR_TYPE_SIG
2535typecode
signed char ldns_rr_list_push_rr(ldns_rr_list *rr_list, const ldns_rr *rr)
pushes an rr to an rrlist.
size_t ldns_rr_rd_count(const ldns_rr *rr)
returns the rd_count of an rr structure.
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.
size_t ldns_rr_list_rr_count(const ldns_rr_list *rr_list)
returns the number of rr's in an rr_list.
ldns_rr_type ldns_rr_get_type(const ldns_rr *rr)
returns the type of the rr.
void ldns_rr_set_ttl(ldns_rr *rr, uint32_t ttl)
sets the ttl in the rr structure.
ldns_rr_class ldns_rr_get_class(const ldns_rr *rr)
returns the class of the rr.
enum ldns_enum_rr_class ldns_rr_class
void ldns_rr_set_class(ldns_rr *rr, ldns_rr_class rr_class)
sets the class in the rr.
ldns_rr_list * ldns_rr_list_new(void)
creates a new rr_list structure.
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.
int ldns_rr_compare(const ldns_rr *rr1, const ldns_rr *rr2)
compares two rrs.
ldns_rdf * ldns_rr_rdf(const ldns_rr *rr, size_t nr)
returns the rdata field member counter.
ldns_rdf * ldns_rr_rrsig_typecovered(const ldns_rr *r)
returns the type covered of a LDNS_RR_TYPE_RRSIG rr
void ldns_sha512_update(ldns_sha512_CTX *, const uint8_t *, size_t)
void ldns_sha384_init(ldns_sha384_CTX *)
void ldns_sha512_init(ldns_sha512_CTX *)
#define LDNS_SHA512_DIGEST_LENGTH
void ldns_sha512_final(uint8_t[64], ldns_sha512_CTX *)
#define LDNS_SHA384_DIGEST_LENGTH
void ldns_sha384_update(ldns_sha384_CTX *, const uint8_t *, size_t)
void ldns_sha384_final(uint8_t[48], ldns_sha384_CTX *)
ldns_dnssec_name * nsec3_name
dnssec_zone_rr_iter_state state
ldns_dnssec_rrsets * rrsets4rrsigs
ldns_rbnode_t * nsec3_node
ldns_dnssec_rrsets * rrsets
The rbnode_t struct definition.
const void * data
pointer to data
const void * key
pointer to sorting key
definition for tree struct
size_t count
The number of the nodes in the tree.
implementation of buffers to ease operations
size_t _capacity
The amount of data the buffer can contain.
unsigned _fixed
If the buffer is fixed it cannot be resized.
size_t _position
The current position used for reading/writing.
ldns_status _status
The current state of the buffer.
uint8_t * _data
The data contained in the buffer.
size_t _limit
The read/write limit.
ldns_dnssec_rrs * nsec_signatures
signatures for the NSEC record
ldns_rr * nsec
NSEC pointing to the next name (or NSEC3 pointing to the next NSEC3)
signed char name_alloced
Usually, the name is a pointer to the owner name of the first rr for this name, but sometimes there i...
ldns_rdf * hashed_name
pointer to store the hashed name (only used when in an NSEC3 zone
ldns_dnssec_rrsets * rrsets
The rrsets for this name.
signed char is_glue
Unlike what the name is_glue suggests, this field is set to true by ldns_dnssec_zone_mark_glue() or l...
ldns_rdf * name
pointer to a dname containing the name.
ldns_dnssec_rrs * signatures
ldns_dnssec_rrsets * next
Structure containing a dnssec zone.
ldns_rbtree_t * hashed_names
tree of ldns_dnssec_names by nsec3 hashes (when applicable)
ldns_rbtree_t * names
tree of ldns_dnssec_names
ldns_rr * _nsec3params
points to the first added NSEC3 rr whose parameters will be assumed for all subsequent NSEC3 rr's and...
ldns_dnssec_name * soa
points to the name containing the SOA RR
Same as rr_list, but now for keys.
Resource record data field.
List or Set of Resource Records.
ldns_sha512_CTX sha512_CTX
ldns_sha384_CTX sha384_CTX
#define INLINE
splint static inline workaround
#define LDNS_CALLOC(type, count)
#define LDNS_MALLOC(type)
Memory management macros.
#define LDNS_XMALLOC(type, count)
ldns_rr_list * ldns_zone_rrs(const ldns_zone *z)
Get a list of a zone's content.
ldns_rr * ldns_zone_soa(const ldns_zone *z)
Return the soa record of a zone.
void ldns_zone_free(ldns_zone *zone)
Frees the allocated memory for the zone, and the rr_list structure in it.
ldns_status ldns_zone_new_frm_fp_l(ldns_zone **z, FILE *fp, const ldns_rdf *origin, uint32_t ttl, ldns_rr_class c, int *line_nr)
Create a new zone from a file, keep track of the line numbering.