]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add rndc.conf grammar into doc/misc
authorPetr Špaček <pspacek@isc.org>
Wed, 11 May 2022 07:20:51 +0000 (09:20 +0200)
committerPetr Špaček <pspacek@isc.org>
Fri, 1 Jul 2022 06:56:35 +0000 (08:56 +0200)
It uses the same mechanism as all other grammars, but the file is named
differently to distinguish it from named.conf grammars.

.reuse/dep5
doc/misc/Makefile.am
doc/misc/rndc.grammar [new file with mode: 0644]

index de69b93035f2c20a02c2ba447945248323b178b6..d539cad8e113485536efa410d7e1b0fba654d155 100644 (file)
@@ -156,6 +156,7 @@ Files: **/.clang-format
        doc/misc/*.zoneopt
        doc/misc/options
        doc/misc/options.active
+       doc/misc/rndc.grammar
        tsan-suppressions.txt
 Copyright: Internet Systems Consortium, Inc. ("ISC")
 License: CC0-1.0
index 30a3c30e80def94426aee39af1ca5e45894ddb9d..b4c5f406218aff3e32817bedb0958352e128056f 100644 (file)
@@ -2,6 +2,7 @@ include $(top_srcdir)/Makefile.top
 include $(top_srcdir)/Makefile.docs
 
 OPTIONS_FILES =                                \
+       rndc.grammar                    \
        options                         \
        options.active                  \
        primary.zoneopt                 \
@@ -69,6 +70,9 @@ cfg_test_LDADD =                      \
 BUILT_SOURCES =                                \
        $(OPTIONS_FILES)
 
+rndc.grammar: cfg_test
+       $(AM_V_CFG_TEST)$(builddir)/cfg_test --rndc --grammar | $(PERL) $(srcdir)/sort-options.pl > $@
+
 options: cfg_test
        $(AM_V_CFG_TEST)$(builddir)/cfg_test --named --grammar | $(PERL) $(srcdir)/sort-options.pl > $@
 
diff --git a/doc/misc/rndc.grammar b/doc/misc/rndc.grammar
new file mode 100644 (file)
index 0000000..716a21d
--- /dev/null
@@ -0,0 +1,21 @@
+key <string> {
+       algorithm <string>;
+       secret <string>;
+}; // may occur multiple times
+
+options {
+       default-key <string>;
+       default-port <integer>;
+       default-server <string>;
+       default-source-address ( <ipv4_address> | * );
+       default-source-address-v6 ( <ipv6_address> | * );
+};
+
+server <string> {
+       addresses { ( <quoted_string> [ port <integer> ] [ dscp <integer> ] | <ipv4_address> [ port <integer> ] [ dscp <integer> ] | <ipv6_address> [ port <integer> ] [ dscp <integer> ] ); ... };
+       key <string>;
+       port <integer>;
+       source-address ( <ipv4_address> | * );
+       source-address-v6 ( <ipv6_address> | * );
+}; // may occur multiple times
+