4 * Copyright (C) 2004, 2007-2009 Internet Systems Consortium, Inc. ("ISC")
5 * Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
7 * Permission to use, copy, modify, and/or distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
11 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
12 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
14 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
16 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17 * PERFORMANCE OF THIS SOFTWARE.
20 /* Id: dnssectool.h,v 1.29 2009/10/26 21:18:24 each Exp */
23 #define DNSSECTOOL_H 1
26 #include <isc/stdtime.h>
27 #include <dns/rdatastruct.h>
30 typedef void (fatalcallback_t
)(void);
32 ISC_PLATFORM_NORETURN_PRE
void
33 fatal(const char *format
, ...)
34 ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST
;
37 setfatalcallback(fatalcallback_t
*callback
);
40 check_result(isc_result_t result
, const char *message
);
43 vbprintf(int level
, const char *fmt
, ...) ISC_FORMAT_PRINTF(2, 3);
46 type_format(const dns_rdatatype_t type
, char *cp
, unsigned int size
);
47 #define TYPE_FORMATSIZE 20
50 sig_format(dns_rdata_rrsig_t
*sig
, char *cp
, unsigned int size
);
51 #define SIG_FORMATSIZE (DNS_NAME_FORMATSIZE + DNS_SECALG_FORMATSIZE + sizeof("65535"))
54 setup_logging(int verbose
, isc_mem_t
*mctx
, isc_log_t
**logp
);
57 cleanup_logging(isc_log_t
**logp
);
60 setup_entropy(isc_mem_t
*mctx
, const char *randomfile
, isc_entropy_t
**ectx
);
63 cleanup_entropy(isc_entropy_t
**ectx
);
65 dns_ttl_t
strtottl(const char *str
);
68 strtotime(const char *str
, isc_int64_t now
, isc_int64_t base
);
71 strtoclass(const char *str
);
74 try_dir(const char *dirname
);
77 check_keyversion(dst_key_t
*key
, char *keystr
);
80 set_keyversion(dst_key_t
*key
);
81 #endif /* DNSSEC_DNSSECTOOL_H */