Browse Source

[2110] Merge branch 'master' into trac2110

Conflicts:
	src/lib/datasrc/memory/benchmarks/Makefile.am
Jelte Jansen 12 years ago
parent
commit
95758d3d2a
100 changed files with 811 additions and 17345 deletions
  1. 21 0
      ChangeLog
  2. 5 1
      Makefile.am
  3. 27 4
      configure.ac
  4. 3 0
      doc/guide/.gitignore
  5. 19 11
      doc/guide/Makefile.am
  6. 0 2070
      doc/guide/bind10-guide.html
  7. 0 2156
      doc/guide/bind10-guide.txt
  8. 43 26
      doc/guide/bind10-guide.xml
  9. 0 3303
      doc/guide/bind10-messages.html
  10. 0 7116
      doc/guide/bind10-messages.xml
  11. 1 0
      src/bin/auth/.gitignore
  12. 9 2
      src/bin/auth/Makefile.am
  13. 5 0
      src/bin/auth/auth.spec.pre.in
  14. 25 0
      src/bin/auth/auth_config.cc
  15. 22 0
      src/bin/auth/auth_srv.cc
  16. 10 0
      src/bin/auth/auth_srv.h
  17. 0 213
      src/bin/auth/b10-auth.8
  18. 7 0
      src/bin/auth/b10-auth.xml
  19. 1 1
      src/bin/auth/command.cc
  20. 1 2
      src/bin/auth/query.cc
  21. 3 4
      src/bin/auth/tests/auth_srv_unittest.cc
  22. 22 4
      src/bin/auth/tests/config_syntax_unittest.cc
  23. 13 0
      src/bin/auth/tests/config_unittest.cc
  24. 1 0
      src/bin/bind10/.gitignore
  25. 16 2
      src/bin/bind10/Makefile.am
  26. 0 288
      src/bin/bind10/bind10.8
  27. 1 0
      src/bin/bindctl/.gitignore
  28. 9 2
      src/bin/bindctl/Makefile.am
  29. 0 157
      src/bin/bindctl/bindctl.1
  30. 1 0
      src/bin/cfgmgr/.gitignore
  31. 9 2
      src/bin/cfgmgr/Makefile.am
  32. 0 82
      src/bin/cfgmgr/b10-cfgmgr.8
  33. 1 0
      src/bin/cmdctl/.gitignore
  34. 9 2
      src/bin/cmdctl/Makefile.am
  35. 0 133
      src/bin/cmdctl/b10-cmdctl.8
  36. 1 0
      src/bin/dbutil/.gitignore
  37. 9 2
      src/bin/dbutil/Makefile.am
  38. 0 89
      src/bin/dbutil/b10-dbutil.8
  39. 1 0
      src/bin/ddns/.gitignore
  40. 10 2
      src/bin/ddns/Makefile.am
  41. 0 115
      src/bin/ddns/b10-ddns.8
  42. 1 0
      src/bin/dhcp4/.gitignore
  43. 10 2
      src/bin/dhcp4/Makefile.am
  44. 0 60
      src/bin/dhcp4/b10-dhcp4.8
  45. 1 0
      src/bin/dhcp6/.gitignore
  46. 10 2
      src/bin/dhcp6/Makefile.am
  47. 0 51
      src/bin/dhcp6/b10-dhcp6.8
  48. 1 0
      src/bin/host/.gitignore
  49. 9 2
      src/bin/host/Makefile.am
  50. 0 118
      src/bin/host/b10-host.1
  51. 1 0
      src/bin/loadzone/.gitignore
  52. 9 2
      src/bin/loadzone/Makefile.am
  53. 0 80
      src/bin/loadzone/b10-loadzone.8
  54. 1 0
      src/bin/loadzone/tests/correct/Makefile.am
  55. 8 0
      src/bin/loadzone/tests/correct/comment.db
  56. 4 0
      src/bin/loadzone/tests/correct/correct_test.sh.in
  57. 1 1
      src/bin/loadzone/tests/correct/get_zonedatas.py
  58. 6 0
      src/bin/loadzone/tests/correct/known.test.out
  59. 1 0
      src/bin/msgq/.gitignore
  60. 9 2
      src/bin/msgq/Makefile.am
  61. 0 125
      src/bin/msgq/b10-msgq.8
  62. 1 0
      src/bin/resolver/.gitignore
  63. 9 2
      src/bin/resolver/Makefile.am
  64. 0 149
      src/bin/resolver/b10-resolver.8
  65. 1 0
      src/bin/sockcreator/.gitignore
  66. 17 0
      src/bin/sockcreator/Makefile.am
  67. 96 0
      src/bin/sockcreator/b10-sockcreator.xml
  68. 2 0
      src/bin/stats/.gitignore
  69. 10 3
      src/bin/stats/Makefile.am
  70. 0 126
      src/bin/stats/b10-stats-httpd.8
  71. 0 170
      src/bin/stats/b10-stats.8
  72. 1 0
      src/bin/sysinfo/.gitignore
  73. 9 2
      src/bin/sysinfo/Makefile.am
  74. 0 66
      src/bin/sysinfo/isc-sysinfo.1
  75. 1 0
      src/bin/usermgr/.gitignore
  76. 9 2
      src/bin/usermgr/Makefile.am
  77. 0 74
      src/bin/usermgr/b10-cmdctl-usermgr.8
  78. 1 0
      src/bin/xfrin/.gitignore
  79. 9 2
      src/bin/xfrin/Makefile.am
  80. 0 161
      src/bin/xfrin/b10-xfrin.8
  81. 1 0
      src/bin/xfrout/.gitignore
  82. 9 2
      src/bin/xfrout/Makefile.am
  83. 0 149
      src/bin/xfrout/b10-xfrout.8
  84. 1 0
      src/bin/zonemgr/.gitignore
  85. 9 2
      src/bin/zonemgr/Makefile.am
  86. 0 143
      src/bin/zonemgr/b10-zonemgr.8
  87. 13 1
      src/lib/asiodns/dns_server.h
  88. 18 1
      src/lib/asiodns/dns_service.cc
  89. 16 0
      src/lib/asiodns/dns_service.h
  90. 6 2
      src/lib/asiodns/sync_udp_server.cc
  91. 36 0
      src/lib/asiodns/tcp_server.cc
  92. 22 1
      src/lib/asiodns/tcp_server.h
  93. 50 2
      src/lib/asiodns/tests/dns_server_unittest.cc
  94. 4 2
      src/lib/cache/tests/negative_cache_unittest.cc
  95. 4 4
      src/lib/config/ccsession.cc
  96. 12 2
      src/lib/datasrc/datasrc_messages.mes
  97. 1 0
      src/lib/datasrc/memory/Makefile.am
  98. 1 0
      src/lib/datasrc/memory/benchmarks/Makefile.am
  99. 65 43
      src/lib/datasrc/memory/tests/treenode_rrset_unittest.cc
  100. 0 0
      src/lib/datasrc/memory/treenode_rrset.h

+ 21 - 0
ChangeLog

@@ -1,3 +1,24 @@
+473.	[bug]		jelte
+	TCP connections now time out in b10-auth if no (or not all) query
+	data is sent by the client. The timeout value defaults to 5000
+	milliseconds, but is configurable in Auth/tcp_recv_timeout.
+	(Trac #357, git cdf3f04442f8f131542bd1d4a2228a9d0bed12ff)
+
+472.	[build]		jreed
+	All generated documentation is removed from the git repository.
+	The ./configure --enable-man option is removed. A new option
+	-enable-generate-docs is added; it checks for required
+	documentation building dependencies. Dummy documentation is
+	built and installed if not used. Distributed tarballs will
+	contain the generated documentation.
+	(Trac #1687, git 2d4063b1a354f5048ca9dfb195e8e169650f43d0)
+
+471.    [bug]		vorner
+	Fixed a problem when b10-loadzone tried to tread semicolon
+	in string data as start of comment, which caused invalid
+	data being loaded.
+	(Trac #2188, git 12efec3477feb62d7cbe36bdcfbfc7aa28a36f57)
+
 470.	[func]		naokikambe
 	The stats module now supports partial statistics updates. Each
 	module can return only statistics data which have been updated since

+ 5 - 1
Makefile.am

@@ -113,8 +113,12 @@ systest:
 	cd tests/system; \
 	sh $(abs_srcdir)/tests/system/runall.sh
 
+### include tool to generate documentation from log message specifications
+### in the distributed tarball:
+EXTRA_DIST = tools/system_messages.py
+
 #### include external sources in the distributed tarball:
-EXTRA_DIST = ext/asio/README
+EXTRA_DIST += ext/asio/README
 EXTRA_DIST += ext/asio/README
 EXTRA_DIST += ext/asio/asio.hpp
 EXTRA_DIST += ext/asio/asio/basic_socket.hpp

+ 27 - 4
configure.ac

@@ -1027,10 +1027,32 @@ AC_SUBST(PERL)
 AC_PATH_PROGS(AWK, gawk awk)
 AC_SUBST(AWK)
 
-AC_ARG_ENABLE(man, [AC_HELP_STRING([--enable-man],
-  [regenerate man pages [default=no]])], enable_man=$enableval, enable_man=no)
+AC_ARG_ENABLE(generate_docs, [AC_HELP_STRING([--enable-generate-docs],
+  [regenerate documentation using Docbook [default=no]])],
+  enable_generate_docs=$enableval, enable_generate_docs=no)
+
+# Check for xsltproc
+if test "x$enable_generate_docs" != xno ; then
+  AC_PATH_PROG([XSLTPROC], [xsltproc])
+  if test -z "$XSLTPROC"; then
+    AC_MSG_ERROR("xsltproc not found; it is required for --enable-generate-docs")
+  else
+    AC_MSG_CHECKING([if $XSLTPROC works])
+    # run xsltproc to see if works
+    $XSLTPROC --novalid --xinclude --nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
+    if test $? -ne 0 ; then
+      AC_MSG_ERROR("Error with $XSLTPROC using release/xsl/current/manpages/docbook.xsl")
+    fi
+    $XSLTPROC --novalid --xinclude --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl
+    if test $? -ne 0 ; then
+      AC_MSG_ERROR("Error with $XSLTPROC using release/xsl/current/html/docbook.xsl")
+    fi
+    AC_MSG_RESULT(yes)
+  fi
+fi
+
 
-AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
+AM_CONDITIONAL(GENERATE_DOCS, test x$enable_generate_docs != xno)
 
 AC_ARG_ENABLE(install-configurations,
   [AC_HELP_STRING([--disable-install-configurations],
@@ -1201,6 +1223,7 @@ AC_CONFIG_FILES([Makefile
                  tests/tools/badpacket/tests/Makefile
                  tests/tools/perfdhcp/Makefile
                  tests/tools/perfdhcp/tests/Makefile
+                 tests/tools/perfdhcp/templates/Makefile
                  dns++.pc
                ])
 AC_OUTPUT([doc/version.ent
@@ -1376,7 +1399,7 @@ Developer:
   C++ Code Coverage: $USE_LCOV
   Python Code Coverage: $USE_PYCOVERAGE
   Logger checks: $enable_logger_checks
-  Generate Manuals: $enable_man
+  Generate Documentation: $enable_generate_docs
 
 END
 

+ 3 - 0
doc/guide/.gitignore

@@ -0,0 +1,3 @@
+/bind10-guide.html
+/bind10-guide.txt
+/bind10-messages.html

+ 19 - 11
doc/guide/Makefile.am

@@ -1,15 +1,18 @@
-dist_doc_DATA = bind10-guide.txt
-dist_html_DATA = bind10-guide.css bind10-guide.html bind10-messages.html
+# generated documentation
+HTMLDOCS = bind10-guide.html bind10-messages.html
+DOCS = bind10-guide.txt
 
-EXTRA_DIST = bind10-guide.xml bind10-messages.xml
+dist_doc_DATA = $(DOCS)
+dist_html_DATA = $(HTMLDOCS) bind10-guide.css
 
-# This is not a "man" manual, but reuse this for now for docbook.
-if ENABLE_MAN
+EXTRA_DIST = bind10-guide.xml
+DISTCLEANFILES = $(HTMLDOCS) $(DOCS) bind10-messages.xml
 
-.PHONY: bind10-messages.xml
+# This is not a "man" manual, but reuse this for now for docbook.
+if GENERATE_DOCS
 
 bind10-guide.html: bind10-guide.xml
-	xsltproc --novalid --xinclude --nonet \
+	@XSLTPROC@ --novalid --xinclude --nonet \
 		--path $(top_builddir)/doc \
 		-o $@ \
 		--stringparam section.autolabel 1 \
@@ -21,18 +24,23 @@ bind10-guide.html: bind10-guide.xml
 HTML2TXT = elinks -dump -no-numbering -no-references
 
 bind10-guide.txt: bind10-guide.html
-	$(HTML2TXT) $(srcdir)/bind10-guide.html > $@
+	$(HTML2TXT) bind10-guide.html > $@
 
 bind10-messages.html: bind10-messages.xml
-	xsltproc --novalid --xinclude --nonet \
+	@XSLTPROC@ --novalid --xinclude --nonet \
 		--path $(top_builddir)/doc \
 		-o $@ \
 		--stringparam html.stylesheet $(srcdir)/bind10-guide.css \
 		http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl \
-		$(srcdir)/bind10-messages.xml
+		bind10-messages.xml
 
-# So many dependencies that it's easiest just to regenerate it every time
 bind10-messages.xml:
 	$(PYTHON) $(top_srcdir)/tools/system_messages.py -o $@ $(top_srcdir)
 
+else
+
+$(HTMLDOCS) $(DOCS):
+	@echo Doc generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
+	@echo Doc generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild BIND 10 > $@
+
 endif

File diff suppressed because it is too large
+ 0 - 2070
doc/guide/bind10-guide.html


File diff suppressed because it is too large
+ 0 - 2156
doc/guide/bind10-guide.txt


+ 43 - 26
doc/guide/bind10-guide.xml

@@ -785,7 +785,7 @@ as a dependency earlier -->
   </chapter>
 
   <chapter id="bind10">
-    <title>Starting BIND10 with <command>bind10</command></title>
+    <title>Starting BIND 10 with <command>bind10</command></title>
     <para>
       BIND 10 provides the <command>bind10</command> command which
       starts up the required processes.
@@ -1633,6 +1633,17 @@ can use various data source backends.
               </simpara>
             </listitem>
           </varlistentry>
+          <varlistentry>
+            <term>tcp_recv_timeout</term>
+            <listitem>
+              <simpara>
+                <varname>tcp_recv_timeout</varname> is the timeout used on
+                incoming TCP connections, in milliseconds. If the query
+                is not sent within this time, the connection is closed.
+                Setting this to 0 will disable TCP timeouts completely.
+              </simpara>
+            </listitem>
+          </varlistentry>
         </variablelist>
 
       </para>
@@ -1735,7 +1746,7 @@ can use various data source backends.
       <para>
         Each data source has several options. The first one is
         <varname>type</varname>, which specifies the type of data source to
-        use. Valid types include the ones listed below, but bind10 uses
+        use. Valid types include the ones listed below, but BIND 10 uses
         dynamically loaded modules for them, so there may be more in your
         case. This option is mandatory.
       </para>
@@ -1754,8 +1765,14 @@ can use various data source backends.
         answering up. The first option is <varname>cache-enable</varname>,
         a boolean value turning the cache on and off (off is the default).
         The second one, <varname>cache-zones</varname>, is a list of zone
-        origins to load into in-memory. Remember that zones in the data source
-        not listed here will not be loaded and will not be available at all.
+        origins to load into in-memory.
+
+<!-- NOT YET:  http://bind10.isc.org/ticket/2240
+ Once the cache is enabled,
+        the zones in the data source not listed in
+        <varname>cache-zones</varname> will not be loaded and will
+        not be available at all.
+-->
       </para>
 
       <section id='datasource-types'>
@@ -1764,7 +1781,7 @@ can use various data source backends.
           As mentioned, the type used by default is <quote>sqlite3</quote>.
           It has single configuration option inside <varname>params</varname>
           &mdash; <varname>database_file</varname>, which contains the path
-          to the sqlite3 file containing the data.
+          to the SQLite3 file containing the data.
         </para>
 
         <para>
@@ -1781,7 +1798,7 @@ can use various data source backends.
       <section id='datasrc-examples'>
         <title>Examples</title>
         <para>
-          As this is one of the more complex configurations of Bind10,
+          As this is one of the more complex configurations of BIND 10,
           we show some examples. They all assume they start with default
           configuration.
         </para>
@@ -1807,7 +1824,7 @@ can use various data source backends.
 &gt; <userinput>config commit</userinput></screen>
 
           Now every time the zone in the data source is changed by the
-          operator, Bind10 needs to be told to reload it, by
+          operator, the authoritative server needs to be told to reload it, by
           <screen>&gt; <userinput>Auth loadzone example.org</userinput></screen>
           You don't need to do this when the zone is modified by
           XfrIn, it does so automatically.
@@ -1815,7 +1832,7 @@ can use various data source backends.
 
         <para>
           Now, the last example is when there are master files we want to
-          serve in addition to whatever is inside the sqlite3 database.
+          serve in addition to whatever is inside the SQLite3 database.
 
           <screen>&gt; <userinput>config add data_sources/classes/IN</userinput>
 &gt; <userinput>config set data_sources/classes/IN[1]/type MasterFiles</userinput>
@@ -1844,7 +1861,7 @@ can use various data source backends.
       <note>
       <para>
         There's also <varname>Auth/database_file</varname> configuration
-        variable, pointing to a sqlite3 database file. This is no longer
+        variable, pointing to a SQLite3 database file. This is no longer
         used by <command>b10-auth</command>, but it is left in place for
         now, since other modules use it. Once <command>b10-xfrin</command>,
         <command>b10-xfrout</command> and <command>b10-ddns</command>
@@ -2589,18 +2606,18 @@ then change those defaults with config set Resolver/forward_addresses[0]/address
     be deployed that facilitate communication between servers and
     clients. Even though principles of both DHCPv4 and DHCPv6 are
     somewhat similar, these are two radically different
-    protocols. BIND10 offers server implementations for both DHCPv4
+    protocols. BIND 10 offers server implementations for both DHCPv4
     and DHCPv6. This chapter is about DHCP for IPv4. For a description
     of the DHCPv6 server, see <xref linkend="dhcp6"/>.</para>
 
     <para>The DHCPv4 server component is currently under intense
     development. You may want to check out <ulink
-    url="http://bind10.isc.org/wiki/Kea">BIND10 DHCP (Kea) wiki</ulink>
+    url="http://bind10.isc.org/wiki/Kea">BIND 10 DHCP (Kea) wiki</ulink>
     and recent posts on <ulink
-    url="https://lists.isc.org/mailman/listinfo/bind10-dev">BIND10
+    url="https://lists.isc.org/mailman/listinfo/bind10-dev">BIND 10
     developers mailing list</ulink>.</para>
 
-    <para>The DHCPv4 and DHCPv6 components in BIND10 architecture are
+    <para>The DHCPv4 and DHCPv6 components in BIND 10 architecture are
     internally code named <quote>Kea</quote>.</para>
 
     <note>
@@ -2618,7 +2635,7 @@ then change those defaults with config set Resolver/forward_addresses[0]/address
 
     <section id="dhcp4-usage">
       <title>DHCPv4 Server Usage</title>
-      <para>BIND10 provides the DHCPv4 server component since December
+      <para>BIND 10 provides the DHCPv4 server component since December
       2011. It is a skeleton server and can be described as an early
       prototype that is not fully functional yet. It is mature enough
       to conduct first tests in lab environment, but it has
@@ -2627,9 +2644,9 @@ then change those defaults with config set Resolver/forward_addresses[0]/address
       </para>
 
       <para>
-        <command>b10-dhcp4</command> is a BIND10 component and is being
-        run under BIND10 framework. To add a DHCPv4 process to the set of running
-        BIND10 services, you can use following commands in <command>bindctl</command>:
+        <command>b10-dhcp4</command> is a BIND 10 component and is being
+        run under BIND 10 framework. To add a DHCPv4 process to the set of running
+        BIND 10 services, you can use following commands in <command>bindctl</command>:
         <screen>&gt; <userinput>config add Boss/components b10-dhcp4</userinput>
 &gt; <userinput>config set Boss/components/b10-dhcp4/kind dispensable</userinput>
 &gt; <userinput>config commit</userinput></screen></para>
@@ -2779,19 +2796,19 @@ const std::string HARDCODED_SERVER_ID = "192.0.2.1";</screen>
   <chapter id="dhcp6">
     <title>DHCPv6 Server</title>
     <para>Dynamic Host Configuration Protocol for IPv6 (DHCPv6) is
-    specified in RFC3315. BIND10 provides DHCPv6 server implementation
+    specified in RFC3315. BIND 10 provides DHCPv6 server implementation
     that is described in this chapter. For a description of the DHCPv4
     server implementation, see <xref linkend="dhcp4"/>.
     </para>
 
     <para>The DHCPv6 server component is currently under intense
     development. You may want to check out <ulink
-    url="http://bind10.isc.org/wiki/Kea">BIND10 DHCP (Kea) wiki</ulink>
+    url="http://bind10.isc.org/wiki/Kea">BIND 10 DHCP (Kea) wiki</ulink>
     and recent posts on <ulink
-    url="https://lists.isc.org/mailman/listinfo/bind10-dev">BIND10
+    url="https://lists.isc.org/mailman/listinfo/bind10-dev">BIND 10
     developers mailing list</ulink>.</para>
 
-    <para>The DHCPv4 and DHCPv6 components in BIND10 architecture are
+    <para>The DHCPv4 and DHCPv6 components in BIND 10 architecture are
     internally code named <quote>Kea</quote>.</para>
 
     <note>
@@ -2810,7 +2827,7 @@ const std::string HARDCODED_SERVER_ID = "192.0.2.1";</screen>
     <section id="dhcp6-usage">
       <title>DHCPv6 Server Usage</title>
       <para>
-        BIND10 provides the DHCPv6 server component since September
+        BIND 10 provides the DHCPv6 server component since September
         2011. It is a skeleton server and can be described as an early
         prototype that is not fully functional yet. It is mature
         enough to conduct first tests in lab environment, but it has
@@ -2819,9 +2836,9 @@ const std::string HARDCODED_SERVER_ID = "192.0.2.1";</screen>
       </para>
 
       <para>
-        <command>b10-dhcp6</command> is a BIND10 component and is being
-        run under BIND10 framework. To add a DHCPv6 process to the set of running
-        BIND10 services, you can use following commands in <command>bindctl</command>:
+        <command>b10-dhcp6</command> is a BIND 10 component and is being
+        run under BIND 10 framework. To add a DHCPv6 process to the set of running
+        BIND 10 services, you can use following commands in <command>bindctl</command>:
         <screen>&gt; <userinput>config add Boss/components b10-dhcp6</userinput>
 &gt; <userinput>config set Boss/components/b10-dhcp6/kind dispensable</userinput>
 &gt; <userinput>config commit</userinput></screen>
@@ -2988,7 +3005,7 @@ const std::string HARDCODED_DNS_SERVER = "2001:db8:1::1";</screen>
       <para>For non-Linux systems, there is currently stub
       implementation provided. Interface manager detects loopback
       interfaces only as their name (lo or lo0) can be easily predicted.
-      Please contact BIND10 development team if you are interested
+      Please contact the BIND 10 development team if you are interested
       in running DHCP components on systems other than Linux.</para>
     </section>
 

File diff suppressed because it is too large
+ 0 - 3303
doc/guide/bind10-messages.html


File diff suppressed because it is too large
+ 0 - 7116
doc/guide/bind10-messages.xml


+ 1 - 0
src/bin/auth/.gitignore

@@ -5,3 +5,4 @@
 /b10-auth
 /spec_config.h
 /spec_config.h.pre
+/b10-auth.8

+ 9 - 2
src/bin/auth/Makefile.am

@@ -20,12 +20,19 @@ CLEANFILES  = *.gcno *.gcda auth.spec spec_config.h
 CLEANFILES += auth_messages.h auth_messages.cc
 
 man_MANS = b10-auth.8
+DISTCLEANFILES = $(man_MANS)
 EXTRA_DIST = $(man_MANS) b10-auth.xml
 
-if ENABLE_MAN
+if GENERATE_DOCS
 
 b10-auth.8: b10-auth.xml
-	xsltproc --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-auth.xml
+	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-auth.xml
+
+else
+
+$(man_MANS):
+	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
+	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild BIND 10 > $@
 
 endif
 

+ 5 - 0
src/bin/auth/auth.spec.pre.in

@@ -90,6 +90,11 @@
             }
           ]
         }
+      },
+      { "item_name": "tcp_recv_timeout",
+        "item_type": "integer",
+        "item_optional": false,
+        "item_default": 5000
       }
     ],
     "commands": [

+ 25 - 0
src/bin/auth/auth_config.cc

@@ -116,6 +116,29 @@ private:
      */
     AddrListPtr rollbackAddresses_;
 };
+
+/// \brief Configuration for TCP receive timeouts
+class TCPRecvTimeoutConfig : public AuthConfigParser {
+public:
+    TCPRecvTimeoutConfig(AuthSrv& server) : server_(server), timeout_(0)
+    {}
+
+    virtual void build(ConstElementPtr config) {
+        if (config->intValue() >= 0) {
+            timeout_ = config->intValue();
+        } else {
+            isc_throw(AuthConfigError, "tcp_recv_timeout must be 0 or higher");
+        }
+    }
+
+    virtual void commit() {
+        server_.setTCPRecvTimeout(timeout_);
+    }
+private:
+    AuthSrv& server_;
+    size_t timeout_;
+};
+
 } // end of unnamed namespace
 
 AuthConfigParser*
@@ -147,6 +170,8 @@ createAuthConfigParser(AuthSrv& server, const std::string& config_id) {
         // We need to return something. The VersionConfig is empty now,
         // so we may abuse that one, as it is a short-term solution only.
         return (new VersionConfig());
+    } else if (config_id == "tcp_recv_timeout") {
+        return (new TCPRecvTimeoutConfig(server));
     } else {
         isc_throw(AuthConfigError, "Unknown configuration identifier: " <<
                   config_id);

+ 22 - 0
src/bin/auth/auth_srv.cc

@@ -114,6 +114,18 @@ private:
     MessageRenderer& renderer_;
 };
 
+// Similar to Renderer holder, this is a very basic RAII-style class
+// that calls clear(Message::PARSE) on the given Message upon destruction
+class MessageHolder {
+public:
+    MessageHolder(Message& message) : message_(message) {}
+    ~MessageHolder() {
+        message_.clear(Message::PARSE);
+    }
+private:
+    Message& message_;
+};
+
 // A helper container of socket session forwarder.
 //
 // This class provides a simple wrapper interface to SocketSessionForwarder
@@ -344,6 +356,11 @@ public:
                             OutputBufferPtr buffer,
                             DNSServer* server) const
     {
+        // Keep a holder on the message, so that it is automatically
+        // cleared if processMessage() is done
+        // This is not done in processMessage itself (which would be
+        // equivalent), to allow tests to inspect the message handling.
+        MessageHolder message_holder(*message);
         server_->processMessage(io_message, *message, *buffer, server);
     }
 private:
@@ -927,3 +944,8 @@ AuthSrv::getClientListClasses() const {
     }
     return (result);
 }
+
+void
+AuthSrv::setTCPRecvTimeout(size_t timeout) {
+    dnss_->setTCPRecvTimeout(timeout);
+}

+ 10 - 0
src/bin/auth/auth_srv.h

@@ -319,6 +319,16 @@ public:
     ///     has been set by setClientList.
     std::vector<isc::dns::RRClass> getClientListClasses() const;
 
+    /// \brief Sets the timeout for incoming TCP connections
+    ///
+    /// Incoming TCP connections that have not sent their data
+    /// withing this time are dropped.
+    ///
+    /// \param timeout The timeout (in milliseconds). If se to
+    /// zero, no timeouts are used, and the connection will remain
+    /// open forever.
+    void setTCPRecvTimeout(size_t timeout);
+
 private:
     AuthSrvImpl* impl_;
     isc::asiolink::SimpleCallback* checkin_;

+ 0 - 213
src/bin/auth/b10-auth.8

@@ -1,213 +0,0 @@
-'\" t
-.\"     Title: b10-auth
-.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\"      Date: June 20, 2012
-.\"    Manual: BIND10
-.\"    Source: BIND10
-.\"  Language: English
-.\"
-.TH "B10\-AUTH" "8" "June 20, 2012" "BIND10" "BIND10"
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-b10-auth \- Authoritative DNS server
-.SH "SYNOPSIS"
-.HP \w'\fBb10\-auth\fR\ 'u
-\fBb10\-auth\fR [\fB\-v\fR]
-.SH "DESCRIPTION"
-.PP
-The
-\fBb10\-auth\fR
-daemon provides the BIND 10 authoritative DNS server\&. Normally it is started by the
-\fBbind10\fR(8)
-boss process\&.
-.PP
-This daemon communicates with other BIND 10 components over a
-\fBb10-msgq\fR(8)
-C\-Channel connection\&. If this connection is not established,
-\fBb10\-auth\fR
-will exit\&.
-It receives its configurations from
-\fBb10-cfgmgr\fR(8)\&.
-.SH "OPTIONS"
-.PP
-The arguments are as follows:
-.PP
-\fB\-v\fR
-.RS 4
-Enable verbose logging mode\&. This enables logging of diagnostic messages at the maximum debug level\&.
-.RE
-.SH "CONFIGURATION AND COMMANDS"
-.PP
-The configurable settings are:
-.PP
-
-\fIdatabase_file\fR
-defines the path to the SQLite3 zone file when using the sqlite datasource\&. The default is
-/usr/local/var/bind10\-devel/zone\&.sqlite3\&.
-.PP
-
-\fIdatasources\fR
-configures data sources\&. The list items include:
-\fItype\fR
-to define the required data source type (such as
-\(lqmemory\(rq);
-\fIclass\fR
-to optionally select the class (it defaults to
-\(lqIN\(rq); and
-\fIzones\fR
-to define the
-\fIfile\fR
-path name,
-\fIorigin\fR
-(default domain), and optional
-\fIfiletype\fR\&. By default,
-\fIzones\fR
-is empty\&. For the in\-memory data source (i\&.e\&., the
-\fItype\fR
-is
-\(lqmemory\(rq), the optional
-\fIfiletype\fR
-configuration item for
-\fIzones\fR
-can be specified so the in\-memory zone data can be built from another data source that is based on a database backend (in practice with current implementation, it would be an SQLite3 database file for the SQLite3 data source)\&. See the
-BIND 10 Guide
-for configuration details\&.
-.if n \{\
-.sp
-.\}
-.RS 4
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-.br
-.ps +1
-\fBNote\fR
-.ps -1
-.br
-.sp
-Only the IN class is supported at this time\&. By default, the memory data source is disabled\&. Also, currently the zone file must be canonical such as generated by \fBnamed\-compilezone \-D\fR\&.
-.sp .5v
-.RE
-.PP
-
-\fIlisten_on\fR
-is a list of addresses and ports for
-\fBb10\-auth\fR
-to listen on\&. The list items are the
-\fIaddress\fR
-string and
-\fIport\fR
-number\&. By default,
-\fBb10\-auth\fR
-listens on port 53 on the IPv6 (::) and IPv4 (0\&.0\&.0\&.0) wildcard addresses\&.
-.PP
-
-\fIstatistics\-interval\fR
-is the timer interval in seconds for
-\fBb10\-auth\fR
-to share its statistics information to
-\fBb10-stats\fR(8)\&. Statistics updates can be disabled by setting this to 0\&. The default is 60\&.
-.PP
-The configuration commands are:
-.PP
-
-\fBloadzone\fR
-tells
-\fBb10\-auth\fR
-to load or reload a zone file\&. The arguments include:
-\fIclass\fR
-which optionally defines the class (it defaults to
-\(lqIN\(rq);
-\fIorigin\fR
-is the domain name of the zone; and
-\fIdatasrc\fR
-optionally defines the type of datasource (it defaults to
-\(lqmemory\(rq)\&.
-.if n \{\
-.sp
-.\}
-.RS 4
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-.br
-.ps +1
-\fBNote\fR
-.ps -1
-.br
-.sp
-In this development version, currently this only supports the IN class and the memory data source\&.
-.sp .5v
-.RE
-.PP
-
-\fBsendstats\fR
-tells
-\fBb10\-auth\fR
-to send its statistics data to
-\fBb10-stats\fR(8)
-immediately\&.
-.PP
-
-\fBshutdown\fR
-exits
-\fBb10\-auth\fR\&. This has an optional
-\fIpid\fR
-argument to select the process ID to stop\&. (Note that the BIND 10 boss process may restart this service if configured\&.)
-.SH "STATISTICS DATA"
-.PP
-The statistics data collected by the
-\fBb10\-stats\fR
-daemon for
-\(lqAuth\(rq
-include:
-.PP
-queries\&.tcp
-.RS 4
-Total count of queries received by the
-\fBb10\-auth\fR
-server over TCP since startup\&.
-.RE
-.PP
-queries\&.udp
-.RS 4
-Total count of queries received by the
-\fBb10\-auth\fR
-server over UDP since startup\&.
-.RE
-.SH "FILES"
-.PP
-
-/usr/local/var/bind10\-devel/zone\&.sqlite3
-\(em Location for the SQLite3 zone database when
-\fIdatabase_file\fR
-configuration is not defined\&.
-.SH "SEE ALSO"
-.PP
-
-\fBb10-cfgmgr\fR(8),
-\fBb10-loadzone\fR(8),
-\fBb10-msgq\fR(8),
-\fBb10-stats\fR(8),
-\fBb10-zonemgr\fR(8),
-\fBbind10\fR(8),
-BIND 10 Guide\&.
-.SH "HISTORY"
-.PP
-The
-\fBb10\-auth\fR
-daemon was first coded in October 2009\&.
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2010-2012 Internet Systems Consortium, Inc. ("ISC")
-.br

+ 7 - 0
src/bin/auth/b10-auth.xml

@@ -152,6 +152,13 @@
       The default is 60.
     </para>
 
+    <para>
+      <varname>tcp_recv_timeout</varname> is the timeout used on
+      incoming TCP connections, in milliseconds. If the query
+      is not sent within this time, the connection is closed.
+      Setting this to 0 will disable TCP timeouts completely.
+    </para>
+
 <!-- TODO: formating -->
     <para>
       The configuration commands are:

+ 1 - 1
src/bin/auth/command.cc

@@ -210,7 +210,7 @@ public:
             case ConfigurableClientList::ZONE_NOT_CACHED:
                 isc_throw(AuthCommandError, "Zone " << origin << "/" <<
                           zone_class << " is not served from memory, but "
-                          "direcly from the data source. It is not possible "
+                          "directly from the data source. It is not possible "
                           "to reload it into memory. Configure it to be cached "
                           "first.");
             case ConfigurableClientList::CACHE_DISABLED:

+ 1 - 2
src/bin/auth/query.cc

@@ -562,8 +562,7 @@ Query::reset() {
 
 bool
 Query::processDSAtChild() {
-    const ClientList::FindResult zresult =
-        client_list_->find(*qname_, true);
+    const ClientList::FindResult zresult = client_list_->find(*qname_, true);
 
     if (zresult.dsrc_client_ == NULL) {
         return (false);

+ 3 - 4
src/bin/auth/tests/auth_srv_unittest.cc

@@ -104,10 +104,6 @@ protected:
     }
 
     ~AuthSrvTest() {
-        // Clear the message now; depending on the RTTI implementation,
-        // type information may be lost if the message is cleared
-        // automatically later, so as a precaution we do it now.
-        parse_message->clear(Message::PARSE);
         server.destroyDDNSForwarder();
     }
 
@@ -833,6 +829,9 @@ TEST_F(AuthSrvTest, builtInQueryViaDNSServer) {
                         response_obuffer->getData(),
                         response_obuffer->getLength(),
                         &response_data[0], response_data.size());
+
+    // After it has been run, the message should be cleared
+    EXPECT_EQ(0, parse_message->getRRCount(Message::SECTION_QUESTION));
 }
 
 // In the following tests we confirm the response data is rendered in

+ 22 - 4
src/bin/auth/tests/config_syntax_unittest.cc

@@ -36,7 +36,8 @@ TEST_F(AuthConfigSyntaxTest, inmemoryDefaultFileType) {
     EXPECT_TRUE(
         mspec_.validateConfig(
             Element::fromJSON(
-                "{\"listen_on\": [], \"datasources\": "
+                "{\"tcp_recv_timeout\": 1000,"
+                " \"listen_on\": [], \"datasources\": "
                 "  [{\"type\": \"memory\", \"class\": \"IN\", "
                 "    \"zones\": [{\"origin\": \"example.com\","
                 "                 \"file\": \""
@@ -48,7 +49,8 @@ TEST_F(AuthConfigSyntaxTest, inmemorySQLite3Backend) {
     EXPECT_TRUE(
         mspec_.validateConfig(
             Element::fromJSON(
-                "{\"datasources\": "
+                "{\"tcp_recv_timeout\": 1000,"
+                " \"datasources\": "
                 "  [{\"type\": \"memory\","
                 "    \"zones\": [{\"origin\": \"example.com\","
                 "                 \"file\": \""
@@ -58,14 +60,30 @@ TEST_F(AuthConfigSyntaxTest, inmemorySQLite3Backend) {
 
 TEST_F(AuthConfigSyntaxTest, badInmemoryFileType) {
     // filetype must be a string
-    EXPECT_FALSE(
+    ASSERT_FALSE(
         mspec_.validateConfig(
             Element::fromJSON(
-                "{\"datasources\": "
+                "{\"tcp_recv_timeout\": 1000,"
+                " \"datasources\": "
                 "  [{\"type\": \"memory\","
                 "    \"zones\": [{\"origin\": \"example.com\","
                 "                 \"file\": \""
                 TEST_DATA_DIR "/example.zone\","
                 "                 \"filetype\": 42}]}]}"), false));
 }
+
+TEST_F(AuthConfigSyntaxTest, badTCPRecvTimeout) {
+    // tcp_recv_timeout must be int
+    EXPECT_FALSE(
+        mspec_.validateConfig(
+            Element::fromJSON(
+                "{\"tcp_recv_timeout\": \"foo\","
+                " \"datasources\": "
+                "  [{\"type\": \"memory\","
+                "    \"zones\": [{\"origin\": \"example.com\","
+                "                 \"file\": \""
+                TEST_DATA_DIR "/example.zone\","
+                "                 \"filetype\": \"sqlite3\"}]}]}"), false));
+}
+
 }

+ 13 - 0
src/bin/auth/tests/config_unittest.cc

@@ -143,4 +143,17 @@ TEST_F(AuthConfigTest, listenAddressConfig) {
     EXPECT_EQ(DNSService::SERVER_SYNC_OK, dnss_.getUDPFdParams().at(1).options);
 }
 
+// Try setting tcp receive timeout through config
+TEST_F(AuthConfigTest, tcpRecvTimeoutConfig) {
+    configureAuthServer(server, Element::fromJSON(
+    "{ \"tcp_recv_timeout\": 123 }"));
+    EXPECT_EQ(123, dnss_.getTCPRecvTimeout());
+    configureAuthServer(server, Element::fromJSON(
+    "{ \"tcp_recv_timeout\": 2000 }"));
+    EXPECT_EQ(2000, dnss_.getTCPRecvTimeout());
+    EXPECT_THROW(configureAuthServer(server, Element::fromJSON(
+                    "{ \"tcp_recv_timeout\": -123 }")),
+                 AuthConfigError);
+}
+
 }

+ 1 - 0
src/bin/bind10/.gitignore

@@ -1,3 +1,4 @@
 /bind10
 /bind10_src.py
 /run_bind10.sh
+/bind10.8

+ 16 - 2
src/bin/bind10/Makefile.am

@@ -17,12 +17,26 @@ bind10_DATA = bob.spec
 EXTRA_DIST = bob.spec
 
 man_MANS = bind10.8
+DISTCLEANFILES = $(man_MANS)
 EXTRA_DIST += $(man_MANS) bind10.xml bind10_messages.mes
 
-if ENABLE_MAN
+if GENERATE_DOCS
 
 bind10.8: bind10.xml
-	xsltproc --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/bind10.xml 
+	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/bind10.xml 
+
+#dist-local-check-mans-enabled:
+#	@if grep "Man generation disabled" $(man_MANS) >/dev/null; then $(RM) $(man_MANS); fi
+
+else
+
+$(man_MANS):
+	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
+	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild BIND 10 > $@
+
+#dist-local-check-mans-enabled:
+#	@echo "*** --enable-generate-docs must be used in order to make dist"
+#	@false
 
 endif
 

File diff suppressed because it is too large
+ 0 - 288
src/bin/bind10/bind10.8


+ 1 - 0
src/bin/bindctl/.gitignore

@@ -1,3 +1,4 @@
 /bindctl
 /bindctl_main.py
 /run_bindctl.sh
+/bindctl.1

+ 9 - 2
src/bin/bindctl/Makefile.am

@@ -14,11 +14,18 @@ pythondir = $(pyexecdir)/bindctl
 bindctldir = $(pkgdatadir)
 
 CLEANFILES = bindctl bindctl_main.pyc
+DISTCLEANFILES = $(man_MANS)
 
-if ENABLE_MAN
+if GENERATE_DOCS
 
 bindctl.1: bindctl.xml
-	xsltproc --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/bindctl.xml
+	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/bindctl.xml
+
+else
+
+$(man_MANS):
+	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
+	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild BIND 10 > $@
 
 endif
 

+ 0 - 157
src/bin/bindctl/bindctl.1

@@ -1,157 +0,0 @@
-'\" t
-.\"     Title: bindctl
-.\"    Author: [see the "AUTHORS" section]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\"      Date: June 20, 2012
-.\"    Manual: BIND10
-.\"    Source: BIND10
-.\"  Language: English
-.\"
-.TH "BINDCTL" "1" "June 20, 2012" "BIND10" "BIND10"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-bindctl \- control and configure BIND 10
-.SH "SYNOPSIS"
-.HP \w'\fBbindctl\fR\ 'u
-\fBbindctl\fR [\fB\-a\ \fR\fB\fIaddress\fR\fR] [\fB\-h\fR] [\fB\-c\ \fR\fB\fIfile\fR\fR] [\fB\-p\ \fR\fB\fInumber\fR\fR] [\fB\-\-address\ \fR\fB\fIaddress\fR\fR] [\fB\-\-help\fR] [\fB\-\-certificate\-chain\ \fR\fB\fIfile\fR\fR] [\fB\-\-csv\-file\-dir\fR\fB\fIfile\fR\fR] [\fB\-\-port\ \fR\fB\fInumber\fR\fR] [\fB\-\-version\fR]
-.SH "DESCRIPTION"
-.PP
-The
-\fBbindctl\fR
-tool is a user interface to the BIND 10 services\&. The program can be used to control the components and configure the BIND 10 options\&. The options may be specified
-via its interactive command interpreter\&.
-.PP
-
-\fBbindctl\fR
-communicates over a HTTPS REST\-ful interface provided by
-\fBb10-cmdctl\fR(8)\&. The
-\fBb10-cfgmgr\fR(8)
-daemon stores the configurations\&.
-.SH "ARGUMENTS"
-.PP
-The arguments are as follows:
-.PP
-\fB\-a\fR \fIaddress\fR, \fB\-\-address\fR \fIaddress\fR
-.RS 4
-The IPv4 or IPv6 address to use to connect to the running
-\fBb10-cmdctl\fR(8)
-daemon\&. The default is 127\&.0\&.0\&.1\&.
-.RE
-.PP
-\fB\-c\fR \fIfile\fR, \fB\-\-certificate\-chain\fR \fIfile\fR
-.RS 4
-The PEM formatted server certificate validation chain file\&.
-.RE
-.PP
-\fB\-\-csv\-file\-dir\fR\fIfile\fR
-.RS 4
-The directory name in which the user/password CSV file is stored (see AUTHENTICATION)\&. By default this option doesn\*(Aqt have any value, in which case the "\&.bind10" directory under the user\*(Aqs home directory will be used\&.
-.RE
-.PP
-\fB\-h\fR, \fB\-\-help\fR
-.RS 4
-Display command usage\&.
-.RE
-.PP
-\fB\-p\fR \fInumber\fR, \fB\-\-port\fR \fInumber\fR
-.RS 4
-The port number to use to connect to the running
-\fBb10-cmdctl\fR(8)
-daemon\&. The default is 8080\&.
-.if n \{\
-.sp
-.\}
-.RS 4
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-.br
-.ps +1
-\fBNote\fR
-.ps -1
-.br
-This default port number may change\&.
-.sp .5v
-.RE
-.RE
-.PP
-\fB\-\-version\fR
-.RS 4
-Display the version number and exit\&.
-.RE
-.SH "AUTHENTICATION"
-.PP
-The tool will authenticate using a username and password\&. On the first successful login, it will save the details to a comma\-separated\-value (CSV) file which will be used for later uses of
-\fBbindctl\fR\&. The file name is "default_user\&.csv" located under the directory specified by the
-\fB\-\-csv\-file\-dir\fR
-option\&.
-.SH "USAGE"
-.PP
-The
-\fBbindctl\fR
-prompt shows
-\(lq> \(rq\&. The prompt will also display the location if changed\&. The options are based on the module in use\&. The usage is:
-\fBmodule\fR
-\fBcommand\fR
-\fIparam1 = value1 , \fR\fI\fIparam2 = value2\fR\fR
-.PP
-
-\fBbindctl\fR\*(Aqs interactive interface provides command\-line completion and hints\&. Press the Tab key to get a hint for the module, command, and/or parameters\&.
-The arrow keys and Emacs\-style editing keys may be used to edit and recall previous lines\&.
-.PP
-You can use the
-\fBhelp\fR
-keyword to receive usage assistance for a module or a module\*(Aqs command\&.
-.PP
-The
-\fBquit\fR
-command is used to exit
-\fBbindctl\fR\&. (It doesn\*(Aqt stop the BIND 10 services\&.)
-.PP
-The following module is available by default:
-\fBconfig\fR
-for Configuration commands\&.
-Additional modules may be available, such as
-\fBBoss\fR,
-\fBXfrin\fR, and
-\fBAuth\fR\&.
-.SH "SEE ALSO"
-.PP
-
-\fBb10-auth\fR(8),
-\fBb10-cfgmgr\fR(8),
-\fBb10-cmdctl\fR(8),
-\fBb10-xfrin\fR(8),
-\fBbind10\fR(8),
-BIND 10 Guide\&.
-.SH "AUTHORS"
-.PP
-The
-\fBbindctl\fR
-tool and library were initially coded by Zhang Likun of CNNIC for the BIND 10 project\&. The initial manual page was written by Jeremy C\&. Reed of ISC\&.
-.SH "HISTORY"
-.PP
-The initial version (with internal name of
-\fBBigTool\fR) was started in October 2009\&.
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2010 Internet Systems Consortium, Inc. ("ISC")
-.br

+ 1 - 0
src/bin/cfgmgr/.gitignore

@@ -1,2 +1,3 @@
 /b10-cfgmgr
 /b10-cfgmgr.py
+/b10-cfgmgr.8

+ 9 - 2
src/bin/cfgmgr/Makefile.am

@@ -10,12 +10,19 @@ b10_cfgmgrdir = @localstatedir@/@PACKAGE@
 #B10_cfgmgr_DATA = 
 
 man_MANS = b10-cfgmgr.8
+DISTCLEANFILES = $(man_MANS)
 EXTRA_DIST = $(man_MANS) b10-cfgmgr.xml
 
-if ENABLE_MAN
+if GENERATE_DOCS
 
 b10-cfgmgr.8: b10-cfgmgr.xml
-	xsltproc --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-cfgmgr.xml
+	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-cfgmgr.xml
+
+else
+
+$(man_MANS):
+	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
+	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild BIND 10 > $@
 
 endif
 

+ 0 - 82
src/bin/cfgmgr/b10-cfgmgr.8

@@ -1,82 +0,0 @@
-'\" t
-.\"     Title: b10-cfgmgr
-.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\"      Date: June 20, 2012
-.\"    Manual: BIND10
-.\"    Source: BIND10
-.\"  Language: English
-.\"
-.TH "B10\-CFGMGR" "8" "June 20, 2012" "BIND10" "BIND10"
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-b10-cfgmgr \- Configuration manager
-.SH "SYNOPSIS"
-.HP \w'\fBb10\-cfgmgr\fR\ 'u
-\fBb10\-cfgmgr\fR [\fB\-c\ \fR\fB\fIconfig\-filename\fR\fR] [\fB\-p\ \fR\fB\fIdata_path\fR\fR] [\fB\-\-clear\-config\fR] [\fB\-\-config\-filename\ \fR\fB\fIconfig\-filename\fR\fR] [\fB\-\-data\-path\ \fR\fB\fIdata_path\fR\fR]
-.SH "DESCRIPTION"
-.PP
-The
-\fBb10\-cfgmgr\fR
-daemon handles all BIND 10 system configuration\&. It provides persistent storage for configuration, and notifies running BIND 10 modules of configuration changes\&.
-.PP
-The
-\fBbindctl\fR
-can be used to talk to this configuration manager via a
-\fBb10\-cmdctl\fR
-connection\&.
-.PP
-This daemon communicates over a
-\fBb10\-msgq\fR
-C\-Channel connection\&. If this connection is not established,
-\fBb10\-cfgmgr\fR
-will exit\&.
-.PP
-The daemon may be cleanly stopped by sending the SIGTERM signal to the process\&. This shutdown does not notify the subscribers\&.
-.SH "ARGUMENTS"
-.PP
-The arguments are as follows:
-.PP
-\fB\-\-clear\-config\fR
-.RS 4
-This will create a backup of the existing configuration file, remove it, and
-b10\-cfgmgr(8)
-will use the default configurations\&. The name of the backup file can be found in the logs (\fICFGMGR_BACKED_UP_CONFIG_FILE\fR)\&. (It will append a number to the backup filename if a previous backup file exists\&.)
-.RE
-.PP
-\fB\-c\fR \fIconfig\-filename\fR, \fB\-\-config\-filename\fR \fIconfig\-filename\fR
-.RS 4
-The configuration database filename to use\&. Can be either absolute or relative to data path\&. It defaults to "b10\-config\&.db"\&.
-.RE
-.PP
-\fB\-p\fR \fIdata\-path\fR, \fB\-\-data\-path\fR \fIdata\-path\fR
-.RS 4
-The path where BIND 10 looks for files\&. The configuration file is looked for here, if it is relative\&. If it is absolute, the path is ignored\&.
-.RE
-.SH "FILES"
-.PP
-/usr/local/var/bind10\-devel/b10\-config\&.db
-\(em Configuration storage file\&.
-.SH "SEE ALSO"
-.PP
-
-\fBbind10\fR(8),
-\fBmsgq\fR(8)\&.
-.SH "HISTORY"
-.PP
-The
-\fBb10\-cfgmgr\fR
-daemon and configuration specification were initially designed by Jelte Jansen of ISC\&. Its development began in October 2009\&.
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2010 Internet Systems Consortium, Inc. ("ISC")
-.br

+ 1 - 0
src/bin/cmdctl/.gitignore

@@ -3,3 +3,4 @@
 /cmdctl.spec
 /cmdctl.spec.pre
 /run_b10-cmdctl.sh
+/b10-cmdctl.8

+ 9 - 2
src/bin/cmdctl/Makefile.am

@@ -26,12 +26,19 @@ CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/cmdctl_messages.py
 CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/cmdctl_messages.pyc
 
 man_MANS = b10-cmdctl.8
+DISTCLEANFILES = $(man_MANS)
 EXTRA_DIST += $(man_MANS) b10-cmdctl.xml cmdctl_messages.mes
 
-if ENABLE_MAN
+if GENERATE_DOCS
 
 b10-cmdctl.8: b10-cmdctl.xml
-	xsltproc --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-cmdctl.xml
+	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-cmdctl.xml
+
+else
+
+$(man_MANS):
+	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
+	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild BIND 10 > $@
 
 endif
 

+ 0 - 133
src/bin/cmdctl/b10-cmdctl.8

@@ -1,133 +0,0 @@
-'\" t
-.\"     Title: b10-cmdctl
-.\"    Author: [see the "AUTHORS" section]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\"      Date: February 28, 2012
-.\"    Manual: BIND10
-.\"    Source: BIND10
-.\"  Language: English
-.\"
-.TH "B10\-CMDCTL" "8" "February 28, 2012" "BIND10" "BIND10"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-b10-cmdctl \- BIND 10 remote control daemon
-.SH "SYNOPSIS"
-.HP \w'\fBb10\-cmdctl\fR\ 'u
-\fBb10\-cmdctl\fR [\fB\-a\ \fR\fB\fIstring\fR\fR] [\fB\-h\fR] [\fB\-i\ \fR\fB\fInumber\fR\fR] [\fB\-p\ \fR\fB\fInumber\fR\fR] [\fB\-v\fR] [\fB\-\-address\ \fR\fB\fIstring\fR\fR] [\fB\-\-help\fR] [\fB\-\-idle\-timeout\ \fR\fB\fInumber\fR\fR] [\fB\-\-port\ \fR\fB\fInumber\fR\fR] [\fB\-\-verbose\fR] [\fB\-\-version\fR]
-.SH "DESCRIPTION"
-.PP
-The
-\fBb10\-cmdctl\fR
-daemon provides an entry for commands sent to the BIND 10 services\&. For example, the
-\fBbindctl\fR
-user interface communicates via
-\fBb10\-cmdctl\fR\&.
-.PP
-It is a lightweight HTTPS server with HTTP Digest Authentication (username and password validation)\&. It offers a RESTful style interface\&.
-.SH "OPTIONS"
-.PP
-The arguments are as follows:
-.PP
-\fB\-a \fR\fB\fIstring\fR\fR, \fB\-\-address \fR\fB\fIstring\fR\fR
-.RS 4
-The IP address that
-\fBb10\-cmdctl\fR
-will listen on\&. The default is 127\&.0\&.0\&.1\&.
-.RE
-.PP
-\fB\-h\fR, \fB\-\-help\fR
-.RS 4
-Display command usage\&.
-.RE
-.PP
-\fB\-i \fR\fB\fInumber\fR\fR, \fB\-\-idle\-timeout \fR\fB\fInumber\fR\fR
-.RS 4
-The socket idle timeout for the HTTPS connection in seconds\&. The default is 1200 seconds\&.
-.RE
-.PP
-\fB\-p \fR\fB\fInumber\fR\fR, \fB\-\-port \fR\fB\fInumber\fR\fR
-.RS 4
-The port number
-\fBb10\-cmdctl\fR
-will listen on\&. The default is 8080\&.
-.RE
-.PP
-\fB\-v\fR, \fB\-\-verbose\fR
-.RS 4
-Enable verbose mode\&.
-.RE
-.PP
-\fB\-\-version\fR
-.RS 4
-Display the version number and exit\&.
-.RE
-.SH "CONFIGURATION AND COMMANDS"
-.PP
-The configurable settings are:
-.PP
-
-\fIaccounts_file\fR
-defines the path to the user accounts database\&. The default is
-/usr/local/etc/bind10\-devel/cmdctl\-accounts\&.csv\&.
-.PP
-
-\fIcert_file\fR
-defines the path to the PEM certificate file\&. The default is
-/usr/local/etc/bind10\-devel/cmdctl\-certfile\&.pem\&.
-.PP
-
-\fIkey_file\fR
-defines the path to the PEM private key file\&. The default is
-/usr/local/etc/bind10\-devel/cmdctl\-keyfile\&.pem\&.
-.PP
-The configuration command is:
-.PP
-
-\fBshutdown\fR
-exits
-\fBb10\-cmdctl\fR\&. This has an optional
-\fIpid\fR
-argument to select the process ID to stop\&. (Note that the BIND 10 boss process may restart this service if configured\&.)
-.SH "FILES"
-.PP
-/usr/local/etc/bind10\-devel/cmdctl\-accounts\&.csv
-\(em account database containing the name, hashed password, and the salt\&.
-.PP
-/usr/local/etc/bind10\-devel/cmdctl\-keyfile\&.pem
-\(em contains the Private key\&.
-.PP
-/usr/local/etc/bind10\-devel/cmdctl\-certfile\&.pem
-\(em contains the Certificate\&.
-.SH "SEE ALSO"
-.PP
-
-\fBb10-cfgmgr\fR(8),
-\fBbind10\fR(8),
-\fBbindctl\fR(1)\&.
-.SH "AUTHORS"
-.PP
-The
-\fBb10\-cmdctl\fR
-daemon was initially designed and coded by Zhang Likun of CNNIC\&.
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2010-2012 Internet Systems Consortium, Inc. ("ISC")
-.br

+ 1 - 0
src/bin/dbutil/.gitignore

@@ -1,3 +1,4 @@
 /b10-dbutil
 /dbutil.py
 /run_dbutil.sh
+/b10-dbutil.8

+ 9 - 2
src/bin/dbutil/Makefile.am

@@ -14,11 +14,18 @@ CLEANFILES = b10-dbutil b10-dbutil.pyc
 CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/dbutil_messages.py
 CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/dbutil_messages.pyc
 CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/dbutil_messages.pyo
+DISTCLEANFILES = $(man_MANS)
 
-if ENABLE_MAN
+if GENERATE_DOCS
 
 b10-dbutil.8: b10-dbutil.xml
-	xsltproc --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-dbutil.xml
+	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-dbutil.xml
+
+else
+
+$(man_MANS):
+	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
+	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild BIND 10 > $@
 
 endif
 

File diff suppressed because it is too large
+ 0 - 89
src/bin/dbutil/b10-dbutil.8


+ 1 - 0
src/bin/ddns/.gitignore

@@ -1,2 +1,3 @@
 /b10-ddns
 /ddns.py
+/b10-ddns.8

+ 10 - 2
src/bin/ddns/Makefile.am

@@ -15,13 +15,21 @@ CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/ddns_messages.py
 CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/ddns_messages.pyc
 
 EXTRA_DIST =  ddns_messages.mes ddns.spec
+
 man_MANS = b10-ddns.8
+DISTCLEANFILES = $(man_MANS)
 EXTRA_DIST += $(man_MANS) b10-ddns.xml
 
-if ENABLE_MAN
+if GENERATE_DOCS
 
 b10-ddns.8: b10-ddns.xml
-	xsltproc --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-ddns.xml
+	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-ddns.xml
+
+else
+
+$(man_MANS):
+	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
+	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild BIND 10 > $@
 
 endif
 

+ 0 - 115
src/bin/ddns/b10-ddns.8

@@ -1,115 +0,0 @@
-'\" t
-.\"     Title: b10-ddns
-.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\"      Date: June 18, 2012
-.\"    Manual: BIND10
-.\"    Source: BIND10
-.\"  Language: English
-.\"
-.TH "B10\-DDNS" "8" "June 18, 2012" "BIND10" "BIND10"
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-b10-ddns \- Dynamic DNS update service
-.SH "SYNOPSIS"
-.HP \w'\fBb10\-ddns\fR\ 'u
-\fBb10\-ddns\fR [\fB\-v\fR | \fB\-\-verbose\fR]
-.SH "DESCRIPTION"
-.PP
-The
-\fBb10\-ddns\fR
-daemon provides the BIND 10 Dynamic Update (DDNS) service, as specified in RFC 2136\&. Normally it is started by the
-\fBbind10\fR(8)
-boss process\&.
-.PP
-When the
-\fBb10\-auth\fR
-authoritative DNS server receives an UPDATE request, it internally forwards the request to
-\fBb10\-ddns\fR, which handles the rest of the request processing\&. When the processing is completed
-\fBb10\-ddns\fR
-will send a response to the client with the RCODE set to the value as specified in RFC 2136\&. If the zone has been changed as a result, it will internally notify
-\fBb10\-auth\fR
-and
-\fBb10\-xfrout\fR
-so the new version of the zone will be served, and other secondary servers will be notified via the DNS notify protocol\&.
-.PP
-This daemon communicates with BIND 10 over a
-\fBb10-msgq\fR(8)
-C\-Channel connection\&. If this connection is not established,
-\fBb10\-ddns\fR
-will exit\&. The
-\fBb10\-ddns\fR
-daemon also depends on some other BIND 10 components (either directly or indirectly):
-\fBb10-auth\fR(8),
-\fBb10-xfrout\fR(8), and
-\fBb10-zonemgr\fR(8)\&.
-.PP
-
-\fBb10\-ddns\fR
-receives its configurations from
-\fBb10-cfgmgr\fR(8)\&.
-.SH "ARGUMENTS"
-.PP
-The arguments are as follows:
-.PP
-\fB\-h\fR, \fB\-\-help\fR
-.RS 4
-Print the command line arguments and exit\&.
-.RE
-.PP
-\fB\-v\fR, \fB\-\-verbose\fR
-.RS 4
-This value is ignored at this moment, but is provided for compatibility with the
-\fBbind10\fR
-Boss process\&.
-.RE
-.SH "CONFIGURATION AND COMMANDS"
-.PP
-The configurable settings are:
-.PP
-
-\fIzones\fR
-The zones option is a list of configuration items for specific zones that can be updated with DDNS\&. Each entry is a map that can contain the following items:
-\fIorigin\fR
-is a textual domain name of the zone;
-\fIclass\fR
-(text) is the RR class of the zone; and
-\fIupdate_acl\fR
-is an ACL that controls permission for updates\&. See the BIND 10 Guide for configuration details\&. Note that not listing a zone in this list does not directly mean update requests for the zone are rejected, but the end result is the same because the default ACL for updates is to deny all requests\&.
-.PP
-The module commands are:
-.PP
-
-\fBshutdown\fR
-exits
-\fBb10\-ddns\fR\&. This has an optional
-\fIpid\fR
-argument to select the process ID to stop\&. (Note that the BIND 10 boss process may restart this service if configured\&.)
-.SH "SEE ALSO"
-.PP
-
-\fBb10-auth\fR(8),
-\fBb10-cfgmgr\fR(8),
-\fBb10-msgq\fR(8),
-\fBb10-xfrout\fR(8),
-\fBb10-zonemgr\fR(8),
-\fBbind10\fR(8),
-BIND 10 Guide\&.
-.SH "HISTORY"
-.PP
-The
-\fBb10\-ddns\fR
-daemon was first implemented in December 2011 for the ISC BIND 10 project\&. The first functional version was released in June 2012\&.
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2011-2012 Internet Systems Consortium, Inc. ("ISC")
-.br

+ 1 - 0
src/bin/dhcp4/.gitignore

@@ -1,3 +1,4 @@
 /b10-dhcp4
 /spec_config.h
 /spec_config.h.pre
+/b10-dhcp4.8

+ 10 - 2
src/bin/dhcp4/Makefile.am

@@ -15,13 +15,21 @@ pkglibexecdir = $(libexecdir)/@PACKAGE@
 CLEANFILES = spec_config.h
 
 man_MANS = b10-dhcp4.8
+DISTCLEANFILES = $(man_MANS)
 EXTRA_DIST = $(man_MANS) b10-dhcp4.xml dhcp4.spec
 
-if ENABLE_MAN
+if GENERATE_DOCS
 b10-dhcp4.8: b10-dhcp4.xml
-	xsltproc --novalid --xinclude --nonet -o $@ \
+	@XSLTPROC@ --novalid --xinclude --nonet -o $@ \
         http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
 	$(srcdir)/b10-dhcp4.xml
+
+else
+
+$(man_MANS):
+	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
+	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild BIND 10 > $@
+
 endif
 
 spec_config.h: spec_config.h.pre

+ 0 - 60
src/bin/dhcp4/b10-dhcp4.8

@@ -1,60 +0,0 @@
-'\" t
-.\"     Title: b10-dhcp4
-.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\"      Date: October 27, 2011
-.\"    Manual: BIND10
-.\"    Source: BIND10
-.\"  Language: English
-.\"
-.TH "B10\-DHCP4" "8" "October 27, 2011" "BIND10" "BIND10"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-b10-dhcp4 \- DHCPv4 server in BIND 10 architecture
-.SH "SYNOPSIS"
-.HP \w'\fBb10\-dhcp4\fR\ 'u
-\fBb10\-dhcp4\fR [\fB\-v\fR]
-.SH "DESCRIPTION"
-.PP
-The
-\fBb10\-dhcp4\fR
-daemon will provide the DHCPv4 server implementation when it becomes functional\&.
-.SH "ARGUMENTS"
-.PP
-The arguments are as follows:
-.PP
-\fB\-v\fR
-.RS 4
-Enable verbose mode\&.
-.RE
-.SH "SEE ALSO"
-.PP
-
-\fBbind10\fR(8)\&.
-.SH "HISTORY"
-.PP
-The
-\fBb10\-dhcp4\fR
-daemon was first coded in November 2011 by Tomek Mrugalski\&.
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2011 Internet Systems Consortium, Inc. ("ISC")
-.br

+ 1 - 0
src/bin/dhcp6/.gitignore

@@ -8,3 +8,4 @@ b10-dhcp6
 spec_config.h
 spec_config.h.pre
 tests/dhcp6_unittests
+/b10-dhcp6.8

+ 10 - 2
src/bin/dhcp6/Makefile.am

@@ -16,14 +16,22 @@ pkglibexecdir = $(libexecdir)/@PACKAGE@
 CLEANFILES = spec_config.h
 
 man_MANS = b10-dhcp6.8
+DISTCLEANFILES = $(man_MANS)
 EXTRA_DIST = $(man_MANS) b10-dhcp6.xml dhcp6.spec
 
-if ENABLE_MAN
+if GENERATE_DOCS
 
 b10-dhcp6.8: b10-dhcp6.xml
-	xsltproc --novalid --xinclude --nonet -o $@ \
+	@XSLTPROC@ --novalid --xinclude --nonet -o $@ \
         http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
         $(srcdir)/b10-dhcp6.xml
+
+else
+
+$(man_MANS):
+	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
+	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild BIND 10 > $@
+
 endif
 
 spec_config.h: spec_config.h.pre

+ 0 - 51
src/bin/dhcp6/b10-dhcp6.8

@@ -1,51 +0,0 @@
-'\" t
-.\"     Title: b10-dhcp6
-.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\"      Date: October 27, 2011
-.\"    Manual: BIND10
-.\"    Source: BIND10
-.\"  Language: English
-.\"
-.TH "B10\-DHCP6" "8" "October 27, 2011" "BIND10" "BIND10"
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-b10-dhcp6 \- DHCPv6 server in BIND 10 architecture
-.SH "SYNOPSIS"
-.HP \w'\fBb10\-dhcp6\fR\ 'u
-\fBb10\-dhcp6\fR [\fB\-v\fR]
-.SH "DESCRIPTION"
-.PP
-The
-\fBb10\-dhcp6\fR
-daemon will provide the DHCPv6 server implementation when it becomes functional\&.
-.SH "ARGUMENTS"
-.PP
-The arguments are as follows:
-.PP
-\fB\-v\fR
-.RS 4
-Enable verbose mode\&.
-.RE
-.SH "SEE ALSO"
-.PP
-
-\fBbind10\fR(8)\&.
-.SH "HISTORY"
-.PP
-The
-\fBb10\-dhcp6\fR
-daemon was first coded in June 2011 by Tomek Mrugalski\&.
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2011 Internet Systems Consortium, Inc. ("ISC")
-.br

+ 1 - 0
src/bin/host/.gitignore

@@ -1 +1,2 @@
 /b10-host
+/b10-host.1

+ 9 - 2
src/bin/host/Makefile.am

@@ -17,14 +17,21 @@ b10_host_LDADD += $(top_builddir)/src/lib/util/libb10-util.la
 b10_host_LDADD += $(top_builddir)/src/lib/exceptions/libb10-exceptions.la
 
 man_MANS = b10-host.1
+DISTCLEANFILES = $(man_MANS)
 EXTRA_DIST = $(man_MANS) b10-host.xml
 
 .PHONY: man
-if ENABLE_MAN
+if GENERATE_DOCS
 
 man: b10-host.1
 
 b10-host.1: b10-host.xml
-	xsltproc --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-host.xml
+	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-host.xml
+
+else
+
+$(man_MANS):
+	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
+	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild BIND 10 > $@
 
 endif

+ 0 - 118
src/bin/host/b10-host.1

@@ -1,118 +0,0 @@
-'\" t
-.\"     Title: b10-host
-.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\"      Date: May 4, 2011
-.\"    Manual: BIND10
-.\"    Source: BIND10
-.\"  Language: English
-.\"
-.TH "B10\-HOST" "1" "May 4, 2011" "BIND10" "BIND10"
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-b10-host \- DNS lookup utility
-.SH "SYNOPSIS"
-.HP \w'\fBb10\-host\fR\ 'u
-\fBb10\-host\fR [\fB\-a\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-d\fR] [\fB\-p\ \fR\fB\fIport\fR\fR] [\fB\-r\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-v\fR] [\fIname\fR] [\fB\fIserver\fR\fR]
-.SH "DESCRIPTION"
-.PP
-The
-\fBb10\-host\fR
-utility does DNS lookups\&. Its initial goal is to be a
-\fBhost\fR(1)
-clone, but also add a few features useful for BIND 10 development testing\&.
-.PP
-By default, it looks up the A, AAAA, and MX record sets for the
-\fIname\fR\&. Optionally, you may select a name server to query against by adding the
-\fIserver\fR
-argument\&.
-.SH "OPTIONS"
-.PP
-The arguments are as follows:
-.PP
-\fB\-a\fR
-.RS 4
-Enable verbose mode and do a query for type ANY\&. (If the
-\fB\-t\fR
-option is also set, then the ANY query is not done, but it still uses verbose mode\&.)
-.RE
-.PP
-\fB\-c \fR\fB\fIclass\fR\fR
-.RS 4
-Define the class for the query\&. The default is IN (Internet)\&.
-.RE
-.PP
-\fB\-d\fR
-.RS 4
-Enable verbose output mode, including elapsed time in milliseconds\&. Verbose mode shows the header, question, answer, authority, and additional sections (if provided)\&. (Same as
-\fB\-v\fR\&.)
-.RE
-.PP
-\fB\-p \fR\fB\fIport\fR\fR
-.RS 4
-Select an alternative port for the query\&. This may be a number or a service name\&. The default is 53 (domain)\&. This is not a standard feature of
-\fBhost\fR(1)\&.
-.RE
-.PP
-\fB\-r\fR
-.RS 4
-Disable recursive processing by not setting the Recursion Desired flag in the query\&.
-.RE
-.PP
-\fB\-t \fR\fB\fItype\fR\fR
-.RS 4
-Select a specific resource record type for the query\&. By default, it looks up the A, AAAA, and MX record sets\&.
-(This overrides the
-\fB\-a\fR
-option\&.)
-.RE
-.PP
-\fB\-v\fR
-.RS 4
-Same as
-\fB\-d\fR
-option\&.
-.RE
-.SH "COMPATIBILITY / BUGS"
-.PP
-
-\fBb10\-host\fR
-does not do reverse lookups by default yet (by detecting if name is a IPv4 or IPv6 address)\&.
-.PP
-Unknown
-\fB\-c\fR
-class or
-\fB\-t\fR
-type causes
-\fBb10\-host\fR
-to Abort\&.
-.PP
-Not all types are supported yet for formatting\&. Not all switches are supported yet\&.
-.PP
-It doesn\'t use
-/etc/resolv\&.conf
-at this time\&. The default name server used is 127\&.0\&.0\&.1\&.
-.PP
-
-\fB\-p\fR
-is not a standard feature\&.
-.SH "HISTORY"
-.PP
-The C++ version of
-\fBb10\-host\fR
-was started in October 2009 by Jeremy C\&. Reed of ISC\&. Its usage and output were based on the standard
-\fBhost\fR
-command\&.
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2011 Internet Systems Consortium, Inc. ("ISC")
-.br

+ 1 - 0
src/bin/loadzone/.gitignore

@@ -1,3 +1,4 @@
 /b10-loadzone
 /b10-loadzone.py
 /run_loadzone.sh
+/b10-loadzone.8

+ 9 - 2
src/bin/loadzone/Makefile.am

@@ -5,12 +5,19 @@ noinst_SCRIPTS = run_loadzone.sh
 CLEANFILES = b10-loadzone
 
 man_MANS = b10-loadzone.8
+DISTCLEANFILES = $(man_MANS)
 EXTRA_DIST = $(man_MANS) b10-loadzone.xml
 
-if ENABLE_MAN
+if GENERATE_DOCS
 
 b10-loadzone.8: b10-loadzone.xml
-	xsltproc --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-loadzone.xml
+	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-loadzone.xml
+
+else
+
+$(man_MANS):
+	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
+	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild BIND 10 > $@
 
 endif
 

+ 0 - 80
src/bin/loadzone/b10-loadzone.8

@@ -1,80 +0,0 @@
-'\" t
-.\"     Title: b10-loadzone
-.\"    Author: [see the "AUTHORS" section]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\"      Date: March 26, 2012
-.\"    Manual: BIND10
-.\"    Source: BIND10
-.\"  Language: English
-.\"
-.TH "B10\-LOADZONE" "8" "March 26, 2012" "BIND10" "BIND10"
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-b10-loadzone \- Load DNS Zone File
-.SH "SYNOPSIS"
-.HP \w'\fBb10\-loadzone\fR\ 'u
-\fBb10\-loadzone\fR [\fB\-d\ \fR\fB\fIdatabase\fR\fR] [\fB\-o\ \fR\fB\fIorigin\fR\fR] {filename}
-.SH "DESCRIPTION"
-.PP
-The
-\fBb10\-loadzone\fR
-utility loads a RFC 1035 style DNS master zone file and stores it in a BIND 10 ready data source format\&. Master files are text files that contain DNS Resource Records in text form\&.
-.if n \{\
-.sp
-.\}
-.RS 4
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-.br
-.ps +1
-\fBNote\fR
-.ps -1
-.br
-.sp
-Currently only the SQLITE3 data source is supported\&.
-.sp .5v
-.RE
-.PP
-Some control entries (aka directives) are supported\&. $ORIGIN is followed by a domain name, and sets the the origin that will be used for relative domain names in subsequent records\&. $INCLUDE is followed by a filename to load\&.
-The previous origin is restored after the file is included\&.
-$TTL is followed by a time\-to\-live value which is used by any following records that don\'t specify a TTL\&.
-.PP
-When re\-loading an existing zone, the prior version is completely removed\&. While the new version of the zone is being loaded, the old version remains accessible to queries\&. After the new version is completely loaded, the old version is swapped out and replaced with the new one in a single operation\&.
-.SH "ARGUMENTS"
-.PP
-\-d \fIdatabase\fR
-.RS 4
-Defines the filename for the database\&. The default is
-/usr/local/var/bind10\-devel/zone\&.sqlite3\&.
-.RE
-.PP
-\-o \fIorigin\fR
-.RS 4
-Defines the default origin for the zone file records\&.
-.RE
-.SH "FILES"
-.PP
-.SH "SEE ALSO"
-.PP
-
-\fBb10-auth\fR(8),
-\fBbind10\fR(8)\&.
-.SH "AUTHORS"
-.PP
-The
-\fBb10\-loadzone\fR
-tool was initial written by Evan Hunt of ISC\&.
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2010 Internet Systems Consortium, Inc. ("ISC")
-.br

+ 1 - 0
src/bin/loadzone/tests/correct/Makefile.am

@@ -12,6 +12,7 @@ EXTRA_DIST += ttl1.db
 EXTRA_DIST += ttl2.db
 EXTRA_DIST += ttlext.db
 EXTRA_DIST += example.db
+EXTRA_DIST += comment.db
 
 noinst_SCRIPTS = correct_test.sh
 

+ 8 - 0
src/bin/loadzone/tests/correct/comment.db

@@ -0,0 +1,8 @@
+; Test removal of comments and not removal from strings.
+; We had a bug - see #2188.
+comment.example.com.		60	IN	SOA	ns1.example.com. hostmaster.example.com. 1 43200 900 1814400 7200
+comment.example.com.		60	IN	NS	ns1.example.com.
+comment.example.com.		60	IN	TXT	"Simple text"
+comment.example.com.		60	IN	TXT	"; No comment"
+comment.example.com.		60	IN	TXT	"Also no comment here" ; But here it is a comment
+comment.example.com.		60	IN	TXT	"A combination ; see?" ; This is a "comment

+ 4 - 0
src/bin/loadzone/tests/correct/correct_test.sh.in

@@ -48,6 +48,9 @@ ${LOADZONE_PATH}/b10-loadzone -d ${TEST_OUTPUT_PATH}/zone.sqlite3 ttlext.db >> /
 echo "loadzone example.com. from example.db"
 ${LOADZONE_PATH}/b10-loadzone -d ${TEST_OUTPUT_PATH}/zone.sqlite3 example.db >> /dev/null
 
+echo "loadzone comment.example.com. from comment.db"
+${LOADZONE_PATH}/b10-loadzone -d ${TEST_OUTPUT_PATH}/zone.sqlite3 comment.db >> /dev/null
+
 echo "I:test master file \$INCLUDE semantics"
 echo "I:test master file BIND 8 compatibility TTL and \$TTL semantics"
 echo "I:test master file RFC1035 TTL and \$TTL semantics"
@@ -55,6 +58,7 @@ echo "I:test master file BIND8 compatibility and mixed \$INCLUDE with \$TTL sema
 echo "I:test master file RFC1035 TTL and mixed \$INCLUDE with \$TTL semantics"
 echo "I:test master file BIND9 extenstion of TTL"
 echo "I:test master file RFC1035 missing CLASS, TTL, NAME semantics"
+echo "I:test master file comments"
 
 ${PYTHON_EXEC} ${TEST_FILE_PATH}/get_zonedatas.py ${TEST_OUTPUT_PATH}/zone.sqlite3 > ${TEST_OUTPUT_PATH}/test.out
 echo "Compare test results."

+ 1 - 1
src/bin/loadzone/tests/correct/get_zonedatas.py

@@ -1,7 +1,7 @@
 from isc.datasrc import sqlite3_ds
 import sys
 ZONE_FILE = sys.argv[1]
-zonename_set = ["include.", "ttl1.", "ttl2.", "mix1.", "mix2.", "ttlext.", "example.com."]
+zonename_set = ["include.", "ttl1.", "ttl2.", "mix1.", "mix2.", "ttlext.", "example.com.", "comment.example.com."]
 for zone_name in zonename_set:
     for rr_data in sqlite3_ds.get_zone_datas(zone_name, ZONE_FILE):
         data_len = len(rr_data[2])

+ 6 - 0
src/bin/loadzone/tests/correct/known.test.out

@@ -77,3 +77,9 @@ ns2.example.com.		80	IN	A	1.1.1.1
 ns3.example.com.		60	IN	A	2.2.2.2
 ns4.example.com.		60	IN	A	3.3.3.3
 ns5.example.com.		90	IN	A	4.4.4.4
+comment.example.com.		60	IN	SOA	ns1.example.com. hostmaster.example.com. 1 43200 900 1814400 7200
+comment.example.com.		60	IN	NS	ns1.example.com.
+comment.example.com.		60	IN	TXT	"Simple text"
+comment.example.com.		60	IN	TXT	"; No comment"
+comment.example.com.		60	IN	TXT	"Also no comment here"
+comment.example.com.		60	IN	TXT	"A combination ; see?"

+ 1 - 0
src/bin/msgq/.gitignore

@@ -1,3 +1,4 @@
 /b10-msgq
 /msgq.py
 /run_msgq.sh
+/b10-msgq.8

+ 9 - 2
src/bin/msgq/Makefile.am

@@ -7,12 +7,19 @@ pkglibexec_SCRIPTS = b10-msgq
 CLEANFILES = b10-msgq msgq.pyc
 
 man_MANS = b10-msgq.8
+DISTCLEANFILES = $(man_MANS)
 EXTRA_DIST = $(man_MANS) msgq.xml
 
-if ENABLE_MAN
+if GENERATE_DOCS
 
 b10-msgq.8: msgq.xml
-	xsltproc --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/msgq.xml
+	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/msgq.xml
+
+else
+
+$(man_MANS):
+	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
+	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild BIND 10 > $@
 
 endif
 

+ 0 - 125
src/bin/msgq/b10-msgq.8

@@ -1,125 +0,0 @@
-'\" t
-.\"     Title: b10-msgq
-.\"    Author: [see the "AUTHORS" section]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\"      Date: June 25, 2012
-.\"    Manual: BIND10
-.\"    Source: BIND10
-.\"  Language: English
-.\"
-.TH "B10\-MSGQ" "8" "June 25, 2012" "BIND10" "BIND10"
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-b10-msgq \- message routing daemon for the Command Channel
-.SH "SYNOPSIS"
-.HP \w'\fBb10\-msgq\fR\ 'u
-\fBb10\-msgq\fR [\fB\-s\ \fR\fB\fIfile\fR\fR] [\fB\-v\fR] [\fB\-\-socket\-file\ \fR\fB\fIfile\fR\fR] [\fB\-\-verbose\fR]
-.SH "DESCRIPTION"
-.PP
-The
-\fBb10\-msgq\fR
-daemon provides message routing for the Command Channel\&.
-.PP
-The Command Channel is a message bus and subscription manager\&. Programs may subscribe to certain groups to receive messages for that group\&. Every new connection to
-\fBb10\-msgq\fR
-is assigned a unique identifier \-\- this is the local name\&. The commands it handles are:
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-
-\fBgetlname\fR
-\(em receive local name\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-
-\fBsend\fR
-\(em send a message to defined subscribers\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-
-\fBsubscribe\fR
-\(em add a subscription\&. This means it is a listener for messages for a specific group\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-
-\fBunsubscribe\fR
-\(em remove a subscription\&.
-.RE
-.sp
-.RE
-.PP
-The
-\fBb10\-msgq\fR
-daemon may be cleanly stopped by sending the SIGTERM signal to the process\&. This shutdown does not notify the subscribers\&.
-.SH "OPTIONS"
-.PP
-The arguments are as follows:
-.PP
-\fB\-s \fR\fB\fIfile\fR\fR, \fB\-\-socket\-file \fR\fB\fIfile\fR\fR
-.RS 4
-The UNIX domain socket file this daemon will use\&. The default is
-/usr/local/var/bind10\-devel/msg_socket\&.
-.RE
-.PP
-\fB\-v\fR, \fB\-\-verbose\fR
-.RS 4
-Enabled verbose mode\&. This enables diagnostic messages to STDERR\&. Displays more about what
-\fBb10\-msgq\fR
-is doing\&.
-.RE
-.SH "SEE ALSO"
-.PP
-
-\fBbind10\fR(8),
-BIND 10 Guide\&.
-.SH "AUTHORS"
-.PP
-The
-\fBb10\-msgq\fR
-daemon and Control Channel specification were initially designed by Michael Graff of ISC\&.
-.SH "HISTORY"
-.PP
-The python version was first coded in December 2009\&. The C version with now deprecated wire format was coded in September 2009\&.
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2010 Internet Systems Consortium, Inc. ("ISC")
-.br

+ 1 - 0
src/bin/resolver/.gitignore

@@ -5,3 +5,4 @@
 /resolver_messages.h
 /spec_config.h
 /spec_config.h.pre
+/b10-resolver.8

+ 9 - 2
src/bin/resolver/Makefile.am

@@ -23,12 +23,19 @@ CLEANFILES += resolver.spec spec_config.h
 CLEANFILES += resolver_messages.cc resolver_messages.h
 
 man_MANS = b10-resolver.8
+DISTCLEANFILES = $(man_MANS)
 EXTRA_DIST = $(man_MANS) b10-resolver.xml resolver_messages.mes
 
-if ENABLE_MAN
+if GENERATE_DOCS
 
 b10-resolver.8: b10-resolver.xml
-	xsltproc --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-resolver.xml
+	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-resolver.xml
+
+else
+
+$(man_MANS):
+	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
+	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild BIND 10 > $@
 
 endif
 

+ 0 - 149
src/bin/resolver/b10-resolver.8

@@ -1,149 +0,0 @@
-'\" t
-.\"     Title: b10-resolver
-.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\"      Date: February 28, 2012
-.\"    Manual: BIND10
-.\"    Source: BIND10
-.\"  Language: English
-.\"
-.TH "B10\-RESOLVER" "8" "February 28, 2012" "BIND10" "BIND10"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-b10-resolver \- Recursive DNS server
-.SH "SYNOPSIS"
-.HP \w'\fBb10\-resolver\fR\ 'u
-\fBb10\-resolver\fR [\fB\-v\fR]
-.SH "DESCRIPTION"
-.PP
-The
-\fBb10\-resolver\fR
-daemon provides the BIND 10 recursive DNS server\&. Normally it is started by the
-\fBbind10\fR(8)
-boss process\&.
-.PP
-This daemon communicates with other BIND 10 components over a
-\fBb10-msgq\fR(8)
-C\-Channel connection\&. If this connection is not established,
-\fBb10\-resolver\fR
-will exit\&.
-.PP
-It also receives its configurations from
-\fBb10-cfgmgr\fR(8)\&.
-.SH "OPTIONS"
-.PP
-The arguments are as follows:
-.PP
-\fB\-v\fR
-.RS 4
-Enable verbose mode\&. This sets logging to the maximum debugging level\&.
-.RE
-.SH "CONFIGURATION AND COMMANDS"
-.PP
-The configurable settings are:
-.PP
-
-\fIforward_addresses\fR
-defines the list of addresses and ports that
-\fBb10\-resolver\fR
-should forward queries to\&. Defining this enables forwarding\&.
-.PP
-
-\fIlisten_on\fR
-is a list of addresses and ports for
-\fBb10\-resolver\fR
-to listen on\&. The list items are the
-\fIaddress\fR
-string and
-\fIport\fR
-number\&. The defaults are address ::1 port 53 and address 127\&.0\&.0\&.1 port 53\&.
-.PP
-
-
-
-
-
-
-\fIquery_acl\fR
-is a list of query access control rules\&. The list items are the
-\fIaction\fR
-string and the
-\fIfrom\fR
-or
-\fIkey\fR
-strings\&. The possible actions are ACCEPT, REJECT and DROP\&. The
-\fIfrom\fR
-is a remote (source) IPv4 or IPv6 address or special keyword\&. The
-\fIkey\fR
-is a TSIG key name\&. The default configuration accepts queries from 127\&.0\&.0\&.1 and ::1\&.
-.PP
-
-\fIretries\fR
-is the number of times to retry (resend query) after a query timeout (\fItimeout_query\fR)\&. The default is 3\&.
-.PP
-
-\fIroot_addresses\fR
-is a list of addresses and ports for
-\fBb10\-resolver\fR
-to use directly as root servers to start resolving\&. The list items are the
-\fIaddress\fR
-string and
-\fIport\fR
-number\&. By default, a hardcoded address for l\&.root\-servers\&.net (199\&.7\&.83\&.42 or 2001:500:3::42) is used\&.
-.PP
-
-\fItimeout_client\fR
-is the number of milliseconds to wait before timing out the incoming client query\&. If set to \-1, this timeout is disabled\&. The default is 4000\&. After this timeout, a SERVFAIL is sent back to the client asking the question\&. (The lookup may continue after the timeout, but a later answer is not returned for the now\-past query\&.)
-.PP
-
-\fItimeout_lookup\fR
-is the number of milliseconds before it stops trying the query\&. If set to \-1, this timeout is disabled\&. The default is 30000\&.
-.PP
-
-
-\fItimeout_query\fR
-is the number of milliseconds to wait before it retries a query\&. If set to \-1, this timeout is disabled\&. The default is 2000\&.
-.PP
-The configuration command is:
-.PP
-
-\fBshutdown\fR
-exits
-\fBb10\-resolver\fR\&. This has an optional
-\fIpid\fR
-argument to select the process ID to stop\&. (Note that the BIND 10 boss process may restart this service if configured\&.)
-.SH "SEE ALSO"
-.PP
-
-\fBb10-cfgmgr\fR(8),
-\fBb10-cmdctl\fR(8),
-\fBb10-msgq\fR(8),
-\fBbind10\fR(8),
-BIND 10 Guide\&.
-.SH "HISTORY"
-.PP
-The
-\fBb10\-resolver\fR
-daemon was first coded in September 2010\&. The initial implementation only provided forwarding\&. Iteration was introduced in January 2011\&. Caching was implemented in February 2011\&. Access control was introduced in June 2011\&.
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2010-2012 Internet Systems Consortium, Inc. ("ISC")
-.br

+ 1 - 0
src/bin/sockcreator/.gitignore

@@ -1 +1,2 @@
 /b10-sockcreator
+/b10-sockcreator.8

+ 17 - 0
src/bin/sockcreator/Makefile.am

@@ -12,6 +12,23 @@ pkglibexecdir = $(libexecdir)/@PACKAGE@
 
 CLEANFILES = *.gcno *.gcda
 
+man_MANS = b10-sockcreator.8
+DISTCLEANFILES = $(man_MANS)
+EXTRA_DIST = $(man_MANS) b10-sockcreator.xml
+
+if GENERATE_DOCS
+
+b10-sockcreator.8: b10-sockcreator.xml
+	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-sockcreator.xml
+
+else
+
+$(man_MANS):
+	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
+	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild BIND 10 > $@
+
+endif
+
 pkglibexec_PROGRAMS = b10-sockcreator
 
 b10_sockcreator_SOURCES = sockcreator.cc sockcreator.h main.cc

+ 96 - 0
src/bin/sockcreator/b10-sockcreator.xml

@@ -0,0 +1,96 @@
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+               "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+	       [<!ENTITY mdash "&#8212;">]>
+<!--
+ - Copyright (C) 2012  Internet Systems Consortium, Inc. ("ISC")
+ -
+ - Permission to use, copy, modify, and/or 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 ISC DISCLAIMS ALL WARRANTIES WITH
+ - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ - AND FITNESS.  IN NO EVENT SHALL ISC 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.
+-->
+
+<refentry>
+
+  <refentryinfo>
+    <date>February 28, 2012</date>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>b10-sockcreator</refentrytitle>
+    <manvolnum>8</manvolnum>
+    <refmiscinfo>BIND10</refmiscinfo>
+  </refmeta>
+
+  <refnamediv>
+    <refname>b10-sockcreator</refname>
+    <refpurpose>socket creation daemon</refpurpose>
+  </refnamediv>
+
+  <docinfo>
+    <copyright>
+      <year>2012</year>
+      <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
+    </copyright>
+  </docinfo>
+
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>b10-sockcreator</command>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>DESCRIPTION</title>
+    <para>
+      The <command>b10-sockcreator</command> daemon's entire job
+      is to create sockets and assign names to them.
+      It is started by
+      <citerefentry><refentrytitle>bind10</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+      and communicates with it.
+      The new socket is sent over a file descriptor.
+    </para>
+
+<!-- TODO: integrate README here -->
+
+    <para>
+      The <command>b10-sockcreator</command> daemon will exit
+      if there is an unrecoverable error or unknown command.
+    </para>
+
+  </refsect1>
+
+  <refsect1>
+    <title>SEE ALSO</title>
+    <para>
+      <citerefentry>
+        <refentrytitle>bind10</refentrytitle><manvolnum>8</manvolnum>
+      </citerefentry>,
+      <citetitle>BIND 10 Guide</citetitle>.
+    </para>
+<!-- TODO: point to developer docs -->
+  </refsect1>
+
+  <refsect1>
+    <title>AUTHORS</title>
+    <para>
+      The <command>b10-sockcreator</command> daemon
+      was initially designed by Michal Vaner of CZNIC.
+    </para>
+  </refsect1>
+
+</refentry><!--
+ - Local variables:
+ - mode: sgml
+ - End:
+-->
+
+
+

+ 2 - 0
src/bin/stats/.gitignore

@@ -2,3 +2,5 @@
 /b10-stats-httpd
 /stats.py
 /stats_httpd.py
+/b10-stats-httpd.8
+/b10-stats.8

+ 10 - 3
src/bin/stats/Makefile.am

@@ -20,18 +20,25 @@ CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/stats_httpd_messages.py
 CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/stats_httpd_messages.pyc
 
 man_MANS = b10-stats.8 b10-stats-httpd.8
+DISTCLEANFILES = $(man_MANS)
 EXTRA_DIST = $(man_MANS) b10-stats.xml b10-stats-httpd.xml
 EXTRA_DIST += stats.spec stats-httpd.spec
 EXTRA_DIST += stats-httpd-xml.tpl stats-httpd-xsd.tpl stats-httpd-xsl.tpl
 EXTRA_DIST += stats_messages.mes stats_httpd_messages.mes
 
-if ENABLE_MAN
+if GENERATE_DOCS
 
 b10-stats.8: b10-stats.xml
-	xsltproc --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-stats.xml
+	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-stats.xml
 
 b10-stats-httpd.8: b10-stats-httpd.xml
-	xsltproc --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-stats-httpd.xml
+	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-stats-httpd.xml
+
+else
+
+$(man_MANS):
+	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
+	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild BIND 10 > $@
 
 endif
 

File diff suppressed because it is too large
+ 0 - 126
src/bin/stats/b10-stats-httpd.8


+ 0 - 170
src/bin/stats/b10-stats.8

@@ -1,170 +0,0 @@
-'\" t
-.\"     Title: b10-stats
-.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
-.\"      Date: June 20, 2012
-.\"    Manual: BIND10
-.\"    Source: BIND10
-.\"  Language: English
-.\"
-.TH "B10\-STATS" "8" "June 20, 2012" "BIND10" "BIND10"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-b10-stats \- BIND 10 statistics module
-.SH "SYNOPSIS"
-.HP \w'\fBb10\-stats\fR\ 'u
-\fBb10\-stats\fR [\fB\-v\fR] [\fB\-\-verbose\fR]
-.SH "DESCRIPTION"
-.PP
-The
-\fBb10\-stats\fR
-daemon collects statistics data from each BIND 10 module\&. Its statistics information may be reported via
-\fBbindctl\fR
-or
-\fBb10\-stats\-httpd\fR\&. It is started by
-\fBbind10\fR
-and communicates by using the Command Channel by
-\fBb10\-msgq\fR
-with other modules like
-\fBbind10\fR,
-\fBb10\-auth\fR
-and so on\&.
-\fBb10\-stats\fR
-periodically requests statistics data to each module and receives\&. The interval time can be configured via
-\fBbindctl\fR\&.
-\fBb10\-stats\fR
-cannot accept any command from other modules for updating statistics data\&. The stats module collects data and aggregates it\&.
-\fBb10\-stats\fR
-invokes an internal command for
-\fBbind10\fR
-after its initial starting to make sure it collects statistics data from
-\fBbind10\fR\&.
-.SH "OPTIONS"
-.PP
-The arguments are as follows:
-.PP
-\fB\-v\fR, \fB\-\-verbose\fR
-.RS 4
-This enables maximum debug logging\&.
-.RE
-.SH "CONFIGURATION AND COMMANDS"
-.PP
-The configurable setting in
-stats\&.spec
-is:
-.PP
-\fIpoll\-interval\fR
-.RS 4
-is a timer interval in seconds for
-\fBb10\-stats\fR
-to polling each module for its statistics data\&. The default is 60 second\&. Polling can be disabled by setting to 0\&. The type of the value should be an unsigned integer\&. Setting to a negative integer is ignored\&.
-.RE
-.PP
-The configuration commands are:
-.PP
-
-\fBshow\fR
-will send the statistics data in JSON format\&. By default, it outputs all the statistics data it has collected\&. An optional item name may be specified to receive individual output\&.
-.PP
-
-\fBshowschema\fR
-will send the schema of the statistics data in JSON format\&. The output is equivalent to the statistics part of
-stats\&.spec\&.
-.PP
-
-\fBshutdown\fR
-will shutdown the
-\fBb10\-stats\fR
-process\&. This has an optional
-\fIpid\fR
-argument to select the process ID to stop\&. (Note that the BIND 10 boss process may restart this service if configured\&.)
-.PP
-
-\fBstatus\fR
-simply indicates that the daemon is running\&.
-.SH "STATISTICS DATA"
-.PP
-The
-\fBb10\-stats\fR
-daemon contains these
-\(lqStats\(rq
-statistics:
-.PP
-boot_time
-.RS 4
-The date and time when this daemon was started in ISO 8601 format\&. This is a constant which can\*(Aqt be reset except by restarting
-\fBb10\-stats\fR\&.
-.RE
-.PP
-last_update_time
-.RS 4
-The date and time (in ISO 8601 format) when this daemon last received data from another component\&.
-.RE
-.PP
-lname
-.RS 4
-This is the name used for the
-\fBb10\-msgq\fR
-command\-control channel\&. (This is a constant which can\*(Aqt be reset except by restarting
-\fBb10\-stats\fR\&.)
-.RE
-.PP
-report_time
-.RS 4
-The latest report date and time in ISO 8601 format\&.
-.RE
-.PP
-start_time
-.RS 4
-This is the date and time (in ISO 8601 format) when this daemon started collecting data\&.
-.RE
-.PP
-timestamp
-.RS 4
-The current date and time represented in seconds since UNIX epoch (1970\-01\-01T00:00:00Z) with precision (delimited with a period) up to one hundred thousandth of second\&.
-.RE
-.PP
-See other manual pages for explanations for their statistics that are kept track by
-\fBb10\-stats\fR\&.
-.SH "FILES"
-.PP
-/usr/local/share/bind10\-devel/stats\&.spec
-\(em This is a spec file for
-\fBb10\-stats\fR\&. It contains commands for
-\fBb10\-stats\fR\&. They can be invoked via
-bindctl(1)\&.
-.SH "SEE ALSO"
-.PP
-
-\fBb10-stats-httpd\fR(8),
-\fBbind10\fR(8),
-\fBbindctl\fR(1),
-\fBb10-auth\fR(8),
-BIND 10 Guide\&.
-.SH "HISTORY"
-.PP
-The
-\fBb10\-stats\fR
-daemon was initially designed and implemented by Naoki Kambe of JPRS in October 2010\&.
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2010-2012 Internet Systems Consortium, Inc. ("ISC")
-.br

+ 1 - 0
src/bin/sysinfo/.gitignore

@@ -1,2 +1,3 @@
 /isc-sysinfo
 /sysinfo.py
+/isc-sysinfo.1

+ 9 - 2
src/bin/sysinfo/Makefile.am

@@ -12,11 +12,18 @@ MAN1_FILES = \
 
 man_MANS = \
 	$(MAN1_FILES:.xml=.1)
+DISTCLEANFILES = $(man_MANS)
 
-if ENABLE_MAN
+if GENERATE_DOCS
 
 .xml.1:
-	xsltproc --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
+	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
+
+else
+
+$(man_MANS):
+	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
+	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild BIND 10 > $@
 
 endif
 

+ 0 - 66
src/bin/sysinfo/isc-sysinfo.1

@@ -1,66 +0,0 @@
-'\" t
-.\"     Title: isc-sysinfo
-.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\"      Date: June 26, 2012
-.\"    Manual: BIND10
-.\"    Source: BIND10
-.\"  Language: English
-.\"
-.TH "ISC\-SYSINFO" "1" "June 26, 2012" "BIND10" "BIND10"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-isc-sysinfo \- BIND 10 system information display tool
-.SH "SYNOPSIS"
-.HP \w'\fBisc\-sysinfo\fR\ 'u
-\fBisc\-sysinfo\fR
-.SH "DESCRIPTION"
-.PP
-The
-\fBisc\-sysinfo\fR
-program collects and outputs a variety of information about the system that BIND 10 is running on\&. This information can be useful to people involved in debugging and technical support\&.
-.SH "ARGUMENTS"
-.PP
-\-h
-.RS 4
-Displays usage instructions\&.
-.RE
-.PP
-\-o \fIoutput\-file\fR
-.RS 4
-If an output file is specified, the output of
-\fBisc\-sysinfo\fR
-is written to this file\&. By default, the output is written to standard output\&.
-.RE
-.SH "SEE ALSO"
-.PP
-
-\fBbind10\fR(8),
-BIND 10 Guide\&.
-.SH "HISTORY"
-.PP
-The
-\fBisc\-sysinfo\fR
-daemon was initially implemented by ISC staff in June, 2012\&.
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2012 Internet Systems Consortium, Inc. ("ISC")
-.br

+ 1 - 0
src/bin/usermgr/.gitignore

@@ -1,3 +1,4 @@
 /b10-cmdctl-usermgr
 /b10-cmdctl-usermgr.py
 /run_b10-cmdctl-usermgr.sh
+/b10-cmdctl-usermgr.8

+ 9 - 2
src/bin/usermgr/Makefile.am

@@ -5,12 +5,19 @@ b10_cmdctl_usermgrdir = $(pkgdatadir)
 CLEANFILES=	b10-cmdctl-usermgr
 
 man_MANS = b10-cmdctl-usermgr.8
+DISTCLEANFILES = $(man_MANS)
 EXTRA_DIST = $(man_MANS) b10-cmdctl-usermgr.xml
 
-if ENABLE_MAN
+if GENERATE_DOCS
 
 b10-cmdctl-usermgr.8: b10-cmdctl-usermgr.xml
-	xsltproc --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-cmdctl-usermgr.xml
+	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-cmdctl-usermgr.xml
+
+else
+
+$(man_MANS):
+	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
+	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild BIND 10 > $@
 
 endif
 

+ 0 - 74
src/bin/usermgr/b10-cmdctl-usermgr.8

@@ -1,74 +0,0 @@
-'\" t
-.\"     Title: b10-cmdctl-usermgr
-.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\"      Date: March 17, 2010
-.\"    Manual: BIND10
-.\"    Source: BIND10
-.\"  Language: English
-.\"
-.TH "B10\-CMDCTL\-USERMGR" "8" "March 17, 2010" "BIND10" "BIND10"
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-b10-cmdctl-usermgr \- cmdctl user maintenance tool
-.SH "SYNOPSIS"
-.HP \w'\fBb10\-cmdctl\-usermgr\fR\ 'u
-\fBb10\-cmdctl\-usermgr\fR [\fB\-f\ \fR\fB\fIfilename\fR\fR] [\fB\-h\fR] [\fB\-v\fR] [\fB\-\-file\ \fR\fB\fIfilename\fR\fR] [\fB\-\-help\fR] [\fB\-\-version\fR]
-.SH "DESCRIPTION"
-.PP
-The
-\fBb10\-cmdctl\-usermgr\fR
-tool may be used to add accounts with passwords for the
-\fBb10-cmdctl\fR(8)
-daemon\&.
-.PP
-By default, the accounts are saved in the
-cmdctl\-accounts\&.csv
-file in the current directory, unless the
-\fB\-\-filename\fR
-switch is used\&. The entry is appended to the file\&.
-.PP
-The tool can\'t remove or replace existing entries\&.
-.SH "OPTIONS"
-.PP
-The arguments are as follows:
-.PP
-\fB\-h\fR, \fB\-\-help\fR
-.RS 4
-Report the usage statement and exit\&.
-.RE
-.PP
-\fB\-f \fR\fB\fIfilename\fR\fR, \fB\-\-file \fR\fB\fIfilename\fR\fR
-.RS 4
-Define the filename to append the account to\&. The default is
-cmdctl\-accounts\&.csv
-in the current directory\&.
-.RE
-.PP
-\fB\-v\fR, \fB\-\-version\fR
-.RS 4
-Report the version and exit\&.
-.RE
-.SH "SEE ALSO"
-.PP
-
-\fBb10-cmdctl\fR(8),
-BIND 10 Guide\&.
-.SH "HISTORY"
-.PP
-The
-\fBb10\-cmdctl\-usermgr\fR
-tool was implemented in January 2010 by Zhang Likun of CNNIC for the ISC BIND 10 project\&.
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2010 Internet Systems Consortium, Inc. ("ISC")
-.br

+ 1 - 0
src/bin/xfrin/.gitignore

@@ -1,3 +1,4 @@
 /b10-xfrin
 /run_b10-xfrin.sh
 /xfrin.py
+/b10-xfrin.8

+ 9 - 2
src/bin/xfrin/Makefile.am

@@ -15,13 +15,20 @@ CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/xfrin_messages.py
 CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/xfrin_messages.pyc
 
 man_MANS = b10-xfrin.8
+DISTCLEANFILES = $(man_MANS)
 EXTRA_DIST = $(man_MANS) b10-xfrin.xml
 EXTRA_DIST += xfrin.spec xfrin_messages.mes
 
-if ENABLE_MAN
+if GENERATE_DOCS
 
 b10-xfrin.8: b10-xfrin.xml
-	xsltproc --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-xfrin.xml
+	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-xfrin.xml
+
+else
+
+$(man_MANS):
+	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
+	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild BIND 10 > $@
 
 endif
 

+ 0 - 161
src/bin/xfrin/b10-xfrin.8

@@ -1,161 +0,0 @@
-'\" t
-.\"     Title: b10-xfrin
-.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\"      Date: October 12, 2011
-.\"    Manual: BIND10
-.\"    Source: BIND10
-.\"  Language: English
-.\"
-.TH "B10\-XFRIN" "8" "October 12, 2011" "BIND10" "BIND10"
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-b10-xfrin \- Incoming DNS zone transfer service
-.SH "SYNOPSIS"
-.HP \w'\fBb10\-xfrin\fR\ 'u
-\fBb10\-xfrin\fR
-.SH "DESCRIPTION"
-.PP
-The
-\fBb10\-xfrin\fR
-daemon provides the BIND 10 incoming DNS zone transfer service\&. Normally it is started by the
-\fBbind10\fR(8)
-boss process\&. When triggered it can request and receive a zone transfer and store the zone in a BIND 10 zone data source\&.
-.PP
-The
-\fBb10\-xfrin\fR
-daemon supports both AXFR and IXFR\&. Due to some implementation limitations of the current development release, however, it only tries AXFR by default, and care should be taken to enable IXFR\&. See the BIND 10 Guide for more details\&.
-.PP
-This daemon communicates with BIND 10 over a
-\fBb10-msgq\fR(8)
-C\-Channel connection\&. If this connection is not established,
-\fBb10\-xfrin\fR
-will exit\&.
-.PP
-
-\fBb10\-xfrin\fR
-receives its configurations from
-\fBb10-cfgmgr\fR(8)\&.
-.SH "CONFIGURATION AND COMMANDS"
-.PP
-The configurable settings are:
-.PP
-\fItransfers_in\fR
-defines the maximum number of inbound zone transfers that can run concurrently\&. The default is 10\&.
-.PP
-
-\fIzones\fR
-is a list of zones known to the
-\fBb10\-xfrin\fR
-daemon\&. The list items are:
-\fIname\fR
-(the zone name),
-\fIclass\fR
-(defaults to
-\(lqIN\(rq),
-\fImaster_addr\fR
-(the zone master to transfer from),
-\fImaster_port\fR
-(defaults to 53),
-\fIuse_ixfr\fR
-(defaults to false), and
-\fItsig_key\fR
-(optional TSIG key to use)\&. The
-\fItsig_key\fR
-is specified using a full string colon\-delimited name:key:algorithm representation (e\&.g\&.
-\(lqfoo\&.example\&.org:EvABsfU2h7uofnmqaRCrhHunGsd=:hmac\-sha1\(rq)\&.
-.PP
-(The site\-wide
-\fImaster_addr\fR
-and
-\fImaster_port\fR
-configurations are deprecated; use the
-\fIzones\fR
-list configuration instead\&.)
-.PP
-The configuration commands are:
-.PP
-
-\fBnotify\fR
-is sent by
-\fBb10-zonemgr\fR(8)
-when a DNS NOTIFY message is received to initiate a zone transfer\&.
-This is an internal command and not exposed to the administrator\&.
-.PP
-
-\fBrefresh\fR
-triggers the transfer in for a single zone\&. It is the same as
-\fBretransfer\fR
-except it checks the SOA serial first\&.
-This is an internal command and not exposed to the administrator\&.
-
-.PP
-
-\fBrefresh_from_zonemgr\fR
-is sent by
-\fBb10-zonemgr\fR(8)
-according to the SOA\'s REFRESH time to tell
-\fBb10\-xfrin\fR
-that the zone needs to do a zone refresh\&. This is an internal command and not exposed to the administrator\&.
-.PP
-
-\fBretransfer\fR
-triggers the transfer in for a single zone without checking the zone\'s serial number\&. It has the following arguments:
-\fIzone_name\fR
-to define the zone to request,
-\fIzone_class\fR
-to define the class (defaults to
-\(lqIN\(rq),
-\fImaster\fR
-to define the IP address of the authoritative server to transfer from, and
-\fIport\fR
-to define the port number on the authoritative server (defaults to 53)\&. If the address or port is not specified, it will use the value previously defined in the
-\fIzones\fR
-configuration\&.
-.PP
-
-\fBshutdown\fR
-stops all incoming zone transfers and exits
-\fBb10\-xfrin\fR\&. (Note that the BIND 10 boss process will restart this service\&.)
-.if n \{\
-.sp
-.\}
-.RS 4
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-.br
-.ps +1
-\fBNote\fR
-.ps -1
-.br
-.PP
-This prototype version uses SQLite3 as its data source backend\&. Future versions will be configurable, supporting multiple data storage types\&.
-.sp .5v
-.RE
-.SH "SEE ALSO"
-.PP
-
-\fBb10-cfgmgr\fR(8),
-\fBb10-msgq\fR(8),
-\fBb10-zonemgr\fR(8),
-\fBbind10\fR(8),
-BIND 10 Guide\&.
-.SH "HISTORY"
-.PP
-The
-\fBb10\-xfrin\fR
-daemon was implemented in March 2010 by Zhang Likun of CNNIC for the ISC BIND 10 project\&.
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2010-2011 Internet Systems Consortium, Inc. ("ISC")
-.br

+ 1 - 0
src/bin/xfrout/.gitignore

@@ -3,3 +3,4 @@
 /xfrout.py
 /xfrout.spec
 /xfrout.spec.pre
+/b10-xfrout.8

+ 9 - 2
src/bin/xfrout/Makefile.am

@@ -15,12 +15,19 @@ CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/xfrout_messages.py
 CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/xfrout_messages.pyc
 
 man_MANS = b10-xfrout.8
+DISTCLEANFILES = $(man_MANS)
 EXTRA_DIST = $(man_MANS) b10-xfrout.xml xfrout_messages.mes
 
-if ENABLE_MAN
+if GENERATE_DOCS
 
 b10-xfrout.8: b10-xfrout.xml
-	xsltproc --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-xfrout.xml
+	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-xfrout.xml
+
+else
+
+$(man_MANS):
+	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
+	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild BIND 10 > $@
 
 endif
 

+ 0 - 149
src/bin/xfrout/b10-xfrout.8

@@ -1,149 +0,0 @@
-'\" t
-.\"     Title: b10-xfrout
-.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\"      Date: March 16. 2012
-.\"    Manual: BIND10
-.\"    Source: BIND10
-.\"  Language: English
-.\"
-.TH "B10\-XFROUT" "8" "March 16\&. 2012" "BIND10" "BIND10"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-b10-xfrout \- Outbound DNS zone transfer service
-.SH "SYNOPSIS"
-.HP \w'\fBb10\-xfrout\fR\ 'u
-\fBb10\-xfrout\fR [\fB\-v\fR] [\fB\-\-verbose\fR]
-.SH "DESCRIPTION"
-.PP
-The
-\fBb10\-xfrout\fR
-daemon provides the BIND 10 outgoing DNS zone transfer service using AXFR or IXFR\&. It is also used to send outgoing NOTIFY messages\&. Normally it is started by the
-\fBbind10\fR(8)
-boss process\&. When the
-\fBb10\-auth\fR
-DNS server receives a transfer request,
-\fBb10\-xfrout\fR
-sends the zone as found in the BIND 10 zone data store\&.
-.if n \{\
-.sp
-.\}
-.RS 4
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-.br
-.ps +1
-\fBNote\fR
-.ps -1
-.br
-.sp
-Currently IXFR only works if it gets the zone via \fBb10\-xfrin\fR and only on TCP\&.
-.sp .5v
-.RE
-.PP
-This daemon communicates with BIND 10 over a
-\fBb10-msgq\fR(8)
-C\-Channel connection\&. If this connection is not established,
-\fBb10\-xfrout\fR
-will exit\&.
-.PP
-
-\fBb10\-xfrout\fR
-receives its configurations from
-\fBb10-cfgmgr\fR(8)\&.
-.SH "CONFIGURATION AND COMMANDS"
-.PP
-The configurable settings are:
-.PP
-
-\fItransfers_out\fR
-defines the maximum number of outgoing zone transfers that can run concurrently\&. The default is 10\&.
-.PP
-
-\fItransfer_acl\fR
-A list of ACL elements that apply to all transfer requests by default (unless overridden in
-\fIzone_config\fR)\&. See the
-BIND 10 Guide
-for configuration examples\&. The default is an element that allows any transfer requests\&.
-.PP
-
-\fIzone_config\fR
-A list of JSON objects (i\&.e\&. maps) that define per zone configuration concerning
-\fBb10\-xfrout\fR\&. The supported names of each object are "origin" (the origin name of the zone), "class" (the RR class of the zone, optional, default to "IN"), and "transfer_acl" (ACL only applicable to transfer requests for that zone)\&. See the
-BIND 10 Guide
-for configuration examples\&. The default is an empty list, that is, no zone specific configuration\&.
-.if n \{\
-.sp
-.\}
-.RS 4
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-.br
-.ps +1
-\fBNote\fR
-.ps -1
-.br
-.sp
-This prototype version uses SQLite3 as its data source backend\&. Future versions will be configurable, supporting multiple data storage types\&.
-.sp .5v
-.RE
-.PP
-The configuration commands are:
-.PP
-
-\fBnotify\fR
-triggers
-\fBb10\-xfrout\fR
-to send NOTIFY message(s)\&. It has the following arguments:
-\fIzone_name\fR
-to define the zone to send notifies for and the optional
-\fIzone_class\fR
-to define the class (defaults to
-\(lqIN\(rq)\&.
-\fBb10-xfrin\fR(8)
-sends this command when a zone transferred in successfully\&.
-.PP
-
-\fBshutdown\fR
-stops all outbound zone transfers and exits
-\fBb10\-xfrout\fR\&. This has an optional
-\fIpid\fR
-argument to select the process ID to stop\&. (Note that the BIND 10 boss process may restart this service if configured\&.)
-.SH "SEE ALSO"
-.PP
-
-\fBb10-auth\fR(8),
-\fBb10-cfgmgr\fR(8),
-\fBb10-msgq\fR(8),
-\fBb10-xfrin\fR(8),
-\fBbind10\fR(8),
-BIND 10 Guide\&.
-.SH "HISTORY"
-.PP
-The
-\fBb10\-xfrout\fR
-daemon was first implemented in March 2010 by Zhang Likun of CNNIC for the ISC BIND 10 project\&.
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2010-2012 Internet Systems Consortium, Inc. ("ISC")
-.br

+ 1 - 0
src/bin/zonemgr/.gitignore

@@ -3,3 +3,4 @@
 /zonemgr.py
 /zonemgr.spec
 /zonemgr.spec.pre
+/b10-zonemgr.8

+ 9 - 2
src/bin/zonemgr/Makefile.am

@@ -15,12 +15,19 @@ CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/zonemgr_messages.py
 CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/zonemgr_messages.pyc
 
 man_MANS = b10-zonemgr.8
+DISTCLEANFILES = $(man_MANS)
 EXTRA_DIST = $(man_MANS) b10-zonemgr.xml zonemgr_messages.mes
 
-if ENABLE_MAN
+if GENERATE_DOCS
 
 b10-zonemgr.8: b10-zonemgr.xml
-	xsltproc --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-zonemgr.xml
+	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-zonemgr.xml
+
+else
+
+$(man_MANS):
+	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
+	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild BIND 10 > $@
 
 endif
 

+ 0 - 143
src/bin/zonemgr/b10-zonemgr.8

@@ -1,143 +0,0 @@
-'\" t
-.\"     Title: b10-zonemgr
-.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\"      Date: February 28, 2012
-.\"    Manual: BIND10
-.\"    Source: BIND10
-.\"  Language: English
-.\"
-.TH "B10\-ZONEMGR" "8" "February 28, 2012" "BIND10" "BIND10"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-b10-zonemgr \- BIND 10 Secondary zone manager
-.SH "SYNOPSIS"
-.HP \w'\fBb10\-zonemgr\fR\ 'u
-\fBb10\-zonemgr\fR [\fB\-v\fR] [\fB\-\-verbose\fR]
-.SH "DESCRIPTION"
-.PP
-The
-\fBb10\-zonemgr\fR
-daemon, also known as the BIND 10 secondary manager, keeps track of timers and other information necessary for BIND 10 to act as a DNS slave\&. Normally it is started by the
-\fBbind10\fR(8)
-boss process\&.
-.PP
-This daemon communicates with BIND 10 over a
-\fBb10-msgq\fR(8)
-C\-Channel connection\&. If this connection is not established,
-\fBb10\-zonemgr\fR
-will exit\&.
-.PP
-
-\fBb10\-zonemgr\fR
-receives its configurations from
-\fBb10-cfgmgr\fR(8)\&.
-.SH "CONFIGURATION AND COMMANDS"
-.PP
-The configurable settings are:
-.PP
-
-\fIlowerbound_refresh\fR
-defines the minimum SOA REFRESH time in seconds\&. The default is 10\&.
-.PP
-
-\fIlowerbound_retry\fR
-defines the minimum SOA RETRY time in seconds\&. The default is 5\&.
-.PP
-
-\fIrefresh_jitter\fR
-is used to provide a time range for randomizing the refresh and retry timers to help avoid many zones needing to do a refresh or retry at the same time\&. This value is a real number\&. The maximum amount is 0\&.5 (the new timer will be within half the original time)\&. The default is 0\&.25 (up to a quarter sooner)\&. Set to 0 to disable this jitter\&.
-.PP
-
-\fIreload_jitter\fR
-
-This value is a real number\&. The default is 0\&.75\&.
-.PP
-
-\fImax_transfer_timeout\fR
-defines the maximum amount of time in seconds for a transfer\&.
-The default is 14400 (4 hours)\&.
-.PP
-
-\fIsecondary_zones\fR
-is a list of slave zones that the
-\fBb10\-zonemgr\fR
-should keep timers for\&. The list items include the
-\fIname\fR
-(which defines the zone name) and the
-\fIclass\fR
-(which defaults to
-\(lqIN\(rq)\&.
-.PP
-(A deprecated configuration is
-\fIjitter_scope\fR
-which is superceded by
-\fIrefresh_jitter\fR
-and
-\fIreload_jitter\fR\&.)
-.PP
-The configuration commands are:
-.PP
-
-\fBnotify\fR
-(sent by
-\fBb10-auth\fR(8)) tells
-\fBb10\-zonemgr\fR
-the zone name and class, and the IP address for the master (source of the NOTIFY message)\&. This will set the zone\*(Aqs refresh time to now\&.
-This is an internal command and not exposed to the administrator\&.
-.PP
-
-\fBshutdown\fR
-exits
-\fBb10\-zonemgr\fR\&. This has an optional
-\fIpid\fR
-argument to select the process ID to stop\&. (Note that the BIND 10 boss process may restart this service if configured\&.)
-.PP
-
-\fBzone_new_data_ready\fR
-is sent from
-\fBb10-xfrin\fR(8)
-to indicate that the zone transferred in successfully\&. This is an internal command and not exposed to the administrator\&.
-.PP
-
-\fBzone_xfrin_failed\fR
-is sent from
-\fBb10-xfrin\fR(8)
-to indicate a failure (such as a transfer\-in was incomplete)\&. The refresh timer for the zone is reset\&.
-This is an internal command and not exposed to the administrator\&.
-.SH "SEE ALSO"
-.PP
-
-\fBb10-auth\fR(8),
-\fBb10-cfgmgr\fR(8),
-\fBb10-msgq\fR(8),
-\fBb10-xfrin\fR(8),
-\fBbind10\fR(8),
-BIND 10 Guide\&.
-.SH "HISTORY"
-.PP
-The
-\fBb10\-zonemgr\fR
-daemon was designed in July 2010 by CNNIC for the ISC BIND 10 project\&.
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2010-2012 Internet Systems Consortium, Inc. ("ISC")
-.br

+ 13 - 1
src/lib/asiodns/dns_server.h

@@ -81,7 +81,7 @@ public:
     /// \brief Stop current running server
     virtual void stop() { self_->stop();}
 
-    /// \brief Resume processing of the server coroutine after an 
+    /// \brief Resume processing of the server coroutine after an
     /// asynchronous call (e.g., to the DNS Lookup provider) has completed.
     ///
     /// \param done If true, this signals the system there is an answer
@@ -99,6 +99,18 @@ public:
     virtual DNSServer* clone() { return (self_->clone()); }
     //@}
 
+    /// \brief Set timeout for incoming TCP connections
+    ///
+    /// Since this value is not relevant for every type of DNSServer
+    /// (like UDPServer), it has a no-op default implementation.
+    /// It is in the base class because the AuthSrv's DNSService has
+    /// no direct access to the derived API's after initialization,
+    /// and it does need to update running servers if the timeout
+    /// setting is changed.
+    ///
+    /// \param timeout The timeout in milliseconds
+    virtual void setTCPRecvTimeout(size_t) {}
+
 protected:
     /// \brief Lookup handler object.
     ///

+ 18 - 1
src/lib/asiodns/dns_service.cc

@@ -40,7 +40,7 @@ public:
     DNSServiceImpl(IOService& io_service, SimpleCallback* checkin,
                    DNSLookup* lookup, DNSAnswer* answer) :
             io_service_(io_service), checkin_(checkin), lookup_(lookup),
-            answer_(answer)
+            answer_(answer), tcp_recv_timeout_(5000)
     {}
 
     IOService& io_service_;
@@ -53,13 +53,25 @@ public:
     SimpleCallback* checkin_;
     DNSLookup* lookup_;
     DNSAnswer* answer_;
+    size_t tcp_recv_timeout_;
 
     template<class Ptr, class Server> void addServerFromFD(int fd, int af) {
         Ptr server(new Server(io_service_.get_io_service(), fd, af, checkin_,
                               lookup_, answer_));
+        server->setTCPRecvTimeout(tcp_recv_timeout_);
         (*server)();
         servers_.push_back(server);
     }
+
+    void setTCPRecvTimeout(size_t timeout) {
+        // Store it for future tcp connections
+        tcp_recv_timeout_ = timeout;
+        // Update existing (TCP) Servers
+        std::vector<DNSServerPtr>::iterator it = servers_.begin();
+        for (; it != servers_.end(); ++it) {
+            (*it)->setTCPRecvTimeout(timeout);
+        }
+    }
 };
 
 DNSService::DNSService(IOService& io_service, SimpleCallback* checkin,
@@ -99,5 +111,10 @@ DNSService::clearServers() {
     impl_->servers_.clear();
 }
 
+void
+DNSService::setTCPRecvTimeout(size_t timeout) {
+    impl_->setTCPRecvTimeout(timeout);
+}
+
 } // namespace asiodns
 } // namespace isc

+ 16 - 0
src/lib/asiodns/dns_service.h

@@ -84,6 +84,21 @@ public:
                                     ServerFlag options = SERVER_DEFAULT) = 0;
     virtual void clearServers() = 0;
 
+    /// \brief Set the timeout for TCP DNS services
+    ///
+    /// The timeout is used for incoming TCP connections, so
+    /// that the connection is dropped if not all query data
+    /// is read.
+    ///
+    /// For existing DNSServer objects, where the timeout is
+    /// relevant (i.e. TCPServer instances), the timeout value
+    /// is updated.
+    /// The given value is also kept to use for DNSServer instances
+    /// which are created later
+    ///
+    /// \param timeout The timeout in milliseconds
+    virtual void setTCPRecvTimeout(size_t timeout) = 0;
+
     virtual asiolink::IOService& getIOService() = 0;
 };
 
@@ -187,6 +202,7 @@ public:
     /// \return IOService object for this DNS service.
     virtual asiolink::IOService& getIOService() { return (io_service_);}
 
+    virtual void setTCPRecvTimeout(size_t timeout);
 private:
     DNSServiceImpl* impl_;
     asiolink::IOService& io_service_;

+ 6 - 2
src/lib/asiodns/sync_udp_server.cc

@@ -114,9 +114,13 @@ SyncUDPServer::handleRead(const asio::error_code& ec, const size_t length) {
         return;
     }
 
-    // Make sure the buffers are fresh
+    // Make sure the buffers are fresh.  Note that we don't touch query_
+    // because it's supposed to be cleared in lookup_callback_.  We should
+    // eventually even remove this member variable (and remove it from
+    // the lookup_callback_ interface, but until then, any callback
+    // implementation should be careful that it's the responsibility of
+    // the callback implementation.  See also #2239).
     output_buffer_->clear();
-    query_->clear(isc::dns::Message::PARSE);
     answer_->clear(isc::dns::Message::RENDER);
 
     // Mark that we don't have an answer yet.

+ 36 - 0
src/lib/asiodns/tcp_server.cc

@@ -70,6 +70,23 @@ TCPServer::TCPServer(io_service& io_service, int fd, int af,
         // it
         isc_throw(IOError, exception.what());
     }
+    // Set it to some value. It should be set to the right one
+    // immediately, but set it to something non-zero just in case.
+    tcp_recv_timeout_.reset(new size_t(5000));
+}
+
+namespace {
+    // Called by the timeout_ deadline timer if the client takes too long.
+    // If not aborted, cancels the given socket
+    // (in which case TCPServer::operator() will be called to continue,
+    // with an 'aborted' error code
+    void do_timeout(asio::ip::tcp::socket& socket,
+                    const asio::error_code& error)
+    {
+        if (error != asio::error::operation_aborted) {
+            socket.cancel();
+        }
+    }
 }
 
 void
@@ -114,6 +131,15 @@ TCPServer::operator()(asio::error_code ec, size_t length) {
         /// asynchronous read call.
         data_.reset(new char[MAX_LENGTH]);
 
+        /// Start a timer to drop the connection if it is idle
+        if (*tcp_recv_timeout_ > 0) {
+            timeout_.reset(new asio::deadline_timer(io_));
+            timeout_->expires_from_now(
+                boost::posix_time::milliseconds(*tcp_recv_timeout_));
+            timeout_->async_wait(boost::bind(&do_timeout, boost::ref(*socket_),
+                                 asio::placeholders::error));
+        }
+
         /// Read the message, in two parts.  First, the message length:
         CORO_YIELD async_read(*socket_, asio::buffer(data_.get(),
                               TCP_MESSAGE_LENGTHSIZE), *this);
@@ -135,6 +161,13 @@ TCPServer::operator()(asio::error_code ec, size_t length) {
             CORO_YIELD return;
         }
 
+        // Due to possible timeouts and other bad behaviour, after the
+        // timely reads are done, there is a chance the socket has
+        // been closed already. So before we move on to the actual
+        // processing, check that, and stop if so.
+        if (!socket_->is_open()) {
+            CORO_YIELD return;
+        }
 
         // Create an \c IOMessage object to store the query.
         //
@@ -209,6 +242,9 @@ TCPServer::operator()(asio::error_code ec, size_t length) {
         // will simply exit at that time).
         CORO_YIELD async_write(*socket_, bufs, *this);
 
+        // All done, cancel the timeout timer
+        timeout_->cancel();
+
         // TODO: should we keep the connection open for a short time
         // to see if new requests come in?
         socket_->close();

+ 22 - 1
src/lib/asiodns/tcp_server.h

@@ -34,7 +34,7 @@ namespace asiodns {
 /// \brief A TCP-specific \c DNSServer object.
 ///
 /// This class inherits from both \c DNSServer and from \c coroutine,
-/// defined in coroutine.h. 
+/// defined in coroutine.h.
 class TCPServer : public virtual DNSServer, public virtual coroutine {
 public:
     /// \brief Constructor
@@ -61,6 +61,16 @@ public:
         return (s);
     }
 
+    /// \brief Set the read timeout
+    ///
+    /// If the client does not send (all) query data within this
+    /// timeframe, the connection is dropped
+    ///
+    /// \param timeout in milliseconds
+    virtual void setTCPRecvTimeout(size_t timeout) {
+        *tcp_recv_timeout_ = timeout;
+    }
+
 private:
     enum { MAX_LENGTH = 65535 };
     static const size_t TCP_MESSAGE_LENGTHSIZE = 2;
@@ -122,6 +132,17 @@ private:
 
     boost::shared_ptr<isc::asiolink::IOEndpoint> peer_;
     boost::shared_ptr<isc::asiolink::IOSocket> iosock_;
+
+    // Timer used to timeout on tcp connections
+    // This is a shared pointer because we need to have something
+    // that outlives the operator() call and is copyable (for CORO_FORK)
+    // even though it is only set after fork
+    boost::shared_ptr<asio::deadline_timer> timeout_;
+
+    // Timeout value to use in the timer;
+    // this, too, is a pointer, so that it can be updated whithout restarting
+    // the server
+    boost::shared_ptr<size_t> tcp_recv_timeout_;
 };
 
 } // namespace asiodns

+ 50 - 2
src/lib/asiodns/tests/dns_server_unittest.cc

@@ -258,7 +258,8 @@ class TCPClient : public SimpleClient {
     // this includes connect, send message and recevice message
     static const unsigned int SERVER_TIME_OUT = 2;
     TCPClient(asio::io_service& service, const ip::tcp::endpoint& server)
-        : SimpleClient(service, SERVER_TIME_OUT)
+        : SimpleClient(service, SERVER_TIME_OUT),
+          send_data_delay_(0), send_data_len_delay_(0)
     {
         server_ = server;
         socket_.reset(new ip::tcp::socket(service));
@@ -280,6 +281,20 @@ class TCPClient : public SimpleClient {
                                 std::string(received_data_ + 2));
     }
 
+    /// Set the delay before the data len is sent (in seconds)
+    /// If this is non-zero, the actual data is never sent
+    /// (it is used to test timeout, in which case the connection
+    /// should have been closed by the other side anyway)
+    void setSendDataLenDelay(size_t send_data_len_delay) {
+        send_data_len_delay_ = send_data_len_delay;
+    }
+
+    /// Set the delay before the packet data itself is sent
+    /// (in seconds)
+    void setSendDataDelay(size_t send_data_delay) {
+        send_data_delay_ = send_data_delay;
+    }
+
     private:
     void stopWaitingforResponse() {
         socket_->close();
@@ -288,6 +303,7 @@ class TCPClient : public SimpleClient {
     void connectHandler(const asio::error_code& error) {
         if (!error) {
             data_to_send_len_ = htons(data_to_send_len_);
+            sleep(send_data_len_delay_);
             socket_->async_send(buffer(&data_to_send_len_, 2),
                                 boost::bind(&TCPClient::sendMessageBodyHandler,
                                             this, _1, _2));
@@ -297,7 +313,8 @@ class TCPClient : public SimpleClient {
     void sendMessageBodyHandler(const asio::error_code& error,
                                 size_t send_bytes)
     {
-        if (!error && send_bytes == 2) {
+        if (!error && send_bytes == 2 && send_data_len_delay_ == 0) {
+            sleep(send_data_delay_);
             socket_->async_send(buffer(data_to_send_.c_str(),
                                        data_to_send_.size() + 1),
                     boost::bind(&TCPClient::finishSendHandler, this, _1, _2));
@@ -316,6 +333,9 @@ class TCPClient : public SimpleClient {
     ip::tcp::endpoint server_;
     std::string data_to_send_;
     uint16_t data_to_send_len_;
+
+    size_t send_data_delay_;
+    size_t send_data_len_delay_;
 };
 
 // \brief provide the context which including two clients and
@@ -565,6 +585,34 @@ TYPED_TEST(DNSServerTest, stopTCPServerAfterOneQuery) {
     EXPECT_TRUE(this->serverStopSucceed());
 }
 
+TYPED_TEST(DNSServerTest, TCPTimeoutOnLen) {
+    this->tcp_server_->setTCPRecvTimeout(100);
+    this->tcp_client_->setSendDataLenDelay(2);
+    this->testStopServerByStopper(this->tcp_server_, this->tcp_client_,
+                                  this->tcp_client_);
+    EXPECT_EQ("", this->tcp_client_->getReceivedData());
+    EXPECT_FALSE(this->serverStopSucceed());
+}
+
+TYPED_TEST(DNSServerTest, TCPTimeout) {
+    // set delay higher than timeout
+    this->tcp_server_->setTCPRecvTimeout(100);
+    this->tcp_client_->setSendDataDelay(2);
+    this->testStopServerByStopper(this->tcp_server_, this->tcp_client_,
+                                  this->tcp_client_);
+    EXPECT_EQ("", this->tcp_client_->getReceivedData());
+    EXPECT_TRUE(this->serverStopSucceed());
+}
+
+TYPED_TEST(DNSServerTest, TCPNoTimeout) {
+    // set delay lower than timeout
+    this->tcp_server_->setTCPRecvTimeout(3000);
+    this->tcp_client_->setSendDataDelay(1);
+    this->testStopServerByStopper(this->tcp_server_, this->tcp_client_,
+                                  this->tcp_client_);
+    EXPECT_EQ("BIND10 is awesome", this->tcp_client_->getReceivedData());
+    EXPECT_TRUE(this->serverStopSucceed());
+}
 
 // Test whether tcp server stopped successfully before server start to serve
 TYPED_TEST(DNSServerTest, stopTCPServerBeforeItStartServing) {

+ 4 - 2
src/lib/cache/tests/negative_cache_unittest.cc

@@ -98,8 +98,9 @@ TEST_F(NegativeCacheTest, testNXDOMAIN){
     rrset_ptr = *iter;
 
     // The TTL should equal to the TTL of negative response SOA record
+    // Allow for three second range.
     const RRTTL& nxdomain_ttl2 = rrset_ptr->getTTL();
-    EXPECT_GE(nxdomain_ttl2.getValue(), 86397);
+    EXPECT_GE(nxdomain_ttl2.getValue(), 86396);
     EXPECT_LE(nxdomain_ttl2.getValue(), 86398);
     // No RRset in ANSWER section
     EXPECT_TRUE(msg_nxdomain2.getRRCount(Message::SECTION_ANSWER) == 0);
@@ -120,7 +121,8 @@ TEST_F(NegativeCacheTest, testNXDOMAIN){
     rrset_ptr = *iter;
     const RRTTL& soa_ttl2 = rrset_ptr->getTTL();
     // The TTL should equal to the TTL of SOA record in answer section
-    EXPECT_GE(soa_ttl2.getValue(), 172797);
+    // Allow for three second range.
+    EXPECT_GE(soa_ttl2.getValue(), 172796);
     EXPECT_LE(soa_ttl2.getValue(), 172798);
 }
 

+ 4 - 4
src/lib/config/ccsession.cc

@@ -456,7 +456,7 @@ ModuleCCSession::ModuleCCSession(
 
     ConstElementPtr answer, env;
     session_.group_recvmsg(env, answer, false, seq);
-    int rcode;
+    int rcode = -1;
     ConstElementPtr err = parseAnswer(rcode, answer);
     if (rcode != 0) {
         LOG_ERROR(config_logger, CONFIG_MOD_SPEC_REJECT).arg(answer->str());
@@ -535,7 +535,7 @@ ModuleCCSession::handleConfigUpdate(ConstElementPtr new_config) {
         ConstElementPtr diff = removeIdentical(new_config, getLocalConfig());
         // handle config update
         answer = config_handler_(diff);
-        int rcode;
+        int rcode = -1;
         parseAnswer(rcode, answer);
         if (rcode == 0) {
             ElementPtr local_config = getLocalConfig();
@@ -652,7 +652,7 @@ ModuleCCSession::fetchRemoteSpec(const std::string& module, bool is_filename) {
         unsigned int seq = session_.group_sendmsg(cmd, "ConfigManager");
         ConstElementPtr env, answer;
         session_.group_recvmsg(env, answer, false, seq);
-        int rcode;
+        int rcode = -1;
         ConstElementPtr spec_data = parseAnswer(rcode, answer);
         if (rcode == 0 && spec_data) {
             // received OK, construct the spec out of it
@@ -689,7 +689,7 @@ ModuleCCSession::addRemoteConfig(const std::string& spec_name,
 
     ConstElementPtr env, answer;
     session_.group_recvmsg(env, answer, false, seq);
-    int rcode;
+    int rcode = -1;
     ConstElementPtr new_config = parseAnswer(rcode, answer);
     ElementPtr local_config;
     if (rcode == 0 && new_config) {

+ 12 - 2
src/lib/datasrc/datasrc_messages.mes

@@ -787,10 +787,20 @@ example.com). However, this name is not contained in any zone in the
 data source. This is an error since it indicates a problem in the earlier
 processing of the query.
 
-% DATASRC_SQLITE_SETUP setting up SQLite database
+% DATASRC_SQLITE_SETUP setting up new SQLite3 database in '%1'
 The database for SQLite data source was found empty. It is assumed this is the
 first run and it is being initialized with current schema.  It'll still contain
-no data, but it will be ready for use.
+no data, but it will be ready for use. If this is indeed the first run of
+BIND 10, it is to be expected and completely harmless. If you just configured
+a data source to point to an existing file and you see this, you may have
+misspelled the file name.
+
+% DATASRC_SQLITE_SETUP_OLD_API setting up new SQLite database
+The database for SQLite data source was found empty. It is assumed this is the
+first run and it is being initialized with current schema.  It'll still contain
+no data, but it will be ready for use. This is similar to DATASRC_SQLITE_SETUP
+message, but it is logged from the old API. You should never see it, since the
+API is deprecated.
 
 % DATASRC_STATIC_CLASS_NOT_CH static data source can handle CH class only
 An error message indicating that a query requesting a RR for a class other

+ 1 - 0
src/lib/datasrc/memory/Makefile.am

@@ -15,6 +15,7 @@ libdatasrc_memory_la_SOURCES += rdataset.h rdataset.cc
 libdatasrc_memory_la_SOURCES += treenode_rrset.h treenode_rrset.cc
 libdatasrc_memory_la_SOURCES += rdata_serialization.h rdata_serialization.cc
 libdatasrc_memory_la_SOURCES += zone_data.h zone_data.cc
+libdatasrc_memory_la_SOURCES += segment_object_holder.h
 libdatasrc_memory_la_SOURCES += zone_table.h zone_table.cc
 libdatasrc_memory_la_SOURCES += zone_finder.h zone_finder.cc
 EXTRA_DIST  = rdata_serialization_priv.cc

+ 1 - 0
src/lib/datasrc/memory/benchmarks/Makefile.am

@@ -14,6 +14,7 @@ noinst_PROGRAMS = rdata_reader_bench rrset_render_bench
 rdata_reader_bench_SOURCES = rdata_reader_bench.cc
 rdata_reader_bench_LDADD = $(top_builddir)/src/lib/datasrc/memory/libdatasrc_memory.la
 rdata_reader_bench_LDADD += $(top_builddir)/src/lib/exceptions/libb10-exceptions.la
+rdata_reader_bench_LDADD += $(top_builddir)/src/lib/util/libb10-util.la
 rdata_reader_bench_LDADD += $(top_builddir)/src/lib/dns/libb10-dns++.la
 
 rrset_render_bench_SOURCES = rrset_render_bench.cc

+ 65 - 43
src/lib/datasrc/memory/tests/treenode_rrset_unittest.cc

@@ -25,6 +25,8 @@
 
 #include <gtest/gtest.h>
 
+#include <boost/shared_ptr.hpp>
+
 #include <string>
 #include <vector>
 
@@ -150,33 +152,53 @@ checkBasicFields(const AbstractRRset& actual_rrset, const Name& expected_name,
     EXPECT_EQ(expected_sigcount, actual_rrset.getRRsigDataCount());
 }
 
+// The following two are trivial wrapper to create a shared pointer
+// version of TreeNodeRRset object in order to work around dubious
+// behavior of some C++ compiler: they reject getting a const reference to
+// a temporary non-copyable object.
+boost::shared_ptr<TreeNodeRRset>
+createRRset(const RRClass& rrclass, const ZoneNode* node,
+            const RdataSet* rdataset, bool dnssec_ok)
+{
+    return (boost::shared_ptr<TreeNodeRRset>(
+                new TreeNodeRRset(rrclass, node, rdataset, dnssec_ok)));
+}
+
+boost::shared_ptr<TreeNodeRRset>
+createRRset(const Name& realname, const RRClass& rrclass, const ZoneNode* node,
+            const RdataSet* rdataset, bool dnssec_ok)
+{
+    return (boost::shared_ptr<TreeNodeRRset>(
+                new TreeNodeRRset(realname, rrclass, node, rdataset,
+                                  dnssec_ok)));
+}
+
 TEST_F(TreeNodeRRsetTest, create) {
     // Constructed with RRSIG, and it should be visible.
-    checkBasicFields(TreeNodeRRset(rrclass_, www_node_, a_rdataset_, true),
+    checkBasicFields(*createRRset(rrclass_, www_node_, a_rdataset_, true),
                      www_name_, rrclass_, RRType::A(), 2, 1);
     // Constructed with RRSIG, and it should be invisible.
-    checkBasicFields(TreeNodeRRset(rrclass_, www_node_, a_rdataset_, false),
+    checkBasicFields(*createRRset(rrclass_, www_node_, a_rdataset_, false),
                      www_name_, rrclass_, RRType::A(), 2, 0);
     // Constructed without RRSIG, and it would be visible (but of course won't)
-    checkBasicFields(TreeNodeRRset(rrclass_, origin_node_, ns_rdataset_, true),
+    checkBasicFields(*createRRset(rrclass_, origin_node_, ns_rdataset_, true),
                      origin_name_, rrclass_, RRType::NS(), 1, 0);
     // Constructed without RRSIG, and it should be visible
-    checkBasicFields(TreeNodeRRset(rrclass_, origin_node_, ns_rdataset_,
-                                   false),
+    checkBasicFields(*createRRset(rrclass_, origin_node_, ns_rdataset_, false),
                      origin_name_, rrclass_, RRType::NS(), 1, 0);
     // RRSIG-only case (note the RRset's type is covered type)
-    checkBasicFields(TreeNodeRRset(rrclass_, www_node_, rrsig_only_rdataset_,
-                                   true),
+    checkBasicFields(*createRRset(rrclass_, www_node_, rrsig_only_rdataset_,
+                                  true),
                      www_name_, rrclass_, RRType::TXT(), 0, 1);
     // RRSIG-only case (note the RRset's type is covered type), but it's
     // invisible
-    checkBasicFields(TreeNodeRRset(rrclass_, www_node_, rrsig_only_rdataset_,
-                                   false),
+    checkBasicFields(*createRRset(rrclass_, www_node_, rrsig_only_rdataset_,
+                                  false),
                      www_name_, rrclass_, RRType::TXT(), 0, 0);
     // Wildcard substitution
-    checkBasicFields(TreeNodeRRset(match_name_, rrclass_,
-                                   wildcard_node_, wildcard_rdataset_,
-                                   true),
+    checkBasicFields(*createRRset(match_name_, rrclass_,
+                                  wildcard_node_, wildcard_rdataset_,
+                                  true),
                      match_name_, rrclass_, RRType::A(), 2, 1);
 }
 
@@ -307,8 +329,8 @@ TEST_F(TreeNodeRRsetTest, toWire) {
     {
         SCOPED_TRACE("wildcard with RRSIG");
         checkToWireResult(expected_renderer, actual_renderer,
-                          TreeNodeRRset(match_name_, rrclass_, wildcard_node_,
-                                        wildcard_rdataset_, true),
+                          *createRRset(match_name_, rrclass_, wildcard_node_,
+                                       wildcard_rdataset_, true),
                           origin_name_, wildmatch_rrset_,
                           wildmatch_rrsig_rrset_, true);
     }
@@ -316,8 +338,8 @@ TEST_F(TreeNodeRRsetTest, toWire) {
     {
         SCOPED_TRACE("wildcard without RRSIG");
         checkToWireResult(expected_renderer, actual_renderer,
-                          TreeNodeRRset(match_name_, rrclass_, wildcard_node_,
-                                        wildcard_rdataset_, false),
+                          *createRRset(match_name_, rrclass_, wildcard_node_,
+                                       wildcard_rdataset_, false),
                           origin_name_, wildmatch_rrset_,
                           wildmatch_rrsig_rrset_, false);
     }
@@ -355,7 +377,7 @@ TEST_F(TreeNodeRRsetTest, toWireTruncated) {
     // (type, class, TTL, rdlen, and 4-byte IPv4 address).  Then we can only
     // render just one RR, without any garbage trailing data.
     checkToWireResult(expected_renderer, actual_renderer,
-                      TreeNodeRRset(rrclass_, www_node_, a_rdataset_, true),
+                      *createRRset(rrclass_, www_node_, a_rdataset_, true),
                       name, a_rrset_, a_rrsig_rrset_, true,
                       www_name_.getLength() + 14,
                       1);   // 1 main RR, no RRSIG
@@ -363,7 +385,7 @@ TEST_F(TreeNodeRRsetTest, toWireTruncated) {
     // The first main RRs should fit in the renderer (the name will be
     // fully compressed, so its size is 2 bytes), but the RRSIG doesn't.
     checkToWireResult(expected_renderer, actual_renderer,
-                      TreeNodeRRset(rrclass_, www_node_, a_rdataset_, true),
+                      *createRRset(rrclass_, www_node_, a_rdataset_, true),
                       name, a_rrset_, a_rrsig_rrset_, true,
                       www_name_.getLength() + 14 + 2 + 14,
                       2);   // 2 main RR, no RRSIG
@@ -379,15 +401,15 @@ TEST_F(TreeNodeRRsetTest, toWireTruncated) {
     const size_t limit_len = expected_renderer.getLength();
     // Then perform the test
     checkToWireResult(expected_renderer, actual_renderer,
-                      TreeNodeRRset(rrclass_, www_node_, aaaa_rdataset_, true),
+                      *createRRset(rrclass_, www_node_, aaaa_rdataset_, true),
                       name, aaaa_rrset_, aaaa_rrsig_rrset_, true, limit_len,
                       2);   // 1 main RR, 1 RRSIG
 
     // RRSIG only case.  Render length limit being 1, so it won't fit,
     // and will cause truncation.
     checkToWireResult(expected_renderer, actual_renderer,
-                      TreeNodeRRset(rrclass_, www_node_, rrsig_only_rdataset_,
-                                    true),
+                      *createRRset(rrclass_, www_node_, rrsig_only_rdataset_,
+                                   true),
                       name, ConstRRsetPtr(), txt_rrsig_rrset_, true, 1,
                       0);   // no RR
 }
@@ -455,32 +477,32 @@ checkToText(const AbstractRRset& actual_rrset,
 
 TEST_F(TreeNodeRRsetTest, toText) {
     // Constructed with RRSIG, and it should be visible.
-    checkToText(TreeNodeRRset(rrclass_, www_node_, a_rdataset_, true),
+    checkToText(*createRRset(rrclass_, www_node_, a_rdataset_, true),
                 a_rrset_, a_rrsig_rrset_);
     // Constructed with RRSIG, and it should be invisible.
-    checkToText(TreeNodeRRset(rrclass_, www_node_, a_rdataset_, false),
+    checkToText(*createRRset(rrclass_, www_node_, a_rdataset_, false),
                 a_rrset_, ConstRRsetPtr());
     // Constructed without RRSIG, and it would be visible (but of course won't)
-    checkToText(TreeNodeRRset(rrclass_, origin_node_, ns_rdataset_, true),
+    checkToText(*createRRset(rrclass_, origin_node_, ns_rdataset_, true),
                 ns_rrset_, ConstRRsetPtr());
     // Constructed without RRSIG, and it should be visible
-    checkToText(TreeNodeRRset(rrclass_, origin_node_, ns_rdataset_, false),
+    checkToText(*createRRset(rrclass_, origin_node_, ns_rdataset_, false),
                 ns_rrset_, ConstRRsetPtr());
     // Wildcard expanded name with RRSIG
-    checkToText(TreeNodeRRset(match_name_, rrclass_, wildcard_node_,
-                              wildcard_rdataset_, true),
+    checkToText(*createRRset(match_name_, rrclass_, wildcard_node_,
+                             wildcard_rdataset_, true),
                 wildmatch_rrset_, wildmatch_rrsig_rrset_);
     // Wildcard expanded name without RRSIG
-    checkToText(TreeNodeRRset(match_name_, rrclass_, wildcard_node_,
-                              wildcard_rdataset_, false),
+    checkToText(*createRRset(match_name_, rrclass_, wildcard_node_,
+                             wildcard_rdataset_, false),
                 wildmatch_rrset_, ConstRRsetPtr());
     // RRSIG case
-    checkToText(TreeNodeRRset(rrclass_, www_node_, rrsig_only_rdataset_,
-                              true),
+    checkToText(*createRRset(rrclass_, www_node_, rrsig_only_rdataset_,
+                             true),
                 ConstRRsetPtr(), txt_rrsig_rrset_);
     // Similar to the previous case, but completely empty.
-    checkToText(TreeNodeRRset(rrclass_, www_node_, rrsig_only_rdataset_,
-                              false),
+    checkToText(*createRRset(rrclass_, www_node_, rrsig_only_rdataset_,
+                             false),
                 ConstRRsetPtr(), ConstRRsetPtr());
 }
 
@@ -488,22 +510,22 @@ TEST_F(TreeNodeRRsetTest, isSameKind) {
     const TreeNodeRRset rrset(rrclass_, www_node_, a_rdataset_, true);
 
     // Same name (node), same type (rdataset) => same kind
-    EXPECT_TRUE(rrset.isSameKind(TreeNodeRRset(rrclass_, www_node_,
-                                               a_rdataset_, true)));
+    EXPECT_TRUE(rrset.isSameKind(*createRRset(rrclass_, www_node_,
+                                              a_rdataset_, true)));
 
     // Same name (node), different type (rdataset) => not same kind
-    EXPECT_FALSE(rrset.isSameKind(TreeNodeRRset(rrclass_, www_node_,
-                                                aaaa_rdataset_, true)));
+    EXPECT_FALSE(rrset.isSameKind(*createRRset(rrclass_, www_node_,
+                                               aaaa_rdataset_, true)));
 
     // Different name, different type => not same kind
-    EXPECT_FALSE(rrset.isSameKind(TreeNodeRRset(rrclass_, origin_node_,
-                                                ns_rdataset_, true)));
+    EXPECT_FALSE(rrset.isSameKind(*createRRset(rrclass_, origin_node_,
+                                               ns_rdataset_, true)));
 
     // Different name, same type => not same kind.
     // Note: this shouldn't happen in our in-memory data source implementation,
     // but API doesn't prohibit it.
-    EXPECT_FALSE(rrset.isSameKind(TreeNodeRRset(rrclass_, origin_node_,
-                                                a_rdataset_, true)));
+    EXPECT_FALSE(rrset.isSameKind(*createRRset(rrclass_, origin_node_,
+                                               a_rdataset_, true)));
 
     // Wildcard and expanded RRset
     const TreeNodeRRset wildcard_rrset(rrclass_, wildcard_node_,
@@ -535,8 +557,8 @@ TEST_F(TreeNodeRRsetTest, isSameKind) {
     // tree node, they must belong to the same RR class.  This case is
     // a caller's bug, and the isSameKind() implementation returns the
     // "wrong" (= true) answer.
-    EXPECT_TRUE(rrset.isSameKind(TreeNodeRRset(RRClass::CH(), www_node_,
-                                               a_rdataset_, true)));
+    EXPECT_TRUE(rrset.isSameKind(*createRRset(RRClass::CH(), www_node_,
+                                              a_rdataset_, true)));
 
     // Same kind of different RRset class
     EXPECT_TRUE(rrset.isSameKind(*a_rrset_));

+ 0 - 0
src/lib/datasrc/memory/treenode_rrset.h


Some files were not shown because too many files changed in this diff