xref: /netbsd-src/external/mpl/bind/dist/bin/check/check-tool.h (revision 7d62b00eb9ad855ffcd7da46b41e23feb5476fac)
1 /*	$NetBSD: check-tool.h,v 1.6 2022/09/23 12:15:20 christos Exp $	*/
2 
3 /*
4  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
5  *
6  * SPDX-License-Identifier: MPL-2.0
7  *
8  * This Source Code Form is subject to the terms of the Mozilla Public
9  * License, v. 2.0. If a copy of the MPL was not distributed with this
10  * file, you can obtain one at https://mozilla.org/MPL/2.0/.
11  *
12  * See the COPYRIGHT file distributed with this work for additional
13  * information regarding copyright ownership.
14  */
15 
16 #ifndef CHECK_TOOL_H
17 #define CHECK_TOOL_H
18 
19 /*! \file */
20 
21 #include <inttypes.h>
22 #include <stdbool.h>
23 
24 #include <isc/lang.h>
25 #include <isc/stdio.h>
26 #include <isc/types.h>
27 
28 #include <dns/masterdump.h>
29 #include <dns/types.h>
30 #include <dns/zone.h>
31 
32 ISC_LANG_BEGINDECLS
33 
34 isc_result_t
35 setup_logging(isc_mem_t *mctx, FILE *errout, isc_log_t **logp);
36 
37 isc_result_t
38 load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
39 	  dns_masterformat_t fileformat, const char *classname,
40 	  dns_ttl_t maxttl, dns_zone_t **zonep);
41 
42 isc_result_t
43 dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
44 	  dns_masterformat_t fileformat, const dns_master_style_t *style,
45 	  const uint32_t rawversion);
46 
47 #ifdef _WIN32
48 void
49 InitSockets(void);
50 void
51 DestroySockets(void);
52 #endif /* ifdef _WIN32 */
53 
54 extern int debug;
55 extern const char *journal;
56 extern bool nomerge;
57 extern bool docheckmx;
58 extern bool docheckns;
59 extern bool dochecksrv;
60 extern dns_zoneopt_t zone_options;
61 
62 ISC_LANG_ENDDECLS
63 
64 #endif /* ifndef CHECK_TOOL_H */
65