mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-09 00:02:04 -04:00
Continue move of lib/dns/*conf.c stuff to bin/named
This commit is contained in:
parent
ea888dc768
commit
9259fed3d8
17 changed files with 105 additions and 330 deletions
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: aclconf.c,v 1.23 2000/08/11 02:34:45 bwelling Exp $ */
|
||||
/* $Id: aclconf.c,v 1.24 2000/11/27 19:42:20 gson Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -24,17 +24,18 @@
|
|||
#include <isc/util.h>
|
||||
|
||||
#include <dns/acl.h>
|
||||
#include <dns/aclconf.h>
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/log.h>
|
||||
|
||||
#include <named/aclconf.h>
|
||||
|
||||
void
|
||||
dns_aclconfctx_init(dns_aclconfctx_t *ctx) {
|
||||
ns_aclconfctx_init(ns_aclconfctx_t *ctx) {
|
||||
ISC_LIST_INIT(ctx->named_acl_cache);
|
||||
}
|
||||
|
||||
void
|
||||
dns_aclconfctx_destroy(dns_aclconfctx_t *ctx) {
|
||||
ns_aclconfctx_destroy(ns_aclconfctx_t *ctx) {
|
||||
dns_acl_t *dacl, *next;
|
||||
for (dacl = ISC_LIST_HEAD(ctx->named_acl_cache);
|
||||
dacl != NULL;
|
||||
|
|
@ -47,7 +48,7 @@ dns_aclconfctx_destroy(dns_aclconfctx_t *ctx) {
|
|||
|
||||
static isc_result_t
|
||||
convert_named_acl(char *aclname, dns_c_ctx_t *cctx,
|
||||
dns_aclconfctx_t *ctx, isc_mem_t *mctx,
|
||||
ns_aclconfctx_t *ctx, isc_mem_t *mctx,
|
||||
dns_acl_t **target)
|
||||
{
|
||||
isc_result_t result;
|
||||
|
|
@ -72,7 +73,7 @@ convert_named_acl(char *aclname, dns_c_ctx_t *cctx,
|
|||
"undefined ACL '%s'", aclname);
|
||||
return (result);
|
||||
}
|
||||
result = dns_acl_fromconfig(cacl->ipml, cctx, ctx, mctx, &dacl);
|
||||
result = ns_acl_fromconfig(cacl->ipml, cctx, ctx, mctx, &dacl);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
dacl->name = isc_mem_strdup(dacl->mctx, aclname);
|
||||
|
|
@ -107,9 +108,9 @@ convert_keyname(char *txtname, isc_mem_t *mctx, dns_name_t *dnsname) {
|
|||
}
|
||||
|
||||
isc_result_t
|
||||
dns_acl_fromconfig(dns_c_ipmatchlist_t *caml,
|
||||
ns_acl_fromconfig(dns_c_ipmatchlist_t *caml,
|
||||
dns_c_ctx_t *cctx,
|
||||
dns_aclconfctx_t *ctx,
|
||||
ns_aclconfctx_t *ctx,
|
||||
isc_mem_t *mctx,
|
||||
dns_acl_t **target)
|
||||
{
|
||||
|
|
@ -155,7 +156,7 @@ dns_acl_fromconfig(dns_c_ipmatchlist_t *caml,
|
|||
break;
|
||||
case dns_c_ipmatch_indirect:
|
||||
de->type = dns_aclelementtype_nestedacl;
|
||||
result = dns_acl_fromconfig(ce->u.indirect.list,
|
||||
result = ns_acl_fromconfig(ce->u.indirect.list,
|
||||
cctx, ctx, mctx,
|
||||
&de->u.nestedacl);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
|
|
|
|||
|
|
@ -15,19 +15,19 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: aclconf.h,v 1.9 2000/08/01 01:23:38 tale Exp $ */
|
||||
/* $Id: aclconf.h,v 1.10 2000/11/27 19:42:27 gson Exp $ */
|
||||
|
||||
#ifndef DNS_ACLCONF_H
|
||||
#define DNS_ACLCONF_H 1
|
||||
#ifndef NS_ACLCONF_H
|
||||
#define NS_ACLCONF_H 1
|
||||
|
||||
#include <isc/lang.h>
|
||||
|
||||
#include <dns/confctx.h>
|
||||
#include <dns/types.h>
|
||||
|
||||
typedef struct dns_aclconfctx {
|
||||
typedef struct ns_aclconfctx {
|
||||
ISC_LIST(dns_acl_t) named_acl_cache;
|
||||
} dns_aclconfctx_t;
|
||||
} ns_aclconfctx_t;
|
||||
|
||||
/***
|
||||
*** Functions
|
||||
|
|
@ -36,23 +36,23 @@ typedef struct dns_aclconfctx {
|
|||
ISC_LANG_BEGINDECLS
|
||||
|
||||
void
|
||||
dns_aclconfctx_init(dns_aclconfctx_t *ctx);
|
||||
ns_aclconfctx_init(ns_aclconfctx_t *ctx);
|
||||
/*
|
||||
* Initialize an ACL configuration context.
|
||||
*/
|
||||
|
||||
void
|
||||
dns_aclconfctx_destroy(dns_aclconfctx_t *ctx);
|
||||
ns_aclconfctx_destroy(ns_aclconfctx_t *ctx);
|
||||
/*
|
||||
* Destroy an ACL configuration context.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
dns_acl_fromconfig(dns_c_ipmatchlist_t *caml,
|
||||
dns_c_ctx_t *cctx,
|
||||
dns_aclconfctx_t *ctx,
|
||||
isc_mem_t *mctx,
|
||||
dns_acl_t **target);
|
||||
ns_acl_fromconfig(dns_c_ipmatchlist_t *caml,
|
||||
dns_c_ctx_t *cctx,
|
||||
ns_aclconfctx_t *ctx,
|
||||
isc_mem_t *mctx,
|
||||
dns_acl_t **target);
|
||||
/*
|
||||
* Construct a new dns_acl_t from configuration data in 'caml' and
|
||||
* 'cctx'. Memory is allocated through 'mctx'.
|
||||
|
|
@ -68,4 +68,4 @@ dns_acl_fromconfig(dns_c_ipmatchlist_t *caml,
|
|||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_ACLCONF_H */
|
||||
#endif /* NS_ACLCONF_H */
|
||||
|
|
|
|||
|
|
@ -15,16 +15,17 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: omapi.h,v 1.14 2000/11/08 19:02:56 mws Exp $ */
|
||||
/* $Id: omapi.h,v 1.15 2000/11/27 19:42:28 gson Exp $ */
|
||||
|
||||
#ifndef NAMED_OMAPI_H
|
||||
#define NAMED_OMAPI_H 1
|
||||
|
||||
#include <dns/aclconf.h>
|
||||
#include <dns/confctx.h>
|
||||
|
||||
#include <omapi/omapi.h>
|
||||
|
||||
#include <named/aclconf.h>
|
||||
|
||||
#define NS_OMAPI_PORT 953
|
||||
|
||||
/*
|
||||
|
|
@ -46,7 +47,7 @@ ns_omapi_init(void);
|
|||
|
||||
isc_result_t
|
||||
ns_omapi_configure(isc_mem_t *mctx, dns_c_ctx_t *cctx,
|
||||
dns_aclconfctx_t *aclconfctx);
|
||||
ns_aclconfctx_t *aclconfctx);
|
||||
|
||||
void
|
||||
ns_omapi_shutdown(isc_boolean_t exiting);
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: tkeyconf.h,v 1.6 2000/08/01 01:24:49 tale Exp $ */
|
||||
/* $Id: tkeyconf.h,v 1.7 2000/11/27 19:42:29 gson Exp $ */
|
||||
|
||||
#ifndef DNS_TKEYCONF_H
|
||||
#define DNS_TKEYCONF_H 1
|
||||
#ifndef NS_TKEYCONF_H
|
||||
#define NS_TKEYCONF_H 1
|
||||
|
||||
#include <isc/types.h>
|
||||
#include <isc/lang.h>
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t
|
||||
dns_tkeyctx_fromconfig(dns_c_ctx_t *cfg, isc_mem_t *mctx, isc_entropy_t *ectx,
|
||||
ns_tkeyctx_fromconfig(dns_c_ctx_t *cfg, isc_mem_t *mctx, isc_entropy_t *ectx,
|
||||
dns_tkeyctx_t **tctxp);
|
||||
/*
|
||||
* Create a TKEY context and configure it, including the default DH key
|
||||
|
|
@ -48,4 +48,4 @@ dns_tkeyctx_fromconfig(dns_c_ctx_t *cfg, isc_mem_t *mctx, isc_entropy_t *ectx,
|
|||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_TKEYCONF_H */
|
||||
#endif /* NS_TKEYCONF_H */
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: tsigconf.h,v 1.6 2000/08/01 01:24:51 tale Exp $ */
|
||||
/* $Id: tsigconf.h,v 1.7 2000/11/27 19:42:30 gson Exp $ */
|
||||
|
||||
#ifndef DNS_TSIGCONF_H
|
||||
#define DNS_TSIGCONF_H 1
|
||||
#ifndef NS_TSIGCONF_H
|
||||
#define NS_TSIGCONF_H 1
|
||||
|
||||
#include <isc/types.h>
|
||||
#include <isc/lang.h>
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t
|
||||
dns_tsigkeyring_fromconfig(dns_c_view_t *confview, dns_c_ctx_t *confctx,
|
||||
ns_tsigkeyring_fromconfig(dns_c_view_t *confview, dns_c_ctx_t *confctx,
|
||||
isc_mem_t *mctx, dns_tsig_keyring_t **ringp);
|
||||
/*
|
||||
* Create a TSIG key ring and configure it according to the 'key'
|
||||
|
|
@ -46,4 +46,4 @@ dns_tsigkeyring_fromconfig(dns_c_view_t *confview, dns_c_ctx_t *confctx,
|
|||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_TSIGCONF_H */
|
||||
#endif /* NS_TSIGCONF_H */
|
||||
|
|
|
|||
|
|
@ -15,21 +15,21 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: zoneconf.h,v 1.13 2000/08/01 01:24:59 tale Exp $ */
|
||||
/* $Id: zoneconf.h,v 1.14 2000/11/27 19:42:31 gson Exp $ */
|
||||
|
||||
#ifndef DNS_ZONECONF_H
|
||||
#define DNS_ZONECONF_H 1
|
||||
#ifndef NS_ZONECONF_H
|
||||
#define NS_ZONECONF_H 1
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
#include <dns/aclconf.h>
|
||||
#include <named/aclconf.h>
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t
|
||||
dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview, dns_c_zone_t *czone,
|
||||
dns_aclconfctx_t *ac, dns_zone_t *zone);
|
||||
ns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview, dns_c_zone_t *czone,
|
||||
ns_aclconfctx_t *ac, dns_zone_t *zone);
|
||||
/*
|
||||
* Configure or reconfigure a zone according to the named.conf
|
||||
* data in 'cctx' and 'czone'.
|
||||
|
|
@ -46,7 +46,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview, dns_c_zone_t *czone,
|
|||
*/
|
||||
|
||||
isc_boolean_t
|
||||
dns_zone_reusable(dns_zone_t *zone, dns_c_zone_t *czone);
|
||||
ns_zone_reusable(dns_zone_t *zone, dns_c_zone_t *czone);
|
||||
/*
|
||||
* If 'zone' can be safely reconfigured according to the configuration
|
||||
* data in 'czone', return ISC_TRUE. If the configuration data is so
|
||||
|
|
@ -55,11 +55,11 @@ dns_zone_reusable(dns_zone_t *zone, dns_c_zone_t *czone);
|
|||
*/
|
||||
|
||||
isc_result_t
|
||||
dns_zonemgr_configure(dns_c_ctx_t *cctx, dns_zonemgr_t *zonemgr);
|
||||
ns_zonemgr_configure(dns_c_ctx_t *cctx, dns_zonemgr_t *zonemgr);
|
||||
/*
|
||||
* Configure the zone manager according to the named.conf data
|
||||
* in 'cctx'.
|
||||
*/
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_ZONECONF_H */
|
||||
#endif /* NS_ZONECONF_H */
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: omapiconf.c,v 1.13 2000/10/20 13:29:28 marka Exp $ */
|
||||
/* $Id: omapiconf.c,v 1.14 2000/11/27 19:42:21 gson Exp $ */
|
||||
|
||||
/*
|
||||
* Principal Author: DCL
|
||||
|
|
@ -283,7 +283,7 @@ register_keys(dns_c_ctrl_t *control, dns_c_kdeflist_t *keydeflist,
|
|||
|
||||
static void
|
||||
update_listener(ns_omapilistener_t **listenerp, dns_c_ctrl_t *control,
|
||||
dns_c_ctx_t *cctx, dns_aclconfctx_t *aclconfctx,
|
||||
dns_c_ctx_t *cctx, ns_aclconfctx_t *aclconfctx,
|
||||
char *socktext)
|
||||
{
|
||||
ns_omapilistener_t *listener;
|
||||
|
|
@ -302,7 +302,7 @@ update_listener(ns_omapilistener_t **listenerp, dns_c_ctrl_t *control,
|
|||
* First, keep the old access list unless
|
||||
* a new one can be made.
|
||||
*/
|
||||
result = dns_acl_fromconfig(control->
|
||||
result = ns_acl_fromconfig(control->
|
||||
u.inet_v.matchlist,
|
||||
cctx, aclconfctx,
|
||||
listener->mctx, &new_acl);
|
||||
|
|
@ -345,7 +345,7 @@ update_listener(ns_omapilistener_t **listenerp, dns_c_ctrl_t *control,
|
|||
static void
|
||||
add_listener(isc_mem_t *mctx, ns_omapilistener_t **listenerp,
|
||||
dns_c_ctrl_t *control, dns_c_ctx_t *cctx,
|
||||
dns_aclconfctx_t *aclconfctx, char *socktext)
|
||||
ns_aclconfctx_t *aclconfctx, char *socktext)
|
||||
{
|
||||
ns_omapilistener_t *listener;
|
||||
dns_acl_t *new_acl = NULL;
|
||||
|
|
@ -364,7 +364,7 @@ add_listener(isc_mem_t *mctx, ns_omapilistener_t **listenerp,
|
|||
/*
|
||||
* Make the acl.
|
||||
*/
|
||||
result = dns_acl_fromconfig(control->u.inet_v.matchlist,
|
||||
result = ns_acl_fromconfig(control->u.inet_v.matchlist,
|
||||
cctx, aclconfctx, mctx, &new_acl);
|
||||
}
|
||||
|
||||
|
|
@ -407,7 +407,7 @@ add_listener(isc_mem_t *mctx, ns_omapilistener_t **listenerp,
|
|||
|
||||
isc_result_t
|
||||
ns_omapi_configure(isc_mem_t *mctx, dns_c_ctx_t *cctx,
|
||||
dns_aclconfctx_t *aclconfctx)
|
||||
ns_aclconfctx_t *aclconfctx)
|
||||
{
|
||||
ns_omapilistener_t *listener;
|
||||
ns_omapilistenerlist_t new_listeners;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: server.c,v 1.255 2000/11/25 03:55:43 mws Exp $ */
|
||||
/* $Id: server.c,v 1.256 2000/11/27 19:42:22 gson Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -48,11 +48,8 @@
|
|||
#include <dns/resolver.h>
|
||||
#include <dns/rootns.h>
|
||||
#include <dns/tkey.h>
|
||||
#include <dns/tkeyconf.h>
|
||||
#include <dns/tsigconf.h>
|
||||
#include <dns/view.h>
|
||||
#include <dns/zone.h>
|
||||
#include <dns/zoneconf.h>
|
||||
#include <dns/zt.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
|
@ -65,6 +62,9 @@
|
|||
#include <named/omapi.h>
|
||||
#include <named/os.h>
|
||||
#include <named/server.h>
|
||||
#include <named/tkeyconf.h>
|
||||
#include <named/tsigconf.h>
|
||||
#include <named/zoneconf.h>
|
||||
|
||||
/*
|
||||
* Check an operation for failure. Assumes that the function
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
typedef struct {
|
||||
isc_mem_t * mctx;
|
||||
dns_viewlist_t viewlist;
|
||||
dns_aclconfctx_t *aclconf;
|
||||
ns_aclconfctx_t *aclconf;
|
||||
} ns_load_t;
|
||||
|
||||
static void
|
||||
|
|
@ -108,11 +108,11 @@ ns_server_reload(isc_task_t *task, isc_event_t *event);
|
|||
|
||||
static isc_result_t
|
||||
ns_listenelt_fromconfig(dns_c_lstnon_t *celt, dns_c_ctx_t *cctx,
|
||||
dns_aclconfctx_t *actx,
|
||||
ns_aclconfctx_t *actx,
|
||||
isc_mem_t *mctx, ns_listenelt_t **target);
|
||||
static isc_result_t
|
||||
ns_listenlist_fromconfig(dns_c_lstnlist_t *clist, dns_c_ctx_t *cctx,
|
||||
dns_aclconfctx_t *actx,
|
||||
ns_aclconfctx_t *actx,
|
||||
isc_mem_t *mctx, ns_listenlist_t **target);
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -128,7 +128,7 @@ configure_forward(dns_c_ctx_t *cctx, dns_c_zone_t *czone, dns_c_view_t *cview,
|
|||
static isc_result_t
|
||||
configure_view_acl(dns_c_view_t *cview,
|
||||
dns_c_ctx_t *cctx,
|
||||
dns_aclconfctx_t *actx, isc_mem_t *mctx,
|
||||
ns_aclconfctx_t *actx, isc_mem_t *mctx,
|
||||
isc_result_t (*getvcacl)
|
||||
(dns_c_view_t *, dns_c_ipmatchlist_t **),
|
||||
isc_result_t (*getscacl)
|
||||
|
|
@ -151,7 +151,7 @@ configure_view_acl(dns_c_view_t *cview,
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
result = dns_acl_fromconfig(cacl, cctx, actx, mctx, aclp);
|
||||
result = ns_acl_fromconfig(cacl, cctx, actx, mctx, aclp);
|
||||
|
||||
dns_c_ipmatchlist_detach(&cacl);
|
||||
|
||||
|
|
@ -401,7 +401,7 @@ get_view_querysource_dispatch(dns_c_ctx_t *cctx, dns_c_view_t *cview,
|
|||
*/
|
||||
static isc_result_t
|
||||
configure_view(dns_view_t *view, dns_c_ctx_t *cctx, dns_c_view_t *cview,
|
||||
isc_mem_t *mctx, dns_aclconfctx_t *actx)
|
||||
isc_mem_t *mctx, ns_aclconfctx_t *actx)
|
||||
{
|
||||
dns_cache_t *cache = NULL;
|
||||
isc_result_t result;
|
||||
|
|
@ -571,7 +571,7 @@ configure_view(dns_view_t *view, dns_c_ctx_t *cctx, dns_c_view_t *cview,
|
|||
* Configure the view's TSIG keys.
|
||||
*/
|
||||
ring = NULL;
|
||||
CHECK(dns_tsigkeyring_fromconfig(cview, cctx, view->mctx, &ring));
|
||||
CHECK(ns_tsigkeyring_fromconfig(cview, cctx, view->mctx, &ring));
|
||||
dns_view_setkeyring(view, ring);
|
||||
|
||||
/*
|
||||
|
|
@ -1177,7 +1177,7 @@ configure_zone(dns_c_ctx_t *cctx, dns_c_zone_t *czone, dns_c_view_t *cview,
|
|||
if (result != ISC_R_NOTFOUND && result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
if (zone != NULL) {
|
||||
if (! dns_zone_reusable(zone, czone))
|
||||
if (! ns_zone_reusable(zone, czone))
|
||||
dns_zone_detach(&zone);
|
||||
}
|
||||
|
||||
|
|
@ -1210,7 +1210,7 @@ configure_zone(dns_c_ctx_t *cctx, dns_c_zone_t *czone, dns_c_view_t *cview,
|
|||
/*
|
||||
* Configure the zone.
|
||||
*/
|
||||
CHECK(dns_zone_configure(cctx, cview, czone, lctx->aclconf, zone));
|
||||
CHECK(ns_zone_configure(cctx, cview, czone, lctx->aclconf, zone));
|
||||
|
||||
/*
|
||||
* Add the zone to its view in the new view list.
|
||||
|
|
@ -1407,7 +1407,7 @@ load_configuration(const char *filename, ns_server_t *server,
|
|||
dns_view_t *view = NULL;
|
||||
dns_view_t *view_next;
|
||||
dns_viewlist_t tmpviewlist;
|
||||
dns_aclconfctx_t aclconfctx;
|
||||
ns_aclconfctx_t aclconfctx;
|
||||
dns_dispatch_t *dispatchv4 = NULL;
|
||||
dns_dispatch_t *dispatchv6 = NULL;
|
||||
char *pidfilename;
|
||||
|
|
@ -1416,7 +1416,7 @@ load_configuration(const char *filename, ns_server_t *server,
|
|||
isc_uint32_t heartbeat_interval;
|
||||
in_port_t listen_port;
|
||||
|
||||
dns_aclconfctx_init(&aclconfctx);
|
||||
ns_aclconfctx_init(&aclconfctx);
|
||||
|
||||
RWLOCK(&server->conflock, isc_rwlocktype_write);
|
||||
dns_zonemgr_lockconf(server->zonemgr, isc_rwlocktype_write);
|
||||
|
|
@ -1684,7 +1684,7 @@ load_configuration(const char *filename, ns_server_t *server,
|
|||
*/
|
||||
{
|
||||
dns_tkeyctx_t *t = NULL;
|
||||
CHECKM(dns_tkeyctx_fromconfig(cctx, ns_g_mctx, ns_g_entropy,
|
||||
CHECKM(ns_tkeyctx_fromconfig(cctx, ns_g_mctx, ns_g_entropy,
|
||||
&t),
|
||||
"configuring TKEY");
|
||||
if (server->tkeyctx != NULL)
|
||||
|
|
@ -1767,7 +1767,7 @@ load_configuration(const char *filename, ns_server_t *server,
|
|||
ns_server_setstatsfile(statsfilename, server);
|
||||
|
||||
cleanup:
|
||||
dns_aclconfctx_destroy(&aclconfctx);
|
||||
ns_aclconfctx_destroy(&aclconfctx);
|
||||
|
||||
if (cctx != NULL)
|
||||
dns_c_ctx_delete(&cctx);
|
||||
|
|
@ -2188,7 +2188,7 @@ ns_server_refreshzone(ns_server_t *server, char *args) {
|
|||
|
||||
static isc_result_t
|
||||
ns_listenlist_fromconfig(dns_c_lstnlist_t *clist, dns_c_ctx_t *cctx,
|
||||
dns_aclconfctx_t *actx,
|
||||
ns_aclconfctx_t *actx,
|
||||
isc_mem_t *mctx, ns_listenlist_t **target)
|
||||
{
|
||||
dns_c_lstnon_t *ce;
|
||||
|
|
@ -2225,7 +2225,7 @@ ns_listenlist_fromconfig(dns_c_lstnlist_t *clist, dns_c_ctx_t *cctx,
|
|||
*/
|
||||
static isc_result_t
|
||||
ns_listenelt_fromconfig(dns_c_lstnon_t *celt, dns_c_ctx_t *cctx,
|
||||
dns_aclconfctx_t *actx,
|
||||
ns_aclconfctx_t *actx,
|
||||
isc_mem_t *mctx, ns_listenelt_t **target)
|
||||
{
|
||||
isc_result_t result;
|
||||
|
|
@ -2235,7 +2235,7 @@ ns_listenelt_fromconfig(dns_c_lstnon_t *celt, dns_c_ctx_t *cctx,
|
|||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
result = dns_acl_fromconfig(celt->iml, cctx, actx, mctx, &delt->acl);
|
||||
result = ns_acl_fromconfig(celt->iml, cctx, actx, mctx, &delt->acl);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
ns_listenelt_destroy(delt);
|
||||
return (result);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: tkeyconf.c,v 1.15 2000/10/12 01:08:32 bwelling Exp $ */
|
||||
/* $Id: tkeyconf.c,v 1.16 2000/11/27 19:42:23 gson Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -27,10 +27,11 @@
|
|||
#include <dns/keyvalues.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/tkey.h>
|
||||
#include <dns/tkeyconf.h>
|
||||
|
||||
#include <dst/gssapi.h>
|
||||
|
||||
#include <named/tkeyconf.h>
|
||||
|
||||
#define RETERR(x) do { \
|
||||
result = (x); \
|
||||
if (result != ISC_R_SUCCESS) \
|
||||
|
|
@ -39,7 +40,7 @@
|
|||
|
||||
|
||||
isc_result_t
|
||||
dns_tkeyctx_fromconfig(dns_c_ctx_t *cfg, isc_mem_t *mctx, isc_entropy_t *ectx,
|
||||
ns_tkeyctx_fromconfig(dns_c_ctx_t *cfg, isc_mem_t *mctx, isc_entropy_t *ectx,
|
||||
dns_tkeyctx_t **tctxp)
|
||||
{
|
||||
isc_result_t result;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: tsigconf.c,v 1.13 2000/11/15 00:42:50 gson Exp $ */
|
||||
/* $Id: tsigconf.c,v 1.14 2000/11/27 19:42:24 gson Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -25,10 +25,11 @@
|
|||
#include <isc/string.h>
|
||||
|
||||
#include <dns/tsig.h>
|
||||
#include <dns/tsigconf.h>
|
||||
|
||||
#include <named/log.h>
|
||||
|
||||
#include <named/tsigconf.h>
|
||||
|
||||
static isc_result_t
|
||||
add_initial_keys(dns_c_kdeflist_t *list, dns_tsig_keyring_t *ring,
|
||||
isc_mem_t *mctx)
|
||||
|
|
@ -122,7 +123,7 @@ add_initial_keys(dns_c_kdeflist_t *list, dns_tsig_keyring_t *ring,
|
|||
}
|
||||
|
||||
isc_result_t
|
||||
dns_tsigkeyring_fromconfig(dns_c_view_t *confview, dns_c_ctx_t *confctx,
|
||||
ns_tsigkeyring_fromconfig(dns_c_view_t *confview, dns_c_ctx_t *confctx,
|
||||
isc_mem_t *mctx, dns_tsig_keyring_t **ringp)
|
||||
{
|
||||
dns_c_kdeflist_t *keylist;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: zoneconf.c,v 1.72 2000/11/25 02:43:39 marka Exp $ */
|
||||
/* $Id: zoneconf.c,v 1.73 2000/11/27 19:42:25 gson Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -26,7 +26,8 @@
|
|||
#include <dns/acl.h>
|
||||
#include <dns/ssu.h>
|
||||
#include <dns/zone.h>
|
||||
#include <dns/zoneconf.h>
|
||||
|
||||
#include <named/zoneconf.h>
|
||||
|
||||
/*
|
||||
* These are BIND9 server defaults, not necessarily identical to the
|
||||
|
|
@ -47,7 +48,7 @@
|
|||
*/
|
||||
static isc_result_t
|
||||
configure_zone_acl(dns_c_zone_t *czone, dns_c_ctx_t *cctx, dns_c_view_t *cview,
|
||||
dns_aclconfctx_t *aclconfctx, dns_zone_t *zone,
|
||||
ns_aclconfctx_t *aclconfctx, dns_zone_t *zone,
|
||||
isc_result_t (*getcacl)(dns_c_zone_t *,
|
||||
dns_c_ipmatchlist_t **),
|
||||
isc_result_t (*getviewcacl)(dns_c_view_t *
|
||||
|
|
@ -68,7 +69,7 @@ configure_zone_acl(dns_c_zone_t *czone, dns_c_ctx_t *cctx, dns_c_view_t *cview,
|
|||
result = (*getglobalcacl)(cctx, &cacl);
|
||||
}
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
result = dns_acl_fromconfig(cacl, cctx, aclconfctx,
|
||||
result = ns_acl_fromconfig(cacl, cctx, aclconfctx,
|
||||
dns_zone_getmctx(zone), &dacl);
|
||||
dns_c_ipmatchlist_detach(&cacl);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
|
|
@ -88,7 +89,7 @@ configure_zone_acl(dns_c_zone_t *czone, dns_c_ctx_t *cctx, dns_c_view_t *cview,
|
|||
* Conver a config file zone type into a server zone type.
|
||||
*/
|
||||
static dns_zonetype_t
|
||||
dns_zonetype_fromconf(dns_c_zonetype_t cztype) {
|
||||
zonetype_fromconf(dns_c_zonetype_t cztype) {
|
||||
switch (cztype) {
|
||||
case dns_c_zone_master:
|
||||
return dns_zone_master;
|
||||
|
|
@ -153,8 +154,8 @@ strtoargv(isc_mem_t *mctx, char *s, unsigned int *argcp, char ***argvp) {
|
|||
}
|
||||
|
||||
isc_result_t
|
||||
dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview,
|
||||
dns_c_zone_t *czone, dns_aclconfctx_t *ac,
|
||||
ns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview,
|
||||
dns_c_zone_t *czone, ns_aclconfctx_t *ac,
|
||||
dns_zone_t *zone)
|
||||
{
|
||||
isc_result_t result;
|
||||
|
|
@ -185,7 +186,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview,
|
|||
|
||||
dns_zone_setclass(zone, czone->zclass);
|
||||
|
||||
dns_zone_settype(zone, dns_zonetype_fromconf(czone->ztype));
|
||||
dns_zone_settype(zone, zonetype_fromconf(czone->ztype));
|
||||
|
||||
cpval = NULL;
|
||||
result = dns_c_zone_getdatabase(czone, &cpval);
|
||||
|
|
@ -523,11 +524,11 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview,
|
|||
}
|
||||
|
||||
isc_boolean_t
|
||||
dns_zone_reusable(dns_zone_t *zone, dns_c_zone_t *czone) {
|
||||
ns_zone_reusable(dns_zone_t *zone, dns_c_zone_t *czone) {
|
||||
const char *cfilename;
|
||||
const char *zfilename;
|
||||
|
||||
if (dns_zonetype_fromconf(czone->ztype) != dns_zone_gettype(zone))
|
||||
if (zonetype_fromconf(czone->ztype) != dns_zone_gettype(zone))
|
||||
return (ISC_FALSE);
|
||||
|
||||
cfilename = NULL;
|
||||
|
|
@ -541,7 +542,7 @@ dns_zone_reusable(dns_zone_t *zone, dns_c_zone_t *czone) {
|
|||
}
|
||||
|
||||
isc_result_t
|
||||
dns_zonemgr_configure(dns_c_ctx_t *cctx, dns_zonemgr_t *zmgr) {
|
||||
ns_zonemgr_configure(dns_c_ctx_t *cctx, dns_zonemgr_t *zmgr) {
|
||||
isc_uint32_t val;
|
||||
isc_result_t result;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: Makefile.in,v 1.35 2000/09/26 23:25:51 bwelling Exp $
|
||||
# $Id: Makefile.in,v 1.36 2000/11/27 19:42:32 gson Exp $
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
|
@ -26,7 +26,7 @@ OTHERHEADERS =
|
|||
OTHERHEADERS = sdb.h
|
||||
#endif /* NOMINUM_PUBLIC */
|
||||
|
||||
HEADERS = a6.h acl.h aclconf.h adb.h byaddr.h cache.h callbacks.h \
|
||||
HEADERS = a6.h acl.h adb.h byaddr.h cache.h callbacks.h \
|
||||
cert.h compress.h \
|
||||
confacl.h confcache.h confcommon.h confctl.h confctx.h \
|
||||
confip.h confkeys.h conflog.h conflsn.h confparser.h \
|
||||
|
|
@ -40,8 +40,8 @@ HEADERS = a6.h acl.h aclconf.h adb.h byaddr.h cache.h callbacks.h \
|
|||
rdataslab.h rdatatype.h request.h resolver.h result.h \
|
||||
rootns.h secalg.h secproto.h ssu.h \
|
||||
tcpmsg.h time.h tkey.h \
|
||||
tkeyconf.h tsig.h ttl.h types.h validator.h view.h xfrin.h \
|
||||
zone.h zoneconf.h zt.h ${OTHERHEADERS}
|
||||
tsig.h ttl.h types.h validator.h view.h xfrin.h \
|
||||
zone.h zt.h ${OTHERHEADERS}
|
||||
|
||||
GENHEADERS = enumclass.h enumtype.h rdatastruct.h
|
||||
|
||||
|
|
|
|||
|
|
@ -1,71 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 1999, 2000 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
|
||||
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
|
||||
* INTERNET SOFTWARE CONSORTIUM 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.
|
||||
*/
|
||||
|
||||
/* $Id: aclconf.h,v 1.9 2000/08/01 01:23:38 tale Exp $ */
|
||||
|
||||
#ifndef DNS_ACLCONF_H
|
||||
#define DNS_ACLCONF_H 1
|
||||
|
||||
#include <isc/lang.h>
|
||||
|
||||
#include <dns/confctx.h>
|
||||
#include <dns/types.h>
|
||||
|
||||
typedef struct dns_aclconfctx {
|
||||
ISC_LIST(dns_acl_t) named_acl_cache;
|
||||
} dns_aclconfctx_t;
|
||||
|
||||
/***
|
||||
*** Functions
|
||||
***/
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
void
|
||||
dns_aclconfctx_init(dns_aclconfctx_t *ctx);
|
||||
/*
|
||||
* Initialize an ACL configuration context.
|
||||
*/
|
||||
|
||||
void
|
||||
dns_aclconfctx_destroy(dns_aclconfctx_t *ctx);
|
||||
/*
|
||||
* Destroy an ACL configuration context.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
dns_acl_fromconfig(dns_c_ipmatchlist_t *caml,
|
||||
dns_c_ctx_t *cctx,
|
||||
dns_aclconfctx_t *ctx,
|
||||
isc_mem_t *mctx,
|
||||
dns_acl_t **target);
|
||||
/*
|
||||
* Construct a new dns_acl_t from configuration data in 'caml' and
|
||||
* 'cctx'. Memory is allocated through 'mctx'.
|
||||
*
|
||||
* Any named ACLs referred to within 'caml' will be be converted
|
||||
* inte nested dns_acl_t objects. Multiple references to the same
|
||||
* named ACLs will be converted into shared references to a single
|
||||
* nested dns_acl_t object when the referring objects were created
|
||||
* passing the same ACL configuration context 'ctx'.
|
||||
*
|
||||
* On success, attach '*target' to the new dns_acl_t object.
|
||||
*/
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_ACLCONF_H */
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: name.h,v 1.81 2000/10/11 17:44:17 mws Exp $ */
|
||||
/* $Id: name.h,v 1.82 2000/11/27 19:42:34 gson Exp $ */
|
||||
|
||||
#ifndef DNS_NAME_H
|
||||
#define DNS_NAME_H 1
|
||||
|
|
@ -991,6 +991,12 @@ dns_name_split(dns_name_t *name,
|
|||
* Split 'name' into two pieces on a label or bitlabel boundary.
|
||||
*
|
||||
* Notes:
|
||||
* 'name' is split such that 'suffix' holds the most significant
|
||||
* 'suffixlabels' labels, except that if the least significant
|
||||
* suffix label is a bitstring label, then only the 'nbits' most
|
||||
* significant bits of that label are included in 'suffix'. All
|
||||
* other labels and bits are stored in 'prefix'.
|
||||
*
|
||||
* Copying name data is avoided as much as possible, so 'prefix'
|
||||
* and 'suffix' will usually end up pointing at the data for 'name',
|
||||
* except when 'nbits' > 0. The name data is copied to the
|
||||
|
|
@ -998,7 +1004,7 @@ dns_name_split(dns_name_t *name,
|
|||
* because of the bit fiddling that must be done.
|
||||
*
|
||||
* It is legitimate to pass a 'prefix' or 'suffix' that has
|
||||
* its name data stored someplace other than the dedicate buffer.
|
||||
* its name data stored someplace other than the dedicated buffer.
|
||||
* This is useful to avoid name copying in the calling function.
|
||||
*
|
||||
* It is also legitimate to pass a 'prefix' or 'suffix' that is
|
||||
|
|
@ -1011,7 +1017,7 @@ dns_name_split(dns_name_t *name,
|
|||
* 'suffixlabels' cannot exceed the number of labels in 'name'.
|
||||
*
|
||||
* 'nbits' can be greater than zero only when the least significant
|
||||
* label of 'suffixlabels' is a bitstring label.
|
||||
* label of 'suffix' is a bitstring label.
|
||||
*
|
||||
* 'nbits' cannot exceed the number of bits in the bitstring label.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,51 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 1999, 2000 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
|
||||
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
|
||||
* INTERNET SOFTWARE CONSORTIUM 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.
|
||||
*/
|
||||
|
||||
/* $Id: tkeyconf.h,v 1.6 2000/08/01 01:24:49 tale Exp $ */
|
||||
|
||||
#ifndef DNS_TKEYCONF_H
|
||||
#define DNS_TKEYCONF_H 1
|
||||
|
||||
#include <isc/types.h>
|
||||
#include <isc/lang.h>
|
||||
|
||||
#include <dns/confctx.h>
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t
|
||||
dns_tkeyctx_fromconfig(dns_c_ctx_t *cfg, isc_mem_t *mctx, isc_entropy_t *ectx,
|
||||
dns_tkeyctx_t **tctxp);
|
||||
/*
|
||||
* Create a TKEY context and configure it, including the default DH key
|
||||
* and default domain, according to 'cfg'.
|
||||
*
|
||||
* Requires:
|
||||
* 'cfg' is a valid configuration context.
|
||||
* 'mctx' is not NULL
|
||||
* 'ectx' is not NULL
|
||||
* 'tctx' is not NULL
|
||||
* '*tctx' is NULL
|
||||
*
|
||||
* Returns:
|
||||
* ISC_R_SUCCESS
|
||||
* ISC_R_NOMEMORY
|
||||
*/
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_TKEYCONF_H */
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 1999, 2000 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
|
||||
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
|
||||
* INTERNET SOFTWARE CONSORTIUM 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.
|
||||
*/
|
||||
|
||||
/* $Id: tsigconf.h,v 1.6 2000/08/01 01:24:51 tale Exp $ */
|
||||
|
||||
#ifndef DNS_TSIGCONF_H
|
||||
#define DNS_TSIGCONF_H 1
|
||||
|
||||
#include <isc/types.h>
|
||||
#include <isc/lang.h>
|
||||
|
||||
#include <dns/confctx.h>
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t
|
||||
dns_tsigkeyring_fromconfig(dns_c_view_t *confview, dns_c_ctx_t *confctx,
|
||||
isc_mem_t *mctx, dns_tsig_keyring_t **ringp);
|
||||
/*
|
||||
* Create a TSIG key ring and configure it according to the 'key'
|
||||
* statements in 'confview' and 'confctx'.
|
||||
*
|
||||
* Requires:
|
||||
* 'confctx' is a valid configuration context.
|
||||
* 'mctx' is not NULL
|
||||
* 'ring' is not NULL, and '*ring' is NULL
|
||||
*
|
||||
* Returns:
|
||||
* ISC_R_SUCCESS
|
||||
* ISC_R_NOMEMORY
|
||||
*/
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_TSIGCONF_H */
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 1999, 2000 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
|
||||
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
|
||||
* INTERNET SOFTWARE CONSORTIUM 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.
|
||||
*/
|
||||
|
||||
/* $Id: zoneconf.h,v 1.13 2000/08/01 01:24:59 tale Exp $ */
|
||||
|
||||
#ifndef DNS_ZONECONF_H
|
||||
#define DNS_ZONECONF_H 1
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
#include <dns/aclconf.h>
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t
|
||||
dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview, dns_c_zone_t *czone,
|
||||
dns_aclconfctx_t *ac, dns_zone_t *zone);
|
||||
/*
|
||||
* Configure or reconfigure a zone according to the named.conf
|
||||
* data in 'cctx' and 'czone'.
|
||||
*
|
||||
* The zone origin is not configured, it is assumed to have been set
|
||||
* at zone creation time.
|
||||
*
|
||||
* Require:
|
||||
* 'lctx' to be initalised or NULL.
|
||||
* 'cctx' to be initalised or NULL.
|
||||
* 'ac' to point to an initialized ns_aclconfctx_t.
|
||||
* 'czone' to be initalised.
|
||||
* 'zone' to be initalised.
|
||||
*/
|
||||
|
||||
isc_boolean_t
|
||||
dns_zone_reusable(dns_zone_t *zone, dns_c_zone_t *czone);
|
||||
/*
|
||||
* If 'zone' can be safely reconfigured according to the configuration
|
||||
* data in 'czone', return ISC_TRUE. If the configuration data is so
|
||||
* different from the current zone state that the zone needs to be destroyed
|
||||
* and recreated, return ISC_FALSE.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
dns_zonemgr_configure(dns_c_ctx_t *cctx, dns_zonemgr_t *zonemgr);
|
||||
/*
|
||||
* Configure the zone manager according to the named.conf data
|
||||
* in 'cctx'.
|
||||
*/
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_ZONECONF_H */
|
||||
Loading…
Reference in a new issue