Commit 5c843b38 authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

Add doc function for cfg_type_querysource4 and cfg_type_querysource6 (#43768)

parent e7e20e57
4523. [doc] Expand config doc for <querysource4> and
<querysource6>. [RT #43768]
4522. [bug] Handle big gaps in log file version numbers better.
[RT #38688]
......
......@@ -260,8 +260,12 @@ options {
preferred-glue <string>;
prefetch <integer> [ <integer> ];
provide-ixfr <boolean>;
query-source <querysource4>;
query-source-v6 <querysource6>;
query-source ( ( [ address ] ( <ipv4_address> | * ) [ port (
<integer> | * ) ] ) | ( [ [ address ] ( <ipv4_address> | * ) ]
port ( <integer> | * ) ) ) [ dscp <integer> ];
query-source-v6 ( ( [ address ] ( <ipv6_address> | * ) [ port (
<integer> | * ) ] ) | ( [ [ address ] ( <ipv6_address> | * ) ]
port ( <integer> | * ) ) ) [ dscp <integer> ];
querylog <boolean>;
queryport-pool-ports <integer>; // obsolete
queryport-pool-updateinterval <integer>; // obsolete
......@@ -370,8 +374,12 @@ server <netprefix> {
notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ]
[ dscp <integer> ];
provide-ixfr <boolean>;
query-source <querysource4>;
query-source-v6 <querysource6>;
query-source ( ( [ address ] ( <ipv4_address> | * ) [ port (
<integer> | * ) ] ) | ( [ [ address ] ( <ipv4_address> | * ) ]
port ( <integer> | * ) ) ) [ dscp <integer> ];
query-source-v6 ( ( [ address ] ( <ipv6_address> | * ) [ port (
<integer> | * ) ] ) | ( [ [ address ] ( <ipv6_address> | * ) ]
port ( <integer> | * ) ) ) [ dscp <integer> ];
request-expire <boolean>;
request-ixfr <boolean>;
request-nsid <boolean>;
......@@ -557,8 +565,12 @@ view <string> [ <class> ] {
preferred-glue <string>;
prefetch <integer> [ <integer> ];
provide-ixfr <boolean>;
query-source <querysource4>;
query-source-v6 <querysource6>;
query-source ( ( [ address ] ( <ipv4_address> | * ) [ port (
<integer> | * ) ] ) | ( [ [ address ] ( <ipv4_address> | * ) ]
port ( <integer> | * ) ) ) [ dscp <integer> ];
query-source-v6 ( ( [ address ] ( <ipv6_address> | * ) [ port (
<integer> | * ) ] ) | ( [ [ address ] ( <ipv6_address> | * ) ]
port ( <integer> | * ) ) ) [ dscp <integer> ];
queryport-pool-ports <integer>; // obsolete
queryport-pool-updateinterval <integer>; // obsolete
rate-limit {
......@@ -610,8 +622,14 @@ view <string> [ <class> ] {
notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer>
| * ) ] [ dscp <integer> ];
provide-ixfr <boolean>;
query-source <querysource4>;
query-source-v6 <querysource6>;
query-source ( ( [ address ] ( <ipv4_address> | * ) [ port
( <integer> | * ) ] ) | ( [ [ address ] (
<ipv4_address> | * ) ] port ( <integer> | * ) ) ) [
dscp <integer> ];
query-source-v6 ( ( [ address ] ( <ipv6_address> | * ) [
port ( <integer> | * ) ] ) | ( [ [ address ] (
<ipv6_address> | * ) ] port ( <integer> | * ) ) ) [
dscp <integer> ];
request-expire <boolean>;
request-ixfr <boolean>;
request-nsid <boolean>;
......
......@@ -2989,18 +2989,41 @@ print_querysource(cfg_printer_t *pctx, const cfg_obj_t *obj) {
}
}
static void
doc_querysource(cfg_printer_t *pctx, const cfg_type_t *type) {
const unsigned int *flagp = type->of;
cfg_print_cstr(pctx, "( ( [ address ] ( ");
if (*flagp & CFG_ADDR_V4OK)
cfg_print_cstr(pctx, "<ipv4_address>");
else if (*flagp & CFG_ADDR_V6OK)
cfg_print_cstr(pctx, "<ipv6_address>");
else
INSIST(0);
cfg_print_cstr(pctx, " | * ) [ port ( <integer> | * ) ] ) | "
"( [ [ address ] ( ");
if (*flagp & CFG_ADDR_V4OK)
cfg_print_cstr(pctx, "<ipv4_address>");
else if (*flagp & CFG_ADDR_V6OK)
cfg_print_cstr(pctx, "<ipv6_address>");
else
INSIST(0);
cfg_print_cstr(pctx, " | * ) ] port ( <integer> | * ) ) )"
" [ dscp <integer> ]");
}
static unsigned int sockaddr4wild_flags = CFG_ADDR_WILDOK | CFG_ADDR_V4OK |
CFG_ADDR_DSCPOK;
static unsigned int sockaddr6wild_flags = CFG_ADDR_WILDOK | CFG_ADDR_V6OK |
CFG_ADDR_DSCPOK;
static cfg_type_t cfg_type_querysource4 = {
"querysource4", parse_querysource, NULL, cfg_doc_terminal,
"querysource4", parse_querysource, NULL, doc_querysource,
NULL, &sockaddr4wild_flags
};
static cfg_type_t cfg_type_querysource6 = {
"querysource6", parse_querysource, NULL, cfg_doc_terminal,
"querysource6", parse_querysource, NULL, doc_querysource,
NULL, &sockaddr6wild_flags
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment