Commit 45e1bd63 authored by Mark Andrews's avatar Mark Andrews

1991. [cleanup] The configuration data, once read, should be treated

                        as readonly.  Expand the use of const to enforce this
                        at compile time. [RT #15813]
parent c4008fdd
1991. [cleanup] The configuration data, once read, should be treated
as readonly. Expand the use of const to enforce this
at compile time. [RT #15813]
1990. [bug] libbind: isc's override of broken gettimeofday()
implementions was not always effective.
[RT #15709]
......
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: named-checkconf.c,v 1.41 2006/01/07 00:23:35 marka Exp $ */
/* $Id: named-checkconf.c,v 1.42 2006/02/28 02:39:51 marka Exp $ */
/*! \file */
......@@ -66,7 +66,7 @@ usage(void) {
/*% directory callback */
static isc_result_t
directory_callback(const char *clausename, cfg_obj_t *obj, void *arg) {
directory_callback(const char *clausename, const cfg_obj_t *obj, void *arg) {
isc_result_t result;
const char *directory;
......@@ -91,7 +91,7 @@ directory_callback(const char *clausename, cfg_obj_t *obj, void *arg) {
}
static isc_boolean_t
get_maps(cfg_obj_t **maps, const char *name, cfg_obj_t **obj) {
get_maps(const cfg_obj_t **maps, const char *name, const cfg_obj_t **obj) {
int i;
for (i = 0;; i++) {
if (maps[i] == NULL)
......@@ -102,11 +102,11 @@ get_maps(cfg_obj_t **maps, const char *name, cfg_obj_t **obj) {
}
static isc_boolean_t
get_checknames(cfg_obj_t **maps, cfg_obj_t **obj) {
cfg_listelt_t *element;
cfg_obj_t *checknames;
cfg_obj_t *type;
cfg_obj_t *value;
get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
const cfg_listelt_t *element;
const cfg_obj_t *checknames;
const cfg_obj_t *type;
const cfg_obj_t *value;
isc_result_t result;
int i;
......@@ -135,7 +135,7 @@ get_checknames(cfg_obj_t **maps, cfg_obj_t **obj) {
}
static isc_result_t
config_get(cfg_obj_t **maps, const char *name, cfg_obj_t **obj) {
config_get(const cfg_obj_t **maps, const char *name, const cfg_obj_t **obj) {
int i;
for (i = 0;; i++) {
......@@ -148,22 +148,23 @@ config_get(cfg_obj_t **maps, const char *name, cfg_obj_t **obj) {
/*% configure the zone */
static isc_result_t
configure_zone(const char *vclass, const char *view, cfg_obj_t *zconfig,
cfg_obj_t *vconfig, cfg_obj_t *config, isc_mem_t *mctx)
configure_zone(const char *vclass, const char *view,
const cfg_obj_t *zconfig, const cfg_obj_t *vconfig,
const cfg_obj_t *config, isc_mem_t *mctx)
{
int i = 0;
isc_result_t result;
const char *zclass;
const char *zname;
const char *zfile;
cfg_obj_t *maps[4];
cfg_obj_t *zoptions = NULL;
cfg_obj_t *classobj = NULL;
cfg_obj_t *typeobj = NULL;
cfg_obj_t *fileobj = NULL;
cfg_obj_t *dbobj = NULL;
cfg_obj_t *obj = NULL;
cfg_obj_t *fmtobj = NULL;
const cfg_obj_t *maps[4];
const cfg_obj_t *zoptions = NULL;
const cfg_obj_t *classobj = NULL;
const cfg_obj_t *typeobj = NULL;
const cfg_obj_t *fileobj = NULL;
const cfg_obj_t *dbobj = NULL;
const cfg_obj_t *obj = NULL;
const cfg_obj_t *fmtobj = NULL;
dns_masterformat_t masterformat;
zone_options = DNS_ZONEOPT_CHECKNS | DNS_ZONEOPT_MANYERRORS;
......@@ -309,12 +310,12 @@ configure_zone(const char *vclass, const char *view, cfg_obj_t *zconfig,
/*% configure a view */
static isc_result_t
configure_view(const char *vclass, const char *view, cfg_obj_t *config,
cfg_obj_t *vconfig, isc_mem_t *mctx)
configure_view(const char *vclass, const char *view, const cfg_obj_t *config,
const cfg_obj_t *vconfig, isc_mem_t *mctx)
{
cfg_listelt_t *element;
cfg_obj_t *voptions;
cfg_obj_t *zonelist;
const cfg_listelt_t *element;
const cfg_obj_t *voptions;
const cfg_obj_t *zonelist;
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
......@@ -332,7 +333,7 @@ configure_view(const char *vclass, const char *view, cfg_obj_t *config,
element != NULL;
element = cfg_list_next(element))
{
cfg_obj_t *zconfig = cfg_listelt_value(element);
const cfg_obj_t *zconfig = cfg_listelt_value(element);
tresult = configure_zone(vclass, view, zconfig, vconfig,
config, mctx);
if (tresult != ISC_R_SUCCESS)
......@@ -344,11 +345,11 @@ configure_view(const char *vclass, const char *view, cfg_obj_t *config,
/*% load zones from the configuration */
static isc_result_t
load_zones_fromconfig(cfg_obj_t *config, isc_mem_t *mctx) {
cfg_listelt_t *element;
cfg_obj_t *classobj;
cfg_obj_t *views;
cfg_obj_t *vconfig;
load_zones_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx) {
const cfg_listelt_t *element;
const cfg_obj_t *classobj;
const cfg_obj_t *views;
const cfg_obj_t *vconfig;
const char *vclass;
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
......
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: config.c,v 1.68 2006/01/27 02:35:14 marka Exp $ */
/* $Id: config.c,v 1.69 2006/02/28 02:39:51 marka Exp $ */
/*! \file */
......@@ -216,7 +216,7 @@ ns_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf) {
}
isc_result_t
ns_config_get(cfg_obj_t **maps, const char *name, cfg_obj_t **obj) {
ns_config_get(const cfg_obj_t **maps, const char *name, const cfg_obj_t **obj) {
int i;
for (i = 0;; i++) {
......@@ -228,11 +228,13 @@ ns_config_get(cfg_obj_t **maps, const char *name, cfg_obj_t **obj) {
}
isc_result_t
ns_checknames_get(cfg_obj_t **maps, const char *which, cfg_obj_t **obj) {
cfg_listelt_t *element;
cfg_obj_t *checknames;
cfg_obj_t *type;
cfg_obj_t *value;
ns_checknames_get(const cfg_obj_t **maps, const char *which,
const cfg_obj_t **obj)
{
const cfg_listelt_t *element;
const cfg_obj_t *checknames;
const cfg_obj_t *type;
const cfg_obj_t *value;
int i;
for (i = 0;; i++) {
......@@ -263,8 +265,8 @@ ns_checknames_get(cfg_obj_t **maps, const char *which, cfg_obj_t **obj) {
}
int
ns_config_listcount(cfg_obj_t *list) {
cfg_listelt_t *e;
ns_config_listcount(const cfg_obj_t *list) {
const cfg_listelt_t *e;
int i = 0;
for (e = cfg_list_first(list); e != NULL; e = cfg_list_next(e))
......@@ -274,7 +276,7 @@ ns_config_listcount(cfg_obj_t *list) {
}
isc_result_t
ns_config_getclass(cfg_obj_t *classobj, dns_rdataclass_t defclass,
ns_config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
dns_rdataclass_t *classp) {
isc_textregion_t r;
isc_result_t result;
......@@ -293,7 +295,7 @@ ns_config_getclass(cfg_obj_t *classobj, dns_rdataclass_t defclass,
}
isc_result_t
ns_config_gettype(cfg_obj_t *typeobj, dns_rdatatype_t deftype,
ns_config_gettype(const cfg_obj_t *typeobj, dns_rdatatype_t deftype,
dns_rdatatype_t *typep) {
isc_textregion_t r;
isc_result_t result;
......@@ -312,7 +314,7 @@ ns_config_gettype(cfg_obj_t *typeobj, dns_rdatatype_t deftype,
}
dns_zonetype_t
ns_config_getzonetype(cfg_obj_t *zonetypeobj) {
ns_config_getzonetype(const cfg_obj_t *zonetypeobj) {
dns_zonetype_t ztype = dns_zone_none;
const char *str;
......@@ -329,14 +331,14 @@ ns_config_getzonetype(cfg_obj_t *zonetypeobj) {
}
isc_result_t
ns_config_getiplist(cfg_obj_t *config, cfg_obj_t *list,
ns_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
in_port_t defport, isc_mem_t *mctx,
isc_sockaddr_t **addrsp, isc_uint32_t *countp)
{
int count, i = 0;
cfg_obj_t *addrlist;
cfg_obj_t *portobj;
cfg_listelt_t *element;
const cfg_obj_t *addrlist;
const cfg_obj_t *portobj;
const cfg_listelt_t *element;
isc_sockaddr_t *addrs;
in_port_t port;
isc_result_t result;
......@@ -396,10 +398,12 @@ ns_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
}
static isc_result_t
get_masters_def(cfg_obj_t *cctx, const char *name, cfg_obj_t **ret) {
get_masters_def(const cfg_obj_t *cctx, const char *name,
const cfg_obj_t **ret)
{
isc_result_t result;
cfg_obj_t *masters = NULL;
cfg_listelt_t *elt;
const cfg_obj_t *masters = NULL;
const cfg_listelt_t *elt;
result = cfg_map_get(cctx, "masters", &masters);
if (result != ISC_R_SUCCESS)
......@@ -407,7 +411,7 @@ get_masters_def(cfg_obj_t *cctx, const char *name, cfg_obj_t **ret) {
for (elt = cfg_list_first(masters);
elt != NULL;
elt = cfg_list_next(elt)) {
cfg_obj_t *list;
const cfg_obj_t *list;
const char *listname;
list = cfg_listelt_value(elt);
......@@ -422,24 +426,24 @@ get_masters_def(cfg_obj_t *cctx, const char *name, cfg_obj_t **ret) {
}
isc_result_t
ns_config_getipandkeylist(cfg_obj_t *config, cfg_obj_t *list, isc_mem_t *mctx,
isc_sockaddr_t **addrsp, dns_name_t ***keysp,
isc_uint32_t *countp)
ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
isc_mem_t *mctx, isc_sockaddr_t **addrsp,
dns_name_t ***keysp, isc_uint32_t *countp)
{
isc_uint32_t addrcount = 0, keycount = 0, i = 0;
isc_uint32_t listcount = 0, l = 0, j;
isc_uint32_t stackcount = 0, pushed = 0;
isc_result_t result;
cfg_listelt_t *element;
cfg_obj_t *addrlist;
cfg_obj_t *portobj;
const cfg_listelt_t *element;
const cfg_obj_t *addrlist;
const cfg_obj_t *portobj;
in_port_t port;
dns_fixedname_t fname;
isc_sockaddr_t *addrs = NULL;
dns_name_t **keys = NULL;
struct { const char *name; } *lists = NULL;
struct {
cfg_listelt_t *element;
const cfg_listelt_t *element;
in_port_t port;
} *stack = NULL;
......@@ -473,8 +477,8 @@ ns_config_getipandkeylist(cfg_obj_t *config, cfg_obj_t *list, isc_mem_t *mctx,
element != NULL;
element = cfg_list_next(element))
{
cfg_obj_t *addr;
cfg_obj_t *key;
const cfg_obj_t *addr;
const cfg_obj_t *key;
const char *keystr;
isc_buffer_t b;
......@@ -699,10 +703,10 @@ ns_config_putipandkeylist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
}
isc_result_t
ns_config_getport(cfg_obj_t *config, in_port_t *portp) {
cfg_obj_t *maps[3];
cfg_obj_t *options = NULL;
cfg_obj_t *portobj = NULL;
ns_config_getport(const cfg_obj_t *config, in_port_t *portp) {
const cfg_obj_t *maps[3];
const cfg_obj_t *options = NULL;
const cfg_obj_t *portobj = NULL;
isc_result_t result;
int i;
......
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: controlconf.c,v 1.49 2006/01/27 23:57:46 marka Exp $ */
/* $Id: controlconf.c,v 1.50 2006/02/28 02:39:51 marka Exp $ */
/*! \file */
......@@ -659,10 +659,12 @@ ns_controls_shutdown(ns_controls_t *controls) {
}
static isc_result_t
cfgkeylist_find(cfg_obj_t *keylist, const char *keyname, cfg_obj_t **objp) {
cfg_listelt_t *element;
cfgkeylist_find(const cfg_obj_t *keylist, const char *keyname,
const cfg_obj_t **objp)
{
const cfg_listelt_t *element;
const char *str;
cfg_obj_t *obj;
const cfg_obj_t *obj;
for (element = cfg_list_first(keylist);
element != NULL;
......@@ -681,13 +683,13 @@ cfgkeylist_find(cfg_obj_t *keylist, const char *keyname, cfg_obj_t **objp) {
}
static isc_result_t
controlkeylist_fromcfg(cfg_obj_t *keylist, isc_mem_t *mctx,
controlkeylist_fromcfg(const cfg_obj_t *keylist, isc_mem_t *mctx,
controlkeylist_t *keyids)
{
cfg_listelt_t *element;
const cfg_listelt_t *element;
char *newstr = NULL;
const char *str;
cfg_obj_t *obj;
const cfg_obj_t *obj;
controlkey_t *key = NULL;
for (element = cfg_list_first(keylist);
......@@ -722,11 +724,11 @@ controlkeylist_fromcfg(cfg_obj_t *keylist, isc_mem_t *mctx,
}
static void
register_keys(cfg_obj_t *control, cfg_obj_t *keylist,
register_keys(const cfg_obj_t *control, const cfg_obj_t *keylist,
controlkeylist_t *keyids, isc_mem_t *mctx, const char *socktext)
{
controlkey_t *keyid, *next;
cfg_obj_t *keydef;
const cfg_obj_t *keydef;
char secret[1024];
isc_buffer_t b;
isc_result_t result;
......@@ -746,8 +748,8 @@ register_keys(cfg_obj_t *control, cfg_obj_t *keylist,
ISC_LIST_UNLINK(*keyids, keyid, link);
free_controlkey(keyid, mctx);
} else {
cfg_obj_t *algobj = NULL;
cfg_obj_t *secretobj = NULL;
const cfg_obj_t *algobj = NULL;
const cfg_obj_t *secretobj = NULL;
const char *algstr = NULL;
const char *secretstr = NULL;
......@@ -815,9 +817,9 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
isc_result_t result;
cfg_parser_t *pctx = NULL;
cfg_obj_t *config = NULL;
cfg_obj_t *key = NULL;
cfg_obj_t *algobj = NULL;
cfg_obj_t *secretobj = NULL;
const cfg_obj_t *key = NULL;
const cfg_obj_t *algobj = NULL;
const cfg_obj_t *secretobj = NULL;
const char *algstr = NULL;
const char *secretstr = NULL;
controlkey_t *keyid = NULL;
......@@ -898,12 +900,13 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
* valid or both are NULL.
*/
static void
get_key_info(cfg_obj_t *config, cfg_obj_t *control,
cfg_obj_t **global_keylistp, cfg_obj_t **control_keylistp)
get_key_info(const cfg_obj_t *config, const cfg_obj_t *control,
const cfg_obj_t **global_keylistp,
const cfg_obj_t **control_keylistp)
{
isc_result_t result;
cfg_obj_t *control_keylist = NULL;
cfg_obj_t *global_keylist = NULL;
const cfg_obj_t *control_keylist = NULL;
const cfg_obj_t *global_keylist = NULL;
REQUIRE(global_keylistp != NULL && *global_keylistp == NULL);
REQUIRE(control_keylistp != NULL && *control_keylistp == NULL);
......@@ -922,16 +925,15 @@ get_key_info(cfg_obj_t *config, cfg_obj_t *control,
}
static void
update_listener(ns_controls_t *cp,
controllistener_t **listenerp, cfg_obj_t *control,
cfg_obj_t *config, isc_sockaddr_t *addr,
cfg_aclconfctx_t *aclconfctx, const char *socktext,
isc_sockettype_t type)
update_listener(ns_controls_t *cp, controllistener_t **listenerp,
const cfg_obj_t *control, const cfg_obj_t *config,
isc_sockaddr_t *addr, cfg_aclconfctx_t *aclconfctx,
const char *socktext, isc_sockettype_t type)
{
controllistener_t *listener;
cfg_obj_t *allow;
cfg_obj_t *global_keylist = NULL;
cfg_obj_t *control_keylist = NULL;
const cfg_obj_t *allow;
const cfg_obj_t *global_keylist = NULL;
const cfg_obj_t *control_keylist = NULL;
dns_acl_t *new_acl = NULL;
controlkeylist_t keys;
isc_result_t result = ISC_R_SUCCESS;
......@@ -1062,15 +1064,15 @@ update_listener(ns_controls_t *cp,
static void
add_listener(ns_controls_t *cp, controllistener_t **listenerp,
cfg_obj_t *control, cfg_obj_t *config, isc_sockaddr_t *addr,
cfg_aclconfctx_t *aclconfctx, const char *socktext,
isc_sockettype_t type)
const cfg_obj_t *control, const cfg_obj_t *config,
isc_sockaddr_t *addr, cfg_aclconfctx_t *aclconfctx,
const char *socktext, isc_sockettype_t type)
{
isc_mem_t *mctx = cp->server->mctx;
controllistener_t *listener;
cfg_obj_t *allow;
cfg_obj_t *global_keylist = NULL;
cfg_obj_t *control_keylist = NULL;
const cfg_obj_t *allow;
const cfg_obj_t *global_keylist = NULL;
const cfg_obj_t *control_keylist = NULL;
dns_acl_t *new_acl = NULL;
isc_result_t result = ISC_R_SUCCESS;
......@@ -1200,13 +1202,13 @@ add_listener(ns_controls_t *cp, controllistener_t **listenerp,
}
isc_result_t
ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config,
ns_controls_configure(ns_controls_t *cp, const cfg_obj_t *config,
cfg_aclconfctx_t *aclconfctx)
{
controllistener_t *listener;
controllistenerlist_t new_listeners;
cfg_obj_t *controlslist = NULL;
cfg_listelt_t *element, *element2;
const cfg_obj_t *controlslist = NULL;
const cfg_listelt_t *element, *element2;
char socktext[ISC_SOCKADDR_FORMATSIZE];
ISC_LIST_INIT(new_listeners);
......@@ -1228,8 +1230,8 @@ ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config,
for (element = cfg_list_first(controlslist);
element != NULL;
element = cfg_list_next(element)) {
cfg_obj_t *controls;
cfg_obj_t *inetcontrols = NULL;
const cfg_obj_t *controls;
const cfg_obj_t *inetcontrols = NULL;
controls = cfg_listelt_value(element);
(void)cfg_map_get(controls, "inet", &inetcontrols);
......@@ -1239,9 +1241,9 @@ ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config,
for (element2 = cfg_list_first(inetcontrols);
element2 != NULL;
element2 = cfg_list_next(element2)) {
cfg_obj_t *control;
cfg_obj_t *obj;
isc_sockaddr_t *addr;
const cfg_obj_t *control;
const cfg_obj_t *obj;
isc_sockaddr_t addr;
/*
* The parser handles BIND 8 configuration file
......@@ -1251,12 +1253,12 @@ ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config,
control = cfg_listelt_value(element2);
obj = cfg_tuple_get(control, "address");
addr = cfg_obj_assockaddr(obj);
if (isc_sockaddr_getport(addr) == 0)
isc_sockaddr_setport(addr,
addr = *cfg_obj_assockaddr(obj);
if (isc_sockaddr_getport(&addr) == 0)
isc_sockaddr_setport(&addr,
NS_CONTROL_PORT);
isc_sockaddr_format(addr, socktext,
isc_sockaddr_format(&addr, socktext,
sizeof(socktext));
isc_log_write(ns_g_lctx,
......@@ -1267,7 +1269,7 @@ ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config,
socktext);
update_listener(cp, &listener, control, config,
addr, aclconfctx, socktext,
&addr, aclconfctx, socktext,
isc_sockettype_tcp);
if (listener != NULL)
......@@ -1282,7 +1284,7 @@ ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config,
* This is a new listener.
*/
add_listener(cp, &listener, control,
config, addr, aclconfctx,
config, &addr, aclconfctx,
socktext,
isc_sockettype_tcp);
......@@ -1294,8 +1296,8 @@ ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config,
for (element = cfg_list_first(controlslist);
element != NULL;
element = cfg_list_next(element)) {
cfg_obj_t *controls;
cfg_obj_t *unixcontrols = NULL;
const cfg_obj_t *controls;
const cfg_obj_t *unixcontrols = NULL;
controls = cfg_listelt_value(element);
(void)cfg_map_get(controls, "unix", &unixcontrols);
......@@ -1305,8 +1307,8 @@ ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config,
for (element2 = cfg_list_first(unixcontrols);
element2 != NULL;
element2 = cfg_list_next(element2)) {
cfg_obj_t *control;
cfg_obj_t *path;
const cfg_obj_t *control;
const cfg_obj_t *path;
isc_sockaddr_t addr;
isc_result_t result;
......
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: config.h,v 1.11 2006/01/27 23:57:46 marka Exp $ */
/* $Id: config.h,v 1.12 2006/02/28 02:39:51 marka Exp $ */
#ifndef NAMED_CONFIG_H
#define NAMED_CONFIG_H 1
......@@ -31,27 +31,28 @@ isc_result_t
ns_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf);
isc_result_t
ns_config_get(cfg_obj_t **maps, const char* name, cfg_obj_t **obj);
ns_config_get(const cfg_obj_t **maps, const char* name, const cfg_obj_t **obj);
isc_result_t
ns_checknames_get(cfg_obj_t **maps, const char* name, cfg_obj_t **obj);
ns_checknames_get(const cfg_obj_t **maps, const char* name,
const cfg_obj_t **obj);
int
ns_config_listcount(cfg_obj_t *list);
ns_config_listcount(const cfg_obj_t *list);
isc_result_t
ns_config_getclass(cfg_obj_t *classobj, dns_rdataclass_t defclass,
ns_config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
dns_rdataclass_t *classp);
isc_result_t
ns_config_gettype(cfg_obj_t *typeobj, dns_rdatatype_t deftype,
ns_config_gettype(const cfg_obj_t *typeobj, dns_rdatatype_t deftype,
dns_rdatatype_t *typep);
dns_zonetype_t
ns_config_getzonetype(cfg_obj_t *zonetypeobj);
ns_config_getzonetype(const cfg_obj_t *zonetypeobj);
isc_result_t
ns_config_getiplist(cfg_obj_t *config, cfg_obj_t *list,
ns_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
in_port_t defport, isc_mem_t *mctx,
isc_sockaddr_t **addrsp, isc_uint32_t *countp);
......@@ -60,16 +61,16 @@ ns_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
isc_uint32_t count);
isc_result_t
ns_config_getipandkeylist(cfg_obj_t *config, cfg_obj_t *list, isc_mem_t *mctx,
isc_sockaddr_t **addrsp, dns_name_t ***keys,
isc_uint32_t *countp);
ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
isc_mem_t *mctx, isc_sockaddr_t **addrsp,
dns_name_t ***keys, isc_uint32_t *countp);
void
ns_config_putipandkeylist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
dns_name_t ***keys, isc_uint32_t count);
isc_result_t
ns_config_getport(cfg_obj_t *config, in_port_t *portp);
ns_config_getport(const cfg_obj_t *config, in_port_t *portp);
isc_result_t
ns_config_getkeyalgorithm(const char *str, dns_name_t **name,
......
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: control.h,v 1.19 2005/04/27 04:55:57 sra Exp $ */
/* $Id: control.h,v 1.20 2006/02/28 02:39:51 marka Exp $ */
#ifndef NAMED_CONTROL_H
#define NAMED_CONTROL_H 1
......@@ -71,7 +71,7 @@ ns_controls_destroy(ns_controls_t **ctrlsp);
*/
isc_result_t
ns_controls_configure(ns_controls_t *controls, cfg_obj_t *config,
ns_controls_configure(ns_controls_t *controls, const cfg_obj_t *config,
cfg_aclconfctx_t *aclconfctx);
/*%<
* Configure zero or more command channels into 'controls'
...