2 * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
5 * Permission to use, copy, modify, and 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.18 2004/03/05 04:57:41 marka Exp $ */
21 #define DNSSECTOOL_H 1
24 #include <isc/stdtime.h>
25 #include <dns/rdatastruct.h>
28 typedef void (fatalcallback_t
)(void);
31 fatal(const char *format
, ...) ISC_FORMAT_PRINTF(1, 2);
34 setfatalcallback(fatalcallback_t
*callback
);
37 check_result(isc_result_t result
, const char *message
);
40 vbprintf(int level
, const char *fmt
, ...) ISC_FORMAT_PRINTF(2, 3);
43 type_format(const dns_rdatatype_t type
, char *cp
, unsigned int size
);
44 #define TYPE_FORMATSIZE 10
47 alg_format(const dns_secalg_t alg
, char *cp
, unsigned int size
);
48 #define ALG_FORMATSIZE 10
51 sig_format(dns_rdata_rrsig_t
*sig
, char *cp
, unsigned int size
);
52 #define SIG_FORMATSIZE (DNS_NAME_FORMATSIZE + ALG_FORMATSIZE + sizeof("65535"))
55 key_format(const dst_key_t
*key
, char *cp
, unsigned int size
);
56 #define KEY_FORMATSIZE (DNS_NAME_FORMATSIZE + ALG_FORMATSIZE + sizeof("65535"))
59 setup_logging(int verbose
, isc_mem_t
*mctx
, isc_log_t
**logp
);
62 cleanup_logging(isc_log_t
**logp
);
65 setup_entropy(isc_mem_t
*mctx
, const char *randomfile
, isc_entropy_t
**ectx
);
68 cleanup_entropy(isc_entropy_t
**ectx
);
71 strtotime(const char *str
, isc_int64_t now
, isc_int64_t base
);
74 strtoclass(const char *str
);
76 #endif /* DNSSEC_DNSSECTOOL_H */