Import bind 9.5.2 vendor sources.
[dragonfly.git] / contrib / bind-9.5.2 / bin / dnssec / dnssectool.h
bloba0b20e37e3212ad1502010fb0e9b13377e56d49e
1 /*
2 * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
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.
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.
18 /* $Id: dnssectool.h,v 1.20 2007/06/19 23:46:59 tbox Exp $ */
20 #ifndef DNSSECTOOL_H
21 #define DNSSECTOOL_H 1
23 #include <isc/log.h>
24 #include <isc/stdtime.h>
25 #include <dns/rdatastruct.h>
26 #include <dst/dst.h>
28 typedef void (fatalcallback_t)(void);
30 void
31 fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
33 void
34 setfatalcallback(fatalcallback_t *callback);
36 void
37 check_result(isc_result_t result, const char *message);
39 void
40 vbprintf(int level, const char *fmt, ...) ISC_FORMAT_PRINTF(2, 3);
42 void
43 type_format(const dns_rdatatype_t type, char *cp, unsigned int size);
44 #define TYPE_FORMATSIZE 10
46 void
47 alg_format(const dns_secalg_t alg, char *cp, unsigned int size);
48 #define ALG_FORMATSIZE 10
50 void
51 sig_format(dns_rdata_rrsig_t *sig, char *cp, unsigned int size);
52 #define SIG_FORMATSIZE (DNS_NAME_FORMATSIZE + ALG_FORMATSIZE + sizeof("65535"))
54 void
55 key_format(const dst_key_t *key, char *cp, unsigned int size);
56 #define KEY_FORMATSIZE (DNS_NAME_FORMATSIZE + ALG_FORMATSIZE + sizeof("65535"))
58 void
59 setup_logging(int verbose, isc_mem_t *mctx, isc_log_t **logp);
61 void
62 cleanup_logging(isc_log_t **logp);
64 void
65 setup_entropy(isc_mem_t *mctx, const char *randomfile, isc_entropy_t **ectx);
67 void
68 cleanup_entropy(isc_entropy_t **ectx);
70 isc_stdtime_t
71 strtotime(const char *str, isc_int64_t now, isc_int64_t base);
73 dns_rdataclass_t
74 strtoclass(const char *str);
76 #endif /* DNSSEC_DNSSECTOOL_H */