namedconf.c revision 47af71b5233c8863ee64883458c824df3a396ea7
/*
* Copyright (C) 2000-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: namedconf.c,v 1.3 2002/01/22 19:31:56 gson Exp $ */
#include <config.h>
#include <string.h>
/* Check a return value. */
} while (0)
/* Clean up a configuration object if non-NULL. */
#define CLEANUP_OBJ(obj) \
/*
* Forward declarations of static functions.
*/
static isc_result_t
static isc_result_t
static isc_result_t
static void
static void
static void
static cfg_type_t cfg_type_optional_port;
static cfg_type_t cfg_type_bracketed_aml;
static cfg_type_t cfg_type_acl;
static cfg_type_t cfg_type_portiplist;
static cfg_type_t cfg_type_optional_keyref;
static cfg_type_t cfg_type_options;
static cfg_type_t cfg_type_view;
static cfg_type_t cfg_type_viewopts;
static cfg_type_t cfg_type_key;
static cfg_type_t cfg_type_server;
static cfg_type_t cfg_type_controls;
static cfg_type_t cfg_type_querysource4;
static cfg_type_t cfg_type_querysource6;
static cfg_type_t cfg_type_querysource;
static cfg_type_t cfg_type_sockaddr4wild;
static cfg_type_t cfg_type_sockaddr6wild;
static cfg_type_t cfg_type_zone;
static cfg_type_t cfg_type_zoneopts;
static cfg_type_t cfg_type_logging;
static cfg_type_t cfg_type_optional_facility;
static cfg_type_t cfg_type_optional_class;
static cfg_type_t cfg_type_destinationlist;
static cfg_type_t cfg_type_size;
static cfg_type_t cfg_type_sizenodefault;
static cfg_type_t cfg_type_negated;
static cfg_type_t cfg_type_addrmatchelt;
static cfg_type_t cfg_type_server_key_kludge;
static cfg_type_t cfg_type_optional_facility;
static cfg_type_t cfg_type_logseverity;
static cfg_type_t cfg_type_logfile;
static cfg_type_t cfg_type_lwres;
static cfg_type_t cfg_type_controls_sockaddr;
static cfg_type_t cfg_type_notifytype;
static cfg_type_t cfg_type_dialuptype;
/* tkey-dhkey */
static cfg_tuplefielddef_t tkey_dhkey_fields[] = {
{ "name", &cfg_type_qstring, 0 },
{ "keyid", &cfg_type_uint32, 0 },
};
static cfg_type_t cfg_type_tkey_dhkey = {
};
/* listen-on */
static cfg_tuplefielddef_t listenon_fields[] = {
{ "port", &cfg_type_optional_port, 0 },
{ "acl", &cfg_type_bracketed_aml, 0 },
};
static cfg_type_t cfg_type_listenon = {
/* acl */
static cfg_tuplefielddef_t acl_fields[] = {
{ "name", &cfg_type_astring, 0 },
{ "value", &cfg_type_bracketed_aml, 0 },
};
static cfg_type_t cfg_type_acl = {
/*
* "sockaddrkeylist", a list of socket addresses with optional keys
* and an optional default port, as used in the masters option.
* E.g.,
* "port 1234 { 10.0.0.1 key foo; 1::2 port 69; }"
*/
static cfg_tuplefielddef_t sockaddrkey_fields[] = {
{ "sockaddr", &cfg_type_sockaddr, 0 },
{ "key", &cfg_type_optional_keyref, 0 },
};
static cfg_type_t cfg_type_sockaddrkey = {
};
static cfg_type_t cfg_type_bracketed_sockaddrkeylist = {
"bracketed_sockaddrkeylist", cfg_parse_bracketed_list,
};
static cfg_tuplefielddef_t sockaddrkeylist_fields[] = {
{ "port", &cfg_type_optional_port, 0 },
{ "addresses", &cfg_type_bracketed_sockaddrkeylist, 0 },
};
static cfg_type_t cfg_type_sockaddrkeylist = {
};
/*
* A list of socket addresses with an optional default port,
* as used in the also-notify option. E.g.,
* "port 1234 { 10.0.0.1; 1::2 port 69; }"
*/
static cfg_tuplefielddef_t portiplist_fields[] = {
{ "port", &cfg_type_optional_port, 0 },
{ "addresses", &cfg_type_bracketed_sockaddrlist, 0 },
};
static cfg_type_t cfg_type_portiplist = {
};
/*
* A public key, as in the "pubkey" statement.
*/
static cfg_tuplefielddef_t pubkey_fields[] = {
{ "flags", &cfg_type_uint32, 0 },
{ "protocol", &cfg_type_uint32, 0 },
{ "algorithm", &cfg_type_uint32, 0 },
{ "key", &cfg_type_qstring, 0 },
};
static cfg_type_t cfg_type_pubkey = {
/*
* A list of RR types, used in grant statements.
* Note that the old parser allows quotes around the RR type names.
*/
static cfg_type_t cfg_type_rrtypelist = {
};
static cfg_type_t cfg_type_mode = {
};
static const char *matchtype_enums[] = {
static cfg_type_t cfg_type_matchtype = {
};
/*
* A grant statement, used in the update policy.
*/
static cfg_tuplefielddef_t grant_fields[] = {
{ "mode", &cfg_type_mode, 0 },
{ "matchtype", &cfg_type_matchtype, 0 },
{ "types", &cfg_type_rrtypelist, 0 },
};
static cfg_type_t cfg_type_grant = {
static cfg_type_t cfg_type_updatepolicy = {
};
/*
* A view statement.
*/
static cfg_tuplefielddef_t view_fields[] = {
{ "name", &cfg_type_astring, 0 },
{ "class", &cfg_type_optional_class, 0 },
{ "options", &cfg_type_viewopts, 0 },
};
static cfg_type_t cfg_type_view = {
/*
* A zone statement.
*/
static cfg_tuplefielddef_t zone_fields[] = {
{ "name", &cfg_type_astring, 0 },
{ "class", &cfg_type_optional_class, 0 },
{ "options", &cfg_type_zoneopts, 0 },
};
static cfg_type_t cfg_type_zone = {
/*
* A "category" clause in the "logging" statement.
*/
static cfg_tuplefielddef_t category_fields[] = {
{ "name", &cfg_type_astring, 0 },
{ "destinations", &cfg_type_destinationlist,0 },
};
static cfg_type_t cfg_type_category = {
/*
* A trusted key, as used in the "trusted-keys" statement.
*/
static cfg_tuplefielddef_t trustedkey_fields[] = {
{ "name", &cfg_type_astring, 0 },
{ "flags", &cfg_type_uint32, 0 },
{ "protocol", &cfg_type_uint32, 0 },
{ "algorithm", &cfg_type_uint32, 0 },
{ "key", &cfg_type_qstring, 0 },
};
static cfg_type_t cfg_type_trustedkey = {
};
static cfg_type_t cfg_type_optional_wild_class = {
};
static cfg_type_t cfg_type_optional_wild_type = {
"optional_wild_type", parse_optional_keyvalue,
};
static cfg_type_t cfg_type_optional_wild_name = {
"optional_wild_name", parse_optional_keyvalue,
};
/*
* An rrset ordering element.
*/
static cfg_tuplefielddef_t rrsetorderingelement_fields[] = {
{ "class", &cfg_type_optional_wild_class, 0 },
{ "type", &cfg_type_optional_wild_type, 0 },
{ "name", &cfg_type_optional_wild_name, 0 },
{ "ordering", &cfg_type_ustring, 0 },
};
static cfg_type_t cfg_type_rrsetorderingelement = {
};
/*
* A global or view "check-names" option. Note that the zone
* "check-names" option has a different syntax.
*/
static cfg_tuplefielddef_t checknames_fields[] = {
{ "type", &cfg_type_ustring, 0 },
{ "mode", &cfg_type_ustring, 0 },
};
static cfg_type_t cfg_type_checknames = {
};
static cfg_type_t cfg_type_bracketed_sockaddrlist = {
"bracketed_sockaddrlist", cfg_parse_bracketed_list, cfg_print_bracketed_list, cfg_doc_bracketed_list,
};
static cfg_type_t cfg_type_rrsetorder = {
};
static cfg_type_t cfg_type_optional_port = {
};
/* A list of keys, as in the "key" clause of the controls statement. */
static cfg_type_t cfg_type_keylist = {
"keylist", cfg_parse_bracketed_list, cfg_print_bracketed_list, cfg_doc_bracketed_list, &cfg_rep_list,
};
static cfg_type_t cfg_type_trustedkeys = {
"trusted-keys", cfg_parse_bracketed_list, cfg_print_bracketed_list, cfg_doc_bracketed_list, &cfg_rep_list,
};
static cfg_type_t cfg_type_forwardtype = {
};
static const char *zonetype_enums[] = {
static cfg_type_t cfg_type_zonetype = {
};
static const char *loglevel_enums[] = {
static cfg_type_t cfg_type_loglevel = {
};
static const char *transferformat_enums[] = {
static cfg_type_t cfg_type_transferformat = {
};
/*
* The special keyword "none", as used in the pid-file option.
*/
static void
}
static cfg_type_t cfg_type_none = {
};
/*
* A quoted string or the special keyword "none". Used in the pid-file option.
*/
static isc_result_t
{
return (result);
}
static void
}
static cfg_type_t cfg_type_qstringornone = {
/*
* Clauses that can be found within the top level of the named.conf
* file only.
*/
static cfg_clausedef_t
namedconf_clauses[] = {
{ "options", &cfg_type_options, 0 },
{ "logging", &cfg_type_logging, 0 },
};
/*
* Clauses that can occur at the top level or in the view
* statement, but not in the options block.
*/
static cfg_clausedef_t
};
/*
* Clauses that can be found within the 'options' statement.
*/
static cfg_clausedef_t
options_clauses[] = {
{ "blackhole", &cfg_type_bracketed_aml, 0 },
{ "coresize", &cfg_type_size, 0 },
{ "datasize", &cfg_type_size, 0 },
{ "dump-file", &cfg_type_qstring, 0 },
{ "files", &cfg_type_size, 0 },
{ "heartbeat-interval", &cfg_type_uint32, 0 },
{ "hostname", &cfg_type_qstringornone, 0 },
{ "interface-interval", &cfg_type_uint32, 0 },
{ "match-mapped-addresses", &cfg_type_boolean, 0 },
{ "max-journal-size", &cfg_type_sizenodefault, 0 },
{ "memstatistics-file", &cfg_type_qstring, 0 },
{ "pid-file", &cfg_type_qstringornone, 0 },
{ "port", &cfg_type_uint32, 0 },
{ "random-device", &cfg_type_qstring, 0 },
{ "recursive-clients", &cfg_type_uint32, 0 },
{ "serial-query-rate", &cfg_type_uint32, 0 },
{ "stacksize", &cfg_type_size, 0 },
{ "statistics-file", &cfg_type_qstring, 0 },
{ "tcp-clients", &cfg_type_uint32, 0 },
{ "tkey-dhkey", &cfg_type_tkey_dhkey, 0 },
{ "tkey-gssapi-credential", &cfg_type_qstring, 0 },
{ "tkey-domain", &cfg_type_qstring, 0 },
{ "transfers-per-ns", &cfg_type_uint32, 0 },
{ "transfers-in", &cfg_type_uint32, 0 },
{ "transfers-out", &cfg_type_uint32, 0 },
{ "use-ixfr", &cfg_type_boolean, 0 },
{ "version", &cfg_type_qstringornone, 0 },
};
/*
* Clauses that can be found within the 'view' statement,
* with defaults in the 'options' statement.
*/
static cfg_clausedef_t
view_clauses[] = {
{ "allow-recursion", &cfg_type_bracketed_aml, 0 },
{ "allow-v6-synthesis", &cfg_type_bracketed_aml, 0 },
{ "sortlist", &cfg_type_bracketed_aml, 0 },
{ "minimal-responses", &cfg_type_boolean, 0 },
{ "recursion", &cfg_type_boolean, 0 },
{ "provide-ixfr", &cfg_type_boolean, 0 },
{ "request-ixfr", &cfg_type_boolean, 0 },
{ "additional-from-auth", &cfg_type_boolean, 0 },
{ "additional-from-cache", &cfg_type_boolean, 0 },
/*
* Note that the query-source option syntax is different
* from the other -source options.
*/
{ "query-source", &cfg_type_querysource4, 0 },
{ "query-source-v6", &cfg_type_querysource6, 0 },
{ "cleaning-interval", &cfg_type_uint32, 0 },
{ "lame-ttl", &cfg_type_uint32, 0 },
{ "max-ncache-ttl", &cfg_type_uint32, 0 },
{ "max-cache-ttl", &cfg_type_uint32, 0 },
{ "transfer-format", &cfg_type_transferformat, 0 },
{ "max-cache-size", &cfg_type_sizenodefault, 0 },
{ "check-names", &cfg_type_checknames,
{ "cache-file", &cfg_type_qstring, 0 },
};
/*
* Clauses that can be found within the 'view' statement only.
*/
static cfg_clausedef_t
view_only_clauses[] = {
{ "match-clients", &cfg_type_bracketed_aml, 0 },
{ "match-destinations", &cfg_type_bracketed_aml, 0 },
{ "match-recursive-only", &cfg_type_boolean, 0 },
};
/*
* Clauses that can be found in a 'zone' statement,
* with defaults in the 'view' or 'options' statement.
*/
static cfg_clausedef_t
zone_clauses[] = {
{ "allow-query", &cfg_type_bracketed_aml, 0 },
{ "allow-transfer", &cfg_type_bracketed_aml, 0 },
{ "allow-update-forwarding", &cfg_type_bracketed_aml, 0 },
{ "allow-notify", &cfg_type_bracketed_aml, 0 },
{ "notify", &cfg_type_notifytype, 0 },
{ "notify-source", &cfg_type_sockaddr4wild, 0 },
{ "notify-source-v6", &cfg_type_sockaddr6wild, 0 },
{ "also-notify", &cfg_type_portiplist, 0 },
{ "dialup", &cfg_type_dialuptype, 0 },
{ "forward", &cfg_type_forwardtype, 0 },
{ "forwarders", &cfg_type_portiplist, 0 },
{ "ixfr-from-differences", &cfg_type_boolean, 0 },
{ "transfer-source", &cfg_type_sockaddr4wild, 0 },
{ "transfer-source-v6", &cfg_type_sockaddr6wild, 0 },
{ "max-transfer-time-in", &cfg_type_uint32, 0 },
{ "max-transfer-time-out", &cfg_type_uint32, 0 },
{ "max-transfer-idle-in", &cfg_type_uint32, 0 },
{ "max-transfer-idle-out", &cfg_type_uint32, 0 },
{ "max-retry-time", &cfg_type_uint32, 0 },
{ "min-retry-time", &cfg_type_uint32, 0 },
{ "max-refresh-time", &cfg_type_uint32, 0 },
{ "min-refresh-time", &cfg_type_uint32, 0 },
{ "sig-validity-interval", &cfg_type_uint32, 0 },
{ "zone-statistics", &cfg_type_boolean, 0 },
{ "key-directory", &cfg_type_qstring, 0 },
};
/*
* Clauses that can be found in a 'zone' statement
* only.
*/
static cfg_clausedef_t
zone_only_clauses[] = {
{ "type", &cfg_type_zonetype, 0 },
{ "allow-update", &cfg_type_bracketed_aml, 0 },
{ "file", &cfg_type_qstring, 0 },
{ "masters", &cfg_type_sockaddrkeylist, 0 },
{ "pubkey", &cfg_type_pubkey,
{ "update-policy", &cfg_type_updatepolicy, 0 },
{ "database", &cfg_type_astring, 0 },
/*
* Note that the format of the check-names option is different between
*/
};
/* The top-level named.conf syntax. */
static cfg_clausedef_t *
namedconf_clausesets[] = {
};
};
/* The "options" statement syntax. */
static cfg_clausedef_t *
options_clausesets[] = {
};
static cfg_type_t cfg_type_options = {
/* The "view" statement syntax. */
static cfg_clausedef_t *
view_clausesets[] = {
};
static cfg_type_t cfg_type_viewopts = {
/* The "zone" statement syntax. */
static cfg_clausedef_t *
zone_clausesets[] = {
};
static cfg_type_t cfg_type_zoneopts = {
/*
* Clauses that can be found within the 'key' statement.
*/
static cfg_clausedef_t
key_clauses[] = {
{ "algorithm", &cfg_type_astring, 0 },
{ "secret", &cfg_type_astring, 0 },
};
static cfg_clausedef_t *
key_clausesets[] = {
};
static cfg_type_t cfg_type_key = {
/*
* Clauses that can be found in a 'server' statement.
*/
static cfg_clausedef_t
server_clauses[] = {
{ "bogus", &cfg_type_boolean, 0 },
{ "provide-ixfr", &cfg_type_boolean, 0 },
{ "request-ixfr", &cfg_type_boolean, 0 },
{ "transfers", &cfg_type_uint32, 0 },
{ "transfer-format", &cfg_type_transferformat, 0 },
{ "keys", &cfg_type_server_key_kludge, 0 },
{ "edns", &cfg_type_boolean, 0 },
};
static cfg_clausedef_t *
server_clausesets[] = {
};
static cfg_type_t cfg_type_server = {
};
/*
* Clauses that can be found in a 'channel' clause in the
* 'logging' statement.
*
* These have some additional constraints that need to be
* checked after parsing:
*
*/
static cfg_clausedef_t
channel_clauses[] = {
/* Destinations. We no longer require these to be first. */
{ "file", &cfg_type_logfile, 0 },
{ "syslog", &cfg_type_optional_facility, 0 },
{ "null", &cfg_type_void, 0 },
{ "stderr", &cfg_type_void, 0 },
/* Options. We now accept these for the null channel, too. */
{ "severity", &cfg_type_logseverity, 0 },
{ "print-time", &cfg_type_boolean, 0 },
{ "print-severity", &cfg_type_boolean, 0 },
{ "print-category", &cfg_type_boolean, 0 },
};
static cfg_clausedef_t *
channel_clausesets[] = {
};
static cfg_type_t cfg_type_channel = {
};
/* A list of log destination, used in the "category" clause. */
static cfg_type_t cfg_type_destinationlist = {
&cfg_rep_list, &cfg_type_astring };
/*
* Clauses that can be found in a 'logging' statement.
*/
static cfg_clausedef_t
logging_clauses[] = {
};
static cfg_clausedef_t *
logging_clausesets[] = {
};
static cfg_type_t cfg_type_logging = {
static isc_result_t
char *endp;
unsigned int len;
if (*endp == 0) {
return (ISC_R_SUCCESS);
}
return (ISC_R_FAILURE);
case 'k':
case 'K':
unit = 1024;
break;
case 'm':
case 'M':
break;
case 'g':
case 'G':
break;
default:
return (ISC_R_FAILURE);
}
return (ISC_R_FAILURE);
return (ISC_R_SUCCESS);
}
static isc_result_t
return (ISC_R_SUCCESS);
return (result);
}
/*
* A size value (number + optional unit).
*/
static cfg_type_t cfg_type_sizeval = {
&cfg_rep_uint64, NULL };
/*
* A size, "unlimited", or "default".
*/
static isc_result_t
}
static cfg_type_t cfg_type_size = {
};
/*
* A size or "unlimited", but not "default".
*/
static cfg_type_t cfg_type_sizenodefault = {
};
/*
* optional_keyvalue
*/
static isc_result_t
{
} else {
if (optional) {
} else {
goto cleanup;
}
}
return (result);
}
static isc_result_t
{
} else {
}
return (result);
}
static void
#if 0 /* XXX */
#endif
}
static isc_result_t
}
static isc_result_t
}
static void
}
static void
}
static void
}
static const char *dialup_enums[] = {
static isc_result_t
}
static cfg_type_t cfg_type_dialuptype = {
};
static isc_result_t
}
static cfg_type_t cfg_type_notifytype = {
};
};
static cfg_type_t cfg_type_optional_keyref = {
};
/*
* A "controls" statement is represented as a map with the multivalued
* "inet" and "unix" clauses. Inet controls are tuples; unix controls
* are cfg_unsupported_t objects.
*/
static keyword_type_t controls_allow_kw = {
"allow", &cfg_type_bracketed_aml };
static cfg_type_t cfg_type_controls_allow = {
"controls_allow", parse_keyvalue,
};
static keyword_type_t controls_keys_kw = {
"keys", &cfg_type_keylist };
static cfg_type_t cfg_type_controls_keys = {
"controls_keys", parse_optional_keyvalue,
};
static cfg_tuplefielddef_t inetcontrol_fields[] = {
{ "address", &cfg_type_controls_sockaddr, 0 },
{ "allow", &cfg_type_controls_allow, 0 },
{ "keys", &cfg_type_controls_keys, 0 },
};
static cfg_type_t cfg_type_inetcontrol = {
};
static cfg_clausedef_t
controls_clauses[] = {
{ "unix", &cfg_type_unsupported,
};
static cfg_clausedef_t *
controls_clausesets[] = {
};
static cfg_type_t cfg_type_controls = {
};
/*
* An optional class, as used in view and zone statements.
*/
static isc_result_t
else
return (result);
}
static cfg_type_t cfg_type_optional_class = {
};
static isc_result_t
unsigned int have_address = 0;
unsigned int have_port = 0;
if ((flags & CFG_ADDR_V4OK) != 0)
else if ((flags & CFG_ADDR_V6OK) != 0)
else
INSIST(0);
port = 0;
for (;;) {
"address") == 0)
{
/* read "address" */
&netaddr));
have_address++;
{
/* read "port" */
&port));
have_port++;
} else {
"expected 'address' or 'port'");
return (ISC_R_UNEXPECTEDTOKEN);
}
} else
break;
}
have_address + have_port == 0) {
return (ISC_R_UNEXPECTEDTOKEN);
}
return (ISC_R_SUCCESS);
return (result);
}
static isc_result_t
}
static isc_result_t
}
static void
}
static cfg_type_t cfg_type_querysource4 = {
};
static cfg_type_t cfg_type_querysource6 = {
};
static cfg_type_t cfg_type_querysource = {
/* addrmatchelt */
static isc_result_t
} else {
{
} else {
}
}
/* Nested match list. */
} else {
goto bad;
}
} else {
bad:
"expected IP match list element");
return (ISC_R_UNEXPECTEDTOKEN);
}
return (result);
}
/*
* A negated address match list element (like "! 10.0.0.1").
* Somewhat sneakily, the caller is expected to parse the
* "!", but not to print it.
*/
static cfg_tuplefielddef_t negated_fields[] = {
{ "value", &cfg_type_addrmatchelt, 0 },
};
static void
}
static cfg_type_t cfg_type_negated = {
};
/* An address match list element */
static cfg_type_t cfg_type_addrmatchelt = {
};
/* A bracketed address match list */
static cfg_type_t cfg_type_bracketed_aml = {
};
/*
* The socket address syntax in the "controls" statement is silly.
* It allows both socket address families, but also allows "*",
* whis is gratuitously interpreted as the IPv4 wildcard address.
*/
static unsigned int controls_sockaddr_flags =
static cfg_type_t cfg_type_controls_sockaddr = {
};
/*
* Handle the special kludge syntax of the "keys" clause in the "server"
* statement, which takes a single key with or without braces and semicolon.
*/
static isc_result_t
{
/* Allow opening brace. */
}
if (braces) {
/* Skip semicolon if present. */
}
return (result);
}
static cfg_type_t cfg_type_server_key_kludge = {
};
/*
* An optional logging facility.
*/
static isc_result_t
{
} else {
}
return (result);
}
static cfg_type_t cfg_type_optional_facility = {
/*
* A log severity. Return as a string, except "debug N",
* which is returned as a keyword object.
*/
static cfg_type_t cfg_type_debuglevel = {
"debuglevel", parse_keyvalue,
};
static isc_result_t
} else {
/*
* The debug level is optional and defaults to 1.
* This makes little sense, but we support it for
* compatibility with BIND 8.
*/
}
} else {
}
return (result);
}
static cfg_type_t cfg_type_logseverity = {
/*
* The "file" clause of the "channel" statement.
* This is yet another special case.
*/
static isc_result_t
}
static cfg_type_t cfg_type_logversions = {
};
static cfg_tuplefielddef_t logfile_fields[] = {
{ "file", &cfg_type_qstring, 0 },
{ "versions", &cfg_type_logversions, 0 },
{ "size", &cfg_type_size, 0 },
};
static isc_result_t
/* Parse the mandatory "file" field */
/* Parse "versions" and "size" fields in any order. */
for (;;) {
"versions") == 0 &&
"size") == 0 &&
} else {
break;
}
} else {
break;
}
}
/* Create void objects for missing optional values. */
return (ISC_R_SUCCESS);
return (result);
}
static void
}
}
}
static cfg_type_t cfg_type_logfile = {
};
static cfg_type_t cfg_type_sockaddr4wild = {
};
static cfg_type_t cfg_type_sockaddr6wild = {
};
/*
* lwres
*/
static cfg_tuplefielddef_t lwres_view_fields[] = {
{ "name", &cfg_type_astring, 0 },
{ "class", &cfg_type_optional_class, 0 },
};
static cfg_type_t cfg_type_lwres_view = {
};
static cfg_type_t cfg_type_lwres_searchlist = {
&cfg_rep_list, &cfg_type_astring };
static cfg_clausedef_t
lwres_clauses[] = {
{ "listen-on", &cfg_type_portiplist, 0 },
{ "view", &cfg_type_lwres_view, 0 },
{ "search", &cfg_type_lwres_searchlist, 0 },
{ "ndots", &cfg_type_uint32, 0 },
};
static cfg_clausedef_t *
lwres_clausesets[] = {
};
static cfg_type_t cfg_type_lwres = {
/*
* rndc
*/
static cfg_clausedef_t
rndcconf_options_clauses[] = {
{ "default-server", &cfg_type_astring, 0 },
{ "default-key", &cfg_type_astring, 0 },
{ "default-port", &cfg_type_uint32, 0 },
};
static cfg_clausedef_t *
};
static cfg_type_t cfg_type_rndcconf_options = {
};
static cfg_clausedef_t
rndcconf_server_clauses[] = {
{ "key", &cfg_type_astring, 0 },
{ "port", &cfg_type_uint32, 0 },
};
static cfg_clausedef_t *
};
static cfg_type_t cfg_type_rndcconf_server = {
};
static cfg_clausedef_t
rndcconf_clauses[] = {
{ "options", &cfg_type_rndcconf_options, 0 },
};
static cfg_clausedef_t *
rndcconf_clausesets[] = {
};
};
static cfg_clausedef_t
rndckey_clauses[] = {
{ "key", &cfg_type_key, 0 },
};
static cfg_clausedef_t *
rndckey_clausesets[] = {
};
};