1 /* $NetBSD: dnssectool.h,v 1.7 2015/07/08 17:28:55 christos Exp $ */
4 * Copyright (C) 2004, 2007-2012, 2014, 2015 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.33 2011/10/20 23:46:51 tbox Exp */
23 #define DNSSECTOOL_H 1
26 #include <isc/stdtime.h>
27 #include <dns/rdatastruct.h>
30 #define check_dns_dbiterator_current(result) \
31 check_result((result == DNS_R_NEWORIGIN) ? ISC_R_SUCCESS : result, \
32 "dns_dbiterator_current()")
35 typedef void (fatalcallback_t
)(void);
37 ISC_PLATFORM_NORETURN_PRE
void
38 fatal(const char *format
, ...)
39 ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST
;
42 setfatalcallback(fatalcallback_t
*callback
);
45 check_result(isc_result_t result
, const char *message
);
48 vbprintf(int level
, const char *fmt
, ...) ISC_FORMAT_PRINTF(2, 3);
51 version(const char *program
);
54 type_format(const dns_rdatatype_t type
, char *cp
, unsigned int size
);
55 #define TYPE_FORMATSIZE 20
58 sig_format(dns_rdata_rrsig_t
*sig
, char *cp
, unsigned int size
);
59 #define SIG_FORMATSIZE (DNS_NAME_FORMATSIZE + DNS_SECALG_FORMATSIZE + sizeof("65535"))
62 setup_logging(isc_mem_t
*mctx
, isc_log_t
**logp
);
65 cleanup_logging(isc_log_t
**logp
);
68 setup_entropy(isc_mem_t
*mctx
, const char *randomfile
, isc_entropy_t
**ectx
);
71 cleanup_entropy(isc_entropy_t
**ectx
);
73 dns_ttl_t
strtottl(const char *str
);
76 strtotime(const char *str
, isc_int64_t now
, isc_int64_t base
,
80 strtoclass(const char *str
);
83 try_dir(const char *dirname
);
86 check_keyversion(dst_key_t
*key
, char *keystr
);
89 set_keyversion(dst_key_t
*key
);
92 key_collision(dst_key_t
*key
, dns_name_t
*name
, const char *dir
,
93 isc_mem_t
*mctx
, isc_boolean_t
*exact
);
96 is_delegation(dns_db_t
*db
, dns_dbversion_t
*ver
, dns_name_t
*origin
,
97 dns_name_t
*name
, dns_dbnode_t
*node
, isc_uint32_t
*ttlp
);
100 verifyzone(dns_db_t
*db
, dns_dbversion_t
*ver
,
101 dns_name_t
*origin
, isc_mem_t
*mctx
,
102 isc_boolean_t ignore_kskflag
, isc_boolean_t keyset_kskonly
);
103 #endif /* DNSSEC_DNSSECTOOL_H */