config.h 2.72 KB
Newer Older
1
/*
Automatic Updater's avatar
Automatic Updater committed
2
 * Copyright (C) 2004-2007, 2009  Internet Systems Consortium, Inc. ("ISC")
Mark Andrews's avatar
Mark Andrews committed
3
 * Copyright (C) 2001, 2002  Internet Software Consortium.
4
 *
Automatic Updater's avatar
Automatic Updater committed
5
 * Permission to use, copy, modify, and/or distribute this software for any
6 7 8
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
Mark Andrews's avatar
Mark Andrews committed
9 10 11 12 13 14 15
 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
 * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 * PERFORMANCE OF THIS SOFTWARE.
16 17
 */

Automatic Updater's avatar
Automatic Updater committed
18
/* $Id: config.h,v 1.16 2009/06/11 23:47:55 tbox Exp $ */
19 20 21 22

#ifndef NAMED_CONFIG_H
#define NAMED_CONFIG_H 1

23 24
/*! \file */

25 26 27 28 29 30 31 32 33
#include <isccfg/cfg.h>

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

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

isc_result_t
Evan Hunt's avatar
Evan Hunt committed
34 35
ns_config_get(cfg_obj_t const * const *maps, const char* name,
	      const cfg_obj_t **obj);
36

37
isc_result_t
38 39
ns_checknames_get(const cfg_obj_t **maps, const char* name,
		  const cfg_obj_t **obj);
40

41
int
42
ns_config_listcount(const cfg_obj_t *list);
43 44

isc_result_t
45
ns_config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
46
		   dns_rdataclass_t *classp);
47

48
isc_result_t
49
ns_config_gettype(const cfg_obj_t *typeobj, dns_rdatatype_t deftype,
50 51
		  dns_rdatatype_t *typep);

52
dns_zonetype_t
53
ns_config_getzonetype(const cfg_obj_t *zonetypeobj);
54 55

isc_result_t
56
ns_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
57
		    in_port_t defport, isc_mem_t *mctx,
Evan Hunt's avatar
Evan Hunt committed
58 59
		    isc_sockaddr_t **addrsp, isc_dscp_t **dscpsp,
		    isc_uint32_t *countp);
60 61 62

void
ns_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
Evan Hunt's avatar
Evan Hunt committed
63
		    isc_dscp_t **dscpsp, isc_uint32_t count);
64 65

isc_result_t
66 67
ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
			  isc_mem_t *mctx, isc_sockaddr_t **addrsp,
Evan Hunt's avatar
Evan Hunt committed
68 69
			  isc_dscp_t **dscpp, dns_name_t ***keys,
			  isc_uint32_t *countp);
70 71 72

void
ns_config_putipandkeylist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
Evan Hunt's avatar
Evan Hunt committed
73 74
			  isc_dscp_t **dscpsp, dns_name_t ***keys,
			  isc_uint32_t count);
75 76

isc_result_t
77
ns_config_getport(const cfg_obj_t *config, in_port_t *portp);
78

Brian Wellington's avatar
Brian Wellington committed
79
isc_result_t
80 81
ns_config_getkeyalgorithm(const char *str, dns_name_t **name,
			  isc_uint16_t *digestbits);
82 83 84
isc_result_t
ns_config_getkeyalgorithm2(const char *str, dns_name_t **name,
			   unsigned int *typep, isc_uint16_t *digestbits);
Brian Wellington's avatar
Brian Wellington committed
85

Evan Hunt's avatar
Evan Hunt committed
86 87 88
isc_result_t
ns_config_getdscp(const cfg_obj_t *config, isc_dscp_t *dscpp);

89
#endif /* NAMED_CONFIG_H */