summaryrefslogtreecommitdiffstats
path: root/contrib/ldns/drill/drill_util.h
blob: de7844118dbc6b6b5feccc4906af81441052eb72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
 * util.h
 * util.c header file 
 * in ldns
 * (c) 2005 NLnet Labs
 *
 * See the file LICENSE for the license
 *
 */

#ifndef _DRILL_UTIL_H_
#define _DRILL_UTIL_H_
#include <ldns/ldns.h>

/**
 * return a address rdf, either A or AAAA 
 * NULL if anything goes wrong
 */
ldns_rdf * ldns_rdf_new_addr_frm_str(char *);

/**
 * print all the ds of the keys in the packet
 */
void print_ds_of_keys(ldns_pkt *p);

/**
 * print some rdfs of a signature
 */
void print_rrsig_abbr(FILE *fp, ldns_rr *sig);
/**
 * print some rdfs of a dnskey
 */
void print_dnskey_abbr(FILE *fp, ldns_rr *key);
/**
 * print some rdfs of a ds
 */
void print_ds_abbr(FILE *fp, ldns_rr *ds);

/**
 * print some rdfs of a rr in a rr_list
 */
void print_rr_list_abbr(FILE *fp, ldns_rr_list *sig, const char *usr);

/**
 * Alloc some memory, with error checking
 */
void *xmalloc(size_t s);

/** 
 * Realloc some memory, with error checking
 */
void *xrealloc(void *p, size_t s);

/**
 * Free the data
 */
void xfree(void *q);
#endif /* _DRILL_UTIL_H_ */
OpenPOWER on IntegriCloud