diff --git a/bin/named/aclconf.c b/bin/named/aclconf.c index 2370da9c23..0a9a9ffbe0 100644 --- a/bin/named/aclconf.c +++ b/bin/named/aclconf.c @@ -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 @@ -24,17 +24,18 @@ #include #include -#include #include #include +#include + 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) diff --git a/bin/named/include/named/aclconf.h b/bin/named/include/named/aclconf.h index 7a50d60cad..3c10b89ffb 100644 --- a/bin/named/include/named/aclconf.h +++ b/bin/named/include/named/aclconf.h @@ -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 #include #include -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 */ diff --git a/bin/named/include/named/omapi.h b/bin/named/include/named/omapi.h index d240b65d72..322180e395 100644 --- a/bin/named/include/named/omapi.h +++ b/bin/named/include/named/omapi.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 #include #include +#include + #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); diff --git a/bin/named/include/named/tkeyconf.h b/bin/named/include/named/tkeyconf.h index 257a7becc5..399e81ed1f 100644 --- a/bin/named/include/named/tkeyconf.h +++ b/bin/named/include/named/tkeyconf.h @@ -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 #include @@ -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 */ diff --git a/bin/named/include/named/tsigconf.h b/bin/named/include/named/tsigconf.h index f9689a524b..a050871f43 100644 --- a/bin/named/include/named/tsigconf.h +++ b/bin/named/include/named/tsigconf.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 #include @@ -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 */ diff --git a/bin/named/include/named/zoneconf.h b/bin/named/include/named/zoneconf.h index 5326b3c9b9..f528b08740 100644 --- a/bin/named/include/named/zoneconf.h +++ b/bin/named/include/named/zoneconf.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 #include -#include +#include 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 */ diff --git a/bin/named/omapiconf.c b/bin/named/omapiconf.c index 15929e8c3d..d803dcea45 100644 --- a/bin/named/omapiconf.c +++ b/bin/named/omapiconf.c @@ -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; diff --git a/bin/named/server.c b/bin/named/server.c index 10e8bec15e..e15b1eec95 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -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 @@ -48,11 +48,8 @@ #include #include #include -#include -#include #include #include -#include #include #include @@ -65,6 +62,9 @@ #include #include #include +#include +#include +#include /* * 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); diff --git a/bin/named/tkeyconf.c b/bin/named/tkeyconf.c index 44b3fd84d1..f4ccc14fec 100644 --- a/bin/named/tkeyconf.c +++ b/bin/named/tkeyconf.c @@ -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 @@ -27,10 +27,11 @@ #include #include #include -#include #include +#include + #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; diff --git a/bin/named/tsigconf.c b/bin/named/tsigconf.c index abb565aee0..d5a24fc94a 100644 --- a/bin/named/tsigconf.c +++ b/bin/named/tsigconf.c @@ -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 @@ -25,10 +25,11 @@ #include #include -#include #include +#include + 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; diff --git a/bin/named/zoneconf.c b/bin/named/zoneconf.c index dd82e6c027..8109ed449d 100644 --- a/bin/named/zoneconf.c +++ b/bin/named/zoneconf.c @@ -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 @@ -26,7 +26,8 @@ #include #include #include -#include + +#include /* * 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; diff --git a/lib/dns/include/dns/Makefile.in b/lib/dns/include/dns/Makefile.in index 2c581b52e9..1980b57e60 100644 --- a/lib/dns/include/dns/Makefile.in +++ b/lib/dns/include/dns/Makefile.in @@ -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 diff --git a/lib/dns/include/dns/aclconf.h b/lib/dns/include/dns/aclconf.h deleted file mode 100644 index 7a50d60cad..0000000000 --- a/lib/dns/include/dns/aclconf.h +++ /dev/null @@ -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 - -#include -#include - -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 */ diff --git a/lib/dns/include/dns/name.h b/lib/dns/include/dns/name.h index f35a982b2b..42b4ce3841 100644 --- a/lib/dns/include/dns/name.h +++ b/lib/dns/include/dns/name.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. * diff --git a/lib/dns/include/dns/tkeyconf.h b/lib/dns/include/dns/tkeyconf.h deleted file mode 100644 index 257a7becc5..0000000000 --- a/lib/dns/include/dns/tkeyconf.h +++ /dev/null @@ -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 -#include - -#include - -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 */ diff --git a/lib/dns/include/dns/tsigconf.h b/lib/dns/include/dns/tsigconf.h deleted file mode 100644 index f9689a524b..0000000000 --- a/lib/dns/include/dns/tsigconf.h +++ /dev/null @@ -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 -#include - -#include - -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 */ diff --git a/lib/dns/include/dns/zoneconf.h b/lib/dns/include/dns/zoneconf.h deleted file mode 100644 index 5326b3c9b9..0000000000 --- a/lib/dns/include/dns/zoneconf.h +++ /dev/null @@ -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 -#include - -#include - -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 */