4520. [cleanup] Alphabetise more of the grammar when printing it

out. Fix unbalanced indenting. [RT #43755]

(cherry picked from commit 4352551d23)
This commit is contained in:
Mark Andrews 2016-11-29 15:28:28 +11:00
parent c04ad8ac8a
commit ef3856d2b2
2 changed files with 161 additions and 114 deletions

View file

@ -1,3 +1,6 @@
4520. [cleanup] Alphabetise more of the grammar when printing it
out. [RT #43755]
4519. [port] win32: handle ERROR_MORE_DATA. [RT #43534]
4515. [port] FreeBSD: Find readline headers when they are in

View file

@ -135,8 +135,8 @@ static cfg_tuplefielddef_t tkey_dhkey_fields[] = {
};
static cfg_type_t cfg_type_tkey_dhkey = {
"tkey-dhkey", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple, &cfg_rep_tuple,
tkey_dhkey_fields
"tkey-dhkey", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple,
&cfg_rep_tuple, tkey_dhkey_fields
};
/*% listen-on */
@ -158,7 +158,9 @@ static cfg_tuplefielddef_t acl_fields[] = {
};
static cfg_type_t cfg_type_acl = {
"acl", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple, &cfg_rep_tuple, acl_fields };
"acl", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple,
&cfg_rep_tuple, acl_fields
};
/*% masters */
static cfg_tuplefielddef_t masters_fields[] = {
@ -169,7 +171,9 @@ static cfg_tuplefielddef_t masters_fields[] = {
};
static cfg_type_t cfg_type_masters = {
"masters", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple, &cfg_rep_tuple, masters_fields };
"masters", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple,
&cfg_rep_tuple, masters_fields
};
/*%
* "sockaddrkeylist", a list of socket addresses with optional keys
@ -185,13 +189,14 @@ static cfg_tuplefielddef_t namesockaddrkey_fields[] = {
};
static cfg_type_t cfg_type_namesockaddrkey = {
"namesockaddrkey", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple, &cfg_rep_tuple,
namesockaddrkey_fields
"namesockaddrkey", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple,
&cfg_rep_tuple, namesockaddrkey_fields
};
static cfg_type_t cfg_type_bracketed_namesockaddrkeylist = {
"bracketed_namesockaddrkeylist", cfg_parse_bracketed_list,
cfg_print_bracketed_list, cfg_doc_bracketed_list, &cfg_rep_list, &cfg_type_namesockaddrkey
cfg_print_bracketed_list, cfg_doc_bracketed_list, &cfg_rep_list,
&cfg_type_namesockaddrkey
};
static cfg_tuplefielddef_t namesockaddrkeylist_fields[] = {
@ -200,8 +205,8 @@ static cfg_tuplefielddef_t namesockaddrkeylist_fields[] = {
{ NULL, NULL, 0 }
};
static cfg_type_t cfg_type_namesockaddrkeylist = {
"sockaddrkeylist", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple, &cfg_rep_tuple,
namesockaddrkeylist_fields
"sockaddrkeylist", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple,
&cfg_rep_tuple, namesockaddrkeylist_fields
};
/*%
@ -230,7 +235,8 @@ static cfg_tuplefielddef_t pubkey_fields[] = {
};
static cfg_type_t cfg_type_pubkey = {
"pubkey", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple,
&cfg_rep_tuple, pubkey_fields };
&cfg_rep_tuple, pubkey_fields
};
/*%
* A list of RR types, used in grant statements.
@ -241,15 +247,14 @@ static cfg_type_t cfg_type_rrtypelist = {
cfg_doc_terminal, &cfg_rep_list, &cfg_type_astring
};
static const char *mode_enums[] = { "grant", "deny", NULL };
static const char *mode_enums[] = { "deny", "grant", NULL };
static cfg_type_t cfg_type_mode = {
"mode", cfg_parse_enum, cfg_print_ustring, cfg_doc_enum,
&cfg_rep_string, &mode_enums
};
static isc_result_t
parse_matchtype(cfg_parser_t *pctx, const cfg_type_t *type,
cfg_obj_t **ret) {
parse_matchtype(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
isc_result_t result;
CHECK(cfg_peektoken(pctx, 0));
@ -287,9 +292,10 @@ doc_matchname(cfg_printer_t *pctx, const cfg_type_t *type) {
}
static const char *matchtype_enums[] = {
"name", "subdomain", "wildcard", "self", "selfsub", "selfwild",
"krb5-self", "ms-self", "krb5-subdomain", "ms-subdomain",
"tcp-self", "6to4-self", "zonesub", "external", NULL };
"6to4-self", "external", "krb5-self", "krb5-subdomain", "ms-self",
"ms-subdomain", "name", "self", "selfsub", "selfwild", "subdomain",
"tcp-self", "wildcard", "zonesub", NULL
};
static cfg_type_t cfg_type_matchtype = {
"matchtype", parse_matchtype, cfg_print_ustring,
@ -324,7 +330,8 @@ static cfg_type_t cfg_type_updatepolicy = {
static isc_result_t
parse_updatepolicy(cfg_parser_t *pctx, const cfg_type_t *type,
cfg_obj_t **ret) {
cfg_obj_t **ret)
{
isc_result_t result;
CHECK(cfg_gettoken(pctx, 0));
if (pctx->token.type == isc_tokentype_special &&
@ -465,8 +472,8 @@ static cfg_type_t cfg_type_optional_wild_type = {
static keyword_type_t wild_name_kw = { "name", &cfg_type_qstring };
static cfg_type_t cfg_type_optional_wild_name = {
"optional_wild_name", parse_optional_keyvalue,
print_keyvalue, doc_optional_keyvalue, &cfg_rep_string, &wild_name_kw
"optional_wild_name", parse_optional_keyvalue, print_keyvalue,
doc_optional_keyvalue, &cfg_rep_string, &wild_name_kw
};
/*%
@ -481,8 +488,8 @@ static cfg_tuplefielddef_t rrsetorderingelement_fields[] = {
{ NULL, NULL, 0 }
};
static cfg_type_t cfg_type_rrsetorderingelement = {
"rrsetorderingelement", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple, &cfg_rep_tuple,
rrsetorderingelement_fields
"rrsetorderingelement", cfg_parse_tuple, cfg_print_tuple,
cfg_doc_tuple, &cfg_rep_tuple, rrsetorderingelement_fields
};
/*%
@ -524,13 +531,17 @@ static cfg_type_t cfg_type_bracketed_sockaddrlist = {
&cfg_rep_list, &cfg_type_sockaddr
};
static const char *autodnssec_enums[] = { "allow", "maintain", "off", NULL };
static const char *autodnssec_enums[] = {
"allow", "maintain", "off", NULL
};
static cfg_type_t cfg_type_autodnssec = {
"autodnssec", cfg_parse_enum, cfg_print_ustring, cfg_doc_enum,
&cfg_rep_string, &autodnssec_enums
};
static const char *dnssecupdatemode_enums[] = { "maintain", "no-resign", NULL };
static const char *dnssecupdatemode_enums[] = {
"maintain", "no-resign", NULL
};
static cfg_type_t cfg_type_dnssecupdatemode = {
"dnssecupdatemode", cfg_parse_enum, cfg_print_ustring, cfg_doc_enum,
&cfg_rep_string, &dnssecupdatemode_enums
@ -602,30 +613,33 @@ static cfg_type_t cfg_type_managedkeys = {
static const char *forwardtype_enums[] = { "first", "only", NULL };
static cfg_type_t cfg_type_forwardtype = {
"forwardtype", cfg_parse_enum, cfg_print_ustring, cfg_doc_enum, &cfg_rep_string,
&forwardtype_enums
"forwardtype", cfg_parse_enum, cfg_print_ustring, cfg_doc_enum,
&cfg_rep_string, &forwardtype_enums
};
static const char *zonetype_enums[] = {
"master", "slave", "stub", "static-stub", "hint", "forward",
"delegation-only", "redirect", NULL };
"delegation-only", "forward", "hint", "master", "redirect",
"slave", "static-stub", "stub", NULL
};
static cfg_type_t cfg_type_zonetype = {
"zonetype", cfg_parse_enum, cfg_print_ustring, cfg_doc_enum,
&cfg_rep_string, &zonetype_enums
};
static const char *loglevel_enums[] = {
"critical", "error", "warning", "notice", "info", "dynamic", NULL };
"critical", "error", "warning", "notice", "info", "dynamic", NULL
};
static cfg_type_t cfg_type_loglevel = {
"loglevel", cfg_parse_enum, cfg_print_ustring, cfg_doc_enum, &cfg_rep_string,
&loglevel_enums
"loglevel", cfg_parse_enum, cfg_print_ustring, cfg_doc_enum,
&cfg_rep_string, &loglevel_enums
};
static const char *transferformat_enums[] = {
"many-answers", "one-answer", NULL };
"many-answers", "one-answer", NULL
};
static cfg_type_t cfg_type_transferformat = {
"transferformat", cfg_parse_enum, cfg_print_ustring, cfg_doc_enum, &cfg_rep_string,
&transferformat_enums
"transferformat", cfg_parse_enum, cfg_print_ustring, cfg_doc_enum,
&cfg_rep_string, &transferformat_enums
};
/*%
@ -687,9 +701,7 @@ static cfg_type_t cfg_type_auto = {
};
static isc_result_t
parse_boolorauto(cfg_parser_t *pctx, const cfg_type_t *type,
cfg_obj_t **ret)
{
parse_boolorauto(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
isc_result_t result;
CHECK(cfg_gettoken(pctx, CFG_LEXOPT_QSTRING));
@ -910,15 +922,15 @@ static cfg_type_t cfg_type_fetchesper = {
*/
static cfg_clausedef_t
namedconf_clauses[] = {
{ "options", &cfg_type_options, 0 },
{ "controls", &cfg_type_controls, CFG_CLAUSEFLAG_MULTI },
{ "acl", &cfg_type_acl, CFG_CLAUSEFLAG_MULTI },
{ "masters", &cfg_type_masters, CFG_CLAUSEFLAG_MULTI },
{ "controls", &cfg_type_controls, CFG_CLAUSEFLAG_MULTI },
{ "logging", &cfg_type_logging, 0 },
{ "view", &cfg_type_view, CFG_CLAUSEFLAG_MULTI },
{ "lwres", &cfg_type_lwres, CFG_CLAUSEFLAG_MULTI },
{ "masters", &cfg_type_masters, CFG_CLAUSEFLAG_MULTI },
{ "options", &cfg_type_options, 0 },
{ "statistics-channels", &cfg_type_statschannels,
CFG_CLAUSEFLAG_MULTI },
{ "view", &cfg_type_view, CFG_CLAUSEFLAG_MULTI },
{ NULL, NULL, 0 }
};
@ -928,13 +940,12 @@ namedconf_clauses[] = {
*/
static cfg_clausedef_t
namedconf_or_view_clauses[] = {
{ "key", &cfg_type_key, CFG_CLAUSEFLAG_MULTI },
{ "zone", &cfg_type_zone, CFG_CLAUSEFLAG_MULTI },
/* only 1 DLZ per view allowed */
{ "dlz", &cfg_type_dlz, 0 },
{ "key", &cfg_type_key, CFG_CLAUSEFLAG_MULTI },
{ "server", &cfg_type_server, CFG_CLAUSEFLAG_MULTI },
{ "trusted-keys", &cfg_type_dnsseckeys, CFG_CLAUSEFLAG_MULTI },
{ "managed-keys", &cfg_type_managedkeys, CFG_CLAUSEFLAG_MULTI },
{ "zone", &cfg_type_zone, CFG_CLAUSEFLAG_MULTI },
{ NULL, NULL, 0 }
};
@ -943,8 +954,8 @@ namedconf_or_view_clauses[] = {
*/
static cfg_clausedef_t
bindkeys_clauses[] = {
{ "trusted-keys", &cfg_type_dnsseckeys, CFG_CLAUSEFLAG_MULTI },
{ "managed-keys", &cfg_type_managedkeys, CFG_CLAUSEFLAG_MULTI },
{ "trusted-keys", &cfg_type_dnsseckeys, CFG_CLAUSEFLAG_MULTI },
{ NULL, NULL, 0 }
};
@ -1017,19 +1028,24 @@ options_clauses[] = {
static cfg_type_t cfg_type_namelist = {
"namelist", cfg_parse_bracketed_list, cfg_print_bracketed_list,
cfg_doc_bracketed_list, &cfg_rep_list, &cfg_type_qstring };
cfg_doc_bracketed_list, &cfg_rep_list, &cfg_type_qstring
};
static keyword_type_t exclude_kw = { "exclude", &cfg_type_namelist };
static cfg_type_t cfg_type_optional_exclude = {
"optional_exclude", parse_optional_keyvalue, print_keyvalue,
doc_optional_keyvalue, &cfg_rep_list, &exclude_kw };
doc_optional_keyvalue, &cfg_rep_list, &exclude_kw
};
static keyword_type_t exceptionnames_kw = { "except-from", &cfg_type_namelist };
static keyword_type_t exceptionnames_kw = {
"except-from", &cfg_type_namelist
};
static cfg_type_t cfg_type_optional_exceptionnames = {
"optional_allow", parse_optional_keyvalue, print_keyvalue,
doc_optional_keyvalue, &cfg_rep_list, &exceptionnames_kw };
doc_optional_keyvalue, &cfg_rep_list, &exceptionnames_kw
};
static cfg_tuplefielddef_t denyaddresses_fields[] = {
{ "acl", &cfg_type_bracketed_aml, 0 },
@ -1055,7 +1071,8 @@ static cfg_type_t cfg_type_denyaliases = {
static cfg_type_t cfg_type_algorithmlist = {
"algorithmlist", cfg_parse_bracketed_list, cfg_print_bracketed_list,
cfg_doc_bracketed_list, &cfg_rep_list, &cfg_type_astring };
cfg_doc_bracketed_list, &cfg_rep_list, &cfg_type_astring
};
static cfg_tuplefielddef_t disablealgorithm_fields[] = {
{ "name", &cfg_type_astring, 0 },
@ -1079,14 +1096,12 @@ static cfg_type_t cfg_type_mustbesecure = {
&cfg_rep_tuple, mustbesecure_fields
};
static const char *masterformat_enums[] = { "text", "raw", NULL };
static const char *masterformat_enums[] = { "raw", "text", NULL };
static cfg_type_t cfg_type_masterformat = {
"masterformat", cfg_parse_enum, cfg_print_ustring, cfg_doc_enum,
&cfg_rep_string, &masterformat_enums
};
/*%
* response-policy {
* zone <string> [ policy (given|disabled|passthru|
@ -1155,7 +1170,9 @@ cleanup:
* by 2 or more optional keyvalues that can be in any order.
*/
static isc_result_t
cfg_parse_kv_tuple(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
cfg_parse_kv_tuple(cfg_parser_t *pctx, const cfg_type_t *type,
cfg_obj_t **ret)
{
const cfg_tuplefielddef_t *fields, *f;
cfg_obj_t *obj = NULL;
int fn;
@ -1249,8 +1266,8 @@ static cfg_type_t cfg_type_rpz_zone = {
&zone_kw
};
static const char *rpz_policies[] = {
"given", "disabled", "passthru", "no-op", "nxdomain", "nodata",
"cname", NULL
"cname", "disabled", "given", "no-op", "nodata", "nxdomain",
"passthru", NULL
};
static cfg_type_t cfg_type_rpz_policy_name = {
"policy name", cfg_parse_enum, cfg_print_ustring,
@ -1308,27 +1325,26 @@ static cfg_type_t cfg_type_rpz = {
* rate-limit
*/
static cfg_clausedef_t rrl_clauses[] = {
{ "responses-per-second", &cfg_type_uint32, 0 },
{ "referrals-per-second", &cfg_type_uint32, 0 },
{ "nodata-per-second", &cfg_type_uint32, 0 },
{ "nxdomains-per-second", &cfg_type_uint32, 0 },
{ "errors-per-second", &cfg_type_uint32, 0 },
{ "all-per-second", &cfg_type_uint32, 0 },
{ "slip", &cfg_type_uint32, 0 },
{ "window", &cfg_type_uint32, 0 },
{ "log-only", &cfg_type_boolean, 0 },
{ "qps-scale", &cfg_type_uint32, 0 },
{ "errors-per-second", &cfg_type_uint32, 0 },
{ "exempt-clients", &cfg_type_bracketed_aml, 0 },
{ "ipv4-prefix-length", &cfg_type_uint32, 0 },
{ "ipv6-prefix-length", &cfg_type_uint32, 0 },
{ "exempt-clients", &cfg_type_bracketed_aml, 0 },
{ "log-only", &cfg_type_boolean, 0 },
{ "max-table-size", &cfg_type_uint32, 0 },
{ "min-table-size", &cfg_type_uint32, 0 },
{ "nodata-per-second", &cfg_type_uint32, 0 },
{ "nxdomains-per-second", &cfg_type_uint32, 0 },
{ "qps-scale", &cfg_type_uint32, 0 },
{ "referrals-per-second", &cfg_type_uint32, 0 },
{ "responses-per-second", &cfg_type_uint32, 0 },
{ "slip", &cfg_type_uint32, 0 },
{ "window", &cfg_type_uint32, 0 },
{ NULL, NULL, 0 }
};
static cfg_clausedef_t *rrl_clausesets[] = {
rrl_clauses,
NULL
rrl_clauses, NULL
};
static cfg_type_t cfg_type_rrl = {
@ -1381,12 +1397,12 @@ static cfg_type_t cfg_type_lookaside = {
*/
static cfg_clausedef_t
dns64_clauses[] = {
{ "clients", &cfg_type_bracketed_aml, 0 },
{ "mapped", &cfg_type_bracketed_aml, 0 },
{ "exclude", &cfg_type_bracketed_aml, 0 },
{ "suffix", &cfg_type_netaddr6, 0 },
{ "recursive-only", &cfg_type_boolean, 0 },
{ "break-dnssec", &cfg_type_boolean, 0 },
{ "clients", &cfg_type_bracketed_aml, 0 },
{ "exclude", &cfg_type_bracketed_aml, 0 },
{ "mapped", &cfg_type_bracketed_aml, 0 },
{ "recursive-only", &cfg_type_boolean, 0 },
{ "suffix", &cfg_type_netaddr6, 0 },
{ NULL, NULL, 0 },
};
@ -1691,7 +1707,9 @@ options_clausesets[] = {
NULL
};
static cfg_type_t cfg_type_options = {
"options", cfg_parse_map, cfg_print_map, cfg_doc_map, &cfg_rep_map, options_clausesets };
"options", cfg_parse_map, cfg_print_map, cfg_doc_map, &cfg_rep_map,
options_clausesets
};
/*% The "view" statement syntax. */
@ -1785,8 +1803,8 @@ server_clausesets[] = {
NULL
};
static cfg_type_t cfg_type_server = {
"server", cfg_parse_netprefix_map, cfg_print_map, cfg_doc_map, &cfg_rep_map,
server_clausesets
"server", cfg_parse_netprefix_map, cfg_print_map, cfg_doc_map,
&cfg_rep_map, server_clausesets
};
@ -1825,31 +1843,29 @@ static cfg_type_t cfg_type_channel = {
/*% A list of log destination, used in the "category" clause. */
static cfg_type_t cfg_type_destinationlist = {
"destinationlist", cfg_parse_bracketed_list, cfg_print_bracketed_list, cfg_doc_bracketed_list,
&cfg_rep_list, &cfg_type_astring };
"destinationlist", cfg_parse_bracketed_list, cfg_print_bracketed_list,
cfg_doc_bracketed_list, &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_clauses[] = {
{ "channel", &cfg_type_channel, CFG_CLAUSEFLAG_MULTI },
{ "category", &cfg_type_category, CFG_CLAUSEFLAG_MULTI },
{ NULL, NULL, 0 }
};
static cfg_clausedef_t *
logging_clausesets[] = {
logging_clauses,
NULL
static cfg_clausedef_t * logging_clausesets[] = {
logging_clauses, NULL
};
static cfg_type_t cfg_type_logging = {
"logging", cfg_parse_map, cfg_print_map, cfg_doc_map, &cfg_rep_map, logging_clausesets };
"logging", cfg_parse_map, cfg_print_map, cfg_doc_map,
&cfg_rep_map, logging_clausesets
};
/*%
* For parsing an 'addzone' statement
*/
static cfg_tuplefielddef_t addzone_fields[] = {
{ "name", &cfg_type_astring, 0 },
{ "class", &cfg_type_optional_class, 0 },
@ -1858,7 +1874,9 @@ static cfg_tuplefielddef_t addzone_fields[] = {
{ NULL, NULL, 0 }
};
static cfg_type_t cfg_type_addzone = {
"addzone", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple, &cfg_rep_tuple, addzone_fields };
"addzone", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple,
&cfg_rep_tuple, addzone_fields
};
static cfg_clausedef_t
addzoneconf_clauses[] = {
@ -1955,7 +1973,8 @@ parse_sizeval(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
return (ISC_R_SUCCESS);
cleanup:
cfg_parser_error(pctx, CFG_LOG_NEAR, "expected integer and optional unit");
cfg_parser_error(pctx, CFG_LOG_NEAR,
"expected integer and optional unit");
return (result);
}
@ -1964,7 +1983,8 @@ parse_sizeval(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
*/
static cfg_type_t cfg_type_sizeval = {
"sizeval", parse_sizeval, cfg_print_uint64, cfg_doc_terminal,
&cfg_rep_uint64, NULL };
&cfg_rep_uint64, NULL
};
/*%
* A size, "unlimited", or "default".
@ -1980,7 +2000,7 @@ doc_size(cfg_printer_t *pctx, const cfg_type_t *type) {
doc_enum_or_other(pctx, type, &cfg_type_sizeval);
}
static const char *size_enums[] = { "unlimited", "default", NULL };
static const char *size_enums[] = { "default", "unlimited", NULL };
static cfg_type_t cfg_type_size = {
"size", parse_size, cfg_print_ustring, doc_size,
&cfg_rep_string, size_enums
@ -2111,9 +2131,12 @@ doc_optional_keyvalue(cfg_printer_t *pctx, const cfg_type_t *type) {
}
static const char *dialup_enums[] = {
"notify", "notify-passive", "refresh", "passive", NULL };
"notify", "notify-passive", "passive", "refresh", NULL
};
static isc_result_t
parse_dialup_type(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
parse_dialup_type(cfg_parser_t *pctx, const cfg_type_t *type,
cfg_obj_t **ret)
{
return (parse_enum_or_other(pctx, type, &cfg_type_boolean, ret));
}
static void
@ -2127,7 +2150,9 @@ static cfg_type_t cfg_type_dialuptype = {
static const char *notify_enums[] = { "explicit", "master-only", NULL };
static isc_result_t
parse_notify_type(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
parse_notify_type(cfg_parser_t *pctx, const cfg_type_t *type,
cfg_obj_t **ret)
{
return (parse_enum_or_other(pctx, type, &cfg_type_boolean, ret));
}
static void
@ -2197,7 +2222,8 @@ static cfg_type_t cfg_type_controls_allow = {
};
static keyword_type_t controls_keys_kw = {
"keys", &cfg_type_keylist };
"keys", &cfg_type_keylist
};
static cfg_type_t cfg_type_controls_keys = {
"controls_keys", parse_optional_keyvalue,
@ -2213,12 +2239,13 @@ static cfg_tuplefielddef_t inetcontrol_fields[] = {
};
static cfg_type_t cfg_type_inetcontrol = {
"inetcontrol", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple, &cfg_rep_tuple,
inetcontrol_fields
"inetcontrol", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple,
&cfg_rep_tuple, inetcontrol_fields
};
static keyword_type_t controls_perm_kw = {
"perm", &cfg_type_uint32 };
"perm", &cfg_type_uint32
};
static cfg_type_t cfg_type_controls_perm = {
"controls_perm", parse_keyvalue,
@ -2227,7 +2254,8 @@ static cfg_type_t cfg_type_controls_perm = {
};
static keyword_type_t controls_owner_kw = {
"owner", &cfg_type_uint32 };
"owner", &cfg_type_uint32
};
static cfg_type_t cfg_type_controls_owner = {
"controls_owner", parse_keyvalue,
@ -2236,7 +2264,8 @@ static cfg_type_t cfg_type_controls_owner = {
};
static keyword_type_t controls_group_kw = {
"group", &cfg_type_uint32 };
"group", &cfg_type_uint32
};
static cfg_type_t cfg_type_controls_group = {
"controls_allow", parse_keyvalue,
@ -2254,8 +2283,8 @@ static cfg_tuplefielddef_t unixcontrol_fields[] = {
};
static cfg_type_t cfg_type_unixcontrol = {
"unixcontrol", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple, &cfg_rep_tuple,
unixcontrol_fields
"unixcontrol", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple,
&cfg_rep_tuple, unixcontrol_fields
};
static cfg_clausedef_t
@ -2271,7 +2300,8 @@ controls_clausesets[] = {
NULL
};
static cfg_type_t cfg_type_controls = {
"controls", cfg_parse_map, cfg_print_map, cfg_doc_map, &cfg_rep_map, &controls_clausesets
"controls", cfg_parse_map, cfg_print_map, cfg_doc_map, &cfg_rep_map,
&controls_clausesets
};
/*%
@ -2349,7 +2379,9 @@ static cfg_type_t cfg_type_optional_class = {
};
static isc_result_t
parse_querysource(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
parse_querysource(cfg_parser_t *pctx, const cfg_type_t *type,
cfg_obj_t **ret)
{
isc_result_t result;
cfg_obj_t *obj = NULL;
isc_netaddr_t netaddr;
@ -2443,7 +2475,9 @@ static cfg_type_t cfg_type_querysource = {
/*% addrmatchelt */
static isc_result_t
parse_addrmatchelt(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
parse_addrmatchelt(cfg_parser_t *pctx, const cfg_type_t *type,
cfg_obj_t **ret)
{
isc_result_t result;
UNUSED(type);
@ -2577,7 +2611,8 @@ static cfg_type_t cfg_type_server_key_kludge = {
*/
static isc_result_t
parse_optional_facility(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
parse_optional_facility(cfg_parser_t *pctx, const cfg_type_t *type,
cfg_obj_t **ret)
{
isc_result_t result;
UNUSED(type);
@ -2601,7 +2636,8 @@ doc_optional_facility(cfg_printer_t *pctx, const cfg_type_t *type) {
static cfg_type_t cfg_type_optional_facility = {
"optional_facility", parse_optional_facility, NULL,
doc_optional_facility, NULL, NULL };
doc_optional_facility, NULL, NULL
};
/*%
@ -2617,7 +2653,9 @@ static cfg_type_t cfg_type_debuglevel = {
};
static isc_result_t
parse_logseverity(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
parse_logseverity(cfg_parser_t *pctx, const cfg_type_t *type,
cfg_obj_t **ret)
{
isc_result_t result;
UNUSED(type);
@ -2647,7 +2685,8 @@ parse_logseverity(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
static cfg_type_t cfg_type_logseverity = {
"log_severity", parse_logseverity, NULL, cfg_doc_terminal,
NULL, NULL };
NULL, NULL
};
/*%
* The "file" clause of the "channel" statement.
@ -2656,7 +2695,9 @@ static cfg_type_t cfg_type_logseverity = {
static const char *logversions_enums[] = { "unlimited", NULL };
static isc_result_t
parse_logversions(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
parse_logversions(cfg_parser_t *pctx, const cfg_type_t *type,
cfg_obj_t **ret)
{
return (parse_enum_or_other(pctx, type, &cfg_type_uint32, ret));
}
@ -2776,13 +2817,14 @@ static cfg_tuplefielddef_t lwres_view_fields[] = {
{ NULL, NULL, 0 }
};
static cfg_type_t cfg_type_lwres_view = {
"lwres_view", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple, &cfg_rep_tuple,
lwres_view_fields
"lwres_view", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple,
&cfg_rep_tuple, lwres_view_fields
};
static cfg_type_t cfg_type_lwres_searchlist = {
"lwres_searchlist", cfg_parse_bracketed_list, cfg_print_bracketed_list,
cfg_doc_bracketed_list, &cfg_rep_list, &cfg_type_astring };
cfg_doc_bracketed_list, &cfg_rep_list, &cfg_type_astring
};
static cfg_clausedef_t
lwres_clauses[] = {
@ -2934,7 +2976,8 @@ parse_sockaddrnameport(cfg_parser_t *pctx, const cfg_type_t *type,
if (pctx->token.type == isc_tokentype_string ||
pctx->token.type == isc_tokentype_qstring) {
if (cfg_lookingat_netaddr(pctx, CFG_ADDR_V4OK | CFG_ADDR_V6OK))
CHECK(cfg_parse_sockaddr(pctx, &cfg_type_sockaddr, ret));
CHECK(cfg_parse_sockaddr(pctx, &cfg_type_sockaddr,
ret));
else {
const cfg_tuplefielddef_t *fields =
cfg_type_nameport.of;
@ -3016,7 +3059,8 @@ parse_masterselement(cfg_parser_t *pctx, const cfg_type_t *type,
if (pctx->token.type == isc_tokentype_string ||
pctx->token.type == isc_tokentype_qstring) {
if (cfg_lookingat_netaddr(pctx, CFG_ADDR_V4OK | CFG_ADDR_V6OK))
CHECK(cfg_parse_sockaddr(pctx, &cfg_type_sockaddr, ret));
CHECK(cfg_parse_sockaddr(pctx, &cfg_type_sockaddr,
ret));
else
CHECK(cfg_parse_astring(pctx, &cfg_type_astring, ret));
} else {