From e9d21cee3b89a6a35efccfe45335c6749481de03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0pa=C4=8Dek?= Date: Wed, 11 May 2022 09:20:51 +0200 Subject: [PATCH] Add rndc.conf grammar into doc/misc It uses the same mechanism as all other grammars, but the file is named differently to distinguish it from named.conf grammars. (cherry picked from commit fb474de3ab64196c0d3d37d333023502425e7e23) --- .reuse/dep5 | 1 + doc/misc/Makefile.am | 4 ++++ doc/misc/rndc.grammar | 21 +++++++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 doc/misc/rndc.grammar diff --git a/.reuse/dep5 b/.reuse/dep5 index de69b93035..d539cad8e1 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -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 diff --git a/doc/misc/Makefile.am b/doc/misc/Makefile.am index 30a3c30e80..b4c5f40621 100644 --- a/doc/misc/Makefile.am +++ b/doc/misc/Makefile.am @@ -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 index 0000000000..716a21d938 --- /dev/null +++ b/doc/misc/rndc.grammar @@ -0,0 +1,21 @@ +key { + algorithm ; + secret ; +}; // may occur multiple times + +options { + default-key ; + default-port ; + default-server ; + default-source-address ( | * ); + default-source-address-v6 ( | * ); +}; + +server { + addresses { ( [ port ] [ dscp ] | [ port ] [ dscp ] | [ port ] [ dscp ] ); ... }; + key ; + port ; + source-address ( | * ); + source-address-v6 ( | * ); +}; // may occur multiple times +