1 /* $NetBSD: config.h,v 1.5 2014/12/10 04:37:52 christos Exp $ */ 2 3 /* 4 * Copyright (C) 2004-2007, 2009, 2013 Internet Systems Consortium, Inc. ("ISC") 5 * Copyright (C) 2001, 2002 Internet Software Consortium. 6 * 7 * Permission to use, copy, modify, and/or distribute this software for any 8 * purpose with or without fee is hereby granted, provided that the above 9 * copyright notice and this permission notice appear in all copies. 10 * 11 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 12 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 13 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 14 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 15 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 16 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 /* Id: config.h,v 1.16 2009/06/11 23:47:55 tbox Exp */ 21 22 #ifndef NAMED_CONFIG_H 23 #define NAMED_CONFIG_H 1 24 25 /*! \file */ 26 27 #include <isccfg/cfg.h> 28 29 #include <dns/types.h> 30 #include <dns/zone.h> 31 32 isc_result_t 33 ns_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf); 34 35 isc_result_t 36 ns_config_get(cfg_obj_t const * const *maps, const char* name, 37 const cfg_obj_t **obj); 38 39 isc_result_t 40 ns_checknames_get(const cfg_obj_t **maps, const char* name, 41 const cfg_obj_t **obj); 42 43 int 44 ns_config_listcount(const cfg_obj_t *list); 45 46 isc_result_t 47 ns_config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass, 48 dns_rdataclass_t *classp); 49 50 isc_result_t 51 ns_config_gettype(const cfg_obj_t *typeobj, dns_rdatatype_t deftype, 52 dns_rdatatype_t *typep); 53 54 dns_zonetype_t 55 ns_config_getzonetype(const cfg_obj_t *zonetypeobj); 56 57 isc_result_t 58 ns_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list, 59 in_port_t defport, isc_mem_t *mctx, 60 isc_sockaddr_t **addrsp, isc_dscp_t **dscpsp, 61 isc_uint32_t *countp); 62 63 void 64 ns_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp, 65 isc_dscp_t **dscpsp, isc_uint32_t count); 66 67 isc_result_t 68 ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list, 69 isc_mem_t *mctx, isc_sockaddr_t **addrsp, 70 isc_dscp_t **dscpp, dns_name_t ***keys, 71 isc_uint32_t *countp); 72 73 void 74 ns_config_putipandkeylist(isc_mem_t *mctx, isc_sockaddr_t **addrsp, 75 isc_dscp_t **dscpsp, dns_name_t ***keys, 76 isc_uint32_t count); 77 78 isc_result_t 79 ns_config_getport(const cfg_obj_t *config, in_port_t *portp); 80 81 isc_result_t 82 ns_config_getkeyalgorithm(const char *str, dns_name_t **name, 83 isc_uint16_t *digestbits); 84 isc_result_t 85 ns_config_getkeyalgorithm2(const char *str, dns_name_t **name, 86 unsigned int *typep, isc_uint16_t *digestbits); 87 88 isc_result_t 89 ns_config_getdscp(const cfg_obj_t *config, isc_dscp_t *dscpp); 90 91 #endif /* NAMED_CONFIG_H */ 92