Update repub branch u/fanf2/patch to rebasing branch u/fanf2/rebasing revision v9_13_...
[ipreg/bind9.git] / bin / dnssec / dnssectool.h
CommitLineData
b1d234eb 1/*
843d3896 2 * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
40f53fa8 3 *
0c27b3fe
MA
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
843d3896
OS
7 *
8 * See the COPYRIGHT file distributed with this work for additional
9 * information regarding copyright ownership.
b1d234eb
BW
10 */
11
9c3531d7 12
b1d234eb 13#ifndef DNSSECTOOL_H
7efc8c3f 14#define DNSSECTOOL_H 1
b1d234eb 15
cb6a185c 16#include <inttypes.h>
994e6569 17#include <stdbool.h>
cb6a185c 18
c9c1d174 19#include <isc/log.h>
42848e71 20#include <isc/stdtime.h>
565d0dc2 21#include <dns/rdatastruct.h>
4fc4813e 22#include <dst/dst.h>
c9c1d174 23
c9c630ee
BW
24typedef void (fatalcallback_t)(void);
25
debd489a
FD
26ISC_PLATFORM_NORETURN_PRE void
27fatal(const char *format, ...)
28ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST;
b1d234eb 29
c9c630ee
BW
30void
31setfatalcallback(fatalcallback_t *callback);
32
7efc8c3f
DL
33void
34check_result(isc_result_t result, const char *message);
35
36void
76c8294c 37vbprintf(int level, const char *fmt, ...) ISC_FORMAT_PRINTF(2, 3);
7efc8c3f 38
cdacec1d
EH
39ISC_PLATFORM_NORETURN_PRE void
40version(const char *program) ISC_PLATFORM_NORETURN_POST;
42782931 41
4fc4813e 42void
93d6dfaf 43sig_format(dns_rdata_rrsig_t *sig, char *cp, unsigned int size);
77b8f88f 44#define SIG_FORMATSIZE (DNS_NAME_FORMATSIZE + DNS_SECALG_FORMATSIZE + sizeof("65535"))
565d0dc2 45
7efc8c3f 46void
11463c0a 47setup_logging(isc_mem_t *mctx, isc_log_t **logp);
7efc8c3f 48
db503b6d
BW
49void
50cleanup_logging(isc_log_t **logp);
51
eab9975b
EH
52dns_ttl_t strtottl(const char *str);
53
42848e71 54isc_stdtime_t
cb6a185c 55strtotime(const char *str, int64_t now, int64_t base,
994e6569 56 bool *setp);
39504d45 57
ba37674d
EH
58unsigned int
59strtodsdigest(const char *str);
60
39504d45
BW
61dns_rdataclass_t
62strtoclass(const char *str);
42848e71 63
8f0502e9
EH
64isc_result_t
65try_dir(const char *dirname);
c0214996
EH
66
67void
68check_keyversion(dst_key_t *key, char *keystr);
69
70void
71set_keyversion(dst_key_t *key);
8a198fa7 72
994e6569 73bool
1946c596 74key_collision(dst_key_t *key, dns_name_t *name, const char *dir,
994e6569 75 isc_mem_t *mctx, bool *exact);
1946c596 76
994e6569 77bool
e939674d
MA
78isoptarg(const char *arg, char **argv, void (*usage)(void));
79
358dfaee
WK
80#ifdef _WIN32
81void InitSockets(void);
82void DestroySockets(void);
83#endif
84
7efc8c3f 85#endif /* DNSSEC_DNSSECTOOL_H */