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;
86 fprintf(out,
"; <void>");
109 if(!new_rrsets)
return NULL;
110 new_rrsets->
rrs = NULL;
111 new_rrsets->
type = 0;
113 new_rrsets->
next = NULL;
122 ldns_dnssec_rrs_free_internal(rrsets->
rrs, deep);
125 ldns_dnssec_rrsets_free_internal(rrsets->
next, deep);
128 ldns_dnssec_rrs_free_internal(rrsets->
signatures, deep);
137 ldns_dnssec_rrsets_free_internal(rrsets, 0);
143 ldns_dnssec_rrsets_free_internal(rrsets, 1);
168ldns_dnssec_rrsets_new_frm_rr(
ldns_rr *rr)
184 new_rrsets->
rrs->
rr = rr;
189 new_rrsets->
type = rr_type;
201 if (!rrsets || !rr) {
215 rrsets->
rrs->
rr = rr;
216 rrsets->
type = rr_type;
220 rrsets->
type = rr_type;
229 new_rrsets = ldns_dnssec_rrsets_new_frm_rr(rr);
230 rrsets->
next = new_rrsets;
236 new_rrsets->
rrs = rrsets->
rrs;
242 rrsets->
rrs->
rr = rr;
249 rrsets->
type = rr_type;
250 rrsets->
next = new_rrsets;
265 rrsets->
rrs->
rr = rr;
281 fprintf(out,
"; <void>\n");
294 if (follow && rrsets->
next) {
295 ldns_dnssec_rrsets_print_soa_fmt(out, fmt,
296 rrsets->
next, follow, show_soa);
307 ldns_dnssec_rrsets_print_soa_fmt(out, fmt, rrsets, follow,
true);
365 ldns_dnssec_rrsets_free_internal(name->
rrsets, deep);
367 if (name->
nsec && deep) {
386 ldns_dnssec_name_free_internal(name, 0);
392 ldns_dnssec_name_free_internal(name, 1);
417 if (rrset && dname) {
500 if (result->
type == type) {
503 result = result->
next;
516 if (!zone || !dname || !zone->
names) {
536 ldns_dnssec_rrsets_print_soa_fmt(out, fmt,
537 name->
rrsets,
true, show_soa);
539 fprintf(out,
";; Empty nonterminal: ");
551 fprintf(out,
"; <void>\n");
560 ldns_dnssec_name_print_soa_fmt(out, fmt, name,
true);
574 if(!zone)
return NULL;
596#define FASTER_DNSSEC_ZONE_NEW_FRM_FP 1
599ldns_dnssec_zone_add_empty_nonterminals_nsec3(
603ldns_todo_nsec3_ents_node_free(
ldns_rbnode_t *node,
void *arg) {
638#ifdef FASTER_DNSSEC_ZONE_NEW_FRM_FP
642 uint32_t my_ttl = default_ttl;
646 bool ttl_from_TTL =
false;
647 bool explicit_ttl =
false;
652#ifdef FASTER_DNSSEC_ZONE_NEW_FRM_FP
657 if (!newzone || !todo_nsec3s || !todo_nsec3_rrsigs ) {
672#ifdef FASTER_DNSSEC_ZONE_NEW_FRM_FP
689 my_ttl = default_ttl;
691 &my_prev, line_nr, &explicit_ttl);
695#ifndef FASTER_DNSSEC_ZONE_NEW_FRM_FP
740 if (rr_is_rrsig_covering(cur_rr,
752#ifndef FASTER_DNSSEC_ZONE_NEW_FRM_FP
764#ifndef FASTER_DNSSEC_ZONE_NEW_FRM_FP
770#ifndef FASTER_DNSSEC_ZONE_NEW_FRM_FP
771 default_ttl = my_ttl;
802 new_node->
data = cur_rr;
811 if (todo_nsec3_ents.
count > 0)
812 (void) ldns_dnssec_zone_add_empty_nonterminals_nsec3(
813 newzone, &todo_nsec3_ents);
828#ifdef FASTER_DNSSEC_ZONE_NEW_FRM_FP
835 ldns_todo_nsec3_ents_node_free, NULL);
865ldns_dnssec_name_node_deep_free(
ldns_rbnode_t *node,
void *arg) {
883 ldns_hashed_names_node_free, NULL);
889 ldns_dnssec_name_node_free,
903 ldns_hashed_names_node_free, NULL);
909 ldns_dnssec_name_node_deep_free,
928ldns_dnssec_zone_hashed_names_from_nsec3(
934 assert(zone != NULL);
935 assert(nsec3rr != NULL);
939 ldns_hashed_names_node_free, NULL);
956 ldns_dnssec_name_make_hashed_name(zone, current_name, nsec3rr);
967 assert(name != NULL);
972 ldns_dnssec_zone_hashed_names_from_nsec3(zone, nsec3rr);
974 }
else if (! nsec3rr) {
983 new_node->
data = name;
1000 ldns_dnssec_zone_hashed_names_from_nsec3(zone, rr);
1006 if (hashed_name == NULL) {
1038 cur_node = ldns_dnssec_zone_find_nsec3_original(zone, rr);
1055 cur_node->
data = cur_name;
1057 ldns_dnssec_name_make_hashed_name(zone, cur_name, NULL);
1063 zone->
soa = cur_name;
1079 ldns_dnssec_name_print_soa_fmt(out, fmt, name, print_soa);
1081 fprintf(out,
";\n");
1100 fprintf(out,
";; Zone: ");
1103 fprintf(out,
"\n;\n");
1111 fprintf(out,
";\n");
1116 zone->
names,
false);
1128ldns_dnssec_zone_add_empty_nonterminals_nsec3(
1137 uint16_t i, cur_label_count, next_label_count;
1138 uint16_t soa_label_count = 0;
1164 if (! cur_node->
data || ! next_node->
data) {
1179 for (i = 1; i < next_label_count - soa_label_count; i++) {
1180 lpos = (int)cur_label_count - (
int)next_label_count + (int)i;
1206 if (!(ent_hashed_name =
1232 new_name->
name = ent_name;
1241 new_node->
key = new_name->
name;
1242 new_node->
data = new_name;
1244 ldns_dnssec_name_make_hashed_name(
1245 zone, new_name, NULL);
1258 cur_node = next_node;
1269 return ldns_dnssec_zone_add_empty_nonterminals_nsec3(zone, NULL);
1457 dnssec_zone_rr_iter_set_state_for_next_name(i);
1497 dnssec_zone_rr_iter_set_state_for_next_name(i);
1512 memset(i, 0,
sizeof(*i));
1539 dnssec_zone_rr_iter_set_state_for_next_name(i);
1540 return dnssec_zone_rr_iter_next(i);
1572{ memset(zd, 0,
sizeof(*zd)); }
1621 uint8_t data[65536];
1627 buf.
_limit =
sizeof(data);
1648 uint8_t *data = NULL;
1692zone_digester_export(
1756 if (!zone || !zd || !zone->
soa || !zone->
soa->
name)
1760 for ( rr = dnssec_zone_rr_iter_first(&rr_iter, zone)
1762 ; rr = dnssec_zone_rr_iter_next(&rr_iter)) {
1773 st = zone_digester_update(zd, rr);
1788 size_t valid_zonemds;
1825 if (!soa || !soa->
rrs || !soa->
rrs->
rr)
1828 soa_rr = soa->
rrs->
rr;
1833 zone_digester_init(&zd);
1834 for (rrs = zonemd->
rrs; rrs; rrs = rrs->
next) {
1846 zone_digester_add(&zd,
1850 if (!zone_digester_set(&zd))
1853 if ((st = ldns_digest_zone(zone, &zd)))
1862 for (rrs = zonemd->
rrs; rrs; rrs = rrs->
next) {
1907 if (!rr_list || !rrs)
1949 zone_digester_init(&zd);
1958 if ((st = ldns_digest_zone(zone, &zd)))
1963 if (!soa_rrset || !soa_rrset->
rrs || !soa_rrset->
rrs->
rr)
1965 soa_rr = soa_rrset->
rrs->
rr;
1967 if (!(zonemd_rr_list = zone_digester_export(&zd, soa_rr, &st)))
1973 rrset_ref = &(*rrset_ref)->
next;
1976 zonemd_rrset = *rrset_ref;
1978 zonemd_rrset->
rrs = NULL;
1984 if (!zonemd_rrset) {
1989 zonemd_rrset->
next = *rrset_ref;
1990 *rrset_ref = zonemd_rrset;
1993 st = rr_list2dnssec_rrs( zonemd_rrsigs
1996 st = rr_list2dnssec_rrs( zonemd_rr_list
1997 , &zonemd_rrset->
rrs, new_rrs);
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.
ldns_rdf * ldns_dname_clone_from(const ldns_rdf *d, uint16_t n)
Clones the given dname from the nth label on.
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.
uint8_t ldns_dname_label_count(const ldns_rdf *r)
count the number of labels inside a LDNS_RDF_DNAME type rdf.
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.
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.
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.
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_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.
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)
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.
ldns_dnssec_zone * ldns_dnssec_zone_new(void)
Creates a new dnssec_zone structure.
ldns_rdf * ldns_dnssec_name_name(const ldns_dnssec_name *name)
Returns the domain name of the given dnssec_name structure.
void ldns_dnssec_name_set_name(ldns_dnssec_name *rrset, ldns_rdf *dname)
Sets the domain name of the given dnssec_name structure.
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.
ldns_status ldns_dnssec_rrs_add_rr(ldns_dnssec_rrs *rrs, ldns_rr *rr)
Adds an RR to the list of RRs.
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.
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.
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.
void ldns_dnssec_name_free(ldns_dnssec_name *name)
Frees the name structure and its rrs and rrsets.
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_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_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_status ldns_dnssec_zone_add_empty_nonterminals(ldns_dnssec_zone *zone)
Adds explicit dnssec_name structures for the empty nonterminals in this zone.
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.
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_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.
ldns_dnssec_rrsets * ldns_dnssec_rrsets_new(void)
Creates a new list (entry) of RRsets.
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_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_dnssec_name * ldns_dnssec_name_new(void)
Create a new data structure for a dnssec name.
@ 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_rbnode_t * ldns_rbtree_search(ldns_rbtree_t *rbtree, const void *key)
Find key in 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.
ldns_rbnode_t * ldns_rbtree_next(ldns_rbnode_t *rbtree)
Returns next larger node in the tree.
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.
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_rbtree_t * ldns_rbtree_create(int(*cmpf)(const void *, const void *))
Create new tree (malloced) with given key compare function.
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 ldns_rdf_get_type(const ldns_rdf *rd)
returns the type of the rdf.
void ldns_rdf_deep_free(ldns_rdf *rd)
frees a rdf structure and frees the data.
uint32_t ldns_rdf2native_int32(const ldns_rdf *rd)
returns the native uint32_t representation from the rdf.
ldns_rdf * ldns_native2rdf_int8(ldns_rdf_type type, uint8_t value)
returns the rdf containing the native uint8_t repr.
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.
ldns_rdf * ldns_rdf_new(ldns_rdf_type type, size_t size, void *data)
allocates a new rdf structure and fills it.
void ldns_rr_list_free(ldns_rr_list *rr_list)
frees an rr_list structure.
uint32_t ldns_rr_ttl(const ldns_rr *rr)
returns the ttl 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_list * ldns_rr_list_new(void)
creates a new rr_list structure.
ldns_rr * ldns_rr_list_pop_rr(ldns_rr_list *rr_list)
pops the last rr from an rrlist.
enum ldns_enum_rr_type ldns_rr_type
ldns_rr * ldns_rr_new_frm_type(ldns_rr_type t)
creates a new rr structure, based on the given 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_rdf(const ldns_rr *rr, size_t nr)
returns the rdata field member counter.
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_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_class ldns_rr_get_class(const ldns_rr *rr)
returns the class of the rr.
enum ldns_enum_rr_class ldns_rr_class
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.
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.
ldns_rdf * ldns_rr_owner(const ldns_rr *rr)
returns the owner name of an rr structure.
int ldns_rr_compare(const ldns_rr *rr1, const ldns_rr *rr2)
compares two rrs.
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 * ldns_zone_soa(const ldns_zone *z)
Return the soa record of a zone.
ldns_rr_list * ldns_zone_rrs(const ldns_zone *z)
Get a list of a zone's content.
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.