zoneconf.h 2.48 KB
Newer Older
1
/*
2
 * Copyright (C) 2004-2007, 2010, 2011, 2015  Internet Systems Consortium, Inc. ("ISC")
Mark Andrews's avatar
Mark Andrews committed
3
 * Copyright (C) 1999-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
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
8
 *
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: zoneconf.h,v 1.30 2011/08/30 23:46:51 tbox Exp $ */
David Lawrence's avatar
David Lawrence committed
19

20 21
#ifndef NS_ZONECONF_H
#define NS_ZONECONF_H 1
22

23 24
/*! \file */

25
#include <isc/lang.h>
26 27
#include <isc/types.h>

28
#include <isccfg/aclconf.h>
29 30
#include <isccfg/cfg.h>

31 32 33
ISC_LANG_BEGINDECLS

isc_result_t
34 35
ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
		  const cfg_obj_t *zconfig, cfg_aclconfctx_t *ac,
36
		  dns_zone_t *zone, dns_zone_t *raw);
37
/*%<
38
 * Configure or reconfigure a zone according to the named.conf
39
 * data in 'cctx' and 'czone'.
40 41 42
 *
 * The zone origin is not configured, it is assumed to have been set
 * at zone creation time.
43 44
 *
 * Require:
45 46 47 48 49
 * \li	'lctx' to be initialized or NULL.
 * \li	'cctx' to be initialized or NULL.
 * \li	'ac' to point to an initialized ns_aclconfctx_t.
 * \li	'czone' to be initialized.
 * \li	'zone' to be initialized.
50 51
 */

52
isc_boolean_t
53
ns_zone_reusable(dns_zone_t *zone, const cfg_obj_t *zconfig);
54
/*%<
55
 * If 'zone' can be safely reconfigured according to the configuration
56
 * data in 'zconfig', return ISC_TRUE.  If the configuration data is so
57 58 59
 * different from the current zone state that the zone needs to be destroyed
 * and recreated, return ISC_FALSE.
 */
60

61 62 63 64 65 66 67 68 69 70 71 72 73 74
isc_result_t
ns_zone_configure_writeable_dlz(dns_dlzdb_t *dlzdatabase, dns_zone_t *zone,
				dns_rdataclass_t rdclass, dns_name_t *name);
/*%>
 * configure a DLZ zone, setting up the database methods and calling
 * postload to load the origin values
 *
 * Require:
 * \li	'dlzdatabase' to be a valid dlz database
 * \li	'zone' to be initialized.
 * \li	'rdclass' to be a valid rdataclass
 * \li	'name' to be a valid zone origin name
 */

75 76
ISC_LANG_ENDDECLS

77
#endif /* NS_ZONECONF_H */