kernel - Fix races created by a comedy of circumstansces (3)
[dragonfly.git] / contrib / ldns / drill / drill_util.h
blob42b3f32b25dfdba33b0bd7e534f35a59c9066fa5
1 /*
2 * util.h
3 * util.c header file
4 * in ldns
5 * (c) 2005 NLnet Labs
7 * See the file LICENSE for the license
9 */
11 #ifndef _DRILL_UTIL_H_
12 #define _DRILL_UTIL_H_
13 #include <ldns/ldns.h>
16 /**
17 * Read keys from filename and append to key_list.
19 ldns_status read_key_file(const char *filename, ldns_rr_list *key_list,
20 bool silently);
22 /**
23 * return a address rdf, either A or AAAA
24 * NULL if anything goes wrong
26 ldns_rdf * ldns_rdf_new_addr_frm_str(char *);
28 /**
29 * print all the ds of the keys in the packet
31 void print_ds_of_keys(ldns_pkt *p);
33 /**
34 * print some rdfs of a signature
36 void print_rrsig_abbr(FILE *fp, ldns_rr *sig);
37 /**
38 * print some rdfs of a dnskey
40 void print_dnskey_abbr(FILE *fp, ldns_rr *key);
41 /**
42 * print some rdfs of a ds
44 void print_ds_abbr(FILE *fp, ldns_rr *ds);
46 /**
47 * print some rdfs of a rr in a rr_list
49 void print_rr_list_abbr(FILE *fp, ldns_rr_list *sig, const char *usr);
51 /**
52 * Alloc some memory, with error checking
54 void *xmalloc(size_t s);
56 /**
57 * Realloc some memory, with error checking
59 void *xrealloc(void *p, size_t s);
61 /**
62 * Free the data
64 void xfree(void *q);
65 #endif /* _DRILL_UTIL_H_ */