7 * See the file LICENSE for the license
11 #ifndef _DRILL_UTIL_H_
12 #define _DRILL_UTIL_H_
13 #include <ldns/ldns.h>
17 * Read keys from filename and append to key_list.
19 ldns_status read_key_file(const char *filename, ldns_rr_list *key_list,
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 *);
29 * print all the ds of the keys in the packet
31 void print_ds_of_keys(ldns_pkt *p);
34 * print some rdfs of a signature
36 void print_rrsig_abbr(FILE *fp, ldns_rr *sig);
38 * print some rdfs of a dnskey
40 void print_dnskey_abbr(FILE *fp, ldns_rr *key);
42 * print some rdfs of a ds
44 void print_ds_abbr(FILE *fp, ldns_rr *ds);
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);
52 * Alloc some memory, with error checking
54 void *xmalloc(size_t s);
57 * Realloc some memory, with error checking
59 void *xrealloc(void *p, size_t s);
65 #endif /* _DRILL_UTIL_H_ */