]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/bind9/bin/dnssec/dnssectool.h
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / bind9 / bin / dnssec / dnssectool.h
1 /*
2  * Copyright (C) 2004, 2007-2011  Internet Systems Consortium, Inc. ("ISC")
3  * Copyright (C) 2000, 2001, 2003  Internet Software Consortium.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15  * PERFORMANCE OF THIS SOFTWARE.
16  */
17
18 /* $Id: dnssectool.h,v 1.31.162.2 2011/10/20 23:46:27 tbox Exp $ */
19
20 #ifndef DNSSECTOOL_H
21 #define DNSSECTOOL_H 1
22
23 #include <isc/log.h>
24 #include <isc/stdtime.h>
25 #include <dns/rdatastruct.h>
26 #include <dst/dst.h>
27
28 typedef void (fatalcallback_t)(void);
29
30 ISC_PLATFORM_NORETURN_PRE void
31 fatal(const char *format, ...)
32 ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST;
33
34 void
35 setfatalcallback(fatalcallback_t *callback);
36
37 void
38 check_result(isc_result_t result, const char *message);
39
40 void
41 vbprintf(int level, const char *fmt, ...) ISC_FORMAT_PRINTF(2, 3);
42
43 void
44 type_format(const dns_rdatatype_t type, char *cp, unsigned int size);
45 #define TYPE_FORMATSIZE 20
46
47 void
48 sig_format(dns_rdata_rrsig_t *sig, char *cp, unsigned int size);
49 #define SIG_FORMATSIZE (DNS_NAME_FORMATSIZE + DNS_SECALG_FORMATSIZE + sizeof("65535"))
50
51 void
52 setup_logging(int verbose, isc_mem_t *mctx, isc_log_t **logp);
53
54 void
55 cleanup_logging(isc_log_t **logp);
56
57 void
58 setup_entropy(isc_mem_t *mctx, const char *randomfile, isc_entropy_t **ectx);
59
60 void
61 cleanup_entropy(isc_entropy_t **ectx);
62
63 dns_ttl_t strtottl(const char *str);
64
65 isc_stdtime_t
66 strtotime(const char *str, isc_int64_t now, isc_int64_t base);
67
68 dns_rdataclass_t
69 strtoclass(const char *str);
70
71 isc_result_t
72 try_dir(const char *dirname);
73
74 void
75 check_keyversion(dst_key_t *key, char *keystr);
76
77 void
78 set_keyversion(dst_key_t *key);
79
80 isc_boolean_t
81 key_collision(dst_key_t *key, dns_name_t *name, const char *dir,
82               isc_mem_t *mctx, isc_boolean_t *exact);
83
84 #endif /* DNSSEC_DNSSECTOOL_H */