summaryrefslogtreecommitdiffstats
path: root/bin/named/include/named/config.h
blob: e6293ef4568432e9814c388ff1d255a4cca98914 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
 * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 *
 * SPDX-License-Identifier: MPL-2.0
 *
 * 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 https://mozilla.org/MPL/2.0/.
 *
 * See the COPYRIGHT file distributed with this work for additional
 * information regarding copyright ownership.
 */

#ifndef NAMED_CONFIG_H
#define NAMED_CONFIG_H 1

/*! \file */

#include <inttypes.h>

#include <dns/types.h>
#include <dns/zone.h>

#include <isccfg/cfg.h>

#define DEFAULT_IANA_ROOT_ZONE_PRIMARIES "_default_iana_root_zone_primaries"

isc_result_t
named_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf);

const char *
named_config_getdefault(void);

isc_result_t
named_config_get(cfg_obj_t const *const *maps, const char *name,
		 const cfg_obj_t **obj);

isc_result_t
named_checknames_get(const cfg_obj_t **maps, const char *const names[],
		     const cfg_obj_t **obj);

int
named_config_listcount(const cfg_obj_t *list);

isc_result_t
named_config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
		      dns_rdataclass_t *classp);

isc_result_t
named_config_gettype(const cfg_obj_t *typeobj, dns_rdatatype_t deftype,
		     dns_rdatatype_t *typep);

dns_zonetype_t
named_config_getzonetype(const cfg_obj_t *zonetypeobj);

isc_result_t
named_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
		       in_port_t defport, isc_mem_t *mctx,
		       isc_sockaddr_t **addrsp, isc_dscp_t **dscpsp,
		       uint32_t *countp);

void
named_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
		       isc_dscp_t **dscpsp, uint32_t count);

isc_result_t
named_config_getremotesdef(const cfg_obj_t *cctx, const char *list,
			   const char *name, const cfg_obj_t **ret);

isc_result_t
named_config_getipandkeylist(const cfg_obj_t *config, const char *listtype,
			     const cfg_obj_t *list, isc_mem_t *mctx,
			     dns_ipkeylist_t *ipkl);

isc_result_t
named_config_getport(const cfg_obj_t *config, in_port_t *portp);

isc_result_t
named_config_getkeyalgorithm(const char *str, const dns_name_t **name,
			     uint16_t *digestbits);
isc_result_t
named_config_getkeyalgorithm2(const char *str, const dns_name_t **name,
			      unsigned int *typep, uint16_t *digestbits);

isc_result_t
named_config_getdscp(const cfg_obj_t *config, isc_dscp_t *dscpp);

#endif /* NAMED_CONFIG_H */