2000-05-24 19:54:43 -04:00
|
|
|
/*
|
2018-02-23 03:53:12 -05:00
|
|
|
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
2000-07-31 21:33:37 -04:00
|
|
|
*
|
2016-06-27 00:56:38 -04:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2018-02-23 03:53:12 -05:00
|
|
|
*
|
|
|
|
|
* See the COPYRIGHT file distributed with this work for additional
|
|
|
|
|
* information regarding copyright ownership.
|
2000-05-24 19:54:43 -04:00
|
|
|
*/
|
|
|
|
|
|
2011-10-20 19:46:51 -04:00
|
|
|
/* $Id: dnssectool.h,v 1.33 2011/10/20 23:46:51 tbox Exp $ */
|
2000-06-22 18:00:42 -04:00
|
|
|
|
2000-05-24 19:54:43 -04:00
|
|
|
#ifndef DNSSECTOOL_H
|
2000-06-01 14:49:22 -04:00
|
|
|
#define DNSSECTOOL_H 1
|
2000-05-24 19:54:43 -04:00
|
|
|
|
2000-06-19 14:04:22 -04:00
|
|
|
#include <isc/log.h>
|
2000-09-08 04:38:59 -04:00
|
|
|
#include <isc/stdtime.h>
|
2000-08-11 19:07:53 -04:00
|
|
|
#include <dns/rdatastruct.h>
|
2000-08-14 00:43:17 -04:00
|
|
|
#include <dst/dst.h>
|
2000-06-19 14:04:22 -04:00
|
|
|
|
2012-06-24 23:57:32 -04:00
|
|
|
#define check_dns_dbiterator_current(result) \
|
|
|
|
|
check_result((result == DNS_R_NEWORIGIN) ? ISC_R_SUCCESS : result, \
|
|
|
|
|
"dns_dbiterator_current()")
|
|
|
|
|
|
|
|
|
|
|
2001-03-30 21:12:26 -05:00
|
|
|
typedef void (fatalcallback_t)(void);
|
|
|
|
|
|
2009-09-29 11:06:07 -04:00
|
|
|
ISC_PLATFORM_NORETURN_PRE void
|
|
|
|
|
fatal(const char *format, ...)
|
|
|
|
|
ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST;
|
2000-05-24 19:54:43 -04:00
|
|
|
|
2001-03-30 21:12:26 -05:00
|
|
|
void
|
|
|
|
|
setfatalcallback(fatalcallback_t *callback);
|
|
|
|
|
|
2000-06-01 14:49:22 -04:00
|
|
|
void
|
|
|
|
|
check_result(isc_result_t result, const char *message);
|
|
|
|
|
|
|
|
|
|
void
|
2001-08-08 18:54:55 -04:00
|
|
|
vbprintf(int level, const char *fmt, ...) ISC_FORMAT_PRINTF(2, 3);
|
2000-06-01 14:49:22 -04:00
|
|
|
|
2017-08-09 03:17:44 -04:00
|
|
|
ISC_PLATFORM_NORETURN_PRE void
|
|
|
|
|
version(const char *program) ISC_PLATFORM_NORETURN_POST;
|
2014-06-12 20:57:43 -04:00
|
|
|
|
2000-08-14 00:43:17 -04:00
|
|
|
void
|
|
|
|
|
type_format(const dns_rdatatype_t type, char *cp, unsigned int size);
|
2008-09-23 22:46:23 -04:00
|
|
|
#define TYPE_FORMATSIZE 20
|
2000-06-01 14:49:22 -04:00
|
|
|
|
2000-08-14 00:43:17 -04:00
|
|
|
void
|
2003-09-30 02:00:40 -04:00
|
|
|
sig_format(dns_rdata_rrsig_t *sig, char *cp, unsigned int size);
|
2009-10-12 16:48:12 -04:00
|
|
|
#define SIG_FORMATSIZE (DNS_NAME_FORMATSIZE + DNS_SECALG_FORMATSIZE + sizeof("65535"))
|
2000-08-11 19:07:53 -04:00
|
|
|
|
2000-06-01 14:49:22 -04:00
|
|
|
void
|
2015-01-20 16:29:18 -05:00
|
|
|
setup_logging(isc_mem_t *mctx, isc_log_t **logp);
|
2000-06-01 14:49:22 -04:00
|
|
|
|
2000-09-26 18:11:25 -04:00
|
|
|
void
|
|
|
|
|
cleanup_logging(isc_log_t **logp);
|
|
|
|
|
|
2000-06-09 18:34:40 -04:00
|
|
|
void
|
2000-06-09 21:28:11 -04:00
|
|
|
setup_entropy(isc_mem_t *mctx, const char *randomfile, isc_entropy_t **ectx);
|
2000-06-09 18:34:40 -04:00
|
|
|
|
|
|
|
|
void
|
|
|
|
|
cleanup_entropy(isc_entropy_t **ectx);
|
|
|
|
|
|
2009-09-02 02:29:01 -04:00
|
|
|
dns_ttl_t strtottl(const char *str);
|
|
|
|
|
|
2000-09-08 04:38:59 -04:00
|
|
|
isc_stdtime_t
|
2014-02-06 18:59:14 -05:00
|
|
|
strtotime(const char *str, isc_int64_t now, isc_int64_t base,
|
|
|
|
|
isc_boolean_t *setp);
|
2001-09-20 20:17:01 -04:00
|
|
|
|
2017-10-05 04:04:18 -04:00
|
|
|
unsigned int
|
|
|
|
|
strtodsdigest(const char *str);
|
|
|
|
|
|
2001-09-20 20:17:01 -04:00
|
|
|
dns_rdataclass_t
|
|
|
|
|
strtoclass(const char *str);
|
2000-09-08 04:38:59 -04:00
|
|
|
|
2009-10-23 20:00:06 -04:00
|
|
|
isc_result_t
|
|
|
|
|
try_dir(const char *dirname);
|
2009-10-26 17:18:24 -04:00
|
|
|
|
|
|
|
|
void
|
|
|
|
|
check_keyversion(dst_key_t *key, char *keystr);
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
set_keyversion(dst_key_t *key);
|
2010-01-19 15:26:07 -05:00
|
|
|
|
|
|
|
|
isc_boolean_t
|
2011-10-20 17:20:02 -04:00
|
|
|
key_collision(dst_key_t *key, dns_name_t *name, const char *dir,
|
|
|
|
|
isc_mem_t *mctx, isc_boolean_t *exact);
|
|
|
|
|
|
2012-06-24 23:57:32 -04:00
|
|
|
isc_boolean_t
|
|
|
|
|
is_delegation(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
|
|
|
|
|
dns_name_t *name, dns_dbnode_t *node, isc_uint32_t *ttlp);
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
verifyzone(dns_db_t *db, dns_dbversion_t *ver,
|
|
|
|
|
dns_name_t *origin, isc_mem_t *mctx,
|
|
|
|
|
isc_boolean_t ignore_kskflag, isc_boolean_t keyset_kskonly);
|
2015-11-04 20:09:48 -05:00
|
|
|
|
|
|
|
|
isc_boolean_t
|
|
|
|
|
isoptarg(const char *arg, char **argv, void (*usage)(void));
|
|
|
|
|
|
2016-10-19 11:18:42 -04:00
|
|
|
#ifdef _WIN32
|
|
|
|
|
void InitSockets(void);
|
|
|
|
|
void DestroySockets(void);
|
|
|
|
|
#endif
|
|
|
|
|
|
2000-06-01 14:49:22 -04:00
|
|
|
#endif /* DNSSEC_DNSSECTOOL_H */
|