3 * the main header file of drill
4 * (c) 2005, 2006 NLnet Labs
6 * See the file LICENSE for the license
13 #include "drill_util.h"
15 #define DRILL_VERSION "1.6.7"
17 /* what kind of stuff do we allow */
21 #define DRILL_AFROMFILE 3
22 #define DRILL_QTOFILE 4
24 #define DRILL_REVERSE 6
25 #define DRILL_SECTRACE 7
27 #define DRILL_ON(VAR, BIT) \
29 #define DRILL_OFF(VAR, BIT) \
30 (VAR) = (VAR) & ~(BIT)
32 extern ldns_rr_list *global_dns_root;
36 ldns_pkt *do_trace(ldns_resolver *res,
40 ldns_status do_chase(ldns_resolver *res,
44 ldns_rr_list *trusted_keys,
47 ldns_rr_list *prev_key_list,
49 int do_secure_trace(ldns_resolver *res,
53 ldns_rr_list *trusted_keys,
54 ldns_rdf *start_name);
56 ldns_rr_list * get_rr(ldns_resolver *res,
61 void drill_pkt_print(FILE *fd, ldns_resolver *r, ldns_pkt *p);
62 void drill_pkt_print_footer(FILE *fd, ldns_resolver *r, ldns_pkt *p);
64 ldns_pkt_type get_dnssec_rr(ldns_pkt *p,
67 ldns_rr_list **rrlist,
70 ldns_rr *ldns_nsec3_exact_match(ldns_rdf *qname,
72 ldns_rr_list *nsec3s);
74 ldns_rdf *ldns_nsec3_closest_encloser(ldns_rdf *qname,
76 ldns_rr_list *nsec3s);
78 /* verifies denial of existence of *name in *pkt (must contain NSEC or NSEC3 records
79 * if *nsec_rrs and *nsec_rr_sigs are given, pointers to the relevant nsecs and their signatures are
82 ldns_status ldns_verify_denial(ldns_pkt *pkt,
85 ldns_rr_list **nsec_rrs,
86 ldns_rr_list **nsec_rr_sigs);
87 ldns_status ldns_verify_denial_wildcard(ldns_pkt *pkt,
90 ldns_rr_list **nsec_rrs,
91 ldns_rr_list **nsec_rr_sigs);
93 ldns_status read_key_file(const char *filename, ldns_rr_list *key_list);
94 ldns_pkt *read_hex_pkt(char *filename);
95 ldns_buffer *read_hex_buffer(char *filename);
97 ldns_rr_list *read_root_hints(const char *filename);
98 void clear_root(void);
99 void dump_hex(const ldns_pkt *pkt, const char *file);
100 void warning(const char *fmt, ...);
101 void error(const char *fmt, ...);
102 void mesg(const char *fmt, ...);
105 void resolver_print_nameservers(ldns_resolver *r);
106 void print_dnskey(ldns_rr_list *key_list);
107 void print_ds(ldns_rr_list *ds_list);
109 #endif /* _DRILL_H_ */