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) {
610 int *line_nr,
bool *explicit_ttl);
641 #ifdef FASTER_DNSSEC_ZONE_NEW_FRM_FP
645 uint32_t my_ttl = default_ttl;
649 bool ttl_from_TTL =
false;
650 bool explicit_ttl =
false;
655 #ifdef FASTER_DNSSEC_ZONE_NEW_FRM_FP
660 if (!newzone || !todo_nsec3s || !todo_nsec3_rrsigs ) {
675 #ifdef FASTER_DNSSEC_ZONE_NEW_FRM_FP
692 my_ttl = default_ttl;
694 &my_prev, line_nr, &explicit_ttl);
698 #ifndef FASTER_DNSSEC_ZONE_NEW_FRM_FP
745 if (rr_is_rrsig_covering(cur_rr,
761 #ifndef FASTER_DNSSEC_ZONE_NEW_FRM_FP
762 default_ttl = my_ttl;
793 new_node->
data = cur_rr;
802 if (todo_nsec3_ents.
count > 0)
803 (void) ldns_dnssec_zone_add_empty_nonterminals_nsec3(
804 newzone, &todo_nsec3_ents);
819 #ifdef FASTER_DNSSEC_ZONE_NEW_FRM_FP
826 ldns_todo_nsec3_ents_node_free, NULL);
856 ldns_dnssec_name_node_deep_free(
ldns_rbnode_t *node,
void *arg) {
863 ldns_hashed_names_node_free(
ldns_rbnode_t *node,
void *arg) {
874 ldns_hashed_names_node_free, NULL);
880 ldns_dnssec_name_node_free,
894 ldns_hashed_names_node_free, NULL);
900 ldns_dnssec_name_node_deep_free,
919 ldns_dnssec_zone_hashed_names_from_nsec3(
925 assert(zone != NULL);
926 assert(nsec3rr != NULL);
930 ldns_hashed_names_node_free, NULL);
947 ldns_dnssec_name_make_hashed_name(zone, current_name, nsec3rr);
958 assert(name != NULL);
963 ldns_dnssec_zone_hashed_names_from_nsec3(zone, nsec3rr);
965 }
else if (! nsec3rr) {
974 new_node->
data = name;
991 ldns_dnssec_zone_hashed_names_from_nsec3(zone, rr);
997 if (hashed_name == NULL) {
1029 cur_node = ldns_dnssec_zone_find_nsec3_original(zone, rr);
1046 cur_node->
data = cur_name;
1048 ldns_dnssec_name_make_hashed_name(zone, cur_name, NULL);
1054 zone->
soa = cur_name;
1070 ldns_dnssec_name_print_soa_fmt(out, fmt, name, print_soa);
1072 fprintf(out,
";\n");
1091 fprintf(out,
";; Zone: ");
1094 fprintf(out,
"\n;\n");
1102 fprintf(out,
";\n");
1107 zone->
names,
false);
1119 ldns_dnssec_zone_add_empty_nonterminals_nsec3(
1128 uint16_t i, cur_label_count, next_label_count;
1129 uint16_t soa_label_count = 0;
1155 if (! cur_node->
data || ! next_node->
data) {
1170 for (i = 1; i < next_label_count - soa_label_count; i++) {
1171 lpos = (int)cur_label_count - (
int)next_label_count + (int)i;
1197 if (!(ent_hashed_name =
1223 new_name->
name = ent_name;
1232 new_node->
key = new_name->
name;
1233 new_node->
data = new_name;
1235 ldns_dnssec_name_make_hashed_name(
1236 zone, new_name, NULL);
1249 cur_node = next_node;
1260 return ldns_dnssec_zone_add_empty_nonterminals_nsec3(zone, NULL);
1448 dnssec_zone_rr_iter_set_state_for_next_name(i);
1488 dnssec_zone_rr_iter_set_state_for_next_name(i);
1503 memset(i, 0,
sizeof(*i));
1523 dnssec_zone_rr_iter_set_state_for_next_name(i);
1524 return dnssec_zone_rr_iter_next(i);
1556 { memset(zd, 0,
sizeof(*zd)); }
1605 uint8_t data[65536];
1611 buf.
_limit =
sizeof(data);
1632 uint8_t *data = NULL;
1676 zone_digester_export(
1740 if (!zone || !zd || !zone->
soa || !zone->
soa->
name)
1744 for ( rr = dnssec_zone_rr_iter_first(&rr_iter, zone)
1746 ; rr = dnssec_zone_rr_iter_next(&rr_iter)) {
1757 st = zone_digester_update(zd, rr);
1772 size_t valid_zonemds;
1809 if (!soa || !soa->
rrs || !soa->
rrs->
rr)
1812 soa_rr = soa->
rrs->
rr;
1817 zone_digester_init(&zd);
1818 for (rrs = zonemd->
rrs; rrs; rrs = rrs->
next) {
1830 zone_digester_add(&zd,
1834 if (!zone_digester_set(&zd))
1837 if ((st = ldns_digest_zone(zone, &zd)))
1846 for (rrs = zonemd->
rrs; rrs; rrs = rrs->
next) {
1891 if (!rr_list || !rrs)
1930 zone_digester_init(&zd);
1939 if ((st = ldns_digest_zone(zone, &zd)))
1944 if (!soa_rrset || !soa_rrset->
rrs || !soa_rrset->
rrs->
rr)
1946 soa_rr = soa_rrset->
rrs->
rr;
1948 if (!(zonemd_rr_list = zone_digester_export(&zd, soa_rr, &st)))
1954 rrset_ref = &(*rrset_ref)->
next;
1957 zonemd_rrset = *rrset_ref;
1959 zonemd_rrset->
rrs = NULL;
1965 if (!zonemd_rrset) {
1970 zonemd_rrset->
next = *rrset_ref;
1971 *rrset_ref = zonemd_rrset;
1974 st = rr_list2dnssec_rrs( zonemd_rrsigs
1977 st = rr_list2dnssec_rrs( zonemd_rr_list
1978 , &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.
bool 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.
bool 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.
bool 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)
use this function to sign with a public/private key alg return the created signatures
#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
ldns_status _ldns_rr_new_frm_fp_l_internal(ldns_rr **newrr, FILE *fp, uint32_t *default_ttl, ldns_rdf **origin, ldns_rdf **prev, int *line_nr, bool *explicit_ttl)
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_rrsets_print_fmt(FILE *out, const ldns_output_format *fmt, const ldns_dnssec_rrsets *rrsets, bool follow)
Print the given list of rrsets to the given file descriptor.
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.
bool ldns_dnssec_name_is_glue(const ldns_dnssec_name *name)
Returns if dnssec_name structure is marked as glue.
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.
void ldns_dnssec_zone_names_print_fmt(FILE *out, const ldns_output_format *fmt, const ldns_rbtree_t *tree, bool print_soa)
Prints the rbtree of ldns_dnssec_name structures to the file descriptor.
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_rrs_print_fmt(FILE *out, const ldns_output_format *fmt, const ldns_dnssec_rrs *rrs)
Prints the given rrs to the file descriptor.
bool 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.
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.
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...
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(FILE *out, const ldns_dnssec_rrsets *rrsets, bool 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.
void ldns_dnssec_zone_names_print(FILE *out, const ldns_rbtree_t *tree, bool print_soa)
Prints the rbtree of ldns_dnssec_name structures to the file descriptor.
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 *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...
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.
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.
ldns_rbnode_t * ldns_rbtree_next(ldns_rbnode_t *node)
Returns next larger node in the tree.
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.
#define LDNS_RBTREE_NULL
The nullpointer, points to empty node.
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.
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.
@ LDNS_RDF_TYPE_INT32
32 bits
@ LDNS_RDF_TYPE_HEX
hex string
@ LDNS_RDF_TYPE_INT8
8 bits
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.
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.
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.
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.
bool ldns_rr_list_push_rr(ldns_rr_list *rr_list, const ldns_rr *rr)
pushes an rr to an rrlist.
ldns_rr_class ldns_rr_get_class(const ldns_rr *rr)
returns the class of the rr.
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.
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.
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
enum ldns_enum_rr_class ldns_rr_class
ldns_rdf * ldns_rr_rrsig_typecovered(const ldns_rr *r)
returns the type covered of a LDNS_RR_TYPE_RRSIG rr
void ldns_sha512_init(ldns_sha512_CTX *context)
void ldns_sha512_final(sha2_byte digest[64], ldns_sha512_CTX *context)
void ldns_sha384_update(ldns_sha384_CTX *context, const sha2_byte *data, size_t len)
void ldns_sha512_update(ldns_sha512_CTX *context, const sha2_byte *data, size_t len)
void ldns_sha384_final(sha2_byte digest[48], ldns_sha384_CTX *context)
void ldns_sha384_init(ldns_sha384_CTX *context)
#define LDNS_SHA512_DIGEST_LENGTH
#define LDNS_SHA384_DIGEST_LENGTH
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)
bool name_alloced
Usually, the name is a pointer to the owner name of the first rr for this name, but sometimes there i...
bool 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 * hashed_name
pointer to store the hashed name (only used when in an NSEC3 zone
ldns_dnssec_rrsets * rrsets
The rrsets for this name.
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 default_ttl, ldns_rr_class c __attribute__((unused)), int *line_nr)