mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 11:19:59 -04:00
369. [func] Support new named.conf options, view and zone
statements: max-retry-time, min-retry-time, max-refresh-time, min-refresh-time, max-names.
This commit is contained in:
parent
9805b668b7
commit
385a9cb48a
9 changed files with 1572 additions and 675 deletions
6
CHANGES
6
CHANGES
|
|
@ -1,3 +1,9 @@
|
|||
369. [func] Support new named.conf options, view and zone
|
||||
statements:
|
||||
|
||||
max-retry-time, min-retry-time,
|
||||
max-refresh-time, min-refresh-time, max-names.
|
||||
|
||||
368. [func] Restructure the internal ".bind" view so that more
|
||||
zones can be added to it.
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: named.conf,v 1.45 2000/08/01 01:13:03 tale Exp $ */
|
||||
/* $Id: named.conf,v 1.46 2000/08/02 20:44:18 brister Exp $ */
|
||||
|
||||
/*
|
||||
* This is a worthless, nonrunnable example of a named.conf file that has
|
||||
|
|
@ -34,8 +34,8 @@
|
|||
// watch out for ";" -- it's important!
|
||||
|
||||
options {
|
||||
glue-from-auth true;
|
||||
glue-from-cache false;
|
||||
additional-from-auth true;
|
||||
additional-from-cache false;
|
||||
|
||||
version "my version string";
|
||||
random-device "/dev/random";
|
||||
|
|
@ -151,6 +151,13 @@ options {
|
|||
max-transfer-idle-in 100;
|
||||
max-transfer-idle-out 11;
|
||||
|
||||
max-retry-time 1234;
|
||||
min-retry-time 1111;
|
||||
max-refresh-time 888;
|
||||
min-refresh-time 777;
|
||||
|
||||
max-names 666666;
|
||||
|
||||
max-ncache-ttl 333;
|
||||
min-roots 15;
|
||||
serial-queries 34;
|
||||
|
|
@ -265,8 +272,8 @@ view "test-view" in {
|
|||
sig-validity-interval 45;
|
||||
max-cache-size 100000;
|
||||
allow-query { 10.0.0.30;};
|
||||
glue-from-cache false;
|
||||
glue-from-auth no;
|
||||
additional-from-cache false;
|
||||
additional-from-auth no;
|
||||
match-clients { 10.0.0.1 ; };
|
||||
check-names master warn;
|
||||
check-names slave ignore;
|
||||
|
|
@ -291,6 +298,12 @@ view "test-view" in {
|
|||
max-ncache-ttl 333;
|
||||
max-cache-ttl 777;
|
||||
transfer-format many-answers;
|
||||
max-retry-time 7;
|
||||
min-retry-time 4;
|
||||
max-refresh-time 999;
|
||||
min-refresh-time 111;
|
||||
|
||||
max-names 12;
|
||||
|
||||
zone "view-zone.com" {
|
||||
type master;
|
||||
|
|
@ -321,6 +334,12 @@ zone "stub.demo.zone" {
|
|||
allow-update { none; };
|
||||
allow-transfer { any; };
|
||||
allow-query { any; };
|
||||
|
||||
max-retry-time 10;
|
||||
min-retry-time 11;
|
||||
max-refresh-time 12;
|
||||
min-refresh-time 13;
|
||||
|
||||
max-transfer-time-in 120; // if not set, global option is used.
|
||||
pubkey 257 255 1 "a useless key";
|
||||
pubkey 257 255 1 "another useless key";
|
||||
|
|
@ -348,6 +367,13 @@ zone "disabled-zone.com" {
|
|||
|
||||
# Will make zone configurer skip this one.
|
||||
enable-zone false;
|
||||
|
||||
max-retry-time 100;
|
||||
min-retry-time 110;
|
||||
max-refresh-time 120;
|
||||
min-refresh-time 130;
|
||||
|
||||
max-names 140;
|
||||
};
|
||||
|
||||
zone "non-default-acl.demo.zone" {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: confctx.c,v 1.79 2000/08/01 01:23:19 tale Exp $ */
|
||||
/* $Id: confctx.c,v 1.80 2000/08/02 20:44:19 brister Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -32,22 +32,46 @@
|
|||
#define SETBOOL(FUNC, FIELD) SETBYTYPE(isc_boolean_t, FUNC, FIELD)
|
||||
#define GETBOOL(FUNC, FIELD) GETBYTYPE(isc_boolean_t, FUNC, FIELD)
|
||||
#define UNSETBOOL(FUNC, FIELD) UNSETBYTYPE(isc_boolean_t, FUNC, FIELD)
|
||||
#define BOOL_FUNCS(FUNC, FIELD) \
|
||||
SETBOOL(FUNC, FIELD) \
|
||||
GETBOOL(FUNC, FIELD) \
|
||||
UNSETBOOL(FUNC, FIELD)
|
||||
|
||||
|
||||
#define SETNOTIFYTYPE(FUNC, FIELD) SETBYTYPE(dns_notifytype_t, FUNC, FIELD)
|
||||
#define GETNOTIFYTYPE(FUNC, FIELD) GETBYTYPE(dns_notifytype_t, FUNC, FIELD)
|
||||
#define UNSETNOTIFYTYPE(FUNC, FIELD) UNSETBYTYPE(dns_notifytype_t, FUNC, FIELD)
|
||||
#define NOTIFYTYPE_FUNCS(FUNC, FIELD) \
|
||||
SETNOTIFYTYPE(FUNC, FIELD) \
|
||||
GETNOTIFYTYPE(FUNC, FIELD) \
|
||||
UNSETNOTIFYTYPE(FUNC, FIELD)
|
||||
|
||||
|
||||
#define SETINT32(FUNC, FIELD) SETBYTYPE(isc_int32_t, FUNC, FIELD)
|
||||
#define GETINT32(FUNC, FIELD) GETBYTYPE(isc_int32_t, FUNC, FIELD)
|
||||
#define UNSETINT32(FUNC, FIELD) UNSETBYTYPE(isc_int32_t, FUNC, FIELD)
|
||||
#define INT32_FUNCS(FUNC, FIELD) \
|
||||
SETINT32(FUNC, FIELD) \
|
||||
GETINT32(FUNC, FIELD) \
|
||||
UNSETINT32(FUNC, FIELD)
|
||||
|
||||
|
||||
#define SETUINT32(FUNC, FIELD) SETBYTYPE(isc_uint32_t, FUNC, FIELD)
|
||||
#define GETUINT32(FUNC, FIELD) GETBYTYPE(isc_uint32_t, FUNC, FIELD)
|
||||
#define UNSETUINT32(FUNC, FIELD) UNSETBYTYPE(isc_uint32_t, FUNC, FIELD)
|
||||
#define UINT32_FUNCS(FUNC, FIELD) \
|
||||
SETUINT32(FUNC, FIELD) \
|
||||
GETUINT32(FUNC, FIELD) \
|
||||
UNSETUINT32(FUNC, FIELD)
|
||||
|
||||
|
||||
#define SETSOCKADDR(FUNC, FIELD) SETBYTYPE(isc_sockaddr_t, FUNC, FIELD)
|
||||
#define GETSOCKADDR(FUNC, FIELD) GETBYTYPE(isc_sockaddr_t, FUNC, FIELD)
|
||||
#define UNSETSOCKADDR(FUNC, FIELD) UNSETBYTYPE(isc_sockaddr_t, FUNC, FIELD)
|
||||
#define SOCKADDR_FUNCS(FUNC, FIELD) \
|
||||
SETSOCKADDR(FUNC, FIELD) \
|
||||
GETSOCKADDR(FUNC, FIELD) \
|
||||
UNSETSOCKADDR(FUNC, FIELD)
|
||||
|
||||
#ifdef PVT_CONCAT
|
||||
#undef PVT_CONCAT
|
||||
|
|
@ -141,6 +165,10 @@ PVT_CONCAT(dns_c_ctx_unset, FUNCNAME)(dns_c_ctx_t *cfg) \
|
|||
} \
|
||||
}
|
||||
|
||||
#define BYTYPE_FUNCS(TYPE, FUNC, FIELD) \
|
||||
SETBYTYPE(TYPE, FUNC, FIELD) \
|
||||
GETBYTYPE(TYPE, FUNC, FIELD) \
|
||||
UNSETBYTYPE(TYPE, FUNC, FIELD)
|
||||
|
||||
|
||||
#define SETSTRING(FUNC, FIELD) \
|
||||
|
|
@ -202,6 +230,86 @@ PVT_CONCAT(dns_c_ctx_unset, FUNC)(dns_c_ctx_t *cfg) \
|
|||
\
|
||||
return (ISC_R_SUCCESS); \
|
||||
}
|
||||
#define STRING_FUNCS(FUNC, FIELD) \
|
||||
SETSTRING(FUNC, FIELD) \
|
||||
GETSTRING(FUNC, FIELD) \
|
||||
UNSETSTRING(FUNC, FIELD)
|
||||
|
||||
|
||||
|
||||
|
||||
#define SETIPMLIST(FUNCNAME, FIELD) \
|
||||
isc_result_t \
|
||||
PVT_CONCAT(dns_c_ctx_set, FUNCNAME)(dns_c_ctx_t *cfg, \
|
||||
dns_c_ipmatchlist_t *newval) \
|
||||
{ \
|
||||
isc_result_t res; \
|
||||
\
|
||||
REQUIRE(DNS_C_CONFCTX_VALID(cfg)); \
|
||||
\
|
||||
res = make_options(cfg); \
|
||||
if (res != ISC_R_SUCCESS) { \
|
||||
return (res); \
|
||||
} \
|
||||
\
|
||||
REQUIRE(newval != NULL); \
|
||||
\
|
||||
if (cfg->options->FIELD != NULL) { \
|
||||
dns_c_ipmatchlist_detach(&cfg->options->FIELD); \
|
||||
} \
|
||||
\
|
||||
dns_c_ipmatchlist_attach(newval, &cfg->options->FIELD); \
|
||||
return (ISC_R_SUCCESS); \
|
||||
} \
|
||||
|
||||
|
||||
|
||||
#define GETIPMLIST(FUNC, FIELD) \
|
||||
isc_result_t \
|
||||
PVT_CONCAT(dns_c_ctx_get, FUNC)(dns_c_ctx_t *cfg, \
|
||||
dns_c_ipmatchlist_t **retval) \
|
||||
{ \
|
||||
REQUIRE(DNS_C_CONFCTX_VALID(cfg)); \
|
||||
\
|
||||
if (cfg->options == NULL) { \
|
||||
return (ISC_R_NOTFOUND); \
|
||||
} \
|
||||
\
|
||||
REQUIRE(retval != NULL); \
|
||||
\
|
||||
if (cfg->options->FIELD != NULL) { \
|
||||
dns_c_ipmatchlist_attach(cfg->options->FIELD, retval); \
|
||||
return (ISC_R_SUCCESS); \
|
||||
} else { \
|
||||
return (ISC_R_NOTFOUND); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#define UNSETIPMLIST(FUNC, FIELD) \
|
||||
isc_result_t \
|
||||
PVT_CONCAT(dns_c_ctx_unset, FUNC)(dns_c_ctx_t *cfg) \
|
||||
{ \
|
||||
REQUIRE(DNS_C_CONFCTX_VALID(cfg)); \
|
||||
\
|
||||
if (cfg->options == NULL) { \
|
||||
return (ISC_R_NOTFOUND); \
|
||||
} \
|
||||
\
|
||||
dns_c_ipmatchlist_detach(&cfg->options->FIELD); \
|
||||
\
|
||||
return (ISC_R_SUCCESS); \
|
||||
}
|
||||
|
||||
#define IPMLIST_FUNCS(FUNC, FIELD) \
|
||||
SETIPMLIST(FUNC, FIELD) \
|
||||
GETIPMLIST(FUNC, FIELD) \
|
||||
UNSETIPMLIST(FUNC, FIELD) \
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static isc_result_t cfg_set_iplist(dns_c_options_t *options,
|
||||
|
|
@ -952,6 +1060,16 @@ dns_c_ctx_optionsprint(FILE *fp, int indent, dns_c_options_t *options)
|
|||
PRINT_INTEGER(min_roots, "min-roots");
|
||||
PRINT_INTEGER(serial_queries, "serial-queries");
|
||||
PRINT_INTEGER(sig_valid_interval, "sig-validity-interval");
|
||||
|
||||
PRINT_INTEGER(min_retry_time, "min-retry-time");
|
||||
PRINT_INTEGER(max_retry_time, "max-retry-time");
|
||||
PRINT_INTEGER(min_refresh_time, "min-refresh-time");
|
||||
PRINT_INTEGER(max_refresh_time, "max-refresh-time");
|
||||
|
||||
#ifndef NOMINUM_PUBLIC
|
||||
PRINT_INTEGER(max_names, "max-names");
|
||||
#endif
|
||||
|
||||
PRINT_AS_SIZE_CLAUSE(max_cache_size, "max-cache-size");
|
||||
|
||||
PRINT_AS_SIZE_CLAUSE(data_size, "datasize");
|
||||
|
|
@ -1481,6 +1599,15 @@ dns_c_ctx_optionsnew(isc_mem_t *mem, dns_c_options_t **options)
|
|||
opts->max_ncache_ttl = NULL;
|
||||
opts->max_cache_ttl = NULL;
|
||||
|
||||
opts->min_retry_time = NULL;
|
||||
opts->max_retry_time = NULL;
|
||||
opts->min_refresh_time = NULL;
|
||||
opts->max_refresh_time = NULL;
|
||||
|
||||
#ifndef NOMINUM_PUBLIC
|
||||
opts->max_names = NULL;
|
||||
#endif
|
||||
|
||||
opts->expert_mode = NULL;
|
||||
opts->fake_iquery = NULL;
|
||||
opts->recursion = NULL;
|
||||
|
|
@ -1640,6 +1767,15 @@ dns_c_ctx_optionsdelete(dns_c_options_t **opts)
|
|||
FREEFIELD(max_ncache_ttl);
|
||||
FREEFIELD(max_cache_ttl);
|
||||
|
||||
FREEFIELD(min_retry_time);
|
||||
FREEFIELD(max_retry_time);
|
||||
FREEFIELD(min_refresh_time);
|
||||
FREEFIELD(max_refresh_time);
|
||||
|
||||
#ifndef NOMINUM_PUBLIC
|
||||
FREEFIELD(max_names);
|
||||
#endif
|
||||
|
||||
FREEFIELD(transfer_source);
|
||||
FREEFIELD(transfer_source_v6);
|
||||
FREEFIELD(query_source);
|
||||
|
|
@ -1708,318 +1844,85 @@ dns_c_ctx_optionsdelete(dns_c_options_t **opts)
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
SETSTRING(directory, directory)
|
||||
GETSTRING(directory, directory)
|
||||
UNSETSTRING(directory, directory)
|
||||
|
||||
|
||||
SETSTRING(version, version)
|
||||
GETSTRING(version, version)
|
||||
UNSETSTRING(version, version)
|
||||
|
||||
|
||||
SETSTRING(dumpfilename, dump_filename)
|
||||
GETSTRING(dumpfilename, dump_filename)
|
||||
UNSETSTRING(dumpfilename, dump_filename)
|
||||
|
||||
|
||||
SETSTRING(pidfilename, pid_filename)
|
||||
GETSTRING(pidfilename, pid_filename)
|
||||
UNSETSTRING(pidfilename, pid_filename)
|
||||
|
||||
|
||||
SETSTRING(statsfilename, stats_filename)
|
||||
GETSTRING(statsfilename, stats_filename)
|
||||
UNSETSTRING(statsfilename, stats_filename)
|
||||
|
||||
|
||||
SETSTRING(memstatsfilename, memstats_filename)
|
||||
GETSTRING(memstatsfilename, memstats_filename)
|
||||
UNSETSTRING(memstatsfilename, memstats_filename)
|
||||
|
||||
|
||||
SETSTRING(namedxfer, named_xfer)
|
||||
GETSTRING(namedxfer, named_xfer)
|
||||
UNSETSTRING(namedxfer, named_xfer)
|
||||
|
||||
|
||||
SETSTRING(randomdevice, random_device)
|
||||
GETSTRING(randomdevice, random_device)
|
||||
UNSETSTRING(randomdevice, random_device)
|
||||
|
||||
|
||||
SETSTRING(randomseedfile, random_seed_file)
|
||||
GETSTRING(randomseedfile, random_seed_file)
|
||||
UNSETSTRING(randomseedfile, random_seed_file)
|
||||
|
||||
|
||||
GETBYTYPE(in_port_t, port, port)
|
||||
SETBYTYPE(in_port_t, port, port)
|
||||
UNSETBYTYPE(in_port_t, port, port)
|
||||
|
||||
|
||||
GETUINT32(transfersin, transfers_in)
|
||||
SETUINT32(transfersin, transfers_in)
|
||||
UNSETUINT32(transfersin, transfers_in)
|
||||
|
||||
|
||||
GETUINT32(transfersperns, transfers_per_ns)
|
||||
SETUINT32(transfersperns, transfers_per_ns)
|
||||
UNSETUINT32(transfersperns, transfers_per_ns)
|
||||
|
||||
|
||||
GETUINT32(transfersout, transfers_out)
|
||||
SETUINT32(transfersout, transfers_out)
|
||||
UNSETUINT32(transfersout, transfers_out)
|
||||
|
||||
|
||||
GETUINT32(maxlogsizeixfr, max_log_size_ixfr)
|
||||
SETUINT32(maxlogsizeixfr, max_log_size_ixfr)
|
||||
UNSETUINT32(maxlogsizeixfr, max_log_size_ixfr)
|
||||
|
||||
|
||||
GETUINT32(cleaninterval, clean_interval)
|
||||
SETUINT32(cleaninterval, clean_interval)
|
||||
UNSETUINT32(cleaninterval, clean_interval)
|
||||
|
||||
|
||||
GETUINT32(interfaceinterval, interface_interval)
|
||||
SETUINT32(interfaceinterval, interface_interval)
|
||||
UNSETUINT32(interfaceinterval, interface_interval)
|
||||
|
||||
|
||||
GETUINT32(statsinterval, stats_interval)
|
||||
SETUINT32(statsinterval, stats_interval)
|
||||
UNSETUINT32(statsinterval, stats_interval)
|
||||
|
||||
|
||||
GETUINT32(heartbeatinterval, heartbeat_interval)
|
||||
SETUINT32(heartbeatinterval, heartbeat_interval)
|
||||
UNSETUINT32(heartbeatinterval, heartbeat_interval)
|
||||
|
||||
|
||||
GETUINT32(maxtransfertimein, max_transfer_time_in)
|
||||
SETUINT32(maxtransfertimein, max_transfer_time_in)
|
||||
UNSETUINT32(maxtransfertimein, max_transfer_time_in)
|
||||
|
||||
|
||||
GETUINT32(maxtransfertimeout, max_transfer_time_out)
|
||||
SETUINT32(maxtransfertimeout, max_transfer_time_out)
|
||||
UNSETUINT32(maxtransfertimeout, max_transfer_time_out)
|
||||
|
||||
|
||||
GETUINT32(maxtransferidlein, max_transfer_idle_in)
|
||||
SETUINT32(maxtransferidlein, max_transfer_idle_in)
|
||||
UNSETUINT32(maxtransferidlein, max_transfer_idle_in)
|
||||
|
||||
|
||||
GETUINT32(maxtransferidleout, max_transfer_idle_out)
|
||||
SETUINT32(maxtransferidleout, max_transfer_idle_out)
|
||||
UNSETUINT32(maxtransferidleout, max_transfer_idle_out)
|
||||
|
||||
|
||||
GETUINT32(lamettl, lamettl)
|
||||
SETUINT32(lamettl, lamettl)
|
||||
UNSETUINT32(lamettl, lamettl)
|
||||
|
||||
|
||||
GETUINT32(tcpclients, tcp_clients)
|
||||
SETUINT32(tcpclients, tcp_clients)
|
||||
UNSETUINT32(tcpclients, tcp_clients)
|
||||
|
||||
|
||||
GETUINT32(recursiveclients, recursive_clients)
|
||||
SETUINT32(recursiveclients, recursive_clients)
|
||||
UNSETUINT32(recursiveclients, recursive_clients)
|
||||
|
||||
|
||||
GETUINT32(minroots, min_roots)
|
||||
SETUINT32(minroots, min_roots)
|
||||
UNSETUINT32(minroots, min_roots)
|
||||
|
||||
|
||||
GETUINT32(serialqueries, serial_queries)
|
||||
SETUINT32(serialqueries, serial_queries)
|
||||
UNSETUINT32(serialqueries, serial_queries)
|
||||
|
||||
|
||||
GETUINT32(sigvalidityinterval, sig_valid_interval)
|
||||
SETUINT32(sigvalidityinterval, sig_valid_interval)
|
||||
UNSETUINT32(sigvalidityinterval, sig_valid_interval)
|
||||
|
||||
|
||||
GETUINT32(datasize, data_size)
|
||||
SETUINT32(datasize, data_size)
|
||||
UNSETUINT32(datasize, data_size)
|
||||
|
||||
|
||||
GETUINT32(stacksize, stack_size)
|
||||
SETUINT32(stacksize, stack_size)
|
||||
UNSETUINT32(stacksize, stack_size)
|
||||
|
||||
|
||||
GETUINT32(coresize, core_size)
|
||||
SETUINT32(coresize, core_size)
|
||||
UNSETUINT32(coresize, core_size)
|
||||
|
||||
|
||||
GETUINT32(files, files)
|
||||
SETUINT32(files, files)
|
||||
UNSETUINT32(files, files)
|
||||
|
||||
|
||||
GETUINT32(maxcachesize, max_cache_size)
|
||||
SETUINT32(maxcachesize, max_cache_size)
|
||||
UNSETUINT32(maxcachesize, max_cache_size)
|
||||
|
||||
|
||||
GETUINT32(maxncachettl, max_ncache_ttl)
|
||||
SETUINT32(maxncachettl, max_ncache_ttl)
|
||||
UNSETUINT32(maxncachettl, max_ncache_ttl)
|
||||
|
||||
|
||||
GETUINT32(maxcachettl, max_cache_ttl)
|
||||
SETUINT32(maxcachettl, max_cache_ttl)
|
||||
UNSETUINT32(maxcachettl, max_cache_ttl)
|
||||
|
||||
|
||||
GETBOOL(expertmode, expert_mode)
|
||||
SETBOOL(expertmode, expert_mode)
|
||||
UNSETBOOL(expertmode, expert_mode)
|
||||
|
||||
|
||||
GETBOOL(fakeiquery, fake_iquery)
|
||||
SETBOOL(fakeiquery, fake_iquery)
|
||||
UNSETBOOL(fakeiquery, fake_iquery)
|
||||
|
||||
|
||||
GETBOOL(recursion, recursion)
|
||||
SETBOOL(recursion, recursion)
|
||||
UNSETBOOL(recursion, recursion)
|
||||
|
||||
|
||||
GETBOOL(fetchglue, fetch_glue)
|
||||
SETBOOL(fetchglue, fetch_glue)
|
||||
UNSETBOOL(fetchglue, fetch_glue)
|
||||
|
||||
|
||||
GETNOTIFYTYPE(notify, notify)
|
||||
SETNOTIFYTYPE(notify, notify)
|
||||
UNSETNOTIFYTYPE(notify, notify)
|
||||
|
||||
|
||||
GETBOOL(hoststatistics, host_statistics)
|
||||
SETBOOL(hoststatistics, host_statistics)
|
||||
UNSETBOOL(hoststatistics, host_statistics)
|
||||
|
||||
|
||||
GETBOOL(dealloconexit, dealloc_on_exit)
|
||||
SETBOOL(dealloconexit, dealloc_on_exit)
|
||||
UNSETBOOL(dealloconexit, dealloc_on_exit)
|
||||
|
||||
|
||||
GETBOOL(useixfr, use_ixfr)
|
||||
SETBOOL(useixfr, use_ixfr)
|
||||
UNSETBOOL(useixfr, use_ixfr)
|
||||
|
||||
|
||||
GETBOOL(maintainixfrbase, maintain_ixfr_base)
|
||||
SETBOOL(maintainixfrbase, maintain_ixfr_base)
|
||||
UNSETBOOL(maintainixfrbase, maintain_ixfr_base)
|
||||
|
||||
|
||||
GETBOOL(hasoldclients, has_old_clients)
|
||||
SETBOOL(hasoldclients, has_old_clients)
|
||||
UNSETBOOL(hasoldclients, has_old_clients)
|
||||
|
||||
|
||||
GETBOOL(authnxdomain, auth_nx_domain)
|
||||
SETBOOL(authnxdomain, auth_nx_domain)
|
||||
UNSETBOOL(authnxdomain, auth_nx_domain)
|
||||
|
||||
|
||||
GETBOOL(multiplecnames, multiple_cnames)
|
||||
SETBOOL(multiplecnames, multiple_cnames)
|
||||
UNSETBOOL(multiplecnames, multiple_cnames)
|
||||
|
||||
|
||||
GETBOOL(useidpool, use_id_pool)
|
||||
SETBOOL(useidpool, use_id_pool)
|
||||
UNSETBOOL(useidpool, use_id_pool)
|
||||
|
||||
|
||||
GETBOOL(dialup, dialup)
|
||||
SETBOOL(dialup, dialup)
|
||||
UNSETBOOL(dialup, dialup)
|
||||
|
||||
|
||||
GETBOOL(rfc2308type1, rfc2308_type1)
|
||||
SETBOOL(rfc2308type1, rfc2308_type1)
|
||||
UNSETBOOL(rfc2308type1, rfc2308_type1)
|
||||
|
||||
|
||||
GETBOOL(requestixfr, request_ixfr)
|
||||
SETBOOL(requestixfr, request_ixfr)
|
||||
UNSETBOOL(requestixfr, request_ixfr)
|
||||
|
||||
|
||||
GETBOOL(provideixfr, provide_ixfr)
|
||||
SETBOOL(provideixfr, provide_ixfr)
|
||||
UNSETBOOL(provideixfr, provide_ixfr)
|
||||
|
||||
|
||||
GETBOOL(treatcrasspace, treat_cr_as_space)
|
||||
SETBOOL(treatcrasspace, treat_cr_as_space)
|
||||
UNSETBOOL(treatcrasspace, treat_cr_as_space)
|
||||
|
||||
|
||||
GETBOOL(additionalfromauth, additional_from_auth)
|
||||
SETBOOL(additionalfromauth, additional_from_auth)
|
||||
UNSETBOOL(additionalfromauth, additional_from_auth)
|
||||
|
||||
|
||||
GETBOOL(additionalfromcache, additional_from_cache)
|
||||
SETBOOL(additionalfromcache, additional_from_cache)
|
||||
UNSETBOOL(additionalfromcache, additional_from_cache)
|
||||
|
||||
|
||||
GETSOCKADDR(transfersource, transfer_source)
|
||||
SETSOCKADDR(transfersource, transfer_source)
|
||||
UNSETSOCKADDR(transfersource, transfer_source)
|
||||
|
||||
|
||||
GETSOCKADDR(transfersourcev6, transfer_source_v6)
|
||||
SETSOCKADDR(transfersourcev6, transfer_source_v6)
|
||||
UNSETSOCKADDR(transfersourcev6, transfer_source_v6)
|
||||
|
||||
|
||||
GETSOCKADDR(querysource, query_source)
|
||||
SETSOCKADDR(querysource, query_source)
|
||||
UNSETSOCKADDR(querysource, query_source)
|
||||
|
||||
|
||||
GETSOCKADDR(querysourcev6, query_source_v6)
|
||||
SETSOCKADDR(querysourcev6, query_source_v6)
|
||||
UNSETSOCKADDR(querysourcev6, query_source_v6)
|
||||
|
||||
|
||||
GETBYTYPE(dns_c_forw_t, forward, forward)
|
||||
SETBYTYPE(dns_c_forw_t, forward, forward)
|
||||
UNSETBYTYPE(dns_c_forw_t, forward, forward)
|
||||
|
||||
|
||||
GETBYTYPE(dns_transfer_format_t, transferformat, transfer_format)
|
||||
SETBYTYPE(dns_transfer_format_t, transferformat, transfer_format)
|
||||
UNSETBYTYPE(dns_transfer_format_t, transferformat, transfer_format)
|
||||
|
||||
|
||||
GETBYTYPE(dns_c_addata_t, additionaldata, additional_data)
|
||||
SETBYTYPE(dns_c_addata_t, additionaldata, additional_data)
|
||||
UNSETBYTYPE(dns_c_addata_t, additionaldata, additional_data)
|
||||
|
||||
|
||||
STRING_FUNCS(directory, directory)
|
||||
STRING_FUNCS(version, version)
|
||||
STRING_FUNCS(dumpfilename, dump_filename)
|
||||
STRING_FUNCS(pidfilename, pid_filename)
|
||||
STRING_FUNCS(statsfilename, stats_filename)
|
||||
STRING_FUNCS(memstatsfilename, memstats_filename)
|
||||
STRING_FUNCS(namedxfer, named_xfer)
|
||||
STRING_FUNCS(randomdevice, random_device)
|
||||
STRING_FUNCS(randomseedfile, random_seed_file)
|
||||
|
||||
BYTYPE_FUNCS(in_port_t, port, port)
|
||||
|
||||
UINT32_FUNCS(transfersin, transfers_in)
|
||||
UINT32_FUNCS(transfersperns, transfers_per_ns)
|
||||
UINT32_FUNCS(transfersout, transfers_out)
|
||||
UINT32_FUNCS(maxlogsizeixfr, max_log_size_ixfr)
|
||||
UINT32_FUNCS(cleaninterval, clean_interval)
|
||||
UINT32_FUNCS(interfaceinterval, interface_interval)
|
||||
UINT32_FUNCS(statsinterval, stats_interval)
|
||||
UINT32_FUNCS(heartbeatinterval, heartbeat_interval)
|
||||
UINT32_FUNCS(maxtransfertimein, max_transfer_time_in)
|
||||
UINT32_FUNCS(maxtransfertimeout, max_transfer_time_out)
|
||||
UINT32_FUNCS(maxtransferidlein, max_transfer_idle_in)
|
||||
UINT32_FUNCS(maxtransferidleout, max_transfer_idle_out)
|
||||
UINT32_FUNCS(lamettl, lamettl)
|
||||
UINT32_FUNCS(tcpclients, tcp_clients)
|
||||
UINT32_FUNCS(recursiveclients, recursive_clients)
|
||||
UINT32_FUNCS(minroots, min_roots)
|
||||
UINT32_FUNCS(serialqueries, serial_queries)
|
||||
UINT32_FUNCS(sigvalidityinterval, sig_valid_interval)
|
||||
UINT32_FUNCS(datasize, data_size)
|
||||
UINT32_FUNCS(stacksize, stack_size)
|
||||
UINT32_FUNCS(coresize, core_size)
|
||||
UINT32_FUNCS(files, files)
|
||||
UINT32_FUNCS(maxcachesize, max_cache_size)
|
||||
UINT32_FUNCS(maxncachettl, max_ncache_ttl)
|
||||
UINT32_FUNCS(maxcachettl, max_cache_ttl)
|
||||
|
||||
UINT32_FUNCS(minretrytime, min_retry_time)
|
||||
UINT32_FUNCS(maxretrytime, max_retry_time)
|
||||
UINT32_FUNCS(minrefreshtime, min_refresh_time)
|
||||
UINT32_FUNCS(maxrefreshtime, max_refresh_time)
|
||||
|
||||
#ifndef NOMINUM_PUBLIC
|
||||
UINT32_FUNCS(maxnames, max_names)
|
||||
#endif
|
||||
|
||||
BOOL_FUNCS(expertmode, expert_mode)
|
||||
BOOL_FUNCS(fakeiquery, fake_iquery)
|
||||
BOOL_FUNCS(recursion, recursion)
|
||||
BOOL_FUNCS(fetchglue, fetch_glue)
|
||||
|
||||
NOTIFYTYPE_FUNCS(notify, notify)
|
||||
|
||||
BOOL_FUNCS(hoststatistics, host_statistics)
|
||||
BOOL_FUNCS(dealloconexit, dealloc_on_exit)
|
||||
BOOL_FUNCS(useixfr, use_ixfr)
|
||||
BOOL_FUNCS(maintainixfrbase, maintain_ixfr_base)
|
||||
BOOL_FUNCS(hasoldclients, has_old_clients)
|
||||
BOOL_FUNCS(authnxdomain, auth_nx_domain)
|
||||
BOOL_FUNCS(multiplecnames, multiple_cnames)
|
||||
BOOL_FUNCS(useidpool, use_id_pool)
|
||||
BOOL_FUNCS(dialup, dialup)
|
||||
BOOL_FUNCS(rfc2308type1, rfc2308_type1)
|
||||
BOOL_FUNCS(requestixfr, request_ixfr)
|
||||
BOOL_FUNCS(provideixfr, provide_ixfr)
|
||||
BOOL_FUNCS(treatcrasspace, treat_cr_as_space)
|
||||
BOOL_FUNCS(additionalfromauth, additional_from_auth)
|
||||
BOOL_FUNCS(additionalfromcache, additional_from_cache)
|
||||
|
||||
SOCKADDR_FUNCS(transfersource, transfer_source)
|
||||
SOCKADDR_FUNCS(transfersourcev6, transfer_source_v6)
|
||||
SOCKADDR_FUNCS(querysource, query_source)
|
||||
SOCKADDR_FUNCS(querysourcev6, query_source_v6)
|
||||
|
||||
BYTYPE_FUNCS(dns_c_forw_t, forward, forward)
|
||||
BYTYPE_FUNCS(dns_transfer_format_t, transferformat, transfer_format)
|
||||
BYTYPE_FUNCS(dns_c_addata_t, additionaldata, additional_data)
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -2192,109 +2095,13 @@ dns_c_ctx_unsetchecknames(dns_c_ctx_t *cfg,
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#define SETIPMLIST(FUNCNAME, FIELD) \
|
||||
isc_result_t \
|
||||
PVT_CONCAT(dns_c_ctx_set, FUNCNAME)(dns_c_ctx_t *cfg, \
|
||||
dns_c_ipmatchlist_t *newval) \
|
||||
{ \
|
||||
isc_result_t res; \
|
||||
\
|
||||
REQUIRE(DNS_C_CONFCTX_VALID(cfg)); \
|
||||
\
|
||||
res = make_options(cfg); \
|
||||
if (res != ISC_R_SUCCESS) { \
|
||||
return (res); \
|
||||
} \
|
||||
\
|
||||
REQUIRE(newval != NULL); \
|
||||
\
|
||||
if (cfg->options->FIELD != NULL) { \
|
||||
dns_c_ipmatchlist_detach(&cfg->options->FIELD); \
|
||||
} \
|
||||
\
|
||||
dns_c_ipmatchlist_attach(newval, &cfg->options->FIELD); \
|
||||
return (ISC_R_SUCCESS); \
|
||||
} \
|
||||
|
||||
|
||||
|
||||
#define GETIPMLIST(FUNC, FIELD) \
|
||||
isc_result_t \
|
||||
PVT_CONCAT(dns_c_ctx_get, FUNC)(dns_c_ctx_t *cfg, \
|
||||
dns_c_ipmatchlist_t **retval) \
|
||||
{ \
|
||||
REQUIRE(DNS_C_CONFCTX_VALID(cfg)); \
|
||||
\
|
||||
if (cfg->options == NULL) { \
|
||||
return (ISC_R_NOTFOUND); \
|
||||
} \
|
||||
\
|
||||
REQUIRE(retval != NULL); \
|
||||
\
|
||||
if (cfg->options->FIELD != NULL) { \
|
||||
dns_c_ipmatchlist_attach(cfg->options->FIELD, retval); \
|
||||
return (ISC_R_SUCCESS); \
|
||||
} else { \
|
||||
return (ISC_R_NOTFOUND); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#define UNSETIPMLIST(FUNC, FIELD) \
|
||||
isc_result_t \
|
||||
PVT_CONCAT(dns_c_ctx_unset, FUNC)(dns_c_ctx_t *cfg) \
|
||||
{ \
|
||||
REQUIRE(DNS_C_CONFCTX_VALID(cfg)); \
|
||||
\
|
||||
if (cfg->options == NULL) { \
|
||||
return (ISC_R_NOTFOUND); \
|
||||
} \
|
||||
\
|
||||
dns_c_ipmatchlist_detach(&cfg->options->FIELD); \
|
||||
\
|
||||
return (ISC_R_SUCCESS); \
|
||||
}
|
||||
|
||||
|
||||
SETIPMLIST(allowquery, queryacl)
|
||||
UNSETIPMLIST(allowquery, queryacl)
|
||||
GETIPMLIST(allowquery, queryacl)
|
||||
|
||||
|
||||
SETIPMLIST(allowtransfer, transferacl)
|
||||
UNSETIPMLIST(allowtransfer, transferacl)
|
||||
GETIPMLIST(allowtransfer, transferacl)
|
||||
|
||||
|
||||
SETIPMLIST(allowrecursion, recursionacl)
|
||||
UNSETIPMLIST(allowrecursion, recursionacl)
|
||||
GETIPMLIST(allowrecursion, recursionacl)
|
||||
|
||||
|
||||
SETIPMLIST(blackhole, blackhole)
|
||||
UNSETIPMLIST(blackhole, blackhole)
|
||||
GETIPMLIST(blackhole, blackhole)
|
||||
|
||||
|
||||
SETIPMLIST(topology, topology)
|
||||
UNSETIPMLIST(topology, topology)
|
||||
GETIPMLIST(topology, topology)
|
||||
|
||||
|
||||
SETIPMLIST(sortlist, sortlist)
|
||||
UNSETIPMLIST(sortlist, sortlist)
|
||||
GETIPMLIST(sortlist, sortlist)
|
||||
|
||||
|
||||
SETIPMLIST(allowupdateforwarding, allowupdateforwarding)
|
||||
UNSETIPMLIST(allowupdateforwarding, allowupdateforwarding)
|
||||
GETIPMLIST(allowupdateforwarding, allowupdateforwarding)
|
||||
|
||||
IPMLIST_FUNCS(allowquery, queryacl)
|
||||
IPMLIST_FUNCS(allowtransfer, transferacl)
|
||||
IPMLIST_FUNCS(allowrecursion, recursionacl)
|
||||
IPMLIST_FUNCS(blackhole, blackhole)
|
||||
IPMLIST_FUNCS(topology, topology)
|
||||
IPMLIST_FUNCS(sortlist, sortlist)
|
||||
IPMLIST_FUNCS(allowupdateforwarding, allowupdateforwarding)
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: confparser.y.dirty,v 1.6 2000/08/01 01:23:26 tale Exp $ */
|
||||
/* $Id: confparser.y.dirty,v 1.7 2000/08/02 20:44:20 brister Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -310,17 +310,22 @@ static isc_boolean_t int_too_big(isc_uint32_t base, isc_uint32_t mult);
|
|||
%token L_MASTER
|
||||
%token L_MASTERS
|
||||
%token L_MATCH_CLIENTS
|
||||
%token L_MAX_LOG_SIZE_IXFR
|
||||
%token L_MAXIMAL
|
||||
%token L_MAX_CACHE_TTL
|
||||
%token L_MAX_LOG_SIZE_IXFR
|
||||
%token L_MAX_NAMES
|
||||
%token L_MAX_NCACHE_TTL
|
||||
%token L_MAX_REFRESH_TIME
|
||||
%token L_MAX_RETRY_TIME
|
||||
%token L_MAX_TRANSFER_IDLE_IN
|
||||
%token L_MAX_TRANSFER_IDLE_OUT
|
||||
%token L_MAX_TRANSFER_TIME_IN
|
||||
%token L_MAX_TRANSFER_TIME_OUT
|
||||
%token L_MAXIMAL
|
||||
%token L_MEMSTATS_FILE
|
||||
%token L_MIN_ROOTS
|
||||
%token L_MINIMAL
|
||||
%token L_MIN_REFRESH_TIME
|
||||
%token L_MIN_RETRY_TIME
|
||||
%token L_MIN_ROOTS
|
||||
%token L_MULTIPLE_CNAMES
|
||||
%token L_NAME
|
||||
%token L_NAMED_XFER
|
||||
|
|
@ -1405,6 +1410,71 @@ option: /* Empty */
|
|||
YYABORT;
|
||||
}
|
||||
}
|
||||
| L_MAX_RETRY_TIME L_INTEGER
|
||||
{
|
||||
tmpres = dns_c_ctx_setmaxretrytime(currcfg, $2);
|
||||
if (tmpres == ISC_R_EXISTS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"cannot redefine max-retry-time");
|
||||
YYABORT;
|
||||
} else if (tmpres != ISC_R_SUCCESS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"failed to set max-retry-time");
|
||||
YYABORT;
|
||||
}
|
||||
}
|
||||
| L_MIN_RETRY_TIME L_INTEGER
|
||||
{
|
||||
tmpres = dns_c_ctx_setminretrytime(currcfg, $2);
|
||||
if (tmpres == ISC_R_EXISTS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"cannot redefine min-retry-time");
|
||||
YYABORT;
|
||||
} else if (tmpres != ISC_R_SUCCESS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"failed to set min-retry-time");
|
||||
YYABORT;
|
||||
}
|
||||
}
|
||||
| L_MAX_REFRESH_TIME L_INTEGER
|
||||
{
|
||||
tmpres = dns_c_ctx_setmaxrefreshtime(currcfg, $2);
|
||||
if (tmpres == ISC_R_EXISTS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"cannot redefine max-refresh-time");
|
||||
YYABORT;
|
||||
} else if (tmpres != ISC_R_SUCCESS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"failed to set max-refresh-time");
|
||||
YYABORT;
|
||||
}
|
||||
}
|
||||
| L_MIN_REFRESH_TIME L_INTEGER
|
||||
{
|
||||
tmpres = dns_c_ctx_setminrefreshtime(currcfg, $2);
|
||||
if (tmpres == ISC_R_EXISTS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"cannot redefine min-refresh-time");
|
||||
YYABORT;
|
||||
} else if (tmpres != ISC_R_SUCCESS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"failed to set min-refresh-time");
|
||||
YYABORT;
|
||||
}
|
||||
}
|
||||
| L_MAX_NAMES L_INTEGER
|
||||
{
|
||||
tmpres = dns_c_ctx_setmaxnames(currcfg, $2);
|
||||
if (tmpres == ISC_R_EXISTS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"cannot redefine max-names");
|
||||
YYABORT;
|
||||
} else if (tmpres != ISC_R_SUCCESS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"failed to set max-names");
|
||||
YYABORT;
|
||||
}
|
||||
}
|
||||
| L_HEARTBEAT L_INTEGER
|
||||
{
|
||||
if ( int_too_big($2, 60) ) {
|
||||
|
|
@ -3957,6 +4027,91 @@ view_option: L_FORWARD zone_forward_opt
|
|||
YYABORT;
|
||||
}
|
||||
}
|
||||
| L_MAX_RETRY_TIME L_INTEGER
|
||||
{
|
||||
dns_c_view_t *view = dns_c_ctx_getcurrview(currcfg);
|
||||
|
||||
INSIST(view != NULL);
|
||||
|
||||
tmpres = dns_c_view_setmaxretrytime(view, $2);
|
||||
if (tmpres == ISC_R_EXISTS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"cannot redefine view max-retry-time");
|
||||
YYABORT;
|
||||
} else if (tmpres != ISC_R_SUCCESS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"failed to set view max-retry-time");
|
||||
YYABORT;
|
||||
}
|
||||
}
|
||||
| L_MIN_RETRY_TIME L_INTEGER
|
||||
{
|
||||
dns_c_view_t *view = dns_c_ctx_getcurrview(currcfg);
|
||||
|
||||
INSIST(view != NULL);
|
||||
|
||||
tmpres = dns_c_view_setminretrytime(view, $2);
|
||||
if (tmpres == ISC_R_EXISTS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"cannot redefine view min-retry-time");
|
||||
YYABORT;
|
||||
} else if (tmpres != ISC_R_SUCCESS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"failed to set view min-retry-time");
|
||||
YYABORT;
|
||||
}
|
||||
}
|
||||
| L_MAX_REFRESH_TIME L_INTEGER
|
||||
{
|
||||
dns_c_view_t *view = dns_c_ctx_getcurrview(currcfg);
|
||||
|
||||
INSIST(view != NULL);
|
||||
|
||||
tmpres = dns_c_view_setmaxrefreshtime(view, $2);
|
||||
if (tmpres == ISC_R_EXISTS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"cannot redefine view max-refresh-time");
|
||||
YYABORT;
|
||||
} else if (tmpres != ISC_R_SUCCESS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"failed to set view max-refresh-time");
|
||||
YYABORT;
|
||||
}
|
||||
}
|
||||
| L_MIN_REFRESH_TIME L_INTEGER
|
||||
{
|
||||
dns_c_view_t *view = dns_c_ctx_getcurrview(currcfg);
|
||||
|
||||
INSIST(view != NULL);
|
||||
|
||||
tmpres = dns_c_view_setminrefreshtime(view, $2);
|
||||
if (tmpres == ISC_R_EXISTS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"cannot redefine view min-refresh-time");
|
||||
YYABORT;
|
||||
} else if (tmpres != ISC_R_SUCCESS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"failed to set view min-refresh-time");
|
||||
YYABORT;
|
||||
}
|
||||
}
|
||||
| L_MAX_NAMES L_INTEGER
|
||||
{
|
||||
dns_c_view_t *view = dns_c_ctx_getcurrview(currcfg);
|
||||
|
||||
INSIST(view != NULL);
|
||||
|
||||
tmpres = dns_c_view_setmaxnames(view, $2);
|
||||
if (tmpres == ISC_R_EXISTS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"cannot redefine view max-names");
|
||||
YYABORT;
|
||||
} else if (tmpres != ISC_R_SUCCESS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"failed to set view max-names");
|
||||
YYABORT;
|
||||
}
|
||||
}
|
||||
| L_SIG_VALIDITY_INTERVAL L_INTEGER
|
||||
{
|
||||
dns_c_view_t *view = dns_c_ctx_getcurrview(currcfg);
|
||||
|
|
@ -4495,7 +4650,9 @@ zone_non_type_keywords: L_FILE | L_FILE_IXFR | L_IXFR_TMP | L_MASTERS |
|
|||
L_MAX_TRANSFER_TIME_OUT | L_MAX_TRANSFER_IDLE_IN |
|
||||
L_MAX_TRANSFER_IDLE_OUT | L_MAX_LOG_SIZE_IXFR | L_NOTIFY |
|
||||
L_MAINTAIN_IXFR_BASE | L_PUBKEY | L_ALSO_NOTIFY | L_DIALUP |
|
||||
L_ENABLE_ZONE | L_DATABASE | L_PORT
|
||||
L_ENABLE_ZONE | L_DATABASE | L_PORT | L_MIN_RETRY_TIME |
|
||||
L_MAX_RETRY_TIME | L_MIN_REFRESH_TIME | L_MAX_REFRESH_TIME |
|
||||
L_MAX_NAMES
|
||||
;
|
||||
|
||||
|
||||
|
|
@ -4864,6 +5021,91 @@ zone_option: L_FILE L_QSTRING
|
|||
YYABORT;
|
||||
}
|
||||
}
|
||||
| L_MIN_RETRY_TIME L_INTEGER
|
||||
{
|
||||
dns_c_zone_t *zone = dns_c_ctx_getcurrzone(currcfg);
|
||||
|
||||
INSIST(zone != NULL);
|
||||
|
||||
tmpres = dns_c_zone_setminretrytime(zone, $2);
|
||||
if (tmpres == ISC_R_EXISTS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"cannot redefine zone min-retry-time");
|
||||
YYABORT;
|
||||
} else if (tmpres != ISC_R_SUCCESS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"failed to set zone min-retry-time");
|
||||
YYABORT;
|
||||
}
|
||||
}
|
||||
| L_MAX_RETRY_TIME L_INTEGER
|
||||
{
|
||||
dns_c_zone_t *zone = dns_c_ctx_getcurrzone(currcfg);
|
||||
|
||||
INSIST(zone != NULL);
|
||||
|
||||
tmpres = dns_c_zone_setmaxretrytime(zone, $2);
|
||||
if (tmpres == ISC_R_EXISTS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"cannot redefine zone max-retry-time");
|
||||
YYABORT;
|
||||
} else if (tmpres != ISC_R_SUCCESS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"failed to set zone max-retry-time");
|
||||
YYABORT;
|
||||
}
|
||||
}
|
||||
| L_MIN_REFRESH_TIME L_INTEGER
|
||||
{
|
||||
dns_c_zone_t *zone = dns_c_ctx_getcurrzone(currcfg);
|
||||
|
||||
INSIST(zone != NULL);
|
||||
|
||||
tmpres = dns_c_zone_setminrefreshtime(zone, $2);
|
||||
if (tmpres == ISC_R_EXISTS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"cannot redefine zone min-refresh-time");
|
||||
YYABORT;
|
||||
} else if (tmpres != ISC_R_SUCCESS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"failed to set zone min-refresh-time");
|
||||
YYABORT;
|
||||
}
|
||||
}
|
||||
| L_MAX_REFRESH_TIME L_INTEGER
|
||||
{
|
||||
dns_c_zone_t *zone = dns_c_ctx_getcurrzone(currcfg);
|
||||
|
||||
INSIST(zone != NULL);
|
||||
|
||||
tmpres = dns_c_zone_setmaxrefreshtime(zone, $2);
|
||||
if (tmpres == ISC_R_EXISTS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"cannot redefine zone max-refresh-time");
|
||||
YYABORT;
|
||||
} else if (tmpres != ISC_R_SUCCESS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"failed to set zone max-refresh-time");
|
||||
YYABORT;
|
||||
}
|
||||
}
|
||||
| L_MAX_NAMES L_INTEGER
|
||||
{
|
||||
dns_c_zone_t *zone = dns_c_ctx_getcurrzone(currcfg);
|
||||
|
||||
INSIST(zone != NULL);
|
||||
|
||||
tmpres = dns_c_zone_setmaxnames(zone, $2);
|
||||
if (tmpres == ISC_R_EXISTS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"cannot redefine zone max-names");
|
||||
YYABORT;
|
||||
} else if (tmpres != ISC_R_SUCCESS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"failed to set zone max-names");
|
||||
YYABORT;
|
||||
}
|
||||
}
|
||||
| L_MAX_LOG_SIZE_IXFR L_INTEGER
|
||||
{
|
||||
dns_c_zone_t *zone = dns_c_ctx_getcurrzone(currcfg);
|
||||
|
|
@ -5345,6 +5587,11 @@ static struct token keyword_tokens [] = {
|
|||
{ "max-transfer-idle-out", L_MAX_TRANSFER_IDLE_OUT },
|
||||
{ "max-transfer-time-in", L_MAX_TRANSFER_TIME_IN },
|
||||
{ "max-transfer-time-out", L_MAX_TRANSFER_TIME_OUT },
|
||||
{ "min-retry-time", L_MIN_RETRY_TIME },
|
||||
{ "max-retry-time", L_MAX_RETRY_TIME },
|
||||
{ "min-refresh-time", L_MIN_REFRESH_TIME },
|
||||
{ "max-refresh-time", L_MAX_REFRESH_TIME },
|
||||
{ "max-names", L_MAX_NAMES },
|
||||
{ "maximal", L_MAXIMAL },
|
||||
{ "memstatistics-file", L_MEMSTATS_FILE },
|
||||
{ "min-roots", L_MIN_ROOTS },
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: confview.c,v 1.42 2000/08/01 01:23:30 tale Exp $ */
|
||||
/* $Id: confview.c,v 1.43 2000/08/02 20:44:22 brister Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -42,18 +42,35 @@
|
|||
#define SETBOOL(FUNC, FIELD) SETBYTYPE(isc_boolean_t, FUNC, FIELD)
|
||||
#define GETBOOL(FUNC, FIELD) GETBYTYPE(isc_boolean_t, FUNC, FIELD)
|
||||
#define UNSETBOOL(FUNC, FIELD) UNSETBYTYPE(isc_boolean_t, FUNC, FIELD)
|
||||
#define BOOL_FUNCS(FUNC, FIELD) \
|
||||
SETBOOL(FUNC, FIELD) \
|
||||
GETBOOL(FUNC, FIELD) \
|
||||
UNSETBOOL(FUNC, FIELD)
|
||||
|
||||
|
||||
#define SETNOTIFYTYPE(FUNC, FIELD) SETBYTYPE(dns_notifytype_t, FUNC, FIELD)
|
||||
#define GETNOTIFYTYPE(FUNC, FIELD) GETBYTYPE(dns_notifytype_t, FUNC, FIELD)
|
||||
#define UNSETNOTIFYTYPE(FUNC, FIELD) UNSETBYTYPE(dns_notifytype_t, FUNC, FIELD)
|
||||
#define NOTIFYTYPE_FUNCS(FUNC, FIELD) \
|
||||
SETNOTIFYTYPE(FUNC, FIELD) \
|
||||
GETNOTIFYTYPE(FUNC, FIELD) \
|
||||
UNSETNOTIFYTYPE(FUNC, FIELD)
|
||||
|
||||
#define SETUINT32(FUNC, FIELD) SETBYTYPE(isc_uint32_t, FUNC, FIELD)
|
||||
#define GETUINT32(FUNC, FIELD) GETBYTYPE(isc_uint32_t, FUNC, FIELD)
|
||||
#define UNSETUINT32(FUNC, FIELD) UNSETBYTYPE(isc_uint32_t, FUNC, FIELD)
|
||||
#define UINT32_FUNCS(FUNC, FIELD) \
|
||||
SETUINT32(FUNC, FIELD) \
|
||||
GETUINT32(FUNC, FIELD) \
|
||||
UNSETUINT32(FUNC, FIELD)
|
||||
|
||||
#define SETSOCKADDR(FUNC, FIELD) SETBYTYPE(isc_sockaddr_t, FUNC, FIELD)
|
||||
#define GETSOCKADDR(FUNC, FIELD) GETBYTYPE(isc_sockaddr_t, FUNC, FIELD)
|
||||
#define UNSETSOCKADDR(FUNC, FIELD) UNSETBYTYPE(isc_sockaddr_t, FUNC, FIELD)
|
||||
#define SOCKADDR_FUNCS(FUNC, FIELD) \
|
||||
SETSOCKADDR(FUNC, FIELD) \
|
||||
GETSOCKADDR(FUNC, FIELD) \
|
||||
UNSETSOCKADDR(FUNC, FIELD)
|
||||
|
||||
#ifdef PVT_CONCAT
|
||||
#undef PVT_CONCAT
|
||||
|
|
@ -118,6 +135,12 @@ PVT_CONCAT(dns_c_view_unset, FUNCNAME)(dns_c_view_t *view) { \
|
|||
} \
|
||||
}
|
||||
|
||||
#define BYTYPE_FUNCS(TYPE, FUNC, FIELD) \
|
||||
SETBYTYPE(TYPE, FUNC, FIELD) \
|
||||
GETBYTYPE(TYPE, FUNC, FIELD) \
|
||||
UNSETBYTYPE(TYPE, FUNC, FIELD)
|
||||
|
||||
|
||||
/*
|
||||
** Now SET, GET and UNSET for dns_c_ipmatchlist_t fields
|
||||
*/
|
||||
|
|
@ -172,6 +195,13 @@ PVT_CONCAT(dns_c_view_get, FUNCNAME)(dns_c_view_t *view, \
|
|||
} \
|
||||
}
|
||||
|
||||
|
||||
#define IPMLIST_FUNCS(FUNC, FIELD) \
|
||||
SETIPMLIST(FUNC, FIELD) \
|
||||
GETIPMLIST(FUNC, FIELD) \
|
||||
UNSETIPMLIST(FUNC, FIELD)
|
||||
|
||||
|
||||
isc_result_t
|
||||
dns_c_viewtable_new(isc_mem_t *mem, dns_c_viewtable_t **viewtable) {
|
||||
dns_c_viewtable_t *table;
|
||||
|
|
@ -487,10 +517,19 @@ dns_c_view_new(isc_mem_t *mem, const char *name, dns_rdataclass_t viewclass,
|
|||
view->clean_interval = NULL;
|
||||
view->min_roots = NULL;
|
||||
view->lamettl = NULL;
|
||||
view->max_ncache_ttl = NULL;
|
||||
view->max_cache_ttl = NULL;
|
||||
view->sig_valid_interval = NULL;
|
||||
view->max_cache_size = NULL;
|
||||
view->max_ncache_ttl = NULL;
|
||||
view->max_cache_ttl = NULL;
|
||||
|
||||
view->min_retry_time = NULL;
|
||||
view->max_retry_time = NULL;
|
||||
view->min_refresh_time = NULL;
|
||||
view->max_refresh_time = NULL;
|
||||
|
||||
#ifndef NOMINUM_PUBLIC
|
||||
view->max_names = NULL;
|
||||
#endif
|
||||
|
||||
view->additional_data = NULL;
|
||||
view->transfer_format = NULL;
|
||||
|
|
@ -573,6 +612,19 @@ dns_c_view_print(FILE *fp, int indent, dns_c_view_t *view) {
|
|||
}
|
||||
|
||||
|
||||
#define PRINT_AS_NOTIFYTYPE(FIELD, NAME) \
|
||||
if (view->FIELD != NULL) { \
|
||||
dns_c_printtabs(fp, indent + 1); \
|
||||
fprintf(fp, "%s ", NAME); \
|
||||
if (*view->FIELD == dns_notifytype_yes) \
|
||||
fputs("yes", fp); \
|
||||
else if (*view->FIELD == dns_notifytype_no) \
|
||||
fputs("no", fp); \
|
||||
else \
|
||||
fputs("explicit", fp); \
|
||||
}
|
||||
|
||||
|
||||
#define PRINT_INT32(FIELD, NAME) \
|
||||
if (view->FIELD != NULL) { \
|
||||
dns_c_printtabs(fp, indent + 1); \
|
||||
|
|
@ -660,12 +712,13 @@ dns_c_view_print(FILE *fp, int indent, dns_c_view_t *view) {
|
|||
}
|
||||
|
||||
|
||||
PRINT_AS_NOTIFYTYPE(notify, "notify");
|
||||
|
||||
PRINT_AS_BOOLEAN(auth_nx_domain, "auth-nxdomain");
|
||||
PRINT_AS_BOOLEAN(recursion, "recursion");
|
||||
PRINT_AS_BOOLEAN(provide_ixfr, "provide-ixfr");
|
||||
PRINT_AS_BOOLEAN(request_ixfr, "request-ixfr");
|
||||
PRINT_AS_BOOLEAN(fetch_glue, "fetch-glue");
|
||||
PRINT_AS_BOOLEAN(notify, "notify");
|
||||
PRINT_AS_BOOLEAN(rfc2308_type1, "rfc2308-type1");
|
||||
PRINT_AS_BOOLEAN(additional_from_auth, "additional-from-auth");
|
||||
PRINT_AS_BOOLEAN(additional_from_cache, "additional-from-cache");
|
||||
|
|
@ -687,6 +740,15 @@ dns_c_view_print(FILE *fp, int indent, dns_c_view_t *view) {
|
|||
PRINT_INT32(max_cache_ttl, "max-cache-ttl");
|
||||
PRINT_INT32(sig_valid_interval, "sig-validity-interval");
|
||||
|
||||
PRINT_INT32(min_retry_time, "min-retry-time");
|
||||
PRINT_INT32(max_retry_time, "max-retry-time");
|
||||
PRINT_INT32(min_refresh_time, "min-refresh-time");
|
||||
PRINT_INT32(max_refresh_time, "max-refresh-time");
|
||||
|
||||
#ifndef NOMINUM_PUBLIC
|
||||
PRINT_INT32(max_names, "max-names");
|
||||
#endif
|
||||
|
||||
PRINT_AS_SIZE_CLAUSE(max_cache_size, "max-cache-size");
|
||||
|
||||
if (view->additional_data != NULL) {
|
||||
|
|
@ -824,6 +886,15 @@ dns_c_view_delete(dns_c_view_t **viewptr) {
|
|||
FREEFIELD(sig_valid_interval);
|
||||
FREEFIELD(max_cache_size);
|
||||
|
||||
FREEFIELD(min_retry_time);
|
||||
FREEFIELD(max_retry_time);
|
||||
FREEFIELD(min_refresh_time);
|
||||
FREEFIELD(max_refresh_time);
|
||||
|
||||
#ifndef NOMINUM_PUBLIC
|
||||
FREEFIELD(max_names);
|
||||
#endif
|
||||
|
||||
FREEFIELD(additional_data);
|
||||
FREEFIELD(transfer_format);
|
||||
|
||||
|
|
@ -949,10 +1020,8 @@ dns_c_view_unsetzonelist(dns_c_view_t *view) {
|
|||
*/
|
||||
|
||||
|
||||
SETBYTYPE(dns_c_forw_t, forward, forward)
|
||||
UNSETBYTYPE(dns_c_forw_t, forward, forward)
|
||||
GETBYTYPE(dns_c_forw_t, forward, forward)
|
||||
|
||||
BYTYPE_FUNCS(dns_c_forw_t, forward, forward)
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
|
|
@ -1420,154 +1489,61 @@ dns_c_view_settrustedkeys(dns_c_view_t *view, dns_c_tkeylist_t *newval,
|
|||
**
|
||||
*/
|
||||
|
||||
GETIPMLIST(allowquery, allowquery)
|
||||
SETIPMLIST(allowquery, allowquery)
|
||||
UNSETIPMLIST(allowquery, allowquery)
|
||||
IPMLIST_FUNCS(allowquery, allowquery)
|
||||
IPMLIST_FUNCS(allowupdateforwarding, allowupdateforwarding)
|
||||
IPMLIST_FUNCS(transferacl, transferacl)
|
||||
IPMLIST_FUNCS(recursionacl, recursionacl)
|
||||
IPMLIST_FUNCS(sortlist, sortlist)
|
||||
IPMLIST_FUNCS(topology, topology)
|
||||
IPMLIST_FUNCS(matchclients, matchclients)
|
||||
|
||||
GETIPMLIST(allowupdateforwarding, allowupdateforwarding)
|
||||
SETIPMLIST(allowupdateforwarding, allowupdateforwarding)
|
||||
UNSETIPMLIST(allowupdateforwarding, allowupdateforwarding)
|
||||
BOOL_FUNCS(authnxdomain, auth_nx_domain)
|
||||
BOOL_FUNCS(recursion, recursion)
|
||||
BOOL_FUNCS(provideixfr, provide_ixfr)
|
||||
BOOL_FUNCS(requestixfr, request_ixfr)
|
||||
BOOL_FUNCS(fetchglue, fetch_glue)
|
||||
|
||||
GETIPMLIST(transferacl, transferacl)
|
||||
SETIPMLIST(transferacl, transferacl)
|
||||
UNSETIPMLIST(transferacl, transferacl)
|
||||
NOTIFYTYPE_FUNCS(notify, notify)
|
||||
|
||||
GETIPMLIST(recursionacl, recursionacl)
|
||||
SETIPMLIST(recursionacl, recursionacl)
|
||||
UNSETIPMLIST(recursionacl, recursionacl)
|
||||
BOOL_FUNCS(rfc2308type1, rfc2308_type1)
|
||||
BOOL_FUNCS(additionalfromcache, additional_from_cache)
|
||||
BOOL_FUNCS(additionalfromauth, additional_from_auth)
|
||||
|
||||
GETIPMLIST(sortlist, sortlist)
|
||||
SETIPMLIST(sortlist, sortlist)
|
||||
UNSETIPMLIST(sortlist, sortlist)
|
||||
SOCKADDR_FUNCS(transfersource, transfer_source)
|
||||
SOCKADDR_FUNCS(transfersourcev6, transfer_source_v6)
|
||||
SOCKADDR_FUNCS(querysource, query_source)
|
||||
SOCKADDR_FUNCS(querysourcev6, query_source_v6)
|
||||
|
||||
GETIPMLIST(topology, topology)
|
||||
SETIPMLIST(topology, topology)
|
||||
UNSETIPMLIST(topology, topology)
|
||||
UINT32_FUNCS(maxtransfertimeout, max_transfer_time_out)
|
||||
UINT32_FUNCS(maxtransferidleout, max_transfer_idle_out)
|
||||
UINT32_FUNCS(cleaninterval, clean_interval)
|
||||
UINT32_FUNCS(minroots, min_roots)
|
||||
UINT32_FUNCS(lamettl, lamettl)
|
||||
UINT32_FUNCS(maxncachettl, max_ncache_ttl)
|
||||
UINT32_FUNCS(maxcachettl, max_cache_ttl)
|
||||
UINT32_FUNCS(sigvalidityinterval, sig_valid_interval)
|
||||
UINT32_FUNCS(maxcachesize, max_cache_size)
|
||||
|
||||
GETIPMLIST(matchclients, matchclients)
|
||||
SETIPMLIST(matchclients, matchclients)
|
||||
UNSETIPMLIST(matchclients, matchclients)
|
||||
UINT32_FUNCS(minretrytime, min_retry_time)
|
||||
UINT32_FUNCS(maxretrytime, max_retry_time)
|
||||
UINT32_FUNCS(minrefreshtime, min_refresh_time)
|
||||
UINT32_FUNCS(maxrefreshtime, max_refresh_time)
|
||||
|
||||
#ifndef NOMINUM_PUBLIC
|
||||
UINT32_FUNCS(maxnames, max_names)
|
||||
#endif
|
||||
|
||||
SETBOOL(authnxdomain, auth_nx_domain)
|
||||
GETBOOL(authnxdomain, auth_nx_domain)
|
||||
UNSETBOOL(authnxdomain, auth_nx_domain)
|
||||
|
||||
SETBOOL(recursion, recursion)
|
||||
GETBOOL(recursion, recursion)
|
||||
UNSETBOOL(recursion, recursion)
|
||||
|
||||
SETBOOL(provideixfr, provide_ixfr)
|
||||
GETBOOL(provideixfr, provide_ixfr)
|
||||
UNSETBOOL(provideixfr, provide_ixfr)
|
||||
|
||||
SETBOOL(requestixfr, request_ixfr)
|
||||
GETBOOL(requestixfr, request_ixfr)
|
||||
UNSETBOOL(requestixfr, request_ixfr)
|
||||
|
||||
SETBOOL(fetchglue, fetch_glue)
|
||||
GETBOOL(fetchglue, fetch_glue)
|
||||
UNSETBOOL(fetchglue, fetch_glue)
|
||||
|
||||
GETNOTIFYTYPE(notify, notify)
|
||||
SETNOTIFYTYPE(notify, notify)
|
||||
UNSETNOTIFYTYPE(notify, notify)
|
||||
|
||||
SETBOOL(rfc2308type1, rfc2308_type1)
|
||||
GETBOOL(rfc2308type1, rfc2308_type1)
|
||||
UNSETBOOL(rfc2308type1, rfc2308_type1)
|
||||
|
||||
SETBOOL(additionalfromcache, additional_from_cache)
|
||||
GETBOOL(additionalfromcache, additional_from_cache)
|
||||
UNSETBOOL(additionalfromcache, additional_from_cache)
|
||||
|
||||
SETBOOL(additionalfromauth, additional_from_auth)
|
||||
GETBOOL(additionalfromauth, additional_from_auth)
|
||||
UNSETBOOL(additionalfromauth, additional_from_auth)
|
||||
|
||||
GETSOCKADDR(transfersource, transfer_source)
|
||||
SETSOCKADDR(transfersource, transfer_source)
|
||||
UNSETSOCKADDR(transfersource, transfer_source)
|
||||
|
||||
GETSOCKADDR(transfersourcev6, transfer_source_v6)
|
||||
SETSOCKADDR(transfersourcev6, transfer_source_v6)
|
||||
UNSETSOCKADDR(transfersourcev6, transfer_source_v6)
|
||||
|
||||
GETSOCKADDR(querysource, query_source)
|
||||
SETSOCKADDR(querysource, query_source)
|
||||
UNSETSOCKADDR(querysource, query_source)
|
||||
|
||||
GETSOCKADDR(querysourcev6, query_source_v6)
|
||||
SETSOCKADDR(querysourcev6, query_source_v6)
|
||||
UNSETSOCKADDR(querysourcev6, query_source_v6)
|
||||
|
||||
SETUINT32(maxtransfertimeout, max_transfer_time_out)
|
||||
GETUINT32(maxtransfertimeout, max_transfer_time_out)
|
||||
UNSETUINT32(maxtransfertimeout, max_transfer_time_out)
|
||||
|
||||
SETUINT32(maxtransferidleout, max_transfer_idle_out)
|
||||
GETUINT32(maxtransferidleout, max_transfer_idle_out)
|
||||
UNSETUINT32(maxtransferidleout, max_transfer_idle_out)
|
||||
|
||||
SETUINT32(cleaninterval, clean_interval)
|
||||
GETUINT32(cleaninterval, clean_interval)
|
||||
UNSETUINT32(cleaninterval, clean_interval)
|
||||
|
||||
SETUINT32(minroots, min_roots)
|
||||
GETUINT32(minroots, min_roots)
|
||||
UNSETUINT32(minroots, min_roots)
|
||||
|
||||
SETUINT32(lamettl, lamettl)
|
||||
GETUINT32(lamettl, lamettl)
|
||||
UNSETUINT32(lamettl, lamettl)
|
||||
|
||||
SETUINT32(maxncachettl, max_ncache_ttl)
|
||||
GETUINT32(maxncachettl, max_ncache_ttl)
|
||||
UNSETUINT32(maxncachettl, max_ncache_ttl)
|
||||
|
||||
SETUINT32(maxcachettl, max_cache_ttl)
|
||||
GETUINT32(maxcachettl, max_cache_ttl)
|
||||
UNSETUINT32(maxcachettl, max_cache_ttl)
|
||||
|
||||
|
||||
SETUINT32(sigvalidityinterval, sig_valid_interval)
|
||||
GETUINT32(sigvalidityinterval, sig_valid_interval)
|
||||
UNSETUINT32(sigvalidityinterval, sig_valid_interval)
|
||||
|
||||
|
||||
GETUINT32(maxcachesize, max_cache_size)
|
||||
SETUINT32(maxcachesize, max_cache_size)
|
||||
UNSETUINT32(maxcachesize, max_cache_size)
|
||||
|
||||
|
||||
GETBYTYPE(dns_c_addata_t, additionaldata, additional_data)
|
||||
SETBYTYPE(dns_c_addata_t, additionaldata, additional_data)
|
||||
UNSETBYTYPE(dns_c_addata_t, additionaldata, additional_data)
|
||||
|
||||
GETBYTYPE(dns_transfer_format_t, transferformat, transfer_format)
|
||||
SETBYTYPE(dns_transfer_format_t, transferformat, transfer_format)
|
||||
UNSETBYTYPE(dns_transfer_format_t, transferformat, transfer_format)
|
||||
BYTYPE_FUNCS(dns_c_addata_t, additionaldata, additional_data)
|
||||
BYTYPE_FUNCS(dns_transfer_format_t, transferformat, transfer_format)
|
||||
|
||||
#if 0
|
||||
|
||||
/*
|
||||
* XXX waiting for implementation in server to turn these on.
|
||||
*/
|
||||
SETUINT32(maxtransfertimein, max_transfer_time_in)
|
||||
GETUINT32(maxtransfertimein, max_transfer_time_in)
|
||||
UNSETUINT32(maxtransfertimein, max_transfer_time_in)
|
||||
|
||||
SETUINT32(maxtransferidlein, max_transfer_idle_in)
|
||||
GETUINT32(maxtransferidlein, max_transfer_idle_in)
|
||||
UNSETUINT32(maxtransferidlein, max_transfer_idle_in)
|
||||
|
||||
SETUINT32(transfersperns, transfers_per_ns)
|
||||
GETUINT32(transfersperns, transfers_per_ns)
|
||||
UNSETUINT32(transfersperns, transfers_per_ns)
|
||||
|
||||
SETUINT32(serialqueries, serial_queries)
|
||||
GETUINT32(serialqueries, serial_queries)
|
||||
UNSETUINT32(serialqueries, serial_queries)
|
||||
UINT32_FUNCS(maxtransfertimein, max_transfer_time_in)
|
||||
UINT32_FUNCS(maxtransferidlein, max_transfer_idle_in)
|
||||
UINT32_FUNCS(transfersperns, transfers_per_ns)
|
||||
UINT32_FUNCS(serialqueries, serial_queries)
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: confzone.c,v 1.52 2000/08/01 01:23:32 tale Exp $ */
|
||||
/* $Id: confzone.c,v 1.53 2000/08/02 20:44:23 brister Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -42,24 +42,38 @@
|
|||
#define MZ_MAX_TRANS_TIME_OUT_BIT 6
|
||||
#define MZ_MAX_TRANS_IDLE_OUT_BIT 7
|
||||
#define MZ_SIG_VALID_INTERVAL_BIT 8
|
||||
#ifndef NOMINUM_PUBLIC
|
||||
#define MZ_MAX_NAMES_BIT 9
|
||||
#endif
|
||||
#define MZ_MIN_RETRY_TIME_BIT 10
|
||||
#define MZ_MAX_RETRY_TIME_BIT 11
|
||||
#define MZ_MIN_REFRESH_TIME_BIT 12
|
||||
#define MZ_MAX_REFRESH_TIME_BIT 13
|
||||
|
||||
|
||||
/*
|
||||
* Bit positions in the dns_c_slavezone_t structure setflags field.
|
||||
*/
|
||||
#define SZ_CHECK_NAME_BIT 0
|
||||
#define SZ_DIALUP_BIT 1
|
||||
#define SZ_MASTER_PORT_BIT 2
|
||||
#define SZ_TRANSFER_SOURCE_BIT 3
|
||||
#define SZ_TRANSFER_SOURCE_V6_BIT 4
|
||||
#define SZ_MAX_TRANS_TIME_IN_BIT 5
|
||||
#define SZ_MAX_TRANS_TIME_OUT_BIT 6
|
||||
#define SZ_MAX_TRANS_IDLE_IN_BIT 7
|
||||
#define SZ_MAX_TRANS_IDLE_OUT_BIT 8
|
||||
#define SZ_NOTIFY_BIT 9
|
||||
#define SZ_MAINT_IXFR_BASE_BIT 10
|
||||
#define SZ_MAX_IXFR_LOG_BIT 11
|
||||
#define SZ_FORWARD_BIT 12
|
||||
#define SZ_CHECK_NAME_BIT 0
|
||||
#define SZ_DIALUP_BIT 1
|
||||
#define SZ_MASTER_PORT_BIT 2
|
||||
#define SZ_TRANSFER_SOURCE_BIT 3
|
||||
#define SZ_TRANSFER_SOURCE_V6_BIT 4
|
||||
#define SZ_MAX_TRANS_TIME_IN_BIT 5
|
||||
#define SZ_MAX_TRANS_TIME_OUT_BIT 6
|
||||
#define SZ_MAX_TRANS_IDLE_IN_BIT 7
|
||||
#define SZ_MAX_TRANS_IDLE_OUT_BIT 8
|
||||
#define SZ_NOTIFY_BIT 9
|
||||
#define SZ_MAINT_IXFR_BASE_BIT 10
|
||||
#define SZ_MAX_IXFR_LOG_BIT 11
|
||||
#define SZ_FORWARD_BIT 12
|
||||
#ifndef NOMINUM_PUBLIC
|
||||
#define SZ_MAX_NAMES_BIT 13
|
||||
#endif
|
||||
#define SZ_MIN_RETRY_TIME_BIT 14
|
||||
#define SZ_MAX_RETRY_TIME_BIT 15
|
||||
#define SZ_MIN_REFRESH_TIME_BIT 16
|
||||
#define SZ_MAX_REFRESH_TIME_BIT 17
|
||||
|
||||
|
||||
|
||||
|
|
@ -74,19 +88,27 @@
|
|||
#define TZ_MAX_TRANS_IDLE_IN_BIT 7
|
||||
#define TZ_MAX_TRANS_IDLE_OUT_BIT 8
|
||||
#define TZ_FORWARD_BIT 9
|
||||
#define TZ_MIN_RETRY_TIME_BIT 10
|
||||
#define TZ_MAX_RETRY_TIME_BIT 11
|
||||
#define TZ_MIN_REFRESH_TIME_BIT 12
|
||||
#define TZ_MAX_REFRESH_TIME_BIT 13
|
||||
|
||||
|
||||
/*
|
||||
* Bit positions in the dns_c_forwardzone_t structure setflags field.
|
||||
*/
|
||||
#define FZ_CHECK_NAME_BIT 0
|
||||
#define FZ_FORWARD_BIT 1
|
||||
#define FZ_CHECK_NAME_BIT 0
|
||||
#define FZ_FORWARD_BIT 1
|
||||
#define FZ_MIN_RETRY_TIME_BIT 2
|
||||
#define FZ_MAX_RETRY_TIME_BIT 3
|
||||
#define FZ_MIN_REFRESH_TIME_BIT 4
|
||||
#define FZ_MAX_REFRESH_TIME_BIT 5
|
||||
|
||||
|
||||
/*
|
||||
* Bit positions in the dns_c_hintzone_t structure setflags field.
|
||||
*/
|
||||
#define HZ_CHECK_NAME_BIT 0
|
||||
#define HZ_CHECK_NAME_BIT 0
|
||||
|
||||
|
||||
static void
|
||||
|
|
@ -3055,6 +3077,586 @@ dns_c_zone_getsigvalidityinterval(dns_c_zone_t *zone, isc_uint32_t *retval) {
|
|||
}
|
||||
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setminretrytime(dns_c_zone_t *zone, isc_uint32_t newval) {
|
||||
isc_boolean_t existed = ISC_FALSE;
|
||||
|
||||
REQUIRE(DNS_C_ZONE_VALID(zone));
|
||||
|
||||
switch (zone->ztype) {
|
||||
case dns_c_zone_master:
|
||||
zone->u.mzone.min_retry_time = newval ;
|
||||
existed = DNS_C_CHECKBIT(MZ_MIN_RETRY_TIME_BIT,
|
||||
&zone->u.mzone.setflags);
|
||||
DNS_C_SETBIT(MZ_MIN_RETRY_TIME_BIT,
|
||||
&zone->u.mzone.setflags);
|
||||
break;
|
||||
|
||||
case dns_c_zone_slave:
|
||||
zone->u.szone.min_retry_time = newval ;
|
||||
existed = DNS_C_CHECKBIT(SZ_MIN_RETRY_TIME_BIT,
|
||||
&zone->u.szone.setflags);
|
||||
DNS_C_SETBIT(SZ_MIN_RETRY_TIME_BIT,
|
||||
&zone->u.szone.setflags);
|
||||
break;
|
||||
|
||||
case dns_c_zone_stub:
|
||||
zone->u.tzone.min_retry_time = newval ;
|
||||
existed = DNS_C_CHECKBIT(TZ_MIN_RETRY_TIME_BIT,
|
||||
&zone->u.tzone.setflags);
|
||||
DNS_C_SETBIT(TZ_MIN_RETRY_TIME_BIT,
|
||||
&zone->u.tzone.setflags);
|
||||
break;
|
||||
|
||||
case dns_c_zone_hint:
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG,
|
||||
DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL,
|
||||
"Hint zones do not have a "
|
||||
"min_retry_time field");
|
||||
return (ISC_R_FAILURE);
|
||||
|
||||
case dns_c_zone_forward:
|
||||
zone->u.fzone.min_retry_time = newval ;
|
||||
existed = DNS_C_CHECKBIT(FZ_MIN_RETRY_TIME_BIT,
|
||||
&zone->u.fzone.setflags);
|
||||
DNS_C_SETBIT(FZ_MIN_RETRY_TIME_BIT,
|
||||
&zone->u.fzone.setflags);
|
||||
break;
|
||||
}
|
||||
|
||||
return (existed ? ISC_R_EXISTS : ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getminretrytime(dns_c_zone_t *zone, isc_uint32_t *retval) {
|
||||
isc_result_t res = ISC_R_SUCCESS;
|
||||
|
||||
REQUIRE(DNS_C_ZONE_VALID(zone));
|
||||
REQUIRE(retval != NULL);
|
||||
|
||||
switch (zone->ztype) {
|
||||
case dns_c_zone_master:
|
||||
if (DNS_C_CHECKBIT(MZ_MIN_RETRY_TIME_BIT,
|
||||
&zone->u.mzone.setflags)) {
|
||||
*retval = zone->u.mzone.min_retry_time;
|
||||
res = ISC_R_SUCCESS;
|
||||
} else {
|
||||
res = ISC_R_NOTFOUND;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case dns_c_zone_slave:
|
||||
if (DNS_C_CHECKBIT(SZ_MIN_RETRY_TIME_BIT,
|
||||
&zone->u.szone.setflags)) {
|
||||
*retval = zone->u.szone.min_retry_time;
|
||||
res = ISC_R_SUCCESS;
|
||||
} else {
|
||||
res = ISC_R_NOTFOUND;
|
||||
}
|
||||
break;
|
||||
|
||||
case dns_c_zone_stub:
|
||||
if (DNS_C_CHECKBIT(TZ_MIN_RETRY_TIME_BIT,
|
||||
&zone->u.tzone.setflags)) {
|
||||
*retval = zone->u.tzone.min_retry_time;
|
||||
res = ISC_R_SUCCESS;
|
||||
} else {
|
||||
res = ISC_R_NOTFOUND;
|
||||
}
|
||||
break;
|
||||
|
||||
case dns_c_zone_hint:
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG,
|
||||
DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL,
|
||||
"Hint zones do not have a "
|
||||
"min_retry_time field");
|
||||
return (ISC_R_FAILURE);
|
||||
|
||||
case dns_c_zone_forward:
|
||||
if (DNS_C_CHECKBIT(FZ_MIN_RETRY_TIME_BIT,
|
||||
&zone->u.fzone.setflags)) {
|
||||
*retval = zone->u.fzone.min_retry_time;
|
||||
res = ISC_R_SUCCESS;
|
||||
} else {
|
||||
res = ISC_R_NOTFOUND;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return (res);
|
||||
}
|
||||
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setmaxretrytime(dns_c_zone_t *zone, isc_uint32_t newval) {
|
||||
isc_boolean_t existed = ISC_FALSE;
|
||||
|
||||
REQUIRE(DNS_C_ZONE_VALID(zone));
|
||||
|
||||
switch (zone->ztype) {
|
||||
case dns_c_zone_master:
|
||||
zone->u.mzone.max_retry_time = newval ;
|
||||
existed = DNS_C_CHECKBIT(MZ_MAX_RETRY_TIME_BIT,
|
||||
&zone->u.mzone.setflags);
|
||||
DNS_C_SETBIT(MZ_MAX_RETRY_TIME_BIT,
|
||||
&zone->u.mzone.setflags);
|
||||
break;
|
||||
|
||||
case dns_c_zone_slave:
|
||||
zone->u.szone.max_retry_time = newval ;
|
||||
existed = DNS_C_CHECKBIT(SZ_MAX_RETRY_TIME_BIT,
|
||||
&zone->u.szone.setflags);
|
||||
DNS_C_SETBIT(SZ_MAX_RETRY_TIME_BIT,
|
||||
&zone->u.szone.setflags);
|
||||
break;
|
||||
|
||||
case dns_c_zone_stub:
|
||||
zone->u.tzone.max_retry_time = newval ;
|
||||
existed = DNS_C_CHECKBIT(TZ_MAX_RETRY_TIME_BIT,
|
||||
&zone->u.tzone.setflags);
|
||||
DNS_C_SETBIT(TZ_MAX_RETRY_TIME_BIT,
|
||||
&zone->u.tzone.setflags);
|
||||
break;
|
||||
|
||||
case dns_c_zone_hint:
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG,
|
||||
DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL,
|
||||
"Hint zones do not have a "
|
||||
"max_retry_time field");
|
||||
return (ISC_R_FAILURE);
|
||||
|
||||
case dns_c_zone_forward:
|
||||
zone->u.fzone.max_retry_time = newval ;
|
||||
existed = DNS_C_CHECKBIT(FZ_MAX_RETRY_TIME_BIT,
|
||||
&zone->u.fzone.setflags);
|
||||
DNS_C_SETBIT(FZ_MAX_RETRY_TIME_BIT,
|
||||
&zone->u.fzone.setflags);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return (existed ? ISC_R_EXISTS : ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getmaxretrytime(dns_c_zone_t *zone, isc_uint32_t *retval) {
|
||||
isc_result_t res = ISC_R_SUCCESS;
|
||||
|
||||
REQUIRE(DNS_C_ZONE_VALID(zone));
|
||||
REQUIRE(retval != NULL);
|
||||
|
||||
switch (zone->ztype) {
|
||||
case dns_c_zone_master:
|
||||
if (DNS_C_CHECKBIT(MZ_MAX_RETRY_TIME_BIT,
|
||||
&zone->u.mzone.setflags)) {
|
||||
*retval = zone->u.mzone.max_retry_time;
|
||||
res = ISC_R_SUCCESS;
|
||||
} else {
|
||||
res = ISC_R_NOTFOUND;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case dns_c_zone_slave:
|
||||
if (DNS_C_CHECKBIT(SZ_MAX_RETRY_TIME_BIT,
|
||||
&zone->u.szone.setflags)) {
|
||||
*retval = zone->u.szone.max_retry_time;
|
||||
res = ISC_R_SUCCESS;
|
||||
} else {
|
||||
res = ISC_R_NOTFOUND;
|
||||
}
|
||||
break;
|
||||
|
||||
case dns_c_zone_stub:
|
||||
if (DNS_C_CHECKBIT(TZ_MAX_RETRY_TIME_BIT,
|
||||
&zone->u.tzone.setflags)) {
|
||||
*retval = zone->u.tzone.max_retry_time;
|
||||
res = ISC_R_SUCCESS;
|
||||
} else {
|
||||
res = ISC_R_NOTFOUND;
|
||||
}
|
||||
break;
|
||||
|
||||
case dns_c_zone_hint:
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG,
|
||||
DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL,
|
||||
"Hint zones do not have a "
|
||||
"max_retry_time field");
|
||||
return (ISC_R_FAILURE);
|
||||
|
||||
case dns_c_zone_forward:
|
||||
if (DNS_C_CHECKBIT(FZ_MAX_RETRY_TIME_BIT,
|
||||
&zone->u.fzone.setflags)) {
|
||||
*retval = zone->u.fzone.max_retry_time;
|
||||
res = ISC_R_SUCCESS;
|
||||
} else {
|
||||
res = ISC_R_NOTFOUND;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return (res);
|
||||
}
|
||||
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setminrefreshtime(dns_c_zone_t *zone, isc_uint32_t newval) {
|
||||
isc_boolean_t existed = ISC_FALSE;
|
||||
|
||||
REQUIRE(DNS_C_ZONE_VALID(zone));
|
||||
|
||||
switch (zone->ztype) {
|
||||
case dns_c_zone_master:
|
||||
zone->u.mzone.min_refresh_time = newval ;
|
||||
existed = DNS_C_CHECKBIT(MZ_MIN_REFRESH_TIME_BIT,
|
||||
&zone->u.mzone.setflags);
|
||||
DNS_C_SETBIT(MZ_MIN_REFRESH_TIME_BIT,
|
||||
&zone->u.mzone.setflags);
|
||||
break;
|
||||
|
||||
case dns_c_zone_slave:
|
||||
zone->u.szone.min_refresh_time = newval ;
|
||||
existed = DNS_C_CHECKBIT(SZ_MIN_REFRESH_TIME_BIT,
|
||||
&zone->u.szone.setflags);
|
||||
DNS_C_SETBIT(SZ_MIN_REFRESH_TIME_BIT,
|
||||
&zone->u.szone.setflags);
|
||||
break;
|
||||
|
||||
case dns_c_zone_stub:
|
||||
zone->u.tzone.min_refresh_time = newval ;
|
||||
existed = DNS_C_CHECKBIT(TZ_MIN_REFRESH_TIME_BIT,
|
||||
&zone->u.tzone.setflags);
|
||||
DNS_C_SETBIT(TZ_MIN_REFRESH_TIME_BIT,
|
||||
&zone->u.tzone.setflags);
|
||||
break;
|
||||
|
||||
case dns_c_zone_hint:
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG,
|
||||
DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL,
|
||||
"Hint zones do not have a "
|
||||
"min_refresh_time field");
|
||||
return (ISC_R_FAILURE);
|
||||
|
||||
case dns_c_zone_forward:
|
||||
zone->u.fzone.min_refresh_time = newval ;
|
||||
existed = DNS_C_CHECKBIT(FZ_MIN_REFRESH_TIME_BIT,
|
||||
&zone->u.fzone.setflags);
|
||||
DNS_C_SETBIT(FZ_MIN_REFRESH_TIME_BIT,
|
||||
&zone->u.fzone.setflags);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return (existed ? ISC_R_EXISTS : ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getminrefreshtime(dns_c_zone_t *zone, isc_uint32_t *retval) {
|
||||
isc_result_t res = ISC_R_SUCCESS;
|
||||
|
||||
REQUIRE(DNS_C_ZONE_VALID(zone));
|
||||
REQUIRE(retval != NULL);
|
||||
|
||||
switch (zone->ztype) {
|
||||
case dns_c_zone_master:
|
||||
if (DNS_C_CHECKBIT(MZ_MIN_REFRESH_TIME_BIT,
|
||||
&zone->u.mzone.setflags)) {
|
||||
*retval = zone->u.mzone.min_refresh_time;
|
||||
res = ISC_R_SUCCESS;
|
||||
} else {
|
||||
res = ISC_R_NOTFOUND;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case dns_c_zone_slave:
|
||||
if (DNS_C_CHECKBIT(SZ_MIN_REFRESH_TIME_BIT,
|
||||
&zone->u.szone.setflags)) {
|
||||
*retval = zone->u.szone.min_refresh_time;
|
||||
res = ISC_R_SUCCESS;
|
||||
} else {
|
||||
res = ISC_R_NOTFOUND;
|
||||
}
|
||||
break;
|
||||
|
||||
case dns_c_zone_stub:
|
||||
if (DNS_C_CHECKBIT(TZ_MIN_REFRESH_TIME_BIT,
|
||||
&zone->u.tzone.setflags)) {
|
||||
*retval = zone->u.tzone.min_refresh_time;
|
||||
res = ISC_R_SUCCESS;
|
||||
} else {
|
||||
res = ISC_R_NOTFOUND;
|
||||
}
|
||||
break;
|
||||
|
||||
case dns_c_zone_hint:
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG,
|
||||
DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL,
|
||||
"Hint zones do not have a "
|
||||
"min_refresh_time field");
|
||||
return (ISC_R_FAILURE);
|
||||
|
||||
case dns_c_zone_forward:
|
||||
if (DNS_C_CHECKBIT(FZ_MIN_REFRESH_TIME_BIT,
|
||||
&zone->u.fzone.setflags)) {
|
||||
*retval = zone->u.fzone.min_refresh_time;
|
||||
res = ISC_R_SUCCESS;
|
||||
} else {
|
||||
res = ISC_R_NOTFOUND;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return (res);
|
||||
}
|
||||
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setmaxrefreshtime(dns_c_zone_t *zone, isc_uint32_t newval) {
|
||||
isc_boolean_t existed = ISC_FALSE;
|
||||
|
||||
REQUIRE(DNS_C_ZONE_VALID(zone));
|
||||
|
||||
switch (zone->ztype) {
|
||||
case dns_c_zone_master:
|
||||
zone->u.mzone.max_refresh_time = newval ;
|
||||
existed = DNS_C_CHECKBIT(MZ_MAX_REFRESH_TIME_BIT,
|
||||
&zone->u.mzone.setflags);
|
||||
DNS_C_SETBIT(MZ_MAX_REFRESH_TIME_BIT,
|
||||
&zone->u.mzone.setflags);
|
||||
break;
|
||||
|
||||
case dns_c_zone_slave:
|
||||
zone->u.szone.max_refresh_time = newval ;
|
||||
existed = DNS_C_CHECKBIT(SZ_MAX_REFRESH_TIME_BIT,
|
||||
&zone->u.szone.setflags);
|
||||
DNS_C_SETBIT(SZ_MAX_REFRESH_TIME_BIT,
|
||||
&zone->u.szone.setflags);
|
||||
break;
|
||||
|
||||
case dns_c_zone_stub:
|
||||
zone->u.tzone.max_refresh_time = newval ;
|
||||
existed = DNS_C_CHECKBIT(TZ_MAX_REFRESH_TIME_BIT,
|
||||
&zone->u.tzone.setflags);
|
||||
DNS_C_SETBIT(TZ_MAX_REFRESH_TIME_BIT,
|
||||
&zone->u.tzone.setflags);
|
||||
break;
|
||||
|
||||
case dns_c_zone_hint:
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG,
|
||||
DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL,
|
||||
"Hint zones do not have a "
|
||||
"max_refresh_time field");
|
||||
return (ISC_R_FAILURE);
|
||||
|
||||
case dns_c_zone_forward:
|
||||
zone->u.fzone.max_refresh_time = newval ;
|
||||
existed = DNS_C_CHECKBIT(FZ_MAX_REFRESH_TIME_BIT,
|
||||
&zone->u.fzone.setflags);
|
||||
DNS_C_SETBIT(FZ_MAX_REFRESH_TIME_BIT,
|
||||
&zone->u.fzone.setflags);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return (existed ? ISC_R_EXISTS : ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getmaxrefreshtime(dns_c_zone_t *zone, isc_uint32_t *retval) {
|
||||
isc_result_t res = ISC_R_SUCCESS;
|
||||
|
||||
REQUIRE(DNS_C_ZONE_VALID(zone));
|
||||
REQUIRE(retval != NULL);
|
||||
|
||||
switch (zone->ztype) {
|
||||
case dns_c_zone_master:
|
||||
if (DNS_C_CHECKBIT(MZ_MAX_REFRESH_TIME_BIT,
|
||||
&zone->u.mzone.setflags)) {
|
||||
*retval = zone->u.mzone.max_refresh_time;
|
||||
res = ISC_R_SUCCESS;
|
||||
} else {
|
||||
res = ISC_R_NOTFOUND;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case dns_c_zone_slave:
|
||||
if (DNS_C_CHECKBIT(SZ_MAX_REFRESH_TIME_BIT,
|
||||
&zone->u.szone.setflags)) {
|
||||
*retval = zone->u.szone.max_refresh_time;
|
||||
res = ISC_R_SUCCESS;
|
||||
} else {
|
||||
res = ISC_R_NOTFOUND;
|
||||
}
|
||||
break;
|
||||
|
||||
case dns_c_zone_stub:
|
||||
if (DNS_C_CHECKBIT(TZ_MAX_REFRESH_TIME_BIT,
|
||||
&zone->u.tzone.setflags)) {
|
||||
*retval = zone->u.tzone.max_refresh_time;
|
||||
res = ISC_R_SUCCESS;
|
||||
} else {
|
||||
res = ISC_R_NOTFOUND;
|
||||
}
|
||||
break;
|
||||
|
||||
case dns_c_zone_hint:
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG,
|
||||
DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL,
|
||||
"Hint zones do not have a "
|
||||
"max_refresh_time field");
|
||||
return (ISC_R_FAILURE);
|
||||
|
||||
case dns_c_zone_forward:
|
||||
if (DNS_C_CHECKBIT(FZ_MAX_REFRESH_TIME_BIT,
|
||||
&zone->u.fzone.setflags)) {
|
||||
*retval = zone->u.fzone.max_refresh_time;
|
||||
res = ISC_R_SUCCESS;
|
||||
} else {
|
||||
res = ISC_R_NOTFOUND;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return (res);
|
||||
}
|
||||
|
||||
|
||||
#ifndef NOMINUM_PUBLIC
|
||||
isc_result_t
|
||||
dns_c_zone_setmaxnames(dns_c_zone_t *zone, isc_uint32_t newval) {
|
||||
isc_boolean_t existed = ISC_FALSE;
|
||||
|
||||
REQUIRE(DNS_C_ZONE_VALID(zone));
|
||||
|
||||
switch (zone->ztype) {
|
||||
case dns_c_zone_master:
|
||||
zone->u.mzone.max_names = newval ;
|
||||
existed = DNS_C_CHECKBIT(MZ_MAX_NAMES_BIT,
|
||||
&zone->u.mzone.setflags);
|
||||
DNS_C_SETBIT(MZ_MAX_NAMES_BIT,
|
||||
&zone->u.mzone.setflags);
|
||||
break;
|
||||
|
||||
case dns_c_zone_slave:
|
||||
zone->u.szone.max_names = newval ;
|
||||
existed = DNS_C_CHECKBIT(SZ_MAX_NAMES_BIT,
|
||||
&zone->u.szone.setflags);
|
||||
DNS_C_SETBIT(SZ_MAX_NAMES_BIT,
|
||||
&zone->u.szone.setflags);
|
||||
break;
|
||||
|
||||
case dns_c_zone_stub:
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG,
|
||||
DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL,
|
||||
"Stub zones do not have a "
|
||||
"max_names field");
|
||||
return (ISC_R_FAILURE);
|
||||
|
||||
case dns_c_zone_hint:
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG,
|
||||
DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL,
|
||||
"Hint zones do not have a "
|
||||
"max_names field");
|
||||
return (ISC_R_FAILURE);
|
||||
|
||||
case dns_c_zone_forward:
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG,
|
||||
DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL,
|
||||
"Forward zones do not have a "
|
||||
"max_names field");
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
return (existed ? ISC_R_EXISTS : ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getmaxnames(dns_c_zone_t *zone, isc_uint32_t *retval) {
|
||||
isc_result_t res = ISC_R_SUCCESS;
|
||||
|
||||
REQUIRE(DNS_C_ZONE_VALID(zone));
|
||||
REQUIRE(retval != NULL);
|
||||
|
||||
switch (zone->ztype) {
|
||||
case dns_c_zone_master:
|
||||
if (DNS_C_CHECKBIT(MZ_MAX_NAMES_BIT,
|
||||
&zone->u.mzone.setflags)) {
|
||||
*retval = zone->u.mzone.max_names;
|
||||
res = ISC_R_SUCCESS;
|
||||
} else {
|
||||
res = ISC_R_NOTFOUND;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case dns_c_zone_slave:
|
||||
if (DNS_C_CHECKBIT(SZ_MAX_NAMES_BIT,
|
||||
&zone->u.szone.setflags)) {
|
||||
*retval = zone->u.szone.max_names;
|
||||
res = ISC_R_SUCCESS;
|
||||
} else {
|
||||
res = ISC_R_NOTFOUND;
|
||||
}
|
||||
break;
|
||||
|
||||
case dns_c_zone_stub:
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG,
|
||||
DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL,
|
||||
"Stub zones do not have a "
|
||||
"max_names field");
|
||||
return (ISC_R_FAILURE);
|
||||
|
||||
case dns_c_zone_hint:
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG,
|
||||
DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL,
|
||||
"Hint zones do not have a "
|
||||
"max_names field");
|
||||
return (ISC_R_FAILURE);
|
||||
|
||||
case dns_c_zone_forward:
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG,
|
||||
DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL,
|
||||
"Forward zones do not have a "
|
||||
"max_names field");
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
return (res);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
|
|
@ -3802,6 +4404,33 @@ master_zone_print(FILE *fp, int indent, dns_c_masterzone_t *mzone) {
|
|||
mzone->sig_valid_interval);
|
||||
}
|
||||
|
||||
if (DNS_C_CHECKBIT(MZ_MIN_RETRY_TIME_BIT, &mzone->setflags)) {
|
||||
dns_c_printtabs(fp, indent);
|
||||
fprintf(fp, "min-retry-time %d;\n", mzone->min_retry_time);
|
||||
}
|
||||
|
||||
if (DNS_C_CHECKBIT(MZ_MAX_RETRY_TIME_BIT, &mzone->setflags)) {
|
||||
dns_c_printtabs(fp, indent);
|
||||
fprintf(fp, "max-retry-time %d;\n", mzone->max_retry_time);
|
||||
}
|
||||
|
||||
if (DNS_C_CHECKBIT(MZ_MIN_REFRESH_TIME_BIT, &mzone->setflags)) {
|
||||
dns_c_printtabs(fp, indent);
|
||||
fprintf(fp, "min-refresh-time %d;\n", mzone->min_refresh_time);
|
||||
}
|
||||
|
||||
if (DNS_C_CHECKBIT(MZ_MAX_REFRESH_TIME_BIT, &mzone->setflags)) {
|
||||
dns_c_printtabs(fp, indent);
|
||||
fprintf(fp, "max-refresh-time %d;\n", mzone->max_refresh_time);
|
||||
}
|
||||
|
||||
#ifndef NOMINUM_PUBLIC
|
||||
if (DNS_C_CHECKBIT(MZ_MAX_NAMES_BIT, &mzone->setflags)) {
|
||||
dns_c_printtabs(fp, indent);
|
||||
fprintf(fp, "max-names %d;\n", mzone->max_names);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mzone->pubkeylist != NULL) {
|
||||
fprintf(fp, "\n");
|
||||
dns_c_pklist_print(fp, indent, mzone->pubkeylist);
|
||||
|
|
@ -3983,6 +4612,34 @@ slave_zone_print(FILE *fp, int indent, dns_c_slavezone_t *szone) {
|
|||
fprintf(fp, "notify explicit;\n");
|
||||
}
|
||||
|
||||
|
||||
if (DNS_C_CHECKBIT(SZ_MIN_RETRY_TIME_BIT, &szone->setflags)) {
|
||||
dns_c_printtabs(fp, indent);
|
||||
fprintf(fp, "min-retry-time %d;\n", szone->min_retry_time);
|
||||
}
|
||||
|
||||
if (DNS_C_CHECKBIT(SZ_MAX_RETRY_TIME_BIT, &szone->setflags)) {
|
||||
dns_c_printtabs(fp, indent);
|
||||
fprintf(fp, "max-retry-time %d;\n", szone->max_retry_time);
|
||||
}
|
||||
|
||||
if (DNS_C_CHECKBIT(SZ_MIN_REFRESH_TIME_BIT, &szone->setflags)) {
|
||||
dns_c_printtabs(fp, indent);
|
||||
fprintf(fp, "min-refresh-time %d;\n", szone->min_refresh_time);
|
||||
}
|
||||
|
||||
if (DNS_C_CHECKBIT(SZ_MAX_REFRESH_TIME_BIT, &szone->setflags)) {
|
||||
dns_c_printtabs(fp, indent);
|
||||
fprintf(fp, "max-refresh-time %d;\n", szone->max_refresh_time);
|
||||
}
|
||||
|
||||
#ifndef NOMINUM_PUBLIC
|
||||
if (DNS_C_CHECKBIT(SZ_MAX_NAMES_BIT, &szone->setflags)) {
|
||||
dns_c_printtabs(fp, indent);
|
||||
fprintf(fp, "max-names %d;\n", szone->max_names);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (szone->also_notify != NULL) {
|
||||
dns_c_printtabs(fp, indent);
|
||||
fprintf(fp, "also-notify ");
|
||||
|
|
@ -4094,6 +4751,26 @@ stub_zone_print(FILE *fp, int indent, dns_c_stubzone_t *tzone) {
|
|||
(tzone->dialup ? "true" : "false"));
|
||||
}
|
||||
|
||||
if (DNS_C_CHECKBIT(TZ_MIN_RETRY_TIME_BIT, &tzone->setflags)) {
|
||||
dns_c_printtabs(fp, indent);
|
||||
fprintf(fp, "min-retry-time %d;\n", tzone->min_retry_time);
|
||||
}
|
||||
|
||||
if (DNS_C_CHECKBIT(TZ_MAX_RETRY_TIME_BIT, &tzone->setflags)) {
|
||||
dns_c_printtabs(fp, indent);
|
||||
fprintf(fp, "max-retry-time %d;\n", tzone->max_retry_time);
|
||||
}
|
||||
|
||||
if (DNS_C_CHECKBIT(TZ_MIN_REFRESH_TIME_BIT, &tzone->setflags)) {
|
||||
dns_c_printtabs(fp, indent);
|
||||
fprintf(fp, "min-refresh-time %d;\n", tzone->min_refresh_time);
|
||||
}
|
||||
|
||||
if (DNS_C_CHECKBIT(TZ_MAX_REFRESH_TIME_BIT, &tzone->setflags)) {
|
||||
dns_c_printtabs(fp, indent);
|
||||
fprintf(fp, "max-refresh-time %d;\n", tzone->max_refresh_time);
|
||||
}
|
||||
|
||||
if (DNS_C_CHECKBIT(TZ_TRANSFER_SOURCE_BIT, &tzone->setflags)) {
|
||||
dns_c_printtabs(fp, indent);
|
||||
fprintf(fp, "transfer-source ");
|
||||
|
|
@ -4182,6 +4859,27 @@ forward_zone_print(FILE *fp, int indent, dns_c_forwardzone_t *fzone) {
|
|||
dns_c_nameseverity2string(fzone->check_names,
|
||||
ISC_TRUE));
|
||||
}
|
||||
|
||||
if (DNS_C_CHECKBIT(FZ_MIN_RETRY_TIME_BIT, &fzone->setflags)) {
|
||||
dns_c_printtabs(fp, indent);
|
||||
fprintf(fp, "min-retry-time %d;\n", fzone->min_retry_time);
|
||||
}
|
||||
|
||||
if (DNS_C_CHECKBIT(FZ_MAX_RETRY_TIME_BIT, &fzone->setflags)) {
|
||||
dns_c_printtabs(fp, indent);
|
||||
fprintf(fp, "max-retry-time %d;\n", fzone->max_retry_time);
|
||||
}
|
||||
|
||||
if (DNS_C_CHECKBIT(FZ_MIN_REFRESH_TIME_BIT, &fzone->setflags)) {
|
||||
dns_c_printtabs(fp, indent);
|
||||
fprintf(fp, "min-refresh-time %d;\n", fzone->min_refresh_time);
|
||||
}
|
||||
|
||||
if (DNS_C_CHECKBIT(FZ_MAX_REFRESH_TIME_BIT, &fzone->setflags)) {
|
||||
dns_c_printtabs(fp, indent);
|
||||
fprintf(fp, "max-refresh-time %d;\n", fzone->max_refresh_time);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: confctx.h,v 1.48 2000/08/01 01:23:52 tale Exp $ */
|
||||
/* $Id: confctx.h,v 1.49 2000/08/02 20:44:25 brister Exp $ */
|
||||
|
||||
#ifndef DNS_CONFCTX_H
|
||||
#define DNS_CONFCTX_H 1
|
||||
|
|
@ -150,6 +150,14 @@ struct dns_c_options {
|
|||
isc_uint32_t *max_ncache_ttl;
|
||||
isc_uint32_t *max_cache_ttl;
|
||||
|
||||
isc_uint32_t *min_retry_time;
|
||||
isc_uint32_t *max_retry_time;
|
||||
isc_uint32_t *min_refresh_time;
|
||||
isc_uint32_t *max_refresh_time;
|
||||
|
||||
isc_uint32_t *max_names;
|
||||
|
||||
|
||||
isc_boolean_t *expert_mode;
|
||||
isc_boolean_t *fake_iquery;
|
||||
isc_boolean_t *recursion;
|
||||
|
|
@ -472,6 +480,35 @@ isc_result_t dns_c_ctx_getmaxcachesize(dns_c_ctx_t *cfg, isc_uint32_t *retval);
|
|||
isc_result_t dns_c_ctx_unsetmaxcachesize(dns_c_ctx_t *cfg);
|
||||
|
||||
|
||||
isc_result_t dns_c_ctx_setminretrytime(dns_c_ctx_t *cfg, isc_uint32_t newval);
|
||||
isc_result_t dns_c_ctx_getminretrytime(dns_c_ctx_t *cfg, isc_uint32_t *retval);
|
||||
isc_result_t dns_c_ctx_unsetminretrytime(dns_c_ctx_t *cfg);
|
||||
|
||||
|
||||
isc_result_t dns_c_ctx_setmaxretrytime(dns_c_ctx_t *cfg, isc_uint32_t newval);
|
||||
isc_result_t dns_c_ctx_getmaxretrytime(dns_c_ctx_t *cfg, isc_uint32_t *retval);
|
||||
isc_result_t dns_c_ctx_unsetmaxretrytime(dns_c_ctx_t *cfg);
|
||||
|
||||
|
||||
isc_result_t dns_c_ctx_setminrefreshtime(dns_c_ctx_t *cfg,
|
||||
isc_uint32_t newval);
|
||||
isc_result_t dns_c_ctx_getminrefreshtime(dns_c_ctx_t *cfg,
|
||||
isc_uint32_t *retval);
|
||||
isc_result_t dns_c_ctx_unsetminrefreshtime(dns_c_ctx_t *cfg);
|
||||
|
||||
|
||||
isc_result_t dns_c_ctx_setmaxrefreshtime(dns_c_ctx_t *cfg,
|
||||
isc_uint32_t newval);
|
||||
isc_result_t dns_c_ctx_getmaxrefreshtime(dns_c_ctx_t *cfg,
|
||||
isc_uint32_t *retval);
|
||||
isc_result_t dns_c_ctx_unsetmaxrefreshtime(dns_c_ctx_t *cfg);
|
||||
|
||||
|
||||
isc_result_t dns_c_ctx_setmaxnames(dns_c_ctx_t *cfg, isc_uint32_t newval);
|
||||
isc_result_t dns_c_ctx_getmaxnames(dns_c_ctx_t *cfg, isc_uint32_t *retval);
|
||||
isc_result_t dns_c_ctx_unsetmaxnames(dns_c_ctx_t *cfg);
|
||||
|
||||
|
||||
isc_result_t dns_c_ctx_setmaxncachettl(dns_c_ctx_t *cfg, isc_uint32_t newval);
|
||||
isc_result_t dns_c_ctx_getmaxncachettl(dns_c_ctx_t *cfg, isc_uint32_t *retval);
|
||||
isc_result_t dns_c_ctx_unsetmaxncachettl(dns_c_ctx_t *cfg);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: confview.h,v 1.36 2000/08/01 01:24:02 tale Exp $ */
|
||||
/* $Id: confview.h,v 1.37 2000/08/02 20:44:26 brister Exp $ */
|
||||
|
||||
#ifndef DNS_CONFVIEW_H
|
||||
#define DNS_CONFVIEW_H 1
|
||||
|
|
@ -35,19 +35,19 @@
|
|||
/*
|
||||
*
|
||||
* MP:
|
||||
* Client must do necessary locking.
|
||||
* Client must do necessary locking.
|
||||
*
|
||||
* Reliability:
|
||||
*
|
||||
* No problems.
|
||||
* No problems.
|
||||
*
|
||||
* Resources:
|
||||
*
|
||||
* Use memory managers supplied by client.
|
||||
* Use memory managers supplied by client.
|
||||
*
|
||||
* Security:
|
||||
*
|
||||
* N/A
|
||||
* N/A
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
@ -61,11 +61,11 @@
|
|||
#include <dns/confrrset.h>
|
||||
#include <dns/confzone.h>
|
||||
|
||||
#define DNS_C_VIEWTABLE_MAGIC 0x76497774 /* vIwt */
|
||||
#define DNS_C_VIEW_MAGIC 0x56696557 /* VieW */
|
||||
#define DNS_C_VIEWTABLE_MAGIC 0x76497774 /* vIwt */
|
||||
#define DNS_C_VIEW_MAGIC 0x56696557 /* VieW */
|
||||
|
||||
#define DNS_C_VIEWTABLE_VALID(ptr) ISC_MAGIC_VALID(ptr, DNS_C_VIEWTABLE_MAGIC)
|
||||
#define DNS_C_VIEW_VALID(ptr) ISC_MAGIC_VALID(ptr, DNS_C_VIEW_MAGIC)
|
||||
#define DNS_C_VIEW_VALID(ptr) ISC_MAGIC_VALID(ptr, DNS_C_VIEW_MAGIC)
|
||||
/***
|
||||
*** Types
|
||||
***/
|
||||
|
|
@ -74,94 +74,101 @@
|
|||
/* this typedef moved to confcommon.h for confzone.h to get at (due to
|
||||
* circulare include file dependancies).
|
||||
*/
|
||||
typedef struct dns_c_view dns_c_view_t;
|
||||
typedef struct dns_c_view dns_c_view_t;
|
||||
#endif
|
||||
typedef struct dns_c_viewtable dns_c_viewtable_t;
|
||||
typedef struct dns_c_viewtable dns_c_viewtable_t;
|
||||
|
||||
|
||||
struct dns_c_viewtable {
|
||||
isc_uint32_t magic;
|
||||
isc_uint32_t magic;
|
||||
|
||||
isc_mem_t *mem;
|
||||
isc_mem_t *mem;
|
||||
|
||||
ISC_LIST(dns_c_view_t) views;
|
||||
ISC_LIST(dns_c_view_t) views;
|
||||
};
|
||||
|
||||
struct dns_c_view {
|
||||
isc_uint32_t magic;
|
||||
isc_mem_t *mem;
|
||||
isc_uint32_t magic;
|
||||
isc_mem_t *mem;
|
||||
|
||||
char *name;
|
||||
char *name;
|
||||
|
||||
dns_rdataclass_t viewclass;
|
||||
dns_rdataclass_t viewclass;
|
||||
|
||||
dns_c_zonelist_t *zonelist;
|
||||
dns_c_zonelist_t *zonelist;
|
||||
|
||||
dns_c_forw_t *forward;
|
||||
dns_c_forw_t *forward;
|
||||
|
||||
dns_c_iplist_t *forwarders;
|
||||
dns_c_iplist_t *also_notify;
|
||||
dns_c_iplist_t *forwarders;
|
||||
dns_c_iplist_t *also_notify;
|
||||
|
||||
dns_c_ipmatchlist_t *allowquery;
|
||||
dns_c_ipmatchlist_t *allowupdateforwarding;
|
||||
dns_c_ipmatchlist_t *transferacl;
|
||||
dns_c_ipmatchlist_t *recursionacl;
|
||||
dns_c_ipmatchlist_t *sortlist;
|
||||
dns_c_ipmatchlist_t *topology;
|
||||
dns_c_ipmatchlist_t *matchclients;
|
||||
dns_c_ipmatchlist_t *allowquery;
|
||||
dns_c_ipmatchlist_t *allowupdateforwarding;
|
||||
dns_c_ipmatchlist_t *transferacl;
|
||||
dns_c_ipmatchlist_t *recursionacl;
|
||||
dns_c_ipmatchlist_t *sortlist;
|
||||
dns_c_ipmatchlist_t *topology;
|
||||
dns_c_ipmatchlist_t *matchclients;
|
||||
|
||||
dns_c_rrsolist_t *ordering; /* XXX not parsed yet */
|
||||
dns_c_rrsolist_t *ordering; /* XXX not parsed yet */
|
||||
|
||||
dns_severity_t *check_names[DNS_C_TRANSCOUNT];
|
||||
dns_severity_t *check_names[DNS_C_TRANSCOUNT];
|
||||
|
||||
/*
|
||||
* XXX to implement now.
|
||||
*/
|
||||
isc_boolean_t *auth_nx_domain;
|
||||
isc_boolean_t *recursion;
|
||||
isc_boolean_t *provide_ixfr;
|
||||
isc_boolean_t *request_ixfr;
|
||||
isc_boolean_t *fetch_glue;
|
||||
isc_boolean_t *notify;
|
||||
isc_boolean_t *rfc2308_type1;
|
||||
isc_boolean_t *additional_from_auth;
|
||||
isc_boolean_t *additional_from_cache;
|
||||
dns_notifytype_t *notify;
|
||||
|
||||
isc_sockaddr_t *query_source;
|
||||
isc_sockaddr_t *query_source_v6;
|
||||
isc_sockaddr_t *transfer_source;
|
||||
isc_sockaddr_t *transfer_source_v6;
|
||||
isc_boolean_t *auth_nx_domain;
|
||||
isc_boolean_t *recursion;
|
||||
isc_boolean_t *provide_ixfr;
|
||||
isc_boolean_t *request_ixfr;
|
||||
isc_boolean_t *fetch_glue;
|
||||
isc_boolean_t *rfc2308_type1;
|
||||
isc_boolean_t *additional_from_auth;
|
||||
isc_boolean_t *additional_from_cache;
|
||||
|
||||
isc_uint32_t *max_transfer_time_out;
|
||||
isc_uint32_t *max_transfer_idle_out;
|
||||
isc_uint32_t *clean_interval;
|
||||
isc_uint32_t *min_roots;
|
||||
isc_uint32_t *lamettl;
|
||||
isc_uint32_t *max_ncache_ttl;
|
||||
isc_uint32_t *max_cache_ttl;
|
||||
isc_uint32_t *sig_valid_interval;
|
||||
isc_uint32_t *max_cache_size;
|
||||
isc_sockaddr_t *query_source;
|
||||
isc_sockaddr_t *query_source_v6;
|
||||
isc_sockaddr_t *transfer_source;
|
||||
isc_sockaddr_t *transfer_source_v6;
|
||||
|
||||
dns_c_addata_t *additional_data;
|
||||
dns_transfer_format_t *transfer_format;
|
||||
isc_uint32_t *max_transfer_time_out;
|
||||
isc_uint32_t *max_transfer_idle_out;
|
||||
isc_uint32_t *clean_interval;
|
||||
isc_uint32_t *min_roots;
|
||||
isc_uint32_t *lamettl;
|
||||
isc_uint32_t *max_ncache_ttl;
|
||||
isc_uint32_t *max_cache_ttl;
|
||||
isc_uint32_t *sig_valid_interval;
|
||||
isc_uint32_t *max_cache_size;
|
||||
|
||||
dns_c_kdeflist_t *keydefs;
|
||||
dns_peerlist_t *peerlist;
|
||||
isc_uint32_t *min_retry_time;
|
||||
isc_uint32_t *max_retry_time;
|
||||
isc_uint32_t *min_refresh_time;
|
||||
isc_uint32_t *max_refresh_time;
|
||||
|
||||
dns_c_tkeylist_t *trusted_keys;
|
||||
#ifndef NOMINUM_PUBLIC
|
||||
isc_uint32_t *max_names;
|
||||
#endif
|
||||
|
||||
dns_c_addata_t *additional_data;
|
||||
dns_transfer_format_t *transfer_format;
|
||||
|
||||
dns_c_kdeflist_t *keydefs;
|
||||
dns_peerlist_t *peerlist;
|
||||
|
||||
dns_c_tkeylist_t *trusted_keys;
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* To implement later.
|
||||
*/
|
||||
isc_uint32_t *max_transfer_time_in;
|
||||
isc_uint32_t *max_transfer_idle_in;
|
||||
isc_uint32_t *transfers_per_ns;
|
||||
isc_uint32_t *serial_queries;
|
||||
/*
|
||||
* To implement later.
|
||||
*/
|
||||
isc_uint32_t *max_transfer_time_in;
|
||||
isc_uint32_t *max_transfer_idle_in;
|
||||
isc_uint32_t *transfers_per_ns;
|
||||
isc_uint32_t *serial_queries;
|
||||
|
||||
#endif
|
||||
|
||||
ISC_LINK(dns_c_view_t) next;
|
||||
ISC_LINK(dns_c_view_t) next;
|
||||
};
|
||||
|
||||
/***
|
||||
|
|
@ -171,7 +178,7 @@ struct dns_c_view {
|
|||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t dns_c_viewtable_new(isc_mem_t *mem,
|
||||
dns_c_viewtable_t **viewtable);
|
||||
dns_c_viewtable_t **viewtable);
|
||||
isc_result_t dns_c_viewtable_delete(dns_c_viewtable_t **viewtable);
|
||||
|
||||
void dns_c_viewtable_print(FILE *fp, int indent, dns_c_viewtable_t *table);
|
||||
|
|
@ -179,25 +186,25 @@ void dns_c_viewtable_addview(dns_c_viewtable_t *viewtable, dns_c_view_t *view);
|
|||
void dns_c_viewtable_rmview(dns_c_viewtable_t *viewtable, dns_c_view_t *view);
|
||||
isc_result_t dns_c_viewtable_clear(dns_c_viewtable_t *table);
|
||||
isc_result_t dns_c_viewtable_viewbyname(dns_c_viewtable_t *viewtable,
|
||||
const char *viewname,
|
||||
dns_c_view_t **retval);
|
||||
const char *viewname,
|
||||
dns_c_view_t **retval);
|
||||
isc_result_t dns_c_viewtable_rmviewbyname(dns_c_viewtable_t *viewtable,
|
||||
const char *name);
|
||||
const char *name);
|
||||
isc_result_t dns_c_viewtable_checkviews(dns_c_viewtable_t *viewtable);
|
||||
|
||||
|
||||
/* NOTE: For the various get* functions. The caller must not delete the
|
||||
* returned value.
|
||||
*
|
||||
* - For functions where retval is a dns_c_ipmatchlist_t
|
||||
* (e.g. dns_c_view_getallowquery) the caller must call
|
||||
* dns_c_ipmatchlist_detach() when finished with retval).
|
||||
* - For functions where retval is a dns_c_ipmatchlist_t
|
||||
* (e.g. dns_c_view_getallowquery) the caller must call
|
||||
* dns_c_ipmatchlist_detach() when finished with retval).
|
||||
*
|
||||
*/
|
||||
|
||||
isc_result_t dns_c_view_new(isc_mem_t *mem, const char *name,
|
||||
dns_rdataclass_t viewclass,
|
||||
dns_c_view_t **newview);
|
||||
dns_rdataclass_t viewclass,
|
||||
dns_c_view_t **newview);
|
||||
isc_result_t dns_c_view_delete(dns_c_view_t **viewptr);
|
||||
void dns_c_view_print(FILE *fp, int indent, dns_c_view_t *view);
|
||||
|
||||
|
|
@ -205,10 +212,10 @@ isc_boolean_t dns_c_view_keydefinedp(dns_c_view_t *view, const char *keyname);
|
|||
isc_result_t dns_c_view_getname(dns_c_view_t *view, const char **retval);
|
||||
isc_result_t dns_c_view_addzone(dns_c_view_t *view, dns_c_zone_t *zone);
|
||||
isc_result_t dns_c_view_getzonelist(dns_c_view_t *view,
|
||||
dns_c_zonelist_t **zonelist);
|
||||
dns_c_zonelist_t **zonelist);
|
||||
isc_result_t dns_c_view_unsetzonelist(dns_c_view_t *view);
|
||||
isc_result_t dns_c_view_getviewclass(dns_c_view_t *view,
|
||||
dns_rdataclass_t *retval);
|
||||
dns_rdataclass_t *retval);
|
||||
|
||||
isc_result_t dns_c_view_getforward(dns_c_view_t *view, dns_c_forw_t *retval);
|
||||
isc_result_t dns_c_view_setforward(dns_c_view_t *view, dns_c_forw_t newval);
|
||||
|
|
@ -217,10 +224,10 @@ isc_result_t dns_c_view_unsetforward(dns_c_view_t *view);
|
|||
|
||||
|
||||
isc_result_t dns_c_view_setforwarders(dns_c_view_t *view, dns_c_iplist_t *ipl,
|
||||
isc_boolean_t deepcopy);
|
||||
isc_boolean_t deepcopy);
|
||||
isc_result_t dns_c_view_unsetforwarders(dns_c_view_t *view);
|
||||
isc_result_t dns_c_view_getforwarders(dns_c_view_t *view,
|
||||
dns_c_iplist_t **ipl);
|
||||
dns_c_iplist_t **ipl);
|
||||
|
||||
|
||||
|
||||
|
|
@ -338,8 +345,10 @@ isc_result_t dns_c_view_unsetfetchglue(dns_c_view_t *view);
|
|||
|
||||
|
||||
|
||||
isc_result_t dns_c_view_getnotify(dns_c_view_t *view, dns_notifytype_t *retval);
|
||||
isc_result_t dns_c_view_setnotify(dns_c_view_t *view, dns_notifytype_t newval);
|
||||
isc_result_t dns_c_view_getnotify(dns_c_view_t *view,
|
||||
dns_notifytype_t *retval);
|
||||
isc_result_t dns_c_view_setnotify(dns_c_view_t *view,
|
||||
dns_notifytype_t newval);
|
||||
isc_result_t dns_c_view_unsetnotify(dns_c_view_t *view);
|
||||
|
||||
|
||||
|
|
@ -465,6 +474,40 @@ isc_result_t dns_c_view_setmaxcachesize(dns_c_view_t *view,
|
|||
isc_result_t dns_c_view_unsetmaxcachesize(dns_c_view_t *view);
|
||||
|
||||
|
||||
isc_result_t dns_c_view_getminretrytime(dns_c_view_t *view,
|
||||
isc_uint32_t *retval);
|
||||
isc_result_t dns_c_view_setminretrytime(dns_c_view_t *view,
|
||||
isc_uint32_t newval);
|
||||
isc_result_t dns_c_view_unsetminretrytime(dns_c_view_t *view);
|
||||
|
||||
|
||||
isc_result_t dns_c_view_getmaxretrytime(dns_c_view_t *view,
|
||||
isc_uint32_t *retval);
|
||||
isc_result_t dns_c_view_setmaxretrytime(dns_c_view_t *view,
|
||||
isc_uint32_t newval);
|
||||
isc_result_t dns_c_view_unsetmaxretrytime(dns_c_view_t *view);
|
||||
|
||||
|
||||
isc_result_t dns_c_view_getminrefreshtime(dns_c_view_t *view,
|
||||
isc_uint32_t *retval);
|
||||
isc_result_t dns_c_view_setminrefreshtime(dns_c_view_t *view,
|
||||
isc_uint32_t newval);
|
||||
isc_result_t dns_c_view_unsetminrefreshtime(dns_c_view_t *view);
|
||||
|
||||
|
||||
isc_result_t dns_c_view_getmaxrefreshtime(dns_c_view_t *view,
|
||||
isc_uint32_t *retval);
|
||||
isc_result_t dns_c_view_setmaxrefreshtime(dns_c_view_t *view,
|
||||
isc_uint32_t newval);
|
||||
isc_result_t dns_c_view_unsetmaxrefreshtime(dns_c_view_t *view);
|
||||
|
||||
|
||||
isc_result_t dns_c_view_getmaxnames(dns_c_view_t *view,
|
||||
isc_uint32_t *retval);
|
||||
isc_result_t dns_c_view_setmaxnames(dns_c_view_t *view,
|
||||
isc_uint32_t newval);
|
||||
isc_result_t dns_c_view_unsetmaxnames(dns_c_view_t *view);
|
||||
|
||||
|
||||
isc_result_t dns_c_view_setadditionaldata(dns_c_view_t *view,
|
||||
dns_c_addata_t newval);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: confzone.h,v 1.39 2000/08/01 01:24:03 tale Exp $ */
|
||||
/* $Id: confzone.h,v 1.40 2000/08/02 20:44:27 brister Exp $ */
|
||||
|
||||
#ifndef DNS_CONFZONE_H
|
||||
#define DNS_CONFZONE_H 1
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
*
|
||||
* No problems.
|
||||
*
|
||||
* Resources:
|
||||
* resources:
|
||||
*
|
||||
* Use memory managers supplied by client.
|
||||
*
|
||||
|
|
@ -97,14 +97,14 @@ struct dns_c_zone_list {
|
|||
|
||||
struct dns_c_master_zone {
|
||||
char *file;
|
||||
dns_severity_t check_names;
|
||||
dns_severity_t check_names;
|
||||
dns_c_ipmatchlist_t *allow_update;
|
||||
dns_c_ipmatchlist_t *allow_update_forwarding;
|
||||
dns_ssutable_t *ssuauth;
|
||||
dns_c_ipmatchlist_t *allow_query;
|
||||
dns_c_ipmatchlist_t *allow_transfer;
|
||||
isc_boolean_t dialup;
|
||||
isc_boolean_t notify;
|
||||
dns_notifytype_t notify;
|
||||
dns_c_iplist_t *also_notify;
|
||||
char *ixfr_base;
|
||||
char *ixfr_tmp;
|
||||
|
|
@ -115,6 +115,16 @@ struct dns_c_master_zone {
|
|||
isc_uint32_t max_trans_idle_out;
|
||||
isc_uint32_t sig_valid_interval;
|
||||
|
||||
#ifndef NOMINUM_PUBLIC
|
||||
isc_uint32_t max_names;
|
||||
#endif
|
||||
|
||||
isc_uint32_t min_retry_time;
|
||||
isc_uint32_t max_retry_time;
|
||||
isc_uint32_t min_refresh_time;
|
||||
isc_uint32_t max_refresh_time;
|
||||
|
||||
|
||||
dns_c_forw_t forward;
|
||||
dns_c_iplist_t *forwarders;
|
||||
|
||||
|
|
@ -129,7 +139,7 @@ struct dns_c_slave_zone {
|
|||
dns_c_ipmatchlist_t *allow_query;
|
||||
dns_c_ipmatchlist_t *allow_transfer;
|
||||
dns_c_iplist_t *also_notify;
|
||||
isc_boolean_t notify;
|
||||
dns_notifytype_t notify;
|
||||
isc_boolean_t dialup;
|
||||
char *ixfr_base;
|
||||
char *ixfr_tmp;
|
||||
|
|
@ -145,6 +155,15 @@ struct dns_c_slave_zone {
|
|||
isc_uint32_t max_trans_idle_in;
|
||||
isc_uint32_t max_trans_idle_out;
|
||||
|
||||
#ifndef NOMINUM_PUBLIC
|
||||
isc_uint32_t max_names;
|
||||
#endif
|
||||
|
||||
isc_uint32_t min_retry_time;
|
||||
isc_uint32_t max_retry_time;
|
||||
isc_uint32_t min_refresh_time;
|
||||
isc_uint32_t max_refresh_time;
|
||||
|
||||
dns_c_forw_t forward;
|
||||
dns_c_iplist_t *forwarders;
|
||||
|
||||
|
|
@ -169,6 +188,10 @@ struct dns_c_stub_zone {
|
|||
|
||||
dns_c_forw_t forward;
|
||||
dns_c_iplist_t *forwarders;
|
||||
isc_uint32_t min_retry_time;
|
||||
isc_uint32_t max_retry_time;
|
||||
isc_uint32_t min_refresh_time;
|
||||
isc_uint32_t max_refresh_time;
|
||||
|
||||
dns_c_setbits_t setflags;
|
||||
};
|
||||
|
|
@ -178,6 +201,11 @@ struct dns_c_forward_zone {
|
|||
dns_c_forw_t forward;
|
||||
dns_c_iplist_t *forwarders;
|
||||
|
||||
isc_uint32_t min_retry_time;
|
||||
isc_uint32_t max_retry_time;
|
||||
isc_uint32_t min_refresh_time;
|
||||
isc_uint32_t max_refresh_time;
|
||||
|
||||
dns_c_setbits_t setflags;
|
||||
};
|
||||
|
||||
|
|
@ -395,6 +423,35 @@ isc_result_t dns_c_zone_getsigvalidityinterval(dns_c_zone_t *zone,
|
|||
isc_uint32_t *retval);
|
||||
|
||||
|
||||
isc_result_t dns_c_zone_setminretrytime(dns_c_zone_t *zone,
|
||||
isc_uint32_t newval);
|
||||
isc_result_t dns_c_zone_getminretrytime(dns_c_zone_t *zone,
|
||||
isc_uint32_t *retval);
|
||||
|
||||
isc_result_t dns_c_zone_setmaxretrytime(dns_c_zone_t *zone,
|
||||
isc_uint32_t newval);
|
||||
isc_result_t dns_c_zone_getmaxretrytime(dns_c_zone_t *zone,
|
||||
isc_uint32_t *retval);
|
||||
|
||||
|
||||
isc_result_t dns_c_zone_setminrefreshtime(dns_c_zone_t *zone,
|
||||
isc_uint32_t newval);
|
||||
isc_result_t dns_c_zone_getminrefreshtime(dns_c_zone_t *zone,
|
||||
isc_uint32_t *retval);
|
||||
|
||||
isc_result_t dns_c_zone_setmaxrefreshtime(dns_c_zone_t *zone,
|
||||
isc_uint32_t newval);
|
||||
isc_result_t dns_c_zone_getmaxrefreshtime(dns_c_zone_t *zone,
|
||||
isc_uint32_t *retval);
|
||||
|
||||
|
||||
isc_result_t dns_c_zone_setmaxnames(dns_c_zone_t *zone,
|
||||
isc_uint32_t newval);
|
||||
isc_result_t dns_c_zone_getmaxnames(dns_c_zone_t *zone,
|
||||
isc_uint32_t *retval);
|
||||
|
||||
|
||||
|
||||
isc_result_t dns_c_zone_setmaxixfrlog(dns_c_zone_t *zone,
|
||||
isc_uint32_t newval);
|
||||
isc_result_t dns_c_zone_getmaxixfrlog(dns_c_zone_t *zone,
|
||||
|
|
|
|||
Loading…
Reference in a new issue