1 /* $NetBSD: zoneconf.h,v 1.4 2014/12/10 04:37:52 christos Exp $ */ 2 3 /* 4 * Copyright (C) 2004-2007, 2010, 2011 Internet Systems Consortium, Inc. ("ISC") 5 * Copyright (C) 1999-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: zoneconf.h,v 1.30 2011/08/30 23:46:51 tbox Exp */ 21 22 #ifndef NS_ZONECONF_H 23 #define NS_ZONECONF_H 1 24 25 /*! \file */ 26 27 #include <isc/lang.h> 28 #include <isc/types.h> 29 30 #include <isccfg/aclconf.h> 31 #include <isccfg/cfg.h> 32 33 ISC_LANG_BEGINDECLS 34 35 isc_result_t 36 ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, 37 const cfg_obj_t *zconfig, cfg_aclconfctx_t *ac, 38 dns_zone_t *zone, dns_zone_t *raw); 39 /*%< 40 * Configure or reconfigure a zone according to the named.conf 41 * data in 'cctx' and 'czone'. 42 * 43 * The zone origin is not configured, it is assumed to have been set 44 * at zone creation time. 45 * 46 * Require: 47 * \li 'lctx' to be initialized or NULL. 48 * \li 'cctx' to be initialized or NULL. 49 * \li 'ac' to point to an initialized ns_aclconfctx_t. 50 * \li 'czone' to be initialized. 51 * \li 'zone' to be initialized. 52 */ 53 54 isc_boolean_t 55 ns_zone_reusable(dns_zone_t *zone, const cfg_obj_t *zconfig); 56 /*%< 57 * If 'zone' can be safely reconfigured according to the configuration 58 * data in 'zconfig', return ISC_TRUE. If the configuration data is so 59 * different from the current zone state that the zone needs to be destroyed 60 * and recreated, return ISC_FALSE. 61 */ 62 63 64 isc_result_t 65 ns_zone_configure_writeable_dlz(dns_dlzdb_t *dlzdatabase, dns_zone_t *zone, 66 dns_rdataclass_t rdclass, dns_name_t *name); 67 /*%> 68 * configure a DLZ zone, setting up the database methods and calling 69 * postload to load the origin values 70 * 71 * Require: 72 * \li 'dlzdatabase' to be a valid dlz database 73 * \li 'zone' to be initialized. 74 * \li 'rdclass' to be a valid rdataclass 75 * \li 'name' to be a valid zone origin name 76 */ 77 78 ISC_LANG_ENDDECLS 79 80 #endif /* NS_ZONECONF_H */ 81