1 /* 2 * util.h 3 * util.c header file 4 * in ldns 5 * (c) 2005 NLnet Labs 6 * 7 * See the file LICENSE for the license 8 * 9 */ 10 11 #ifndef _DRILL_UTIL_H_ 12 #define _DRILL_UTIL_H_ 13 #include <ldns/ldns.h> 14 15 /** 16 * return a address rdf, either A or AAAA 17 * NULL if anything goes wrong 18 */ 19 ldns_rdf * ldns_rdf_new_addr_frm_str(char *); 20 21 /** 22 * print all the ds of the keys in the packet 23 */ 24 void print_ds_of_keys(ldns_pkt *p); 25 26 /** 27 * print some rdfs of a signature 28 */ 29 void print_rrsig_abbr(FILE *fp, ldns_rr *sig); 30 /** 31 * print some rdfs of a dnskey 32 */ 33 void print_dnskey_abbr(FILE *fp, ldns_rr *key); 34 /** 35 * print some rdfs of a ds 36 */ 37 void print_ds_abbr(FILE *fp, ldns_rr *ds); 38 39 /** 40 * print some rdfs of a rr in a rr_list 41 */ 42 void print_rr_list_abbr(FILE *fp, ldns_rr_list *sig, char *usr); 43 44 /** 45 * Alloc some memory, with error checking 46 */ 47 void *xmalloc(size_t s); 48 49 /** 50 * Realloc some memory, with error checking 51 */ 52 void *xrealloc(void *p, size_t s); 53 54 /** 55 * Free the data 56 */ 57 void xfree(void *q); 58 #endif /* _DRILL_UTIL_H_ */ 59