Home | History | Annotate | Line # | Download | only in named
      1 /*	$NetBSD: config.h,v 1.10 2025/05/21 14:47:36 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 #pragma once
     17 
     18 /*! \file */
     19 
     20 #include <inttypes.h>
     21 
     22 #include <dns/types.h>
     23 #include <dns/zone.h>
     24 
     25 #include <isccfg/cfg.h>
     26 
     27 #define DEFAULT_IANA_ROOT_ZONE_PRIMARIES "_default_iana_root_zone_primaries"
     28 
     29 isc_result_t
     30 named_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf);
     31 
     32 const char *
     33 named_config_getdefault(void);
     34 
     35 isc_result_t
     36 named_config_get(cfg_obj_t const *const *maps, const char *name,
     37 		 const cfg_obj_t **obj);
     38 
     39 isc_result_t
     40 named_checknames_get(const cfg_obj_t **maps, const char *const names[],
     41 		     const cfg_obj_t **obj);
     42 
     43 int
     44 named_config_listcount(const cfg_obj_t *list);
     45 
     46 isc_result_t
     47 named_config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
     48 		      dns_rdataclass_t *classp);
     49 
     50 isc_result_t
     51 named_config_gettype(const cfg_obj_t *typeobj, dns_rdatatype_t deftype,
     52 		     dns_rdatatype_t *typep);
     53 
     54 dns_zonetype_t
     55 named_config_getzonetype(const cfg_obj_t *zonetypeobj);
     56 
     57 isc_result_t
     58 named_config_getremotesdef(const cfg_obj_t *cctx, const char *list,
     59 			   const char *name, const cfg_obj_t **ret);
     60 
     61 isc_result_t
     62 named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
     63 			     isc_mem_t *mctx, dns_ipkeylist_t *ipkl);
     64 
     65 isc_result_t
     66 named_config_getport(const cfg_obj_t *config, const char *type,
     67 		     in_port_t *portp);
     68 
     69 isc_result_t
     70 named_config_getkeyalgorithm(const char *str, unsigned int *typep,
     71 			     uint16_t *digestbits);
     72