]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
rearranges docs and build script
authorMichal Nowikowski <godfryd@isc.org>
Wed, 17 Jul 2019 13:42:19 +0000 (15:42 +0200)
committerMichal Nowikowski <godfryd@isc.org>
Tue, 30 Jul 2019 08:45:13 +0000 (10:45 +0200)
Two reasons:
- sphinx requires to have all sources in its source directory
  so man pages have to be moved
- layout of subfolders in doc folder was not consistent

226 files changed:
configure.ac
doc/Makefile.am
doc/design/datasrc/.gitignore [deleted file]
doc/design/datasrc/data-source-classes.txt [deleted file]
doc/design/datasrc/memmgr-mapped-init.txt [deleted file]
doc/design/datasrc/memmgr-mapped-reload.txt [deleted file]
doc/devel/Doxyfile [moved from doc/Doxyfile with 97% similarity]
doc/devel/Doxyfile-xml [moved from doc/Doxyfile-xml with 100% similarity]
doc/devel/Makefile.am [new file with mode: 0644]
doc/guide/Makefile.am [deleted file]
doc/guide/admin.xml [deleted file]
doc/guide/agent.xml [deleted file]
doc/guide/api.xml [deleted file]
doc/guide/classify.xml [deleted file]
doc/guide/config-backend.xml [deleted file]
doc/guide/config.xml [deleted file]
doc/guide/congestion-handling.xml [deleted file]
doc/guide/ctrl-channel.xml [deleted file]
doc/guide/ddns.xml [deleted file]
doc/guide/dhcp4-srv.xml [deleted file]
doc/guide/dhcp6-srv.xml [deleted file]
doc/guide/hammer.xml [deleted file]
doc/guide/hooks-cb-cmds.xml [deleted file]
doc/guide/hooks-class-cmds.xml [deleted file]
doc/guide/hooks-ha.xml [deleted file]
doc/guide/hooks-host-cache.xml [deleted file]
doc/guide/hooks-lease-cmds.xml [deleted file]
doc/guide/hooks-radius.xml [deleted file]
doc/guide/hooks-stat-cmds.xml [deleted file]
doc/guide/hooks.xml [deleted file]
doc/guide/install.xml [deleted file]
doc/guide/intro.xml [deleted file]
doc/guide/kea-guide.css [deleted file]
doc/guide/kea-guide.xml [deleted file]
doc/guide/keactrl.xml [deleted file]
doc/guide/lease-expiration.xml [deleted file]
doc/guide/lfc.xml [deleted file]
doc/guide/logging.xml [deleted file]
doc/guide/netconf.xml [deleted file]
doc/guide/quickstart.xml [deleted file]
doc/guide/shell.xml [deleted file]
doc/guide/stats.xml [deleted file]
doc/images/.gitignore [deleted file]
doc/images/kea-logo-100x70.png [moved from doc/guide/_static/kea-logo-100x70.png with 100% similarity]
doc/sphinx/Makefile.am [new file with mode: 0644]
doc/sphinx/api/_template.json [moved from doc/api/_template.json with 100% similarity]
doc/sphinx/api/build-report.json [moved from doc/api/build-report.json with 100% similarity]
doc/sphinx/api/cache-clear.json [moved from doc/api/cache-clear.json with 100% similarity]
doc/sphinx/api/cache-get-by-id.json [moved from doc/api/cache-get-by-id.json with 100% similarity]
doc/sphinx/api/cache-get.json [moved from doc/api/cache-get.json with 100% similarity]
doc/sphinx/api/cache-insert.json [moved from doc/api/cache-insert.json with 100% similarity]
doc/sphinx/api/cache-load.json [moved from doc/api/cache-load.json with 100% similarity]
doc/sphinx/api/cache-remove.json [moved from doc/api/cache-remove.json with 100% similarity]
doc/sphinx/api/cache-size.json [moved from doc/api/cache-size.json with 100% similarity]
doc/sphinx/api/cache-write.json [moved from doc/api/cache-write.json with 100% similarity]
doc/sphinx/api/class-add.json [moved from doc/api/class-add.json with 100% similarity]
doc/sphinx/api/class-del.json [moved from doc/api/class-del.json with 100% similarity]
doc/sphinx/api/class-get.json [moved from doc/api/class-get.json with 100% similarity]
doc/sphinx/api/class-list.json [moved from doc/api/class-list.json with 100% similarity]
doc/sphinx/api/class-update.json [moved from doc/api/class-update.json with 100% similarity]
doc/sphinx/api/config-get.json [moved from doc/api/config-get.json with 100% similarity]
doc/sphinx/api/config-reload.json [moved from doc/api/config-reload.json with 100% similarity]
doc/sphinx/api/config-set.json [moved from doc/api/config-set.json with 100% similarity]
doc/sphinx/api/config-test.json [moved from doc/api/config-test.json with 100% similarity]
doc/sphinx/api/config-write.json [moved from doc/api/config-write.json with 100% similarity]
doc/sphinx/api/dhcp-disable.json [moved from doc/api/dhcp-disable.json with 100% similarity]
doc/sphinx/api/dhcp-enable.json [moved from doc/api/dhcp-enable.json with 100% similarity]
doc/sphinx/api/ha-continue.json [moved from doc/api/ha-continue.json with 100% similarity]
doc/sphinx/api/ha-heartbeat.json [moved from doc/api/ha-heartbeat.json with 100% similarity]
doc/sphinx/api/ha-scopes.json [moved from doc/api/ha-scopes.json with 100% similarity]
doc/sphinx/api/ha-sync.json [moved from doc/api/ha-sync.json with 100% similarity]
doc/sphinx/api/lease4-add.json [moved from doc/api/lease4-add.json with 100% similarity]
doc/sphinx/api/lease4-del.json [moved from doc/api/lease4-del.json with 100% similarity]
doc/sphinx/api/lease4-get-all.json [moved from doc/api/lease4-get-all.json with 100% similarity]
doc/sphinx/api/lease4-get.json [moved from doc/api/lease4-get.json with 100% similarity]
doc/sphinx/api/lease4-update.json [moved from doc/api/lease4-update.json with 100% similarity]
doc/sphinx/api/lease4-wipe.json [moved from doc/api/lease4-wipe.json with 100% similarity]
doc/sphinx/api/lease6-add.json [moved from doc/api/lease6-add.json with 100% similarity]
doc/sphinx/api/lease6-del.json [moved from doc/api/lease6-del.json with 100% similarity]
doc/sphinx/api/lease6-get-all.json [moved from doc/api/lease6-get-all.json with 100% similarity]
doc/sphinx/api/lease6-get.json [moved from doc/api/lease6-get.json with 100% similarity]
doc/sphinx/api/lease6-update.json [moved from doc/api/lease6-update.json with 100% similarity]
doc/sphinx/api/lease6-wipe.json [moved from doc/api/lease6-wipe.json with 100% similarity]
doc/sphinx/api/leases-reclaim.json [moved from doc/api/leases-reclaim.json with 100% similarity]
doc/sphinx/api/libreload.json [moved from doc/api/libreload.json with 100% similarity]
doc/sphinx/api/list-commands.json [moved from doc/api/list-commands.json with 100% similarity]
doc/sphinx/api/network4-add.json [moved from doc/api/network4-add.json with 100% similarity]
doc/sphinx/api/network4-del.json [moved from doc/api/network4-del.json with 100% similarity]
doc/sphinx/api/network4-get.json [moved from doc/api/network4-get.json with 100% similarity]
doc/sphinx/api/network4-list.json [moved from doc/api/network4-list.json with 100% similarity]
doc/sphinx/api/network4-subnet-add.json [moved from doc/api/network4-subnet-add.json with 100% similarity]
doc/sphinx/api/network4-subnet-del.json [moved from doc/api/network4-subnet-del.json with 100% similarity]
doc/sphinx/api/network6-add.json [moved from doc/api/network6-add.json with 100% similarity]
doc/sphinx/api/network6-del.json [moved from doc/api/network6-del.json with 100% similarity]
doc/sphinx/api/network6-get.json [moved from doc/api/network6-get.json with 100% similarity]
doc/sphinx/api/network6-list.json [moved from doc/api/network6-list.json with 100% similarity]
doc/sphinx/api/network6-subnet-add.json [moved from doc/api/network6-subnet-add.json with 100% similarity]
doc/sphinx/api/network6-subnet-del.json [moved from doc/api/network6-subnet-del.json with 100% similarity]
doc/sphinx/api/remote-global-parameter4-del.json [moved from doc/api/remote-global-parameter4-del.json with 100% similarity]
doc/sphinx/api/remote-global-parameter4-get-all.json [moved from doc/api/remote-global-parameter4-get-all.json with 100% similarity]
doc/sphinx/api/remote-global-parameter4-get.json [moved from doc/api/remote-global-parameter4-get.json with 100% similarity]
doc/sphinx/api/remote-global-parameter4-set.json [moved from doc/api/remote-global-parameter4-set.json with 100% similarity]
doc/sphinx/api/remote-global-parameter6-del.json [moved from doc/api/remote-global-parameter6-del.json with 100% similarity]
doc/sphinx/api/remote-global-parameter6-get-all.json [moved from doc/api/remote-global-parameter6-get-all.json with 100% similarity]
doc/sphinx/api/remote-global-parameter6-get.json [moved from doc/api/remote-global-parameter6-get.json with 100% similarity]
doc/sphinx/api/remote-global-parameter6-set.json [moved from doc/api/remote-global-parameter6-set.json with 100% similarity]
doc/sphinx/api/remote-network4-del.json [moved from doc/api/remote-network4-del.json with 100% similarity]
doc/sphinx/api/remote-network4-get.json [moved from doc/api/remote-network4-get.json with 100% similarity]
doc/sphinx/api/remote-network4-list.json [moved from doc/api/remote-network4-list.json with 100% similarity]
doc/sphinx/api/remote-network4-set.json [moved from doc/api/remote-network4-set.json with 100% similarity]
doc/sphinx/api/remote-network6-del.json [moved from doc/api/remote-network6-del.json with 100% similarity]
doc/sphinx/api/remote-network6-get.json [moved from doc/api/remote-network6-get.json with 100% similarity]
doc/sphinx/api/remote-network6-list.json [moved from doc/api/remote-network6-list.json with 100% similarity]
doc/sphinx/api/remote-network6-set.json [moved from doc/api/remote-network6-set.json with 100% similarity]
doc/sphinx/api/remote-option-def4-del.json [moved from doc/api/remote-option-def4-del.json with 100% similarity]
doc/sphinx/api/remote-option-def4-get-all.json [moved from doc/api/remote-option-def4-get-all.json with 100% similarity]
doc/sphinx/api/remote-option-def4-get.json [moved from doc/api/remote-option-def4-get.json with 100% similarity]
doc/sphinx/api/remote-option-def4-set.json [moved from doc/api/remote-option-def4-set.json with 100% similarity]
doc/sphinx/api/remote-option-def6-del.json [moved from doc/api/remote-option-def6-del.json with 100% similarity]
doc/sphinx/api/remote-option-def6-get-all.json [moved from doc/api/remote-option-def6-get-all.json with 100% similarity]
doc/sphinx/api/remote-option-def6-get.json [moved from doc/api/remote-option-def6-get.json with 100% similarity]
doc/sphinx/api/remote-option-def6-set.json [moved from doc/api/remote-option-def6-set.json with 100% similarity]
doc/sphinx/api/remote-option4-global-del.json [moved from doc/api/remote-option4-global-del.json with 100% similarity]
doc/sphinx/api/remote-option4-global-get-all.json [moved from doc/api/remote-option4-global-get-all.json with 100% similarity]
doc/sphinx/api/remote-option4-global-get.json [moved from doc/api/remote-option4-global-get.json with 100% similarity]
doc/sphinx/api/remote-option4-global-set.json [moved from doc/api/remote-option4-global-set.json with 100% similarity]
doc/sphinx/api/remote-option6-global-del.json [moved from doc/api/remote-option6-global-del.json with 100% similarity]
doc/sphinx/api/remote-option6-global-get-all.json [moved from doc/api/remote-option6-global-get-all.json with 100% similarity]
doc/sphinx/api/remote-option6-global-get.json [moved from doc/api/remote-option6-global-get.json with 100% similarity]
doc/sphinx/api/remote-option6-global-set.json [moved from doc/api/remote-option6-global-set.json with 100% similarity]
doc/sphinx/api/remote-subnet4-del-by-id.json [moved from doc/api/remote-subnet4-del-by-id.json with 100% similarity]
doc/sphinx/api/remote-subnet4-del-by-prefix.json [moved from doc/api/remote-subnet4-del-by-prefix.json with 100% similarity]
doc/sphinx/api/remote-subnet4-get-by-id.json [moved from doc/api/remote-subnet4-get-by-id.json with 100% similarity]
doc/sphinx/api/remote-subnet4-get-by-prefix.json [moved from doc/api/remote-subnet4-get-by-prefix.json with 100% similarity]
doc/sphinx/api/remote-subnet4-list.json [moved from doc/api/remote-subnet4-list.json with 100% similarity]
doc/sphinx/api/remote-subnet4-set.json [moved from doc/api/remote-subnet4-set.json with 100% similarity]
doc/sphinx/api/remote-subnet6-del-by-id.json [moved from doc/api/remote-subnet6-del-by-id.json with 100% similarity]
doc/sphinx/api/remote-subnet6-del-by-prefix.json [moved from doc/api/remote-subnet6-del-by-prefix.json with 100% similarity]
doc/sphinx/api/remote-subnet6-get-by-id.json [moved from doc/api/remote-subnet6-get-by-id.json with 100% similarity]
doc/sphinx/api/remote-subnet6-get-by-prefix.json [moved from doc/api/remote-subnet6-get-by-prefix.json with 100% similarity]
doc/sphinx/api/remote-subnet6-list.json [moved from doc/api/remote-subnet6-list.json with 100% similarity]
doc/sphinx/api/remote-subnet6-set.json [moved from doc/api/remote-subnet6-set.json with 100% similarity]
doc/sphinx/api/reservation-add.json [moved from doc/api/reservation-add.json with 100% similarity]
doc/sphinx/api/reservation-del.json [moved from doc/api/reservation-del.json with 100% similarity]
doc/sphinx/api/reservation-get-all.json [moved from doc/api/reservation-get-all.json with 100% similarity]
doc/sphinx/api/reservation-get-page.json [moved from doc/api/reservation-get-page.json with 100% similarity]
doc/sphinx/api/reservation-get.json [moved from doc/api/reservation-get.json with 100% similarity]
doc/sphinx/api/shutdown.json [moved from doc/api/shutdown.json with 100% similarity]
doc/sphinx/api/stat-lease4-get.json [moved from doc/api/stat-lease4-get.json with 100% similarity]
doc/sphinx/api/stat-lease6-get.json [moved from doc/api/stat-lease6-get.json with 100% similarity]
doc/sphinx/api/statistic-get-all.json [moved from doc/api/statistic-get-all.json with 100% similarity]
doc/sphinx/api/statistic-get.json [moved from doc/api/statistic-get.json with 100% similarity]
doc/sphinx/api/statistic-remove-all.json [moved from doc/api/statistic-remove-all.json with 100% similarity]
doc/sphinx/api/statistic-remove.json [moved from doc/api/statistic-remove.json with 100% similarity]
doc/sphinx/api/statistic-reset-all.json [moved from doc/api/statistic-reset-all.json with 100% similarity]
doc/sphinx/api/statistic-reset.json [moved from doc/api/statistic-reset.json with 100% similarity]
doc/sphinx/api/subnet4-add.json [moved from doc/api/subnet4-add.json with 100% similarity]
doc/sphinx/api/subnet4-del.json [moved from doc/api/subnet4-del.json with 100% similarity]
doc/sphinx/api/subnet4-get.json [moved from doc/api/subnet4-get.json with 100% similarity]
doc/sphinx/api/subnet4-list.json [moved from doc/api/subnet4-list.json with 100% similarity]
doc/sphinx/api/subnet4-update.json [moved from doc/api/subnet4-update.json with 100% similarity]
doc/sphinx/api/subnet6-add.json [moved from doc/api/subnet6-add.json with 100% similarity]
doc/sphinx/api/subnet6-del.json [moved from doc/api/subnet6-del.json with 100% similarity]
doc/sphinx/api/subnet6-get.json [moved from doc/api/subnet6-get.json with 100% similarity]
doc/sphinx/api/subnet6-list.json [moved from doc/api/subnet6-list.json with 100% similarity]
doc/sphinx/api/subnet6-update.json [moved from doc/api/subnet6-update.json with 100% similarity]
doc/sphinx/api/version-get.json [moved from doc/api/version-get.json with 100% similarity]
doc/sphinx/arm/.gitignore [moved from doc/guide/.gitignore with 100% similarity]
doc/sphinx/arm/STYLEGUIDE [moved from doc/guide/STYLEGUIDE with 100% similarity]
doc/sphinx/arm/admin.rst [moved from doc/guide/admin.rst with 100% similarity]
doc/sphinx/arm/agent.rst [moved from doc/guide/agent.rst with 100% similarity]
doc/sphinx/arm/api.rst [moved from doc/guide/api.rst with 100% similarity]
doc/sphinx/arm/classify.rst [moved from doc/guide/classify.rst with 100% similarity]
doc/sphinx/arm/config-backend.rst [moved from doc/guide/config-backend.rst with 100% similarity]
doc/sphinx/arm/config.rst [moved from doc/guide/config.rst with 100% similarity]
doc/sphinx/arm/congestion-handling.rst [moved from doc/guide/congestion-handling.rst with 97% similarity]
doc/sphinx/arm/ctrl-channel.rst [moved from doc/guide/ctrl-channel.rst with 100% similarity]
doc/sphinx/arm/ddns.rst [moved from doc/guide/ddns.rst with 100% similarity]
doc/sphinx/arm/dhcp4-srv.rst [moved from doc/guide/dhcp4-srv.rst with 100% similarity]
doc/sphinx/arm/dhcp6-srv.rst [moved from doc/guide/dhcp6-srv.rst with 100% similarity]
doc/sphinx/arm/hammer.rst [moved from doc/guide/hammer.rst with 100% similarity]
doc/sphinx/arm/hooks-cb-cmds.rst [moved from doc/guide/hooks-cb-cmds.rst with 100% similarity]
doc/sphinx/arm/hooks-class-cmds.rst [moved from doc/guide/hooks-class-cmds.rst with 100% similarity]
doc/sphinx/arm/hooks-ha.rst [moved from doc/guide/hooks-ha.rst with 100% similarity]
doc/sphinx/arm/hooks-host-cache.rst [moved from doc/guide/hooks-host-cache.rst with 100% similarity]
doc/sphinx/arm/hooks-lease-cmds.rst [moved from doc/guide/hooks-lease-cmds.rst with 100% similarity]
doc/sphinx/arm/hooks-radius.rst [moved from doc/guide/hooks-radius.rst with 100% similarity]
doc/sphinx/arm/hooks-stat-cmds.rst [moved from doc/guide/hooks-stat-cmds.rst with 100% similarity]
doc/sphinx/arm/hooks.rst [moved from doc/guide/hooks.rst with 100% similarity]
doc/sphinx/arm/index.rst [moved from doc/guide/index.rst with 98% similarity]
doc/sphinx/arm/install.rst [moved from doc/guide/install.rst with 100% similarity]
doc/sphinx/arm/intro.rst [moved from doc/guide/intro.rst with 100% similarity]
doc/sphinx/arm/keactrl.rst [moved from doc/guide/keactrl.rst with 100% similarity]
doc/sphinx/arm/lease-expiration.rst [moved from doc/guide/lease-expiration.rst with 99% similarity]
doc/sphinx/arm/lfc.rst [moved from doc/guide/lfc.rst with 100% similarity]
doc/sphinx/arm/logging.rst [moved from doc/guide/logging.rst with 100% similarity]
doc/sphinx/arm/netconf.rst [moved from doc/guide/netconf.rst with 100% similarity]
doc/sphinx/arm/quickstart.rst [moved from doc/guide/quickstart.rst with 100% similarity]
doc/sphinx/arm/shell.rst [moved from doc/guide/shell.rst with 100% similarity]
doc/sphinx/arm/stats.rst [moved from doc/guide/stats.rst with 100% similarity]
doc/sphinx/conf.py [moved from doc/guide/conf.py with 77% similarity]
doc/sphinx/man/kea-admin.8.rst [new file with mode: 0644]
doc/sphinx/man/kea-ctrl-agent.8.rst [new file with mode: 0644]
doc/sphinx/man/kea-dhcp-ddns.8.rst [new file with mode: 0644]
doc/sphinx/man/kea-dhcp4.8.rst [new file with mode: 0644]
doc/sphinx/man/kea-dhcp6.8.rst [new file with mode: 0644]
doc/sphinx/man/kea-lfc.8.rst [new file with mode: 0644]
doc/sphinx/man/kea-netconf.8.rst [new file with mode: 0644]
doc/sphinx/man/kea-shell.8.rst [new file with mode: 0644]
doc/sphinx/man/keactrl.8.rst [new file with mode: 0644]
doc/sphinx/man/perfdhcp.8.rst [new file with mode: 0644]
doc/sphinx/static/kea-imageonly-100bw.png [moved from doc/guide/_static/kea-imageonly-100bw.png with 100% similarity]
doc/sphinx/static/kea-logo-100x70.png [new symlink]
doc/sphinx/static/kea-logo-200.png [moved from doc/guide/_static/kea-logo-200.png with 100% similarity]
doc/sphinx/static/kea.css [moved from doc/guide/_static/kea.css with 100% similarity]
doc/sphinx/system_messages.py [moved from tools/system_messages.py with 99% similarity]
src/bin/admin/kea-admin.rst [new file with mode: 0644]
src/bin/agent/kea-ctrl-agent.rst [new file with mode: 0644]
src/bin/d2/kea-dhcp-ddns.rst [new file with mode: 0644]
src/bin/dhcp4/kea-dhcp4.rst [new file with mode: 0644]
src/bin/dhcp6/kea-dhcp6.rst [new file with mode: 0644]
src/bin/keactrl/keactrl.rst [new file with mode: 0644]
src/bin/lfc/kea-lfc.rst [new file with mode: 0644]
src/bin/netconf/kea-netconf.rst [new file with mode: 0644]
src/bin/perfdhcp/perfdhcp.rst [new file with mode: 0644]
src/bin/shell/kea-shell.rst [new file with mode: 0644]

index 1170caca7b141240ad4b0c5c4b7007bcb8154a11..7a41c4b30508684f989850767fcd88cc6eeb7f61 100644 (file)
@@ -1566,9 +1566,8 @@ fi
 
 AC_CONFIG_FILES([Makefile
                  doc/Makefile
-                 doc/guide/Makefile
-                 doc/version.ent
-                 doc/docgen/Makefile
+                 doc/sphinx/Makefile
+                 doc/devel/Makefile
                  ext/Makefile
                  ext/gtest/Makefile
                  ext/coroutine/Makefile
index 6b6e666d0269a891b7c0b26a77b8479651df8465..ad4b93775ccbbda0e96605d62180892aafd22412 100644 (file)
@@ -1,14 +1,4 @@
-SUBDIRS = guide docgen
-
-EXTRA_DIST  = version.ent.in Doxyfile Doxyfile-xml
-EXTRA_DIST += devel/bison.dox
-EXTRA_DIST += devel/config-backend.dox
-EXTRA_DIST += devel/contribute.dox
-EXTRA_DIST += devel/mainpage.dox
-EXTRA_DIST += devel/terminology.dox
-EXTRA_DIST += devel/unit-tests.dox
-EXTRA_DIST += devel/doc.dox
-EXTRA_DIST += devel/congestion-handling.dox
+SUBDIRS = devel sphinx
 
 nobase_dist_doc_DATA  = examples/agent/comments.json
 nobase_dist_doc_DATA += examples/agent/simple.json
@@ -77,153 +67,3 @@ nobase_dist_doc_DATA += examples/netconf/kea-dhcp6-operations/twosubnets.xml
 nobase_dist_doc_DATA += examples/netconf/comments.json
 nobase_dist_doc_DATA += examples/netconf/simple-dhcp4.json
 nobase_dist_doc_DATA += examples/netconf/simple-dhcp6.json
-
-# These are files that document our APIs. They're not really needed as the
-# content is included in the api.xml, but may be useful for people who
-# want to document the API.
-EXTRA_DIST += api/build-report.json
-EXTRA_DIST += api/cache-clear.json api/cache-get.json
-EXTRA_DIST += api/cache-get-by-id.json api/cache-insert.json
-EXTRA_DIST += api/cache-load.json api/cache-remove.json
-EXTRA_DIST += api/cache-size.json  api/cache-write.json
-EXTRA_DIST += api/class-add.json api/class-del.json
-EXTRA_DIST += api/class-get.json api/class-list.json
-EXTRA_DIST += api/class-update.json
-EXTRA_DIST += api/config-get.json api/config-reload.json
-EXTRA_DIST += api/config-set.json api/config-test.json
-EXTRA_DIST += api/config-write.json api/dhcp-disable.json
-EXTRA_DIST += api/dhcp-enable.json api/ha-continue.json
-EXTRA_DIST += api/ha-heartbeat.json api/ha-scopes.json
-EXTRA_DIST += api/ha-sync.json api/lease4-add.json
-EXTRA_DIST += api/lease4-del.json api/lease4-get-all.json
-EXTRA_DIST += api/lease4-get.json api/lease4-update.json
-EXTRA_DIST += api/lease4-wipe.json api/lease6-add.json
-EXTRA_DIST += api/lease6-bulk-apply.json
-EXTRA_DIST += api/lease6-del.json api/lease6-get-all.json
-EXTRA_DIST += api/lease6-get.json api/lease6-update.json
-EXTRA_DIST += api/lease6-wipe.json api/leases-reclaim.json
-EXTRA_DIST += api/libreload.json api/list-commands.json
-EXTRA_DIST += api/network4-add.json api/network4-del.json
-EXTRA_DIST += api/network4-get.json api/network4-list.json
-EXTRA_DIST += api/network4-subnet-add.json api/network4-subnet-del.json
-EXTRA_DIST += api/network6-add.json api/network6-del.json
-EXTRA_DIST += api/network6-get.json api/network6-list.json
-EXTRA_DIST += api/network6-subnet-add.json api/network6-subnet-del.json
-EXTRA_DIST += api/remote-global-parameter4-del.json
-EXTRA_DIST += api/remote-global-parameter4-get-all.json
-EXTRA_DIST += api/remote-global-parameter4-get.json
-EXTRA_DIST += api/remote-global-parameter4-set.json
-EXTRA_DIST += api/remote-global-parameter6-del.json
-EXTRA_DIST += api/remote-global-parameter6-get-all.json
-EXTRA_DIST += api/remote-global-parameter6-get.json
-EXTRA_DIST += api/remote-global-parameter6-set.json
-EXTRA_DIST += api/remote-network4-del.json
-EXTRA_DIST += api/remote-network4-get.json
-EXTRA_DIST += api/remote-network4-list.json
-EXTRA_DIST += api/remote-network4-set.json
-EXTRA_DIST += api/remote-network6-del.json
-EXTRA_DIST += api/remote-network6-get.json
-EXTRA_DIST += api/remote-network6-list.json
-EXTRA_DIST += api/remote-network6-set.json
-EXTRA_DIST += api/remote-option-def4-del.json
-EXTRA_DIST += api/remote-option-def4-get-all.json
-EXTRA_DIST += api/remote-option-def4-get.json
-EXTRA_DIST += api/remote-option-def4-set.json
-EXTRA_DIST += api/remote-option-def6-del.json
-EXTRA_DIST += api/remote-option-def6-get-all.json
-EXTRA_DIST += api/remote-option-def6-get.json
-EXTRA_DIST += api/remote-option-def6-set.json
-EXTRA_DIST += api/remote-option4-global-del.json
-EXTRA_DIST += api/remote-option4-global-get-all.json
-EXTRA_DIST += api/remote-option4-global-get.json
-EXTRA_DIST += api/remote-option4-global-set.json
-EXTRA_DIST += api/remote-option6-global-del.json
-EXTRA_DIST += api/remote-option6-global-get-all.json
-EXTRA_DIST += api/remote-option6-global-get.json
-EXTRA_DIST += api/remote-option6-global-set.json
-EXTRA_DIST += api/remote-subnet4-del-by-id.json
-EXTRA_DIST += api/remote-subnet4-del-by-prefix.json
-EXTRA_DIST += api/remote-subnet4-get-by-id.json
-EXTRA_DIST += api/remote-subnet4-get-by-prefix.json
-EXTRA_DIST += api/remote-subnet4-list.json
-EXTRA_DIST += api/remote-subnet4-set.json
-EXTRA_DIST += api/remote-subnet6-del-by-id.json
-EXTRA_DIST += api/remote-subnet6-del-by-prefix.json
-EXTRA_DIST += api/remote-subnet6-get-by-id.json
-EXTRA_DIST += api/remote-subnet6-get-by-prefix.json
-EXTRA_DIST += api/remote-subnet6-list.json
-EXTRA_DIST += api/remote-subnet6-set.json
-EXTRA_DIST += api/reservation-add.json api/reservation-del.json
-EXTRA_DIST += api/reservation-get.json api/reservation-get-all.json
-EXTRA_DIST += api/reservation-get-page.json
-EXTRA_DIST += api/server-tag-get.json api/shutdown.json
-EXTRA_DIST += api/remote-server4-del.json
-EXTRA_DIST += api/remote-server4-get.json
-EXTRA_DIST += api/remote-server4-get-all.json
-EXTRA_DIST += api/remote-server4-set.json
-EXTRA_DIST += api/remote-server6-del.json
-EXTRA_DIST += api/remote-server6-get.json
-EXTRA_DIST += api/remote-server6-get-all.json
-EXTRA_DIST += api/remote-server6-set.json
-EXTRA_DIST += api/statistic-get-all.json api/statistic-get.json
-EXTRA_DIST += api/statistic-remove-all.json api/statistic-remove.json
-EXTRA_DIST += api/statistic-reset-all.json api/statistic-reset.json
-EXTRA_DIST += api/stat-lease4-get.json api/stat-lease6-get.json
-EXTRA_DIST += api/subnet4-add.json api/subnet4-del.json
-EXTRA_DIST += api/subnet4-get.json api/subnet4-list.json
-EXTRA_DIST += api/subnet4-update.json
-EXTRA_DIST += api/subnet6-add.json api/subnet6-del.json
-EXTRA_DIST += api/subnet6-get.json api/subnet6-list.json
-EXTRA_DIST += api/subnet6-update.json
-EXTRA_DIST += api/_template.json api/version-get.json
-
-devel:
-       mkdir -p html
-       (cat Doxyfile; echo PROJECT_NUMBER=$(PACKAGE_VERSION)) | doxygen - > html/doxygen.log 2> html/doxygen-error.log
-       echo `grep -i ": warning:" html/doxygen-error.log | wc -l` warnings/errors detected.
-
-clean:
-       rm -rf html
-
-# There are several steps needed to document new API command:
-#
-# 1. edit docgen/cmds-list and add the new command
-# 2. ./configure --enable-generate-docs
-# 3. make - you need to build the sources first, am afraid. The reason why you
-#    need to do this is that the tool kea-docgen depends on libkea-cc as it
-#    loads JSON files. This means that the libs need to be built first.
-# 4. (optional) run: make templates
-#    This will go through the list of commands listed in cmds-list
-#    and will check if there are corresponding JSON files in api/name.json
-#    If the file is missing, a new JSON will be created using template.
-#    If you dislike this generator, you can always use api/_template.json
-#    and copy it over under the name of a new command.
-# 5. Edit api/command-name.json. If the command is provided by the daemon
-#    out of its own (and not via hook), simply delete the hook entry.
-#    If you don't want to provide command syntax (cmd-syntax key),
-#    any comments about the syntax (cmd-comment key) or response syntax
-#    (resp-syntax) or any comment about response (resp-comment), simply
-#    remove those unused keys. The generator will attempt to generate
-#    boilerplates for it.
-# 6. Generate api.xml: make api
-# 7. Rebuild User's Guide as usual: make guide
-
-# This target will generate templates. There's no need to run it, unless
-# new commands have been added or there are existing commands that are
-# still not documented.
-templates: docgen
-       docgen/generate-templates docgen/cmds-list
-
-# This will generate the api.xml file using docgen generator. It will
-# read the JSON files from api/ directory. Make sure they're up to date.
-api: docgen
-       docgen/kea-docgen api/*.json
-
-# This convenience target makes sure the docgen tool is built properly
-docgen:
-       $(MAKE) -C docgen
-
-# That's a bit of a hack, but we are making sure that devel target
-# is always valid. The alternative is to make devel depend on all
-# *.cc *.h files in the whole tree.
-.PHONY: devel guide docgen
diff --git a/doc/design/datasrc/.gitignore b/doc/design/datasrc/.gitignore
deleted file mode 100644 (file)
index 065b83e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-/*.html
-/*.png
-/*.xml
diff --git a/doc/design/datasrc/data-source-classes.txt b/doc/design/datasrc/data-source-classes.txt
deleted file mode 100644 (file)
index 384d724..0000000
+++ /dev/null
@@ -1,366 +0,0 @@
-Data Source Library Classes
-===========================
-
-About this document
--------------------
-
-This memo describes major classes used in the data source library,
-mainly focusing on handling in-memory cache with consideration of the
-shared memory support.  It will give an overview of the entire design
-architecture and some specific details of how these classes are expected
-to be used.
-
-Before reading, the higher level inter-module protocol should be understood:
-http://bind10.isc.org/wiki/SharedMemoryIPC
-
-Overall relationships between classes
--------------------------------------
-
-The following diagram shows major classes in the data source library
-related to in-memory caches and their relationship.
-
-image::overview.png[Class diagram showing overview of relationships]
-
-Major design decisions of this architecture are:
-
-* Keep each class as concise as possible, each focusing on one or
-  small set of responsibilities.  Smaller classes are generally easier
-  to understand (at the cost of understanding how they work in the
-  "big picture" of course) and easier to test.
-
-* On a related point, minimize dependency to any single class.  A
-  monolithic class on which many others are dependent is generally
-  difficult to maintain because you'll need to ensure a change to the
-  monolithic class doesn't break anything on any other classes.
-
-* Use polymorphism for any "fluid" behavior, and hide specific details
-  under abstract interfaces so implementation details won't be
-  directly referenced from any other part of the library.
-  Specifically, the underlying memory segment type (local, mapped, and
-  possibly others) and the source of in-memory data (master file or
-  other data source) are hidden via a kind of polymorphism.
-
-* Separate classes directly used by applications from classes that
-  implement details.  Make the former classes as generic as possible,
-  agnostic about implementation specific details such as the memory
-  segment type (or, ideally and where possible, whether it's for
-  in-memory cache or the underlying data source).
-
-The following give a summarized description of these classes.
-
-* `ConfigurableClientList`: The front end to application classes.  An
-  application that uses the data source library generally maintains
-  one or more `ConfigurableClientList` object (usually one per RR
-  class, or when we support views, probably one per view).  This class
-  is a container of sets of data source related classes, providing
-  accessor to these classes and also acting as a factory of other
-  related class objects.  Note: Due to internal implementation
-  reasons, there is a base class for `ConfigurableClientList` named
-  `ClientList` in the C++ version, and applications are expected to
-  use the latter.  But conceptually `ConfigurableClientList` is an
-  independent value class; the inheritance is not for polymorphism.
-  Note also that the Python version doesn't have the base class.
-
-* `DataSourceInfo`: this is a straightforward tuple of set of class
-  objects corresponding to a single data source, including
-  `DataSourceClient`, `CacheConfig`, and `ZoneTableSegment`.
-  `ConfigurableClientList` maintains a list of `DataSourceInfo`, one
-  for each data source specified in its configuration.
-
-* `DataSourceClient`: The front end class to applications for a single
-  data source.  Applications will get a specific `DataSourceClient`
-  object by `ConfigurableClientList::find()`.
-  `DataSourceClient` itself is a set of factories for various
-  operations on the data source such as lookup or update.
-
-* `CacheConfig`: library internal representation of in-memory cache
-  configuration for a data source.  It knows which zones are to be
-  cached and where the zone data (RRs) should come from, either from a
-  master file or other data source.  With this knowledge it will
-  create an appropriate `LoadAction` object.  Note that `CacheConfig`
-  isn't aware of the underlying memory segment type for the in-memory
-  data.  It's intentionally separated from this class (see the
-  conciseness and minimal-dependency design decisions above).
-
-* `ZoneTableSegment`: when in-memory cache is enabled, it provides
-  memory-segment-type independent interface to the in-memory data.
-  This is an abstract base class (see polymorphism in the design
-  decisions) and inherited by segment-type specific subclasses:
-  `ZoneTableSegmentLocal` and `ZoneTableSegmentMapped` (and possibly
-  others).  Any subclass of `ZoneTableSegment` is expected to maintain
-  the specific type of `MemorySegment` object.
-
-* `ZoneWriter`: a frontend utility class for applications to update
-  in-memory zone data (currently it can only load a whole zone and
-  replace any existing zone content with a new one, but this should be
-  extended so it can handle partial updates).
-  Applications will get a specific `ZoneWriter`
-  object by `ConfigurableClientList::getCachedZoneWriter()`.
-  `ZoneWriter` is constructed with `ZoneableSegment` and `LoadAction`.
-  Since these are abstract classes, `ZoneWriter` doesn't have to be
-  aware of "fluid" details.  It's only responsible for "somehow" preparing
-  `ZoneData` for a new version of a specified zone using `LoadAction`,
-  and installing it in the `ZoneTable` (which can be accessed via
-  `ZoneTableSegment`).
-
-* `DataSourceStatus`: created by `ConfigurableClientList::getStatus()`,
-  a straightforward tuple that represents some status information of a
-  specific data source managed in the `ConfigurableClientList`.
-  `getStatus()` generates `DataSourceStatus` for all data sources
-  managed in it, and returns them as a vector.
-
-* `ZoneTableAccessor`, `ZoneTableIterator`: frontend classes to get
-  access to the conceptual "zone table" (a set of zones) stored in a
-  specific data source.  In particular, `ZoneTableIterator` allows
-  applications to iterate over all zones (by name) stored in the
-  specific data source.
-  Applications will get a specific `ZoneTableAccessor`
-  object by `ConfigurableClientList::getZoneTableAccessor()`,
-  and get an iterator object by calling `getIterator` on the accessor.
-  These are abstract classes and provide unified interfaces
-  independent from whether it's for in-memory cached zones or "real"
-  underlying data source.  But the initial implementation only
-  provides the in-memory cache version of subclass (see the next
-  item).
-
-* `ZoneTableAccessorCache`, `ZoneTableIteratorCache`: implementation
-  classes of `ZoneTableAccessor` and `ZoneTableIterator` for in-memory
-  cache.  They refer to `CacheConfig` to get a list of zones to be
-  cached.
-
-* `ZoneTableHeader`, `ZoneTable`: top-level interface to actual
-  in-memory data.  These were separated based on a prior version of
-  the design (http://bind10.isc.org/wiki/ScalableZoneLoadDesign) where
-  `ZoneTableHeader` may contain multiple `ZoneTable`s.  It's
-  one-to-one relationship in the latest version (of implementation),
-  so we could probably unify them as a cleanup.
-
-* `ZoneData`: representing the in-memory content of a single zone.
-  `ZoneTable` contains (zero, one or) multiple `ZoneData` objects.
-
-* `RdataSet`: representing the in-memory content of (data of) a single
-  RRset.
-  `ZoneData` contains `RdataSet`s corresponding to the RRsets stored
-  in the zone.
-
-* `LoadAction`: a "polymorphic" functor that implements loading zone
-  data into memory.  It hides from its user (i.e., `ZoneWriter`)
-  details about the source of the data: master file or other data
-  source (and perhaps some others).  The "polymorphism" is actually
-  realized as different implementations of the functor interface, not
-  class inheritance (but conceptually the effect and goal is the
-  same).  Note: there's a proposal to replace `LoadAction` with
-  a revised `ZoneDataLoader`, although the overall concept doesn't
-  change.  See Trac ticket #2912.
-
-* `ZoneDataLoader` and `ZoneDataUpdater`: helper classes for the
-  `LoadAction` functor(s).  These work independently from the source
-  of data, taking a sequence of RRsets objects, converting them
-  into the in-memory data structures (`RdataSet`), and installing them
-  into a newly created `ZoneData` object.
-
-Sequence for auth module using local memory segment
----------------------------------------------------
-
-In the remaining sections, we explain how the classes shown in the
-previous section work together through their methods for commonly
-intended operations.
-
-The following sequence diagram shows the case for the authoritative
-DNS server module to maintain "local" in-memory data.  Note that
-"auth" is a conceptual "class" (not actually implemented as a C++
-class) to represent the server application behavior.  For the purpose
-of this document that should be sufficient.  The same note applies to
-all examples below.
-
-image::auth-local.png[Sequence diagram for auth server using local memory segment]
-
-1. On startup, the auth module creates a `ConfigurableClientList`
-   for each RR class specified in the configuration for "data_sources"
-   module.  It then calls `ConfigurableClientList::configure()`
-   for the given configuration of that RR class.
-
-2. For each data source, `ConfigurableClientList` creates a
-   `CacheConfig` object with the corresponding cache related
-   configuration.
-
-3. If in-memory cache is enabled for the data source,
-   `ZoneTableSegment` is also created.  In this scenario the cache
-   type is specified as "local" in the configuration, so a functor
-   creates `ZoneTableSegmentLocal` as the actual instance.
-   In this case its `ZoneTable` is immediately created, too.
-
-4. `ConfigurableClientList` checks if the created `ZoneTableSegment` is
-   writable.  It is always so for "local" type of segments.  So
-   `ConfigurableClientList` immediately loads zones to be cached into
-   memory.  For each such zone, it first gets the appropriate
-   `LoadAction` through `CacheConfig`, then creates `ZoneWriter` with
-   the `LoadAction`, and loads the data using the writer.
-
-5. If the auth module receives a "reload" command for a cached zone
-   from other module (xfrin, an end user, etc), it calls
-   `ConfigurableClientList::getCachedZoneWriter` to load and install
-   the new version of the zone.  The same loading sequence takes place
-   except that the user of the writer is the auth module.
-   Also, the old version of the zone data is destroyed at the end of
-   the process.
-
-Sequence for auth module using mapped memory segment
-----------------------------------------------------
-
-This is an example for the authoritative server module that uses
-mapped type memory segment for in-memory data.
-
-image::auth-mapped.png[Sequence diagram for auth server using mapped memory segment]
-
-1. The sequence is the same to the point of creating `CacheConfig`.
-
-2. But in this case a `ZoneTableSegmentMapped` object is created based
-   on the configuration of the cache type.  This type of
-   `ZoneTableSegment` is initially empty and isn't even associated
-   with a `MemorySegment` (and therefore considered non-writable).
-
-3. `ConfigurableClientList` checks if the zone table segment is
-   writable to know whether to load zones into memory by itself,
-   but as `ZoneTableSegment::isWritable()` returns false, it skips
-   the loading.
-
-4. The auth module gets the status of each data source, and notices
-   there's a `WAITING` state of segment. So it subscribes to the
-   "Memmgr" group on a command session and waits for an update
-   from the memory manager (memmgr) module. (See also the note at the
-   end of the section)
-
-5. When the auth module receives an update command from memmgr, it
-   calls `ConfigurableClientList::resetMemorySegment()` with the command
-   argument and the segment mode of `READ_ONLY`.
-   Note that the auth module handles the command argument as mostly
-   opaque data; it's not expected to deal with details of segment
-   type-specific behavior. If the reset fails, auth aborts (as there's
-   no clear way to handle the failure).
-
-6. `ConfigurableClientList::resetMemorySegment()` subsequently calls
-   `reset()` method on the corresponding `ZoneTableSegment` with the
-   given parameters.
-   In the case of `ZoneTableSegmentMapped`, it creates a new
-   `MemorySegment` object for the mapped type, which internally maps
-   the specific file into memory.
-   memmgr is expected to have prepared all necessary data in the file,
-   so all the data are immediately ready for use (i.e., there
-   shouldn't be any explicit load operation).
-
-7. When a change is made in the mapped data, memmgr will send another
-   update command with parameters for new mapping.  The auth module
-   calls `ConfigurableClientList::resetMemorySegment()`, and the
-   underlying memory segment is swapped with a new one.  The old
-   memory segment object is destroyed.  Note that
-   this "destroy" just means unmapping the memory region; the data
-   stored in the file are intact. Again, if mapping fails, auth
-   aborts.
-
-8. If the auth module happens to receive a reload command from other
-   module, it could call
-   `ConfigurableClientList::getCachedZoneWriter()`
-   to reload the data by itself, just like in the previous section.
-   In this case, however, the writability check of
-   `getCachedZoneWriter()` fails (the segment was created as
-   `READ_ONLY` and is non-writable), so loading won't happen.
-
-NOTE: While less likely in practice, it's possible that the same auth
-module uses both "local" and "mapped" (and even others) type of
-segments for different data sources.  In such cases the sequence is
-either the one in this or previous section depending on the specified
-segment type in the configuration.  The auth module itself isn't aware
-of per segment-type details, but changes the behavior depending on the
-segment state of each data source at step 4 above: if it's `WAITING`,
-it means the auth module needs help from memmgr (that's all the auth
-module should know; it shouldn't be bothered with further details such
-as mapped file names); if it's something else, the auth module doesn't
-have to do anything further.
-
-Sequence for memmgr module initialization using mapped memory segment
----------------------------------------------------------------------
-
-This sequence shows the common initialization sequence for the
-memory manager (memmgr) module using a mapped type memory segment.
-This is a mixture of the sequences shown in Sections 2 and 3.
-
-image::memmgr-mapped-init.png[]
-
-1. Initial sequence is the same until the application module (memmgr)
-   calls `ConfigurableClientList::getStatus()` as that for the
-   previous section.
-
-2. The memmgr module identifies the data sources whose in-memory cache
-   type is "mapped".  (Unlike other application modules, the memmgr
-   should know what such types means due to its exact responsibility).
-   For each such data source, it calls
-   `ConfigurableClientList::resetMemorySegment` with the READ_WRITE
-   mode and other mapped-type specific parameters.  memmgr should be
-   able to generate the parameters from its own configuration and
-   other data source specific information (such as the RR class and
-   data source name).
-
-3. The `ConfigurableClientList` class calls
-   `ZoneTableSegment::reset()` on the corresponding zone table
-   segment with the given parameters.  In this case, since the mode is
-   READ_WRITE, a new `ZoneTable` will be created (assuming this is a
-   very first time initialization; if there's already a zone table
-   in the segment, it will be used).
-
-4. The memmgr module then calls
-   `ConfigurableClientList::getZoneTableAccessor()`, and calls the
-   `getIterator()` method on it to get a list of zones for which
-   zone data are to be loaded into the memory segment.
-
-5. The memmgr module loads the zone data for each such zone.  This
-   sequence is the same as shown in Section 2.
-
-6. On loading all zone data, the memmgr module sends an update command
-   to all interested modules (such as auth) in the segment, and waits
-   for acknowledgment from all of them.
-
-7. Then it calls `ConfigurableClientList::resetMemorySegment()` for
-   this data source with almost the same parameter as step 2 above,
-   but with a different mapped file name.  This will make a swap of
-   the underlying memory segment with a new mapping.  The old
-   `MemorySegment` object will be destroyed, but as explained in the
-   previous section, it simply means unmapping the file.
-
-8. The memmgr loads the zone data into the newly mapped memory region
-   by repeating the sequence shown in step 5.
-
-9. The memmgr repeats all this sequence for data sources that use
-   "mapped" segment for in-memory cache.  Note: it could handle
-   multiple data sources in parallel, e.g., while waiting for
-   acknowledgment from other modules.
-
-Sequence for memmgr module to reload a zone using mapped memory segment
------------------------------------------------------------------------
-
-This example is a continuation of the previous section, describing how
-the memory manager reloads a zone in mapped memory segment.
-
-image::memmgr-mapped-reload.png[]
-
-1. When the memmgr module receives a reload command from other module,
-   it calls `ConfigurableClientList::getCachedZoneWriter()` for the
-   specified zone name.  This method checks the writability of
-   the segment, and since it's writable (as memmgr created it in the
-   READ_WRITE mode), `getCachedZoneWriter()` succeeds and returns
-   a `ZoneWriter`.
-
-2. The memmgr module uses the writer to load the new version of zone
-   data.  There is nothing specific to mapped-type segment here.
-
-3. The memmgr module then sends an update command to other modules
-   that would share this version, and waits for acknowledgment from
-   all of them.
-
-4. On getting acknowledgments, the memmgr module calls
-  `ConfigurableClientList::resetMemorySegment()` with the parameter
-   specifying the other mapped file.  This will swap the underlying
-   `MemorySegment` with a newly created one, mapping the other file.
-
-5. The memmgr updates this segment, too, so the two files will contain
-   the same version of data.
diff --git a/doc/design/datasrc/memmgr-mapped-init.txt b/doc/design/datasrc/memmgr-mapped-init.txt
deleted file mode 100644 (file)
index 9daea13..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-@startuml
-
-participant memmgr as ":b10-memmgr"
-[-> memmgr: new/initial config\n(datasrc cfg)
-activate memmgr
-
-participant list as ":Configurable\nClientList"
-create list
-memmgr -> list: <<construct>>
-
-memmgr -> list: configure(cfg)
-activate list
-
-participant CacheConfig as ":CacheConfig"
-create CacheConfig
-list -> CacheConfig: <<construct>> (cfg)
-
-participant zt_segment as ":ZoneTable\nSegment\n(Mapped)"
-create zt_segment
-list -> zt_segment: <<construct>>
-
-list -> zt_segment: isWritable()
-activate zt_segment
-note over zt_segment: Segment not writable\nwhen not reset
-zt_segment --> list: false
-deactivate zt_segment
-
-deactivate list
-
-memmgr -> list: getStatus()
-activate list
-list --> memmgr: DataSourceStatus[]
-deactivate list
-
-loop for each datasrc with mapped segment
-
-memmgr -> list: resetMemorySegment\n(datasrc_name,\nREAD_WRITE,\nsegmentparam)
-activate list
-
-list -> zt_segment: reset\n(READ_WRITE,\nsegmentparam)
-activate zt_segment
-
-participant segment as "seg1:Memory\nSegment\n(Mapped)"
-create segment
-zt_segment -> segment: <<construct>>
-
-participant segment.2 as "seg2:Memory\nSegment\n(Mapped)"
-
-participant ZoneTable as ":ZoneTable"
-create ZoneTable
-zt_segment -> ZoneTable: <<construct>>
-
-deactivate zt_segment
-deactivate list
-
-memmgr -> list: getZoneTableAccessor\n(datasrc_name,\ncache=true)
-activate list
-list -> memmgr: ZoneTableAccessor
-deactivate list
-
-
-loop for each zone given by ZoneTableIterator
-
-memmgr -> list: getCachedZoneWriter\n(zone_name)
-activate list
-
-list -> CacheConfig: getLoadAction()
-activate CacheConfig
-
-participant LoadAction as "la:LoadAction"
-create LoadAction
-CacheConfig -> LoadAction: <<construct>>
-
-CacheConfig --> list : la
-
-deactivate CacheConfig
-
-participant ZoneWriter as "zw:ZoneWriter"
-create ZoneWriter
-list -> ZoneWriter: <<construct>> (la)
-
-list --> memmgr: zw
-
-deactivate list
-
-
-memmgr -> ZoneWriter: load()
-activate ZoneWriter
-ZoneWriter -> LoadAction: (funcall)
-activate LoadAction
-
-participant ZoneData as "zd:ZoneData"
-create ZoneData
-LoadAction -> ZoneData: <<construct>> via helpers
-
-LoadAction --> ZoneWriter: zd
-deactivate LoadAction
-deactivate ZoneWriter
-
-memmgr -> ZoneWriter: install()
-activate ZoneWriter
-
-ZoneWriter -> ZoneTable: addZone(zd)
-activate ZoneTable
-ZoneTable --> ZoneWriter: NULL (no old data)
-deactivate ZoneTable
-
-deactivate ZoneWriter
-
-end
-
-[<- memmgr: command to\nmodules\n(datasrc_name,\nsegmentparam)
-[--> memmgr: ack from all\nmodules
-
-memmgr -> list: resetMemorySegment\n(datasrc_name,\nREAD_WRITE,\nsegmentparam)
-activate list
-
-list -> zt_segment: reset\n(READ_WRITE,\nsegmentparam)
-activate zt_segment
-
-zt_segment -> segment: <<destroy>>
-destroy segment
-create segment.2
-zt_segment -> segment.2: <<construct>>
-
-deactivate zt_segment
-deactivate list
-
-note left of memmgr: load zone\nfor each zone\ngiven by\nZoneTableIterator
-
-end
-
-[<-- memmgr
-
-deactivate memmgr
-
-@enduml
diff --git a/doc/design/datasrc/memmgr-mapped-reload.txt b/doc/design/datasrc/memmgr-mapped-reload.txt
deleted file mode 100644 (file)
index 676e961..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-@startuml
-
-participant memmgr as ":b10-memmgr"
-[-> memmgr: reload\n(zonename)
-activate memmgr
-
-participant list as ":Configurable\nClientList"
-memmgr -> list: getCachedZoneWriter\n(zone_name)
-activate list
-
-participant CacheConfig as ":CacheConfig"
-
-participant zt_segment as ":ZoneTable\nSegment\n(Mapped)"
-participant segment as "existing:Memory\nSegment\n(Mapped)"
-participant segment2 as "new:Memory\nSegment\n(Mapped)"
-
-list -> zt_segment: isWritable()
-activate zt_segment
-zt_segment --> list: true
-deactivate zt_segment
-
-list -> CacheConfig: getLoadAction()
-activate CacheConfig
-
-participant ZoneTable as ":ZoneTable"
-participant ZoneWriter as "zw:ZoneWriter"
-
-participant LoadAction as "la:LoadAction"
-create LoadAction
-CacheConfig -> LoadAction: <<construct>>
-CacheConfig --> list: la
-deactivate CacheConfig
-
-create ZoneWriter
-list -> ZoneWriter: <<construct>> (la)
-list --> memmgr: zw
-deactivate list
-
-memmgr -> ZoneWriter: load()
-activate ZoneWriter
-ZoneWriter -> LoadAction: (funcall)
-activate LoadAction
-
-participant ZoneData as "zd_existing\n:ZoneData"
-participant ZoneData2 as "zd_new\n:ZoneData"
-
-create ZoneData2
-LoadAction -> ZoneData2: <<construct>> via helpers
-
-LoadAction --> ZoneWriter: zd_new
-deactivate LoadAction
-deactivate ZoneWriter
-
-memmgr -> ZoneWriter: install()
-activate ZoneWriter
-
-ZoneWriter -> ZoneTable: addZone(zd_new)
-activate ZoneTable
-ZoneTable --> ZoneWriter: zd_existing (old data)
-deactivate ZoneTable
-
-deactivate ZoneWriter
-
-memmgr -> ZoneWriter: cleanup()
-activate ZoneWriter
-
-ZoneWriter -> ZoneData: <<destroy>>
-destroy ZoneData
-deactivate ZoneWriter
-
-[<- memmgr: command to\nmodules\n(datasrc_name,\nsegmentparam)
-[--> memmgr: ack from all\nmodules
-
-memmgr -> list: resetMemorySegment\n(datasrc_name,\nREAD_WRITE,\nsegmentparam)
-activate list
-
-list -> zt_segment: reset\n(READ_WRITE,\nsegmentparam)
-activate zt_segment
-
-zt_segment -> segment: <<destroy>>
-destroy segment
-create segment2
-zt_segment -> segment2: <<construct>>
-
-deactivate zt_segment
-deactivate list
-
-note left of memmgr: (repeat the\nsame sequence\nfor loading to the\nother segment)
-
-memmgr -> list: getCachedZoneWriter\n(zone_name)
-
-...
-
-@enduml
similarity index 97%
rename from doc/Doxyfile
rename to doc/devel/Doxyfile
index aaf32af9ce0c4a4ee60bcb09928d474aca664be8..2eeb8509b11d7d050d529d0f7da4cc9d4ec27d02 100644 (file)
@@ -51,7 +51,7 @@ PROJECT_BRIEF          =
 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
 # the logo to the output directory.
 
-PROJECT_LOGO           = guide/kea-logo-100x70.png
+PROJECT_LOGO           = ../images/kea-logo-100x70.png
 
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
 # into which the generated documentation will be written. If a relative path is
@@ -771,53 +771,53 @@ WARN_LOGFILE           =
 # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
 # Note: If this tag is empty the current directory is searched.
 
-INPUT                  = ../src/bin/agent \
-                         ../src/bin/d2 \
-                         ../src/bin/dhcp4 \
-                         ../src/bin/dhcp6 \
-                         ../src/bin/lfc \
-                         ../src/bin/netconf \
-                         ../src/bin/perfdhcp \
-                         ../src/bin/sockcreator \
-                         ../src/hooks/dhcp/high_availability \
-                         ../src/hooks/dhcp/lease_cmds \
-                         ../src/hooks/dhcp/stat_cmds \
-                         ../src/hooks/dhcp/user_chk \
-                         ../src/lib/asiodns \
-                         ../src/lib/asiolink \
-                         ../src/lib/cc \
-                         ../src/lib/cfgrpt \
-                         ../src/lib/config \
-                         ../src/lib/config_backend \
-                         ../src/lib/cql \
-                         ../src/lib/cryptolink \
-                         ../src/lib/database \
-                         ../src/lib/dhcp \
-                         ../src/lib/dhcp_ddns \
-                         ../src/lib/dhcpsrv \
-                         ../src/lib/dhcpsrv/parsers \
-                         ../src/lib/dhcpsrv/benchmarks \
-                         ../src/lib/dns \
-                         ../src/lib/eval \
-                         ../src/lib/exceptions \
-                         ../src/lib/hooks \
-                         ../src/lib/http \
-                         ../src/lib/log \
-                         ../src/lib/log/compiler \
-                         ../src/lib/log/interprocess \
-                         ../src/lib/mysql \
-                         ../src/lib/pgsql \
-                         ../src/lib/process \
-                         ../src/lib/stats \
-                         ../src/lib/testutils \
-                         ../src/lib/util \
-                         ../src/lib/util/encode \
-                         ../src/lib/util/io \
-                         ../src/lib/util/random \
-                         ../src/lib/util/threads \
-                         ../src/lib/util/unittests \
-                         ../src/lib/yang \
-                         devel
+INPUT                  = ../../src/bin/agent \
+                         ../../src/bin/d2 \
+                         ../../src/bin/dhcp4 \
+                         ../../src/bin/dhcp6 \
+                         ../../src/bin/lfc \
+                         ../../src/bin/netconf \
+                         ../../src/bin/perfdhcp \
+                         ../../src/bin/sockcreator \
+                         ../../src/hooks/dhcp/high_availability \
+                         ../../src/hooks/dhcp/lease_cmds \
+                         ../../src/hooks/dhcp/stat_cmds \
+                         ../../src/hooks/dhcp/user_chk \
+                         ../../src/lib/asiodns \
+                         ../../src/lib/asiolink \
+                         ../../src/lib/cc \
+                         ../../src/lib/cfgrpt \
+                         ../../src/lib/config \
+                         ../../src/lib/config_backend \
+                         ../../src/lib/cql \
+                         ../../src/lib/cryptolink \
+                         ../../src/lib/database \
+                         ../../src/lib/dhcp \
+                         ../../src/lib/dhcp_ddns \
+                         ../../src/lib/dhcpsrv \
+                         ../../src/lib/dhcpsrv/parsers \
+                         ../../src/lib/dhcpsrv/benchmarks \
+                         ../../src/lib/dns \
+                         ../../src/lib/eval \
+                         ../../src/lib/exceptions \
+                         ../../src/lib/hooks \
+                         ../../src/lib/http \
+                         ../../src/lib/log \
+                         ../../src/lib/log/compiler \
+                         ../../src/lib/log/interprocess \
+                         ../../src/lib/mysql \
+                         ../../src/lib/pgsql \
+                         ../../src/lib/process \
+                         ../../src/lib/stats \
+                         ../../src/lib/testutils \
+                         ../../src/lib/util \
+                         ../../src/lib/util/encode \
+                         ../../src/lib/util/io \
+                         ../../src/lib/util/random \
+                         ../../src/lib/util/threads \
+                         ../../src/lib/util/unittests \
+                         ../../src/lib/yang
+
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -861,9 +861,9 @@ RECURSIVE              = NO
 # Note that relative paths are relative to the directory from which doxygen is
 # run.
 
-EXCLUDE                = ../src/lib/dns/master_lexer.cc \
-                         ../src/lib/dns/rdataclass.cc \
-                         ../src/lib/eval/lexer.cc
+EXCLUDE                = ../../src/lib/dns/master_lexer.cc \
+                         ../../src/lib/dns/rdataclass.cc \
+                         ../../src/lib/eval/lexer.cc
 
 # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
 # directories that are symbolic links (a Unix file system feature) are excluded
@@ -917,10 +917,10 @@ EXAMPLE_RECURSIVE      = NO
 # that contain images that are to be included in the documentation (see the
 # \image command).
 
-IMAGE_PATH             = ../doc/images \
-                         ../src/lib/hooks/images \
-                         ../src/bin/d2/images \
-                         ../src/lib/dhcpsrv/images
+IMAGE_PATH             = ../images \
+                         ../../src/lib/hooks/images \
+                         ../../src/bin/d2/images \
+                         ../../src/lib/dhcpsrv/images
 
 # The INPUT_FILTER tag can be used to specify a program that doxygen should
 # invoke to filter for each input file. Doxygen will invoke the filter program
@@ -2215,7 +2215,7 @@ HIDE_UNDOC_RELATIONS   = YES
 # set to NO
 # The default value is: YES.
 
-HAVE_DOT               = YES 
+HAVE_DOT               = YES
 
 # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
 # to run in parallel. When set to 0 doxygen will base this on the number of
similarity index 100%
rename from doc/Doxyfile-xml
rename to doc/devel/Doxyfile-xml
diff --git a/doc/devel/Makefile.am b/doc/devel/Makefile.am
new file mode 100644 (file)
index 0000000..8cbf84e
--- /dev/null
@@ -0,0 +1,20 @@
+EXTRA_DIST  =
+EXTRA_DIST += Doxyfile Doxyfile-xml
+EXTRA_DIST += bison.dox
+EXTRA_DIST += config-backend.dox
+EXTRA_DIST += contribute.dox
+EXTRA_DIST += mainpage.dox
+EXTRA_DIST += terminology.dox
+EXTRA_DIST += unit-tests.dox
+EXTRA_DIST += doc.dox
+EXTRA_DIST += congestion-handling.dox
+
+all: devel
+
+devel:
+       mkdir -p $(builddir)/html
+       (cat Doxyfile; echo PROJECT_NUMBER=$(PACKAGE_VERSION)) | doxygen - > $(builddir)/html/doxygen.log 2> $(builddir)/html/doxygen-error.log
+       echo `grep -i ": warning:" $(builddir)/html/doxygen-error.log | wc -l` warnings/errors detected.
+
+clean:
+       rm -rf html
diff --git a/doc/guide/Makefile.am b/doc/guide/Makefile.am
deleted file mode 100644 (file)
index 9426e67..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-if GENERATE_DOCS
-# TODO
-#HTMLDOCS = kea-guide.html kea-messages.html
-#DOCS = kea-guide.txt
-
-#dist_doc_DATA = $(DOCS)
-#dist_html_DATA = $(HTMLDOCS) kea-guide.css kea-logo-100x70.png
-#dist_html_DATA = $(HTMLDOCS) _static/kea-logo-100x70.png
-
-#doc_DATA = _build/singlehtml/kea-guide.html _build/singlehtml/_static/kea-logo-100x70.png
-
-rst_sources=
-rst_sources+=kea-messages.rst
-rst_sources+=admin.rst
-rst_sources+=agent.rst
-rst_sources+=api.rst
-rst_sources+=classify.rst
-rst_sources+=config-backend.rst
-rst_sources+=config.rst
-rst_sources+=congestion-handling.rst
-rst_sources+=ctrl-channel.rst
-rst_sources+=ddns.rst
-rst_sources+=dhcp4-srv.rst
-rst_sources+=dhcp6-srv.rst
-rst_sources+=hammer.rst
-rst_sources+=hooks-cb-cmds.rst
-rst_sources+=hooks-class-cmds.rst
-rst_sources+=hooks-ha.rst
-rst_sources+=hooks-host-cache.rst
-rst_sources+=hooks-lease-cmds.rst
-rst_sources+=hooks-radius.rst
-rst_sources+=hooks.rst
-rst_sources+=hooks-stat-cmds.rst
-rst_sources+=install.rst
-rst_sources+=index.rst
-rst_sources+=intro.rst
-rst_sources+=keactrl.rst
-rst_sources+=lease-expiration.rst
-rst_sources+=lfc.rst
-rst_sources+=logging.rst
-rst_sources+=netconf.rst
-rst_sources+=quickstart.rst
-rst_sources+=shell.rst
-rst_sources+=stats.rst
-
-static_sources=
-static_sources+=_static/kea-imageonly-100bw.png
-static_sources+=_static/kea-logo-200.png
-static_sources+=_static/kea.css
-
-all_sources=$(rst_sources) conf.py $(static_sources)
-
-
-EXTRA_DIST = $(all_sources) $(top_srcdir)/tools/system_messages.py
-
-DISTCLEANFILES = $(HTMLDOCS) $(DOCS) kea-messages.xml
-
-CLEANFILES = kea-guide.pdf kea-messages.pdf
-
-mes_files=
-mes_files+=$(top_srcdir)/src/hooks/dhcp/mysql_cb/mysql_cb_messages.mes
-mes_files+=$(top_srcdir)/src/hooks/dhcp/lease_cmds/lease_cmds_messages.mes
-mes_files+=$(top_srcdir)/src/hooks/dhcp/high_availability/ha_messages.mes
-mes_files+=$(top_srcdir)/src/hooks/dhcp/stat_cmds/stat_cmds_messages.mes
-mes_files+=$(top_srcdir)/src/hooks/dhcp/user_chk/user_chk_messages.mes
-mes_files+=$(top_srcdir)/src/lib/config/config_messages.mes
-mes_files+=$(top_srcdir)/src/lib/hooks/hooks_messages.mes
-mes_files+=$(top_srcdir)/src/lib/dhcpsrv/dhcpsrv_messages.mes
-mes_files+=$(top_srcdir)/src/lib/dhcpsrv/alloc_engine_messages.mes
-mes_files+=$(top_srcdir)/src/lib/dhcpsrv/hosts_messages.mes
-mes_files+=$(top_srcdir)/src/lib/http/http_messages.mes
-mes_files+=$(top_srcdir)/src/lib/dhcp_ddns/dhcp_ddns_messages.mes
-mes_files+=$(top_srcdir)/src/lib/database/db_messages.mes
-mes_files+=$(top_srcdir)/src/lib/log/log_messages.mes
-mes_files+=$(top_srcdir)/src/lib/log/logimpl_messages.mes
-mes_files+=$(top_srcdir)/src/lib/log/tests/log_test_messages.mes
-mes_files+=$(top_srcdir)/src/lib/process/process_messages.mes
-mes_files+=$(top_srcdir)/src/lib/asiodns/asiodns_messages.mes
-mes_files+=$(top_srcdir)/src/lib/eval/eval_messages.mes
-mes_files+=$(top_srcdir)/src/bin/dhcp4/dhcp4_messages.mes
-mes_files+=$(top_srcdir)/src/bin/agent/ca_messages.mes
-mes_files+=$(top_srcdir)/src/bin/d2/d2_messages.mes
-mes_files+=$(top_srcdir)/src/bin/dhcp6/dhcp6_messages.mes
-mes_files+=$(top_srcdir)/src/bin/lfc/lfc_messages.mes
-mes_files+=$(top_srcdir)/src/bin/netconf/netconf_messages.mes
-
-kea-messages.rst: $(mes_files) $(top_srcdir)/tools/system_messages.py
-       $(top_srcdir)/tools/system_messages.py -o $@ $(mes_files)
-
-
-sphinxopts=
-sphinxopts+=-v
-sphinxopts+=-E
-sphinxopts+=-a
-sphinxopts+=-c "${abs_srcdir}"
-sphinxopts+=-D release="@PACKAGE_VERSION@"
-sphinxopts+=-D version="@PACKAGE_VERSION@"
-
-sphinxbuilddir=$(builddir)/_build
-
-all: pdf html
-
-pdf: $(all_sources)
-       $(SPHINXBUILD) -M latexpdf $(srcdir) $(sphinxbuilddir) $(sphinxopts)
-
-html: $(all_sources)
-       $(SPHINXBUILD) -M $@ $(srcdir) $(sphinxbuilddir) $(sphinxopts)
-
-
-install-data-local:
-       mkdir -p $(DESTDIR)$(docdir)
-       cp -r $(sphinxbuilddir)/html $(DESTDIR)$(docdir)
-       cp -r $(sphinxbuilddir)/latex/KeaAdministratorReferenceManual.pdf $(DESTDIR)$(docdir)
-
-uninstall-local:
-       rm -rf $(DESTDIR)$(docdir)
-
-clean::
-       -rm -rf $(sphinxbuilddir)
-
-
-.PHONY: all pdf html
-
-
-endif
diff --git a/doc/guide/admin.xml b/doc/guide/admin.xml
deleted file mode 100644 (file)
index 6536e93..0000000
+++ /dev/null
@@ -1,762 +0,0 @@
-<!--
- - Copyright (C) 2015-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-
-<!-- Converted by db4-upgrade version 1.1 -->
-<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="admin">
-  <title>Kea Database Administration</title>
-
-  <section xml:id="kea-database-version">
-    <title>Databases and Database Version Numbers</title>
-
-    <para>
-      Kea may be configured to use a database as a storage for leases,
-      a source of servers' configurations and host reservations (i.e. static
-      assignments of addresses, prefixes, options etc.). Subsequent Kea
-      releases introduce changes to the database schemas to faciliate new
-      features and correct discovered issues with the existing schemas.
-    </para>
-
-    <para>
-      A given version of Kea expects a particular structure in
-      the backend and checks for this by examining the version of
-      database it is using. Separate version numbers are maintained for
-      backends, independent of the version of Kea itself. It
-      is possible that the backend version will stay the same
-      through several Kea revisions; similarly, it is possible that the
-      version of the backend may go up several revisions during a
-      Kea upgrade. Versions for each backend are independent, so an
-      increment in the MySQL backend version does not imply an increment
-      in that of PostgreSQL.
-    </para>
-
-    <para>
-      Backend versions are specified in
-      a <replaceable>major.minor</replaceable> format. The minor
-      number is increased when there are backward-compatible changes
-      introduced; for example, the addition of a new index. It is
-      desirable but not mandatory to apply such a change; you
-      can run an older backend version if you want to. (Although, in
-      the example given, running without the new index may be at the
-      expense of a performance penalty.) On the other hand, the major
-      number is increased when an incompatible change is introduced:
-      for example, an extra column is added to a table. If you try to
-      run Kea on a backend that is too old (as signified by
-      a mismatched backend major version number), Kea will refuse to run;
-      administrative action will be required to upgrade the backend.
-    </para>
-  </section>
-
-  <section xml:id="kea-admin">
-    <title>The kea-admin Tool</title>
-
-    <para>
-      To manage the databases, Kea provides the
-      <command>kea-admin</command> tool. It is able to initialize
-      a new backend, check its version number, perform a
-      backend upgrade, and dump lease data to a text file.
-    </para>
-
-    <para>
-      <command>kea-admin</command> takes two mandatory
-      parameters: <command>command</command> and
-      <command>backend</command>. Additional, non-mandatory options
-      may be specified. The currently supported commands are:
-
-      <itemizedlist>
-        <listitem>
-          <simpara>
-            <command>db-init</command> â€”
-            Initializes a new database schema. This is useful during a new
-            Kea installation. The database is initialized to the
-            latest version supported by the version of the software being
-            installed.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            <command>db-version</command> â€”
-            Reports the database backend version number. This is
-            not necessarily equal to the Kea version number as
-            each backend has its own versioning scheme.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            <command>db-upgrade</command> â€”
-            Conducts a database schema upgrade. This is useful when
-            upgrading Kea.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            <command>lease-dump</command> â€”
-            Dumps the contents of the lease database (for MySQL, PostgreSQL, or
-            CQL backends) to a CSV (comma-separated values) text file. The first
-            line of the file contains the column names. This is meant to be
-            used as a diagnostic tool, so it provides a portable, human-readable
-            form of the lease data.
-          </simpara>
-        </listitem>
-      </itemizedlist>
-
-      <note>In previous versions of Kea ending with 1.6.0
-      <command>db-init</command>, <command>db-version</command> and
-      <command>db-upgrade</command> commands were named
-      <command>lease-init</command>, <command>lease-version</command> and
-      <command>lease-upgrade</command>.
-      </note>
-
-      <command>backend</command> specifies the type of backend database. The currently
-      supported types are:
-
-      <itemizedlist>
-        <listitem>
-          <simpara>
-            <command>memfile</command> â€” Lease information is
-            stored on disk in a text file.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            <command>mysql</command> â€”
-            Information is stored in a MySQL relational database.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            <command>pgsql</command> â€”
-            Information is stored in a PostgreSQL relational database.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            <command>cql</command> â€”
-            Information is stored in an Apache Cassandra database.
-          </simpara>
-        </listitem>
-
-      </itemizedlist>
-
-      Additional parameters may be needed, depending on your setup
-      and specific operation: username, password, and database name or
-      the directory where specific files are located. See the appropriate
-      manual page for details (<command>man 8 kea-admin</command>).
-    </para>
-  </section>
-
-  <section xml:id="supported-databases">
-    <title>Supported Backends</title>
-
-    <para>The following table presents the capabilities of available
-    backends. Please refer to the specific sections dedicated to each backend to
-    better understand their capabilities and limitations. Choosing the right
-    backend may be essential for the success of your deployment.</para>
-
-    <para>
-      <table frame="all" xml:id="backends">
-        <title>List of available backends</title>
-        <tgroup cols='5'>
-          <colspec colname='feature'/>
-          <colspec colname='memfile'/>
-          <colspec colname='mysql'/>
-          <colspec colname='pgsql'/>
-          <colspec colname='cql' colwidth='1.5*'/>
-          <thead>
-            <row>
-              <entry>Feature</entry>
-              <entry>Memfile</entry>
-              <entry>MySQL</entry>
-              <entry>PostgreSQL</entry>
-              <entry>CQL (Cassandra)</entry>
-            </row>
-          </thead>
-          <tbody>
-
-            <row>
-              <entry>Status</entry>
-              <entry>Stable</entry>
-              <entry>Stable</entry>
-              <entry>Stable</entry>
-              <entry>Experimental</entry>
-            </row>
-
-            <row>
-              <entry>Data format</entry>
-              <entry>CSV file</entry>
-              <entry>SQL RMDB</entry>
-              <entry>SQL RMDB</entry>
-              <entry>NoSQL database (Cassandra)</entry>
-            </row>
-
-            <row>
-              <entry>Leases</entry>
-              <entry>yes</entry>
-              <entry>yes</entry>
-              <entry>yes</entry>
-              <entry>yes</entry>
-            </row>
-
-            <row>
-              <entry>Host Reservations</entry>
-              <entry>no</entry>
-              <entry>yes</entry>
-              <entry>yes</entry>
-              <entry>yes</entry>
-            </row>
-
-            <row>
-              <entry>Options defined on per host basis</entry>
-              <entry>no</entry>
-              <entry>yes</entry>
-              <entry>yes</entry>
-              <entry>yes</entry>
-            </row>
-
-            <row>
-              <entry>Configuration Backend</entry>
-              <entry>no</entry>
-              <entry>yes</entry>
-              <entry>no</entry>
-              <entry>no</entry>
-            </row>
-
-          </tbody>
-          </tgroup>
-       </table>
-    </para>
-
-    <section>
-      <title>memfile</title>
-
-      <para>
-        The memfile backend is able to store lease information, but is not able to
-        store host reservation details; these must be stored in the configuration
-        file. (There are no plans to add a host reservations storage capability to
-        this backend.)
-      </para>
-
-      <para>
-        No special initialization steps are necessary
-        for the memfile backend. During the first run, both
-        <command>kea-dhcp4</command> and <command>kea-dhcp6</command>
-        will create an empty lease file if one is not
-        present. Necessary disk-write permission is required.
-      </para>
-
-      <section xml:id="memfile-upgrade">
-        <title>Upgrading Memfile Lease Files from an Earlier Version of Kea</title>
-        <para>
-        There are no special steps required to upgrade memfile lease files
-        from an earlier version of Kea to a new version of Kea.
-
-        During startup the servers will check the schema version of the lease
-        files against their own. If there is a mismatch, the servers will
-        automatically launch the LFC process to convert the files to the
-        server's schema version. While this mechanism is primarily meant to
-        ease the process of upgrading to newer versions of Kea, it can also
-        be used for downgrading should the need arise. When upgrading, any
-        values not present in the original lease files will be assigned
-        appropriate default values. When downgrading, any data present in
-        the files but not in the server's schema will be dropped.
-
-        If you wish to convert the files manually prior to starting the
-        servers, you may do so by running the LFC process yourself.
-        See <xref linkend="kea-lfc"/> for more information.
-        </para>
-      </section>
-      <!-- @todo: document lease file upgrades once they are implemented in kea-admin -->
-    </section>
-
-    <section id="mysql-database">
-      <title>MySQL</title>
-
-      <para>
-        MySQL is able to store leases, host reservations, options defined on
-        a per-host basis and a subset of the server configuration parameters
-        (serving as a configuration backend). This section can be safely ignored
-        if you choose to store the data in other backends.
-      </para>
-
-      <section xml:id="mysql-database-create">
-        <title>First-Time Creation of the MySQL Database</title>
-
-        <para>
-          If you are setting the MySQL database for the first time,
-          you need to create the database area within MySQL and set up
-          the MySQL user ID under which Kea will access the database.
-          This needs to be done manually; <command>kea-admin</command>
-          is not able to do this for you.
-        </para>
-
-        <para>
-          To create the database:
-
-          <orderedlist>
-            <listitem>
-              <para>
-                Log into MySQL as "root":
-<screen>
-$ <userinput>mysql -u root -p</userinput>
-Enter password:
-mysql&gt;
-</screen>
-              </para>
-            </listitem>
-
-            <listitem>
-              <para>
-                Create the MySQL database:
-<screen>
-mysql&gt; <userinput>CREATE DATABASE <replaceable>database-name</replaceable>;</userinput>
-</screen>
-                (<replaceable>database-name</replaceable> is the name
-                you have chosen for the database.)
-              </para>
-            </listitem>
-
-            <listitem>
-              <para>
-                Create the user under which Kea will access the database
-                (and give it a password), then grant it access to the
-                database tables:
-<screen>
-mysql&gt; <userinput>CREATE USER '<replaceable>user-name</replaceable>'@'localhost' IDENTIFIED BY '<replaceable>password</replaceable>';</userinput>
-mysql&gt; <userinput>GRANT ALL ON <replaceable>database-name</replaceable>.* TO '<replaceable>user-name</replaceable>'@'localhost';</userinput>
-</screen>
-                (<replaceable>user-name</replaceable> and
-                <replaceable>password</replaceable> are the user ID
-                and password you are using to allow Kea's access to the
-                MySQL instance. All apostrophes in the command lines
-                above are required.)
-              </para>
-            </listitem>
-
-            <listitem>
-              <para>
-                At this point, you may elect to create the database
-                tables. (Alternatively, you can exit MySQL and create
-                the tables using the <command>kea-admin</command> tool,
-                as explained below.) To do this:
-<screen>
-mysql&gt; <userinput>CONNECT <replaceable>database-name</replaceable>;</userinput>
-mysql&gt; <userinput>SOURCE <replaceable>path-to-kea</replaceable>/share/kea/scripts/mysql/dhcpdb_create.mysql</userinput>
-</screen>
-                (<replaceable>path-to-kea</replaceable> is the
-                location where you installed Kea.)
-              </para>
-            </listitem>
-
-            <listitem>
-              <para>
-                Exit MySQL:
-<screen>
-mysql&gt; <userinput>quit</userinput>
-Bye
-$
-</screen>
-              </para>
-            </listitem>
-          </orderedlist>
-        </para>
-
-        <para>
-          If you elected not to create the tables in Step 4, you can do
-          so now by running the <command>kea-admin</command> tool:
-<screen>
-$ <userinput>kea-admin db-init mysql -u <replaceable>database-user</replaceable> -p <replaceable>database-password</replaceable> -n <replaceable>database-name</replaceable></userinput>
-</screen>
-          (Do not do this if you did create the tables in Step 4.)
-          <command>kea-admin</command> implements rudimentary checks;
-          it will refuse to initialize a database that contains any
-          existing tables. If you want to start from scratch, you
-          must remove all data manually. (This process is a manual
-          operation on purpose, to avoid possibly irretrievable mistakes
-          by <command>kea-admin</command>.)
-        </para>
-      </section>
-
-      <section xml:id="mysql-upgrade">
-        <title>Upgrading a MySQL Database from an Earlier Version of Kea</title>
-
-        <para>
-          Sometimes a new Kea version may use a newer database schema, so
-          the existing database will need to be upgraded. This can
-          be done using the <command>kea-admin db-upgrade</command>
-          command.
-        </para>
-
-        <para>
-          To check the current version of the database, use the following command:
-<screen>
-$ <userinput>kea-admin db-version mysql -u <replaceable>database-user</replaceable> -p <replaceable>database-password</replaceable> -n <replaceable>database-name</replaceable></userinput>
-</screen>
-          (See <xref linkend="kea-database-version"/> for a discussion
-          about versioning.) If the version does not match the minimum
-          required for the new version of Kea (as described in the
-          release notes), the database needs to be upgraded.
-        </para>
-
-        <para>
-          Before upgrading, please make sure that the database is
-          backed up. The upgrade process does not discard any data, but
-          depending on the nature of the changes, it may be impossible
-          to subsequently downgrade to an earlier version. To perform
-          an upgrade, issue the following command:
-<screen>
-$ <userinput>kea-admin db-upgrade mysql -u <replaceable>database-user</replaceable> -p <replaceable>database-password</replaceable> -n <replaceable>database-name</replaceable></userinput>
-</screen>
-        </para>
-      </section>
-    </section> <!-- end of MySQL sections -->
-
-    <section id="pgsql-database">
-      <title>PostgreSQL</title>
-
-      <para>
-        PostgreSQL is able to store leases, host reservations, and options
-        defined on a per-host basis.
-        This step can be
-        safely ignored if you are using other database backends.
-      </para>
-
-      <section xml:id="pgsql-database-create">
-        <title>First-Time Creation of the PostgreSQL Database</title>
-
-        <para>
-          The first task is to create both the database and the
-          user under which the servers will access it. A number of steps
-          are required:
-
-          <orderedlist>
-            <listitem>
-              <para>
-                Log into PostgreSQL as "root":
-<screen>
-$ <userinput>sudo -u postgres psql postgres</userinput>
-Enter password:
-postgres=#
-</screen>
-              </para>
-            </listitem>
-
-            <listitem>
-              <para>
-                Create the database:
-<screen>
-postgres=#<userinput> CREATE DATABASE <replaceable>database-name</replaceable>;</userinput>
-CREATE DATABASE
-postgres=#
-</screen>
-                (<replaceable>database-name</replaceable> is the name
-                you have chosen for the database.)
-              </para>
-            </listitem>
-
-            <listitem>
-              <para>
-                Create the user under which Kea will access the database
-                (and give it a password), then grant it access to the
-                database:
-<screen>
-postgres=#<userinput> CREATE USER <replaceable>user-name</replaceable> WITH PASSWORD '<replaceable>password</replaceable>';</userinput>
-CREATE ROLE
-postgres=#<userinput> GRANT ALL PRIVILEGES ON DATABASE <replaceable>database-name</replaceable> TO <replaceable>user-name</replaceable>;</userinput>
-GRANT
-postgres=#
-</screen>
-              </para>
-            </listitem>
-
-            <listitem>
-              <para>
-                Exit PostgreSQL:
-<screen>
-postgres=# <userinput>\q</userinput>
-Bye
-$
-</screen>
-              </para>
-            </listitem>
-
-            <listitem>
-              <para>
-                At this point you are ready to create the database tables.
-                This can be done using the <command>kea-admin</command> tool
-                as explained in the next section (recommended), or manually.
-                To create the tables manually, enter the following command.
-                Note that PostgreSQL will prompt you to enter the new user's
-                password you specified in Step 3. When the command completes,
-                you will be returned to the shell prompt. You should see output
-                similar to the following:
-<screen>
-$ <userinput>psql -d <replaceable>database-name</replaceable> -U <replaceable>user-name</replaceable> -f <replaceable>path-to-kea</replaceable>/share/kea/scripts/pgsql/dhcpdb_create.pgsql</userinput>
-Password for user <replaceable>user-name</replaceable>:
-CREATE TABLE
-CREATE INDEX
-CREATE INDEX
-CREATE TABLE
-CREATE INDEX
-CREATE TABLE
-START TRANSACTION
-INSERT 0 1
-INSERT 0 1
-INSERT 0 1
-COMMIT
-CREATE TABLE
-START TRANSACTION
-INSERT 0 1
-COMMIT
-$
-</screen>
-                (<replaceable>path-to-kea</replaceable> is the location
-                where you installed Kea.)
-              </para>
-
-              <para>
-                If instead you encounter an error like:
-<screen>
-psql: FATAL:  no pg_hba.conf entry for host "[local]", user "<replaceable>user-name</replaceable>", database "<replaceable>database-name</replaceable>", SSL off
-</screen>
-                ... you will need to alter the PostgreSQL configuration.
-                Kea uses password authentication when connecting to
-                the database and must have the appropriate entries
-                added to PostgreSQL's pg_hba.conf file. This file is
-                normally located in the primary data directory for your
-                PostgreSQL server. The precise path may vary depending on your operating system and version, but the
-                default location for PostgreSQL 9.3 on Centos 6.5 is:
-                <filename>/var/lib/pgsql/9.3/data/pg_hba.conf</filename>.
-              </para>
-
-              <para>
-                Assuming Kea is running on the same host as PostgreSQL,
-                adding lines similar to the following should be sufficient to
-                provide password-authenticated access to Kea's database:
-<screen>
-local   <replaceable>database-name</replaceable>    <replaceable>user-name</replaceable>                                 password
-host    <replaceable>database-name</replaceable>    <replaceable>user-name</replaceable>          127.0.0.1/32           password
-host    <replaceable>database-name</replaceable>    <replaceable>user-name</replaceable>          ::1/128                password
-</screen>
-              </para>
-
-              <para>
-                These edits are primarily intended as a starting point, and are
-                not a definitive reference on PostgreSQL administration or
-                database security. Please consult your PostgreSQL user
-                manual before making these changes, as they may expose
-                other databases that you run. It may be necessary to
-                restart PostgreSQL in order for the changes to take effect.
-              </para>
-            </listitem>
-          </orderedlist>
-        </para>
-      </section>
-
-      <section>
-        <title>Initialize the PostgreSQL Database Using kea-admin</title>
-        <para>
-          If you elected not to create the tables manually, you can do
-          so now by running the <command>kea-admin</command> tool:
-<screen>
-$ <userinput>kea-admin db-init pgsql -u <replaceable>database-user</replaceable> -p <replaceable>database-password</replaceable> -n <replaceable>database-name</replaceable></userinput>
-</screen>
-          Do not do this if you already created the tables manually.
-          <command>kea-admin</command> implements rudimentary checks;
-          it will refuse to initialize a database that contains any
-          existing tables. If you want to start from scratch, you
-          must remove all data manually. (This process is a manual
-          operation on purpose, to avoid possibly irretrievable mistakes
-          by <command>kea-admin</command>.)
-        </para>
-      </section>
-      <section xml:id="pgsql-upgrade">
-        <title>Upgrading a PostgreSQL Database from an Earlier Version of Kea</title>
-        <para>
-          The PostgreSQL database schema can be upgraded using the same tool and
-          commands as described in <xref linkend="mysql-upgrade"/>, with the
-          exception that the "pgsql" database backend type must be used in
-          the commands.
-        </para>
-        <para>
-          Use the following command to check the current schema version:
-<screen>
-$ <userinput>kea-admin db-version pgsql -u <replaceable>database-user</replaceable> -p <replaceable>database-password</replaceable> -n <replaceable>database-name</replaceable></userinput>
-</screen>
-          Use the following command to perform an upgrade:
-<screen>
-$ <userinput>kea-admin db-upgrade pgsql -u <replaceable>database-user</replaceable> -p <replaceable>database-password</replaceable> -n <replaceable>database-name</replaceable></userinput>
-</screen>
-        </para>
-      </section>
-    </section> <!-- end of PostgreSQL sections -->
-
-    <section id="cql-database">
-      <title>Cassandra</title>
-
-      <para>
-        Cassandra (sometimes for historical reasons referred to in documentation and commands as CQL) is the newest backend
-        added to Kea; initial development was contributed by Deutsche Telekom.
-        The Cassandra backend is able to store leases,
-        host reservations, and options defined on a per-host basis.
-      </para>
-
-      <para>
-        Cassandra must be properly set up if you want Kea to store
-        information in it. This section can be safely ignored if you choose to
-        store the data in other backends.
-      </para>
-
-    <section xml:id="cql-database-create">
-      <title>First-Time Creation of the Cassandra Database</title>
-
-      <para>
-        If you are setting up the Cassandra database for the first time, you need to create the keyspace area within it. This needs to be done manually;
-        <command>kea-admin</command> cannot do this for you.
-      </para>
-
-      <para>
-        To create the database:
-        <orderedlist>
-          <listitem>
-            <para>
-              Export CQLSH_HOST environment variable:
-<screen>
-$ <userinput>export CQLSH_HOST=localhost</userinput>
-</screen>
-              </para>
-            </listitem>
-          <listitem>
-            <para>
-              Log into CQL:
-<screen>
-$ <userinput>cqlsh</userinput>
-cql&gt;
-</screen>
-              </para>
-            </listitem>
-
-          <listitem>
-            <para>
-              Create the CQL keyspace:
-<screen>
-cql&gt; <userinput>CREATE KEYSPACE keyspace-name WITH replication = {'class' : 'SimpleStrategy','replication_factor' : 1};</userinput>
-</screen>
-              (<replaceable>keyspace-name</replaceable> is the name you have
-              chosen for the keyspace)
-            </para>
-          </listitem>
-
-         <listitem>
-            <para>
-              At this point, you may elect to create the database tables.
-              (Alternatively, you can exit Cassandra and create the tables using the
-              <command>kea-admin</command> tool, as explained below.) To do this:
-<screen>
-<userinput>cqslh -k <replaceable>keyspace-name</replaceable> -f <replaceable>path-to-kea</replaceable>/share/kea/scripts/cql/dhcpdb_create.cql</userinput>
-</screen>
-              (<replaceable>path-to-kea</replaceable> is the location where you
-              installed Kea)
-            </para>
-          </listitem>
-        </orderedlist>
-      </para>
-
-      <para>
-        If you elected not to create the tables in Step 4, you can do
-        so now by running the <command>kea-admin</command> tool:
-<screen>
-$ <userinput>kea-admin db-init cql -n <replaceable>database-name</replaceable></userinput>
-</screen>
-        (Do not do this if you did create the tables in Step 4.)
-        <command>kea-admin</command> implements rudimentary checks;
-        it will refuse to initialize a database that contains any
-        existing tables. If you want to start from scratch, you
-        must remove all data manually. (This process is a manual
-        operation on purpose, to avoid possibly irretrievable mistakes
-        by <command>kea-admin</command>.)
-      </para>
-    </section>
-
-    <section xml:id="cql-upgrade">
-      <title>Upgrading a Cassandra Database from an Earlier Version of Kea</title>
-
-      <para>
-        Sometimes a new Kea version may use a newer database schema, so
-        the existing database will need to be upgraded. This can
-        be done using the <command>kea-admin db-upgrade</command>
-        command.
-      </para>
-
-      <para>
-        To check the current version of the database, use the following command:
-<screen>
-$ <userinput>kea-admin db-version cql -n <replaceable>database-name</replaceable></userinput>
-</screen>
-        (See <xref linkend="kea-database-version"/> for a discussion
-        about versioning.) If the version does not match the minimum
-        required for the new version of Kea (as described in the
-        release notes), the database needs to be upgraded.
-      </para>
-
-      <para>
-        Before upgrading, please make sure that the database is
-        backed up. The upgrade process does not discard any data, but
-        depending on the nature of the changes, it may be impossible
-        to subsequently downgrade to an earlier version. To perform
-        an upgrade, issue the following command:
-<screen>
-$ <userinput>kea-admin db-upgrade cql -n <replaceable>database-name</replaceable></userinput>
-</screen>
-      </para>
-    </section>
-  </section> <!-- end of CQL sections -->
-
-    <section>
-      <title>Using Read-Only Databases with Host Reservations</title>
-      <para>If a read-only database is used for storing host reservations,
-      Kea must be explicitly configured to operate on the database in
-      read-only mode.
-      Sections <xref linkend="read-only-database-configuration4"/> and
-      <xref linkend="read-only-database-configuration6"/> describe when
-      such configuration may be required and how to configure Kea to
-      operate in this way.
-      </para>
-    </section>
-
-    <section>
-      <title>Limitations Related to the Use of SQL Databases</title>
-
-
-      <section>
-        <title>Year 2038 Issue</title>
-        <para>
-          The lease expiration time is stored in the SQL database for each lease
-          as a timestamp value. Kea developers observed that the MySQL database doesn't
-          accept timestamps beyond 2147483647 seconds (maximum signed 32-bit number)
-          from the beginning of the Unix epoch (00:00:00 on 1 January 1970). Some versions of PostgreSQL
-          do accept greater values, but the value is altered when it is read back.
-          For this reason, the lease database backends put a restriction on the
-          maximum timestamp to be stored in the database, which is equal to the
-          maximum signed 32-bit number. This effectively means that the current
-          Kea version cannot store leases whose expiration time is later than
-          2147483647 seconds since the beginning of the epoch (around year 2038).
-          This will be fixed when the database support for longer timestamps
-          is available.
-        </para>
-      </section>
-
-    </section>
-
-  </section> <!-- End of Database sections -->
-
-</chapter>
diff --git a/doc/guide/agent.xml b/doc/guide/agent.xml
deleted file mode 100644 (file)
index 347f0b4..0000000
+++ /dev/null
@@ -1,312 +0,0 @@
-<!--
- - Copyright (C) 2017-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-
-<!-- Converted by db4-upgrade version 1.1 -->
-<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="kea-ctrl-agent">
-  <title>The Kea Control Agent</title>
-
-  <section xml:id="agent-overview">
-    <title>Overview</title>
-    <para>The Kea Control Agent (CA) is a daemon which
-    exposes a RESTful control interface for managing Kea servers. The daemon
-    can receive control commands over HTTP and either forward these commands
-    to the respective Kea servers or handle these commands on its own. The
-    determination whether the command should be handled by the CA or forwarded
-    is made by checking the value of the "service" parameter, which may be
-    included in the command from the controlling client. The details of the
-    supported commands, as well as their structures, are provided in
-    <xref linkend="ctrl-channel"/>.</para>
-    
-    <para>The CA can use hook libraries to provide support for
-    additional commands or custom behavior of existing commands. Such hook
-    libraries must implement callouts for the "control_command_receive" hook point.
-    Details about creating new hook libraries and supported hook points can be
-    found in the
-    <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://jenkins.isc.org/job/Kea_doc/doxygen/">Kea Developer's Guide</link>.
-    </para>
-
-    <para>
-      The CA processes received commands according to the following algorithm:
-      <itemizedlist>
-        <listitem>
-          <simpara>
-            Pass command into any installed hooks (regardless of service value(s)).
-            If the command is handled by a hook, return the response.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            If the service specifies one more or services, forward the
-            command to the specified services and return the accumulated responses.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            If the service is not specified or is an empty list, handle
-            the command if the CA supports it.
-          </simpara>
-        </listitem>
-
-      </itemizedlist>
-    </para>
-  </section>
-
-  <section xml:id="agent-configuration">
-    <title>Configuration</title>
-    <para>The following example demonstrates the basic CA configuration.</para>
-    <para>
-<screen>
-{
-    "Control-agent": {
-        "http-host": "10.20.30.40",
-        "http-port": 8080,
-
-        "control-sockets": {
-            "dhcp4": {
-                "comment": "main server",
-                "socket-type": "unix",
-                "socket-name": "/path/to/the/unix/socket-v4"
-            },
-            "dhcp6": {
-                "socket-type": "unix",
-                "socket-name": "/path/to/the/unix/socket-v6",
-                "user-context": { "version": 3 }
-            },
-            "d2": {
-                "socket-type": "unix",
-                "socket-name": "/path/to/the/unix/socket-d2"
-            },
-        },
-
-        "hooks-libraries": [
-        {
-            "library": "/opt/local/control-agent-commands.so",
-            "parameters": {
-                "param1": "foo"
-            }
-        } ],
-
-        "loggers": [ {
-            "name": "kea-ctrl-agent",
-            "severity": "INFO"
-        } ]
-    }
-}</screen>
-    </para>
-
-    <para>
-      The <command>http-host</command> and <command>http-port</command> parameters
-      specify an IP address and port to which HTTP service will be bound.
-      In the example configuration provided above, the RESTful
-      service will be available under the URL of
-      <command>http://10.20.30.40:8080/</command>. If these parameters
-      are not specified, the default URL is http://127.0.0.1:8000/
-    </para>
-
-    <para>
-      As mentioned in <xref linkend="agent-overview"/>, the
-      CA can forward received commands to the Kea servers for
-      processing. For example, <command>config-get</command> is sent to
-      retrieve the configuration of one of the Kea services. When the CA receives
-      this command, including a <command>service</command> parameter
-      indicating that the client desires to retrieve the configuration of
-      the DHCPv4 server, the CA forwards this command to that server
-      and passes the received response back to the client. More about
-      the <command>service</command> parameter and the general structure of
-      commands can be found in <xref linkend="ctrl-channel"/>.
-    </para>
-
-    <para>
-      The CA uses UNIX domain sockets to forward control commands and receive
-      responses from other Kea services. The <command>dhcp4</command>,
-      <command>dhcp6</command>, and <command>d2</command> maps
-      specify the files to which UNIX domain sockets are bound. In
-      the configuration above, the CA will connect to the DHCPv4 server
-      via <filename>/path/to/the/unix/socket-v4</filename> to forward the
-      commands to it. Obviously, the DHCPv4 server must be configured to
-      listen to connections via this same socket. In other words, the command
-      socket configuration for the DHCPv4 server and the CA (for this server)
-      must match. Consult <xref linkend="dhcp4-ctrl-channel"/>, 
-      <xref linkend="dhcp6-ctrl-channel"/> and
-      <xref linkend="d2-ctrl-channel"/> to learn how the socket
-      configuration is specified for the DHCPv4, DHCPv6 and D2 services.
-    </para>
-
-    <warning>
-      <simpara>
-        "dhcp4-server", "dhcp6-server" and "d2-server" were renamed
-        to "dhcp4", "dhcp6" and "d2" respectively in Kea 1.2.
-        If you are migrating from Kea 1.2, you must modify your CA configuration
-        to use this new naming convention.
-      </simpara>
-    </warning>
-
-    <para>
-      User contexts can store arbitrary data as long as they are in valid JSON
-      syntax and their top-level element is a map (i.e. the data must be
-      enclosed in curly brackets). Some hook libraries may expect specific
-      formatting; please consult the relevant hook library
-      documentation for details.
-    </para>
-
-    <para>
-      User contexts can be specified on either global scope, control
-      socket, or loggers. One other useful feature is the ability to
-      store comments or descriptions; the parser translates a
-      "comment" entry into a user context with the entry, which allows
-      a comment to be attached within the configuration itself.
-    </para>
-
-    <para>
-      Hooks libraries can be loaded by the Control Agent in the same way as they are loaded by the
-      DHCPv4 and DHCPv6 servers. The CA currently supports one hook point -
-      'control_command_receive' - which makes it possible to delegate
-      processing of some commands to the hooks library. The
-      <command>hooks-libraries</command> list contains the list of hooks
-      libraries that should be loaded by the CA, along with their configuration
-      information specified with <command>parameters</command>.
-    </para>
-
-    <para>
-      Please consult <xref linkend="logging"/> for the details how to
-      configure logging. The CA's root logger's name is
-      <command>kea-ctrl-agent</command>, as given in the example above.
-    </para>
-  </section>
-
-  <section xml:id="agent-secure-connection">
-    <title>Secure Connections</title>
-    <para>
-      The Control Agent does not natively support secure HTTP connections like
-      SSL or TLS. In order to setup a secure connection, please use one
-      of the available third-party HTTP servers and configure it to run
-      as a reverse proxy to the Control Agent. Kea has been tested with
-      two major HTTP server implentations working as a reverse proxy:
-      Apache2 and nginx. Example configurations, including extensive
-      comments, are provided in the <filename>doc/examples/https/</filename>
-      directory.
-    </para>
-
-    <para>
-      The reverse proxy forwards HTTP requests received over a secure
-      connection to the Control Agent using unsecured HTTP. Typically,
-      the reverse proxy and the Control Agent are running on the same machine,
-      but it is possible to configure them to run on separate machines as
-      well. In this case, security depends on the protection of the
-      communications between the reverse proxy and the Control Agent.
-    </para>
-
-    <para>Apart from providing the encryption layer for the control channel,
-    a reverse proxy server is also often used for authentication of the
-    controlling clients. In this case, the client must present a valid
-    certificate when it connects via reverse proxy. The proxy server
-    authenticates the client by checking whether the presented certificate is
-    signed by the certificate authority used by the server.</para>
-
-    <para>To illustrate this, the following is a sample configuration for the
-    nginx server running as a reverse proxy to the Kea Control Agent.
-    The server enables authentication of the clients using
-    certificates.</para>
-
-<screen>
-#   The server certificate and key can be generated as follows:
-#
-#   openssl genrsa -des3 -out kea-proxy.key 4096
-#   openssl req -new -x509 -days 365 -key kea-proxy.key -out kea-proxy.crt
-#
-#   The CA certificate and key can be generated as follows:
-#
-#   openssl genrsa -des3 -out ca.key 4096
-#   openssl req -new -x509 -days 365 -key ca.key -out ca.crt
-#
-#
-#   The client certificate needs to be generated and signed:
-#
-#   openssl genrsa -des3 -out kea-client.key 4096
-#   openssl req -new -key kea-client.key -out kea-client.csr
-#   openssl x509 -req -days 365 -in kea-client.csr -CA ca.crt \
-#           -CAkey ca.key -set_serial 01 -out kea-client.crt
-#
-#   Note that the 'common name' value used when generating the client
-#   and the server certificates must differ from the value used
-#   for the CA certificate.
-#
-#   The client certificate must be deployed on the client system.
-#   In order to test the proxy configuration with 'curl' run
-#   command similar to the following:
-#
-#   curl -k --key kea-client.key --cert kea-client.crt -X POST \
-#        -H Content-Type:application/json -d '{ "command": "list-commands" }' \
-#         https://kea.example.org/kea
-#
-#
-#
-#   nginx configuration starts here.
-
-events {
-}
-
-http {
-        #   HTTPS server
-    server {
-        #     Use default HTTPS port.
-        listen 443 ssl;
-        #     Set server name.
-        server_name kea.example.org;
-
-        #   Server certificate and key.
-        ssl_certificate /path/to/kea-proxy.crt;
-        ssl_certificate_key /path/to/kea-proxy.key;
-
-        #   Certificate Authority. Client certificate must be signed by the CA.
-        ssl_client_certificate /path/to/ca.crt;
-
-        # Enable verification of the client certificate.
-        ssl_verify_client on;
-
-        # For URLs such as https://kea.example.org/kea, forward the
-        # requests to http://127.0.0.1:8080.
-        location /kea {
-            proxy_pass http://127.0.0.1:8080;
-        }
-    }
-}
-</screen>
-
-  <note>
-    <simpara>Note that the configuration snippet provided above is for testing
-    purposes only. It should be modified according to the security policies and best practices of your organization.</simpara>
-  </note>
-
-    <para>When you use an HTTP client without TLS support as <command>
-    kea-shell</command>, you can use an HTTP/HTTPS translator such as stunnel
-    in client mode. A sample configuration is provided in the
-    <filename>doc/examples/https/shell/</filename> directory.</para>
-
-  </section>
-
-  <section xml:id="agent-launch">
-    <title>Starting the Control Agent</title>
-    <para>
-      The CA is started by running its binary and specifying the configuration file
-      it should use. For example:
-<screen>
-$ ./kea-ctrl-agent -c /usr/local/etc/kea/kea-ctrl-agent.conf
-</screen>
-      It can be started by keactrl as well (see <xref linkend="keactrl"/>).
-    </para>
-  </section>
-
-  <section xml:id="agent-clients">
-    <title>Connecting to the Control Agent</title>
-    <para>For an example of a tool that can take advantage of the
-    RESTful API, see <xref linkend="kea-shell"/>.</para>
-  </section>
-</chapter>
diff --git a/doc/guide/api.xml b/doc/guide/api.xml
deleted file mode 100644 (file)
index 9df1c16..0000000
+++ /dev/null
@@ -1,6318 +0,0 @@
-<!--
- - Copyright (C) 2018-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/.
- -->
-
-<!-- autogenerated using cmd_docgen. Do not edit by hand! -->
-<appendix xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="api">
-  <title>API Reference</title>
-  <para>Kea currently supports 131 commands:
-<command><link linkend="ref-build-report">build-report</link></command>
-, <command><link linkend="ref-cache-clear">cache-clear</link></command>
-, <command><link linkend="ref-cache-get">cache-get</link></command>
-, <command><link linkend="ref-cache-get-by-id">cache-get-by-id</link></command>
-, <command><link linkend="ref-cache-insert">cache-insert</link></command>
-, <command><link linkend="ref-cache-load">cache-load</link></command>
-, <command><link linkend="ref-cache-remove">cache-remove</link></command>
-, <command><link linkend="ref-cache-size">cache-size</link></command>
-, <command><link linkend="ref-cache-write">cache-write</link></command>
-, <command><link linkend="ref-class-add">class-add</link></command>
-, <command><link linkend="ref-class-del">class-del</link></command>
-, <command><link linkend="ref-class-get">class-get</link></command>
-, <command><link linkend="ref-class-list">class-list</link></command>
-, <command><link linkend="ref-class-update">class-update</link></command>
-, <command><link linkend="ref-config-get">config-get</link></command>
-, <command><link linkend="ref-config-reload">config-reload</link></command>
-, <command><link linkend="ref-config-set">config-set</link></command>
-, <command><link linkend="ref-config-test">config-test</link></command>
-, <command><link linkend="ref-config-write">config-write</link></command>
-, <command><link linkend="ref-dhcp-disable">dhcp-disable</link></command>
-, <command><link linkend="ref-dhcp-enable">dhcp-enable</link></command>
-, <command><link linkend="ref-ha-continue">ha-continue</link></command>
-, <command><link linkend="ref-ha-heartbeat">ha-heartbeat</link></command>
-, <command><link linkend="ref-ha-scopes">ha-scopes</link></command>
-, <command><link linkend="ref-ha-sync">ha-sync</link></command>
-, <command><link linkend="ref-lease4-add">lease4-add</link></command>
-, <command><link linkend="ref-lease4-del">lease4-del</link></command>
-, <command><link linkend="ref-lease4-get">lease4-get</link></command>
-, <command><link linkend="ref-lease4-get-all">lease4-get-all</link></command>
-, <command><link linkend="ref-lease4-update">lease4-update</link></command>
-, <command><link linkend="ref-lease4-wipe">lease4-wipe</link></command>
-, <command><link linkend="ref-lease6-add">lease6-add</link></command>
-, <command><link linkend="ref-lease6-bulk-apply">lease6-bulk-apply</link></command>
-, <command><link linkend="ref-lease6-del">lease6-del</link></command>
-, <command><link linkend="ref-lease6-get">lease6-get</link></command>
-, <command><link linkend="ref-lease6-get-all">lease6-get-all</link></command>
-, <command><link linkend="ref-lease6-update">lease6-update</link></command>
-, <command><link linkend="ref-lease6-wipe">lease6-wipe</link></command>
-, <command><link linkend="ref-leases-reclaim">leases-reclaim</link></command>
-, <command><link linkend="ref-libreload">libreload</link></command>
-, <command><link linkend="ref-list-commands">list-commands</link></command>
-, <command><link linkend="ref-network4-add">network4-add</link></command>
-, <command><link linkend="ref-network4-del">network4-del</link></command>
-, <command><link linkend="ref-network4-get">network4-get</link></command>
-, <command><link linkend="ref-network4-list">network4-list</link></command>
-, <command><link linkend="ref-network4-subnet-add">network4-subnet-add</link></command>
-, <command><link linkend="ref-network4-subnet-del">network4-subnet-del</link></command>
-, <command><link linkend="ref-network6-add">network6-add</link></command>
-, <command><link linkend="ref-network6-del">network6-del</link></command>
-, <command><link linkend="ref-network6-get">network6-get</link></command>
-, <command><link linkend="ref-network6-list">network6-list</link></command>
-, <command><link linkend="ref-network6-subnet-add">network6-subnet-add</link></command>
-, <command><link linkend="ref-network6-subnet-del">network6-subnet-del</link></command>
-, <command><link linkend="ref-remote-global-parameter4-del">remote-global-parameter4-del</link></command>
-, <command><link linkend="ref-remote-global-parameter4-get">remote-global-parameter4-get</link></command>
-, <command><link linkend="ref-remote-global-parameter4-get-all">remote-global-parameter4-get-all</link></command>
-, <command><link linkend="ref-remote-global-parameter4-set">remote-global-parameter4-set</link></command>
-, <command><link linkend="ref-remote-global-parameter6-del">remote-global-parameter6-del</link></command>
-, <command><link linkend="ref-remote-global-parameter6-get">remote-global-parameter6-get</link></command>
-, <command><link linkend="ref-remote-global-parameter6-get-all">remote-global-parameter6-get-all</link></command>
-, <command><link linkend="ref-remote-global-parameter6-set">remote-global-parameter6-set</link></command>
-, <command><link linkend="ref-remote-network4-del">remote-network4-del</link></command>
-, <command><link linkend="ref-remote-network4-get">remote-network4-get</link></command>
-, <command><link linkend="ref-remote-network4-list">remote-network4-list</link></command>
-, <command><link linkend="ref-remote-network4-set">remote-network4-set</link></command>
-, <command><link linkend="ref-remote-network6-del">remote-network6-del</link></command>
-, <command><link linkend="ref-remote-network6-get">remote-network6-get</link></command>
-, <command><link linkend="ref-remote-network6-list">remote-network6-list</link></command>
-, <command><link linkend="ref-remote-network6-set">remote-network6-set</link></command>
-, <command><link linkend="ref-remote-option-def4-del">remote-option-def4-del</link></command>
-, <command><link linkend="ref-remote-option-def4-get">remote-option-def4-get</link></command>
-, <command><link linkend="ref-remote-option-def4-get-all">remote-option-def4-get-all</link></command>
-, <command><link linkend="ref-remote-option-def4-set">remote-option-def4-set</link></command>
-, <command><link linkend="ref-remote-option-def6-del">remote-option-def6-del</link></command>
-, <command><link linkend="ref-remote-option-def6-get">remote-option-def6-get</link></command>
-, <command><link linkend="ref-remote-option-def6-get-all">remote-option-def6-get-all</link></command>
-, <command><link linkend="ref-remote-option-def6-set">remote-option-def6-set</link></command>
-, <command><link linkend="ref-remote-option4-global-del">remote-option4-global-del</link></command>
-, <command><link linkend="ref-remote-option4-global-get">remote-option4-global-get</link></command>
-, <command><link linkend="ref-remote-option4-global-get-all">remote-option4-global-get-all</link></command>
-, <command><link linkend="ref-remote-option4-global-set">remote-option4-global-set</link></command>
-, <command><link linkend="ref-remote-option6-global-del">remote-option6-global-del</link></command>
-, <command><link linkend="ref-remote-option6-global-get">remote-option6-global-get</link></command>
-, <command><link linkend="ref-remote-option6-global-get-all">remote-option6-global-get-all</link></command>
-, <command><link linkend="ref-remote-option6-global-set">remote-option6-global-set</link></command>
-, <command><link linkend="ref-remote-server4-del">remote-server4-del</link></command>
-, <command><link linkend="ref-remote-server4-get">remote-server4-get</link></command>
-, <command><link linkend="ref-remote-server4-get-all">remote-server4-get-all</link></command>
-, <command><link linkend="ref-remote-server4-set">remote-server4-set</link></command>
-, <command><link linkend="ref-remote-server6-del">remote-server6-del</link></command>
-, <command><link linkend="ref-remote-server6-get">remote-server6-get</link></command>
-, <command><link linkend="ref-remote-server6-get-all">remote-server6-get-all</link></command>
-, <command><link linkend="ref-remote-server6-set">remote-server6-set</link></command>
-, <command><link linkend="ref-remote-subnet4-del-by-id">remote-subnet4-del-by-id</link></command>
-, <command><link linkend="ref-remote-subnet4-del-by-prefix">remote-subnet4-del-by-prefix</link></command>
-, <command><link linkend="ref-remote-subnet4-get-by-id">remote-subnet4-get-by-id</link></command>
-, <command><link linkend="ref-remote-subnet4-get-by-prefix">remote-subnet4-get-by-prefix</link></command>
-, <command><link linkend="ref-remote-subnet4-list">remote-subnet4-list</link></command>
-, <command><link linkend="ref-remote-subnet4-set">remote-subnet4-set</link></command>
-, <command><link linkend="ref-remote-subnet6-del-by-id">remote-subnet6-del-by-id</link></command>
-, <command><link linkend="ref-remote-subnet6-del-by-prefix">remote-subnet6-del-by-prefix</link></command>
-, <command><link linkend="ref-remote-subnet6-get-by-id">remote-subnet6-get-by-id</link></command>
-, <command><link linkend="ref-remote-subnet6-get-by-prefix">remote-subnet6-get-by-prefix</link></command>
-, <command><link linkend="ref-remote-subnet6-list">remote-subnet6-list</link></command>
-, <command><link linkend="ref-remote-subnet6-set">remote-subnet6-set</link></command>
-, <command><link linkend="ref-reservation-add">reservation-add</link></command>
-, <command><link linkend="ref-reservation-del">reservation-del</link></command>
-, <command><link linkend="ref-reservation-get">reservation-get</link></command>
-, <command><link linkend="ref-reservation-get-all">reservation-get-all</link></command>
-, <command><link linkend="ref-reservation-get-page">reservation-get-page</link></command>
-, <command><link linkend="ref-server-tag-get">server-tag-get</link></command>
-, <command><link linkend="ref-shutdown">shutdown</link></command>
-, <command><link linkend="ref-stat-lease4-get">stat-lease4-get</link></command>
-, <command><link linkend="ref-stat-lease6-get">stat-lease6-get</link></command>
-, <command><link linkend="ref-statistic-get">statistic-get</link></command>
-, <command><link linkend="ref-statistic-get-all">statistic-get-all</link></command>
-, <command><link linkend="ref-statistic-remove">statistic-remove</link></command>
-, <command><link linkend="ref-statistic-remove-all">statistic-remove-all</link></command>
-, <command><link linkend="ref-statistic-reset">statistic-reset</link></command>
-, <command><link linkend="ref-statistic-reset-all">statistic-reset-all</link></command>
-, <command><link linkend="ref-subnet4-add">subnet4-add</link></command>
-, <command><link linkend="ref-subnet4-del">subnet4-del</link></command>
-, <command><link linkend="ref-subnet4-get">subnet4-get</link></command>
-, <command><link linkend="ref-subnet4-list">subnet4-list</link></command>
-, <command><link linkend="ref-subnet4-update">subnet4-update</link></command>
-, <command><link linkend="ref-subnet6-add">subnet6-add</link></command>
-, <command><link linkend="ref-subnet6-del">subnet6-del</link></command>
-, <command><link linkend="ref-subnet6-get">subnet6-get</link></command>
-, <command><link linkend="ref-subnet6-list">subnet6-list</link></command>
-, <command><link linkend="ref-subnet6-update">subnet6-update</link></command>
-, <command><link linkend="ref-version-get">version-get</link></command>
-.</para>
-<para xml:id="commands-kea-ctrl-agent">Commands supported by kea-ctrl-agent daemon: <command><link linkend="ref-build-report">build-report</link></command>
-, <command><link linkend="ref-config-get">config-get</link></command>
-, <command><link linkend="ref-config-reload">config-reload</link></command>
-, <command><link linkend="ref-config-set">config-set</link></command>
-, <command><link linkend="ref-config-test">config-test</link></command>
-, <command><link linkend="ref-config-write">config-write</link></command>
-, <command><link linkend="ref-list-commands">list-commands</link></command>
-, <command><link linkend="ref-shutdown">shutdown</link></command>
-, <command><link linkend="ref-version-get">version-get</link></command>
-.</para>
-<para xml:id="commands-kea-dhcp-ddns">Commands supported by kea-dhcp-ddns daemon: <command><link linkend="ref-build-report">build-report</link></command>
-, <command><link linkend="ref-config-get">config-get</link></command>
-, <command><link linkend="ref-config-reload">config-reload</link></command>
-, <command><link linkend="ref-config-set">config-set</link></command>
-, <command><link linkend="ref-config-test">config-test</link></command>
-, <command><link linkend="ref-config-write">config-write</link></command>
-, <command><link linkend="ref-list-commands">list-commands</link></command>
-, <command><link linkend="ref-shutdown">shutdown</link></command>
-, <command><link linkend="ref-version-get">version-get</link></command>
-.</para>
-<para xml:id="commands-kea-dhcp4">Commands supported by kea-dhcp4 daemon: <command><link linkend="ref-build-report">build-report</link></command>
-, <command><link linkend="ref-cache-clear">cache-clear</link></command>
-, <command><link linkend="ref-cache-get">cache-get</link></command>
-, <command><link linkend="ref-cache-get-by-id">cache-get-by-id</link></command>
-, <command><link linkend="ref-cache-insert">cache-insert</link></command>
-, <command><link linkend="ref-cache-load">cache-load</link></command>
-, <command><link linkend="ref-cache-remove">cache-remove</link></command>
-, <command><link linkend="ref-cache-size">cache-size</link></command>
-, <command><link linkend="ref-cache-write">cache-write</link></command>
-, <command><link linkend="ref-class-add">class-add</link></command>
-, <command><link linkend="ref-class-del">class-del</link></command>
-, <command><link linkend="ref-class-get">class-get</link></command>
-, <command><link linkend="ref-class-list">class-list</link></command>
-, <command><link linkend="ref-class-update">class-update</link></command>
-, <command><link linkend="ref-config-get">config-get</link></command>
-, <command><link linkend="ref-config-reload">config-reload</link></command>
-, <command><link linkend="ref-config-set">config-set</link></command>
-, <command><link linkend="ref-config-test">config-test</link></command>
-, <command><link linkend="ref-config-write">config-write</link></command>
-, <command><link linkend="ref-dhcp-disable">dhcp-disable</link></command>
-, <command><link linkend="ref-dhcp-enable">dhcp-enable</link></command>
-, <command><link linkend="ref-ha-continue">ha-continue</link></command>
-, <command><link linkend="ref-ha-heartbeat">ha-heartbeat</link></command>
-, <command><link linkend="ref-ha-scopes">ha-scopes</link></command>
-, <command><link linkend="ref-ha-sync">ha-sync</link></command>
-, <command><link linkend="ref-lease4-add">lease4-add</link></command>
-, <command><link linkend="ref-lease4-del">lease4-del</link></command>
-, <command><link linkend="ref-lease4-get">lease4-get</link></command>
-, <command><link linkend="ref-lease4-get-all">lease4-get-all</link></command>
-, <command><link linkend="ref-lease4-update">lease4-update</link></command>
-, <command><link linkend="ref-lease4-wipe">lease4-wipe</link></command>
-, <command><link linkend="ref-leases-reclaim">leases-reclaim</link></command>
-, <command><link linkend="ref-libreload">libreload</link></command>
-, <command><link linkend="ref-list-commands">list-commands</link></command>
-, <command><link linkend="ref-network4-add">network4-add</link></command>
-, <command><link linkend="ref-network4-del">network4-del</link></command>
-, <command><link linkend="ref-network4-get">network4-get</link></command>
-, <command><link linkend="ref-network4-list">network4-list</link></command>
-, <command><link linkend="ref-network4-subnet-add">network4-subnet-add</link></command>
-, <command><link linkend="ref-network4-subnet-del">network4-subnet-del</link></command>
-, <command><link linkend="ref-remote-global-parameter4-del">remote-global-parameter4-del</link></command>
-, <command><link linkend="ref-remote-global-parameter4-get">remote-global-parameter4-get</link></command>
-, <command><link linkend="ref-remote-global-parameter4-get-all">remote-global-parameter4-get-all</link></command>
-, <command><link linkend="ref-remote-global-parameter4-set">remote-global-parameter4-set</link></command>
-, <command><link linkend="ref-remote-network4-del">remote-network4-del</link></command>
-, <command><link linkend="ref-remote-network4-get">remote-network4-get</link></command>
-, <command><link linkend="ref-remote-network4-list">remote-network4-list</link></command>
-, <command><link linkend="ref-remote-network4-set">remote-network4-set</link></command>
-, <command><link linkend="ref-remote-option-def4-del">remote-option-def4-del</link></command>
-, <command><link linkend="ref-remote-option-def4-get">remote-option-def4-get</link></command>
-, <command><link linkend="ref-remote-option-def4-get-all">remote-option-def4-get-all</link></command>
-, <command><link linkend="ref-remote-option-def4-set">remote-option-def4-set</link></command>
-, <command><link linkend="ref-remote-option4-global-del">remote-option4-global-del</link></command>
-, <command><link linkend="ref-remote-option4-global-get">remote-option4-global-get</link></command>
-, <command><link linkend="ref-remote-option4-global-get-all">remote-option4-global-get-all</link></command>
-, <command><link linkend="ref-remote-option4-global-set">remote-option4-global-set</link></command>
-, <command><link linkend="ref-remote-server4-del">remote-server4-del</link></command>
-, <command><link linkend="ref-remote-server4-get">remote-server4-get</link></command>
-, <command><link linkend="ref-remote-server4-get-all">remote-server4-get-all</link></command>
-, <command><link linkend="ref-remote-server4-set">remote-server4-set</link></command>
-, <command><link linkend="ref-remote-subnet4-del-by-id">remote-subnet4-del-by-id</link></command>
-, <command><link linkend="ref-remote-subnet4-del-by-prefix">remote-subnet4-del-by-prefix</link></command>
-, <command><link linkend="ref-remote-subnet4-get-by-id">remote-subnet4-get-by-id</link></command>
-, <command><link linkend="ref-remote-subnet4-get-by-prefix">remote-subnet4-get-by-prefix</link></command>
-, <command><link linkend="ref-remote-subnet4-list">remote-subnet4-list</link></command>
-, <command><link linkend="ref-remote-subnet4-set">remote-subnet4-set</link></command>
-, <command><link linkend="ref-reservation-add">reservation-add</link></command>
-, <command><link linkend="ref-reservation-del">reservation-del</link></command>
-, <command><link linkend="ref-reservation-get">reservation-get</link></command>
-, <command><link linkend="ref-reservation-get-all">reservation-get-all</link></command>
-, <command><link linkend="ref-reservation-get-page">reservation-get-page</link></command>
-, <command><link linkend="ref-server-tag-get">server-tag-get</link></command>
-, <command><link linkend="ref-shutdown">shutdown</link></command>
-, <command><link linkend="ref-stat-lease4-get">stat-lease4-get</link></command>
-, <command><link linkend="ref-statistic-get">statistic-get</link></command>
-, <command><link linkend="ref-statistic-get-all">statistic-get-all</link></command>
-, <command><link linkend="ref-statistic-remove">statistic-remove</link></command>
-, <command><link linkend="ref-statistic-remove-all">statistic-remove-all</link></command>
-, <command><link linkend="ref-statistic-reset">statistic-reset</link></command>
-, <command><link linkend="ref-statistic-reset-all">statistic-reset-all</link></command>
-, <command><link linkend="ref-subnet4-add">subnet4-add</link></command>
-, <command><link linkend="ref-subnet4-del">subnet4-del</link></command>
-, <command><link linkend="ref-subnet4-get">subnet4-get</link></command>
-, <command><link linkend="ref-subnet4-list">subnet4-list</link></command>
-, <command><link linkend="ref-subnet4-update">subnet4-update</link></command>
-, <command><link linkend="ref-version-get">version-get</link></command>
-.</para>
-<para xml:id="commands-kea-dhcp6">Commands supported by kea-dhcp6 daemon: <command><link linkend="ref-build-report">build-report</link></command>
-, <command><link linkend="ref-cache-clear">cache-clear</link></command>
-, <command><link linkend="ref-cache-get">cache-get</link></command>
-, <command><link linkend="ref-cache-get-by-id">cache-get-by-id</link></command>
-, <command><link linkend="ref-cache-insert">cache-insert</link></command>
-, <command><link linkend="ref-cache-load">cache-load</link></command>
-, <command><link linkend="ref-cache-remove">cache-remove</link></command>
-, <command><link linkend="ref-cache-size">cache-size</link></command>
-, <command><link linkend="ref-cache-write">cache-write</link></command>
-, <command><link linkend="ref-class-add">class-add</link></command>
-, <command><link linkend="ref-class-del">class-del</link></command>
-, <command><link linkend="ref-class-get">class-get</link></command>
-, <command><link linkend="ref-class-list">class-list</link></command>
-, <command><link linkend="ref-class-update">class-update</link></command>
-, <command><link linkend="ref-config-get">config-get</link></command>
-, <command><link linkend="ref-config-reload">config-reload</link></command>
-, <command><link linkend="ref-config-set">config-set</link></command>
-, <command><link linkend="ref-config-test">config-test</link></command>
-, <command><link linkend="ref-config-write">config-write</link></command>
-, <command><link linkend="ref-dhcp-disable">dhcp-disable</link></command>
-, <command><link linkend="ref-dhcp-enable">dhcp-enable</link></command>
-, <command><link linkend="ref-ha-continue">ha-continue</link></command>
-, <command><link linkend="ref-ha-heartbeat">ha-heartbeat</link></command>
-, <command><link linkend="ref-ha-scopes">ha-scopes</link></command>
-, <command><link linkend="ref-ha-sync">ha-sync</link></command>
-, <command><link linkend="ref-lease6-add">lease6-add</link></command>
-, <command><link linkend="ref-lease6-bulk-apply">lease6-bulk-apply</link></command>
-, <command><link linkend="ref-lease6-del">lease6-del</link></command>
-, <command><link linkend="ref-lease6-get">lease6-get</link></command>
-, <command><link linkend="ref-lease6-get-all">lease6-get-all</link></command>
-, <command><link linkend="ref-lease6-update">lease6-update</link></command>
-, <command><link linkend="ref-lease6-wipe">lease6-wipe</link></command>
-, <command><link linkend="ref-leases-reclaim">leases-reclaim</link></command>
-, <command><link linkend="ref-libreload">libreload</link></command>
-, <command><link linkend="ref-list-commands">list-commands</link></command>
-, <command><link linkend="ref-network6-add">network6-add</link></command>
-, <command><link linkend="ref-network6-del">network6-del</link></command>
-, <command><link linkend="ref-network6-get">network6-get</link></command>
-, <command><link linkend="ref-network6-list">network6-list</link></command>
-, <command><link linkend="ref-network6-subnet-add">network6-subnet-add</link></command>
-, <command><link linkend="ref-network6-subnet-del">network6-subnet-del</link></command>
-, <command><link linkend="ref-remote-global-parameter6-del">remote-global-parameter6-del</link></command>
-, <command><link linkend="ref-remote-global-parameter6-get">remote-global-parameter6-get</link></command>
-, <command><link linkend="ref-remote-global-parameter6-get-all">remote-global-parameter6-get-all</link></command>
-, <command><link linkend="ref-remote-global-parameter6-set">remote-global-parameter6-set</link></command>
-, <command><link linkend="ref-remote-network6-del">remote-network6-del</link></command>
-, <command><link linkend="ref-remote-network6-get">remote-network6-get</link></command>
-, <command><link linkend="ref-remote-network6-list">remote-network6-list</link></command>
-, <command><link linkend="ref-remote-network6-set">remote-network6-set</link></command>
-, <command><link linkend="ref-remote-option-def6-del">remote-option-def6-del</link></command>
-, <command><link linkend="ref-remote-option-def6-get">remote-option-def6-get</link></command>
-, <command><link linkend="ref-remote-option-def6-get-all">remote-option-def6-get-all</link></command>
-, <command><link linkend="ref-remote-option-def6-set">remote-option-def6-set</link></command>
-, <command><link linkend="ref-remote-option6-global-del">remote-option6-global-del</link></command>
-, <command><link linkend="ref-remote-option6-global-get">remote-option6-global-get</link></command>
-, <command><link linkend="ref-remote-option6-global-get-all">remote-option6-global-get-all</link></command>
-, <command><link linkend="ref-remote-option6-global-set">remote-option6-global-set</link></command>
-, <command><link linkend="ref-remote-server6-del">remote-server6-del</link></command>
-, <command><link linkend="ref-remote-server6-get">remote-server6-get</link></command>
-, <command><link linkend="ref-remote-server6-get-all">remote-server6-get-all</link></command>
-, <command><link linkend="ref-remote-server6-set">remote-server6-set</link></command>
-, <command><link linkend="ref-remote-subnet6-del-by-id">remote-subnet6-del-by-id</link></command>
-, <command><link linkend="ref-remote-subnet6-del-by-prefix">remote-subnet6-del-by-prefix</link></command>
-, <command><link linkend="ref-remote-subnet6-get-by-id">remote-subnet6-get-by-id</link></command>
-, <command><link linkend="ref-remote-subnet6-get-by-prefix">remote-subnet6-get-by-prefix</link></command>
-, <command><link linkend="ref-remote-subnet6-list">remote-subnet6-list</link></command>
-, <command><link linkend="ref-remote-subnet6-set">remote-subnet6-set</link></command>
-, <command><link linkend="ref-reservation-add">reservation-add</link></command>
-, <command><link linkend="ref-reservation-del">reservation-del</link></command>
-, <command><link linkend="ref-reservation-get">reservation-get</link></command>
-, <command><link linkend="ref-reservation-get-all">reservation-get-all</link></command>
-, <command><link linkend="ref-reservation-get-page">reservation-get-page</link></command>
-, <command><link linkend="ref-server-tag-get">server-tag-get</link></command>
-, <command><link linkend="ref-shutdown">shutdown</link></command>
-, <command><link linkend="ref-stat-lease6-get">stat-lease6-get</link></command>
-, <command><link linkend="ref-statistic-get">statistic-get</link></command>
-, <command><link linkend="ref-statistic-get-all">statistic-get-all</link></command>
-, <command><link linkend="ref-statistic-remove">statistic-remove</link></command>
-, <command><link linkend="ref-statistic-remove-all">statistic-remove-all</link></command>
-, <command><link linkend="ref-statistic-reset">statistic-reset</link></command>
-, <command><link linkend="ref-statistic-reset-all">statistic-reset-all</link></command>
-, <command><link linkend="ref-subnet6-add">subnet6-add</link></command>
-, <command><link linkend="ref-subnet6-del">subnet6-del</link></command>
-, <command><link linkend="ref-subnet6-get">subnet6-get</link></command>
-, <command><link linkend="ref-subnet6-list">subnet6-list</link></command>
-, <command><link linkend="ref-subnet6-update">subnet6-update</link></command>
-, <command><link linkend="ref-version-get">version-get</link></command>
-.</para>
-<para xml:id="commands-cb_cmds-lib">Commands supported by cb_cmds hook library: <command><link linkend="ref-remote-global-parameter4-del">remote-global-parameter4-del</link></command>
-, <command><link linkend="ref-remote-global-parameter4-get">remote-global-parameter4-get</link></command>
-, <command><link linkend="ref-remote-global-parameter4-get-all">remote-global-parameter4-get-all</link></command>
-, <command><link linkend="ref-remote-global-parameter4-set">remote-global-parameter4-set</link></command>
-, <command><link linkend="ref-remote-global-parameter6-del">remote-global-parameter6-del</link></command>
-, <command><link linkend="ref-remote-global-parameter6-get">remote-global-parameter6-get</link></command>
-, <command><link linkend="ref-remote-global-parameter6-get-all">remote-global-parameter6-get-all</link></command>
-, <command><link linkend="ref-remote-global-parameter6-set">remote-global-parameter6-set</link></command>
-, <command><link linkend="ref-remote-network4-del">remote-network4-del</link></command>
-, <command><link linkend="ref-remote-network4-get">remote-network4-get</link></command>
-, <command><link linkend="ref-remote-network4-list">remote-network4-list</link></command>
-, <command><link linkend="ref-remote-network4-set">remote-network4-set</link></command>
-, <command><link linkend="ref-remote-network6-del">remote-network6-del</link></command>
-, <command><link linkend="ref-remote-network6-get">remote-network6-get</link></command>
-, <command><link linkend="ref-remote-network6-list">remote-network6-list</link></command>
-, <command><link linkend="ref-remote-network6-set">remote-network6-set</link></command>
-, <command><link linkend="ref-remote-option-def4-del">remote-option-def4-del</link></command>
-, <command><link linkend="ref-remote-option-def4-get">remote-option-def4-get</link></command>
-, <command><link linkend="ref-remote-option-def4-get-all">remote-option-def4-get-all</link></command>
-, <command><link linkend="ref-remote-option-def4-set">remote-option-def4-set</link></command>
-, <command><link linkend="ref-remote-option-def6-del">remote-option-def6-del</link></command>
-, <command><link linkend="ref-remote-option-def6-get">remote-option-def6-get</link></command>
-, <command><link linkend="ref-remote-option-def6-get-all">remote-option-def6-get-all</link></command>
-, <command><link linkend="ref-remote-option-def6-set">remote-option-def6-set</link></command>
-, <command><link linkend="ref-remote-option4-global-del">remote-option4-global-del</link></command>
-, <command><link linkend="ref-remote-option4-global-get">remote-option4-global-get</link></command>
-, <command><link linkend="ref-remote-option4-global-get-all">remote-option4-global-get-all</link></command>
-, <command><link linkend="ref-remote-option4-global-set">remote-option4-global-set</link></command>
-, <command><link linkend="ref-remote-option6-global-del">remote-option6-global-del</link></command>
-, <command><link linkend="ref-remote-option6-global-get">remote-option6-global-get</link></command>
-, <command><link linkend="ref-remote-option6-global-get-all">remote-option6-global-get-all</link></command>
-, <command><link linkend="ref-remote-option6-global-set">remote-option6-global-set</link></command>
-, <command><link linkend="ref-remote-server4-del">remote-server4-del</link></command>
-, <command><link linkend="ref-remote-server4-get">remote-server4-get</link></command>
-, <command><link linkend="ref-remote-server4-get-all">remote-server4-get-all</link></command>
-, <command><link linkend="ref-remote-server4-set">remote-server4-set</link></command>
-, <command><link linkend="ref-remote-server6-del">remote-server6-del</link></command>
-, <command><link linkend="ref-remote-server6-get">remote-server6-get</link></command>
-, <command><link linkend="ref-remote-server6-get-all">remote-server6-get-all</link></command>
-, <command><link linkend="ref-remote-server6-set">remote-server6-set</link></command>
-, <command><link linkend="ref-remote-subnet4-del-by-id">remote-subnet4-del-by-id</link></command>
-, <command><link linkend="ref-remote-subnet4-del-by-prefix">remote-subnet4-del-by-prefix</link></command>
-, <command><link linkend="ref-remote-subnet4-get-by-id">remote-subnet4-get-by-id</link></command>
-, <command><link linkend="ref-remote-subnet4-get-by-prefix">remote-subnet4-get-by-prefix</link></command>
-, <command><link linkend="ref-remote-subnet4-list">remote-subnet4-list</link></command>
-, <command><link linkend="ref-remote-subnet4-set">remote-subnet4-set</link></command>
-, <command><link linkend="ref-remote-subnet6-del-by-id">remote-subnet6-del-by-id</link></command>
-, <command><link linkend="ref-remote-subnet6-del-by-prefix">remote-subnet6-del-by-prefix</link></command>
-, <command><link linkend="ref-remote-subnet6-get-by-id">remote-subnet6-get-by-id</link></command>
-, <command><link linkend="ref-remote-subnet6-get-by-prefix">remote-subnet6-get-by-prefix</link></command>
-, <command><link linkend="ref-remote-subnet6-list">remote-subnet6-list</link></command>
-, <command><link linkend="ref-remote-subnet6-set">remote-subnet6-set</link></command>
-.</para>
-<para xml:id="commands-class_cmds-lib">Commands supported by class_cmds hook library: <command><link linkend="ref-class-add">class-add</link></command>
-, <command><link linkend="ref-class-del">class-del</link></command>
-, <command><link linkend="ref-class-get">class-get</link></command>
-, <command><link linkend="ref-class-list">class-list</link></command>
-, <command><link linkend="ref-class-update">class-update</link></command>
-.</para>
-<para xml:id="commands-high_availability-lib">Commands supported by high_availability hook library: <command><link linkend="ref-ha-continue">ha-continue</link></command>
-, <command><link linkend="ref-ha-heartbeat">ha-heartbeat</link></command>
-, <command><link linkend="ref-ha-scopes">ha-scopes</link></command>
-, <command><link linkend="ref-ha-sync">ha-sync</link></command>
-.</para>
-<para xml:id="commands-host_cache-lib">Commands supported by host_cache hook library: <command><link linkend="ref-cache-clear">cache-clear</link></command>
-, <command><link linkend="ref-cache-get">cache-get</link></command>
-, <command><link linkend="ref-cache-get-by-id">cache-get-by-id</link></command>
-, <command><link linkend="ref-cache-insert">cache-insert</link></command>
-, <command><link linkend="ref-cache-load">cache-load</link></command>
-, <command><link linkend="ref-cache-remove">cache-remove</link></command>
-, <command><link linkend="ref-cache-size">cache-size</link></command>
-, <command><link linkend="ref-cache-write">cache-write</link></command>
-.</para>
-<para xml:id="commands-host_cmds-lib">Commands supported by host_cmds hook library: <command><link linkend="ref-reservation-add">reservation-add</link></command>
-, <command><link linkend="ref-reservation-del">reservation-del</link></command>
-, <command><link linkend="ref-reservation-get">reservation-get</link></command>
-, <command><link linkend="ref-reservation-get-all">reservation-get-all</link></command>
-, <command><link linkend="ref-reservation-get-page">reservation-get-page</link></command>
-.</para>
-<para xml:id="commands-lease_cmds-lib">Commands supported by lease_cmds hook library: <command><link linkend="ref-lease4-add">lease4-add</link></command>
-, <command><link linkend="ref-lease4-del">lease4-del</link></command>
-, <command><link linkend="ref-lease4-get">lease4-get</link></command>
-, <command><link linkend="ref-lease4-get-all">lease4-get-all</link></command>
-, <command><link linkend="ref-lease4-update">lease4-update</link></command>
-, <command><link linkend="ref-lease4-wipe">lease4-wipe</link></command>
-, <command><link linkend="ref-lease6-add">lease6-add</link></command>
-, <command><link linkend="ref-lease6-bulk-apply">lease6-bulk-apply</link></command>
-, <command><link linkend="ref-lease6-del">lease6-del</link></command>
-, <command><link linkend="ref-lease6-get">lease6-get</link></command>
-, <command><link linkend="ref-lease6-get-all">lease6-get-all</link></command>
-, <command><link linkend="ref-lease6-update">lease6-update</link></command>
-, <command><link linkend="ref-lease6-wipe">lease6-wipe</link></command>
-.</para>
-<para xml:id="commands-stat_cmds-lib">Commands supported by stat_cmds hook library: <command><link linkend="ref-stat-lease4-get">stat-lease4-get</link></command>
-, <command><link linkend="ref-stat-lease6-get">stat-lease6-get</link></command>
-.</para>
-<para xml:id="commands-subnet_cmds-lib">Commands supported by subnet_cmds hook library: <command><link linkend="ref-network4-add">network4-add</link></command>
-, <command><link linkend="ref-network4-del">network4-del</link></command>
-, <command><link linkend="ref-network4-get">network4-get</link></command>
-, <command><link linkend="ref-network4-list">network4-list</link></command>
-, <command><link linkend="ref-network4-subnet-add">network4-subnet-add</link></command>
-, <command><link linkend="ref-network4-subnet-del">network4-subnet-del</link></command>
-, <command><link linkend="ref-network6-add">network6-add</link></command>
-, <command><link linkend="ref-network6-del">network6-del</link></command>
-, <command><link linkend="ref-network6-get">network6-get</link></command>
-, <command><link linkend="ref-network6-list">network6-list</link></command>
-, <command><link linkend="ref-network6-subnet-add">network6-subnet-add</link></command>
-, <command><link linkend="ref-network6-subnet-del">network6-subnet-del</link></command>
-, <command><link linkend="ref-subnet4-add">subnet4-add</link></command>
-, <command><link linkend="ref-subnet4-del">subnet4-del</link></command>
-, <command><link linkend="ref-subnet4-get">subnet4-get</link></command>
-, <command><link linkend="ref-subnet4-list">subnet4-list</link></command>
-, <command><link linkend="ref-subnet4-update">subnet4-update</link></command>
-, <command><link linkend="ref-subnet6-add">subnet6-add</link></command>
-, <command><link linkend="ref-subnet6-del">subnet6-del</link></command>
-, <command><link linkend="ref-subnet6-get">subnet6-get</link></command>
-, <command><link linkend="ref-subnet6-list">subnet6-list</link></command>
-, <command><link linkend="ref-subnet6-update">subnet6-update</link></command>
-.</para>
-<!-- start of build-report -->
-<section xml:id="reference-build-report">
-<title>build-report reference</title>
-<para xml:id="ref-build-report"><command>build-report</command> - Returns a list of compilation options that this particular binary was built with</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command>, <command><link linkend="commands-kea-dhcp-ddns">kea-dhcp-ddns</link></command>, <command><link linkend="commands-kea-ctrl-agent">kea-ctrl-agent</link></command></para>
-
-<para>Availability: 1.2.0 (built-in)</para>
-
-<para>Description and examples: See <xref linkend="command-build-report"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "build-report"
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": &lt;string with build details&gt;
-}</screen>
-</para>
-
-</section>
-<!-- end of build-report -->
-
-<!-- start of cache-clear -->
-<section xml:id="reference-cache-clear">
-<title>cache-clear reference</title>
-<para xml:id="ref-cache-clear"><command>cache-clear</command> - This command removes all cached host reservations.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.4.0 (<link linkend="commands-host_cache-lib">host_cache</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-cache-clear"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "cache-clear"
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of cache-clear -->
-
-<!-- start of cache-get -->
-<section xml:id="reference-cache-get">
-<title>cache-get reference</title>
-<para xml:id="ref-cache-get"><command>cache-get</command> - Returns full content of the host cache.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.4.0 (<link linkend="commands-host_cache-lib">host_cache</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-cache-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "cache-get"
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0
-    "text": "123 entries returned."
-    "arguments": &lt;list of host reservations&gt;
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of cache-get -->
-
-<!-- start of cache-get-by-id -->
-<section xml:id="reference-cache-get-by-id">
-<title>cache-get-by-id reference</title>
-<para xml:id="ref-cache-get-by-id"><command>cache-get-by-id</command> - Returns entries matching the given identifier from  the host cache.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-host_cache-lib">host_cache</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-cache-get-by-id"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "cache-get-by-id",
-    "arguments": {
-        "hw-address": "01:02:03:04:05:06"
-    }</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0
-    "text": "2 entries returned."
-    "arguments": &lt;list of host reservations&gt;
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of cache-get-by-id -->
-
-<!-- start of cache-insert -->
-<section xml:id="reference-cache-insert">
-<title>cache-insert reference</title>
-<para xml:id="ref-cache-insert"><command>cache-insert</command> - This command may be used to manually insert a host into the cache.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.4.0 (<link linkend="commands-host_cache-lib">host_cache</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-cache-insert"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "cache-insert",
-    "arguments": {
-        "hw-address": "01:02:03:04:05:06",
-        "subnet-id4": 4,
-        "subnet-id6": 0,
-        "ip-address": "192.0.2.100",
-        "hostname": "somehost.example.org",
-        "client-classes4": [ ],
-        "client-classes6": [ ],
-        "option-data4": [ ],
-        "option-data6": [ ],
-        "next-server": "192.0.0.2",
-        "server-hostname": "server-hostname.example.org",
-        "boot-file-name": "bootfile.efi",
-        "host-id": 0
-    }
-},
-{
-    "command": "cache-insert",
-    "arguments": {
-        "hw-address": "01:02:03:04:05:06",
-        "subnet-id4": 0,
-        "subnet-id6": 6,
-        "ip-addresses": [ "2001:db8::cafe:babe" ],
-        "prefixes": [ "2001:db8:dead:beef::/64" ],
-        "hostname": "",
-        "client-classes4": [ ],
-        "client-classes6": [ ],
-        "option-data4": [ ],
-        "option-data6": [ ],
-        "next-server": "0.0.0.0",
-        "server-hostname": "",
-        "boot-file-name": "",
-        "host-id": 0
-    }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of cache-insert -->
-
-<!-- start of cache-load -->
-<section xml:id="reference-cache-load">
-<title>cache-load reference</title>
-<para xml:id="ref-cache-load"><command>cache-load</command> - This command allows load the contents of a file on disk into an in-memory cache.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.4.0 (<link linkend="commands-host_cache-lib">host_cache</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-cache-load"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "cache-load",
-    "arguments": "/tmp/kea-host-cache.json"
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of cache-load -->
-
-<!-- start of cache-remove -->
-<section xml:id="reference-cache-remove">
-<title>cache-remove reference</title>
-<para xml:id="ref-cache-remove"><command>cache-remove</command> - The cache-remove command works similarly to reservation-get command.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.4.0 (<link linkend="commands-host_cache-lib">host_cache</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-cache-remove"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "cache-remove",
-    "arguments": {
-        "ip-address": "192.0.2.1",
-        "subnet-id": 123
-    }
-}
-
-Another example that removes IPv6 host identifier by DUID and specific subnet-id is:
-{
-    "command": "cache-remove",
-    "arguments": {
-        "duid": "00:01:ab:cd:f0:a1:c2:d3:e4",
-        "subnet-id": 123
-    }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of cache-remove -->
-
-<!-- start of cache-size -->
-<section xml:id="reference-cache-size">
-<title>cache-size reference</title>
-<para xml:id="ref-cache-size"><command>cache-size</command> - Returns number of entries of the host cache.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-host_cache-lib">host_cache</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-cache-size"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "cache-size"
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0
-    "text": "123 entries."
-    "arguments": { "size": 123 }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of cache-size -->
-
-<!-- start of cache-write -->
-<section xml:id="reference-cache-write">
-<title>cache-write reference</title>
-<para xml:id="ref-cache-write"><command>cache-write</command> - Instructs Kea to write its host cache content to disk.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.4.0 (<link linkend="commands-host_cache-lib">host_cache</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-cache-write"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "cache-write",
-    "arguments": "/path/to/the/file.json"
-}</screen>
-The command takes one mandatory argument that specifies a filename path of a file to be written.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of cache-write -->
-
-<!-- start of class-add -->
-<section xml:id="reference-class-add">
-<title>class-add reference</title>
-<para xml:id="ref-class-add"><command>class-add</command> - This command is used to create and add a new class to the existing
-              server configuration.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.5.0 (<link linkend="commands-class_cmds-lib">class_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-class-add"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "class-add",
-    "arguments": {
-        "client-classes": [ {
-           "name": &lt;name of the class&gt;,
-           "test": &lt;test expression to be evaluated on incoming packets&gt;,
-           "option-data": [ &lt;option values here&gt; ],
-           "option-def": [ &lt;option defintions here&gt; ],
-           "next-server": &lt;ipv4 address&gt;,
-           "server-hostname": &lt;string&gt;,
-           "boot-file-name": &lt;name of the boot file&gt;
-        } ]
-    }
-}</screen>
-The <command>next-server</command>,
-                    <command>server-hostname</command> and
-                    <command>boot-file-name</command> are DHCPv4 specific. Only
-                    one client class can be added with a single command. </para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "Class '&lt;class-name&gt;' added.",
-}</screen>
-The command will be successful (result 0), unless the
-                     class name is a duplicate or another error occurs (result 1).</para>
-
-</section>
-<!-- end of class-add -->
-
-<!-- start of class-del -->
-<section xml:id="reference-class-del">
-<title>class-del reference</title>
-<para xml:id="ref-class-del"><command>class-del</command> - This command is used to remove a client class from the server configuration.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.5.0 (<link linkend="commands-class_cmds-lib">class_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-class-del"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "class-del",
-    "arguments": {
-        "name": &lt;name of the class&gt;
-    }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "Class '&lt;class-name&gt;' deleted."
-}</screen>
-The command will return a result of 3 (empty) if the client
-                    class doesn't exist. If the client class exists, the retured
-                    result is 0 if the deletion was successful and the result is 1
-                    if the deletion is unsuccessful.</para>
-
-</section>
-<!-- end of class-del -->
-
-<!-- start of class-get -->
-<section xml:id="reference-class-get">
-<title>class-get reference</title>
-<para xml:id="ref-class-get"><command>class-get</command> - This command is used to return detailed information about an
-              existing client class.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.5.0 (<link linkend="commands-class_cmds-lib">class_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-class-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "class-get",
-    "arguments": {
-        "name": &lt;name of the class&gt;
-    }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "Class '&lt;class-name&gt;' definition returned",
-    "arguments": {
-        "client-classes": [
-            {
-                "name": &lt;name of the class&gt;,
-                "only-if-required": &lt;only if required boolean value&gt;,
-                "test": &lt;test expression to be evaluated on incoming packets&gt;,
-                "option-data": [ &lt;option values here&gt; ],
-                "option-def": [ &lt;option defintions here&gt; ],
-                "next-server": &lt;ipv4 address&gt;,
-                "server-hostname": &lt;string&gt;,
-                "boot-file-name": &lt;name of the boot file&gt;
-            }
-        ]
-    }
-}</screen>
-The returned information depends on the DHCP server type,
-                     i.e. some parameters are specific to DHCPv4 server. Also,
-                     some parameters may not be returned if they are not set for
-                     the client class. If the class with specified name doesn't
-                     exist a result of 3 (empty) is returned. If the client class
-                     is found, the result of 0 is returned. If there is an error
-                     while processing the command, the result of 1 is returned.</para>
-
-</section>
-<!-- end of class-get -->
-
-<!-- start of class-list -->
-<section xml:id="reference-class-list">
-<title>class-list reference</title>
-<para xml:id="ref-class-list"><command>class-list</command> - This command is used to retrieve a list of all client
-              classes from the server configuration.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.5.0 (<link linkend="commands-class_cmds-lib">class_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-class-list"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "class-list"
-}</screen>
-This command includes no arguments.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "&lt;number of&gt; classes found",
-    "arguments": {
-        "client-classes": [
-            {
-                "name": &lt;first class name&gt;
-            },
-            {
-                "name": &lt;second class name&gt;
-            }
-        ]
-    }
-}</screen>
-The returned list of classes merely contains their names.
-                     In order to retrieve full information about one of these
-                     classes use <xref linkend="command-class-get"/>.
-                     The returned result is 3 (empty) if no classes are found.
-                     If the command is processed successfully and the list of
-                     client classes is not empty, the result of 0 is returned.
-                     If there is an error while processing the command, the
-                     result of 1 is returned.</para>
-
-</section>
-<!-- end of class-list -->
-
-<!-- start of class-update -->
-<section xml:id="reference-class-update">
-<title>class-update reference</title>
-<para xml:id="ref-class-update"><command>class-update</command> - This command is used to update an existing client class in
-              the server configuration.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.5.0 (<link linkend="commands-class_cmds-lib">class_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-class-update"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "class-update",
-    "arguments": {
-        "client-classes": [ {
-           "name": &lt;name of the class&gt;,
-           "test": &lt;test expression to be evaluated on incoming packets&gt;,
-           "option-data": [ &lt;option values here&gt; ],
-           "option-def": [ &lt;option defintions here&gt; ],
-           "next-server": &lt;ipv4 address&gt;,
-           "server-hostname": &lt;string&gt;,
-           "boot-file-name": &lt;name of the boot file&gt;
-        } ]
-    }
-}</screen>
-The <command>next-server</command>,
-                    <command>server-hostname</command> and
-                    <command>boot-file-name</command> are DHCPv4 specific. Only
-                    one client class can be updated with a single command. </para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "Class '&lt;class-name&gt;' updated.",
-}</screen>
-The command will return the result of 3 (empty) if the client
-                    class doesn't exist. If the client class exists, the retured
-                    result is 0 if the update was successful and the result is 1
-                    if the update is unsuccessful.</para>
-
-</section>
-<!-- end of class-update -->
-
-<!-- start of config-get -->
-<section xml:id="reference-config-get">
-<title>config-get reference</title>
-<para xml:id="ref-config-get"><command>config-get</command> - Retrieves the current configuration used by the server. The configuration
-              is roughtly equal to the configuration file, but includes additional
-              changes made by other commands and due to parameters inheritance.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command>, <command><link linkend="commands-kea-dhcp-ddns">kea-dhcp-ddns</link></command>, <command><link linkend="commands-kea-ctrl-agent">kea-ctrl-agent</link></command></para>
-
-<para>Availability: 1.2.0 (built-in)</para>
-
-<para>Description and examples: See <xref linkend="command-config-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "config-get"
-}</screen>
-This command takes no parameters.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "arguments": {
-        &lt;JSON configuration here, starting with Dhcp4, Dhcp6, or Control-agent object&gt;
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of config-get -->
-
-<!-- start of config-reload -->
-<section xml:id="reference-config-reload">
-<title>config-reload reference</title>
-<para xml:id="ref-config-reload"><command>config-reload</command> - The config-reload command instructs Kea to load again the configuration file that was used previously.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command>, <command><link linkend="commands-kea-dhcp-ddns">kea-dhcp-ddns</link></command>, <command><link linkend="commands-kea-ctrl-agent">kea-ctrl-agent</link></command></para>
-
-<para>Availability: 1.2.0 (built-in)</para>
-
-<para>Description and examples: See <xref linkend="command-config-reload"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "config-reload"
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of config-reload -->
-
-<!-- start of config-set -->
-<section xml:id="reference-config-set">
-<title>config-set reference</title>
-<para xml:id="ref-config-set"><command>config-set</command> - The config-set command instructs the server to replace its current configuration with the new configuration supplied in the command's arguments.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command>, <command><link linkend="commands-kea-dhcp-ddns">kea-dhcp-ddns</link></command>, <command><link linkend="commands-kea-ctrl-agent">kea-ctrl-agent</link></command></para>
-
-<para>Availability: 1.2.0 (built-in)</para>
-
-<para>Description and examples: See <xref linkend="command-config-set"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "config-set",
-    "arguments":  {
-        "&lt;server&gt;": {
-        }
-     }
-}</screen>
-where &lt;server&gt; is the configuration element name for a given server such as "Dhcp4" or "Dhcp6"</para>
-
-<para>Response syntax:
-  <screen>    {"result": 0, "text": "Configuration successful." }
-
-    or
-
-    {"result": 1, "text": "unsupported parameter: BOGUS (&lt;string&gt;:16:26)" }</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of config-set -->
-
-<!-- start of config-test -->
-<section xml:id="reference-config-test">
-<title>config-test reference</title>
-<para xml:id="ref-config-test"><command>config-test</command> - The config-test command instructs the server to check whether the new configuration supplied in the command's arguments can be loaded.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command>, <command><link linkend="commands-kea-dhcp-ddns">kea-dhcp-ddns</link></command>, <command><link linkend="commands-kea-ctrl-agent">kea-ctrl-agent</link></command></para>
-
-<para>Availability: 1.2.0 (built-in)</para>
-
-<para>Description and examples: See <xref linkend="command-config-test"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "config-test",
-    "arguments":  {
-        "&lt;server&gt;": {
-        }
-     }
-}</screen>
-where &gt;server&lt; is the configuration element name for a given server such as "Dhcp4" or "Dhcp6"</para>
-
-<para>Response syntax:
-  <screen>{"result": 0, "text": "Configuration seems sane..." }
-
-    or
-
-    {"result": 1, "text": "unsupported parameter: BOGUS (&lt;string&gt;:16:26)" }</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of config-test -->
-
-<!-- start of config-write -->
-<section xml:id="reference-config-write">
-<title>config-write reference</title>
-<para xml:id="ref-config-write"><command>config-write</command> - The config-write command instructs the Kea server to write its
-              current configuration to a file on disk.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command>, <command><link linkend="commands-kea-dhcp-ddns">kea-dhcp-ddns</link></command>, <command><link linkend="commands-kea-ctrl-agent">kea-ctrl-agent</link></command></para>
-
-<para>Availability: 1.2.0 (built-in)</para>
-
-<para>Description and examples: See <xref linkend="command-config-write"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "config-write",
-    "arguments": {
-        "filename": "config-modified-2017-03-15.json"
-    }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of config-write -->
-
-<!-- start of dhcp-disable -->
-<section xml:id="reference-dhcp-disable">
-<title>dhcp-disable reference</title>
-<para xml:id="ref-dhcp-disable"><command>dhcp-disable</command> - The dhcp-disable command globally disables the DHCP service.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.4.0 (built-in)</para>
-
-<para>Description and examples: See <xref linkend="command-dhcp-disable"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "dhcp-disable",
-    "arguments": {
-        "max-period": 20
-    }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of dhcp-disable -->
-
-<!-- start of dhcp-enable -->
-<section xml:id="reference-dhcp-enable">
-<title>dhcp-enable reference</title>
-<para xml:id="ref-dhcp-enable"><command>dhcp-enable</command> - The dhcp-enable command globally enables the DHCP service.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.4.0 (built-in)</para>
-
-<para>Description and examples: See <xref linkend="command-dhcp-enable"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "dhcp-enable"
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of dhcp-enable -->
-
-<!-- start of ha-continue -->
-<section xml:id="reference-ha-continue">
-<title>ha-continue reference</title>
-<para xml:id="ref-ha-continue"><command>ha-continue</command> - This command is used to resume the operation of the paused HA state machine.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.4.0 (<link linkend="commands-high_availability-lib">high_availability</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-ha-continue"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "ha-continue"
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of ha-continue -->
-
-<!-- start of ha-heartbeat -->
-<section xml:id="reference-ha-heartbeat">
-<title>ha-heartbeat reference</title>
-<para xml:id="ref-ha-heartbeat"><command>ha-heartbeat</command> - This command is sent internally by Kea partner when operating
-              in High Availability (HA) mode. It will retrieve the server HA state and clock value.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.4.0 (<link linkend="commands-high_availability-lib">high_availability</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-ha-heartbeat"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "ha-heartbeat",
-    }</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-The response to this command is different from the typical command response. The response will include server state (see <xref linkend="ha-server-states"/> plus the current clock value.</para>
-
-</section>
-<!-- end of ha-heartbeat -->
-
-<!-- start of ha-scopes -->
-<section xml:id="reference-ha-scopes">
-<title>ha-scopes reference</title>
-<para xml:id="ref-ha-scopes"><command>ha-scopes</command> - This command modifies the scope that the server is responsible for serving when operating in High Availability (HA) mode.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.4.0 (<link linkend="commands-high_availability-lib">high_availability</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-ha-scopes"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "ha-scopes",
-    "service": [ &lt;service, typically "dhcp4" or "dhcp6"&gt; ],
-    "arguments": {
-        "scopes": [ "HA_server1", "HA_server2" ]
-    }</screen>
-In the example given, the arguments configure the server to handle traffic from both HA_server1 and HA_server2 scopes.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of ha-scopes -->
-
-<!-- start of ha-sync -->
-<section xml:id="reference-ha-sync">
-<title>ha-sync reference</title>
-<para xml:id="ref-ha-sync"><command>ha-sync</command> - The command is issued to instruct the server running in HA mode to 
-              synchronize its local lease database with the selected peer.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.4.0 (<link linkend="commands-high_availability-lib">high_availability</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-ha-sync"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "ha-sync",
-    "service": [ &lt;service affected: "dhcp4" or "dhcp6" ],
-    "arguments": {
-        "server-name": &lt;name of the partner server&gt;,
-        "max-period": &lt;integer, in seconds&gt;
-    }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of ha-sync -->
-
-<!-- start of lease4-add -->
-<section xml:id="reference-lease4-add">
-<title>lease4-add reference</title>
-<para xml:id="ref-lease4-add"><command>lease4-add</command> - The lease4-add command adds a new IPv4 lease administratively.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-lease_cmds-lib">lease_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-lease4-add"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "lease4-add",
-    "arguments": {
-        "ip-address": "192.0.2.202",
-        "hw-address": "1a:1b:1c:1d:1e:1f"
-    }
-}</screen>
-Note that Kea 1.4 requires an additional argument, subnet-ID, which is optional as of Kea 1.5. A number of other more detailed optional arguments are also supported.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of lease4-add -->
-
-<!-- start of lease4-del -->
-<section xml:id="reference-lease4-del">
-<title>lease4-del reference</title>
-<para xml:id="ref-lease4-del"><command>lease4-del</command> - lease4-del can be used to delete a lease from the lease database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-lease_cmds-lib">lease_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-lease4-del"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "lease4-del",
-    "arguments": {
-        "ip-address": "192.0.2.202"
-    }
-}</screen>
-Specify the lease to be deleted either by IP address, or by identifier-type and identifier value. Currently supported identifiers are "hw-address" and "client-id".</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of lease4-del -->
-
-<!-- start of lease4-get -->
-<section xml:id="reference-lease4-get">
-<title>lease4-get reference</title>
-<para xml:id="ref-lease4-get"><command>lease4-get</command> - lease4-get can be used to query the lease database and retrieve existing leases.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-lease_cmds-lib">lease_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-lease4-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "lease4-get",
-    "arguments": {
-        "ip-address": "192.0.2.1"
-    }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-  "arguments": {
-    "client-id": "42:42:42:42:42:42:42:42",
-    "cltt": 12345678,
-    "fqdn-fwd": false,
-    "fqdn-rev": true,
-    "hostname": "myhost.example.com.",
-    "hw-address": "08:08:08:08:08:08",
-    "ip-address": "192.0.2.1",
-    "state": 0,
-    "subnet-id": 44,
-    "valid-lft": 3600
-  },
-  "result": 0,
-  "text": "IPv4 lease found."
-}</screen>
-lease4-get returns a result that indicates a result of the operation and lease details, if found. It has one of the following values: 0 (success), 1 (error) or 2 (empty).</para>
-
-</section>
-<!-- end of lease4-get -->
-
-<!-- start of lease4-get-all -->
-<section xml:id="reference-lease4-get-all">
-<title>lease4-get-all reference</title>
-<para xml:id="ref-lease4-get-all"><command>lease4-get-all</command> - lease4-get-all is used to retrieve all IPv4 leases or all leases for the specified set of subnets.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.4.0 (<link linkend="commands-lease_cmds-lib">lease_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-lease4-get-all"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "lease4-get-all"
-    "arguments": "subnets"
-}</screen>
-The lease4-get-all command may result in very large responses.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of lease4-get-all -->
-
-<!-- start of lease4-update -->
-<section xml:id="reference-lease4-update">
-<title>lease4-update reference</title>
-<para xml:id="ref-lease4-update"><command>lease4-update</command> - The lease4-update command can be used to update existing leases.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-lease_cmds-lib">lease_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-lease4-update"/></para>
-
-<para>Command syntax:
-  <screen>{
-  "command": "lease4-update",
-  "arguments": {
-    "ip-address": "192.0.2.1",
-    "hostname": "newhostname.example.org",
-    "hw-address": "1a:1b:1c:1d:1e:1f",
-    "subnet-id": 44,
-    "force-create": true
-  }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of lease4-update -->
-
-<!-- start of lease4-wipe -->
-<section xml:id="reference-lease4-wipe">
-<title>lease4-wipe reference</title>
-<para xml:id="ref-lease4-wipe"><command>lease4-wipe</command> - lease4-wipe is designed to remove all leases associated with a given subnet.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-lease_cmds-lib">lease_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-lease4-wipe"/></para>
-
-<para>Command syntax:
-  <screen>{
-  "command": "lease4-wipe",
-  "arguments": {
-    "subnet-id": 44
-  }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of lease4-wipe -->
-
-<!-- start of lease6-add -->
-<section xml:id="reference-lease6-add">
-<title>lease6-add reference</title>
-<para xml:id="ref-lease6-add"><command>lease6-add</command> - The lease6-add command creates a new lease administratively.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-lease_cmds-lib">lease_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-lease6-add"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "lease6-add",
-    "arguments": {
-        "subnet-id": 66,
-        "ip-address": "2001:db8::3",
-        "duid": "1a:1b:1c:1d:1e:1f:20:21:22:23:24",
-        "iaid": 1234
-    }
-}</screen>
-lease6-add can be also used to add leases for IPv6 prefixes..</para>
-
-<para>Response syntax:
-  <screen>{ "result": 0, "text": "Lease added." }
-    { "result": 1, "text": "missing parameter 'ip-address' (&lt;string&gt;:3:19)" }</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of lease6-add -->
-
-<!-- start of lease6-bulk-apply -->
-<section xml:id="reference-lease6-bulk-apply">
-<title>lease6-bulk-apply reference</title>
-<para xml:id="ref-lease6-bulk-apply"><command>lease6-bulk-apply</command> - The lease6-bulk-apply command can be used to create, update and delete multiple IPv6 leases in a single transaction. This is used to communicate lease changes between the HA peers but may be used in all cases when it is desired to apply multiple lease updates in a single transaction.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-lease_cmds-lib">lease_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-lease6-bulk-apply"/></para>
-
-<para>Command syntax:
-  <screen>{
-        "command": "lease6-bulk-apply",
-        "arguments": {
-            "deleted-leases": [
-                {
-                    "ip-address": "2001:db8:abcd::",
-                    "type": "IA_PD",
-                    ...
-                },
-                {
-                    "ip-address": "2001:db8:abcd::234",
-                    "type": "IA_NA",
-                    ...
-                }
-            ],
-            "leases": [
-                {
-                    "subnet-id": 66,
-                    "ip-address": "2001:db8:cafe::",
-                    "type": "IA_PD",
-                    ...
-                },
-                {
-                    "subnet-id": 66,
-                    "ip-address": "2001:db8:abcd::333",
-                    "type": "IA_NA",
-                    ...
-                }
-            ]
-        }
-}</screen>
-If any of the leases is malformed, all changes are rolled back. If the leases are well formed but the operation fails for one or more leases, the these leases are listed in the response but the changes are preserved for all leases for which the operation was successful. The "deleted-leases" and "leases" are optional parameters but one of them must be specified.</para>
-
-<para>Response syntax:
-  <screen> {
-    {
-        "result": 0,
-        "text": IPv6 leases bulk apply completed.
-        "arguments": {
-            "failed-deleted-leases": [
-                {
-                    "ip-address": "2001:db8:abcd::",
-                    "type": "IA_PD",
-                    "result": &lt;control result&gt;,
-                    "error-message": &lt;error message&gt;
-                }
-            ],
-            "failed-leases": [
-                {
-                    "ip-address": "2001:db8:cafe::",
-                    "type": "IA_PD",
-                    "result" &lt;control result&gt;,
-                    "error-message": &lt;error message&gt;
-                }
-            ]
-        }
-    }
-}</screen>
-The "failed-deleted-leases" holds the list of leases which failed to delete. This includes leases which were not found in the database. The "failed-leases" includes the list of leases which failed to create or update. For each lease for which there was an error while processing the lease, inserting it into the database etc. the result is set to 1. For each lease which was not deleted because the server didn't find it in the database the result of 3 is returned.</para>
-
-</section>
-<!-- end of lease6-bulk-apply -->
-
-<!-- start of lease6-del -->
-<section xml:id="reference-lease6-del">
-<title>lease6-del reference</title>
-<para xml:id="ref-lease6-del"><command>lease6-del</command> - lease6-del can be used to delete a lease from the lease database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-lease_cmds-lib">lease_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-lease6-del"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "lease6-del",
-    "arguments": {
-        "ip-address": "192.0.2.202"
-    }
-}</screen>
-lease6-del returns a result that indicates a outcome of the operation. It has one of the following values: 0 (success), 1 (error) or 3 (empty).</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of lease6-del -->
-
-<!-- start of lease6-get -->
-<section xml:id="reference-lease6-get">
-<title>lease6-get reference</title>
-<para xml:id="ref-lease6-get"><command>lease6-get</command> - lease6-get can be used to query the lease database and retrieve existing leases.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-lease_cmds-lib">lease_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-lease6-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-  "command": "lease6-get",
-  "arguments": {
-    "ip-address": "2001:db8:1234:ab::",
-    "type": "IA_PD"
-  }
-}</screen>
-lease6-get returns a result that indicates a result of the operation and lease details, if found. It has one of the following values: 0 (success), 1 (error) or 2 (empty).</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of lease6-get -->
-
-<!-- start of lease6-get-all -->
-<section xml:id="reference-lease6-get-all">
-<title>lease6-get-all reference</title>
-<para xml:id="ref-lease6-get-all"><command>lease6-get-all</command> - lease6-get-all is used to retrieve all IPv6 leases or all leases for the specified set of subnets.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-lease_cmds-lib">lease_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-lease6-get-all"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "lease6-get-all",
-    "arguments": {
-        "subnets": [ 1, 2, 3, 4 ]
-    }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "arguments": {
-        "leases": [
-            {
-                "cltt": 12345678,
-                "duid": "42:42:42:42:42:42:42:42",
-                "fqdn-fwd": false,
-                "fqdn-rev": true,
-                "hostname": "myhost.example.com.",
-                "hw-address": "08:08:08:08:08:08",
-                "iaid": 1,
-                "ip-address": "2001:db8:2::1",
-                "preferred-lft": 500,
-                "state": 0,
-                "subnet-id": 44,
-                "type": "IA_NA",
-                "valid-lft": 3600
-            },
-            {
-                "cltt": 12345678,
-                "duid": "21:21:21:21:21:21:21:21",
-                "fqdn-fwd": false,
-                "fqdn-rev": true,
-                "hostname": "",
-                "iaid": 1,
-                "ip-address": "2001:db8:0:0:2::",
-                "preferred-lft": 500,
-                "prefix-len": 80,
-                "state": 0,
-                "subnet-id": 44,
-                "type": "IA_PD",
-                "valid-lft": 3600
-            }
-        ]
-    },
-    "result": 0,
-    "text": "2 IPv6 lease(s) found."
-}</screen>
-The lease6-get-all command may result in very large responses.</para>
-
-</section>
-<!-- end of lease6-get-all -->
-
-<!-- start of lease6-update -->
-<section xml:id="reference-lease6-update">
-<title>lease6-update reference</title>
-<para xml:id="ref-lease6-update"><command>lease6-update</command> - The lease6-update command can be used to update existing leases.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-lease_cmds-lib">lease_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-lease6-update"/></para>
-
-<para>Command syntax:
-  <screen>{
-  "command": "lease6-update",
-  "arguments": {
-    "ip-address": "2001:db8::1",
-    "duid": "88:88:88:88:88:88:88:88",
-    "iaid": 7654321,
-    "hostname": "newhostname.example.org",
-    "subnet-id": 66,
-    "force-create": false
-  }
-}
-</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of lease6-update -->
-
-<!-- start of lease6-wipe -->
-<section xml:id="reference-lease6-wipe">
-<title>lease6-wipe reference</title>
-<para xml:id="ref-lease6-wipe"><command>lease6-wipe</command> - lease6-wipe is designed to remove all leases associated with a given subnet.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-lease_cmds-lib">lease_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-lease6-wipe"/></para>
-
-<para>Command syntax:
-  <screen>{
-  "command": "lease6-wipe",
-  "arguments": {
-    "subnet-id": 66
-  }
-}</screen>
-Note: not all backends support this command.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of lease6-wipe -->
-
-<!-- start of leases-reclaim -->
-<section xml:id="reference-leases-reclaim">
-<title>leases-reclaim reference</title>
-<para xml:id="ref-leases-reclaim"><command>leases-reclaim</command> - The leases-reclaim command instructs the server to reclaim all expired leases immediately.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.0.0 (built-in)</para>
-
-<para>Description and examples: See <xref linkend="command-leases-reclaim"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "leases-reclaim",
-    "arguments": {
-        "remove": true
-    }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of leases-reclaim -->
-
-<!-- start of libreload -->
-<section xml:id="reference-libreload">
-<title>libreload reference</title>
-<para xml:id="ref-libreload"><command>libreload</command> - The libreload command will first unload and then load all currently loaded hook libraries.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.2.0 (built-in)</para>
-
-<para>Description and examples: See <xref linkend="command-libreload"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "libreload",
-    "arguments": { }
-}</screen>
-The server will respond with a result of 0 indicating success, or 1 indicating a failure.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of libreload -->
-
-<!-- start of list-commands -->
-<section xml:id="reference-list-commands">
-<title>list-commands reference</title>
-<para xml:id="ref-list-commands"><command>list-commands</command> - The list-commands command retrieves a list of all commands supported by the server.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command>, <command><link linkend="commands-kea-dhcp-ddns">kea-dhcp-ddns</link></command>, <command><link linkend="commands-kea-ctrl-agent">kea-ctrl-agent</link></command></para>
-
-<para>Availability: 1.0.0 (built-in)</para>
-
-<para>Description and examples: See <xref linkend="command-list-commands"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "list-commands",
-    "arguments": { }
-}</screen>
-The server will respond with a list of all supported commands.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of list-commands -->
-
-<!-- start of network4-add -->
-<section xml:id="reference-network4-add">
-<title>network4-add reference</title>
-<para xml:id="ref-network4-add"><command>network4-add</command> - The network4-add command is used to add a new shared network.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-subnet_cmds-lib">subnet_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-network4-add"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "network4-add",
-    "arguments": {
-        "shared-networks": [ {
-            "name": "floor13",
-            "subnet4": [
-            {
-                "id": 100,
-                "pools": [ { "pool": "192.0.2.2-192.0.2.99" } ],
-                "subnet": "192.0.2.0/24",
-                "option-data": [
-                    {
-                        "name": "routers",
-                        "data": "192.0.2.1"
-                    }
-                ]
-            },
-            {
-                "id": 101,
-                "pools": [ { "pool": "192.0.3.2-192.0.3.99" } ],
-                "subnet": "192.0.3.0/24",
-                "option-data": [
-                    {
-                        "name": "routers",
-                        "data": "192.0.3.1"
-                    }
-                ]
-            } ]
-        } ]
-    }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "arguments": {
-        "shared-networks": [ { "name": "floor13" } ]
-    },
-    "result": 0,
-    "text": "A new IPv4 shared network 'floor13' added"
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of network4-add -->
-
-<!-- start of network4-del -->
-<section xml:id="reference-network4-del">
-<title>network4-del reference</title>
-<para xml:id="ref-network4-del"><command>network4-del</command> - The network4-del command is used to delete existing shared networks.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-subnet_cmds-lib">subnet_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-network4-del"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "network4-del",
-    "arguments": {
-        "name": "floor13"
-    }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "arguments": {
-        "shared-networks": [
-            {
-                "name": "floor13"
-            }
-        ]
-    },
-    "result": 0,
-    "text": "IPv4 shared network 'floor13' deleted"
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of network4-del -->
-
-<!-- start of network4-get -->
-<section xml:id="reference-network4-get">
-<title>network4-get reference</title>
-<para xml:id="ref-network4-get"><command>network4-get</command> - The network4-get command is used to retrieve detailed information about shared networks, including subnets currently being part of a given network.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-subnet_cmds-lib">subnet_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-network4-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "network4-get",
-    "arguments": {
-        "name": "floor13"
-    }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "Info about IPv4 shared network 'floor13' returned",
-    "arguments": {
-        "shared-networks": [
-        {
-            "match-client-id": true,
-            "name": "floor13",
-            "option-data": [ ],
-            "rebind-timer": 90,
-            "relay": {
-                "ip-address": "0.0.0.0"
-            },
-            "renew-timer": 60,
-            "reservation-mode": "all",
-            "subnet4": [
-                {
-                    "subnet": "192.0.2.0/24",
-                    "id": 5,
-                    // many other subnet specific details here
-                },
-                {
-                    "id": 6,
-                    "subnet": "192.0.3.0/31",
-                    // many other subnet specific details here
-                }
-            ],
-            "valid-lifetime": 120
-        }
-        ]
-    }
-}</screen>
-Note that the actual response contains many additional fields that are omitted here for clarity.</para>
-
-</section>
-<!-- end of network4-get -->
-
-<!-- start of network4-list -->
-<section xml:id="reference-network4-list">
-<title>network4-list reference</title>
-<para xml:id="ref-network4-list"><command>network4-list</command> - The network4-list command is used to retrieve full list of currently configured shared networks.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-subnet_cmds-lib">subnet_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-network4-list"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "network4-list"
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "arguments": {
-        "shared-networks": [
-            { "name": "floor1" },
-            { "name": "office" }
-        ]
-    },
-    "result": 0,
-    "text": "2 IPv4 network(s) found"
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of network4-list -->
-
-<!-- start of network4-subnet-add -->
-<section xml:id="reference-network4-subnet-add">
-<title>network4-subnet-add reference</title>
-<para xml:id="ref-network4-subnet-add"><command>network4-subnet-add</command> - The network4-subnet-add command is used to add existing subnets to existing shared networks.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-subnet_cmds-lib">subnet_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-network4-subnet-add"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "network4-subnet-add",
-    "arguments": {
-        "name": "floor13",
-        "id": 5
-    }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "IPv4 subnet 10.0.0.0/8 (id 5) is now part of shared network 'floor1'"
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of network4-subnet-add -->
-
-<!-- start of network4-subnet-del -->
-<section xml:id="reference-network4-subnet-del">
-<title>network4-subnet-del reference</title>
-<para xml:id="ref-network4-subnet-del"><command>network4-subnet-del</command> - The network4-subnet-del command is used to remove a subnet that is part of an existing shared network and demote it to a plain, stand-alone subnet.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-subnet_cmds-lib">subnet_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-network4-subnet-del"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "network4-subnet-del",
-    "arguments": {
-        "name": "floor13",
-        "id": 5
-    }
- }</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "IPv4 subnet 10.0.0.0/8 (id 5) is now removed from shared network 'floor13'"
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of network4-subnet-del -->
-
-<!-- start of network6-add -->
-<section xml:id="reference-network6-add">
-<title>network6-add reference</title>
-<para xml:id="ref-network6-add"><command>network6-add</command> - The network6-add command is used to add a new shared network.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-subnet_cmds-lib">subnet_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-network6-add"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "network4-add",
-    "arguments": {
-        "shared-networks": [ {
-            "name": "floor13",
-            "subnet4": [
-            {
-                "id": 100,
-                "pools": [ { "pool": "192.0.2.2-192.0.2.99" } ],
-                "subnet": "192.0.2.0/24",
-                "option-data": [
-                    {
-                        "name": "routers",
-                        "data": "192.0.2.1"
-                    }
-                ]
-            },
-            {
-                "id": 101,
-                "pools": [ { "pool": "192.0.3.2-192.0.3.99" } ],
-                "subnet": "192.0.3.0/24",
-                "option-data": [
-                    {
-                        "name": "routers",
-                        "data": "192.0.3.1"
-                    }
-                ]
-            } ]
-        } ]
-    }
-}</screen>
-The network6-add uses the same syntax for both the query and the response. However, there are some parameters that are IPv4-only (e.g. match-client-id) and some are IPv6-only (e.g. interface-id).</para>
-
-<para>Response syntax:
-  <screen>{
-    "arguments": {
-        "shared-networks": [ { "name": "floor13" } ]
-    },
-    "result": 0,
-    "text": "A new IPv4 shared network 'floor13' added"
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of network6-add -->
-
-<!-- start of network6-del -->
-<section xml:id="reference-network6-del">
-<title>network6-del reference</title>
-<para xml:id="ref-network6-del"><command>network6-del</command> - The network6-del command is used to delete existing shared networks.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-subnet_cmds-lib">subnet_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-network6-del"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "network4-del",
-    "arguments": {
-        "name": "floor13"
-    }
-}</screen>
-The network6-del command uses exactly the same syntax for
-                    both the command and the response.</para>
-
-<para>Response syntax:
-  <screen>{
-    "command": "network4-del",
-    "arguments": {
-        "name": "floor13",
-        "subnets-action": "delete"
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of network6-del -->
-
-<!-- start of network6-get -->
-<section xml:id="reference-network6-get">
-<title>network6-get reference</title>
-<para xml:id="ref-network6-get"><command>network6-get</command> - The network6-get command is used to retrieve detailed information about shared networks, including subnets currently being part of a given network.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-subnet_cmds-lib">subnet_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-network6-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "network4-get",
-    "arguments": {
-        "name": "floor13"
-    }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "Info about IPv4 shared network 'floor13' returned",
-    "arguments": {
-        "shared-networks": [
-        {
-            "match-client-id": true,
-            "name": "floor13",
-            "option-data": [ ],
-            "rebind-timer": 90,
-            "relay": {
-                "ip-address": "0.0.0.0"
-            },
-            "renew-timer": 60,
-            "reservation-mode": "all",
-            "subnet4": [
-                {
-                    "subnet": "192.0.2.0/24",
-                    "id": 5,
-                    // many other subnet specific details here
-                },
-                {
-                    "id": 6,
-                    "subnet": "192.0.3.0/31",
-                    // many other subnet specific details here
-                }
-            ],
-            "valid-lifetime": 120
-        }
-        ]
-    }
-}</screen>
-Note that the actual response contains many additional fields that are omitted here for clarity.</para>
-
-</section>
-<!-- end of network6-get -->
-
-<!-- start of network6-list -->
-<section xml:id="reference-network6-list">
-<title>network6-list reference</title>
-<para xml:id="ref-network6-list"><command>network6-list</command> - The network6-list command is used to retrieve full list of currently configured shared networks.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-subnet_cmds-lib">subnet_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-network6-list"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "network4-list"
-}</screen>
-network6-list follows exactly the same syntax for both the query and the response.</para>
-
-<para>Response syntax:
-  <screen>{
-    "arguments": {
-        "shared-networks": [
-            { "name": "floor1" },
-            { "name": "office" }
-        ]
-    },
-    "result": 0,
-    "text": "2 IPv4 network(s) found"
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of network6-list -->
-
-<!-- start of network6-subnet-add -->
-<section xml:id="reference-network6-subnet-add">
-<title>network6-subnet-add reference</title>
-<para xml:id="ref-network6-subnet-add"><command>network6-subnet-add</command> - The network6-subnet-add command is used to add existing subnets to existing shared networks.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-subnet_cmds-lib">subnet_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-network6-subnet-add"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "network4-subnet-add",
-    "arguments": {
-        "name": "floor13",
-        "id": 5
-    }
-}</screen>
-The network6-subnet-add command uses exactly the same syntax for both the command and the response.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "IPv4 subnet 10.0.0.0/8 (id 5) is now part of shared network 'floor1'"
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of network6-subnet-add -->
-
-<!-- start of network6-subnet-del -->
-<section xml:id="reference-network6-subnet-del">
-<title>network6-subnet-del reference</title>
-<para xml:id="ref-network6-subnet-del"><command>network6-subnet-del</command> - The network6-subnet-del command is used to remove a subnet that is part of existing shared network and demote it to a plain, stand-alone subnet.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-subnet_cmds-lib">subnet_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-network6-subnet-del"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "network4-subnet-del",
-    "arguments": {
-        "name": "floor13",
-        "id": 5
-    }
- }</screen>
-The network6-subnet-del command uses exactly the same syntax for both the command and the response.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "IPv4 subnet 10.0.0.0/8 (id 5) is now removed from shared network 'floor13'"
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of network6-subnet-del -->
-
-<!-- start of remote-global-parameter4-del -->
-<section xml:id="reference-remote-global-parameter4-del">
-<title>remote-global-parameter4-del reference</title>
-<para xml:id="ref-remote-global-parameter4-del"><command>remote-global-parameter4-del</command> - This command is used to delete a global DHCPv4 parameter from the configuration database. The server will use the value specified in the configuration file or a default value (if the parameter is not specified in the configuration file) after deleting the parameter from the database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-global-parameter4-del"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-global-parameter4-del",
-    "arguments": {
-        "parameters": [ &lt;parameter name as string&gt; ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-    }
-}</screen>
-This command carries the list including exactly one name of the parameter to be deleted. The <command>server-tags</command> list is mandatory and it must contain exactly one server tag. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "DHCPv4 global parameter(s) deleted.",
-    "arguments": {
-        "count": 1
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-global-parameter4-del -->
-
-<!-- start of remote-global-parameter4-get -->
-<section xml:id="reference-remote-global-parameter4-get">
-<title>remote-global-parameter4-get reference</title>
-<para xml:id="ref-remote-global-parameter4-get"><command>remote-global-parameter4-get</command> - This command is used to fetch selected global parameter for the server from the specified database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-global-parameter4-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-global-parameter4-get",
-    "arguments": {
-        "parameters": [ &lt;parameter name as string&gt; ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-    }
-}</screen>
-This command carries a list including exactly one name of the parameter to be fetched. The <command>server-tags</command> list is mandatory and it must contain exactly one server tag. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error. The server tag "all" is allowed to fetch the global parameter value shared by all servers.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "DHCPv4 global parameter found.",
-    "arguments": {
-        "parameters": {
-            &lt;parameter name&gt;: &lt;parameter value&gt;,
-            "metadata": {
-                "server-tags": [ &lt;server tag&gt; ]
-            }
-        },
-        "count": 1
-    }
-}</screen>
-The returned response contains a map with a global parameter name/value pair. The value may be a JSON string, integer, real or boolean. The metadata is included and it provides database specific information associated with the returned object. If the "all" server tag was specified, the command attempts to fetch the global parameter value associated with all servers. If the explicit server tag is specified, the command will fetch the value associated with the given server. If the server specific value doesn't exist, it will try to fetch the value associated with all servers.</para>
-
-</section>
-<!-- end of remote-global-parameter4-get -->
-
-<!-- start of remote-global-parameter4-get-all -->
-<section xml:id="reference-remote-global-parameter4-get-all">
-<title>remote-global-parameter4-get-all reference</title>
-<para xml:id="ref-remote-global-parameter4-get-all"><command>remote-global-parameter4-get-all</command> - This command is used to fetch all global parameters for the server from the specified database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-global-parameter4-get-all"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-global-parameter4-get-all",
-    "arguments": {
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-    }
-}</screen>
-The <command>server-tags</command> list is mandatory and it must contain exactly one server tag. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error. The special server tag "all" is allowed to fetch the global parameters shared by all servers.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "DHCPv4 global parameters found.",
-    "arguments": {
-        "parameters": [
-            {
-                &lt;first parameter name&gt;: &lt;first parameter value&gt;,
-                "metadata": {
-                    "server-tags": [ &lt;server tag&gt; ]
-                }
-            },
-            {
-                &lt;second parameter name&gt;: &lt;second parameter value&gt;,
-                "metadata": {
-                    "server-tags": [ &lt;server tag&gt; ]
-                }
-            }
-        ],
-        "count": 2
-    }
-}</screen>
-The returned response contains a list of maps. Each map contains a global parameter name/value pair. The value may be a JSON string, integer, real or boolean. The metadata is appended to each parameter and it provides database specific information associated with the returned objects. If the server tag "all" is included in the command, the response contains the global parameters shared between all servers. It excludes server specific global parameters. If an explicit server tag is included in the command, the response contains all global parameters directly associated with the given server and the global parameters associated with all servers when server specific values are not present.</para>
-
-</section>
-<!-- end of remote-global-parameter4-get-all -->
-
-<!-- start of remote-global-parameter4-set -->
-<section xml:id="reference-remote-global-parameter4-set">
-<title>remote-global-parameter4-set reference</title>
-<para xml:id="ref-remote-global-parameter4-set"><command>remote-global-parameter4-set</command> - This command is used to create or update one more global parameters in the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-global-parameter4-set"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-global-parameter4-set"
-    "arguments": {
-        "parameters": {
-            &lt;first parameter name&gt;: &lt;first parameter value&gt;,
-            &lt;second parameter name&gt;: &lt;second parameter value&gt;
-        },
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-    }
-}</screen>
-This command carries multiple global parameters with their values. Care should be taken when specifying more than one parameter because in some cases only a subset of the parameters may be successfully stored in the database and other parameters may fail to be stored. In such cases the <command>remote-global-parameter4-get-all</command> may be useful to verify the contents of the database after the update. The <command>server-tags</command> list is mandatory and it must contain exactly one server tag. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error. The server tag "all" is allowed and it associates the specified parameters with all servers.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "DHCPv4 global parameter(s) successfully set.",
-    "arguments": {
-        "parameters": {
-            &lt;first parameter name&gt;: &lt;first parameter value&gt;,
-            &lt;second parameter name&gt;: &lt;second parameter value&gt;
-        },
-        "count": 2
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-global-parameter4-set -->
-
-<!-- start of remote-global-parameter6-del -->
-<section xml:id="reference-remote-global-parameter6-del">
-<title>remote-global-parameter6-del reference</title>
-<para xml:id="ref-remote-global-parameter6-del"><command>remote-global-parameter6-del</command> - This command is used to delete a global DHCPv6 parameter from the configuration database. The server will use the value specified in the configuration file or a default value (if the parameter is not specified in the configuration file) after deleting the parameter from the database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-global-parameter6-del"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-global-parameter6-del",
-    "arguments": {
-        "parameters": [ &lt;parameter name as string&gt; ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-    }
-}</screen>
-This command carries the list including exactly one name of the parameter to be deleted. The <command>server-tags</command> list is mandatory and it must contain exactly one server tag. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "DHCPv6 global parameter(s) deleted.",
-    "arguments": {
-        "count": 1
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-global-parameter6-del -->
-
-<!-- start of remote-global-parameter6-get -->
-<section xml:id="reference-remote-global-parameter6-get">
-<title>remote-global-parameter6-get reference</title>
-<para xml:id="ref-remote-global-parameter6-get"><command>remote-global-parameter6-get</command> - This command is used to fetch selected global parameter for the server from the specified database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-global-parameter6-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-global-parameter6-get",
-    "arguments": {
-        "parameters": [ &lt;parameter name as string&gt; ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-    }
-}</screen>
-This command carries a list including exactly one name of the parameter to be fetched. The <command>server-tags</command> list is mandatory and it must contain exactly one server tag. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error. The server tag "all" is allowed to fetch the global parameter value shared by all servers.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "DHCPv6 global parameter found.",
-    "arguments": {
-        "parameters": {
-            &lt;parameter name&gt;: &lt;parameter value&gt;,
-            "metadata": {
-                "server-tags": [ &lt;server tag&gt; ]
-            }
-        },
-        "count": 1
-    }
-}</screen>
-The returned response contains a map with a global parameter name/value pair. The value may be a JSON string, integer, real or boolean. The metadata is included and it provides database specific information associated with the returned object. If the "all" server tag was specified, the command attempts to fetch the global parameter value associated with all servers. If the explicit server tag is specified, the command will fetch the value associated with the given server. If the server specific value doesn't exist, it will try to fetch the value associated with all servers.</para>
-
-</section>
-<!-- end of remote-global-parameter6-get -->
-
-<!-- start of remote-global-parameter6-get-all -->
-<section xml:id="reference-remote-global-parameter6-get-all">
-<title>remote-global-parameter6-get-all reference</title>
-<para xml:id="ref-remote-global-parameter6-get-all"><command>remote-global-parameter6-get-all</command> - This command is used to fetch all global parameters for the server from the specified database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-global-parameter6-get-all"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-global-parameter6-get-all",
-    "arguments": {
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-    }
-}</screen>
-The <command>server-tags</command> list is mandatory and it must contain exactly one server tag. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error. The special server tag "all" is allowed to fetch the global parameters shared by all servers.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "DHCPv6 global parameters found.",
-    "arguments": {
-        "parameters": [
-            {
-                &lt;first parameter name&gt;: &lt;first parameter value&gt;,
-                "metadata": {
-                    "server-tags": [ &lt;server tag&gt; ]
-                }
-            },
-            {
-                &lt;second parameter name&gt;: &lt;second parameter value&gt;,
-                "metadata": {
-                    "server-tags": [ &lt;server tag&gt; ]
-                }
-            }
-        ],
-        "count": 2
-    }
-}</screen>
-The returned response contains a list of maps. Each map contains a global parameter name/value pair. The value may be a JSON string, integer, real or boolean. The metadata is appended to each parameter and it provides database specific information associated with the returned objects. If the server tag "all" is included in the command, the response contains the global parameters shared between all servers. It excludes server specific global parameters. If an explicit server tag is included in the command, the response contains all global parameters directly associated with the given server and the global parameters associated with all servers when server specific values are not present.</para>
-
-</section>
-<!-- end of remote-global-parameter6-get-all -->
-
-<!-- start of remote-global-parameter6-set -->
-<section xml:id="reference-remote-global-parameter6-set">
-<title>remote-global-parameter6-set reference</title>
-<para xml:id="ref-remote-global-parameter6-set"><command>remote-global-parameter6-set</command> - This command is used to create or update one more global parameters in the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-global-parameter6-set"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-global-parameter6-set"
-    "arguments": {
-        "parameters": {
-            &lt;first parameter name&gt;: &lt;first parameter value&gt;,
-            &lt;second parameter name&gt;: &lt;second parameter value&gt;
-        },
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-    }
-}</screen>
-This command carries multiple global parameters with their values. Care should be taken when specifying more than one parameter because in some cases only a subset of the parameters may be successfully stored in the database and other parameters may fail to be stored. In such cases the <command>remote-global-parameter6-get-all</command> may be useful to verify the contents of the database after the update. The <command>server-tags</command> list is mandatory and it must contain exactly one server tag. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error. The server tag "all" is allowed and it associates the specified parameters with all servers.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "DHCPv6 global parameter(s) successfully set.",
-    "arguments": {
-        "parameters": {
-            &lt;first parameter name&gt;: &lt;first parameter value&gt;,
-            &lt;second parameter name&gt;: &lt;second parameter value&gt;
-        },
-        "count": 2
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-global-parameter6-set -->
-
-<!-- start of remote-network4-del -->
-<section xml:id="reference-remote-network4-del">
-<title>remote-network4-del reference</title>
-<para xml:id="ref-remote-network4-del"><command>remote-network4-del</command> - This command is used to delete an IPv4 shared network from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-network4-del"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-network4-del",
-    "arguments": {
-        "shared-networks": [
-            {
-                "name": &lt;shared network name&gt;
-            }
-        ],
-        "subnets-action": "keep" | "delete",
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        }
-    }
-}</screen>
-This command includes a list with exactly one name of the shared network to be deleted. The <command>subnets-action</command> denotes whether the subnets in this shared network should be deleted or not. The <command>server-tags</command> parameter must not be specified for this command.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "1 IPv4 shared network(s) deleted.",
-    "arguments": {
-        "count": 1
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-network4-del -->
-
-<!-- start of remote-network4-get -->
-<section xml:id="reference-remote-network4-get">
-<title>remote-network4-get reference</title>
-<para xml:id="ref-remote-network4-get"><command>remote-network4-get</command> - This command is used to fetch selected IPv4 shared network for the server from the specified database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-network4-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-network4-get"
-    "arguments": {
-        "shared-networks": [
-            {
-                "name": &lt;shared network name&gt;
-            }
-        ],
-        "subnets-include": "full" | "no",
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        }
-    }
-}</screen>
-This command includes a list with exactly one name of the shared network to be returned. The <command>subnets-include</command> optional parameter allows for specifying whether the subnets belonging to the shared network should also be returned. The <command>server-tags</command> parameter must not be specified for this command.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "IPv4 shared network found.",
-    "arguments": {
-        "shared-networks": [
-            {
-                "name": &lt;shared network name&gt;,
-                "metadata": {
-                    "server-tags": [ &lt;first server tag&gt;, &lt;second server tag&gt;, ... ]
-                },
-                &lt;the rest of the shared network information, potentially including subnets&gt;
-            }
-        ],
-        "count": 1
-    }
-}</screen>
-If the subnets are returned with the shared network they are carried in the <command>subnet4</command> list within the shared network definition. The metadata is included in the returned shared network definition and it provides the database specific information associated with the returned object.</para>
-
-</section>
-<!-- end of remote-network4-get -->
-
-<!-- start of remote-network4-list -->
-<section xml:id="reference-remote-network4-list">
-<title>remote-network4-list reference</title>
-<para xml:id="ref-remote-network4-list"><command>remote-network4-list</command> - This command is used to fetch a list of all IPv4 shared networks from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-network4-list"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-network4-list"
-    "arguments": {
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;first server tag&gt;, &lt;second server tag&gt;, ... ]
-    }
-}</screen>
-The <command>server-tags</command> list is required for this command. This list must not be empty. It may either contain one or multiple server tags as strings or a single <command>null</command> value.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "2 IPv4 shared network(s) found.",
-    "arguments": {
-        "shared-networks": [
-            {
-                "name": &lt;first shared network name&gt;,
-                "metadata": {
-                    "server-tags": [ &lt;first server tag&gt;, &lt;second server tag&gt;, ... ]
-                }
-            },
-            {
-                "name": &lt;second shared network name&gt;,
-                "metadata": {
-                    "server-tags": [ &lt;first server tag&gt;, ... ]
-                }
-            }
-        ],
-        "count": 2
-    }
-}</screen>
-The returned response contains the list of maps. Each map contains the shared network name and the metadata which provides database specific information associated with the shared network. The returned list does not contain full definitions of the shared networks. Use <command>remote-network4-get</command> to fetch the full information about the selected shared networks. If the command includes explicit server tags as strings (including the special server tag "all"), the list contains all shared networks which are associated with any of the specified tags. A network is returned even if it is associated with multiple servers and only one of the specified tags matches. If the command includes the <command>null</command> value in the <command>server-tags</command> list, the response contains all shared networks which are assigned to no servers (unassigned).</para>
-
-</section>
-<!-- end of remote-network4-list -->
-
-<!-- start of remote-network4-set -->
-<section xml:id="reference-remote-network4-set">
-<title>remote-network4-set reference</title>
-<para xml:id="ref-remote-network4-set"><command>remote-network4-set</command> - This command is used to create or replace an IPv4 shared network in the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-network4-set"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-network4-set",
-    "arguments": {
-        "shared-networks": [
-            {
-                &lt;shared network specification excluding subnets list&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;first server tag&gt;, &lt;second server tag&gt;, ... ]
-    }
-}</screen>
-The provided list must contain exactly one shared network specification. It must not contain subnets ("subnet4" parameter). The subnets are added to the shared network using <command>remote-subnet4-set</command> command. The <command>server-tags</command> list is mandatory and it must contain one or more server tags as strings to explicitly associate the shared network with one or more user defined servers. It may include the special server tag "all" to associate the network with all servers.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "IPv4 shared network successfully set."
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-network4-set -->
-
-<!-- start of remote-network6-del -->
-<section xml:id="reference-remote-network6-del">
-<title>remote-network6-del reference</title>
-<para xml:id="ref-remote-network6-del"><command>remote-network6-del</command> - This command is used to delete an IPv6 shared network from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-network6-del"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-network6-del",
-    "arguments": {
-        "shared-networks": [
-            {
-                "name": &lt;shared network name&gt;
-            }
-        ],
-        "subnets-action": "keep" | "delete",
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        }
-    }
-}</screen>
-This command includes a list with exactly one name of the shared network to be deleted. The <command>subnets-action</command> denotes whether the subnets in this shared network should be deleted or not. The <command>server-tags</command> parameter must not be specified for this command.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "1 IPv6 shared network(s) deleted.",
-    "arguments": {
-        "count": 1
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-network6-del -->
-
-<!-- start of remote-network6-get -->
-<section xml:id="reference-remote-network6-get">
-<title>remote-network6-get reference</title>
-<para xml:id="ref-remote-network6-get"><command>remote-network6-get</command> - This command is used to fetch selected IPv6 shared network for the server from the specified database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-network6-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-network6-get"
-    "arguments": {
-        "shared-networks": [
-            {
-                "name": &lt;shared network name&gt;
-            }
-        ],
-        "subnets-include": "full" | "no",
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        }
-    }
-}</screen>
-This command includes a list with exactly one name of the shared network to be returned. The <command>subnets-include</command> optional parameter allows for specifying whether the subnets belonging to the shared network should also be returned. The <command>server-tags</command> parameter must not be specified for this command.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "IPv6 shared network found.",
-    "arguments": {
-        "shared-networks": [
-            {
-                "name": &lt;shared network name&gt;,
-                "metadata": {
-                    "server-tags": [ &lt;first server tag&gt;, &lt;second server tag&gt;, ... ]
-                },
-                &lt;the rest of the shared network information, potentially including subnets&gt;
-            }
-        ],
-        "count": 1
-    }
-}</screen>
-If the subnets are returned with the shared network they are carried in the <command>subnet6</command> list within the shared network definition. The metadata is included in the returned shared network definition and it provides the database specific information associated with the returned object.</para>
-
-</section>
-<!-- end of remote-network6-get -->
-
-<!-- start of remote-network6-list -->
-<section xml:id="reference-remote-network6-list">
-<title>remote-network6-list reference</title>
-<para xml:id="ref-remote-network6-list"><command>remote-network6-list</command> - This command is used to fetch a list of all IPv6 shared networks from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-network6-list"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-network6-list"
-    "arguments": {
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;first server tag&gt;, &lt;second server tag&gt;, ... ]
-    }
-}</screen>
-The <command>server-tags</command> list is required for this command. This list must not be empty. It may either contain one or multiple server tags as strings or a single <command>null</command> value.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "2 IPv6 shared network(s) found.",
-    "arguments": {
-        "shared-networks": [
-            {
-                "name": &lt;first shared network name&gt;,
-                "metadata": {
-                    "server-tags": [ &lt;first server tag&gt;, &lt;second server tag&gt;, ... ]
-                }
-            },
-            {
-                "name": &lt;second shared network name&gt;,
-                "metadata": {
-                    "server-tags": [ &lt;first server tag&gt;, ... ]
-                }
-            }
-        ],
-        "count": 2
-    }
-}</screen>
-The returned response contains the list of maps. Each map contains the shared network name and the metadata which provides database specific information associated with the shared network. The returned list does not contain full definitions of the shared networks. Use <command>remote-network6-get</command> to fetch the full information about the selected shared networks. If the command includes explicit server tags as strings (including the special server tag "all"), the list contains all shared networks which are associated with any of the specified tags. A network is returned even if it is associated with multiple servers and only one of the specified tags matches. If the command includes the <command>null</command> value in the <command>server-tags</command> list, the response contains all shared networks which are assigned to no servers (unassigned).</para>
-
-</section>
-<!-- end of remote-network6-list -->
-
-<!-- start of remote-network6-set -->
-<section xml:id="reference-remote-network6-set">
-<title>remote-network6-set reference</title>
-<para xml:id="ref-remote-network6-set"><command>remote-network6-set</command> - This command is used to create or replace an IPv6 shared network in the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-network6-set"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-network6-set",
-    "arguments": {
-        "shared-networks": [
-            {
-                &lt;shared network specification excluding subnets list&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;first server tag&gt;, &lt;second server tag&gt;, ... ]
-    }
-}</screen>
-The provided list must contain exactly one shared network specification. It must not contain subnets ("subnet6" parameter). The subnets are added to the shared network using <command>remote-subnet6-set</command> command. The <command>server-tags</command> list is mandatory and it must contain one or more server tags as strings to explicitly associate the shared network with one or more user defined servers. It may include the special server tag "all" to associate the network with all servers.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "IPv6 shared network successfully set."
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-network6-set -->
-
-<!-- start of remote-option-def4-del -->
-<section xml:id="reference-remote-option-def4-del">
-<title>remote-option-def4-del reference</title>
-<para xml:id="ref-remote-option-def4-del"><command>remote-option-def4-del</command> - This command is used to delete a DHCPv4 option definition from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-option-def4-del"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-option-def4-del",
-    "arguments": {
-        "option-defs": [ {
-            "code": &lt;option code&gt;,
-            "space": &lt;option space
-        } ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-    }
-}</screen>
-This command includes a list with exactly one option definition specification comprising an option name and code. The <command>server-tags</command> list is mandatory and it must contain exactly one server tag. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "1 DHCPv4 option definition(s) deleted.",
-    "arguments": {
-        "count": 1
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-option-def4-del -->
-
-<!-- start of remote-option-def4-get -->
-<section xml:id="reference-remote-option-def4-get">
-<title>remote-option-def4-get reference</title>
-<para xml:id="ref-remote-option-def4-get"><command>remote-option-def4-get</command> - This command is used to fetch a DHCPv4 option definition from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-option-def4-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-option-def4-get",
-    "arguments": {
-        "option-defs": [
-            {
-                "code": &lt;option code&gt;,
-                "space": &lt;option space&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-    }
-}</screen>
-The desired option definition is identified by the pair of the option code/space values. The <command>server-tags</command> list is mandatory and it must contain exactly one server tag. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error. The server tag "all" is allowed to fetch the option definition instance shared by all servers.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "DHCPv4 option definition found.",
-    "arguments": {
-        "option-defs": [
-            {
-                &lt;option definition&gt;,
-                "metadata": {
-                    "server-tags": [ &lt;server tag&gt; ]
-                }
-            }
-        ],
-        "count": 1
-    }
-}</screen>
-The metadata is included and it provides database specific information associated with the returned object. If the "all" server tag was specified, the command attempts to fetch the option definition associated with all servers. If the explicit server tag is specified, the command will fetch the option definition associated with the given server. If the server specific option definition doesn't exist, it will try to fetch the option definition associated with all servers.</para>
-
-</section>
-<!-- end of remote-option-def4-get -->
-
-<!-- start of remote-option-def4-get-all -->
-<section xml:id="reference-remote-option-def4-get-all">
-<title>remote-option-def4-get-all reference</title>
-<para xml:id="ref-remote-option-def4-get-all"><command>remote-option-def4-get-all</command> - This command is used to fetch all DHCPv4 option definitions from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-option-def4-get-all"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-option-def4-get-all"
-    "arguments": {
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-    }
-}</screen>
-The <command>server-tags</command> list is mandatory and it must contain exactly one server tag. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error. The special server tag "all" is allowed to fetch the option definitions shared by all servers.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "2 DHCPv4 option definition(s) found.",
-    "arguments": {
-        "option-defs": [
-            {
-                &lt;first option definition&gt;,
-                "metadata": {
-                    "server-tags": [ &lt;server tag&gt; ]
-                }
-            },
-            {
-                &lt;second option definition&gt;,
-                "metadata": {
-                    "server-tags": [ &lt;server tag&gt; ]
-                }
-            }
-        ],
-        "count": 2
-    }
-}</screen>
-The returned response contains a list of maps. Each map contains an option definition specification and the metadata including database specific information associated with the returned objects. If the server tag "all" is included in the command, the response contains the option definitions shared between all servers. It excludes server specific option definitions. If an explicit server tag is included in the command, the response contains all option definitions directly associated with the given server and the option definitions associated with all servers when server specific option definitions are not present.</para>
-
-</section>
-<!-- end of remote-option-def4-get-all -->
-
-<!-- start of remote-option-def4-set -->
-<section xml:id="reference-remote-option-def4-set">
-<title>remote-option-def4-set reference</title>
-<para xml:id="ref-remote-option-def4-set"><command>remote-option-def4-set</command> - This command is used to create or replace DHCPv4 option definition in the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-option-def4-set"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-option-def4-set",
-    "arguments": {
-        "option-defs": [
-            {
-                &lt;option definition specification&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-    }
-}</screen>
-The provided list must contain exactly one option definition specification. The <command>server-tags</command> list is mandatory and it must contain exactly one server tag. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error. The server tag "all" is allowed and it associates the specified option definition with all servers.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "DHCPv4 option definition set."
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-option-def4-set -->
-
-<!-- start of remote-option-def6-del -->
-<section xml:id="reference-remote-option-def6-del">
-<title>remote-option-def6-del reference</title>
-<para xml:id="ref-remote-option-def6-del"><command>remote-option-def6-del</command> - This command is used to delete a DHCPv6 option definition from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-option-def6-del"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-option-def6-del",
-    "arguments": {
-        "option-defs": [ {
-            "code": &lt;option code&gt;,
-            "space": &lt;option space
-        } ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-    }
-}</screen>
-This command includes a list with exactly one option definition specification comprising an option name and code. The <command>server-tags</command> list is mandatory and it must contain exactly one server tag. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "1 DHCPv6 option definition(s) deleted.",
-    "arguments": {
-        "count": 1
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-option-def6-del -->
-
-<!-- start of remote-option-def6-get -->
-<section xml:id="reference-remote-option-def6-get">
-<title>remote-option-def6-get reference</title>
-<para xml:id="ref-remote-option-def6-get"><command>remote-option-def6-get</command> - This command is used to fetch a DHCPv6 option definition from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-option-def6-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-option-def6-get",
-    "arguments": {
-        "option-defs": [
-            {
-                "code": &lt;option code&gt;,
-                "space": &lt;option space&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-    }
-}</screen>
-The desired option definition is identified by the pair of the option code/space values. The <command>server-tags</command> list is mandatory and it must contain exactly one server tag. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error. The server tag "all" is allowed to fetch the option definition instance shared by all servers.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "DHCPv6 option definition found.",
-    "arguments": {
-        "option-defs": [
-            {
-                &lt;option definition&gt;,
-                "metadata": {
-                    "server-tags": [ &lt;server tag&gt; ]
-                }
-            }
-        ],
-        "count": 1
-    }
-}</screen>
-The metadata is included and it provides database specific information associated with the returned object. If the "all" server tag was specified, the command attempts to fetch the option definition associated with all servers. If the explicit server tag is specified, the command will fetch the option definition associated with the given server. If the server specific option definition doesn't exist, it will try to fetch the option definition associated with all servers.</para>
-
-</section>
-<!-- end of remote-option-def6-get -->
-
-<!-- start of remote-option-def6-get-all -->
-<section xml:id="reference-remote-option-def6-get-all">
-<title>remote-option-def6-get-all reference</title>
-<para xml:id="ref-remote-option-def6-get-all"><command>remote-option-def6-get-all</command> - This command is used to fetch all DHCPv6 option definitions from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-option-def6-get-all"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-option-def6-get-all"
-    "arguments": {
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-    }
-}</screen>
-The <command>server-tags</command> list is mandatory and it must contain exactly one server tag. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error. The special server tag "all" is allowed to fetch the option definitions shared by all servers.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "2 DHCPv6 option definition(s) found.",
-    "arguments": {
-        "option-defs": [
-            {
-                &lt;first option definition&gt;,
-                "metadata": {
-                    "server-tags": [ &lt;server tag&gt; ]
-                }
-            },
-            {
-                &lt;second option definition&gt;,
-                "metadata": {
-                    "server-tags": [ &lt;server tag&gt; ]
-                }
-            }
-        ],
-        "count": 2
-    }
-}</screen>
-The returned response contains a list of maps. Each map contains an option definition specification and the metadata including database specific information associated with the returned objects. If the server tag "all" is included in the command, the response contains the option definitions shared between all servers. It excludes server specific option definitions. If an explicit server tag is included in the command, the response contains all option definitions directly associated with the given server and the option definitions associated with all servers when server specific option definitions are not present.</para>
-
-</section>
-<!-- end of remote-option-def6-get-all -->
-
-<!-- start of remote-option-def6-set -->
-<section xml:id="reference-remote-option-def6-set">
-<title>remote-option-def6-set reference</title>
-<para xml:id="ref-remote-option-def6-set"><command>remote-option-def6-set</command> - This command is used to create or replace DHCPv6 option definition in the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-option-def6-set"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-option-def6-set",
-    "arguments": {
-        "option-defs": [
-            {
-                &lt;option definition specification&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-    }
-}</screen>
-The provided list must contain exactly one option definition specification. The <command>server-tags</command> list is mandatory and it must contain exactly one server tag. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error. The server tag "all" is allowed and it associates the specified option definition with all servers.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "DHCPv6 option definition set."
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-option-def6-set -->
-
-<!-- start of remote-option4-global-del -->
-<section xml:id="reference-remote-option4-global-del">
-<title>remote-option4-global-del reference</title>
-<para xml:id="ref-remote-option4-global-del"><command>remote-option4-global-del</command> - This command is used to delete a DHCPv4 global option from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-option4-global-del"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-option4-global-del",
-    "arguments": {
-        "options": [
-            {
-                "code": &lt;option code&gt;
-                "space": &lt;option space&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-    }
-}</screen>
-This command includes a list with exactly one option specification comprising an option name and code. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "1 DHCPv4 option(s) deleted.",
-    "arguments": {
-        "count": 1
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-option4-global-del -->
-
-<!-- start of remote-option4-global-get -->
-<section xml:id="reference-remote-option4-global-get">
-<title>remote-option4-global-get reference</title>
-<para xml:id="ref-remote-option4-global-get"><command>remote-option4-global-get</command> - This command is used to fetch a global DHCPv4 option for the server from the specified database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-option4-global-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-option4-global-get",
-    "arguments": {
-        "options": [
-            {
-                "code": &lt;option code&gt;,
-                "space": &lt;option space&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-}</screen>
-The option is identified by the pair of option code/space values. The <command>server-tags</command> list is mandatory and it must contain exactly one server tag. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error. The server tag "all" is allowed to fetch the global option instance shared by all servers.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "DHCPv4 option in found.",
-    "arguments": {
-        "options": [
-            {
-                &lt;option information&gt;,
-                "metadata": {
-                    "server-tags": [ &lt;server tag&gt; ]
-                }
-            }
-        ]
-    }
-}</screen>
-The metadata is included and it provides database specific information associated with the returned object. If the "all" server tag was specified, the command attempts to fetch the global option associated with all servers. If the explicit server tag is specified, the command will fetch the global option associated with the given server. If the server specific option doesn't exist, it will try to fetch the option associated with all servers.</para>
-
-</section>
-<!-- end of remote-option4-global-get -->
-
-<!-- start of remote-option4-global-get-all -->
-<section xml:id="reference-remote-option4-global-get-all">
-<title>remote-option4-global-get-all reference</title>
-<para xml:id="ref-remote-option4-global-get-all"><command>remote-option4-global-get-all</command> - This command is used to fetch all DHCPv4 global options for the server from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-option4-global-get-all"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-option4-global-get-all",
-    "arguments": {
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-    }
-}</screen>
-The <command>server-tags</command> list is mandatory and it must contain exactly one server tag. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error. The special server tag "all" is allowed to fetch the global options shared by all servers.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "2 DHCPv4 option(s) found.",
-    "arguments": {
-        "options": [
-            {
-                &lt;first option specification&gt;,
-                "metadata": {
-                    "server-tags": [ &lt;server tag&gt; ]
-                }
-            },
-            {
-                &lt;second option specification&gt;,
-                "metadata": {
-                    "server-tags": [ &lt;server tag&gt; ]
-                }
-            }
-        ],
-        "count": 2
-    }
-}</screen>
-The returned response contains a list of maps. Each map contains a global option specification and the metadata including database specific information associated with the returned object. If the server tag "all" is included in the command, the response contains the global options shared between all servers. It excludes server specific global options. If an explicit server tag is included in the command, the response contains all global options directly associated with the given server and the options associated with all servers when server specific options are not present.</para>
-
-</section>
-<!-- end of remote-option4-global-get-all -->
-
-<!-- start of remote-option4-global-set -->
-<section xml:id="reference-remote-option4-global-set">
-<title>remote-option4-global-set reference</title>
-<para xml:id="ref-remote-option4-global-set"><command>remote-option4-global-set</command> - This command is used to create or replace a DHCPv4 global option in the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-option4-global-set"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-option4-global-set",
-    "arguments": {
-        "options": [
-            {
-                &lt;global option specification&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-    }
-}</screen>
-The provided list must cotain exactly one option specification. The <command>server-tags</command> list is mandatory and it must contain exactly one server tag. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error. The server tag "all" is allowed and it associates the specified option with all servers.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "DHCPv4 option set.",
-    "arguments": {
-        "options": [
-            {
-                "code": &lt;option code&gt;,
-                "space": &lt;option space&gt;
-            }
-        ]
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-option4-global-set -->
-
-<!-- start of remote-option6-global-del -->
-<section xml:id="reference-remote-option6-global-del">
-<title>remote-option6-global-del reference</title>
-<para xml:id="ref-remote-option6-global-del"><command>remote-option6-global-del</command> - This command is used to delete a DHCPv6 global option from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-option6-global-del"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-option6-global-del",
-    "arguments": {
-        "options": [
-            {
-                "code": &lt;option code&gt;
-                "space": &lt;option space&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-    }
-}</screen>
-This command includes a list with exactly one option specification comprising an option name and code. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "1 DHCPv6 option(s) deleted.",
-    "arguments": {
-        "count": 1
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-option6-global-del -->
-
-<!-- start of remote-option6-global-get -->
-<section xml:id="reference-remote-option6-global-get">
-<title>remote-option6-global-get reference</title>
-<para xml:id="ref-remote-option6-global-get"><command>remote-option6-global-get</command> - This command is used to fetch a global DHCPv6 option for the server from the specified database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-option6-global-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-option6-global-get",
-    "arguments": {
-        "options": [
-            {
-                "code": &lt;option code&gt;,
-                "space": &lt;option space&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-}</screen>
-The option is identified by the pair of option code/space values. The <command>server-tags</command> list is mandatory and it must contain exactly one server tag. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error. The server tag "all" is allowed to fetch the global option instance shared by all servers.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "DHCPv6 option in found.",
-    "arguments": {
-        "options": [
-            {
-                &lt;option information&gt;,
-                "metadata": {
-                    "server-tags": [ &lt;server tag&gt; ]
-                }
-            }
-        ]
-    }
-}</screen>
-The metadata is included and it provides database specific information associated with the returned object. If the "all" server tag was specified, the command attempts to fetch the global option associated with all servers. If the explicit server tag is specified, the command will fetch the global option associated with the given server. If the server specific option doesn't exist, it will try to fetch the option associated with all servers.</para>
-
-</section>
-<!-- end of remote-option6-global-get -->
-
-<!-- start of remote-option6-global-get-all -->
-<section xml:id="reference-remote-option6-global-get-all">
-<title>remote-option6-global-get-all reference</title>
-<para xml:id="ref-remote-option6-global-get-all"><command>remote-option6-global-get-all</command> - This command is used to fetch all DHCPv6 global options for the server from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-option6-global-get-all"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-option6-global-get-all",
-    "arguments": {
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-    }
-}</screen>
-The <command>server-tags</command> list is mandatory and it must contain exactly one server tag. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error. The special server tag "all" is allowed to fetch the global options shared by all servers.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "2 DHCPv6 option(s) found.",
-    "arguments": {
-        "options": [
-            {
-                &lt;first option specification&gt;,
-                "metadata": {
-                    "server-tags": [ &lt;server tag&gt; ]
-                }
-            },
-            {
-                &lt;second option specification&gt;,
-                "metadata": {
-                    "server-tags": [ &lt;server tag&gt; ]
-                }
-            }
-        ],
-        "count": 2
-    }
-}</screen>
-The returned response contains a list of maps. Each map contains a global option specification and the metadata including database specific information associated with the returned object. If the server tag "all" is included in the command, the response contains the global options shared between all servers. It excludes server specific global options. If an explicit server tag is included in the command, the response contains all global options directly associated with the given server and the options associated with all servers when server specific options are not present.</para>
-
-</section>
-<!-- end of remote-option6-global-get-all -->
-
-<!-- start of remote-option6-global-set -->
-<section xml:id="reference-remote-option6-global-set">
-<title>remote-option6-global-set reference</title>
-<para xml:id="ref-remote-option6-global-set"><command>remote-option6-global-set</command> - This command is used to create or replace a DHCPv6 global option in the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-option6-global-set"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-option6-global-set",
-    "arguments": {
-        "options": [
-            {
-                &lt;global option specification&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;single server tag as string&gt; ]
-    }
-}</screen>
-The provided list must cotain exactly one option specification. The <command>server-tags</command> list is mandatory and it must contain exactly one server tag. Specifying an empty list, a value of <command>null</command> or multiple server tags will result in an error. The server tag "all" is allowed and it associates the specified option with all servers.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "DHCPv6 option set.",
-    "arguments": {
-        "options": [
-            {
-                "code": &lt;option code&gt;,
-                "space": &lt;option space&gt;
-            }
-        ]
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-option6-global-set -->
-
-<!-- start of remote-server4-del -->
-<section xml:id="reference-remote-server4-del">
-<title>remote-server4-del reference</title>
-<para xml:id="ref-remote-server4-del"><command>remote-server4-del</command> - This command is used to delete information about a DHCPv4 server from the configuration database. Any configuration explicitly associated with the deleted server is automatically disassociated. In addition, configuration elements not shareable with other servers (e.g. global DHCP parameters) are deleted. The shareable configuration (e.g. subnets, shared networks) is not deleted as it may be used by other servers.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-server4-del"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-server4-del",
-    "arguments": {
-        "servers": [
-            {
-                "server-tag": &lt;server name&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        }
-    }
-}</screen>
-This command carries the list including exactly one map with the tag of the server to be deleted.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "1 DHCPv4 server(s) deleted."
-    "arguments": {
-        "count": 1
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-server4-del -->
-
-<!-- start of remote-server4-get -->
-<section xml:id="reference-remote-server4-get">
-<title>remote-server4-get reference</title>
-<para xml:id="ref-remote-server4-get"><command>remote-server4-get</command> - This command is used to fetch the information about the DHCPv4 server, such as server tag and description.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-server4-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-server4-get",
-    "arguments": {
-        "servers": [
-            {
-                "server-tag": &lt;server tag&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        }
-    }
-}</screen>
-This command carries the list including exactly one map with the tag of the server to be fetched.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "DHCP server &lt;server tag&gt; found.",
-    "arguments": {
-        "servers": [
-            {
-                "server-tag": &lt;server tag&gt;,
-                "description": &lt;server description&gt;
-            }
-        ],
-        "count": 1
-    }
-}</screen>
-The server tag is the unique identifier of the server, used to associate the configuration elements in the database with the particular server instance. The returned server description is specified by the user when setting the server information.</para>
-
-</section>
-<!-- end of remote-server4-get -->
-
-<!-- start of remote-server4-get-all -->
-<section xml:id="reference-remote-server4-get-all">
-<title>remote-server4-get-all reference</title>
-<para xml:id="ref-remote-server4-get-all"><command>remote-server4-get-all</command> - This command is used to fetch information about all DHCPv4 servers specified by the user.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-server4-get-all"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-server4-get-all",
-    "arguments": {
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        }
-    }
-}</screen>
-This command contains no arguments besides the optional <command>remote</command>.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "DHCPv4 servers found.",
-    "arguments": {
-        "servers": [
-            {
-                "server-tag": &lt;first server tag&gt;,
-                "description": &lt;first server description&gt;
-            },
-            {
-                "server-tag": &lt;second server tag&gt;,
-                "description": &lt;second server description&gt;
-            }
-        ],
-        "count": 2
-    }
-}</screen>
-The returned response contain a list of maps. Each map contains a server tag uniquely identifying a server and the user defined description of the server. The Kea Configuration Backend uses the keyword <command>all</command> to associate parts of the configuration with all servers. Internally, it creates the logical server <command>all</command> for this purpose. However, this logical server is not returned as a result of the <command>remote-server4-get-all</command>. Only the user defined servers are returned.</para>
-
-</section>
-<!-- end of remote-server4-get-all -->
-
-<!-- start of remote-server4-set -->
-<section xml:id="reference-remote-server4-set">
-<title>remote-server4-set reference</title>
-<para xml:id="ref-remote-server4-set"><command>remote-server4-set</command> - This command is used to create or replace information about the DHCPv4 server in the database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-server4-set"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-server4-set",
-    "arguments": {
-        "servers": [
-            {
-                "server-tag": &lt;server tag&gt;,
-                "description": &lt;server description&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        }
-    }
-}</screen>
-The provided list must contain exactly one server specification. The <command>server-tag</command> must be unique accross all servers within the configuration database. The <command>description</command> is the arbitrary text describing the server, its location within the network etc.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "DHCPv4 server successfully set.",
-    "arguments": {
-        "servers": [
-            {
-                "server-tag": &lt;server tag&gt;,
-                "description": &lt;server description&gt;
-            }
-        ]
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-server4-set -->
-
-<!-- start of remote-server6-del -->
-<section xml:id="reference-remote-server6-del">
-<title>remote-server6-del reference</title>
-<para xml:id="ref-remote-server6-del"><command>remote-server6-del</command> - This command is used to delete information about a DHCPv6 server from the configuration database. Any configuration explicitly associated with the deleted server is automatically disassociated. In addition, configuration elements not shareable with other servers (e.g. global DHCP parameters) are deleted. The shareable configuration (e.g. subnets, shared networks) is not deleted as it may be used by other servers.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-server6-del"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-server6-del",
-    "arguments": {
-        "servers": [
-            {
-                "server-tag": &lt;server name&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        }
-    }
-}</screen>
-This command carries the list including exactly one map with the tag of the server to be deleted.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "1 DHCPv6 server(s) deleted."
-    "arguments": {
-        "count": 1
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-server6-del -->
-
-<!-- start of remote-server6-get -->
-<section xml:id="reference-remote-server6-get">
-<title>remote-server6-get reference</title>
-<para xml:id="ref-remote-server6-get"><command>remote-server6-get</command> - This command is used to fetch the information about the DHCPv6 server, such as server tag and description.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-server6-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-server6-get",
-    "arguments": {
-        "servers": [
-            {
-                "server-tag": &lt;server tag&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        }
-    }
-}</screen>
-This command carries the list including exactly one map with the tag of the server to be fetched.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "DHCP server &lt;server tag&gt; found.",
-    "arguments": {
-        "servers": [
-            {
-                "server-tag": &lt;server tag&gt;,
-                "description": &lt;server description&gt;
-            }
-        ],
-        "count": 1
-    }
-}</screen>
-The server tag is the unique identifier of the server, used to associate the configuration elements in the database with the particular server instance. The returned server description is specified by the user when setting the server information.</para>
-
-</section>
-<!-- end of remote-server6-get -->
-
-<!-- start of remote-server6-get-all -->
-<section xml:id="reference-remote-server6-get-all">
-<title>remote-server6-get-all reference</title>
-<para xml:id="ref-remote-server6-get-all"><command>remote-server6-get-all</command> - This command is used to fetch information about all DHCPv6 servers specified by the user.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-server6-get-all"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-server6-get-all",
-    "arguments": {
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        }
-    }
-}</screen>
-This command contains no arguments besides the optional <command>remote</command>.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "DHCPv6 servers found.",
-    "arguments": {
-        "servers": [
-            {
-                "server-tag": &lt;first server tag&gt;,
-                "description": &lt;first server description&gt;
-            },
-            {
-                "server-tag": &lt;second server tag&gt;,
-                "description": &lt;second server description&gt;
-            }
-        ],
-        "count": 2
-    }
-}</screen>
-The returned response contain a list of maps. Each map contains a server tag uniquely identifying a server and the user defined description of the server. The Kea Configuration Backend uses the keyword <command>all</command> to associate parts of the configuration with all servers. Internally, it creates the logical server <command>all</command> for this purpose. However, this logical server is not returned as a result of the <command>remote-server6-get-all</command>. Only the user defined servers are returned.</para>
-
-</section>
-<!-- end of remote-server6-get-all -->
-
-<!-- start of remote-server6-set -->
-<section xml:id="reference-remote-server6-set">
-<title>remote-server6-set reference</title>
-<para xml:id="ref-remote-server6-set"><command>remote-server6-set</command> - This command is used to create or replace information about the DHCPv6 server in the database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-server6-set"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-server6-set",
-    "arguments": {
-        "servers": [
-            {
-                "server-tag": &lt;server tag&gt;,
-                "description": &lt;server description&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        }
-    }
-}</screen>
-The provided list must contain exactly one server specification. The <command>server-tag</command> must be unique accross all servers within the configuration database. The <command>description</command> is the arbitrary text describing the server, its location within the network etc.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "DHCPv6 server successfully set.",
-    "arguments": {
-        "servers": [
-            {
-                "server-tag": &lt;server tag&gt;,
-                "description": &lt;server description&gt;
-            }
-        ]
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-server6-set -->
-
-<!-- start of remote-subnet4-del-by-id -->
-<section xml:id="reference-remote-subnet4-del-by-id">
-<title>remote-subnet4-del-by-id reference</title>
-<para xml:id="ref-remote-subnet4-del-by-id"><command>remote-subnet4-del-by-id</command> - This command is used to delete an IPv4 subnet by ID from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-subnet4-del-by-id"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-subnet4-del-by-id",
-    "arguments": {
-        "subnets": [
-            {
-                "id": &lt;subnet identifier&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        }
-    }
-}</screen>
-This command includes a list with exactly one id of the subnet to be deleted. The <command>server-tags</command> parameter must not be specified for this command.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "1 IPv4 subnet(s) deleted.",
-    "arguments": {
-        "count": 1
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-subnet4-del-by-id -->
-
-<!-- start of remote-subnet4-del-by-prefix -->
-<section xml:id="reference-remote-subnet4-del-by-prefix">
-<title>remote-subnet4-del-by-prefix reference</title>
-<para xml:id="ref-remote-subnet4-del-by-prefix"><command>remote-subnet4-del-by-prefix</command> - This command is used to delete an IPv4 subnet by prefix from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-subnet4-del-by-prefix"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-subnet4-del-by-prefix",
-    "arguments": {
-        "subnets": [
-            {
-                "subnet": &lt;subnet prefix&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        }
-    }
-}</screen>
-This command includes a list with exactly one prefix of the subnet to be deleted. The <command>server-tags</command> parameter must not be specified for this command.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "1 IPv4 subnet(s) deleted.",
-    "arguments": {
-        "count": 1
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-subnet4-del-by-prefix -->
-
-<!-- start of remote-subnet4-get-by-id -->
-<section xml:id="reference-remote-subnet4-get-by-id">
-<title>remote-subnet4-get-by-id reference</title>
-<para xml:id="ref-remote-subnet4-get-by-id"><command>remote-subnet4-get-by-id</command> - This command is used to fetch selected IPv4 subnet by ID for the server from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-subnet4-get-by-id"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-subnet4-get-by-id"
-    "arguments": {
-        "subnets": [ {
-            "id": &lt;subnet identifier&gt;
-        } ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        }
-    }
-}</screen>
-This command includes a list with exactly one id of the subnet to be returned. The <command>server-tags</command> parameter must not be specified for this command.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "IPv4 subnet found.",
-    "arguments": {
-        "subnets": [ {
-            "id": &lt;subnet identifier&gt;,
-            "subnet": &lt;subnet prefix&gt;,
-            "shared-network-name": &lt;shared network name&gt; | null,
-            "metadata": {
-                "server-tags": [ &lt;first server tag&gt;, &lt;second server tag&gt;, ... ]
-            },
-            &lt;the rest of the subnet specification here&gt;
-        } ],
-        "count": 1
-    }
-}</screen>
-If the shared network name is null, it means that the returned subnet does not belong to any shared network (global subnet). The metadata is included in the returned subnet definition and it provides database specific information associated with the returned object.</para>
-
-</section>
-<!-- end of remote-subnet4-get-by-id -->
-
-<!-- start of remote-subnet4-get-by-prefix -->
-<section xml:id="reference-remote-subnet4-get-by-prefix">
-<title>remote-subnet4-get-by-prefix reference</title>
-<para xml:id="ref-remote-subnet4-get-by-prefix"><command>remote-subnet4-get-by-prefix</command> - This command is used to fetch selected IPv4 subnet by prefix from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-subnet4-get-by-prefix"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-subnet4-get-by-prefix"
-    "arguments": {
-        "subnets": [ {
-            "subnet": &lt;subnet prefix&gt;
-        } ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        }
-    }
-}</screen>
-This command includes a list with exactly one prefix of the subnet to be returned. The <command>server-tags</command> parameter must not be specified for this command.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "IPv4 subnet found.",
-    "arguments": {
-        "subnets": [
-            {
-                "id": &lt;subnet identifier&gt;,
-                "subnet": &lt;subnet prefix&gt;,
-                "shared-network-name": &lt;shared network name&gt; | null,
-                "metadata": {
-                    "server-tags": [ &lt;first server tag&gt;, &lt;second server tag&gt;, ... ]
-                },
-                &lt;the rest of the subnet specification here&gt;
-            }
-        ],
-        "count": 1
-    }
-}</screen>
-If the shared network name is null, it means that the returned subnet does not belong to any shared network (global subnet). The metadata is included in the returned subnet definition and it provides database specific information associated with the returned object.</para>
-
-</section>
-<!-- end of remote-subnet4-get-by-prefix -->
-
-<!-- start of remote-subnet4-list -->
-<section xml:id="reference-remote-subnet4-list">
-<title>remote-subnet4-list reference</title>
-<para xml:id="ref-remote-subnet4-list"><command>remote-subnet4-list</command> - This command is used to fetch a list of all IPv4 subnets from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-subnet4-list"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-subnet4-list"
-    "arguments": {
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;first server tag&gt;, &lt;second server tag&gt;, ... ]
-    }
-}</screen>
-The <command>server-tags</command> list is required for this command. This list must not be empty. It may either contain one or multiple server tags as strings or a single <command>null</command> value.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "2 IPv4 subnets found.",
-    "arguments": {
-        "subnets": [
-            {
-                "id": &lt;first subnet identifier&gt;,
-                "subnet": &lt;first subnet prefix&gt;,
-                "shared-network-name": &lt;shared network name&gt; | null,
-                "metadata": {
-                    "server-tags": [ &lt;first server tag&gt;, &lt;second server tag&gt;, ... ]
-                }
-            },
-            {
-                "id": &lt;second subnet identifier&gt;,
-                "subnet": &lt;second subnet prefix&gt;,
-                "shared-network-name": &lt;shared network name&gt; | null,
-                "metadata": {
-                    "server-tags": [ &lt;first server tag&gt;, ... ]
-                }
-            }
-        ],
-        "count": 2
-    }
-}</screen>
-The returned response contains a list of maps. Each map contains a subnet identifier, prefix and shared network name to which the subnet belongs. If the subnet does not belong to a shared netork the name is null. The metadata includes database specific information associated with the subnets. The returned list does not contain full subnet definitions. Use <command>remote-subnet4-get</command> to fetch the full information about the selected subnets. If the command includes explicit server tags as strings (including the special server tag "all"), the list contains all subnets which are associated with any of the specified tags. A subnet is returned even if it is associated with multiple servers and only one of the specified tags matches. If the command includes the <command>null</command> value in the <command>server-tags</command> list, the response contains all subnets which are assigned to no servers (unassigned).</para>
-
-</section>
-<!-- end of remote-subnet4-list -->
-
-<!-- start of remote-subnet4-set -->
-<section xml:id="reference-remote-subnet4-set">
-<title>remote-subnet4-set reference</title>
-<para xml:id="ref-remote-subnet4-set"><command>remote-subnet4-set</command> - This command is used to create or replace an IPv4 subnet the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-subnet4-set"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-subnet4-set",
-    "arguments": {
-        "subnets": [
-            {
-                "id": &lt;subnet identifier&gt;,
-                "subnet": &lt;subnet prefix&gt;,
-                "shared-network-name": &lt;shared network name&gt; | null,
-                &lt;the rest of the subnet specification here&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;first server tag&gt;, &lt;second server tag&gt;, ... ]
-    }
-}</screen>
-The provided list must contain exactly one subnet specification. The <command>shared-network-name</command> parameter is required for these commands. It associates the subnet with the shared network by its name. If the subnet must not belong to any shared network (global subnet), the <command>null</command> value must be specified for the shared network name. The <command>server-tags</command> list is mandatory and it must contain one or more server tags as strings to explicitly associate the subnet with one or more user defined servers. It may include the special server tag "all" to associate the subnet with all servers.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "IPv4 subnet successfully set.",
-    "arguments": {
-        "id": &lt;subnet identifier&gt;,
-        "subnet": &lt;subnet prefix&gt;
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-subnet4-set -->
-
-<!-- start of remote-subnet6-del-by-id -->
-<section xml:id="reference-remote-subnet6-del-by-id">
-<title>remote-subnet6-del-by-id reference</title>
-<para xml:id="ref-remote-subnet6-del-by-id"><command>remote-subnet6-del-by-id</command> - This command is used to delete an IPv6 subnet by ID from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-subnet6-del-by-id"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-subnet6-del-by-id",
-    "arguments": {
-        "subnets": [
-            {
-                "id": &lt;subnet identifier&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        }
-    }
-}</screen>
-This command includes a list with exactly one id of the subnet to be deleted. The <command>server-tags</command> parameter must not be specified for this command.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "1 IPv6 subnet(s) deleted.",
-    "arguments": {
-        "count": 1
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-subnet6-del-by-id -->
-
-<!-- start of remote-subnet6-del-by-prefix -->
-<section xml:id="reference-remote-subnet6-del-by-prefix">
-<title>remote-subnet6-del-by-prefix reference</title>
-<para xml:id="ref-remote-subnet6-del-by-prefix"><command>remote-subnet6-del-by-prefix</command> - This command is used to delete an IPv6 subnet by prefix from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-subnet6-del-by-prefix"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-subnet6-del-by-prefix",
-    "arguments": {
-        "subnets": [
-            {
-                "subnet": &lt;subnet prefix&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        }
-    }
-}</screen>
-This command includes a list with exactly one prefix of the subnet to be deleted. The <command>server-tags</command> parameter must not be specified for this command.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "1 IPv6 subnet(s) deleted.",
-    "arguments": {
-        "count": 1
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-subnet6-del-by-prefix -->
-
-<!-- start of remote-subnet6-get-by-id -->
-<section xml:id="reference-remote-subnet6-get-by-id">
-<title>remote-subnet6-get-by-id reference</title>
-<para xml:id="ref-remote-subnet6-get-by-id"><command>remote-subnet6-get-by-id</command> - This command is used to fetch selected IPv6 subnet by ID for the server from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-subnet6-get-by-id"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-subnet6-get-by-id"
-    "arguments": {
-        "subnets": [
-            {
-                "id": &lt;subnet identifier&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        }
-    }
-}</screen>
-This command includes a list with exactly one id of the subnet to be returned. The <command>server-tags</command> parameter must not be specified for this command.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "IPv6 subnet found.",
-    "arguments": {
-        "subnets": [
-            {
-                "id": &lt;subnet identifier&gt;,
-                "subnet": &lt;subnet prefix&gt;,
-                "shared-network-name": &lt;shared network name&gt; | null,
-                "metadata": {
-                    "server-tags": [ &lt;first server tag&gt;, &lt;second server tag&gt;, ... ]
-                },
-                &lt;the rest of the subnet specification here&gt;
-            }
-        ],
-        "count": 1
-    }
-}</screen>
-If the shared network name is null, it means that the returned subnet does not belong to any shared network (global subnet). The metadata is included in the returned subnet definition and it provides database specific information associated with the returned object.</para>
-
-</section>
-<!-- end of remote-subnet6-get-by-id -->
-
-<!-- start of remote-subnet6-get-by-prefix -->
-<section xml:id="reference-remote-subnet6-get-by-prefix">
-<title>remote-subnet6-get-by-prefix reference</title>
-<para xml:id="ref-remote-subnet6-get-by-prefix"><command>remote-subnet6-get-by-prefix</command> - This command is used to fetch selected IPv6 subnet by prefix from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-subnet6-get-by-prefix"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-subnet4-get-by-prefix"
-    "arguments": {
-        "subnets": [
-            {
-                "subnet": &lt;subnet prefix&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        }
-    }
-}</screen>
-This command includes a list with exactly one prefix of the subnet to be returned. The <command>server-tags</command> parameter must not be specified for this command.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "IPv6 subnet found.",
-    "arguments": {
-        "subnets": [ {
-            "id": &lt;subnet identifier&gt;,
-            "subnet": &lt;subnet prefix&gt;,
-            "shared-network-name": &lt;shared network name&gt; | null,
-            "metadata": {
-                "server-tags": [ &lt;first server tag&gt;, &lt;second server tag&gt;, ... ]
-            },
-            &lt;the rest of the subnet specification here&gt;
-        } ],
-        "count": 1
-    }
-}</screen>
-If the shared network name is null, it means that the returned subnet does not belong to any shared network (global subnet). The metadata is included in the returned subnet definition and it provides database specific information associated with the returned object.</para>
-
-</section>
-<!-- end of remote-subnet6-get-by-prefix -->
-
-<!-- start of remote-subnet6-list -->
-<section xml:id="reference-remote-subnet6-list">
-<title>remote-subnet6-list reference</title>
-<para xml:id="ref-remote-subnet6-list"><command>remote-subnet6-list</command> - This command is used to fetch a list of all IPv6 subnets from the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-subnet6-list"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-subnet6-list"
-    "arguments": {
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;first server tag&gt;, &lt;second server tag&gt;, ... ]
-    }
-}</screen>
-The <command>server-tags</command> list is required for this command. This list must not be empty. It may either contain one or multiple server tags as strings or a single <command>null</command> value.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "2 IPv6 subnets found.",
-    "arguments": {
-        "subnets": [
-            {
-                "id": &lt;first subnet identifier&gt;,
-                "subnet": &lt;first subnet prefix&gt;,
-                "shared-network-name": &lt;shared network name&gt; | null,
-                "metadata": {
-                    "server-tags": [ &lt;first server tag&gt;, &lt;second server tag&gt;, ... ]
-                }
-            },
-            {
-                "id": &lt;second subnet identifier&gt;,
-                "subnet": &lt;second subnet prefix&gt;,
-                "shared-network-name": &lt;shared network name&gt; | null,
-                "metadata": {
-                    "server-tags": [ &lt;first server tag&gt;, ... ]
-                }
-            }
-        ],
-        "count": 2
-    }
-}</screen>
-The returned response contains a list of maps. Each map contains a subnet identifier, prefix and shared network name to which the subnet belongs. If the subnet does not belong to a shared netork the name is null. The metadata includes database specific information associated with the subnets. The returned list does not contain full subnet definitions. Use <command>remote-subnet6-get</command> to fetch the full information about the selected subnets. If the command includes explicit server tags as strings (including the special server tag "all"), the list contains all subnets which are associated with any of the specified tags. A subnet is returned even if it is associated with multiple servers and only one of the specified tags matches. If the command includes the <command>null</command> value in the <command>server-tags</command> list, the response contains all subnets which are assigned to no servers (unassigned).</para>
-
-</section>
-<!-- end of remote-subnet6-list -->
-
-<!-- start of remote-subnet6-set -->
-<section xml:id="reference-remote-subnet6-set">
-<title>remote-subnet6-set reference</title>
-<para xml:id="ref-remote-subnet6-set"><command>remote-subnet6-set</command> - This command is used to create or replace an IPv6 subnet the configuration database.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-cb_cmds-lib">cb_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-remote-subnet6-set"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "remote-subnet6-set",
-    "arguments": {
-        "subnets": [
-            {
-                "id": &lt;subnet identifier&gt;,
-                "subnet": &lt;subnet prefix&gt;,
-                "shared-network-name": &lt;shared network name&gt; | null,
-                &lt;the rest of the subnet specification here&gt;
-            }
-        ],
-        "remote": {
-            &lt;specification of the database to connect to&gt;
-        },
-        "server-tags": [ &lt;first server tag&gt;, &lt;second server tag&gt;, ... ]
-    }
-}</screen>
-The provided list must contain exactly one subnet specification. The <command>shared-network-name</command> parameter is required for these commands. It associates the subnet with the shared network by its name. If the subnet must not belong to any shared network (global subnet), the <command>null</command> value must be specified for the shared network name. The <command>server-tags</command> list is mandatory and it must contain one or more server tags as strings to explicitly associate the subnet with one or more user defined servers. It may include the special server tag "all" to associate the subnet with all servers.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "IPv6 subnet successfully set.",
-    "arguments": {
-        "id": &lt;subnet identifier&gt;,
-        "subnet": &lt;subnet prefix&gt;
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of remote-subnet6-set -->
-
-<!-- start of reservation-add -->
-<section xml:id="reference-reservation-add">
-<title>reservation-add reference</title>
-<para xml:id="ref-reservation-add"><command>reservation-add</command> - adds a new host reservation. The reservation may include IPv4 address,
-        IPv6 addresses, IPv6 prefixes, various identifiers, a class
-        the client will be assigned to, DHCPv4 and DHCPv6 options and
-        more.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.2.0 (<link linkend="commands-host_cmds-lib">host_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-reservation-add"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "reservation-add",
-    "arguments": {
-        "reservation": {
-            "boot-file-name": &lt;string&gt;,
-            "comment": &lt;string&gt;
-            "client-id": &lt;string&gt;,
-            "circuit-id": &lt;string&gt;,
-            "duid": &lt;string&gt;,
-            "flex-id": &lt;string&gt;,
-            "ip-address": &lt;string (IPv4 address)&gt;,
-            "ip-addresses": [ &lt;comma separated strings&gt; ],
-            "hw-address": &lt;string&gt;,
-            "hostname": &lt;string&gt;,
-            "next-server": &lt;string (IPv4 address)&gt;,
-            "option-data-list": [ &lt;comma separated structures defining options&gt; ],
-            "prefixes": [ &lt;comma separated IPv6 prefixes&gt; ],
-            "reservation-client-classes": [ &lt;comma separated strings&gt; ],
-            "server-hostname": &lt;string&gt;,
-            "subnet-id": &lt;integer&gt;,
-            "user-context": &lt;any valid JSON&gt;,
-        }
-    }
-}</screen>
-Note the ip-address, client-id, next-server, server-hostname and
-boot-file-name are IPv4 specific. duid, ip-addresses and prefixes are
-IPv6 specific.</para>
-
-<para>Response syntax:
-  <screen>
-{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)
-  </para></listitem>
-</itemizedlist></para>
-
-</section>
-<!-- end of reservation-add -->
-
-<!-- start of reservation-del -->
-<section xml:id="reference-reservation-del">
-<title>reservation-del reference</title>
-<para xml:id="ref-reservation-del"><command>reservation-del</command> - Deletes an existing host reservation.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.2.0 (<link linkend="commands-host_cmds-lib">host_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-reservation-del"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "reservation-del",
-    "arguments": {
-        "subnet-id": &lt;integer&gt;,
-        "ip-address": &lt;string&gt;,
-        "identifier-type": &lt;one of "hw-address", "duid", "circuit-id", "client-id" and "flex-id"&gt;,
-        "identifier": &lt;string&gt;
-    }
-}</screen>
-The host reservation can be identified by either (subnet-id, ip-address) pair or a triplet of (subnet-id, identifier-type, identifier).</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of reservation-del -->
-
-<!-- start of reservation-get -->
-<section xml:id="reference-reservation-get">
-<title>reservation-get reference</title>
-<para xml:id="ref-reservation-get"><command>reservation-get</command> - Attempts to retrieve an existing host reservation</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.2.0 (<link linkend="commands-host_cmds-lib">host_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-reservation-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "reservation-get",
-    "arguments": {
-        "subnet-id": &lt;integer&gt;,
-        "identifier-type": &lt;string with one value out of: hw-address|duid|circuit-id|client-id|flex-id&gt;,
-        "identifier": &lt;string&gt;;
-    }
-}</screen>
-The host reservation can be identified by either (subnet-id, ip-address) pair or a triplet of (subnet-id, identifier-type, identifier).</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;,
-    "arguments": {
-        "boot-file-name": &lt;string&gt;,
-        "comment": &lt;string&gt;
-        "client-id": &lt;string&gt;,
-        "circuit-id": &lt;string&gt;,
-        "duid": &lt;string&gt;,
-        "flex-id": &lt;string&gt;,
-        "ip-address": &lt;string (IPv4 address)&gt;,
-        "ip-addresses": [ &lt;comma separated strings&gt; ],
-        "hw-address": &lt;string&gt;,
-        "hostname": &lt;string&gt;,
-        "next-server": &lt;string (IPv4 address)&gt;,
-        "option-data-list": [ &lt;comma separated structures defining options&gt; ],
-        "prefixes": [ &lt;comma separated IPv6 prefixes&gt; ],
-        "reservation-client-classes": [ &lt;comma separated strings&gt; ],
-        "server-hostname": &lt;string&gt;,
-        "subnet-id": &lt;integer&gt;,
-        "user-context": &lt;any valid JSON&gt;,
-    }
-}</screen>
-Arguments object appear only if a host is found. Many fields in the arguments
-object appear only if specific field is set.</para>
-
-</section>
-<!-- end of reservation-get -->
-
-<!-- start of reservation-get-all -->
-<section xml:id="reference-reservation-get-all">
-<title>reservation-get-all reference</title>
-<para xml:id="ref-reservation-get-all"><command>reservation-get-all</command> - Retrieve all host reservations for a specified subnet.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-host_cmds-lib">host_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-reservation-get-all"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "reservation-get-all",
-    "arguments": {
-        "subnet-id": &lt;integer&gt;
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-reservation-get-all command may result in very large responses.</para>
-
-</section>
-<!-- end of reservation-get-all -->
-
-<!-- start of reservation-get-page -->
-<section xml:id="reference-reservation-get-page">
-<title>reservation-get-page reference</title>
-<para xml:id="ref-reservation-get-page"><command>reservation-get-page</command> - Retrieve host reservations for a specified subnet by page.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-host_cmds-lib">host_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-reservation-get-page"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "reservation-get-page",
-    "arguments": {
-        "subnet-id": &lt;integer&gt;,
-        "limit": &lt;integer&gt;,
-        "source-index": &lt;integer&gt;,
-        "from": &lt;integer&gt;
-    }
-}</screen>
-the subnet id and the page size limit are mandatory. The source index and from host id are optional and default to 0. Values to use to next the next page are returned in responses in a next map.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of reservation-get-page -->
-
-<!-- start of server-tag-get -->
-<section xml:id="reference-server-tag-get">
-<title>server-tag-get reference</title>
-<para xml:id="ref-server-tag-get"><command>server-tag-get</command> - The server-tag-get command returns the server tag.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (built-in)</para>
-
-<para>Description and examples: See <xref linkend="command-server-tag-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "server-tag-get"
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of server-tag-get -->
-
-<!-- start of shutdown -->
-<section xml:id="reference-shutdown">
-<title>shutdown reference</title>
-<para xml:id="ref-shutdown"><command>shutdown</command> - The shutdown command instructs the server to initiate its shutdown procedure.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command>, <command><link linkend="commands-kea-dhcp-ddns">kea-dhcp-ddns</link></command>, <command><link linkend="commands-kea-ctrl-agent">kea-ctrl-agent</link></command></para>
-
-<para>Availability: 1.0.0 (built-in)</para>
-
-<para>Description and examples: See <xref linkend="command-shutdown"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "shutdown"
-}</screen>
-The server will respond with a confirmation that the shutdown
-                    procedure has been initiated.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of shutdown -->
-
-<!-- start of stat-lease4-get -->
-<section xml:id="reference-stat-lease4-get">
-<title>stat-lease4-get reference</title>
-<para xml:id="ref-stat-lease4-get"><command>stat-lease4-get</command> - The stat-lease4-get command fetches lease statistics for a range
-              of known IPv4 subnets.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.4.0 (<link linkend="commands-stat_cmds-lib">stat_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-stat-lease4-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-  "command": "stat-lease4-get"
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "stat-lease4-get: 2 rows found",
-    "arguments": {
-      "result-set": {
-        "columns": [ "subnet-id",
-                       "total-addresses",
-                       "assigned-addresses",
-                       "declined-addresses" ]
-        "rows": [
-          [ 10, 256, 111, 0 ],
-          [ 20, 4098, 2034, 4 ]
-        ],
-      "timestamp": "2018-05-04 15:03:37.000000"
-      }
-    }
-  }</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of stat-lease4-get -->
-
-<!-- start of stat-lease6-get -->
-<section xml:id="reference-stat-lease6-get">
-<title>stat-lease6-get reference</title>
-<para xml:id="ref-stat-lease6-get"><command>stat-lease6-get</command> - The stat-lease6-get command fetches lease statistics for a range
-              of known IPv6 subnets.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.4.0 (<link linkend="commands-stat_cmds-lib">stat_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-stat-lease6-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-  "command": "stat-lease6-get",
-  "arguments": {
-    "subnet-id" : 10
-  }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "stat-lease6-get: 2 rows found",
-    "arguments": {
-      "result-set": {
-        "columns": [ "subnet-id", "total-nas", "assigned-nas", "declined-nas", "total-pds", "assigned-pds" ]
-        "rows": [
-          [ 10, 4096, 2400, 3, 0, 0],
-          [ 20, 0, 0, 0, 1048, 233 ]
-          [ 30, 256, 60, 0, 1048, 15 ]
-        ],
-      "timestamp": "2018-05-04 15:03:37.000000"
-      }
-    }
-  }</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of stat-lease6-get -->
-
-<!-- start of statistic-get -->
-<section xml:id="reference-statistic-get">
-<title>statistic-get reference</title>
-<para xml:id="ref-statistic-get"><command>statistic-get</command> - The statistic-get command retrieves a single statistic. It takes a single string parameter called name that specifies the statistic name.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.0.0 (built-in)</para>
-
-<para>Description and examples: See <xref linkend="command-statistic-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "statistic-get",
-    "arguments": {
-        "name": "pkt4-received"
-    }
-}</screen>
-The server will respond with details of the requested statistic, with a result set to 0 indicating success and the specified statistic as the value of the "arguments" parameter.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of statistic-get -->
-
-<!-- start of statistic-get-all -->
-<section xml:id="reference-statistic-get-all">
-<title>statistic-get-all reference</title>
-<para xml:id="ref-statistic-get-all"><command>statistic-get-all</command> - The statistic-get-all command retrieves all statistics recorded.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.0.0 (built-in)</para>
-
-<para>Description and examples: See <xref linkend="command-statistic-get-all"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "statistic-get-all",
-    "arguments": { }
-}</screen>
-The server will respond with details of all recorded statistics, with result set to 0 indicating that it iterated over all statistics (even when the total number of statistics is zero).</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of statistic-get-all -->
-
-<!-- start of statistic-remove -->
-<section xml:id="reference-statistic-remove">
-<title>statistic-remove reference</title>
-<para xml:id="ref-statistic-remove"><command>statistic-remove</command> - The statistic-remove command attempts to delete a single statistic. It takes a single string parameter called name that specifies the statistic name.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.0.0 (built-in)</para>
-
-<para>Description and examples: See <xref linkend="command-statistic-remove"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "statistic-remove",
-    "arguments": {
-        "name": "pkt4-received"
-    }
-}</screen>
-If the specific statistic is found and its removal was successful, the server will respond with a status of 0, indicating success and an empty parameters field. If an error is encountered (e.g. requested statistic was not found), the server will return a status code of 1 (error) and the text field will contain the error description.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of statistic-remove -->
-
-<!-- start of statistic-remove-all -->
-<section xml:id="reference-statistic-remove-all">
-<title>statistic-remove-all reference</title>
-<para xml:id="ref-statistic-remove-all"><command>statistic-remove-all</command> - The statistic-remove-all command attempts to delete all statistics.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.0.0 (built-in)</para>
-
-<para>Description and examples: See <xref linkend="command-statistic-remove-all"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "statistic-remove-all",
-    "arguments": { }
-}</screen>
-If the removal of all statistics was successful, the server will respond with a status of 0, indicating success and an empty parameters field. If an error is encountered, the server will return a status code of 1 (error) and the text field will contain the error description.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of statistic-remove-all -->
-
-<!-- start of statistic-reset -->
-<section xml:id="reference-statistic-reset">
-<title>statistic-reset reference</title>
-<para xml:id="ref-statistic-reset"><command>statistic-reset</command> - The statistic-reset command sets the specified statistic to its neutral value: 0 for integer, 0.0 for float, 0h0m0s0us for time duration and "" for string type. It takes a single string parameter called name that specifies the statistic name.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.0.0 (built-in)</para>
-
-<para>Description and examples: See <xref linkend="command-statistic-reset"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "statistic-reset",
-    "arguments": {
-        "name": "pkt4-received"
-    }
-}</screen>
-If the specific statistic is found and reset was successful, the server will respond with a status of 0, indicating success and an empty parameters field. If an error is encountered (e.g. requested statistic was not found), the server will return a status code of 1 (error) and the text field will contain the error description.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of statistic-reset -->
-
-<!-- start of statistic-reset-all -->
-<section xml:id="reference-statistic-reset-all">
-<title>statistic-reset-all reference</title>
-<para xml:id="ref-statistic-reset-all"><command>statistic-reset-all</command> - The statistic-reset command sets all statistics to their neutral values: 0 for integer, 0.0 for float, 0h0m0s0us for time duration and "" for string type.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.0.0 (built-in)</para>
-
-<para>Description and examples: See <xref linkend="command-statistic-reset-all"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "statistic-reset-all",
-    "arguments": { }
-}</screen>
-If the operation is successful, the server will respond with a status of 0, indicating success and an empty parameters field. If an error is encountered, the server will return a status code of 1 (error) and the text field will contain the error description.</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of statistic-reset-all -->
-
-<!-- start of subnet4-add -->
-<section xml:id="reference-subnet4-add">
-<title>subnet4-add reference</title>
-<para xml:id="ref-subnet4-add"><command>subnet4-add</command> - This command is used to create and add a new subnet to the existing server configuration.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-subnet_cmds-lib">subnet_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-subnet4-add"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "subnet4-add",
-    "arguments": {
-        "subnets": [ {
-            "id": 123,
-            "subnet": "10.20.30.0/24",
-            ...
-        } ]
-    }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "IPv4 subnet added",
-    "arguments": {
-        "subnets": [
-            {
-                "id": 123,
-                "subnet": "10.20.30.0/24"
-            }
-        ]
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of subnet4-add -->
-
-<!-- start of subnet4-del -->
-<section xml:id="reference-subnet4-del">
-<title>subnet4-del reference</title>
-<para xml:id="ref-subnet4-del"><command>subnet4-del</command> - This command is used to remove a subnet from the server's configuration. This command has no effect on other configured subnets but removing a subnet has certain implications which the server's administrator should be aware of.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-subnet_cmds-lib">subnet_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-subnet4-del"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "subnet4-del",
-    "arguments": {
-        "id": 123
-    }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "IPv4 subnet 192.0.2.0/24 (id 123) deleted",
-    "arguments": {
-        "subnets": [
-            {
-                "id": 123,
-                "subnet": "192.0.2.0/24"
-            }
-        ]
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of subnet4-del -->
-
-<!-- start of subnet4-get -->
-<section xml:id="reference-subnet4-get">
-<title>subnet4-get reference</title>
-<para xml:id="ref-subnet4-get"><command>subnet4-get</command> - This command is used to retrieve detailed information about the specified subnet. This command usually follows the subnet4-list, which is used to discover available subnets with their respective subnet identifiers and prefixes.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-subnet_cmds-lib">subnet_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-subnet4-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "subnet4-get",
-    "arguments": {
-        "id": 10
-    }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "Info about IPv4 subnet 10.0.0.0/8 (id 10) returned",
-    "arguments": {
-        "subnets": [
-            {
-                "subnet": "10.0.0.0/8",
-                "id": 1,
-                "option-data": [
-                    ....
-                ]
-                ...
-            }
-        ]
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of subnet4-get -->
-
-<!-- start of subnet4-list -->
-<section xml:id="reference-subnet4-list">
-<title>subnet4-list reference</title>
-<para xml:id="ref-subnet4-list"><command>subnet4-list</command> - This command is used to list all currently configured subnets. The subnets are returned in a brief form, i.e. a subnet identifier and subnet prefix is included for each subnet.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-subnet_cmds-lib">subnet_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-subnet4-list"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "subnet4-list"
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "2 IPv4 subnets found",
-    "arguments": {
-    "subnets": [
-        {
-            "id": 10,
-            "subnet": "10.0.0.0/8"
-        },
-        {
-            "id": 100,
-            "subnet": "192.0.2.0/24"
-        }
-    ]
-}</screen>
-If no IPv4 subnets are found, an error code is returned along with the error description.</para>
-
-</section>
-<!-- end of subnet4-list -->
-
-<!-- start of subnet4-update -->
-<section xml:id="reference-subnet4-update">
-<title>subnet4-update reference</title>
-<para xml:id="ref-subnet4-update"><command>subnet4-update</command> - This command is used to update a subnet in the existing server configuration.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-subnet_cmds-lib">subnet_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-subnet4-update"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "subnet4-update",
-    "arguments": {
-        "subnets": [ {
-            "id": 123,
-            "subnet": "10.20.30.0/24",
-            ...
-        } ]
-    }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "IPv4 subnet updated",
-    "arguments": {
-        "subnets": [
-            {
-                "id": 123,
-                "subnet": "10.20.30.0/24"
-            }
-        ]
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of subnet4-update -->
-
-<!-- start of subnet6-add -->
-<section xml:id="reference-subnet6-add">
-<title>subnet6-add reference</title>
-<para xml:id="ref-subnet6-add"><command>subnet6-add</command> - This command is used to create and add new subnet to the existing server configuration. This operation has no impact on other subnets.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-subnet_cmds-lib">subnet_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-subnet6-add"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "subnet6-add",
-    "arguments": {
-        "subnet6": [ {
-            "id": 234,
-            "subnet": "2001:db8:1::/64",
-            ...
-        } ]
-    }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "IPv6 subnet added",
-    "arguments": {
-        "subnet6": [
-            {
-                "id": 234,
-                "subnet": "2001:db8:1::/64"
-            }
-        ]
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of subnet6-add -->
-
-<!-- start of subnet6-del -->
-<section xml:id="reference-subnet6-del">
-<title>subnet6-del reference</title>
-<para xml:id="ref-subnet6-del"><command>subnet6-del</command> - This command is used to remove a subnet from the server's configuration. This command has no effect on other configured subnets but removing a subnet has certain implications which the server's administrator should be aware of.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-subnet_cmds-lib">subnet_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-subnet6-del"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "subnet6-del",
-    "arguments": {
-        "id": 234
-    }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "IPv6 subnet 2001:db8:1::/64 (id 234) deleted",
-    "subnets": [
-        {
-            "id": 234,
-            "subnet": "2001:db8:1::/64"
-        }
-    ]
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of subnet6-del -->
-
-<!-- start of subnet6-get -->
-<section xml:id="reference-subnet6-get">
-<title>subnet6-get reference</title>
-<para xml:id="ref-subnet6-get"><command>subnet6-get</command> - This command is used to retrieve detailed information about the specified subnet. This command usually follows the subnet6-list, which is used to discover available subnets with their respective subnet identifiers and prefixes.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-subnet_cmds-lib">subnet_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-subnet6-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "subnet6-get",
-    "arguments": {
-        "id": 11
-    }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "Info about IPv6 subnet 2001:db8:1::/64 (id 11) returned",
-    "arguments": {
-        "subnets": [
-            {
-                "subnet": "2001:db8:1::/64",
-                "id": 1,
-                "option-data": [
-                    ...
-                ]
-                ....
-            }
-        ]
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of subnet6-get -->
-
-<!-- start of subnet6-list -->
-<section xml:id="reference-subnet6-list">
-<title>subnet6-list reference</title>
-<para xml:id="ref-subnet6-list"><command>subnet6-list</command> - This command is used to list all currently configured subnets. The subnets are returned in a brief form, i.e. a subnet identifier and subnet prefix is included for each subnet.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.3.0 (<link linkend="commands-subnet_cmds-lib">subnet_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-subnet6-list"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "subnet6-list"
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "2 IPv6 subnets found",
-    "arguments": {
-    "subnets": [
-        {
-            "id": 11,
-            "subnet": "2001:db8:1::/64"
-        },
-        {
-            "id": 233,
-            "subnet": "3000::/16"
-        }
-    ]
-}</screen>
-If no IPv6 subnets are found, an error code is returned along with the error description.</para>
-
-</section>
-<!-- end of subnet6-list -->
-
-<!-- start of subnet6-update -->
-<section xml:id="reference-subnet6-update">
-<title>subnet6-update reference</title>
-<para xml:id="ref-subnet6-update"><command>subnet6-update</command> - This command is used to update a subnet in the existing server configuration. This operation has no impact on other subnets.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
-
-<para>Availability: 1.6.0 (<link linkend="commands-subnet_cmds-lib">subnet_cmds</link>  hook)</para>
-
-<para>Description and examples: See <xref linkend="command-subnet6-update"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "subnet6-update",
-    "arguments": {
-        "subnet6": [ {
-            "id": 234,
-            "subnet": "2001:db8:1::/64",
-            ...
-        } ]
-    }
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": 0,
-    "text": "IPv6 subnet updated",
-    "arguments": {
-        "subnet6": [
-            {
-                "id": 234,
-                "subnet": "2001:db8:1::/64"
-            }
-        ]
-    }
-}</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of subnet6-update -->
-
-<!-- start of version-get -->
-<section xml:id="reference-version-get">
-<title>version-get reference</title>
-<para xml:id="ref-version-get"><command>version-get</command> - The version-get command returns extended information about
-              Kea version. The returned string is the same as if Kea would
-              be run with -V command line option.</para>
-
-<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command>, <command><link linkend="commands-kea-dhcp-ddns">kea-dhcp-ddns</link></command>, <command><link linkend="commands-kea-ctrl-agent">kea-ctrl-agent</link></command></para>
-
-<para>Availability: 1.2.0 (built-in)</para>
-
-<para>Description and examples: See <xref linkend="command-version-get"/></para>
-
-<para>Command syntax:
-  <screen>{
-    "command": "version-get"
-}</screen>
-</para>
-
-<para>Response syntax:
-  <screen>{
-    "result": &lt;integer&gt;,
-    "text": &lt;string&gt;
-}
-</screen>
-Result is an integer representation of the status. Currently supported statuses are:
-<itemizedlist>
-  <listitem><para>0 - success</para></listitem>
-  <listitem><para>1 - error</para></listitem>
-  <listitem><para>2 - unsupported</para></listitem>
-  <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)</para></listitem>
-</itemizedlist>
-</para>
-
-</section>
-<!-- end of version-get -->
-
-</appendix>
diff --git a/doc/guide/classify.xml b/doc/guide/classify.xml
deleted file mode 100644 (file)
index 83f51fd..0000000
+++ /dev/null
@@ -1,1199 +0,0 @@
-<!--
- - Copyright (C) 2015-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-
-<!-- Converted by db4-upgrade version 1.1 -->
-<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="classify">
-  <title>Client Classification</title>
-
-  <section>
-    <title>Client Classification Overview</title>
-      <para>
-      In certain cases it is useful to differentiate between different
-      types of clients and treat them accordingly. Common reasons include:
-      <itemizedlist>
-      <listitem><para>
-      The clients represent different pieces of topology, e.g. a cable
-      modem is not the same as the clients behind that modem.
-      </para></listitem>
-      <listitem><para>
-      The clients have different behavior, e.g. a smart phone behaves
-      differently from a laptop.
-      </para></listitem>
-      <listitem><para>
-      The clients require different values for some options, e.g. a docsis3.0
-      cable modem requires different settings from a docsis2.0 cable modem.
-      </para></listitem>
-      </itemizedlist>
-      </para>
-
-      <para>
-      To make management easier, different clients can be grouped into a client class to receive
-      common options.
-      </para>
-
-      <para>
-      An incoming packet can be associated with a client class in
-      several ways:
-      <itemizedlist>
-      <listitem><para>
-      Implicitly, using a vendor class option or another builtin condition.
-      </para></listitem>
-      <listitem><para>
-      Using an expression which evaluates to true.
-      </para></listitem>
-      <listitem><para>
-      Using static host reservations, a shared network, a subnet, etc.
-      </para></listitem>
-      <listitem><para>
-      Using a hook.
-      </para></listitem>
-      </itemizedlist>
-      </para>
-
-      <para>
-      It is envisaged that client classification will be used for
-      changing the behavior of almost any part of the DHCP message
-      processing.
-      There are currently five mechanisms that take advantage of
-      client classification: subnet selection, pool selection,
-      definition of DHCPv4 private (codes 224-254) and code 43
-      options, assignment of different options, and, for DHCPv4 cable
-      modems, the setting of specific options for use with the TFTP
-      server address and the boot file field.
-      </para>
-
-      <para>
-      The classification process is conducted in several steps:
-      <orderedlist>
-      <listitem><para>
-      The ALL class is associated with the incoming packet.
-      </para></listitem>
-      <listitem><para>
-      Vendor class options are processed.
-      </para></listitem>
-      <listitem><para>
-      Classes with matching expressions and not marked for later ("on
-      request" or depending on the KNOWN/UNKNOWN builtin classes)
-      evaluation are processed in the order they are defined in the
-      configuration; the boolean expression is evaluated and, if it
-      returns true ("match"), the incoming packet is associated with the
-      class.
-      </para></listitem>
-      <listitem><para>
-      If a private or code 43 DHCPv4 option is received, it is decoded
-      following its client class or global (or, for option 43, last
-      resort) definition.
-      </para></listitem>
-      <listitem><para>
-      When the incoming packet belongs the special class, "DROP", it is
-      dropped and an informational message is logged with the packet
-      information.
-      </para></listitem>
-      <listitem><para>
-      A subnet is chosen, possibly based on the class information when
-      some subnets are reserved. More precisely: when choosing a subnet,
-      the server iterates over all of the subnets that are
-      feasible given the information found in the packet (client
-      address, relay address, etc). It uses the first subnet it
-      finds that either doesn't have a class associated with it, or
-      has a class which matches one of the packet's classes.
-      </para></listitem>
-      <listitem><para>
-      The server looks for host reservations. If an identifier from the
-      incoming packet matches a host reservation in the subnet or
-      shared network, the packet is associated with the KNOWN class
-      and all classes of the host reservation. If a reservation is not
-      found, the packet is assigned to the UNKNOWN class.
-      </para></listitem>
-      <listitem><para>
-      Classes with matching expressions - directly or indirectly using
-      the KNOWN/UNKNOWN builtin classes and not marked for later ("on
-      request") evaluation - are processed in the order they are defined
-      in the configuration; the boolean expression is evaluated and,
-      if it returns true ("match"), the incoming packet is associated
-      with the class. After a subnet is selected, the server determines
-      whether there is a reservation for a given client. Therefore, it
-      is not possible to use KNOWN/UNKNOWN classes to select a shared
-      network or a subnet, nor to make the DROP class dependent of
-      KNOWN/UNKNOWN classes.
-      </para></listitem>
-      <listitem><para>
-      If needed, addresses and prefixes from pools are assigned,
-      possibly based on the class information when some pools are
-      reserved for class members.
-      </para></listitem>
-      <listitem><para>
-      Classes marked as "required" are evaluated in the order in which they
-      are listed: first the shared network, then the subnet,
-      and finally the pools that assigned resources belong to.
-      </para></listitem>
-      <listitem><para>
-      Options are assigned, again possibly based on the class information
-      in the order that classes were associated with the incoming packet.
-      For DHCPv4 private and code 43 options, this includes class local
-      option definitions.
-      </para></listitem>
-      </orderedlist>
-      </para>
-
-      <note>
-      <para>
-      Client classes in Kea follow the order
-      in which they are specified in the configuration
-      (vs. alphabetical order). Required classes
-      follow the order in which they are required.
-      </para>
-      </note>
-
-      <para>
-      When determining which options to include in the response, the
-      server examines the union of options from all of the
-      assigned classes. If two or more classes include the
-      same option, the value from the first class examined is
-      used; classes are examined in the order they were associated,
-      so ALL is always the first class and matching required classes
-      are last.
-      </para>
-
-      <para>
-      As an example, imagine that an incoming packet matches two
-      classes. Class "foo" defines values for an NTP server (option
-      42 in DHCPv4) and an SMTP server (option 69 in DHCPv4), while
-      class "bar" defines values for an NTP server and a POP3 server
-      (option 70 in DHCPv4). The server examines the three
-      options - NTP, SMTP, and POP3 - and returns any that the
-      client requested. As the NTP server was defined twice, the
-      server chooses only one of the values for the reply; the
-      class from which the value is obtained is unspecified.
-      </para>
-
-      <note>
-      <para>
-        Care should be taken with client classification as it is easy for
-        clients that do not meet any class criteria to be denied service altogether.
-      </para>
-      </note>
-  </section>
-
-  <section xml:id="classification-using-vendor">
-    <title>Builtin Client Classes</title>
-      <para>
-      Some classes are builtin, so they do not need to be defined. The main
-      example uses Vendor Class information: The server checks whether
-      an incoming DHCPv4 packet includes the vendor class identifier
-      option (60) or an incoming DHCPv6 packet includes the vendor
-      class option (16). If it does, the content of that option is
-      prepended with &quot;VENDOR_CLASS_&quot; and the result is
-      interpreted as a class. For example, modern cable modems
-      send this option with value &quot;docsis3.0&quot;, so the
-      packet belongs to class &quot;VENDOR_CLASS_docsis3.0&quot;.
-      </para>
-
-      <para>The &quot;HA_&quot; prefix is used by the High Availability
-      hooks library to designate certain servers to process DHCP packets
-      as a result of load balancing. The class name is constructed by
-      prepending the &quot;HA_&quot; prefix to the name of the server
-      which should process the DHCP packet. This server will use an appropriate
-      pool or subnet to allocate IP addresses (and/or prefixes), based on
-      the assigned client classes. The details can be found in
-      <xref linkend="high-availability-library"/>.</para>
-
-      <para>Other examples are: the ALL class, which all incoming packets
-      belong to, and the KNOWN class, assigned when host reservations exist
-      for a particular client. By convention, builtin classes' names
-      begin with all capital letters.
-      </para>
-
-      <para>Currently recognized builtin class names are ALL, KNOWN
-      and UNKNOWN, and prefixes VENDOR_CLASS_, HA_, AFTER_, and
-      EXTERNAL_. Although the AFTER_ prefix is a provision for an as-yet-unwritten
-      hook, the EXTERNAL_ prefix can be freely used; builtin
-      classes are implicitly defined so they never raise warnings if they
-      do not appear in the configuration.
-      </para>
-
-  </section>
-
-  <section xml:id="classification-using-expressions">
-    <title>Using Expressions in Classification</title>
-      <para>
-      The expression portion of a classification definition contains operators and
-      values. All values are currently strings; operators take a
-      string or strings and return another string. When all the
-      operations have completed, the result should be a value of
-      &quot;true&quot; or &quot;false&quot;. The packet belongs to
-      the class (and the class name is added to the list of classes)
-      if the result is &quot;true&quot;. Expressions are written in
-      standard format and can be nested.
-      </para>
-
-      <para>
-      Expressions are pre-processed during the parsing of the
-      configuration file and converted to an internal
-      representation. This allows certain types of errors to be caught
-      and logged during parsing. Examples of these errors include an
-      incorrect number or type of argument to an operator. The
-      evaluation code also checks for this class of error and
-      generally throws an exception, though this should not occur in a
-      normally functioning system.
-      </para>
-
-      <para>
-      Other issues, for example the starting position of a substring being
-      outside of the substring or an option not existing in the packet, result
-      in the operator returning an empty string.
-      </para>
-
-      <para>
-      Dependencies between classes are also checked. For instance,
-      forward dependencies are rejected when the configuration is
-      parsed; an expression can only depend on already-defined classes
-      (including builtin classes) which are evaluated in a
-      previous or the same evaluation phase. This does not apply to
-      the KNOWN or UNKNOWN classes.
-      </para>
-
-      <para>
-        <table frame="all" xml:id="classification-values-list">
-          <title>List of Classification Values</title>
-          <tgroup cols="3">
-          <colspec colname="name"/>
-          <colspec colname="example"/>
-          <colspec colname="description"/>
-          <thead>
-            <row>
-              <entry>Name</entry>
-              <entry>Example expression</entry>
-              <entry>Example value</entry>
-              <entry>Description</entry>
-            </row>
-          </thead>
-
-          <tbody>
-            <row>
-              <entry>String literal</entry>
-              <entry>'example'</entry>
-              <entry>'example'</entry>
-              <entry>A string</entry>
-            </row>
-            <row>
-              <entry>Hexadecimal string literal</entry>
-              <entry>0x5a7d</entry>
-              <entry>'Z}'</entry>
-              <entry>A hexadecimal string</entry>
-            </row>
-            <row>
-              <entry>IP address literal</entry>
-              <entry>10.0.0.1</entry>
-              <entry>0x0a000001</entry>
-              <entry>An IP address</entry>
-            </row>
-            <row>
-              <entry>Integer literal</entry>
-              <entry>123</entry>
-              <entry>'123'</entry>
-              <entry>A 32-bit unsigned integer value</entry>
-            </row>
-            <row/>
-            <row>
-              <entry>Binary content of the option</entry>
-              <entry>option[123].hex</entry>
-              <entry>'(content of the option)'</entry>
-              <entry>The value of the option with given code from the
-              packet as hex</entry>
-            </row>
-<!-- Text option not fully defined yet, leave it out
-            <row>
-              <entry>Option Text</entry>
-              <entry>option[123].text</entry>
-              <entry>'foobar'</entry>
-              <entry>The value of the option with given code from the
-              packet as text</entry>
-            </row>
--->
-            <row>
-              <entry>Option existence</entry>
-              <entry>option[123].exists</entry>
-              <entry>'true'</entry>
-              <entry>If the option with given code is present in the
-              packet "true" else "false"</entry>
-            </row>
-            <row>
-              <entry>Client class membership</entry>
-              <entry>member('foobar')</entry>
-              <entry>'true'</entry>
-              <entry>If the packet belongs to the given client class
-              "true" else "false"</entry>
-            </row>
-            <row>
-              <entry>Known client</entry>
-              <entry>known</entry>
-              <entry>member('KNOWN')</entry>
-              <entry>If there is a host reservation for the client
-              "true" else "false"</entry>
-            </row>
-            <row>
-              <entry>Unknown client</entry>
-              <entry>unknown</entry>
-              <entry>not member('KNOWN')</entry>
-              <entry>If there is a host reservation for the client
-              "false" else "true"</entry>
-            </row>
-            <row>
-              <entry>DHCPv4 relay agent sub-option</entry>
-              <entry>relay4[123].hex</entry>
-              <entry>'(content of the RAI sub-option)'</entry>
-              <entry>The value of sub-option with given code from the
-              DHCPv4 Relay Agent Information option (option 82)</entry>
-            </row>
-            <row>
-              <entry>DHCPv6 Relay Options</entry>
-              <entry>relay6[nest].option[code].hex</entry>
-              <entry>(value of the option)</entry>
-              <entry>The value of the option with code "code" from the
-              relay encapsulation "nest"</entry>
-            </row>
-            <row>
-              <entry>DHCPv6 Relay Peer Address</entry>
-              <entry>relay6[nest].peeraddr</entry>
-              <entry>2001:DB8::1</entry>
-              <entry>The value of the peer address field from the
-              relay encapsulation "nest"</entry>
-            </row>
-            <row>
-              <entry>DHCPv6 Relay Link Address</entry>
-              <entry>relay6[nest].linkaddr</entry>
-              <entry>2001:DB8::1</entry>
-              <entry>The value of the link address field from the
-              relay encapsulation "nest"</entry>
-            </row>
-            <row>
-              <entry>Interface name of packet</entry>
-              <entry>pkt.iface</entry>
-              <entry>eth0</entry>
-              <entry>The name of the incoming interface of a DHCP packet.</entry>
-            </row>
-            <row>
-              <entry>Source address of packet</entry>
-              <entry>pkt.src</entry>
-              <entry>10.1.2.3</entry>
-              <entry>The IP source address of a DHCP packet.</entry>
-            </row>
-            <row>
-              <entry>Destination address of packet</entry>
-              <entry>pkt.dst</entry>
-              <entry>10.1.2.3</entry>
-              <entry>The IP destination address of a DHCP packet.</entry>
-            </row>
-            <row>
-              <entry>Length of packet</entry>
-              <entry>pkt.len</entry>
-              <entry>513</entry>
-              <entry>The length of a DHCP packet (UDP header field), expressed
-              as a 32-bit unsigned integer.</entry>
-            </row>
-            <row>
-              <entry>Hardware address in DHCPv4 packet</entry>
-              <entry>pkt4.mac</entry>
-              <entry>0x010203040506</entry>
-              <entry>The value of the chaddr field of the DHCPv4 packet, hlen (0 to 16) bytes</entry>
-            </row>
-            <row>
-              <entry>Hardware length in DHCPv4 packet</entry>
-              <entry>pkt4.hlen</entry>
-              <entry>6</entry>
-              <entry>The value of the hlen field of the DHCPv4 packet padded to 4 bytes</entry>
-            </row>
-            <row>
-              <entry>Hardware type in DHCPv4 packet</entry>
-              <entry>pkt4.htype</entry>
-              <entry>6</entry>
-              <entry>The value of the htype field of the DHCPv4 packet padded to 4 bytes</entry>
-            </row>
-            <row>
-              <entry>ciaddr field in DHCPv4 packet</entry>
-              <entry>pkt4.ciaddr</entry>
-              <entry>192.0.2.1</entry>
-              <entry>The value of the ciaddr field of the DHCPv4 packet (IPv4 address, 4 bytes)</entry>
-            </row>
-            <row>
-              <entry>giaddr field in DHCPv4 packet</entry>
-              <entry>pkt4.giaddr</entry>
-              <entry>192.0.2.1</entry>
-              <entry>The value of the giaddr field of the DHCPv4 packet (IPv4 address, 4 bytes)</entry>
-            </row>
-            <row>
-              <entry>yiaddr field in DHCPv4 packet</entry>
-              <entry>pkt4.yiaddr</entry>
-              <entry>192.0.2.1</entry>
-              <entry>The value of the yiaddr field of the DHCPv4 packet (IPv4 address, 4 bytes)</entry>
-            </row>
-            <row>
-              <entry>siaddr field in DHCPv4 packet</entry>
-              <entry>pkt4.siaddr</entry>
-              <entry>192.0.2.1</entry>
-              <entry>The value of the siaddr field of the DHCPv4 packet (IPv4 address, 4 bytes)</entry>
-            </row>
-            <row>
-              <entry>Message type in DHCPv4 packet</entry>
-              <entry>pkt4.msgtype</entry>
-              <entry>1</entry>
-              <entry>The value of the message type field in the DHCPv4
-              packet (expressed as a 32-bit unsigned integer).</entry>
-            </row>
-            <row>
-              <entry>Transaction ID (xid) in DHCPv4 packet</entry>
-              <entry>pkt4.transid</entry>
-              <entry>12345</entry>
-              <entry>The value of the transaction id in the DHCPv4
-              packet (expressed as a 32-bit unsigned integer).</entry>
-            </row>
-            <row>
-              <entry>Message type in DHCPv6 packet</entry>
-              <entry>pkt6.msgtype</entry>
-              <entry>1</entry>
-              <entry>The value of the message type field in the DHCPv6
-              packet (expressed as a 32-bit unsigned integer).</entry>
-            </row>
-            <row>
-              <entry>Transaction ID in DHCPv6 packet</entry>
-              <entry>pkt6.transid</entry>
-              <entry>12345</entry>
-              <entry>The value of the transaction id in the DHCPv6
-              packet (expressed as a 32-bit unsigned integer).</entry>
-            </row>
-
-            <row>
-              <entry>Vendor option existence (any vendor)</entry>
-              <entry>vendor[*].exists</entry>
-              <entry>true</entry>
-              <entry>Returns whether a vendor option from any vendor
-              is present ('true') or absent ('false').</entry>
-            </row>
-            <row>
-              <entry>Vendor option existence (specific vendor)</entry>
-              <entry>vendor[4491].exists</entry>
-              <entry>true</entry>
-              <entry>Returns whether a vendor option from specified
-              vendor (determined by its enterprise-id)
-              is present ('true') or absent ('false').</entry>
-            </row>
-            <row>
-              <entry>Enterprise-id from vendor option</entry>
-              <entry>vendor.enterprise</entry>
-              <entry>4491</entry>
-              <entry>If the vendor option is present, it returns the
-              value of the enterprise-id field padded to 4
-              bytes. Returns "" otherwise.</entry>
-            </row>
-            <row>
-              <entry>Vendor sub-option existence</entry>
-              <entry>vendor[4491].option[1].exists</entry>
-              <entry>true</entry>
-              <entry>Returns 'true' if there is vendor option with
-              specified enterprise-id and given sub-option is present.
-              Returns 'false' otherwise.</entry>
-            </row>
-            <row>
-              <entry>Vendor sub-option content</entry>
-              <entry>vendor[4491].option[1].hex</entry>
-              <entry>docsis3.0</entry>
-              <entry>Returns content of the specified sub-option of
-              a vendor option with specified enterprise id. Returns
-              '' if no such option or sub-option is present.
-              </entry>
-            </row>
-
-            <row>
-              <entry>Vendor class option existence (any vendor)</entry>
-              <entry>vendor-class[*].exists</entry>
-              <entry>true</entry>
-              <entry>Returns whether a vendor class option from any vendor
-              is present ('true') or absent ('false').</entry>
-            </row>
-            <row>
-              <entry>Vendor class option existence (specific vendor)</entry>
-              <entry>vendor-class[4491].exists</entry>
-              <entry>true</entry>
-              <entry>Returns whether a vendor class option from specified
-              vendor (determined by its enterprise-id)
-              is present ('true') or absent ('false').</entry>
-            </row>
-            <row>
-              <entry>Enterprise-id from vendor class option</entry>
-              <entry>vendor-class.enterprise</entry>
-              <entry>4491</entry>
-              <entry>If the vendor option is present, it returns the
-              value of the enterprise-id field padded to 4
-              bytes. Returns "" otherwise.</entry>
-            </row>
-            <row>
-              <entry>First data chunk from vendor class option</entry>
-              <entry>vendor-class[4491].data</entry>
-              <entry>docsis3.0</entry>
-              <entry>Returns content of the first data chunk from
-              the vendor class option with specified enterprise-id.
-              Returns "" if missing.</entry>
-            </row>
-            <row>
-              <entry>Specific data chunk from vendor class option</entry>
-              <entry>vendor-class[4491].data[3]</entry>
-              <entry>docsis3.0</entry>
-              <entry>Returns content of the specified data chunk of
-              a vendor class option with specified enterprise id. Returns
-              '' if no such option or data chunk is present.
-              </entry>
-            </row>
-          </tbody>
-          </tgroup>
-        </table>
-        Notes:
-      </para>
-
-      <itemizedlist>
-
-      <listitem><para>
-      Hexadecimal strings are converted into a string as expected. The starting "0X" or
-      "0x" is removed, and if the string is an odd number of characters a
-      "0" is prepended to it.
-      </para></listitem>
-
-      <listitem><para>
-      IP addresses are converted into strings of length 4 or 16. IPv4, IPv6,
-      and IPv4-embedded IPv6 (e.g., IPv4-mapped IPv6) addresses are supported.
-      </para></listitem>
-
-      <listitem><para>
-      Integers in an expression are converted to 32-bit unsigned integers and
-      are represented as four-byte strings; for example, 123 is represented as
-      0x0000007b. All expressions that return numeric values use 32-bit
-      unsigned integers, even if the field in the packet is smaller. In general,
-      it is easier to use decimal notation to represent integers, but it is also
-      possible to use hexadecimal notation. When writing an integer in hexadecimal,
-      care should be taken to make sure the value is represented as 32
-      bits, e.g. use 0x00000001 instead of 0x1 or 0x01. Also, make
-      sure the value is specified in network order, e.g. 1 is
-      represented as 0x00000001.
-      </para></listitem>
-
-      <listitem><para>
-      "option[code].hex" extracts the value of the option with the code "code"
-      from the incoming packet. If the packet doesn't contain the option, it
-      returns an empty string. The string is presented as a byte string of
-      the option payload, without the type code or length fields.
-      </para></listitem>
-
-      <listitem><para>
-      "option[code].exists" checks whether an option with the code "code" is present
-      in the incoming packet. It can be used with empty options.
-      </para></listitem>
-
-      <listitem><para>
-      "member('foobar')" checks whether the packet belongs to the client
-      class "foobar". To avoid dependency loops, the configuration file
-      parser verifies whether client classes were already defined or are
-      builtin, i.e., beginning by &quot;VENDOR_CLASS_&quot;,
-      &quot;AFTER__&quot; (for the to come "after" hook) and
-      &quot;EXTERNAL_&quot; or equal to &quot;ALL&quot;, &quot;KNOWN&quot;,
-      &quot;UNKNOWN&quot;etc.
-      </para>
-      <para>"known" and "unknown" are short hands for "member('KNOWN')" and
-      "not member('KNOWN')". Note the evaluation of any expression using
-      directly or indirectly the &quot;KNOWN&quot; class is deferred
-      after the host reservation lookup (i.e. when the &quot;KNOWN&quot;
-      or &quot;UNKNOWN&quot; partition is determined).
-      </para></listitem>
-
-      <listitem><para>
-      "relay4[code].hex" attempts to extract the value of the sub-option
-      "code" from the option inserted as the DHCPv4 Relay Agent Information
-      (82) option. If the packet doesn't contain a RAI option, or the RAI
-      option doesn't contain the requested sub-option, the expression returns
-      an empty string. The string is presented as a byte string of the
-      option payload without the type code or length fields. This
-      expression is allowed in DHCPv4 only.
-      </para></listitem>
-
-      <listitem><para>
-      "relay4" shares the same representation types as "option", for
-      instance "relay4[code].exists" is supported.
-      </para></listitem>
-
-      <listitem><para>
-      "relay6[nest]" allows access to the encapsulations used by any DHCPv6
-      relays that forwarded the packet.  The "nest" level specifies the relay
-      from which to extract the information, with a value of 0 indicating
-      the relay closest to the DHCPv6 server. Negative values allow to
-      specify relays counted from the DHCPv6 client, -1 indicating the
-      relay closest to the client. In general negative "nest" level is
-      the same as the number of relays + "nest" level.
-      If the requested encapsulation doesn't exist an empty string ""
-      is returned.  This expression is allowed in DHCPv6 only.
-      </para></listitem>
-
-      <listitem><para>
-      "relay6[nest].option[code]" shares the same representation types as
-      "option", for instance "relay6[nest].option[code].exists" is supported.
-      </para></listitem>
-
-      <listitem><para>
-       Expressions starting with "pkt4" can be used only in DHCPv4.
-       They allows access to DHCPv4 message fields.
-      </para></listitem>
-
-      <listitem><para>
-      "pkt6" refers to information from the client request.  To access any
-      information from an intermediate relay use "relay6".  "pkt6.msgtype"
-      and "pkt6.transid" output a 4 byte binary string for the message type
-      or transaction id.  For example the message type SOLICIT will be
-      "0x00000001" or simply 1 as in "pkt6.msgtype == 1".
-      </para></listitem>
-
-      <listitem><para>
-      Vendor option means Vendor-Identifying Vendor-specific Information
-      option in DHCPv4 (code 125, see
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc3925#section-4">Section 4 of RFC 3925</link>) and
-      Vendor-specific Information Option in DHCPv6 (code 17, defined in
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://tools.ietf.org/html/rfc8415#section-21.17">Section 21.17 of
-      RFC 8415</link>). Vendor class option means Vendor-Identifying Vendor
-      Class Option in DHCPv4 (code 124, see
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc3925#section-3">Section 3 of RFC 3925</link>) in DHCPv4 and
-      Class Option in DHCPv6 (code 16, see
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://tools.ietf.org/html/rfc8415#section-21.16">Section 21.16 of RFC 8415</link>).
-      Vendor options may
-      have sub-options that are referenced by their codes. Vendor class
-      options do not have sub-options, but rather data chunks, which are
-      referenced by index value. Index 0 means the first data chunk, Index 1
-      is for the second data chunk (if present), etc.
-      </para></listitem>
-
-      <listitem><para>
-      In the vendor and vendor-class constructs Asterisk (*) or 0 can be
-      used to specify a wildcard enterprise-id value, i.e. it will match any
-      enterprise-id value.
-      </para></listitem>
-
-      <listitem><para>Vendor Class Identifier (option 60 in DHCPv4) can be
-      accessed using option[60] expression.</para></listitem>
-
-      <listitem><para>
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc3925">RFC 3925</link> and
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc8415">RFC 8415</link>
-      allow for multiple instances of vendor options
-      to appear in a single message. The client classification code currently
-      examines the first instance if more than one appear. For vendor.enterprise
-      and vendor-class.enterprise expressions, the value from the first instance
-      is returned. Please submit a feature request on Kea website if you need
-      support for multiple instances.
-      </para></listitem>
-
-      </itemizedlist>
-
-      <para>
-        <table frame="all" xml:id="classification-expressions-list">
-          <title>List of Classification Expressions</title>
-          <tgroup cols="3">
-          <colspec colname="name"/>
-          <colspec colname="example"/>
-          <colspec colname="description"/>
-          <thead>
-            <row>
-              <entry>Name</entry>
-              <entry>Example</entry>
-              <entry>Description</entry>
-            </row>
-          </thead>
-          <tbody>
-<row><entry>Equal</entry> <entry>'foo' == 'bar'</entry><entry>Compare the two values and return "true" or "false"</entry></row>
-<row><entry>Not</entry> <entry>not ('foo' == 'bar')</entry><entry>Logical negation</entry></row>
-<row><entry>And</entry> <entry>('foo' == 'bar') and ('bar' == 'foo')</entry><entry>Logical and</entry></row>
-<row><entry>Or</entry> <entry>('foo' == 'bar') or ('bar' == 'foo')</entry><entry>Logical or</entry></row>
-<row><entry>Substring</entry><entry>substring('foobar',0,3)</entry><entry>Return the requested substring</entry></row>
-<row><entry>Concat</entry><entry>concat('foo','bar')</entry><entry>Return the
-concatenation of the strings</entry></row>
-<row><entry>Ifelse</entry><entry>ifelse('foo' == 'bar','us','them')</entry><entry>Return the branch value according to the condition</entry></row>
-<row><entry>Hexstring</entry><entry>hexstring('foo', '-')</entry><entry>Converts the value to a hexadecimal string, e.g. 0a:1b:2c:3e</entry></row>
-          </tbody>
-          </tgroup>
-        </table>
-      </para>
-
-      <section>
-        <title>Logical operators</title>
-        The Not, And and Or logical operators are the common operators. Not
-        has the highest precedence and Or the lowest. And and Or are (left)
-        associative, parentheses around a logical expression can be used
-        to enforce a specific grouping, for instance in "A and (B or C)"
-        (without parentheses "A and B or C" means "(A and B) or C").
-      </section>
-
-      <section>
-        <title>Substring</title>
-        The substring operator "substring(value, start, length)" accepts both positive and
-        negative values for the starting position and the length.  For "start", a value of
-        0 is the first byte in the string while -1 is the last byte.  If the starting
-        point is outside of the original string an empty string is returned.  "length"
-        is the number of bytes to extract.  A negative number means to count towards
-        the beginning of the string but doesn't include the byte pointed to by "start".
-        The special value "all" means to return all bytes from start to the end of the
-        string.  If length is longer than the remaining portion of the string then
-        the entire remaining portion is returned.  Some examples may be helpful:
-
-          <screen>
-        substring('foobar', 0, 6) == 'foobar'
-        substring('foobar', 3, 3) == 'bar'
-        substring('foobar', 3, all) == 'bar'
-        substring('foobar', 1, 4) == 'ooba'
-        substring('foobar', -5, 4) == 'ooba'
-        substring('foobar', -1, -3) == 'oba'
-        substring('foobar', 4, -2) == 'ob'
-        substring('foobar', 10, 2) == ''
-          </screen>
-      </section>
-      <section>
-        <title>Concat</title>
-        The concat function "concat(string1, string2)" returns the
-        concatenation of its two arguments. For instance:
-          <screen>
-        concat('foo', 'bar') == 'foobar'
-          </screen>
-       </section>
-       <section>
-         <title>Ifelse</title>
-         The ifelse function "ifelse(cond, iftrue, ifelse)" returns the
-         "iftrue" or "ifelse" branch value following the boolean
-         condition "cond". For instance:
-           <screen>
-         ifelse(option[230].exists, option[230].hex, 'none')
-           </screen>
-        </section>
-        <section>
-          <title>Hexstring</title>
-          The hexstring function "hexstring(binary, separator)" returns
-          the binary value as its hexadecimal string representation:
-          pairs of hexadecimal digits separated by the separator, e.g
-          ':', '-', '' (empty separator).
-            <screen>
-          hexstring(pkt4.mac, ':')
-            </screen>
-        </section>
-    </section>
-
-  <note>
-  <para>
-    The expression for each class is executed on each packet received.
-    If the expressions are overly complex, the time taken to execute
-    them may impact the performance of the server. If you need
-    complex or time consuming expressions you should write a <link linkend="hooks-libraries">hook</link> to perform the necessary work.
-  </para> </note>
-
-  <section xml:id="classification-configuring">
-    <title>Configuring Classes</title>
-      <para>
-      A class contains five items: a name, a test expression, option data,
-      option definition and only-if-required flag.
-      The name must exist and must be unique amongst all classes. The test
-      expression, option data and definition, and only-if-required flag are
-      optional.
-      </para>
-
-      <para>
-      The test expression is a string containing the logical expression used to
-      determine membership in the class.  The entire expression is in double
-      quotes.
-      </para>
-
-      <para>
-      The option data is a list which defines any options that should be assigned
-      to members of this class.
-      </para>
-
-      <para>
-      The option definition is for DHCPv4 option 43 (<xref
-      linkend="dhcp4-vendor-opts"/> and DHCPv4 private options
-      (<xref linkend="dhcp4-private-opts"/>).
-      </para>
-
-      <para>
-      Usually the test expression is evaluated before subnet selection
-      but in some cases it is useful to evaluate it later when the
-      subnet, shared-network or pools are known but output option
-      processing not yet done. The only-if-required flag, false by default,
-      allows to perform the evaluation of the test expression only
-      when it was required, i.e. in a require-client-classes list of the
-      selected subnet, shared-network or pool.
-      </para>
-
-      <para>
-      The require-client-classes list which is valid for shared-network,
-      subnet and pool scope specifies the classes which are evaluated
-      in the second pass before output option processing.
-      The list is built in the reversed precedence order of option
-      data, i.e. an option data in a subnet takes precedence on one
-      in a shared-network but required class in a subnet is added
-      after one in a shared-network.
-      The mechanism is related to the only-if-required flag but it is
-      not mandatory that the flag was set to true.
-      </para>
-
-      <para>
-      In the following example the class named &quot;Client_foo&quot; is defined.
-      It is comprised of all clients whose client ids (option 61) start with the
-      string "foo". Members of this class will be given 192.0.2.1 and
-      192.0.2.2 as their domain name servers.
-
-        <screen>
-"Dhcp4": {
-    "client-classes": [<userinput>
-        {
-            "name": "Client_foo",
-            "test": "substring(option[61].hex,0,3) == 'foo'",
-            "option-data": [
-                {
-                    "name": "domain-name-servers",
-                    "code": 6,
-                    "space": "dhcp4",
-                    "csv-format": true,
-                    "data": "192.0.2.1, 192.0.2.2"
-                }
-            ]
-        },
-        ...
-    ],</userinput>
-    ...
-}</screen>
-      </para>
-
-      <para>
-      This example shows a client class being defined for use by the DHCPv6 server.
-      In it the class named "Client_enterprise" is defined.  It is comprised
-      of all clients who's client identifiers start with the given hex string (which
-      would indicate a DUID based on an enterprise id of 0xAABBCCDD). Members of this
-      class will be given an 2001:db8:0::1 and 2001:db8:2::1 as their domain name servers.
-        <screen>
-"Dhcp6": {
-    "client-classes": [<userinput>
-        {
-            "name": "Client_enterprise",
-            "test": "substring(option[1].hex,0,6) == 0x0002AABBCCDD",
-            "option-data": [
-                {
-                    "name": "dns-servers",
-                    "code": 23,
-                    "space": "dhcp6",
-                    "csv-format": true,
-                    "data": "2001:db8:0::1, 2001:db8:2::1"
-                }
-            ]
-        },
-        ...
-    ],</userinput>
-    ...
-}</screen>
-      </para>
-  </section>
-
-  <section id="classification-using-host-reservations">
-    <title>Using Static Host Reservations In Classification</title>
-    <para>Classes can be statically assigned to the clients using techniques described
-    in <xref linkend="reservation4-client-classes"/> and
-    <xref linkend="reservation6-client-classes"/>.
-    </para>
-  </section>
-
-  <section xml:id="classification-subnets">
-    <title>Configuring Subnets With Class Information</title>
-      <para>
-        In certain cases it beneficial to restrict access to certain subnets
-        only to clients that belong to a given class, using the "client-class"
-        keyword when defining the subnet.
-      </para>
-
-      <para>
-        Let's assume that the server is connected to a network segment that uses
-        the 192.0.2.0/24 prefix. The Administrator of that network has decided
-        that addresses from range 192.0.2.10 to 192.0.2.20 are going to be
-        managed by the DHCP4 server. Only clients belonging to client class
-        Client_foo  are allowed to use this subnet. Such a
-        configuration can be achieved in the following way:
-        <screen>
-"Dhcp4": {
-    "client-classes": [
-        {
-            "name": "Client_foo",
-            "test": "substring(option[61].hex,0,3) == 'foo'",
-            "option-data": [
-                {
-                    "name": "domain-name-servers",
-                    "code": 6,
-                    "space": "dhcp4",
-                    "csv-format": true,
-                    "data": "192.0.2.1, 192.0.2.2"
-                }
-            ]
-        },
-        ...
-    ],<userinput>
-    "subnet4": [
-        {
-            "subnet": "192.0.2.0/24",
-            "pools": [ { "pool": "192.0.2.10 - 192.0.2.20" } ],
-            "client-class": "Client_foo"
-        },
-        ...
-    ],</userinput>,
-    ...
-}</screen>
-      </para>
-
-      <para>
-        The following example shows restricting access to a DHCPv6 subnet.  This
-        configuration will restrict use of the addresses 2001:db8:1::1 to
-        2001:db8:1::FFFF to members of the "Client_enterprise" class.
-
-        <screen>
-"Dhcp6": {
-    "client-classes": [
-        {
-            "name": "Client_enterprise",
-            "test": "substring(option[1].hex,0,6) == 0x0002AABBCCDD",
-            "option-data": [
-                {
-                    "name": "dns-servers",
-                    "code": 23,
-                    "space": "dhcp6",
-                    "csv-format": true,
-                    "data": "2001:db8:0::1, 2001:db8:2::1"
-                }
-            ]
-        },
-        ...
-    ], <userinput>
-    "subnet6": [
-        {
-            "subnet": "2001:db8:1::/64",
-            "pools": [ { "pool": "2001:db8:1::-2001:db8:1::ffff" } ],
-            "client-class": "Client_enterprise"
-        }
-    ],</userinput>
-    ...
-}</screen>
-      </para>
-  </section>
-
- <section id="classification-pools">
-   <title>Configuring Pools With Class Information</title>
-     <para>
-       Similar to subnets in certain cases access to certain address or
-       prefix pools must be restricted to only clients that belong to a
-       given class, using the "client-class" when defining the pool.
-     </para>
-
-     <para>
-       Let's assume that the server is connected to a network segment that uses
-       the 192.0.2.0/24 prefix. The Administrator of that network has decided
-       that addresses from range 192.0.2.10 to 192.0.2.20 are going to be
-       managed by the DHCP4 server. Only clients belonging to client class
-       Client_foo are allowed to use this pool. Such a
-       configuration can be achieved in the following way:
-       <screen>
-"Dhcp4": {
-    "client-classes": [
-        {
-            "name": "Client_foo",
-            "test": "substring(option[61].hex,0,3) == 'foo'",
-            "option-data": [
-                {
-                    "name": "domain-name-servers",
-                    "code": 6,
-                    "space": "dhcp4",
-                    "csv-format": true,
-                    "data": "192.0.2.1, 192.0.2.2"
-                }
-            ]
-        },
-        ...
-    ],<userinput>
-    "subnet4": [
-        {
-            "subnet": "192.0.2.0/24",
-            "pools": [
-                {
-                    "pool": "192.0.2.10 - 192.0.2.20",
-                    "client-class": "Client_foo"
-                }
-            ]
-        },
-        ...
-    ],</userinput>,
-
-}</screen>
-      </para>
-
-     <para>
-       The following example shows restricting access to an address pool.
-       This configuration will restrict use of the addresses 2001:db8:1::1
-       to 2001:db8:1::FFFF to members of the "Client_enterprise" class.
-       <screen>
-"Dhcp6": {
-    "client-classes": [
-        {
-            "name": "Client_enterprise_",
-            "test": "substring(option[1].hex,0,6) == 0x0002AABBCCDD",
-            "option-data": [
-                {
-                    "name": "dns-servers",
-                    "code": 23,
-                    "space": "dhcp6",
-                    "csv-format": true,
-                    "data": "2001:db8:0::1, 2001:db8:2::1"
-                }
-            ]
-        },
-        ...
-    ],
-    "subnet6": [
-        {
-            "subnet": "2001:db8:1::/64",
-            <userinput>
-            "pools": [
-                {
-                    "pool": "2001:db8:1::-2001:db8:1::ffff",
-                    "client-class": "Client_foo"
-                }
-            ]</userinput>
-        },
-        ...
-    ],
-    ...
-}</screen>
-      </para>
-  </section>
-
-  <section>
-    <title>Using Classes</title>
-      <para>
-      Currently classes can be used for two functions.  They can supply options
-      to the members of the class and they can be used to choose a subnet from which an
-      address will be assigned to the class member.
-      </para>
-
-      <para>
-      When supplying options, options defined as part of the class definition
-      are considered "class globals".  They will override any global options that
-      may be defined and in turn will be overridden by any options defined for an
-      individual subnet.
-      </para>
-  </section>
-
-  <section>
-    <title>Classes and Hooks</title>
-      <para>
-      You may use a hook to classify your packets. This may be useful if the
-      expression would either be complex or time consuming and be easier or
-      better to write as code.  Once the hook has added the proper class name
-      to the packet the rest of the classification system will work as normal
-      in choosing a subnet and selecting options.  For a description of
-      hooks see <xref linkend="hooks-libraries"/>, for a description on
-      configuring classes see <xref linkend="classification-configuring"/>
-      and <xref linkend="classification-subnets"/>.
-      </para>
-  </section>
-
-  <section>
-   <title>Debugging Expressions</title>
-     <para>
-     While you are constructing your classification expressions you may
-     find it useful to enable logging see <xref linkend="logging"/> for
-     a more complete description of the logging facility.
-     </para>
-
-     <para>
-     To enable the debug statements in the classification system you will
-     need to set the severity to "DEBUG" and the debug level to at least 55.
-     The specific loggers are "kea-dhcp4.eval" and "kea-dhcp6.eval".
-     </para>
-
-     <para>
-     In order to understand the logging statements, one must understand a
-     bit about how expressions are evaluated; for a more complete description
-     refer to the design document at <uri xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://gitlab.isc.org/isc-projects/kea/wikis/design%20documents">https://gitlab.isc.org/isc-projects/kea/wikis/design%20documents</uri>.
-     In brief there are two structures used during the evaluation of an expression:
-     a list of tokens which represent the expressions and a value stack which
-     represents the values being manipulated.
-     </para>
-
-     <para>
-     The list of tokens is created when the configuration file is processed with
-     most expressions and values being converted to a token.  The list is organized
-     in reverse Polish notation.  During execution, the list will be traversed
-     in order.  As each token is executed it will be able to pop values
-     from the top of the stack and eventually push its result on the top of the
-     stack.  Imagine the following expression:
-       <screen>
-       "test": "substring(option[61].hex,0,3) == 'foo'",
-       </screen>
-     This will result in the following tokens:
-       <screen>
-       option, number (0), number (3), substring, text ('foo'), equals
-       </screen>
-     In this example the first three tokens will simply push values onto the
-     stack.  The substring token will then remove those three values and
-     compute a result that it places on the stack.  The text option also
-     places a value on the stack and finally the equals token removes the
-     two tokens on the stack and places its result on the stack.
-     </para>
-
-     <para>
-     When debug logging is enabled, each time a token is evaluated it will
-     emit a log message indicating the values of any objects that were popped
-     off of the value stack and any objects that were pushed onto the value
-     stack.
-     </para>
-
-     <para>
-     The values will be displayed as either text if the command is known
-     to use text values or hexadecimal if the command either uses binary values or
-     can manipulate either text or binary values.  For expressions that
-     pop multiple values off the stack, the values will be displayed in
-     the order they were popped.  For most expressions this won't matter
-     but for the concat expression the values are displayed in reverse
-     order from how they are written in the expression.
-     </para>
-
-     <para>
-     Let us assume that the following test has been entered into the configuration.
-     This example skips most of the configuration to concentrate on the test.
-       <screen>
-       "test": "substring(option[61].hex,0,3) == 'foo'",
-       </screen>
-     The logging might then resemble this:
-       <screen>
-       2016-05-19 13:35:04.163 DEBUG [kea.eval/44478] EVAL_DEBUG_OPTION Pushing option 61 with value 0x666F6F626172
-       2016-05-19 13:35:04.164 DEBUG [kea.eval/44478] EVAL_DEBUG_STRING Pushing text string '0'
-       2016-05-19 13:35:04.165 DEBUG [kea.eval/44478] EVAL_DEBUG_STRING Pushing text string '3'
-       2016-05-19 13:35:04.166 DEBUG [kea.eval/44478] EVAL_DEBUG_SUBSTRING Popping length 3, start 0, string 0x666F6F626172 pushing result 0x666F6F
-       2016-05-19 13:35:04.167 DEBUG [kea.eval/44478] EVAL_DEBUG_STRING Pushing text string 'foo'
-       2016-05-19 13:35:04.168 DEBUG [kea.eval/44478] EVAL_DEBUG_EQUAL Popping 0x666F6F and 0x666F6F pushing result 'true'
-       </screen>
-     </para>
-
-     <note><para>
-     The debug logging may be quite verbose if you have a number of expressions
-     to evaluate.  It is intended as an aid in helping you create and debug
-     your expressions.  You should plan to disable debug logging when you have your
-     expressions working correctly.  You also may wish to include only one set of
-     expressions at a time in the configuration file while debugging them in order
-     to limit the log statements.  For example when adding a new set of expressions
-     you might find it more convenient to create a configuration file that only
-     includes the new expressions until you have them working correctly and then
-     add the new set to the main configuration file.
-     </para></note>
-  </section>
-
-</chapter>
diff --git a/doc/guide/config-backend.xml b/doc/guide/config-backend.xml
deleted file mode 100644 (file)
index cbff721..0000000
+++ /dev/null
@@ -1,345 +0,0 @@
-<!--
- - Copyright (C) 2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-
-<section xml:id="config-backend">
-  <title>Kea Configuration Backend</title>
-
-  <section xml:id="cb-applicability">
-    <title>Applicability</title>
-
-    <para>
-      Kea Configuration Backend (abbreviated as CB) is a feature first
-      introduced in 1.6.0 release, which provides Kea servers with the
-      ability to manage and fetch their configuration from one or more
-      databases. In the documentation, the term "Configuration Backend"
-      may also refer to the particular Kea module providing support
-      to manage and fetch the configuration information from the particular
-      database type. For example: MySQL Configuration Backend is the logic
-      implemented within the "mysql_cb" hooks library which provides a
-      complete set of functions to manage and fetch the configuration
-      information from the MySQL database.
-    </para>
-
-    <para>
-      In small deployments, e.g. those comprising a single DHCP server instance
-      with limited and infrequently changing number of subnets, it may
-      be impractical to use the CB as a configuration repository because
-      it requires additional third party software to be installed and
-      configured - in particular the  MySQL server and MySQL client.
-      Once the number of DHCP servers and/or the number of managed
-      subnets in the network grows, the usefulness of the CB becomes
-      obvious.
-    </para>
-
-    <para>
-      A good example is a pair of the Kea DHCP servers which can be
-      configured to support High Availability as described in
-      <xref linkend="high-availability-library"/>.
-      The configurations of both servers are almost exactly the same.
-      They may differ by the server identifier and designation of the
-      server as a primary or standby (or secondary). They may also
-      differ by the interfaces configuration. Typically, the subnets,
-      shared networks, option definitions, global parameters are
-      the same for both servers and can be sourced from a single
-      database instance to both Kea servers.
-    </para>
-
-    <para>
-      Using the database as a single source of configuration for subnets
-      and/or other configuration information supported by the CB has
-      the advantage that any modifications to the configuration in
-      the database is automatically applied to both servers.
-    </para>
-
-    <para>
-      Another case when the centralized configuration repository is desired
-      is in deployments including large number of the DHCP servers, possibly
-      using a common lease database to provide redundancy. The new servers
-      can be added to the pool frequently to fulfil growing scalability
-      requirements. Adding the new server does not require replicating
-      the entire configuration to the new server when common database is
-      used.
-    </para>
-
-    <para>
-      Using the database as a configuration repository for Kea servers also
-      brings other benefits, such as:
-      <itemizedlist>
-        <listitem><simpara>an ability to use database specific tools to access
-        the configuration information,</simpara></listitem>
-        <listitem><simpara>an ability to create customized statistics based
-        on the information stored in the database,</simpara></listitem>
-        <listitem><simpara>an ability to backup the configuration information
-        using the database builtin replication mechanisms.</simpara></listitem>
-      </itemizedlist>
-    </para>
-
-  </section>
-
-  <section xml:id="cb-limitations">
-    <title>CB Capabilities and Limitations</title>
-    <para>
-      Kea CB has been introduced in the 1.6.0 release, but this
-      implementation comes with a number of limitations being the
-      result of the overall complexity of this feature and the development
-      time constraints. This feature will evolve over time and the new
-      capabilities will be added in subsequent releases. In this
-      section we present the limitations of the CB, present in the
-      current Kea 1.6.0 release:
-    </para>
-
-    <itemizedlist>
-      <listitem><simpara>
-        Kea CB is currently supported for the MySQL database only.
-      </simpara></listitem>
-      <listitem><simpara>
-        Kea CB is only supported for DHCPv4 and DHCPv6 servers.
-        Neither Control Agent nor D2 deamon can be configured via the database.
-      </simpara></listitem>
-      <listitem><simpara>
-        Configuration to be stored for the DHCP servers includes: global parameters,
-        option definitions, global options, shared networks and subnets. Other
-        configuration parameters are not stored in the database at the moment.
-        They have to be configured via the JSON configuration file.
-      </simpara></listitem>
-    </itemizedlist>
-
-    <note>
-      <para>
-        We strongly recommend to not duplicate the configuration information
-        in the file and the database. For example, when specifying subnets
-        for the DHCP server, please store them in the configuration backend
-        or in the configuration file, not in both places. Storing some subnets
-        in the database and other in the file may put you at risk of potential
-        configuration conflicts. Note that the configuration from the database
-        takes precedence over the configuration from the file, thus it is possible
-        that parts of the configuration specified in the file may be overriden.
-      </para>
-    </note>
-
-    <note>
-      <para>
-        It is recommended that <command>subnet_cmds</command> hooks library is
-        not used to manage the subnets when the configuration backend is used
-        as a source of information about the subnets. The
-        <command>subnet_cmds</command> hooks library modifies the local subnets
-        configuration (in the server's memory), not in the database. Use
-        the <command>cb_cmds</command> hooks library to manage the subnets
-        information in the database instead.
-      </para>
-    </note>
-
-  </section>
-
-  <section xml:id="cb-components">
-    <title>CB Components</title>
-    <para>
-      In order to use the Kea CB feature, the Kea 1.6.0 version or later is
-      required. The <command>mysql_cb</command> open source hooks library
-      implementing the Configuration Backend for MySQL must be compiled and
-      loaded by the DHCP servers. This hooks library is compiled when the
-      <filename>--with-mysql</filename> configuration switch is used during
-      Kea build. The MySQL C client libraries must be installed
-      as explained in the <xref linkend="dhcp-install-configure"/>.
-    </para>
-
-    <note>
-      <simpara>Any existing MySQL schema must be upgraded to the latest schema
-      required by the particular Kea version using <command>kea-admin</command>
-      tool described in <xref linkend="kea-admin"/>.</simpara>
-    </note>
-
-    <para>
-      The <command>cb_cmds</command> premium hooks library is available to
-      ISC paid supported customers, which provides a complete set of commands
-      to manage the servers' configuration information within the database.
-      This library can be attached to both DHCPv4 and DHCPv6 server instances.
-      It is still possible to manage the configuration information without the
-      <command>cb_cmds</command> hooks library with commonly available tools
-      such as MySQL Workbench or command line MySQL client, by directly working
-      with the database.
-    </para>
-
-    <para>
-      Refer to the <xref linkend="cb-cmds-library"/> for the details regarding
-      the <command>cb_cmds</command> hooks library.
-    </para>
-
-    <para>
-      The DHCPv4 and DHCPv6 server specific configuration of the CB as well as
-      the list of supported configuration parameters can be found in the
-      <xref linkend="dhcp4-cb"/> and <xref linkend="dhcp6-cb"/>
-      respectively.
-    </para>
-  </section>
-
-  <section xml:id="cb-sharing">
-    <title>Configuration Sharing and Server Tags</title>
-    <para>
-      The configuration database is designed to store the configuration information
-      for multiple Kea servers. Depending on the use case, the entire configuration
-      may be shared by all servers, parts of the configuration may be shared by
-      multiple servers and the rest of the configuration may be different for these
-      servers or, finally, each server may have its own non-shared configuration.
-    </para>
-
-    <para>
-      The configuration elements in the database are associated with the servers
-      by "server tags". The server tag is an arbitrary string holding the name
-      of the Kea server instance. The tags of the DHCPv4 and DHCPv6 servers are
-      independent in the database, i.e. the same server tag can be created for
-      the DHCPv4 and the DHCPv6 server respectively.
-    </para>
-
-    <para>
-      The server definition, which consists of the server tag and the server
-      description, must be stored in the configuration database prior to creating
-      the dedicated configuration for that server. In cases when all servers use
-      the same configuration, e.g. a pair of servers running as the High Availability
-      peers, there is no need to configure the server tags for these
-      servers in the database. The database by default includes the logical
-      server <command>all</command>, which is used as a keyword to indicate that
-      the particular piece of configuration must be shared between all servers
-      connecting to the database. The <command>all</command> server can't be
-      deleted or modified. It is not even returned among other servers
-      as a result of the <command>remote-server[46]-get-all</command>
-      commands. Also, slightly different rules may apply to "all" keyword
-      than to any user defined server when running the commands provided by
-      the <command>cb_cmds</command> hooks library
-      (see <xref linkend="cb-cmds-library"/> for details).
-    </para>
-
-    <note>
-      <simpara>
-        In the simplest case there are no server tags defined in the configuration
-        database and all connecting servers will get the same configuration
-        regardless of the server tag they are using. The server tag that the
-        particular Kea instance presents to the database to fetch its configuration
-        is specified in the Kea configuration file, using the
-        <command>config-control</command> map (please refer to the
-        <xref linkend="dhcp4-cb-json"/> and <xref linkend="dhcp6-cb-json"/>
-        for details).
-      </simpara>
-    </note>
-
-    <para>
-      All Kea instances presenting the same server tag to the configuration database
-      are given the same configuration. It is the administrator's choice whether
-      multiple Kea instances use the same server tag or each Kea instance is using
-      a different sever tag. Also, there is no requirement that the instances
-      running on the same physical or virtual machine use the same server tag. It is
-      even possible to configure the Kea server without assigning it a server tag.
-      In such case the server will be given the configuration specified for "all"
-      servers.
-    </para>
-
-    <para>
-      In order to differentiate the configurations between the Kea servers, a
-      collection of the server tags used by the servers must be stored in the
-      database. For the DHCPv4 and DHCPv6 servers, it can be done using the
-      commands described in <xref linkend="command-remote-server4-set"/> and
-      <xref linkend="command-remote-server6-set"/>. Next, the
-      server tags can be used to associate the configuration information with
-      the servers. However, it is important to note that some DHCP
-      configuration elements may be associated with multiple server tags and
-      other configuration elements may be associated with exactly one
-      server tag. The former configuration elements are referred to as
-      shareable configuration elements and the latter are referred to as
-      non-shareable configuration elements. The <xref linkend="dhcp4-cb"/>
-      and <xref linkend="dhcp6-cb"/> list the DHCP specific shareable and
-      non-shareable configuration elements. However, in this section we
-      want to briefly explain the difference between them.
-    </para>
-
-    <para>
-      The shareable configuration element is the one having some unique
-      property identifying it and which instance may appear only once in
-      the database. An example of the shareable DHCP element is a subnet
-      instance. The subnet is a part of the network topology and we assume
-      that the particular subnet may have only one definition within this
-      network. The subnet has two unique identifiers: subnet id and the
-      subnet prefix. The subnet identifier is used in Kea to uniquely
-      identify the subnet and to connect it with other configuration elements,
-      e.g. in host reservations. The subnet identifier uniquely identifies
-      the subnet within the network. Some commands provided by the
-      <command>cb_cmds</command> hooks library allow for accessing the subnet
-      information by subnet identifier (or prefix) and explicitly prohibit
-      using the server tag to access the subnet. This is because, in a
-      general case, the subnet definition is associated with multiple servers
-      rather than single server. In fact, it may even be associated
-      with no servers (unassigned). Still, the unassigned subnet has an
-      identifier and prefix which can be used to access the subnet.
-    </para>
-
-    <para>
-      A shareable configuration element may be associated with multiple
-      servers, one server or no servers. Deletion of the server which is
-      associated with the shareable element does not cause the deletion of
-      the shareable element. It merely deletes the association of the
-      deleted server with the element.
-    </para>
-
-    <para>
-      Unlike the shareable element, the non-shareable element must not be
-      explicitly associated with more than one server and must not exist
-      after the server is deleted (must not remain unassigned). The
-      non-shareable element only exists within the context of the server.
-      An example of the non-shareable element in DHCP is a global
-      parameter, e.g. <command>renew-timer</command>. The renew timer
-      is the value to be used by the particular server and only this
-      server. Other servers may have their respective renew timers
-      set to the same or different value. The renew timer is the
-      parameter which has no unique identifier by which it could be
-      accessed, modified or otherwise used. The global parameters like
-      the renew timer can be accessed by the parameter name and the
-      tag of the server for which they are configured. For example:
-      the commands described in
-      <xref linkend="command-remote-global-parameter4-get"/> allow for
-      fetching the value of the global parameter by the parameter name and
-      the server name. Getting the global parameter only by its name (without
-      specifying the server tag) is not possible because there may be many
-      global parameters with the given name in the database.
-    </para>
-
-    <para>
-      When the server associated with a non-shareable configuration element
-      is deleted, the configuration element is automatically deleted from
-      the database along with the server because the non-shareable element
-      must be always assigned to some server (or the logical server "all").
-    </para>
-
-    <para>
-      The terms "shareable" and "non-shareable" only apply to the associations
-      with user defined servers. All configuration elements associated with
-      the logical server "all" are by definition shareable. For example: the
-      <command>renew-timer</command> associated with "all" servers is used
-      by all servers connecting to the database which don't have their specific
-      renew timers defined. In the special case, when none of the configuration
-      elements are associated with user defined servers, the entire
-      configuration in the database is shareable because all its pieces
-      belong to "all" servers.
-    </para>
-
-    <note>
-      <simpara>
-        Be very careful when associating the configuration elements with
-        different server tags. The configuration backend doesn't protect you
-        against some possible misconfigurations that may arise from the
-        wrong server tags' assignments. For example: if you assign a shared
-        network to one server and the subnets belonging to this shared network
-        to another server, the servers will fail upon trying to fetch and
-        use this configuration. The server fetching the subnets will be
-        aware that the subnets are associated with the shared network but
-        the shared network will not be found by this server as it doesn't
-        belong to it. In such case, both the shared network and the subnets
-        should be assigned to the same set of servers.
-      </simpara>
-    </note>
-  </section>
-
-</section>
diff --git a/doc/guide/config.xml b/doc/guide/config.xml
deleted file mode 100644 (file)
index 805c642..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-<!--
- - Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-
-<!-- Converted by db4-upgrade version 1.1 -->
-<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="kea-config">
-  <title>Kea Configuration</title>
-
-  <para>Kea uses JSON structures to represent server configurations.
-  The following sections describe how the configuration structures are
-  organized.
-  </para>
-
-  <section xml:id="json">
-    <title>JSON Configuration</title>
-    <para>JSON is the notation used throughout the Kea project. The most obvious
-    usage is for the configuration file, but JSON is also used for sending commands
-    over the Management API (see <xref linkend="ctrl-channel"/>) and for
-    communicating between DHCP servers and the DDNS update daemon.</para>
-
-    <para>Typical usage assumes that the servers are started from the command line,
-    either directly or using a script, e.g. <filename>keactrl</filename>.
-    The configuration file is specified upon startup using the -c parameter.</para>
-
-    <section xml:id="json-format">
-      <title>JSON Syntax</title>
-
-      <para>Configuration files for the DHCPv4, DHCPv6, DDNS, Control
-      Agent, and Netconf modules are defined in an extended JSON
-      format. Basic JSON is defined
-      in <link xmlns:xlink="http://www.w3.org/1999/xlink"
-      xlink:href="http://tools.ietf.org/html/rfc7159">RFC 7159</link> and
-      <link xmlns:xlink="http://www.w3.org/1999/xlink"
-            xlink:href="http://www.ecma-international.org/publications/standards/Ecma-404.htm">ECMA 404</link>.
-      In particular, the only boolean values allowed
-      are true or false (all lowercase). The capitalized
-      versions (True or False) are not accepted.
-      </para>
-
-      <para>Kea components use an extended JSON with additional features
-      allowed:
-      <itemizedlist>
-        <listitem>
-          <simpara>shell comments: any text after the hash (#)
-          character is ignored.</simpara>
-        </listitem>
-        <listitem>
-          <simpara>C comments: any text after the double slashes (//)
-          character is ignored.</simpara>
-        </listitem>
-        <listitem>
-          <simpara>Multiline comments: any text between /* and */ is
-          ignored. This commenting can span multiple lines.</simpara>
-        </listitem>
-        <listitem>
-          <simpara>File inclusion: JSON files can include other JSON files by using a statement of the form &lt;?include
-          "file.json"?&gt;.</simpara>
-        </listitem>
-      </itemizedlist>
-      </para>
-
-      <para>The configuration file consists of a single object (often
-      colloquially called a map) started with a curly bracket. It
-      comprises one or more of the "Dhcp4", "Dhcp6", "DhcpDdns",
-      "Control-agent" and "Netconf" objects. It is possible to define
-      additional elements but they will be ignored.</para>
-
-      <para>A very simple configuration for DHCPv4 could look like this:
-<screen>
-# The whole configuration starts here.
-{
-    # DHCPv4 specific configuration starts here.
-    "Dhcp4": {
-        "interfaces-config": {
-            "interfaces": [ "eth0" ],
-            "dhcp-socket-type": "raw"
-        },
-        "valid-lifetime": 4000,
-        "renew-timer": 1000,
-        "rebind-timer": 2000,
-        "subnet4": [{
-           "pools": [ { "pool": "192.0.2.1-192.0.2.200" } ],
-           "subnet": "192.0.2.0/24"
-        }],
-
-       # Now loggers are inside the DHCPv4 object.
-       "loggers": [{
-            "name": "*",
-            "severity": "DEBUG"
-        }]
-    }
-
-# The whole configuration structure ends here.
-}
-</screen>
-        </para>
-
-        <para>More examples are available in the installed
-        <filename>share/doc/kea/examples</filename> directory.</para>
-
-      <note>
-        <para>
-          The "Logging" element is removed in Kea 1.6.0 and its contents
-          (the "loggers" object) moved inside the configuration objects (maps) for
-          respective Kea modules.  For example: the "Dhcp4" map contains the
-          "loggers" object specifying logging configuration for the DHCPv4
-          server. Backward compatibility is maintained until at least Kea
-          1.7.0 release: it will be possible to specify "Logging" object
-          at the top configuration level and "loggers"
-          objects at the module configuration level. Ultimately, support for the
-          top-level "Logging" object will be removed.
-        </para>
-        <para>
-          The specification of several supported elements (e.g. "Dhcp4",
-          "Dhcp6") in a single configuration file can be confusing and works
-          badly with the commands that fetch and write new configurations.
-          Support for it will be removed in a future release of Kea, after which
-          each component will require its own configuration file.
-        </para>
-      </note>
-
-        <para>To avoid repetition of mostly similar structures,
-        examples in the rest of this guide will showcase only the
-        subset of parameters appropriate for a given context. For
-        example, when discussing the IPv6 subnets configuration in
-        DHCPv6, only subnet6 parameters will be mentioned. It is
-        implied that the remaining elements (the global map that holds
-        Dhcp6 and Logging) are present, but they are omitted for
-        clarity. Usually, locations where extra parameters may appear
-        are denoted by an ellipsis (...).</para>
-    </section>
-
-    <section>
-      <title>Simplified Notation</title>
-
-        <para>It is sometimes convenient to refer to a specific
-        element in the configuration hierarchy. Each hierarchy level
-        is separated by a slash. If there is an array, a specific
-        instance within that array is referenced by a number in square
-        brackets (with numbering starting at zero). For example, in
-        the above configuration the valid-lifetime in the Dhcp4
-        component can be referred to as Dhcp4/valid-lifetime and the
-        pool in the first subnet defined in the DHCPv4 configuration
-        as Dhcp4/subnet4[0]/pool.</para>
-
-    </section>
-
-  </section>
-
-  <!-- Include large section about Kea Config Backend -->
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="config-backend.xml"/>
-
-</chapter>
diff --git a/doc/guide/congestion-handling.xml b/doc/guide/congestion-handling.xml
deleted file mode 100644 (file)
index 5ab87b8..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-<!--
- - Copyright (C) 2018-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-
-<!-- Converted by db4-upgrade version 1.1 -->
-<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="congestion-handling">
-  <title>Congestion Handling in DHCPv4 and DHCPv6</title>
-  <section xml:id="congeston-handling-background">
-  <title>What is Congestion?</title>
-  <para>Congestion occurs when servers are subjected to client queries
-  faster than they can be processed. As a result, the servers begin
-  accumulating a backlog of pending queries. The longer the high rate of
-  traffic continues the farther behind the servers fall. Depending on the
-  client implementations, those that fail to get leases either give up or simply
-  continue to retry forever. In the former case, the server may eventually
-  recover, but the latter case is a vicious cycle from which the server is unable
-  to escape.
-  </para>
-
-  <para>
-  In a well-planned deployment, the number and capacity of servers is matched
-  to the maximum client loads expected. As long as capacity is matched to
-  load, congestion does not occur. If the load is routinely too heavy, then
-  the deployment needs to be re-evaluated. Congestion typically occurs when
-  there is a network event that causes overly large numbers of clients to
-  simultaneously need leases, such as recovery after a network outage.
-  </para>
-
-  <para>
-  The goal of congestion handling is to help servers mitigate the peak
-  in traffic by fulfilling as many of the most relevant requests as possible
-  until the congestion subsides.
-  </para>
-
-  <para>Prior to Kea 1.5, kea-dhcp4 and kea-dhcp4 read inbound packets directly
-  from the interface sockets in the main application thread, which meant that
-  packets waiting to be processed were held in socket buffers themselves. Once
-  these buffers filled, any new packets were discarded. Under swamped conditions,
-  the servers ended up processing client packets that were no longer
-  relevant, or worse were redundant. In other words, the packets waiting in
-  the FIFO socket buffers became increasingly stale.
-  </para>
-  </section>
-  <section xml:id="congeston-handling-solution">
-  <title>Configuring Congestion Handling</title>
-  <para>Kea 1.5 introduced the Congestion Handling feature.
-  Congestion handling offers the ability to configure the server to use a
-  separate thread to read packets from the interface socket buffers. As the
-  thread reads packets from the buffers, they are added to an internal packet
-  queue, and the server's main application thread processes packets from this queue
-  rather than from the socket buffers. By structuring it this way, a configurable layer
-  has been introduced which can make decisions on which packets to process,
-  how to store them, and the order in which they are processed by the server.
-  </para>
-
-  <para>The default packet queue implemenation for both kea-dhcp4 and kea-dhcp6
-  is a simple ring buffer. Once it reaches capacity, new packets get added to
-  the back of the queue by discarding packets from the front of the queue. Rather than
-  always discarding the newest packets, Kea now always discards the oldest
-  packets. The capacity of the buffer, i.e the maximum number of packets the
-  buffer can contain, is configurable. A reasonable starting point would be to
-  match the capacity to the number of leases per second your installation of
-  Kea can handle. Please note that this figure varies widely depending on the
-  specifics of your deployment.
-  </para>
-
-  <para>As there is no one algorithm that will best handle the dynamics of
-  all sites, and because over time new approaches will evolve, the packet
-  queue is implemented as a plug-in, which can replaced by a custom queue
-  implementation via a hook library. This should make it straightforward
-  for interested parties to experiment with their own solutions. (Developers
-  can refer to isc::dhcp::PacketQueue and isc::dhcp::PacketQueueMgr, described in the Kea
-  Developer's Guide).
-  </para>
-
-  <para>Packet queue behavior is configured in both kea-dhcp4 and kea-dhcp6
-  servers through an optional, top-level, configuration element,
-  'dhcp-queue-control'. Omitting this element disables packet queueing:
-<screen>
-   "dhcp-queue-control": {
-       "enable-queue": true|false,
-       "queue-type": "queue type",
-       "capacity" : n
-   }
-</screen>
-    where:
-    <itemizedlist>
-     <listitem>
-        <simpara><command>enable-queue</command> true|false. Enables or
-        disables packet queueing. When true, the server processes packets
-        from the packet queue, which is filled by a separate thread. When
-        false, the server processes packets directly from the socket buffers
-        in the main thread. It is
-        disabled by default.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara><command>queue-type</command> name of the queue implementation
-        to use. This value exists so that custom implementations can be
-        registered (via hook library) and then selected. There is a default
-        packet queue implementation that is pre-registered during server
-        start up: "kea-ring4" for kea-dhcp4 and "kea-ring6" for kea-dhcp6.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara><command>capacity</command> = n [packets]. This is the
-        maximum number of packets the queue can hold before packets
-        are discarded. The optimal value for this is extremely site-dependent.
-        The default value is 500 for both kea-ring4 and kea-ring6.
-        </simpara>
-      </listitem>
-    </itemizedlist>
-  </para>
-  <para>The following example enables the default packet queue for kea-dhcp4,
-  with a queue capacity of 250 packets:
-<screen>
-"Dhcp4":
-{
-    ...
-   "dhcp-queue-control": {
-       "enable-queue": true,
-       "queue-type": "kea-ring4",
-       "capacity" : 250
-    },
-    ...
-}
-</screen>
-  </para>
-  <para> The following example enables the default packet queue for kea-dhcp6,
-  with a queue capacity of 300 packets:
-<screen>
-"Dhcp6":
-{
-    ...
-   "dhcp-queue-control": {
-       "enable-queue": true,
-       "queue-type": "kea-ring6",
-       "capacity" : 300
-    },
-    ...
-}
-</screen>
-  </para>
-  </section>
-</chapter>
diff --git a/doc/guide/ctrl-channel.xml b/doc/guide/ctrl-channel.xml
deleted file mode 100644 (file)
index ff464fd..0000000
+++ /dev/null
@@ -1,682 +0,0 @@
-<!--
- - Copyright (C) 2015-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-
-<!-- Converted by db4-upgrade version 1.1 -->
-<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="ctrl-channel">
-    <title>Management API</title>
-
-    <para>A classic approach to daemon configuration assumes that
-    the server's configuration is stored in configuration files
-    and, when the configuration is changed, the daemon is restarted.
-    This approach has the significant disadvantage of introducing periods
-    of downtime when client traffic is not handled. Another risk
-    is that if the new configuration is invalid for any reason,
-    the server may refuse to start, which will further extend the
-    downtime period until the issue is resolved.</para>
-
-    <para>To avoid such problems, the DHCPv4, DHCPv6 and D2 servers in Kea
-    include support for a mechanism that allows
-    online reconfiguration without requiring server shutdown.
-    Both servers can be instructed to open control sockets, which
-    is a communications channel. The server is able to receive
-    commands on that channel, act on them, and report back status.</para>
-
-    <para>The DHCPv4, DHCPv6 and D2 servers receive commands over the
-    UNIX domain sockets. The details how to configure these sockets,
-    see <xref linkend="dhcp4-ctrl-channel"/> and <xref
-    linkend="dhcp6-ctrl-channel"/>. While it is possible to control
-    the servers directly using unix domain sockets it requires that
-    the controlling client be running on the same machine as
-    the server. SSH is usually used to
-    connect remotely to the controlled machine.</para>
-
-    <para>Network administrators usually prefer using some form
-    of a RESTful API to control the servers, rather than using UNIX
-    domain sockets directly. Therefore,
-    Kea includes a component called Control Agent (or CA), which
-    exposes a RESTful API to the controlling clients and can forward
-    commands to the respective Kea services over the UNIX domain
-    sockets. The CA configuration has been described in
-    <xref linkend="agent-configuration"/>.</para>
-
-    <para>The HTTP requests received by the CA contain the control
-    commands encapsulated within HTTP requests. Simply speaking,
-    the CA is responsible for stripping the HTTP layer from the
-    received commands and forwarding the commands in a JSON format
-    over the UNIX domain sockets to the respective services. Because the
-    CA receives commands for all services, it requires additional
-    "forwarding" information to be included in the client's messages.
-    This forwarding information is carried within the
-    <command>service</command> parameter of the received command.
-    If the <command>service</command> parameter is not included, or if
-    the parameter is a blank list, the CA will assume that the control
-    command is targeted at the CA itself and will try to handle
-    it on its own.
-    </para>
-
-    <para>Control connections over both HTTP and UNIX domain sockets are
-    guarded with timeouts. The default timeout value is set to 10s
-    and is not configurable.
-    </para>
-
-        <section xml:id="ctrl-channel-syntax">
-    <title>Data Syntax</title>
-    <para>Communication over the control channel is conducted using JSON
-    structures. If configured, Kea will open a socket and listen
-    for incoming connections. A process connecting to this socket
-    is expected to send JSON commands structured as follows:
-
-<screen>
-{
-    "command": "foo",
-    "service": [ "dhcp4" ]
-    "arguments": {
-        "param1": "value1",
-        "param2": "value2",
-        ...
-    }
-}
-</screen>
-
-    The same command sent over the RESTful interface to the CA will have
-    the following structure:
-
-<screen>
-    POST / HTTP/1.1\r\n
-    Content-Type: application/json\r\n
-    Content-Length: 147\r\n\r\n
-    {
-        "command": "foo",
-        "service": [ "dhcp4" ]
-        "arguments": {
-            "param1": "value1",
-            "param2": "value2",
-            ...
-        }
-    }
-</screen>
-
-    <command>command</command> is the name of the command to execute and
-    is mandatory. <command>arguments</command> is a map of parameters
-    required to carry out the given command. The exact content and
-    format of the map is command-specific.</para>
-
-    <para>
-      <command>service</command> is a list of the servers at which the control
-      command is targeted. In the example above, the control command is
-      targeted at the DHCPv4 server. In most cases, the CA will simply forward this
-      command to the DHCPv4 server for processing via a UNIX domain socket.
-      Sometimes, the command including a service value may also be processed by the
-      CA, if the CA is running a hooks library which handles such a command for the
-      given server. As an example, the hooks library loaded by the CA
-      may perform some operations on the database, such as adding host reservations,
-      modifying leases, etc. An advantage of performing DHCPv4-specific
-      administrative operations in the CA, rather than forwarding it to
-      the DHCPv4 server, is the ability to perform these operations without
-      disrupting the DHCPv4 service, since the DHCPv4 server doesn't have to stop
-      processing DHCP messages to apply changes to the database. Nevertheless,
-      these situations are rather rare and, in most cases, when the
-      <command>service</command> parameter contains a name of the service
-      the commands are simply forwarded by the CA. The forwarded command
-      includes the <command>service</command> parameter but this parameter
-      is ignored by the receiving server. This parameter is only meaningful
-      to the CA.
-    </para>
-
-    <para>
-      If the command received by the CA does not include a <command>service</command>
-      parameter or this list is empty, the CA simply processes this message
-      on its own. For example, a <command>config-get</command> command which
-      includes no service parameter returns the Control Agent's own
-      configuration. The <command>config-get</command> with a service
-      value "dhcp4" is forwarded to the DHCPv4 server and returns the
-      DHCPv4 server's configuration.
-    </para>
-
-    <para>
-      The following list shows the mapping of the values carried within the
-      <command>service</command> parameter to the servers to which the commands
-      are forwarded:
-
-      <itemizedlist>
-        <listitem>
-          <simpara><command>dhcp4</command> - the command is forwarded to the
-          <command>kea-dhcp4</command> server.</simpara>
-        </listitem>
-
-        <listitem>
-          <simpara><command>dhcp6</command> - the command is forwarded to the
-          <command>kea-dhcp6</command> server.</simpara>
-        </listitem>
-
-        <listitem>
-          <simpara><command>d2</command> - the command is forwarded to the
-          <command>kea-d2</command> server.</simpara>
-        </listitem>
-      </itemizedlist>
-    </para>
-
-    <para>The server processing the incoming command will send a response of
-    the form:
-<screen>
-{
-    "result": 0|1|2|3,
-    "text": "textual description",
-    "arguments": {
-        "argument1": "value1",
-        "argument2": "value2",
-        ...
-    }
-}
-</screen>
-    <command>result</command> indicates the outcome of the command. A value of 0
-    means success, while any non-zero value designates an error or a
-    failure to complete the requested action. Currently 1 indicates a generic
-    error, 2 means that a command is not supported, and 3 means that the
-    requested operation was completed, but the requested object was not
-    found. For example, a well-formed
-    command that requests a subnet that exists in a server's configuration
-    returns the result 0. If the server encounters an error condition, it
-    returns 1. If the command asks for the IPv6 subnet, but was sent to a DHCPv4
-    server, it returns 2. If the query asks for a subnet-id and there
-    is no subnet with such an id, the result is 3.</para>
-
-    <para>
-    The <command>text</command> field typically appears when the result is non-zero
-    and contains a description of the error encountered, but it often also appears
-    for successful outcomes. The exact text is command-specific, but in general
-    uses plain English to describe the outcome of the command.
-    <command>arguments</command> is a map of additional data values
-    returned by the server which are specific to the command issued. The map
-    may be present, but that depends on the specific command.
-    </para>
-
-    <note>
-      <simpara>
-        When sending commands via Control Agent, it is possible to specify
-        multiple services at which the command is targeted. CA forwards this
-        command to each service individually. Thus, the CA response to the
-        controlling client contains an array of individual responses.
-      </simpara>
-    </note>
-
-    </section>
-
-    <section xml:id="ctrl-channel-client">
-    <title>Using the Control Channel</title>
-
-    <para>The easiest way to start interacting with the control API is to use common UNIX/Linux tools
-    such as <command>socat</command> and <command>curl</command>.</para>
-
-    <para>In order to control the given Kea service via UNIX domain socket, use
-    <command>socat</command> in interactive mode as follows:
-<screen>
-$ socat UNIX:/path/to/the/kea/socket -
-</screen>
-    or in batch mode, include the "ignoreeof" option as shown below to ensure
-    socat waits long enough for the server to respond:
-<screen>
-$ echo "{ some command...}" | socat UNIX:/path/to/the/kea/socket -,ignoreeof
-</screen>
-where <command>/path/to/the/kea/socket</command> is the path specified in the
-<command>Dhcp4/control-socket/socket-name</command> parameter in the Kea
-configuration file. Text passed to <command>socat</command>
-is sent to Kea and the responses received from Kea are printed to standard
-    output. This approach communicates with the specific server directly and
-    bypasses the Control Agent.</para>
-
-    <para>It is also easy to open a UNIX socket programmatically. An example of
-    a simple client written in C is available in the Kea Developer's
-    Guide, in the Control Channel Overview chapter, in the Using Control Channel section.</para>
-
-    <para>To use Kea's RESTful API with <command>curl</command>, you may
-    use the following:
-<screen>
-$ curl -X POST -H "Content-Type: application/json" -d '{ "command": "config-get", "service": [ "dhcp4" ] }' http://ca.example.org:8000/
-</screen>
-
-    This assumes that the Control Agent is running on host
-    <filename>ca.example.org</filename> and is running the RESTful service on port 8000.
-    </para>
-
-    </section>
-
-    <section xml:id="commands-common">
-      <title>Commands Supported by Both the DHCPv4 and DHCPv6 Servers</title>
-
-      <section xml:id="command-build-report">
-        <title>build-report</title>
-        <para>
-          The <emphasis>build-report</emphasis> command returns
-          on the control channel what the command line
-          <command>-W</command> argument displays, i.e. the embedded
-          content of the <filename>config.report</filename> file.
-          This command does not take any parameters.
-        </para>
-<screen>
-{
-    "command": "build-report"
-}
-</screen>
-      </section> <!-- end of command-build-report -->
-
-      <section xml:id="command-config-get">
-        <title>config-get</title>
-
-        <para>The <emphasis>config-get</emphasis> command retrieves the current
-        configuration used by the server. This command does not take any
-        parameters. The configuration returned is roughly equal to the
-        configuration that was loaded using the -c command line option during server
-        start-up or later set using config-set command. However, there may be
-        certain differences, as comments are not retained. If the original
-        configuration used file inclusion, the returned configuration will
-        include all parameters from all the included files.</para>
-
-        <para> Note that the returned configuration is not redacted, i.e. it will
-        contain database passwords in plain text if those were specified in the
-        original configuration. Care should be taken not to expose the command
-        channel to unprivileged users.</para>
-
-        <para>
-          An example command invocation looks like this:
-<screen>
-{
-    "command": "config-get"
-}
-</screen>
-        </para>
-      </section> <!-- end of command-config-get -->
-
-      <section xml:id="command-config-reload">
-        <title>config-reload</title>
-
-        <para>The <emphasis>config-reload</emphasis> command instructs
-        Kea to load again the configuration file that was used
-        previously. This operation is useful if the configuration file
-        has been changed by some external source; for example, a
-        sysadmin can tweak the configuration file and use this command
-        to force Kea pick up the changes.</para>
-
-        <para>Caution should be taken when mixing this with config-set
-        commands. Kea remembers the location of the configuration file
-        it was started with, and this configuration can be significantly
-        changed using config-set command. When config-reload is issued
-        after config-set, Kea will attempt to reload its original
-        configuration from the file, possibly losing all changes
-        introduced using config-set or other commands.</para>
-
-        <para><emphasis>config-reload</emphasis> does not take any parameters.
-        An example command invocation looks like this:
-<screen>
-{
-    "command": "config-reload"
-}
-</screen>
-        </para>
-      </section> <!-- end of command-config-reload -->
-
-
-      <section xml:id="command-config-test">
-        <title>config-test</title>
-
-      <para>
-     The <emphasis>config-test</emphasis> command instructs the server to check
-     whether the new configuration supplied in the command's arguments can
-     be loaded. The supplied configuration is expected to be the full
-     configuration for the target server, along with an optional Logger
-     configuration. As for the <command>-t</command> command, some sanity checks
-     are not performed so it is possible a configuration which successfully
-     passes this command will still fail in the <command>config-set</command>
-     command or at launch time.
-     The structure of the command is as follows:
-      </para>
-<screen>
-{
-    "command": "config-test",
-    "arguments":  {
-        "&lt;server&gt;": {
-        }
-     }
-}
-</screen>
-      <para>
-    where &lt;server&gt; is the configuration element name for a given server
-    such as "Dhcp4" or "Dhcp6".  For example:
-      </para>
-<screen>
-{
-    "command": "config-test",
-    "arguments":  {
-        "Dhcp6": {
-            :
-        }
-     }
-}
-</screen>
-      <para>
-        The server's response will contain a numeric code, "result" (0 for success,
-    non-zero on failure), and  a string, "text", describing the outcome:
-<screen>
-    {"result": 0, "text": "Configuration seems sane..." }
-
-    or
-
-    {"result": 1, "text": "unsupported parameter: BOGUS (&lt;string&gt;:16:26)" }
-</screen>
-      </para>
-    </section> <!-- end of command-config-test -->
-
-      <section xml:id="command-config-write">
-        <title>config-write</title>
-
-        <para>The <emphasis>config-write</emphasis> command instructs the Kea server
-        to write its current configuration to a file on disk. It takes one
-        optional argument called <emphasis>filename</emphasis> that specifies
-        the name of the file to write the configuration to. If not specified, the
-        name used when starting Kea (passed as a -c argument) will be
-        used. If a relative path is specified, Kea will write its files
-        only in the directory it is running.</para>
-        <para>
-          An example command invocation looks like this:
-<screen>
-{
-    "command": "config-write",
-    "arguments": {
-        "filename": "config-modified-2017-03-15.json"
-    }
-}
-</screen>
-        </para>
-      </section> <!-- end of command-config-write -->
-
-      <section xml:id="command-leases-reclaim">
-        <title>leases-reclaim</title>
-        <para>
-          The <emphasis>leases-reclaim</emphasis> command instructs the server to
-          reclaim all expired leases immediately. The command has the following
-          JSON syntax:
-<screen>
-{
-    "command": "leases-reclaim",
-    "arguments": {
-        "remove": true
-    }
-}
-</screen>
-        </para>
-
-        <para>The <emphasis>remove</emphasis> boolean parameter is mandatory
-        and indicates whether the reclaimed leases should be removed from
-        the lease database (if true), or left in the
-        <emphasis>expired-reclaimed</emphasis> state (if false). The latter
-        facilitates lease affinity, i.e. the ability to re-assign an expired lease to
-        the same client which used this lease before. See
-        <xref linkend="lease-affinity"/> for the details. Also, see
-        <xref linkend="lease-reclamation"/> for general information
-        about the processing of expired leases (leases reclamation).</para>
-      </section>
-
-      <section xml:id="command-libreload">
-        <title>libreload</title>
-
-        <para>
-          The <emphasis>libreload</emphasis> command first unloads and then
-          loads all currently loaded hook libraries. This is primarily intended
-          to allow one or more hook libraries to be replaced with newer versions
-          without requiring Kea servers to be reconfigured or restarted. Note that
-          the hook libraries are passed the same parameter values (if any)
-          that were passed when they originally loaded.
-<screen>
-{
-    "command": "libreload",
-    "arguments": { }
-}
-</screen>
-       </para>
-       <para>
-         The server will respond with a result of either 0, indicating success, or 1,
-         indicating failure.
-       </para>
-     </section> <!-- end of command-libreload -->
-
-      <section xml:id="command-list-commands">
-      <title>list-commands</title>
-
-      <para>
-        The <emphasis>list-commands</emphasis> command retrieves a list of all
-        commands supported by the server. It does not take any arguments.
-        An example command may look like this:
-<screen>
-{
-    "command": "list-commands",
-    "arguments": { }
-}
-</screen>
-      </para>
-      <para>
-        The server responds with a list of all supported commands. The
-        arguments element is a list of strings, each of which conveys
-        one supported command.
-      </para>
-    </section> <!-- end of command-list-commands -->
-
-    <section xml:id="command-config-set">
-      <title>config-set</title>
-
-      <para>
-    The <emphasis>config-set</emphasis> command instructs the server to replace
-    its current configuration with the new configuration supplied in the
-    command's arguments. The supplied configuration is expected to be the full
-    configuration for the target server, along with an optional Logger
-    configuration. While optional, the Logger configuration is highly
-    recommended, as without it the server will revert to its default logging
-    configuration. The structure of the command is as follows:
-      </para>
-<screen>
-{
-    "command": "config-set",
-    "arguments":  {
-        "&lt;server&gt;": {
-        }
-     }
-}
-</screen>
-      <para>
-    where &lt;server&gt; is the configuration element name for a given server
-    such as "Dhcp4" or "Dhcp6". For example:
-      </para>
-<screen>
-{
-    "command": "config-set",
-    "arguments":  {
-        "Dhcp6": {
-            :
-        }
-     }
-}
-</screen>
-      <para>
-    If the new configuration proves to be invalid, the server retains
-    its current configuration. Please note that the new configuration is
-    retained in memory only; if the server is restarted or a configuration
-    reload is triggered via a signal, the server uses the configuration
-    stored in its configuration file.
-
-        The server's response contains a numeric code, "result" (0 for success,
-    non-zero on failure), and  a string, "text", describing the outcome:
-<screen>
-    {"result": 0, "text": "Configuration successful." }
-
-    or
-
-    {"result": 1, "text": "unsupported parameter: BOGUS (&lt;string&gt;:16:26)" }
-</screen>
-      </para>
-    </section> <!-- end of command-config-set -->
-
-    <section xml:id="command-shutdown">
-      <title>shutdown</title>
-
-      <para>
-        The <emphasis>shutdown</emphasis> command instructs the server to initiate
-        its shutdown procedure. It is the equivalent of sending a SIGTERM signal
-        to the process. This command does not take any arguments. An example
-        command may look like this:
-<screen>
-{
-    "command": "shutdown"
-}
-</screen>
-      </para>
-      <para>
-        The server responds with a confirmation that the shutdown procedure
-        has been initiated.
-      </para>
-    </section> <!-- end of command-shutdown -->
-
-    <section id="command-dhcp-disable">
-      <title>dhcp-disable</title>
-      <para>
-        The <emphasis>dhcp-disable</emphasis> command globally disables the DHCP
-        service. The server continues to operate, but it drops all received DHCP
-        messages. This command is useful when the server's maintenance requires that
-        the server temporarily stop allocating new leases and renew existing leases.
-        It is also useful in failover-like configurations during a synchronization of
-        the lease databases at startup, or recovery after a failure. The optional parameter
-        <emphasis>max-period</emphasis> specifies the time in seconds after which the
-        DHCP service should be automatically re-enabled, if the
-        <emphasis>dhcp-enable</emphasis> command is not sent before this time elapses.
-      </para>
-<screen>
-{
-    "command": "dhcp-disable",
-    "arguments": {
-        "max-period": 20
-    }
-}
-</screen>
-    </section> <!-- end of command-dhcp-disable -->
-
-    <section id="command-dhcp-enable">
-      <title>dhcp-enable</title>
-      <para>
-        The <emphasis>dhcp-enable</emphasis> command globally enables the DHCP
-        service.
-      </para>
-<screen>
-{
-    "command": "dhcp-enable"
-}
-</screen>
-    </section> <!-- end of command-dhcp-disable -->
-
-      <section xml:id="command-version-get">
-        <title>version-get</title>
-        <para>
-          The <emphasis>version-get</emphasis> command returns
-          extended information about the Kea version. It is the same
-          information available via the <command>-V</command> command-line
-          argument. This command does not take any parameters.
-        </para>
-<screen>
-{
-    "command": "version-get"
-}
-</screen>
-      </section> <!-- end of command-version-get -->
-
-      <section xml:id="command-server-tag-get">
-        <title>server-tag-get</title>
-        <para>
-          The <emphasis>server-tag-get</emphasis> command returns
-          the server tag. This command does not take any parameters.
-        </para>
-<screen>
-{
-    "command": "server-tag-get"
-}
-</screen>
-      </section> <!-- end of command-server-tag-get -->
-
-    </section> <!-- end of commands supported by both servers -->
-
-    <section>
-      <title>Commands Supported by D2 Server</title>
-      <para>The D2 server supports only a subset of DHCPv4 / DHCPv6 server
-      commands:
-      <itemizedlist>
-        <listitem>
-          <simpara>build-report</simpara>
-        </listitem>
-        <listitem>
-          <simpara>config-get</simpara>
-        </listitem>
-        <listitem>
-          <simpara>config-reload</simpara>
-        </listitem>
-        <listitem>
-          <simpara>config-set</simpara>
-        </listitem>
-        <listitem>
-          <simpara>config-test</simpara>
-        </listitem>
-        <listitem>
-          <simpara>config-write</simpara>
-        </listitem>
-        <listitem>
-          <simpara>list-commands</simpara>
-        </listitem>
-        <listitem>
-          <simpara>shutdown</simpara>
-        </listitem>
-        <listitem>
-          <simpara>version-get</simpara>
-        </listitem>
-      </itemizedlist>
-      </para>
-    </section>
-
-    <section xml:id="agent-commands">
-      <title>Commands Supported by Control Agent</title>
-      <para>The following commands listed in <xref linkend="commands-common"/>
-      are also supported by the Control Agent, i.e. when the
-      <command>service</command> parameter is blank, the commands are handled
-      by the CA and they relate to the CA process itself:
-      <itemizedlist>
-        <listitem>
-          <simpara>build-report</simpara>
-        </listitem>
-        <listitem>
-          <simpara>config-get</simpara>
-        </listitem>
-        <listitem>
-          <simpara>config-reload</simpara>
-        </listitem>
-        <listitem>
-          <simpara>config-set</simpara>
-        </listitem>
-        <listitem>
-          <simpara>config-test</simpara>
-        </listitem>
-        <listitem>
-          <simpara>config-write</simpara>
-        </listitem>
-        <listitem>
-          <simpara>list-commands</simpara>
-        </listitem>
-        <listitem>
-          <simpara>shutdown</simpara>
-        </listitem>
-        <listitem>
-          <simpara>version-get</simpara>
-        </listitem>
-      </itemizedlist>
-      </para>
-    </section>
-
-  </chapter>
diff --git a/doc/guide/ddns.xml b/doc/guide/ddns.xml
deleted file mode 100644 (file)
index 879cac3..0000000
+++ /dev/null
@@ -1,1063 +0,0 @@
-<!--
- - Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-
-<!-- Converted by db4-upgrade version 1.1 -->
-<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="dhcp-ddns-server">
-    <title>The DHCP-DDNS Server</title>
-
-    <section id="dhcp-ddns-overview">
-      <title>Overview</title>
-      <para>
-      The DHCP-DDNS Server (kea-dhcp-ddns, known informally as D2) conducts
-      the client side of the Dynamic DNS protocol (DDNS, defined in <link
-      xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc2136">RFC 2136</link>)
-      on behalf of the DHCPv4 and DHCPv6 servers (kea-dhcp4 and kea-dhcp6
-      respectively). The DHCP servers construct DDNS update requests, known
-      as NameChangeRequests (NCRs), based on DHCP lease change events and
-      then post them to D2. D2 attempts to match each request to the
-      appropriate DNS server(s) and carries out the necessary conversation with
-      those servers to update the DNS data.
-    </para>
-    <section id="dhcp-ddns-dns-server-selection">
-      <title>DNS Server Selection</title>
-      <para>
-      In order to match a request to the appropriate DNS servers, D2 must have a
-      catalog of servers from which to select. In fact, D2 has two such catalogs,
-      one for forward DNS and one for reverse DNS; these catalogs are referred
-      to as DDNS Domain Lists. Each list consists of one or more named DDNS
-      Domains. Further, each DDNS Domain has a list of one or more DNS
-      servers that publish the DNS data for that domain.
-      </para>
-      <para>
-      When conducting forward domain matching, D2 compares the fully-qualified domain name (FQDN) in
-      the request against the name of each Forward DDNS Domain in its catalog. The domain
-      whose name matches the longest portion of the FQDN is considered the
-      best match. For example, if the FQDN is "myhost.sample.example.com.",
-      and there are two forward domains in the catalog, "sample.example.com."
-      and "example.com.", the former is regarded as the best match. In some
-      cases, it may not be possible to find a suitable match. Given the same two
-      forward domains there would be no match for the FQDN, "bogus.net", so the
-      request would be rejected. Finally, if there are no Forward DDNS Domains
-      defined, D2 simply disregards the forward update portion of requests.
-      </para>
-      <para>
-      When conducting reverse domain matching, D2 constructs a reverse
-      FQDN from the lease address in the request and compares that against
-      the name of each Reverse DDNS Domain. Again, the domain whose name matches
-      the longest portion of the FQDN is considered the best match. For instance,
-      if the lease address is "172.16.1.40" and there are two reverse domains in
-      the catalog, "1.16.172.in-addr.arpa." and "16.172.in-addr.arpa", the
-      former is the best match. As with forward matching, it may not
-      find a suitable match. Given the same two domains, there would be no
-      match for the lease address, "192.168.1.50", and the request would be
-      rejected. Finally, if there are no Reverse DDNS Domains defined, D2 will
-      simply disregard the reverse update portion of requests.
-      </para>
-    </section>
-    <section xml:id="dhcp-ddns-conflict-resolution">
-      <title>Conflict Resolution</title>
-        <para>
-        D2 implements the conflict resolution strategy prescribed by
-        <ulink url="http://tools.ietf.org/html/rfc4703">RFC 4703</ulink>.
-        Conflict resolution is intended to prevent different clients from
-        mapping to the same FQDN at the same time. To make this possible, the
-        RFC requires that forward DNS entries for a given FQDN must be
-        accompanied by a DHCID resource record (RR). This record contains a
-        client identifier that uniquely identifies the client to whom the name
-        belongs. Furthermore, any DNS updater that wishes to update or remove
-        existing forward entries for an FQDN may only do so if their client
-        matches that of the DHCID RR.
-        </para>
-        <para>
-        In other words, the DHCID RR maps an FQDN to the client to whom it
-        belongs, and thereafter changes to that mapping should only be
-        done by or at the behest of that client.
-        </para>
-        <para>
-        Currently, conflict detection is always performed.
-        </para>
-    </section>
-    <section id="dhcp-ddns-dual-stack">
-      <title>Dual-Stack Environments</title>
-      <para>
-        <ulink url="http://tools.ietf.org/html/rfc4703#section-5.2">RFC 4703,
-        section 5.2,</ulink> describes issues that may arise with dual-stack
-        clients. These are clients that wish to have have both IPv4 and IPv6
-        mappings for the same FQDN. For this to work properly, the
-        clients are required to embed their IPv6 DUID within their IPv4 client
-        identifier option as described in
-        <ulink url="http://tools.ietf.org/html/rfc4361">RFC 4703</ulink>.
-        In this way, DNS updates for both IPv4 and IPv6 can be managed under
-        the same DHCID RR. Support for this does not yet exist in Kea.
-      </para>
-    </section>
-    </section>
-    <section id="dhcp-ddns-server-start-stop">
-      <title>Starting and Stopping the DHCP-DDNS Server</title>
-
-      <para>
-      <command>kea-dhcp-ddns</command> is the Kea DHCP-DDNS server
-      and, due to the nature of DDNS, it runs alongside either the
-      DHCPv4 or DHCPv6 component (or both). Like other parts of
-      Kea, it is a separate binary that can be run on its own or through
-      <command>keactrl</command> (see <xref linkend="keactrl"/>). In
-      normal operation, controlling <command>kea-dhcp-ddns</command>
-      with <command>keactrl</command> is recommended; however, it is also
-      possible to run the DHCP-DDNS server directly. It accepts the
-      following command-line switches:
-      </para>
-
-      <itemizedlist>
-          <listitem>
-            <simpara>
-            <command>-c <replaceable>file</replaceable></command> -
-            specifies the configuration file. This is the only mandatory
-            switch.</simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-            <command>-d</command> - specifies whether the server
-            logging should be switched to debug/verbose mode. In verbose mode,
-            the logging severity and debuglevel specified in the configuration
-            file are ignored and "debug" severity and the maximum debuglevel
-            (99) are assumed. The flag is convenient for temporarily
-            switching the server into maximum verbosity, e.g. when
-            debugging.</simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <command>-v</command> - displays the Kea version and exits.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <command>-W</command> - displays the Kea configuration report
-              and exits. The report is a copy of the
-              <filename>config.report</filename> file produced by
-              <userinput>./configure</userinput>; it is embedded in the
-              executable binary.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-            <command>-t <replaceable>file</replaceable></command>
-            specifies the configuration file to be tested. Kea-dhcp-ddns
-            will attempt to load it and will conduct sanity checks.
-            Note that certain checks are possible only while running
-            the actual server. The actual status is reported with an exit
-            code (0 = configuration looks ok, 1 = error encountered).
-            Kea prints out log messages to standard output and errors
-            to standard error when testing the configuration.</simpara>
-          </listitem>
-      </itemizedlist>
-
-      <para>
-            The <filename>config.report</filename> may also be accessed more
-            directly, via the following command. The binary <userinput>path</userinput> may be found
-            in the install directory or in the <filename>.libs</filename>
-            subdirectory in the source tree. For example:
-            <filename>kea/src/bin/d2/.libs/kea-dhcp-ddns</filename>.
-<screen>
-strings <userinput>path</userinput>/kea-dhcp-ddns | sed -n 's/;;;; //p'
-</screen>
-      </para>
-
-      <para>
-      Upon startup the module will load its configuration and begin listening
-      for NCRs based on that configuration.
-      </para>
-
-      <para>
-        During startup the server will attempt to create a PID file of the
-        form: [runstatedir]/[conf name].kea-dhcp-ddns.pid
-        where:
-        <itemizedlist>
-            <listitem>
-            <simpara><command>runstatedir</command>: The value as passed into the
-            build configure script; it defaults to "/usr/local/var/run". Note
-            that this value may be overridden at runtime by setting the environment
-            variable KEA_PIDFILE_DIR. This is intended primarily for testing purposes.
-            </simpara>
-            </listitem>
-            <listitem>
-            <simpara><command>conf name</command>: The configuration file name
-            used to start the server, minus all preceding paths and the file extension.
-            For example, given a pathname of "/usr/local/etc/kea/myconf.txt", the
-            portion used would be "myconf".
-            </simpara>
-            </listitem>
-        </itemizedlist>
-        If the file already exists and contains the PID of a live process,
-        the server will issue a DHCP_DDNS_ALREADY_RUNNING log message and exit. It
-        is possible, though unlikely, that the file is a remnant of a system crash
-        and the process to which the PID belongs is unrelated to Kea. In such a
-        case it is necessary to manually delete the PID file.
-      </para>
-
-
-    </section> <!-- end start-stop -->
-    <section xml:id="d2-configuration">
-      <title>Configuring the DHCP-DDNS Server</title>
-      <para>
-        Before starting <command>kea-dhcp-ddns</command> module for the
-        first time, a configuration file must be created. The following default
-        configuration is a template that can be customized to your requirements.
-<screen>
-<userinput>"DhcpDdns": {
-    "ip-address": "127.0.0.1",
-    "port": 53001,
-    "dns-server-timeout": 100,
-    "ncr-protocol": "UDP",
-    "ncr-format": "JSON",
-    "tsig-keys": [ ],
-    "forward-ddns": {
-        "ddns-domains": [ ]
-    },
-    "reverse-ddns": {
-        "ddns-domains": [ ]
-    }
-}</userinput>
-</screen>
-      </para>
-      <para>
-      The configuration can be divided into the following sections, each of which is described
-      below:
-      </para>
-        <itemizedlist>
-          <listitem>
-            <simpara>
-        <emphasis>Global Server Parameters</emphasis> - values which control connectivity and global server behavior.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <emphasis>Control Socket</emphasis> - defines the Control Socket type and name.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <emphasis>TSIG Key Info</emphasis> - defines the TSIG keys used for secure traffic with DNS servers.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <emphasis>Forward DDNS</emphasis> - defines the catalog of Forward DDNS Domains.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <emphasis>Reverse DDNS</emphasis> - defines the catalog of Forward DDNS Domains.
-            </simpara>
-          </listitem>
-        </itemizedlist>
-      <section xml:id="d2-server-parameter-config">
-        <title>Global Server Parameters</title>
-      <itemizedlist>
-
-      <listitem><simpara>
-      <command>ip-address</command> - IP address on which D2
-      listens for requests. The default is the local loopback interface at
-      address 127.0.0.1. You may specify either an IPv4 or IPv6 address.
-      </simpara></listitem>
-
-      <listitem><simpara>
-      <command>port</command> - Port on which D2 listens for requests. The default value
-      is 53001.
-      </simpara></listitem>
-
-      <listitem><simpara>
-      <command>dns-server-timeout</command> - Maximum amount
-      of time, in milliseconds, that D2 will wait for a response from a
-      DNS server to a single DNS update message.
-      </simpara></listitem>
-
-      <listitem><simpara>
-      <command>ncr-protocol</command> - Socket protocol to use when sending requests to D2.
-      Currently only UDP is supported.
-      </simpara></listitem>
-
-      <listitem><simpara>
-      <command>ncr-format</command> - Packet format to use when sending requests to D2.
-      Currently only JSON format is supported.
-      </simpara></listitem>
-
-      </itemizedlist>
-        <para>
-        D2 must listen for change requests on a known address and port. By
-        default it listens at 127.0.0.1 on port 53001. The following example
-        illustrates how to change D2's global parameters so it will listen
-        at 192.168.1.10 port 900:
-<screen>
-"DhcpDdns": {
-    <userinput>"ip-address": "192.168.1.10",
-    "port": 900,</userinput>
-    ...
-    }
-}</screen>
-        </para>
-        <warning>
-          <simpara>
-            It is possible for a malicious attacker to send bogus
-            NameChangeRequests to the DHCP-DDNS server. Addresses
-            other than the IPv4 or IPv6 loopback addresses (127.0.0.1
-            or ::1) should only be used for testing purposes, but
-            note that local users may still communicate with the
-            DHCP-DDNS server.
-          </simpara>
-<!-- see ticket #3514 -->
-        </warning>
-<note>
-<simpara>
-If the ip-address and port are changed, the
-corresponding values in the DHCP servers' "dhcp-ddns" configuration section must be changed.
-</simpara>
-</note>
-      </section> <!-- "d2-server-parameter-config" -->
-
-      <section xml:id="d2-ctrl-channel">
-        <title>Management API for the D2 Server</title>
-        <para>
-          The management API allows the issuing of specific management
-          commands, such as configuration retrieval or shutdown.
-          For more details, see <xref linkend="ctrl-channel"/>.
-          Currently the only supported communication channel type is UNIX
-          stream socket. By default there are no sockets open. To instruct
-          Kea to open a socket, the following entry in the configuration
-          file can be used:
-<screen>
-"DhcpDdns": {
-    "control-socket": {
-        "socket-type": "unix",
-        "socket-name": <userinput>"/path/to/the/unix/socket"</userinput>
-    },
-    ...
-}
-</screen>
-        </para>
-
-        <para>
-          The length of the path specified by
-          the <command>socket-name</command> parameter is restricted by
-          the maximum length for the unix socket name on your operating
-          system, i.e. the size of the <command>sun_path</command> field
-          in the <command>sockaddr_un</command> structure, decreased by 1.
-          This value varies on different operating systems between
-          91 and 107 characters. Typical values are 107 on Linux and 103
-          on FreeBSD.
-        </para>
-
-        <para>
-          Communication over control channel is conducted using JSON
-          structures.  See the Control Channel section in the Kea
-          Developer's Guide for more details.
-        </para>
-
-        <para>The D2 server supports the following operational commands:
-          <itemizedlist>
-              <listitem>build-report</listitem>
-              <listitem>config-get</listitem>
-              <listitem>config-reload</listitem>
-              <listitem>config-set</listitem>
-              <listitem>config-test</listitem>
-              <listitem>config-write</listitem>
-              <listitem>list-commands</listitem>
-              <listitem>shutdown</listitem>
-              <listitem>version-get</listitem>
-          </itemizedlist>
-        </para>
-      </section> <!-- "d2-ctrl-channel" -->
-
-      <section xml:id="d2-tsig-key-list-config">
-        <title>TSIG Key List</title>
-        <para>
-        A DDNS protocol exchange can be conducted with or without TSIG
-        (defined in <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf/org/html/rfc2845">RFC
-        2845</link>). This configuration section allows the administrator
-        to define the set of TSIG keys that may be used in such
-        exchanges.</para>
-
-        <para>To use TSIG when updating entries in a DNS Domain,
-        a key must be defined in the TSIG Key List and referenced by
-        name in that domain's configuration entry. When D2 matches a
-        change request to a domain, it checks whether the domain has
-        a TSIG key associated with it. If so, D2 will use that key to
-        sign DNS update messages sent to and verify responses received
-        from the domain's DNS server(s). For each TSIG key required by
-        the DNS servers that D2 will be working with, there must be a
-        corresponding TSIG key in the TSIG Key list.</para>
-
-        <para>
-        As one might gather from the name, the tsig-key section of the
-        D2 configuration lists the TSIG keys. Each entry describes a
-        TSIG key used by one or more DNS servers to authenticate requests
-        and sign responses. Every entry in the list has three parameters:
-        <itemizedlist>
-          <listitem>
-            <simpara>
-              <command>name</command> -
-              a unique text label used to identify this key within the
-              list. This value is used to specify which key (if any) should be
-              used when updating a specific domain. As long as the name is unique its
-              content is arbitrary, although for clarity and ease of maintenance
-              it is recommended that it match the name used on the DNS server(s).
-              This field cannot be blank.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <command>algorithm</command> -
-              specifies which hashing algorithm should be used with this
-              key. This value must specify the same algorithm used for the
-              key on the DNS server(s). The supported algorithms are listed below:
-              <itemizedlist>
-                <listitem>
-                   <command>HMAC-MD5</command>
-                </listitem>
-                <listitem>
-                    <command>HMAC-SHA1</command>
-                </listitem>
-                <listitem>
-                  <command>HMAC-SHA224</command>
-              </listitem>
-              <listitem>
-                  <command>HMAC-SHA256</command>
-              </listitem>
-              <listitem>
-                  <command>HMAC-SHA384</command>
-                  </listitem>
-              <listitem>
-                  <command>HMAC-SHA512</command>
-              </listitem>
-              </itemizedlist>
-              This value is not case-sensitive.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <command>digest-bits</command> -
-              is used to specify the minimum truncated length in bits.
-              The default value 0 means truncation is forbidden; non-zero
-              values must be an integral number of octets, and be greater than
-              both 80 and half of the full length. (Note that in BIND 9
-              this parameter is appended after a dash to the algorithm
-              name.)
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <command>secret</command> -
-              is used to specify the shared secret key code for this key. This value is
-              case-sensitive and must exactly match the value specified on the DNS server(s).
-              It is a base64-encoded text value.
-            </simpara>
-          </listitem>
-        </itemizedlist>
-        </para>
-        <para>
-        As an example, suppose that a domain D2 will be updating is
-        maintained by a BIND 9 DNS server, which requires dynamic updates
-        to be secured with TSIG. Suppose further that the entry for
-        the TSIG key in BIND 9's named.conf file looks like this:
-<screen>
-   :
-   key "key.four.example.com." {
-       algorithm hmac-sha224;
-       secret "bZEG7Ow8OgAUPfLWV3aAUQ==";
-   };
-   :
-</screen>
-        By default, the TSIG Key list is empty:
-<screen>
-"DhcpDdns": {
-   <userinput>"tsig-keys": [ ]</userinput>,
-   ...
-}
-</screen>
-
-        We must extend the list with a new key:
-<screen>
-"DhcpDdns": {
-    "tsig-keys": [
-    <userinput>    {
-            "name": "key.four.example.com.",
-            "algorithm": "HMAC-SHA224",
-            "secret": "bZEG7Ow8OgAUPfLWV3aAUQ=="
-        }</userinput>
-    ],
-    ...
-}
-</screen>
-        </para>
-
-        <para>These steps would be repeated for each TSIG key needed. Note that
-        the same TSIG key can be used with more than one domain.</para>
-      </section>
-        <!-- "d2-tsig-key-list-config" -->
-
-      <section xml:id="d2-forward-ddns-config">
-        <title>Forward DDNS</title>
-        <para>
-        The Forward DDNS section is used to configure D2's forward update
-        behavior. Currently it contains a single parameter, the catalog of
-        Forward DDNS Domains, which is a list of structures.
-<screen>
-"DhcpDdns": {
-    <userinput>"forward-ddns": {
-        "ddns-domains": [ ]
-    }</userinput>,
-    ...
-}
-</screen>
-
-        By default, this list is empty, which will cause the server to ignore
-        the forward update portions of requests.
-        </para>
-        <section xml:id="add-forward-ddns-domain">
-          <title>Adding Forward DDNS Domains</title>
-          <para>
-          A Forward DDNS Domain maps a forward DNS zone to a set of
-          DNS servers which maintain the forward DNS data (i.e. name-to-
-          address mapping) for that zone. Each zone served needs one Forward DDNS
-          Domain. It may very well
-          be that some or all of the zones are maintained by the same
-          servers, but you will still need one DDNS Domain per zone. Remember
-          that matching a request to the appropriate server(s) is done
-          by zone and a DDNS Domain only defines a single zone.
-          </para>
-          <para>
-          This section describes how to add Forward DDNS Domains; repeat these
-          steps for each Forward DDNS Domain desired. Each Forward DDNS Domain
-          has the following parameters:
-          <itemizedlist>
-            <listitem>
-              <simpara>
-              <command>name</command> -
-              the fully qualified domain name (or zone) that this DDNS Domain
-              can update. This value is compared against the request
-              FQDN during forward matching. It must be unique within the
-              catalog.
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-              <command>key-name</command> -
-              if TSIG is used with this domain's servers, this
-              value should be the name of the key from within the TSIG Key List.
-              If the value is blank (the default), TSIG will not be
-              used in DDNS conversations with this domain's servers.
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-              <command>dns-servers</command> -
-              a list of one or more DNS servers which can conduct the server
-              side of the DDNS protocol for this domain. The servers
-              are used in a first-to-last preference; in other words, when D2
-              begins to process a request for this domain, it will pick the
-              first server in this list and attempt to communicate with it.
-              If that attempt fails, it will move to next one in the list and
-              so on until either it achieves success or the list is exhausted.
-              </simpara>
-            </listitem>
-          </itemizedlist>
-        To create a new Forward DDNS Domain, add a new domain
-        element and set its parameters:
-<screen>
-"DhcpDdns": {
-    "forward-ddns": {
-        "ddns-domains": [
-            <userinput>{
-                "name": "other.example.com.",
-                "key-name": "",
-                "dns-servers": [
-                ]
-            }</userinput>
-        ]
-    }
-}
-</screen>
-
-        It is possible to add a domain without any servers; however, if that domain
-        matches a request, the request will fail.
-        To make the domain useful, we must add at least one DNS
-        server to it.
-        </para>
-
-        <section xml:id="add-forward-dns-servers">
-          <title>Adding Forward DNS Servers</title>
-          <para>
-          This section describes how to add DNS servers to a Forward DDNS Domain.
-          Repeat these instructions as needed for all the servers in each domain.
-          </para>
-          <para>
-          Forward DNS Server entries represent actual DNS servers which
-          support the server side of the DDNS protocol. Each Forward DNS Server
-          has the following parameters:
-          <itemizedlist>
-            <listitem>
-              <simpara>
-              <command>hostname</command> -
-              the resolvable host name of the DNS server; this parameter is not
-              yet implemented.
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-              <command>ip-address</command> -
-              the IP address at which the server listens for DDNS requests.
-              This may be either an IPv4 or an IPv6 address.
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-              <command>port</command> -
-              the port on which the server listens for DDNS requests. It
-              defaults to the standard DNS service port of 53.
-              </simpara>
-            </listitem>
-          </itemizedlist>
-          To create a new forward DNS Server, one must add a new server
-          element to the domain and fill in its parameters. If, for
-        example, the service is running at "172.88.99.10", then set the forward DNS Server as
-        follows:
-<screen>
-"DhcpDdns": {
-    "forward-ddns": {
-        "ddns-domains": [
-            {
-                "name": "other.example.com.",
-                "key-name": "",
-                "dns-servers": [
-                    <userinput>{
-                        "hostname": "",
-                        "ip-address": "172.88.99.10",
-                        "port": 53
-                    }</userinput>
-                ]
-            }
-        ]
-    }
-}
-</screen>
-          </para>
-
-    <note><simpara>
-        Since "hostname" is not yet supported, the parameter
-        "ip-address" must be set to the address of the DNS server.
-    </simpara></note>
-
-        </section> <!-- "add-forward-dns-servers" -->
-
-      </section> <!-- "add-forward-ddns-domains" -->
-
-      </section> <!-- "d2-forward-ddns-config" -->
-
-      <section xml:id="d2-reverse-ddns-config">
-        <title>Reverse DDNS</title>
-        <para>
-        The Reverse DDNS section is used to configure D2's reverse update
-        behavior, and the concepts are the same as for the forward DDNS
-        section. Currently it contains a single parameter, the catalog of
-        Reverse DDNS Domains, which is a list of structures.
-<screen>
-"DhcpDdns": {
-    <userinput>"reverse-ddns": {
-        "ddns-domains": [ ]
-    }</userinput>
-    ...
-}
-</screen>
-        By default, this list is empty, which will cause the server to ignore
-        the reverse update portions of requests.
-        </para>
-        <section xml:id="add-reverse-ddns-domain">
-          <title>Adding Reverse DDNS Domains</title>
-          <para>
-          A Reverse DDNS Domain maps a reverse DNS zone to a set of DNS
-          servers which maintain the reverse DNS data (address-to-name
-          mapping) for that zone. Each zone served needs one Reverse DDNS Domain.
-          It may very well be that
-          some or all of the zones are maintained by the same servers,
-          but you will still need one DDNS Domain entry for each
-          zone. Remember that matching a request to the appropriate
-          server(s) is done by zone and a DDNS Domain only defines a
-          single zone.
-          </para>
-          <para>
-          This section describes how to add Reverse DDNS Domains; repeat these
-          steps for each Reverse DDNS Domain desired. Each Reverse DDNS Domain
-          has the following parameters:
-          <itemizedlist>
-            <listitem>
-              <simpara>
-              <command>name</command> -
-              the fully qualified reverse zone that this DDNS Domain
-              can update. This is the value used during reverse matching,
-              which will compare it with a reversed version of the request's
-              lease address. The zone name should follow the appropriate
-              standards; for example, to support the IPv4 subnet 172.16.1,
-              the name should be "1.16.172.in-addr.arpa.". Similarly,
-              to support an IPv6 subnet of 2001:db8:1, the name should be
-              "1.0.0.0.8.B.D.0.1.0.0.2.ip6.arpa."
-              Whatever the name, it must be unique within the catalog.
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-              <command>key-name</command> -
-              if TSIG should be used with this domain's servers, this
-              value should be the name of that key from the TSIG Key List.
-              If the value is blank (the default), TSIG will not be
-              used in DDNS conversations with this domain's servers. Currently
-              this value is not used as TSIG has not been implemented.
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-              <command>dns-servers</command> -
-              a list of one or more DNS servers which can conduct the server
-              side of the DDNS protocol for this domain. Currently, the servers
-              are used in a first-to-last preference; in other words, when D2
-              begins to process a request for this domain, it will pick the
-              first server in this list and attempt to communicate with it.
-              If that attempt fails, it will move to the next one in the list and
-              so on until either it achieves success or the list is exhausted.
-              </simpara>
-            </listitem>
-          </itemizedlist>
-        To create a new Reverse DDNS Domain, one must add a new domain element
-        and set its parameters. For example, to support subnet 2001:db8:1::,
-        the following configuration could be used:
-<screen>
-"DhcpDdns": {
-    "reverse-ddns": {
-        "ddns-domains": [
-            <userinput>{
-                "name": "1.0.0.0.8.B.D.0.1.0.0.2.ip6.arpa.",
-                "key-name": "",
-                "dns-servers": [
-                ]
-            }</userinput>
-        ]
-    }
-}
-</screen>
-
-        It is possible to add a domain without any servers; however, if that domain
-        matches a request, the request will fail.
-        To make the domain useful, you must add at least one DNS
-        server to it.
-        </para>
-
-        <section xml:id="add-reverse-dns-servers">
-          <title>Adding Reverse DNS Servers</title>
-          <para>
-          This section describes how to add DNS servers to a Reverse DDNS Domain.
-          Repeat these instructions as needed for all the servers in each domain.
-          </para>
-          <para>
-          Reverse DNS Server entries represent actual DNS servers which
-          support the server side of the DDNS protocol. Each Reverse DNS Server
-          has the following parameters:
-          <itemizedlist>
-            <listitem>
-              <simpara>
-              <command>hostname</command> -
-              the resolvable host name of the DNS server; this value is
-              currently ignored.
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-              <command>ip-address</command> -
-              the IP address at which the server listens for DDNS requests.
-              </simpara>
-            </listitem>
-            <listitem>
-              <simpara>
-              <command>port</command> -
-              the port on which the server listens for DDNS requests. It
-              defaults to the standard DNS service port of 53.
-              </simpara>
-            </listitem>
-          </itemizedlist>
-          To create a new reverse DNS Server, one must first add a new server
-          element to the domain and fill in its parameters. If, for
-        example, the service is running at "172.88.99.10", then set it as
-        follows:
-<screen>
-"DhcpDdns": {
-    "reverse-ddns": {
-        "ddns-domains": [
-            {
-                "name": "1.0.0.0.8.B.D.0.1.0.0.2.ip6.arpa.",
-                "key-name": "",
-                "dns-servers": [
-                    <userinput>{
-                        "hostname": "",
-                        "ip-address": "172.88.99.10",
-                        "port": 53
-                    }</userinput>
-                ]
-            }
-        ]
-    }
-}
-</screen>
-</para>
-
-    <note>
-    <simpara>
-    Since "hostname" is not yet supported, the parameter
-    "ip-address" must be set to the address of the DNS server.
-    </simpara>
-    </note>
-
-        </section> <!-- "add-reverse-dns-servers" -->
-
-      </section> <!-- "add-reverse-ddns-domains" -->
-
-      </section> <!-- "d2-reverse-ddns-config" -->
-
-      <section xml:id="d2-user-contexts">
-        <title>User Contexts in DDNS</title>
-
-        <note>
-          <para>User contexts were designed for hook libraries, which
-          are not yet supported for DHCP-DDNS server configuration.</para>
-        </note>
-
-        <para>
-          User contexts can store arbitrary data as long as it has valid JSON
-          syntax and its top level element is a map (i.e. the data must be
-          enclosed in curly brackets).
-        </para>
-
-        <para>
-          User contexts can be specified on global scope, ddns
-          domain, dns server, tsig key, and loggers. One other useful
-          usage is the ability to store comments or descriptions; the
-          parser translates a "comment" entry into a user context with
-          the entry, which allows a comment to be attached inside the
-          configuration itself.
-        </para>
-      </section> <!-- "d2-user-contexts" -->
-
-      <section xml:id="d2-example-config">
-        <title>Example DHCP-DDNS Server Configuration</title>
-        <para>
-        This section provides a sample DHCP-DDNS server configuration, based
-        on a small example network. Let's suppose our example network has
-        three domains, each with their own subnet.
-
-        <table>
-          <title>Our Example Network</title>
-          <tgroup cols="4" align="left">
-          <colspec colname="domain"/>
-          <colspec colname="subnet"/>
-          <colspec colname="fservers"/>
-          <colspec colname="rservers"/>
-          <thead>
-            <row>
-              <entry>Domain</entry>
-              <entry>Subnet</entry>
-              <entry>Forward DNS Servers</entry>
-              <entry>Reverse DNS Servers</entry>
-            </row>
-          </thead>
-          <tbody>
-            <row>
-              <entry>four.example.com</entry>
-              <entry>192.0.2.0/24</entry>
-              <entry>172.16.1.5, 172.16.2.5</entry>
-              <entry>172.16.1.5, 172.16.2.5</entry>
-            </row>
-            <row>
-              <entry>six.example.com</entry>
-              <entry>2001:db8:1::/64</entry>
-              <entry>3001:1::50</entry>
-              <entry>3001:1::51</entry>
-            </row>
-            <row>
-              <entry>example.com</entry>
-              <entry>192.0.0.0/16</entry>
-              <entry>172.16.2.5</entry>
-              <entry>172.16.2.5</entry>
-            </row>
-          </tbody>
-          </tgroup>
-        </table>
-        </para>
-        <para>
-        We need to construct three Forward DDNS Domains:
-        <table>
-          <title>Forward DDNS Domains Needed</title>
-          <tgroup cols="3" align="left">
-          <colspec colname="num"/>
-          <colspec colname="name"/>
-          <colspec colname="servers"/>
-          <thead>
-            <row>
-              <entry>#</entry>
-              <entry>DDNS Domain Name</entry>
-              <entry>DNS Servers</entry>
-            </row>
-          </thead>
-          <tbody>
-            <row>
-              <entry>1.</entry>
-              <entry>four.example.com.</entry>
-              <entry>172.16.1.5, 172.16.2.5</entry>
-            </row>
-            <row>
-              <entry>2.</entry>
-              <entry>six.example.com.</entry>
-              <entry>3001:1::50</entry>
-            </row>
-            <row>
-              <entry>3.</entry>
-              <entry>example.com.</entry>
-              <entry>172.16.2.5</entry>
-            </row>
-          </tbody>
-          </tgroup>
-        </table>
-        As discussed earlier, FQDN-to-domain matching is based on the longest
-        match. The FQDN, "myhost.four.example.com.", will match the first
-        domain ("four.example.com") while "admin.example.com." will match the
-        third domain ("example.com"). The
-        FQDN, "other.example.net.", will fail to match any domain and is
-        rejected.
-        </para>
-        <para>
-        The following example configuration specifies the Forward DDNS Domains.
-<screen><userinput>
-"DhcpDdns": {
-    "comment": "example configuration: forward part",
-    "forward-ddns": {
-        "ddns-domains": [
-            {
-                "name": "four.example.com.",
-                "key-name": "",
-                "dns-servers": [
-                    { "ip-address": "172.16.1.5" },
-                    { "ip-address": "172.16.2.5" }
-                ]
-            },
-            {
-                "name": "six.example.com.",
-                "key-name": "",
-                "dns-servers": [
-                    { "ip-address": "2001:db8::1" }
-                ]
-            },
-            {
-                "name": "example.com.",
-                "key-name": "",
-                "dns-servers": [
-                    { "ip-address": "172.16.2.5" }
-                ],
-                "user-context": { "backup": false }
-            },
-
-        ]
-    }
-}</userinput>
-</screen>
-
-        </para>
-        <para>
-        Similarly, we need to construct the three Reverse DDNS Domains:
-        <table>
-          <title>Reverse DDNS Domains Needed</title>
-          <tgroup cols="3" align="left">
-          <colspec colname="num"/>
-          <colspec colname="DDNS Domain name"/>
-          <colspec colname="DDNS Domain DNS Servers"/>
-          <thead>
-            <row>
-              <entry>#</entry>
-              <entry>DDNS Domain Name</entry>
-              <entry>DNS Servers</entry>
-            </row>
-          </thead>
-          <tbody>
-            <row>
-              <entry>1.</entry>
-              <entry>2.0.192.in-addr.arpa.</entry>
-              <entry>172.16.1.5, 172.16.2.5</entry>
-            </row>
-            <row>
-              <entry>2.</entry>
-              <entry>1.0.0.0.8.d.b.0.1.0.0.2.ip6.arpa.</entry>
-              <entry>3001:1::50</entry>
-            </row>
-            <row>
-              <entry>3.</entry>
-              <entry>0.182.in-addr.arpa.</entry>
-              <entry>172.16.2.5</entry>
-            </row>
-          </tbody>
-          </tgroup>
-        </table>
-        An address of "192.0.2.150" will match the first domain,
-        "2001:db8:1::10" will match the second domain, and "192.0.50.77"
-        the third domain.
-        </para>
-        <para>
-        These Reverse DDNS Domains are specified as follows:
-
-<screen><userinput>
-"DhcpDdns": {
-    "comment": "example configuration: reverse part",
-    "reverse-ddns": {
-        "ddns-domains": [
-            {
-                "name": "2.0.192.in-addr.arpa.",
-                "key-name": "",
-                "dns-servers": [
-                    { "ip-address": "172.16.1.5" },
-                    { "ip-address": "172.16.2.5" }
-                ]
-            }
-            {
-                "name": "1.0.0.0.8.B.D.0.1.0.0.2.ip6.arpa.",
-                "key-name": "",
-                "dns-servers": [
-                    { "ip-address": "2001:db8::1" }
-                ]
-            }
-            {
-                "name": "0.192.in-addr.arpa.",
-                "key-name": "",
-                "dns-servers": [
-                    { "ip-address": "172.16.2.5" }
-                ]
-            }
-        ]
-    }
-}</userinput>
-</screen>
-
-        </para>
-        </section> <!-- end of "d2-example" -->
-    </section> <!-- end of section "d2-configuration" -->
-    <section>
-      <title>DHCP-DDNS Server Limitations</title>
-      <para>The following are the current limitations of the DHCP-DDNS Server.</para>
-      <itemizedlist>
-        <listitem>
-          <simpara>
-            Requests received from the DHCP servers are placed in a
-            queue until they are processed. Currently, all queued requests
-            are lost when the server shuts down.
-          </simpara>
-        </listitem>
-      </itemizedlist>
-    </section>
-  </chapter>
diff --git a/doc/guide/dhcp4-srv.xml b/doc/guide/dhcp4-srv.xml
deleted file mode 100644 (file)
index 79daa9d..0000000
+++ /dev/null
@@ -1,5838 +0,0 @@
-<!--
- - Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-<!-- Converted by db4-upgrade version 1.1 -->
-<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="dhcp4">
-    <title>The DHCPv4 Server</title>
-
-    <section xml:id="dhcp4-start-stop">
-      <title>Starting and Stopping the DHCPv4 Server</title>
-
-      <para>
-        It is recommended that the Kea DHCPv4 server be started and stopped
-        using <command>keactrl</command> (described in <xref linkend="keactrl"/>);
-        however, it is also possible to run the server directly. It accepts
-        the following command-line switches:
-      </para>
-
-      <itemizedlist>
-          <listitem>
-            <simpara>
-            <command>-c <replaceable>file</replaceable></command> -
-            specifies the configuration file. This is the only mandatory
-            switch.</simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-            <command>-d</command> - specifies whether the server
-            logging should be switched to debug/verbose mode. In verbose mode,
-            the logging severity and debuglevel specified in the configuration
-            file are ignored and "debug" severity and the maximum debuglevel
-            (99) are assumed. The flag is convenient for temporarily
-            switching the server into maximum verbosity, e.g. when
-            debugging.</simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-            <command>-p <replaceable>server-port</replaceable></command> -
-            specifies the local UDP port on which the server will listen.
-            This is only useful during testing, as a DHCPv4 server
-            listening on ports other than the standard ones will not
-            be able to handle regular DHCPv4 queries.</simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-            <command>-P <replaceable>client-port</replaceable></command> -
-            specifies the remote UDP port to which the server will send
-            all responses. This is only useful during testing, as a
-            DHCPv4 server sending responses to ports other than the
-            standard ones will not be able to handle regular DHCPv4
-            queries.</simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-            <command>-t <replaceable>file</replaceable></command> -
-            specifies a configuration file to be tested. Kea-dhcp4
-            will load it, check it, and exit. During the test, log messages are
-            printed to standard output and error messages to standard error. The
-            result of the test is reported through the exit code (0 = configuration
-            looks ok, 1 = error encountered). The check is not comprehensive; certain
-            checks are possible only when running the server.</simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <command>-v</command> - displays the Kea version and exits.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <command>-V</command> - displays the Kea extended version with
-              additional parameters and exits. The listing includes the versions
-              of the libraries dynamically linked to Kea.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <command>-W</command> - displays the Kea configuration report
-              and exits. The report is a copy of the
-              <filename>config.report</filename> file produced by
-              <userinput>./configure</userinput>; it is embedded in the
-              executable binary.
-            </simpara>
-          </listitem>
-      </itemizedlist>
-
-      <para>
-        On startup, the server will detect available network interfaces
-        and will attempt to open UDP sockets on all interfaces
-        mentioned in the configuration file.
-        Since the DHCPv4 server opens privileged ports, it requires root
-        access. Make sure you run this daemon as root.
-      </para>
-
-      <para>
-        During startup, the server will attempt to create a PID file of the
-        form: [runstatedir]/kea/[conf name].kea-dhcp4.pid where:
-        <itemizedlist>
-            <listitem>
-            <simpara><command>runstatedir</command>: The value as passed into the
-            build configure script; it defaults to "/usr/local/var/run". Note
-            that this value may be overridden at runtime by setting the environment
-            variable KEA_PIDFILE_DIR, although this is intended primarily for testing purposes.
-            </simpara>
-            </listitem>
-            <listitem>
-            <simpara><command>conf name</command>: The configuration file name
-            used to start the server, minus all preceding paths and the file extension.
-            For example, given a pathname of "/usr/local/etc/kea/myconf.txt", the
-            portion used would be "myconf".
-            </simpara>
-            </listitem>
-        </itemizedlist>
-        If the file already exists and contains the PID of a live process,
-        the server will issue a DHCP4_ALREADY_RUNNING log message and exit. It
-        is possible, though unlikely, that the file is a remnant of a system crash
-        and the process to which the PID belongs is unrelated to Kea. In such a
-        case it would be necessary to manually delete the PID file.
-      </para>
-
-      <para>
-        The server can be stopped using the <command>kill</command> command.
-        When running in a console, the server can also be shut down by
-        pressing ctrl-c. It detects the key combination and shuts
-        down gracefully.
-      </para>
-    </section>
-
-    <section xml:id="dhcp4-configuration">
-      <title>DHCPv4 Server Configuration</title>
-<section>
-  <title>Introduction</title>
-      <para>
-        This section explains how to configure the DHCPv4 server using a
-        configuration file. Before DHCPv4 is started, its configuration
-        file has to be created. The basic configuration is as follows:
-<screen>
-{
-# DHCPv4 configuration starts in this line
-"Dhcp4": {
-
-# First we set up global values
-    "valid-lifetime": 4000,
-    "renew-timer": 1000,
-    "rebind-timer": 2000,
-
-# Next we setup the interfaces to be used by the server.
-    "interfaces-config": {
-        "interfaces": [ "eth0" ]
-    },
-
-# And we specify the type of lease database
-    "lease-database": {
-        "type": "memfile",
-        "persist": true,
-        "name": "/var/lib/kea/dhcp4.leases"
-    },
-
-# Finally, we list the subnets from which we will be leasing addresses.
-    "subnet4": [
-        {
-            "subnet": "192.0.2.0/24",
-            "pools": [
-                {
-                     "pool": "192.0.2.1 - 192.0.2.200"
-                }
-            ]
-        }
-    ]
-# DHCPv4 configuration ends with the next line
-}
-
-} </screen>
-</para>
-
-<para>The following paragraphs provide a brief overview of the parameters in
-the above example, along with
-their format. Subsequent sections of this chapter go into much greater detail
-for these and other parameters.</para>
-
-<para>The lines starting with a hash (#) are comments and are ignored by
-the server; they do not impact its
-operation in any way.</para>
-
-<para>The configuration starts in the first line with the initial
-opening curly bracket (or brace). Each configuration must contain an
-object specifying the configuration of the Kea module using it.
-In the example above this object is called <command>Dhcp4</command>.
-</para>
-
-<note>
-  <para>In the current Kea release it is possible to specify configurations
-  of multiple modules within a single configuration file, but this is not
-  recommended and support for it will be removed in the future releases. The
-  only object, besides the one specifying module configuration, which can
-  (and usually was) included in the same file is <command>Logging</command>.
-  However, we don't include this object in the example above for clarity
-  and its content, the list of loggers, should now be inside the
-  <command>Dhcp4</command> object instead of the deprecated object.
-  </para>
-</note>
-
-<para>The Dhcp4 configuration starts with the <command>"Dhcp4": {</command> line
-and ends with the corresponding closing brace (in the above example,
-the brace after the last comment). Everything defined between those
-lines is considered to be the Dhcp4 configuration.</para>
-
-<para>In the general case, the order in which those parameters appear does not
-matter, but there are two caveats. The first one is to remember that
-the configuration file must be well-formed JSON. That means that the parameters
-for any given scope must be separated by a comma and there must not be a comma
-after the last parameter. When reordering a configuration file, keep in mind that
-moving a parameter to or from the last position in a given scope may also require
-moving the comma. The second caveat is that it is uncommon â€” although
-legal JSON â€” to
-repeat the same parameter multiple times. If that happens, the last occurrence of a
-given parameter in a given scope is used, while all previous instances are
-ignored. This is unlikely to cause any confusion as there are no real-life
-reasons to keep multiple copies of the same parameter in your configuration
-file.</para>
-
-<para>Moving onto the DHCPv4 configuration elements, the first few elements
-define some global parameters. <command>valid-lifetime</command>
-defines how long the addresses (leases) given out by the
-server are valid. If nothing changes, a client that got an address is allowed to
-use it for 4000 seconds. (Note that integer numbers are specified as is,
-without any quotes around them.) <command>renew-timer</command> and
-<command>rebind-timer</command> are values (also in seconds) that
-define T1 and T2 timers that govern when the client will begin the renewal and
-rebind procedures.
-
-<note>Beginning with Kea 1.6.0 the lease valid lifetime is extended from a
-single value to a triplet with minimum, default and maximum values using
-<command>min-valid-lifetime</command>, <command>valid-lifetime</command> and
-<command>max-valid-lifetime</command>. When the client does not specify
-a lifetime the default value is used, when it specifies using a DHCP option
-code 51 this value is used if it is not less than the minimum (in this case
-the minimum is returned) or greater than the maximum (in this case the
-maximum is used).</note>
-
-<note>Both <command>renew-timer</command>
-and <command>rebind-timer</command> are optional. The server will only
-send rebind-timer to the client, via DHCPv4 option code 59, if it is
-less than lease valid lifetime; and it will only send renew-timer, via
-DHCPv4 option code 58, if it is less than rebind-timer (or lease valid
-lifetime if rebind-timer was not specified). In their absence, the
-client should select values for T1 and T2 timers according
-to <link xmlns:xlink="http://www.w3.org/1999/xlink"
-xlink:href="http://tools.ietf.org/html/rfc2131">RFC 2131</link>. See
-section <xref linkend="dhcp4-t1-t2-times"/> for more details on
-generating T1 and T2.</note></para>
-
-<para>The <command>interfaces-config</command> map specifies the server
-configuration concerning the network interfaces, on which the server should
-listen to the DHCP messages. The <command>interfaces</command> parameter
-specifies a list of network interfaces on which the server should listen.
-Lists are opened and closed with square brackets, with elements separated
-by commas. To listen on two interfaces, the
-<command>interfaces-config</command> command should look like this:
-<screen>
-"interfaces-config": {
-    "interfaces": [ "eth0", "eth1" ]
-},
-</screen>
-</para>
-
-<para>The next couple of lines define the lease database, the place where the server
-stores its lease information. This particular example tells the server to use
-<command>memfile</command>, which is the simplest (and fastest) database
-backend. It uses an in-memory database and stores leases on disk in a CSV
-file. This is a very simple configuration; usually the lease database configuration
-is more extensive and contains additional parameters. Note that
-<command>lease-database</command>
-is an object and opens up a new scope, using an opening brace.
-Its parameters (just one in this example - <command>type</command>)
-follow. If there were more than one, they would be separated by commas. This
-scope is closed with a closing brace. As more parameters for the Dhcp4 definition
-follow, a trailing comma is present.</para>
-
-<para>Finally, we need to define a list of IPv4 subnets. This is the
-most important DHCPv4 configuration structure, as the server uses that
-information to process clients' requests. It defines all subnets from
-which the server is expected to receive DHCP requests. The subnets are
-specified with the <command>subnet4</command> parameter. It is a list,
-so it starts and ends with square brackets. Each subnet definition in
-the list has several attributes associated with it, so it is a structure
-and is opened and closed with braces. At a minimum, a subnet definition
-has to have at least two parameters: <command>subnet</command> (which
-defines the whole subnet) and <command>pools</command> (which is a list of
-dynamically allocated pools that are governed by the DHCP server).</para>
-
-<para>The example contains a single subnet. If more than one were defined,
-additional elements
-in the <command>subnet4</command> parameter would be specified and
-separated by commas. For example, to define three subnets, the following
-syntax would be used:
-<screen>
-"subnet4": [
-    {
-        "pools": [ { "pool":  "192.0.2.1 - 192.0.2.200" } ],
-        "subnet": "192.0.2.0/24"
-    },
-    {
-        "pools": [ { "pool": "192.0.3.100 - 192.0.3.200" } ],
-        "subnet": "192.0.3.0/24"
-    },
-    {
-        "pools": [ { "pool": "192.0.4.1 - 192.0.4.254" } ],
-        "subnet": "192.0.4.0/24"
-    }
-]
-</screen>
-Note that indentation is optional and is used for aesthetic purposes only.
-In some cases it may be preferable to use more compact notation.
-</para>
-
-<para>After all the parameters have been specified, we have two contexts open:
-global and Dhcp4, hence we need two closing curly brackets to close them.
-</para>
-</section>
-
-<section>
-  <title>Lease Storage</title>
-  <para>All leases issued by the server are stored in the lease database.
-  Currently there are four database backends available:  memfile (which is the
-  default backend), MySQL, PostgreSQL, and Cassandra.</para>
-<section>
-  <title>Memfile - Basic Storage for Leases</title>
-
-  <para>The server is able to store lease data in different repositories. Larger
-  deployments may elect to store leases in a database. <xref linkend="database-configuration4"/> describes this option. In typical
-  smaller deployments though, the server will store lease information in a CSV file rather
-  than a database. As well as requiring less administration, an
-  advantage of using a file for storage is that it
-  eliminates a dependency on third-party database software.</para>
-
-  <para>The configuration of the file backend (Memfile) is controlled through
-  the Dhcp4/lease-database parameters. The <command>type</command> parameter
-  is mandatory and it specifies which storage for leases the server should use.
-  The value of <userinput>"memfile"</userinput> indicates that the file should
-  be used as the storage. The following list gives additional optional
-  parameters that can be used to configure the Memfile backend.
-
-  <itemizedlist>
-    <listitem>
-      <simpara><command>persist</command>: controls whether the new leases and
-      updates to existing leases are written to the file. It is strongly
-      recommended that the value of this parameter is set to
-      <userinput>true</userinput> at all times during the server's normal
-      operation. Not writing leases to disk means that if a server is restarted
-      (e.g. after a power failure), it will not know what addresses have been
-      assigned. As a result, it may hand out addresses to new clients that are
-      already in use. The value of <userinput>false</userinput> is mostly useful
-      for performance-testing purposes. The default value of the
-      <command>persist</command> parameter is <userinput>true</userinput>,
-      which enables writing lease updates
-      to the lease file.
-      </simpara>
-    </listitem>
-
-    <listitem>
-      <simpara><command>name</command>: specifies an absolute location of the lease
-      file in which new leases and lease updates will be recorded. The default value
-      for this parameter is <userinput>"[kea-install-dir]/var/lib/kea/kea-leases4.csv"
-      </userinput>.</simpara>
-    </listitem>
-
-    <listitem>
-      <simpara><command>lfc-interval</command>: specifies the interval, in seconds, at
-      which the server will perform a lease file cleanup (LFC). This
-      removes redundant (historical) information from the lease file
-      and effectively reduces the lease file size. The cleanup process is described
-      in more detailed fashion later in this section. The default value of the
-      <command>lfc-interval</command> is <userinput>3600</userinput>. A value of 0
-      disables the LFC.</simpara>
-    </listitem>
-
-  </itemizedlist>
-  </para>
-
-  <para>An example configuration of the Memfile backend is presented below:
-
-<screen>
-"Dhcp4": {
-    "lease-database": {
-        <userinput>"type": "memfile"</userinput>,
-        <userinput>"persist": true</userinput>,
-        <userinput>"name": "/tmp/kea-leases4.csv",</userinput>
-        <userinput>"lfc-interval": 1800</userinput>
-    }
-}
-</screen>
-
-    This configuration selects the <filename>/tmp/kea-leases4.csv</filename> as
-    the storage for lease information and enables persistence (writing lease updates
-    to this file). It also configures the backend to perform a periodic cleanup
-    of the lease file every 30 minutes.
-  </para>
-
-  <para>It is important to know how the lease file contents are organized
-  to understand why the periodic lease file cleanup is needed. Every time
-  the server updates a lease or creates a new lease for the client, the new
-  lease information must be recorded in the lease file. For performance reasons,
-  the server does not update the existing client's lease in the file, as this would
-  potentially require rewriting the entire file. Instead, it simply appends the new lease
-  information to the end of the file; the previous lease entries for the
-  client are not removed. When the server loads leases from the lease file, e.g.
-  at the server startup, it assumes that the latest lease entry for the client
-  is the valid one. The previous entries are discarded, meaning that the
-  server can re-construct the accurate information about the leases even though
-  there may be many lease entries for each client. However, storing many entries
-  for each client results in a bloated lease file and impairs the performance of
-  the server's startup and reconfiguration, as it needs to process a larger number
-  of lease entries.
-  </para>
-
-  <para>Lease file cleanup (LFC) removes all previous entries for each client and
-  leaves only the latest ones. The interval at which the cleanup is performed
-  is configurable, and it should be selected according to the frequency of lease
-  renewals initiated by the clients. The more frequent the renewals, the smaller
-  the value of <command>lfc-interval</command> should be. Note, however, that the
-  LFC takes time and thus it is possible (although unlikely) that, if the
-  <command>lfc-interval</command> is too short, a new cleanup
-  may be started while the previous one is still running. The server would recover from
-  this by skipping the new cleanup when it detects that the previous cleanup
-  is still in progress. But it implies that the actual cleanups will be
-  triggered more rarely than configured. Moreover, triggering a new cleanup
-  adds overhead to the server, which will not be able to respond to new
-  requests for a short period of time when the new cleanup process is spawned.
-  Therefore, it is recommended that the <command>lfc-interval</command> value
-  is selected in a way that would allow for the LFC to complete the cleanup before a
-  new cleanup is triggered.
-  </para>
-
-  <para>Lease file cleanup is performed by a separate process (in the background) to avoid
-  a performance impact on the server process. To avoid the conflicts
-  between two processes both using the same lease files, the LFC process
-  starts with Kea opening new lease file and the actual LFC process
-  operates on the lease file that is no longer used by the server. There are also other files
-  created as a side effect of the lease file cleanup. The detailed
-  description of the LFC is located later in this Kea Administrator's Reference Manual:
-  <xref linkend="kea-lfc" />.</para>
-
-</section>
-
-<section xml:id="database-configuration4">
-  <title>Lease Database Configuration</title>
-
-  <note>
-    <para>Lease database access information must be configured for the DHCPv4 server,
-    even if it has already been configured for the DHCPv6 server. The servers
-    store their information independently, so each server can use a separate
-    database or both servers can use the same database.</para>
-  </note>
-
-  <para>Lease database configuration is controlled through the Dhcp4/lease-database
-  parameters. The type of the database must be set to "memfile", "mysql", "postgresql", or
-  "cql", e.g.:
-<screen>
-"Dhcp4": { "lease-database": { <userinput>"type": "mysql"</userinput>, ... }, ... }
-</screen>
-  Next, the name of the database to hold the leases must be set; this is the
-  name used when the database was created
-  (see <xref linkend="mysql-database-create"/>,
-  <xref linkend="pgsql-database-create"/>, or
-  <xref linkend="cql-database-create"/>).
-<screen>
-"Dhcp4": { "lease-database": { <userinput>"name": "<replaceable>database-name</replaceable>" </userinput>, ... }, ... }
-</screen>
-  For Cassandra:
-<screen>
-"Dhcp4": { "lease-database": { <userinput>"keyspace": "<replaceable>database-name</replaceable>" </userinput>, ... }, ... }
-</screen>
-  If the database is located on a different system from the DHCPv4 server, the
-  database host name must also be specified. (It should be noted that this
-  configuration may have a severe impact on server performance.):
-<screen>
-"Dhcp4": { "lease-database": { <userinput>"host": "<replaceable>remote-host-name</replaceable>"</userinput>, ... }, ... }
-</screen>
-
-  Normally, the database will be on the same machine as
-  the DHCPv4 server. In this case, set the value to the empty string:
-<screen>
-"Dhcp4": { "lease-database": { <userinput>"host" : ""</userinput>, ... }, ... }
-</screen>
-
-  Should the database use a port different than the default, it may be
-  specified as well:
-<screen>
-"Dhcp4": { "lease-database": { <userinput>"port" : 12345</userinput>, ... }, ... }
-</screen>
-  Should the database be located on a different system, you may need to specify a longer interval
-  for the connection timeout:
-<screen>
-"Dhcp4": { "lease-database": { <userinput>"connect-timeout" : <replaceable>timeout-in-seconds</replaceable></userinput>, ... }, ... }
-</screen>
-The default value of five seconds should be more than adequate for local connections.
-If a timeout is given, though, it should be an integer greater than zero.
-  </para>
-  <para>
-The maximum number of times the server will automatically attempt to reconnect to
-the lease database after connectivity has been lost may be specified:
-<screen>
-"Dhcp4": { "lease-database": { <userinput>"max-reconnect-tries" : <replaceable>number-of-tries</replaceable></userinput>, ... }, ... }
-</screen>
-If the server is unable to reconnect to the database after making the maximum number
-of attempts the server will exit. A value of zero (the default) disables automatic
-recovery and the server will exit immediately upon detecting a loss of connectivity
-(MySQL and Postgres only). For Cassandra, Kea uses a Cassandra interface that
-connects to all nodes in a cluster at the same time. Any connectivity
-issues should be handled by internal Cassandra mechanisms.
-  </para>
-  <para>
-The number of milliseconds the server will wait between attempts to reconnect to the
-lease database after connectivity has been lost may also be specified:
-<screen>
-"Dhcp4": { "lease-database": { <userinput>"reconnect-wait-time" : <replaceable>number-of-milliseconds</replaceable></userinput>, ... }, ... }
-</screen>
-The default value for MySQL and Postgres is 0, which disables automatic recovery and
-causes the server to exit immediately upon detecting the loss of connectivity.
-The default value for Cassandra is 2000 ms.
-    </para>
-
-    <note>
-      <para>
-        Automatic reconnection to database backends is configured individually per backend.
-        This allows you to tailor the recovery parameters to each backend you use.
-        We do suggest that you enable it either for all backends or no backends so you
-        have consistent behavior. Losing connectivity to a backend for which reconnect
-        is disabled will result in the server shutting itself down. This includes
-        cases when the lease database backend and the hosts database backend are connected to
-        the same database instance.
-      </para>
-    </note>
-
-  <para>
-    <note>Note that host parameter is used by MySQL and PostgreSQL
-    backends. Cassandra has a concept of contact points that could be
-    used to contact the cluster, instead of a single IP or
-    hostname. It takes a list of comma-separated IP addresses, which may be specified as:
-<screen>
-"Dhcp4": { "lease-database": { <userinput>"contact-points" : "192.0.2.1,192.0.2.2"</userinput>, ... }, ... }
-</screen>
-  </note></para>
-
-  <para>Finally, the credentials of the account under which the server will
-  access the database should be set:
-<screen>
-"Dhcp4": { "lease-database": { <userinput>"user": "<replaceable>user-name</replaceable>"</userinput>,
-                               <userinput>"password": "<replaceable>password</replaceable>"</userinput>,
-                              ... },
-           ... }
-</screen>
-  If there is no password to the account, set the password to the empty string
-  "". (This is also the default.)</para>
-</section>
-
-<section xml:id="cassandra-database-configuration4">
-  <title>Cassandra-Specific Parameters</title>
-  <para>
-    The Cassandra backend is configured slightly differently. Cassandra has a
-    concept of contact points that could be used to contact the cluster,
-    instead of a single IP or hostname. It takes a list of comma-separated IP
-    addresses, which may be specified as:
-    <screen>
-"Dhcp4": {
-    "lease-database": {
-        "type": "cql",
-        <userinput>"contact-points": "<replaceable>ip-address1, ip-address2 [,...]</replaceable>"</userinput>,
-        ...
-    },
-    ...
-}</screen>
-  </para>
-
-  <para>
-    Cassandra also supports a number of optional parameters:
-    <itemizedlist>
-
-      <listitem><simpara>
-        <command>reconnect-wait-time</command> - governs how long Kea waits
-        before attempting to reconnect. Expressed in milliseconds. The default
-        is 2000 [ms].
-      </simpara></listitem>
-
-      <listitem><simpara>
-        <command>connect-timeout</command> - sets the timeout for connecting to
-        a node. Expressed in milliseconds. The default is 5000 [ms].
-      </simpara></listitem>
-
-      <listitem><simpara>
-        <command>request-timeout</command> - sets the timeout for
-        waiting for a response from a node. Expressed in milliseconds. The
-        default is 12000 [ms].
-      </simpara></listitem>
-
-      <listitem><simpara>
-        <command>tcp-keepalive</command> - governs the TCP
-        keep-alive mechanism. Expressed in seconds of delay. If the parameter
-        is not present, the mechanism is disabled.
-      </simpara></listitem>
-
-      <listitem><simpara>
-        <command>tcp-nodelay</command> - enables/disables Nagle's
-        algorithm on connections. The default is true.
-      </simpara></listitem>
-
-      <listitem><simpara>
-        <command>consistency</command> - configures consistency level.
-        The default is "quorum".
-        Supported values: any, one, two, three, quorum, all, local-quorum, each-quorum,
-        serial, local-serial, local-one.
-        See <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://docs.datastax.com/en/cassandra/3.0/cassandra/dml/dmlConfigConsistency.html">Cassandra consistency</link>
-        for more details.
-      </simpara></listitem>
-
-      <listitem><simpara>
-        <command>serial-consistency</command> - configures serial consistency
-        level which manages lightweight transaction isolation. The default is
-        "serial".
-        Supported values: any, one, two, three, quorum, all, local-quorum, each-quorum,
-        serial, local-serial, local-one.
-        See <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://docs.datastax.com/en/cassandra/3.0/cassandra/dml/dmlConfigSerialConsistency.html">Cassandra serial consistency</link>
-        for more details.
-      </simpara></listitem>
-
-    </itemizedlist>
-  </para>
-
-  <para>
-    For example, a complex Cassandra configuration with most parameters specified
-    could look as follows:
-<screen>
-"Dhcp4": {
-  "lease-database": {
-      "type": "cql",
-      "keyspace": "keatest",
-      "contact-points": "192.0.2.1, 192.0.2.2, 192.0.2.3",
-      "port": 9042,
-      "reconnect-wait-time": 2000,
-      "connect-timeout": 5000,
-      "request-timeout": 12000,
-      "tcp-keepalive": 1,
-      "tcp-nodelay": true
-    },
-    ...
-}</screen>
-
-Similar parameters can be specified for the hosts database.
-  </para>
-</section>
-
-</section>
-
-<section xml:id="hosts4-storage">
-  <title>Hosts Storage</title>
-    <para>Kea is also able to store information about host reservations in the
-    database. The hosts database configuration uses the same syntax as the lease
-    database. In fact, a Kea server opens independent connections for each
-    purpose, be it lease or hosts information. This arrangement gives the most
-    flexibility. Kea can keep leases and host reservations
-    separately, but can also point to the same database. Currently the
-    supported hosts database types are MySQL, PostgreSQL, and Cassandra.</para>
-
-    <para>Please note that usage of hosts storage is optional. A user can define
-    all host reservations in the configuration file, and that is the recommended way
-    if the number of reservations is small. However, when the number of
-    reservations grows, it is more convenient to use host storage. Please note
-    that both storage methods (configuration file and one of the supported databases)
-    can be used together. If hosts are defined in both places, the definitions
-    from the configuration file are checked first and external storage is checked
-    later, if necessary.</para>
-
-    <para>In fact, host information can be placed in multiple stores. Operations
-    are performed on the stores in the order they are defined in the configuration
-    file, although this leads to is a restriction in ordering in the case of a host
-    reservation addition; read-only stores must be configured after a (required)
-    read-write store, or the addition will fail.</para>
-
-<section xml:id="hosts-databases-configuration4">
-  <title>DHCPv4 Hosts Database Configuration</title>
-
-  <para>Hosts database configuration is controlled through the Dhcp4/hosts-database
-  parameters. If enabled, the type of database must be set to "mysql" or
-  "postgresql".
-<screen>
-"Dhcp4": { "hosts-database": { <userinput>"type": "mysql"</userinput>, ... }, ... }
-</screen>
-  Next, the name of the database to hold the reservations must be set; this is the
-  name used when the lease database was created (see <xref linkend="supported-databases"/>
-  for instructions on how to set up the desired database type).
-<screen>
-"Dhcp4": { "hosts-database": { <userinput>"name": "<replaceable>database-name</replaceable>" </userinput>, ... }, ... }
-</screen>
-  If the database is located on a different system than the DHCPv4 server, the
-  database host name must also be specified. (Again it should be noted that this
-  configuration may have a severe impact on server performance.)
-<screen>
-"Dhcp4": { "hosts-database": { <userinput>"host": <replaceable>remote-host-name</replaceable></userinput>, ... }, ... }
-</screen>
-  Normally, the database will be on the same machine as
-  the DHCPv4 server. In this case, set the value to the empty string:
-<screen>
-"Dhcp4": { "hosts-database": { <userinput>"host" : ""</userinput>, ... }, ... }
-</screen>
-  Should the database use a port different than the default, it may be
-  specified as well:
-<screen>
-"Dhcp4": { "hosts-database": { <userinput>"port" : 12345</userinput>, ... }, ... }
-</screen>
-  <para>
-The maximum number of times the server will automatically attempt to reconnect to
-the host database after connectivity has been lost may be specified:
-<screen>
-"Dhcp4": { "hosts-database": { <userinput>"max-reconnect-tries" : <replaceable>number-of-tries</replaceable></userinput>, ... }, ... }
-</screen>
-If the server is unable to reconnect to the database after making the maximum number
-of attempts the server will exit. A value of zero (the default) disables automatic
-recovery and the server will exit immediately upon detecting a loss of connectivity
-(MySQL and Postgres only).
-  </para>
-  <para>
-The number of milliseconds the server will wait between attempts to reconnect to the
-host database after connectivity has been lost may also be specified:
-<screen>
-"Dhcp4": { "hosts-database": { <userinput>"reconnect-wait-time" : <replaceable>number-of-milliseconds</replaceable></userinput>, ... }, ... }
-</screen>
-The default value for MySQL and Postgres is 0, which disables automatic recovery and
-causes the server to exit immediately upon detecting the loss of connectivity.
-The default value for Cassandra is 2000 ms.
-    </para>
-
-    <note>
-      <para>
-        Automatic reconnection to database backends is configured individually per backend.
-        This allows you to tailor the recovery parameters to each backend you use.
-        We do suggest that you enable it either for all backends or no backends so you
-        have consistent behavior. Losing connectivity to a backend for which reconnect
-        is disabled will result in the server shutting itself down. This includes
-        cases when the lease database backend and the hosts database backend are connected to
-        the same database instance.
-      </para>
-    </note>
-  </para>
-  <para>Finally, the credentials of the account under which the server will
-  access the database should be set:
-<screen>
-"Dhcp4": { "hosts-database": { <userinput>"user": "<replaceable>user-name</replaceable>"</userinput>,
-                               <userinput>"password": "<replaceable>password</replaceable>"</userinput>,
-                              ... },
-           ... }
-</screen>
-  If there is no password to the account, set the password to the empty string
-  "". (This is also the default.)</para>
-
-  <para>The multiple storage extension uses a similar syntax; a configuration
-  is placed into a "hosts-databases" list instead of into a "hosts-database"
-  entry as in:
-<screen>
-"Dhcp4": { "hosts-databases": [ { <userinput>"type": "mysql"</userinput>, ... }, ... ], ... }
-</screen>
-  </para>
-
-  <para>For additional Cassandra-specific parameters, see <xref
-  linkend="cassandra-database-configuration4"/>.</para>
-
-</section>
-
-<section xml:id="read-only-database-configuration4">
-<title>Using Read-Only Databases for Host Reservations</title>
-<para>
-In some deployments the database user whose name is specified in the database backend
-configuration may not have write privileges to the database. This is often
-required by the policy within a given network to secure the data from being
-unintentionally modified. In many cases administrators have deployed inventory databases,
-which contain substantially more information about the hosts than just the
-static reservations assigned to them. The inventory database can be used to create
-a view of a Kea hosts database and such a view is often read-only.
-</para>
-<para>
-Kea host database backends operate with an implicit configuration to both
-read from and write to the database. If the database user does not have
-write access to the host database, the backend will fail to start and the
-server will refuse to start (or reconfigure). However, if access to a read-
-only host database is required for retrieving reservations for clients
-and/or assigning specific addresses and options, it is possible to explicitly
-configure Kea to start in "read-only" mode. This is controlled by the
-<command>readonly</command> boolean parameter as follows:
-<screen>
-"Dhcp4": { "hosts-database": { <userinput>"readonly": true</userinput>, ... }, ... }
-</screen>
-Setting this parameter to <userinput>false</userinput> configures the
-database backend to operate in "read-write" mode, which is also the default
-configuration if the parameter is not specified.
-</para>
-<note><para>The <command>readonly</command> parameter is currently only supported
-for MySQL and PostgreSQL databases.</para></note>
-</section>
-
-</section>
-
-<section xml:id="dhcp4-interface-configuration">
-  <title>Interface Configuration</title>
-  <para>The DHCPv4 server must be configured to listen on specific network
-  interfaces. The simplest network interface configuration tells the server to
-  listen on all available interfaces:
-  <screen>
-"Dhcp4": {
-    "interfaces-config": {
-        "interfaces": [ <userinput>"*"</userinput> ]
-    }
-    ...
-},
-  </screen>
-  The asterisk plays the role of a wildcard and means "listen on all interfaces."
-  However, it is usually a good idea to explicitly specify interface names:
-  <screen>
-"Dhcp4": {
-    "interfaces-config": {
-        "interfaces": [ <userinput>"eth1", "eth3"</userinput> ]
-    },
-    ...
-}
-  </screen>
-  </para>
-  <para>It is possible to use a wildcard interface name (asterisk) concurrently
-  with explicit interface names:
-  <screen>
-"Dhcp4": {
-    "interfaces-config": {
-        "interfaces": [ <userinput>"eth1", "eth3", "*"</userinput> ]
-    },
-    ...
-}
-  </screen>
-It is anticipated that this form of usage will only be used when it is desired to
-temporarily override a list of interface names and listen on all interfaces.
-  </para>
-  <para>Some deployments of DHCP servers require that the servers listen
-  on interfaces with multiple IPv4 addresses configured. In these situations,
-  the address to use can be selected by appending an IPv4 address to the interface
-  name in the following manner:
-  <screen>
-"Dhcp4": {
-    "interfaces-config": {
-        "interfaces": [ <userinput>"eth1/10.0.0.1", "eth3/192.0.2.3"</userinput> ]
-    },
-    ...
-}
-  </screen>
-  </para>
-
-  <para>Should the server be required to listen on multiple IPv4 addresses assigned
-  to the same interface, multiple addresses can be specified for an interface
-  as in the example below:
-  <screen>
-"Dhcp4": {
-    "interfaces-config": {
-        "interfaces": [ <userinput>"eth1/10.0.0.1", "eth1/10.0.0.2"</userinput> ]
-    },
-    ...
-}
-  </screen>
-  </para>
-
-  <para>Alternatively, if the server should listen on all addresses for the particular
-  interface, an interface name without any address should be specified.</para>
-
-  <para>Kea supports responding to directly connected clients which don't have
-  an address configured. This requires the server to
-  inject the hardware address of the destination into the data link layer
-  of the packet being sent to the client. The DHCPv4 server uses
-  raw sockets to achieve this, and builds the entire IP/UDP stack for the
-  outgoing packets. The downside of raw socket use, however, is that incoming
-  and outgoing packets bypass the firewalls (e.g. iptables). It is also
-  troublesome to handle traffic on multiple IPv4 addresses assigned to the
-  same interface, as raw sockets are bound to the interface; plus, advanced
-  packet filtering techniques (e.g. using the BPF) have to be used to
-  receive unicast traffic on the desired addresses assigned to the interface,
-  rather than capturing whole traffic reaching the interface to which the raw
-  socket is bound. Therefore, in deployments where the server doesn't
-  have to provision the directly connected clients and only receives the
-  unicast packets from the relay agents, the
-  DHCP server should be configured to use IP/UDP datagram sockets instead of raw sockets.
-  The following configuration demonstrates how this can be achieved:
-
-  <screen>
-"Dhcp4": {
-    "interfaces-config": {
-        "interfaces": [ <userinput>"eth1", "eth3"</userinput> ],
-        "dhcp-socket-type": "udp"
-    },
-    ...
-}
-  </screen>
-  The <command>dhcp-socket-type</command> specifies that the IP/UDP sockets will
-  be opened on all interfaces on which the server listens, i.e. "eth1" and
-  "eth3" in our case. If <command>dhcp-socket-type</command> is set to
-  <userinput>raw</userinput>, it configures the server to use raw sockets
-  instead. If the <command>dhcp-socket-type</command> value is not specified, the
-  default value <userinput>raw</userinput> is used.
-  </para>
-
-  <para>Using UDP sockets automatically disables the reception of broadcast
-  packets from directly connected clients. This effectively means that
-  UDP sockets can be used for relayed traffic only. When using raw sockets,
-  both the traffic from the directly connected clients and the relayed traffic
-  are handled. Caution should be taken when configuring the server to open
-  multiple raw sockets on the interface with several IPv4 addresses assigned.
-  If the directly connected client sends the message to the broadcast address,
-  all sockets on this link will receive this message and multiple responses
-  will be sent to the client. Therefore, the configuration with multiple IPv4
-  addresses assigned to the interface should not be used when the directly
-  connected clients are operating on that link. To use a single address on
-  such interface, the "interface-name/address" notation should be used.
-  </para>
-
-  <note>
-    <para>Specifying the value <userinput>raw</userinput> as the socket type
-    doesn't guarantee that the raw sockets will be used! The use of raw sockets
-    to handle the traffic from the directly connected clients is currently
-    supported on Linux and BSD systems only. If the raw sockets are not
-    supported on your particular OS, the server will issue a warning and
-    fall back to using IP/UDP sockets.</para>
-  </note>
-
-  <para>In a typical environment, the DHCP server is expected to send back a
-  response on the same network interface on which the query was received. This is
-  the default behavior. However, in some deployments it is desired that the
-  outbound (response) packets will be sent as regular traffic and the outbound
-  interface will be determined by the routing tables. This kind of asymmetric
-  traffic is uncommon, but valid. Kea now supports a parameter called
-  <command>outbound-interface</command> that controls this behavior. It supports
-  two values. The first one, <userinput>same-as-inbound</userinput>, tells Kea
-  to send back the response on the same interface where the query packet was received. This
-  is the default behavior. The second one, <userinput>use-routing</userinput>,
-  tells Kea to send regular UDP packets and let the kernel's routing table
-  determine the most appropriate interface. This only works when
-  <command>dhcp-socket-type</command> is set to <userinput>udp</userinput>.
-  An example configuration looks as follows:
-  <screen>
-"Dhcp4": {
-    "interfaces-config": {
-        "interfaces": [ "eth1", "eth3" ],
-        "dhcp-socket-type": "udp",
-        <userinput>"outbound-interface": "use-routing"</userinput>
-    },
-    ...
-}</screen>
-  </para>
-
-  <para>Interfaces are re-detected at each reconfiguration. This behavior
-  can be disabled by setting the <command>re-detect</command> value to
-  <userinput>false</userinput>, for instance:
-
-  <screen>
-"Dhcp4": {
-    "interfaces-config": {
-        "interfaces": [ <userinput>"eth1", "eth3"</userinput> ],
-        "re-detect": <userinput>false</userinput>
-    },
-    ...
-}
-  </screen>
-  Note that interfaces are not re-detected during <command>config-test</command>.
-  </para>
-
-  <para>Usually loopback interfaces (e.g. the "lo" or "lo0" interface)
-  may not be configured, but if a loopback interface is explicitely configured
-  and IP/UDP sockets are specified, the loopback interface is accepted.
-  </para>
-
-  <para>For example, it can be used to run Kea in a FreeBSD jail having
-  only a loopback interface, to service a relayed DHCP request:
-
-  <screen>
-"Dhcp4": {
-    "interfaces-config": {
-        "interfaces": [ <userinput>"lo0"</userinput> ],
-        "dhcp-socket-type": "udp"
-    },
-    ...
-}</screen>
-  </para>
-
-</section>
-
-<section xml:id="dhcpinform-unicast-issues">
-  <title>Issues with Unicast Responses to DHCPINFORM</title>
-  <para>The use of UDP sockets has certain benefits in deployments
-  where the server receives only relayed traffic; these benefits are
-  mentioned in <xref linkend="dhcp4-interface-configuration"/>. From
-  the administrator's perspective it is often desirable to
-  configure the system's firewall to filter out the unwanted traffic, and
-  the use of UDP sockets facilitates this. However, the administrator must
-  also be aware of the implications related to filtering certain types
-  of traffic, as it may impair the DHCP server's operation.
-  </para>
-
-  <para>In this section we are focusing on the case when the server
-  receives the DHCPINFORM message from the client via a relay. According
-  to <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc2131">RFC 2131</link>,
-  the server should unicast the DHCPACK response to the address carried in
-  the "ciaddr" field. When the UDP socket is in use, the DHCP server
-  relies on the low-level functions of an operating system to build the
-  data link, IP, and UDP layers of the outgoing message. Typically, the
-  OS will first use ARP to obtain the client's link-layer address to be
-  inserted into the frame's header, if the address is not cached from
-  a previous transaction that the client had with the server.
-  When the ARP exchange is successful, the DHCP message can be unicast
-  to the client, using the obtained address.
-  </para>
-
-  <para>Some system administrators block ARP messages in their network,
-  which causes issues for the server when it responds to the
-  DHCPINFORM messages, because the server is unable to send the
-  DHCPACK if the preceding ARP communication fails. Since the OS is
-  entirely responsible for the ARP communication and then sending
-  the DHCP packet over the wire, the DHCP server has no means to
-  determine that the ARP exchange failed and the DHCP response message
-  was dropped. Thus, the server does not log any error messages when
-  the outgoing DHCP response is dropped. At the same time, all hooks
-  pertaining to the packet-sending operation will be called, even
-  though the message never reaches its destination.
-  </para>
-
-  <para>Note that the issue described in this section is not observed
-  when the raw sockets are in use, because, in this case, the DHCP server
-  builds all the layers of the outgoing message on its own and does not
-  use ARP. Instead, it inserts the value carried in the 'chaddr' field
-  of the DHCPINFORM message into the link layer.
-  </para>
-
-  <para>Server administrators willing to support DHCPINFORM
-  messages via relays should not block ARP traffic in their
-  networks or should use raw sockets instead of UDP sockets.
-  </para>
-</section>
-
-<section xml:id="ipv4-subnet-id">
-  <title>IPv4 Subnet Identifier</title>
-  <para>
-    The subnet identifier is a unique number associated with a particular subnet.
-    In principle, it is used to associate clients' leases with their respective subnets.
-    When a subnet identifier is not specified for a subnet being configured, it will
-    be automatically assigned by the configuration mechanism. The identifiers
-    are assigned from 1 and are monotonically increased for each subsequent
-    subnet: 1, 2, 3 ....
-  </para>
-  <para>
-    If there are multiple subnets configured with auto-generated identifiers and
-    one of them is removed, the subnet identifiers may be renumbered. For example:
-    if there are four subnets and the third is removed, the last subnet will be assigned
-    the identifier that the third subnet had before removal. As a result, the leases
-    stored in the lease database for subnet 3 are now associated with
-    subnet 4, something that may have unexpected consequences. The only remedy for this issue
-    at present is to manually specify a unique identifier for each subnet.
-  </para>
-  <note>
-    Subnet IDs must be greater than zero and less than 4294967295.
-  </note>
-      <para>
-        The following configuration will assign the specified subnet
-        identifier to the newly configured subnet:
-
-        <screen>
-"Dhcp4": {
-    "subnet4": [
-        {
-            "subnet": "192.0.2.0/24",
-            <userinput>"id": 1024</userinput>,
-            ...
-        }
-    ]
-}
-</screen>
-    This identifier will not change for this subnet unless the "id" parameter is
-    removed or set to 0. The value of 0 forces auto-generation of the subnet
-    identifier.
-  </para>
-    <!-- @todo: describe whether database needs to be updated after changing
-      id -->
-</section>
-
-<section xml:id="ipv4-subnet-prefix">
-  <title>IPv4 Subnet Prefix</title>
-  <para>
-    The subnet prefix is the second way to identify a subnet. It does not
-    need to have the address part to match the prefix length, for instance
-    this configuration is accepted:
-
-    <screen>
-"Dhcp4": {
-    "subnet4": [
-        {
-            <userinput>"subnet": "192.0.2.1/24"</userinput>,
-            ...
-        }
-    ]
-}
-</screen>
-    Even there is another subnet with the "192.0.2.0/24" prefix: only the
-    textual form of subnets are compared to avoid duplicates.
-    </para>
-    <note>
-       Abuse of this feature can lead to incorrect subnet selection
-       (see <xref linkend="dhcp4-subnet-selection"/>).
-    </note>
-</section>
-
-<section xml:id="dhcp4-address-config">
-  <title>Configuration of IPv4 Address Pools</title>
-  <para>
-    The main role of a DHCPv4 server is address assignment. For this, the server must
-    be configured with at least one subnet and one pool of dynamic addresses to be managed.
-    For example, assume that the server is connected to a network
-    segment that uses the 192.0.2.0/24 prefix. The administrator of that network
-    decides that addresses from range 192.0.2.10 to 192.0.2.20 are going to
-    be managed by the Dhcp4 server. Such a configuration can be achieved in the
-    following way:
-    <screen>
-"Dhcp4": {
-    <userinput>"subnet4": [
-        {
-            "subnet": "192.0.2.0/24",
-            "pools": [
-                { "pool": "192.0.2.10 - 192.0.2.20" }
-            ],
-            ...
-        }
-    ]</userinput>
-}</screen>
-
-    Note that <command>subnet</command> is defined as a simple string, but
-    the <command>pools</command> parameter is actually a list of pools; for
-    this reason, the pool definition is enclosed in square brackets, even
-    though only one range of addresses is specified.</para>
-
-    <para>Each <command>pool</command> is a structure that contains the
-    parameters that describe a single pool. Currently there is only one
-    parameter, <command>pool</command>, which gives the range of addresses
-    in the pool.</para>
-
-    <para>It is possible to define more than one pool in a subnet; continuing
-    the previous example, further assume that 192.0.2.64/26 should be also be
-    managed by the server. It could be written as 192.0.2.64 to
-    192.0.2.127. Alternatively, it can be expressed more simply as
-    192.0.2.64/26. Both formats are supported by Dhcp4 and can be mixed in the
-    pool list.  For example, one could define the following pools:
-<screen>
-"Dhcp4": {
-    "subnet4": [
-        {
-            "subnet": "192.0.2.0/24",
-            <userinput>"pools": [
-                { "pool": "192.0.2.10-192.0.2.20" },
-                { "pool": "192.0.2.64/26" }
-            ]</userinput>,
-            ...
-        }
-    ],
-    ...
-}
-</screen>
-    White space in pool definitions is ignored, so spaces before and after the hyphen are optional.
-    They can be used to improve readability.
-  </para>
-  <para>
-    The number of pools is not limited, but for performance reasons it is recommended to
-    use as few as possible.
-  </para>
-  <para>
-    The server may be configured to serve more than one subnet:
-<screen>
-"Dhcp4": {
-    "subnet4": [
-        {
-            "subnet": "192.0.2.0/24",
-            "pools": [ { "pool": "192.0.2.1 - 192.0.2.200" } ],
-            ...
-        },
-        {
-            "subnet": "192.0.3.0/24",
-            "pools": [ { "pool": "192.0.3.100 - 192.0.3.200" } ],
-            ...
-        },
-        {
-            "subnet": "192.0.4.0/24",
-            "pools": [ { "pool": "192.0.4.1 - 192.0.4.254" } ],
-            ...
-        }
-    ]
-}
-</screen>
-  </para>
-  <para>
-    When configuring a DHCPv4 server using prefix/length notation, please pay
-    attention to the boundary values. When specifying that the server can use
-    a given pool, it will also be able to allocate the first (typically a network
-    address) and the last (typically a broadcast address) address from that pool.
-    In the aforementioned example of pool 192.0.3.0/24, both the 192.0.3.0 and
-    192.0.3.255 addresses may be assigned as well. This may be invalid in some
-    network configurations. To avoid this, please use the "min-max" notation.
-  </para>
-</section>
-    <section xml:id="dhcp4-t1-t2-times">
-      <title>Sending T1 (Option 58) and T2 (Option 59)</title>
-      According to <link xmlns:xlink="http://www.w3.org/1999/xlink"
-      xlink:href="http://tools.ietf.org/html/rfc2131">RFC 2131</link>,
-      servers should send values for T1 and T2 that are 50% and 87.5%
-      of the lease life time, repsectively.   By default, kea-dhcp4 does
-      not send either value.  It can be configured to send values that
-      are specified explicitly or that are calculated as percentages of
-      the lease time.  The server's behavior is governed by combination of
-      configuration parameters, two of which have already been mentioned.
-      <para>
-      To send specific, fixed values use the following two parameters:
-      <itemizedlist>
-        <listitem>
-          <simpara><command>renew-timer</command> - specifies the value of T1 in
-          seconds.
-          </simpara>
-        </listitem>
-        <listitem>
-          <simpara><command>rebind-timer</command> - specifies the value of T2 in
-          seconds.
-          </simpara>
-        </listitem>
-      </itemizedlist>
-      The server will only send T2 if it is less than valid lease time.  T1 will
-      only be sent if a: T2 is being sent and T1 is less than T2 or b: T2 is not being
-      sent and T1 is less than the valid lease time.
-      </para>
-      <para>
-      Calculating the values is controlled by the following three parameters.
-      <itemizedlist>
-        <listitem>
-          <simpara>
-            <command>calculate-tee-times</command> - when true, T1 and T2 will be
-            calculated as percentages of the valid lease time. It defaults to false.
-          </simpara>
-        </listitem>
-        <listitem>
-          <simpara>
-            <command>t1-percent</command> - the percentage of the valid lease time to
-            use for T1. It is expressed as a real number between 0.0 and 1.0 and must
-            be less than t2-percent. The default value is 0.50 per RFC 2131.
-          </simpara>
-        </listitem>
-        <listitem>
-          <simpara>
-            <command>t2-percent</command> - the percentage of the valid lease time to
-            use for T2. It is expressed as a real number between 0.0 and 1.0 and must
-            be greater than t1-percent. The default value is .875 per RFC 2131.
-          </simpara>
-        </listitem>
-        </itemizedlist>
-      </para>
-      <note>
-      In the event that both explicit values are specified and
-      calculate-tee-times is true, the server will use the explicit
-      values.  If you plan on having a mixture where some subnets or
-      share-networks will use explicit values and some will use
-      calculated values you must not define the explicit values at any
-      level higher than where they will be used.  Inheriting them from
-      too high of a scope, such as global, will cause them to have
-      values at every level underneath (shared-networks and subnets),
-      effectively disabling calculated values.
-      </note>
-    </section>
-    <section xml:id="dhcp4-std-options">
-      <title>Standard DHCPv4 Options</title>
-      <para>
-        One of the major features of the DHCPv4 server is to provide configuration
-        options to clients. Most of the options are sent by the server only if the
-        client explicitly requests them using the Parameter Request List option.
-        Those that do not require inclusion in the Parameter Request List
-        option are commonly used options, e.g. "Domain Server", and options which
-        require special behavior, e.g. "Client FQDN", which is returned to the client
-        if the client has included this option in its message to the server.
-      </para>
-
-      <para>
-        <xref linkend="dhcp4-std-options-list"/> comprises the list of the
-        standard DHCPv4 options whose values can be configured using the
-        configuration structures described in this section. This table excludes
-        the options which require special processing and thus cannot be configured
-        with some fixed values. The last column of the table indicates which
-        options can be sent by the server even when they are not requested in
-        the Parameter Request list option, and those which are sent only when
-        explicitly requested.
-      </para>
-
-      <para>
-        The following example shows how to configure the addresses of DNS
-        servers, which is one of the most frequently used options. Options
-        specified in this way are considered global and apply to all
-        configured subnets.
-
-        <screen>
-"Dhcp4": {
-    "option-data": [
-        {
-           <userinput>"name": "domain-name-servers",
-           "code": 6,
-           "space": "dhcp4",
-           "csv-format": true,
-           "data": "192.0.2.1, 192.0.2.2"</userinput>
-        },
-        ...
-    ]
-}
-        </screen>
-        Note that only one of name or code is required; you don't need to
-        specify both. Space has a default value of "dhcp4", so you can skip this
-        as well if you define a regular (not encapsulated) DHCPv4 option.
-        Finally, csv-format defaults to true, so it too can be skipped, unless
-        you want to specify the option value as a hexadecimal string. Therefore, the
-        above example can be simplified to:
-        <screen>
-"Dhcp4": {
-    "option-data": [
-        {
-           <userinput>"name": "domain-name-servers",
-           "data": "192.0.2.1, 192.0.2.2"</userinput>
-        },
-        ...
-    ]
-}
-        </screen>
-        Defined options are added to the response when the client requests them
-        at a few exceptions, which are always added. To enforce the addition
-        of a particular option set the always-send flag to true as in:
-        <screen>
-"Dhcp4": {
-    "option-data": [
-        {
-           <userinput>"name": "domain-name-servers",
-           "data": "192.0.2.1, 192.0.2.2",
-           "always-send": true</userinput>
-        },
-        ...
-    ]
-}
-        </screen>
-        The effect is the same as if the client added the option code in the
-        Parameter Request List option (or its equivalent for vendor
-        options):
-        <screen>
-"Dhcp4": {
-    "option-data": [
-        {
-           <userinput>"name": "domain-name-servers",
-           "data": "192.0.2.1, 192.0.2.2",
-           "always-send": true</userinput>
-        },
-        ...
-    ],
-    "subnet4": [
-        {
-           "subnet": "192.0.3.0/24",
-           "option-data": [
-               {
-                   <userinput>"name": "domain-name-servers",
-                   "data": "192.0.3.1, 192.0.3.2"</userinput>
-               },
-               ...
-           ],
-           ...
-        },
-        ...
-    ],
-    ...
-}
-        </screen>
-        The Domain Name Servers option is always added to responses
-        (the always-send is "sticky") but the value is the subnet one
-        when the client is localized in the subnet.
-      </para>
-    <para>
-      The <command>name</command> parameter specifies the option name. For a
-      list of currently supported names, see <xref linkend="dhcp4-std-options-list"/> below. The <command>code</command>
-      parameter specifies the option code, which must match one of the values
-      from that list. The next line specifies the option space, which must
-      always be set to "dhcp4" as these are standard DHCPv4 options. For other
-      option spaces, including custom option spaces, see <xref linkend="dhcp4-option-spaces"/>. The next line specifies the format in
-      which the data will be entered; use of CSV (comma-separated values) is
-      recommended. The sixth line gives the actual value to be sent to
-      clients. Data is specified as normal text, with values separated by commas
-      if more than one value is allowed.
-    </para>
-
-    <para>
-      Options can also be configured as hexadecimal values. If
-      <command>csv-format</command> is
-      set to false, option data must be specified as a hexadecimal string. The
-      following commands configure the domain-name-servers option for all
-      subnets with the following addresses: 192.0.3.1 and 192.0.3.2.
-      Note that <command>csv-format</command> is set to false.
-      <screen>
-"Dhcp4": {
-    "option-data": [
-        {
-            <userinput>"name": "domain-name-servers",
-            "code": 6,
-            "space": "dhcp4",
-            "csv-format": false,
-            "data": "C0 00 03 01 C0 00 03 02"</userinput>
-        },
-        ...
-    ],
-    ...
-}</screen>
-    </para>
-       <para>
-       Kea supports the following formats when specifying hexadecimal data:
-       <itemizedlist>
-       <listitem>
-       <simpara><command>Delimited octets</command> One or more octets
-       separated by either colons or spaces (':' or ' '). While each octet
-       may contain one or two digits, we strongly recommend always using two
-       digits. Valid examples are "ab:cd:ef" and "ab cd ef".
-       </simpara>
-       </listitem>
-       <listitem>
-       <simpara><command>String of digits</command> A continuous string of
-       hexadecimal digits with or without a "0x" prefix.  Valid examples
-       are "0xabcdef" and "abcdef".
-       </simpara>
-       </listitem>
-       </itemizedlist>
-       Care should be taken to use proper encoding when using hexadecimal
-       format.  Kea's ability to validate data correctness in hexadecimal
-       is limited.
-       </para>
-      <para>
-        Most of the parameters in the "option-data" structure are optional and
-        can be omitted in some circumstances as discussed in
-        <xref linkend="dhcp4-option-data-defaults"/>.
-      </para>
-      <para>
-        It is possible to specify or override options on a per-subnet basis. If
-        clients connected to most of your subnets are expected to get the
-        same values of a given option, you should use global options; you
-        can then override specific values for a small number of subnets.
-        On the other hand, if you use different values in each subnet,
-        it does not make sense to specify global option values; rather, you should
-        set only subnet-specific ones.
-      </para>
-      <para>
-        The following commands override the global
-        DNS servers option for a particular subnet, setting a single DNS
-        server with address 192.0.2.3:
-<screen>
-"Dhcp4": {
-    "subnet4": [
-        {
-            <userinput>"option-data": [
-                {
-                    "name": "domain-name-servers",
-                    "code": 6,
-                    "space": "dhcp4",
-                    "csv-format": true,
-                    "data": "192.0.2.3"
-                },
-                ...
-            ]</userinput>,
-            ...
-        },
-        ...
-    ],
-    ...
-}
-</screen>
-      </para>
-
-      <para>
-        In some cases it is useful to associate some options with an
-        address pool from which a client is assigned a lease. Pool-
-        specific option values override subnet-specific and global
-        option values. The server's administrator must not try to
-        prioritize assignment of pool-specific options by trying to
-        order pool declarations in the server configuration.
-      </para>
-
-     <para>
-       The following configuration snippet demonstrates how to specify the
-       DNS servers option, which will be assigned to a client only if the
-       client obtains an address from the given pool:
-<screen>
-"Dhcp4": {
-    "subnet4": [
-        {
-            "pools": [
-                {
-                    "pool": "192.0.2.1 - 192.0.2.200",
-                    <userinput>"option-data": [
-                        {
-                            "name": "domain-name-servers",
-                            "data": "192.0.2.3"
-                         },
-                         ...
-                    ]</userinput>,
-                    ...
-                },
-                ...
-            ],
-            ...
-        },
-        ...
-    ],
-    ...
-}
-</screen>
-      </para>
-     <para>
-       Options can also be specified in class or host reservation scope.
-       The current Kea options precedence order is (from most important):
-       host reservation, pool, subnet, shared network, class, global.
-     </para>
-
-      <para>
-        The currently supported standard DHCPv4 options are
-        listed in <xref linkend="dhcp4-std-options-list"/>.
-        "Name" and "Code"
-        are the values that should be used as a name/code in the option-data
-        structures. "Type" designates the format of the data; the meanings of
-        the various types is given in <xref linkend="dhcp-types"/>.
-      </para>
-
-      <para>When a data field is a string and that string contains the comma
-      (,; U+002C) character, the comma must be escaped with two backslashes
-      (\; U+005C). This double escape is required because both the
-      routine splitting CSV data into fields and JSON use the same escape
-      character; a single escape (\,) would make the JSON invalid.
-      For example, the string "foo,bar" would be represented as:
-      <screen>
-"Dhcp4": {
-    "subnet4": [
-        {
-            "pools": [
-                {
-                    <userinput>"option-data": [
-                        {
-                            "name": "boot-file-name",
-                            "data": "foo\\,bar"
-                        }
-                    ]</userinput>
-                },
-                ...
-            ],
-            ...
-        },
-        ...
-    ],
-    ...
-}
-</screen>
-      </para>
-      <para>
-        Some options are designated as arrays, which means that more than one
-        value is allowed in such an option. For example, the option time-servers
-        allows the specification of more than one IPv4 address, enabling
-        clients to obtain the addresses of multiple NTP servers.
-      </para>
-      <!-- @todo: describe record types -->
-      <!-- @todo: describe array in record types -->
-
-      <para>
-        <xref linkend="dhcp4-custom-options"/> describes the configuration
-        syntax to create custom option definitions (formats). Creation of custom
-        definitions for standard options is generally not permitted, even if the
-        definition being created matches the actual option format defined in the
-        RFCs. There is an exception to this rule for standard options for which
-        Kea currently does not provide a definition. In order to use such options,
-        a server administrator must create a definition as described in
-        <xref linkend="dhcp4-custom-options"/> in the 'dhcp4' option space. This
-        definition should match the option format described in the relevant
-        RFC, but the configuration mechanism will allow any option format as it
-        currently has no means to validate it.
-      </para>
-
-      <para>
-        <table frame="all" xml:id="dhcp4-std-options-list">
-          <title>List of Standard DHCPv4 Options</title>
-          <tgroup cols="5">
-          <colspec colname="name"/>
-          <colspec colname="code" align="center"/>
-          <colspec colname="type" align="center"/>
-          <colspec colname="array" align="center"/>
-          <colspec colname="always-returned" align="center"/>
-          <thead>
-            <row>
-              <entry>Name</entry>
-              <entry>Code</entry>
-              <entry>Type</entry>
-              <entry>Array?</entry>
-              <entry>Returned if not requested?</entry>
-            </row>
-          </thead>
-          <tbody>
-<!-- Subnet Mask option is not configured by the user.
-<row><entry>subnet-mask</entry><entry>1</entry><entry>ipv4-address</entry><entry>false</entry><entry>true</entry></row>
--->
-<row><entry>time-offset</entry><entry>2</entry><entry>int32</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>routers</entry><entry>3</entry><entry>ipv4-address</entry><entry>true</entry><entry>true</entry></row>
-<row><entry>time-servers</entry><entry>4</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>name-servers</entry><entry>5</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>domain-name-servers</entry><entry>6</entry><entry>ipv4-address</entry><entry>true</entry><entry>true</entry></row>
-<row><entry>log-servers</entry><entry>7</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>cookie-servers</entry><entry>8</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>lpr-servers</entry><entry>9</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>impress-servers</entry><entry>10</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>resource-location-servers</entry><entry>11</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<!-- Hostname option value is not explicitly configured by the user.
-This rather belongs to the DDNS configuration
-<row><entry>host-name</entry><entry>12</entry><entry>string</entry><entry>false</entry><entry>true</entry></row>
--->
-<row><entry>boot-size</entry><entry>13</entry><entry>uint16</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>merit-dump</entry><entry>14</entry><entry>string</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>domain-name</entry><entry>15</entry><entry>fqdn</entry><entry>false</entry><entry>true</entry></row>
-<row><entry>swap-server</entry><entry>16</entry><entry>ipv4-address</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>root-path</entry><entry>17</entry><entry>string</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>extensions-path</entry><entry>18</entry><entry>string</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>ip-forwarding</entry><entry>19</entry><entry>boolean</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>non-local-source-routing</entry><entry>20</entry><entry>boolean</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>policy-filter</entry><entry>21</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>max-dgram-reassembly</entry><entry>22</entry><entry>uint16</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>default-ip-ttl</entry><entry>23</entry><entry>uint8</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>path-mtu-aging-timeout</entry><entry>24</entry><entry>uint32</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>path-mtu-plateau-table</entry><entry>25</entry><entry>uint16</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>interface-mtu</entry><entry>26</entry><entry>uint16</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>all-subnets-local</entry><entry>27</entry><entry>boolean</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>broadcast-address</entry><entry>28</entry><entry>ipv4-address</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>perform-mask-discovery</entry><entry>29</entry><entry>boolean</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>mask-supplier</entry><entry>30</entry><entry>boolean</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>router-discovery</entry><entry>31</entry><entry>boolean</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>router-solicitation-address</entry><entry>32</entry><entry>ipv4-address</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>static-routes</entry><entry>33</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>trailer-encapsulation</entry><entry>34</entry><entry>boolean</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>arp-cache-timeout</entry><entry>35</entry><entry>uint32</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>ieee802-3-encapsulation</entry><entry>36</entry><entry>boolean</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>default-tcp-ttl</entry><entry>37</entry><entry>uint8</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>tcp-keepalive-interval</entry><entry>38</entry><entry>uint32</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>tcp-keepalive-garbage</entry><entry>39</entry><entry>boolean</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>nis-domain</entry><entry>40</entry><entry>string</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>nis-servers</entry><entry>41</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>ntp-servers</entry><entry>42</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>vendor-encapsulated-options</entry><entry>43</entry><entry>empty</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>netbios-name-servers</entry><entry>44</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>netbios-dd-server</entry><entry>45</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>netbios-node-type</entry><entry>46</entry><entry>uint8</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>netbios-scope</entry><entry>47</entry><entry>string</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>font-servers</entry><entry>48</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>x-display-manager</entry><entry>49</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<!-- Lease time and requested address should not be configured by a user.
-<row><entry>dhcp-requested-address</entry><entry>50</entry><entry>ipv4-address</entry><entry>false</entry><entry>true</entry></row>
-<row><entry>dhcp-lease-time</entry><entry>51</entry><entry>uint32</entry><entry>false</entry><entry>true</entry></row>
--->
-<row><entry>dhcp-option-overload</entry><entry>52</entry><entry>uint8</entry><entry>false</entry><entry>false</entry></row>
-<!-- Message Type should not be configured by a user.
-<row><entry>dhcp-message-type</entry><entry>53</entry><entry>uint8</entry><entry>false</entry><entry>false</entry></row>
--->
-<row><entry>dhcp-server-identifier</entry><entry>54</entry><entry>ipv4-address</entry><entry>false</entry><entry>true</entry></row>
-<!-- Parameter Request List should not be configured by a user.
-<row><entry>dhcp-parameter-request-list</entry><entry>55</entry><entry>uint8</entry><entry>true</entry><entry>true</entry></row>
--->
-<row><entry>dhcp-message</entry><entry>56</entry><entry>string</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>dhcp-max-message-size</entry><entry>57</entry><entry>uint16</entry><entry>false</entry><entry>false</entry></row>
-<!-- Renewal and rebinding time should not be configured by a user.
-<row><entry>dhcp-renewal-time</entry><entry>58</entry><entry>uint32</entry><entry>false</entry><entry>true</entry></row>
-<row><entry>dhcp-rebinding-time</entry><entry>59</entry><entry>uint32</entry><entry>false</entry><entry>true</entry></row>
--->
-<row><entry>vendor-class-identifier</entry><entry>60</entry><entry>string</entry><entry>false</entry><entry>false</entry></row>
-<!-- Client identifier should not be configured by a user.
-<row><entry>dhcp-client-identifier</entry><entry>61</entry><entry>binary</entry><entry>false</entry><entry>true</entry></row>
--->
-<row><entry>nwip-domain-name</entry><entry>62</entry><entry>string</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>nwip-suboptions</entry><entry>63</entry><entry>binary</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>nisplus-domain-name</entry><entry>64</entry><entry>string</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>nisplus-servers</entry><entry>65</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>tftp-server-name</entry><entry>66</entry><entry>string</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>boot-file-name</entry><entry>67</entry><entry>string</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>mobile-ip-home-agent</entry><entry>68</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>smtp-server</entry><entry>69</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>pop-server</entry><entry>70</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>nntp-server</entry><entry>71</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>www-server</entry><entry>72</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>finger-server</entry><entry>73</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>irc-server</entry><entry>74</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>streettalk-server</entry><entry>75</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>streettalk-directory-assistance-server</entry><entry>76</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>user-class</entry><entry>77</entry><entry>binary</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>slp-directory-agent</entry><entry>78</entry><entry>record (boolean, ipv4-address)</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>slp-service-scope</entry><entry>79</entry><entry>record (boolean, string)</entry><entry>false</entry><entry>false</entry></row>
-<!-- The Client FQDN option value is not explicitly configured.
-It is a part of the DDNS/D2 configuration.
-<row><entry>fqdn</entry><entry>81</entry><entry>record</entry><entry>false</entry><entry>true</entry></row>
--->
-<!-- Relay Agent Information is not configured by the user.
-It is merely echoed by the server.
-<row><entry>dhcp-agent-options</entry><entry>82</entry><entry>empty</entry><entry>false</entry><entry>false</entry></row>
--->
-<row><entry>nds-server</entry><entry>85</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>nds-tree-name</entry><entry>86</entry><entry>string</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>nds-context</entry><entry>87</entry><entry>string</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>bcms-controller-names</entry><entry>88</entry><entry>fqdn</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>bcms-controller-address</entry><entry>89</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<!-- Authentication option requires special processing
-<row><entry>authenticate</entry><entry>90</entry><entry>binary</entry><entry>false</entry><entry>false</entry></row>
--->
-<!-- Last transaction time and associated IP are dynamically calculated.
-<row><entry>client-last-transaction-time</entry><entry>91</entry><entry>uint32</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>associated-ip</entry><entry>92</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
--->
-<row><entry>client-system</entry><entry>93</entry><entry>uint16</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>client-ndi</entry><entry>94</entry><entry>record (uint8, uint8, uint8)</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>uuid-guid</entry><entry>97</entry><entry>record (uint8, binary)</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>uap-servers</entry><entry>98</entry><entry>string</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>geoconf-civic</entry><entry>99</entry><entry>binary</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>pcode</entry><entry>100</entry><entry>string</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>tcode</entry><entry>101</entry><entry>string</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>netinfo-server-address</entry><entry>112</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>netinfo-server-tag</entry><entry>113</entry><entry>string</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>default-url</entry><entry>114</entry><entry>string</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>auto-config</entry><entry>116</entry><entry>uint8</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>name-service-search</entry><entry>117</entry><entry>uint16</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>subnet-selection</entry><entry>118</entry><entry>ipv4-address</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>domain-search</entry><entry>119</entry><entry>fqdn</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>vivco-suboptions</entry><entry>124</entry><entry>binary</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>vivso-suboptions</entry><entry>125</entry><entry>binary</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>pana-agent</entry><entry>136</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>v4-lost</entry><entry>137</entry><entry>fqdn</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>capwap-ac-v4</entry><entry>138</entry><entry>ipv4-address</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>sip-ua-cs-domains</entry><entry>141</entry><entry>fqdn</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>rdnss-selection</entry><entry>146</entry><entry>record (uint8, ipv4-address, ipv4-address, fqdn)</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>v4-portparams</entry><entry>159</entry><entry>record (uint8, psid)</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>v4-captive-portal</entry><entry>160</entry><entry>string</entry><entry>false</entry><entry>false</entry></row>
-<row><entry>option-6rd</entry><entry>212</entry><entry>record (uint8, uint8, ipv6-address, ipv4-address)</entry><entry>true</entry><entry>false</entry></row>
-<row><entry>v4-access-domain</entry><entry>213</entry><entry>fqdn</entry><entry>false</entry><entry>false</entry></row>
-          </tbody>
-          </tgroup>
-        </table>
-
-      </para>
-      <para>
-        <table frame="all" xml:id="dhcp-types">
-          <title>List of Standard DHCP Option Types</title>
-          <tgroup cols="2">
-          <colspec colname="name"/>
-          <colspec colname="meaning"/>
-          <thead>
-            <row><entry>Name</entry><entry>Meaning</entry></row>
-          </thead>
-          <tbody>
-            <row><entry>binary</entry><entry>An arbitrary string of bytes, specified as a set of hexadecimal digits.</entry></row>
-            <row><entry>boolean</entry><entry>A boolean value with allowed values true or false.</entry></row>
-            <row><entry>empty</entry><entry>No value; data is carried in suboptions.</entry></row>
-            <row><entry>fqdn</entry><entry>Fully qualified domain name (e.g. www.example.com).</entry></row>
-            <row><entry>ipv4-address</entry><entry>IPv4 address in the usual dotted-decimal notation (e.g. 192.0.2.1).</entry></row>
-            <row><entry>ipv6-address</entry><entry>IPv6 address in the usual colon notation (e.g. 2001:db8::1).</entry></row>
-            <row><entry>ipv6-prefix</entry><entry>IPv6 prefix and prefix length specified using CIDR notation, e.g. 2001:db8:1::/64. This data type is used to represent an 8-bit field conveying a prefix length and the variable length prefix value.</entry></row>
-            <row><entry>psid</entry><entry>PSID and PSID length separated by a slash, e.g. 3/4 specifies PSID=3 and PSID length=4. In the wire format it is represented by an 8-bit field carrying PSID length (in this case equal to 4) and the 16-bits-long PSID value field (in this case equal to "0011000000000000b" using binary notation). Allowed values for a PSID length are 0 to 16. See <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc7597">RFC 7597</link> for details about the PSID wire representation.</entry></row>
-            <row><entry>record</entry><entry>Structured data that may be comprised of any types (except "record" and "empty"). The array flag applies to the last field only.</entry></row>
-            <row><entry>string</entry><entry>Any text. Please note that Kea will silently discard any terminating/trailing nulls from the end of 'string' options when unpacking received packets. This is keeping with <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://tools.ietf.org/html/rfc2132#section-2">RFC 2132, Section 2</link></entry></row>
-            <row><entry>tuple</entry><entry>A length encoded as an 8- (16- for DHCPv6) bit unsigned integer followed by a string of this length.</entry></row>
-            <row><entry>uint8</entry><entry>8-bit unsigned integer with allowed values 0 to 255.</entry></row>
-            <row><entry>uint16</entry><entry>16-bit unsigned integer with allowed values 0 to 65535.</entry></row>
-            <row><entry>uint32</entry><entry>32-bit unsigned integer with allowed values 0 to 4294967295.</entry></row>
-            <row><entry>int8</entry><entry>8-bit signed integer with allowed values -128 to 127.</entry></row>
-            <row><entry>int16</entry><entry>16-bit signed integer with allowed values -32768 to 32767.</entry></row>
-            <row><entry>int32</entry><entry>32-bit signed integer with allowed values -2147483648 to 2147483647.</entry></row>
-          </tbody>
-          </tgroup>
-       </table>
-      </para>
-    </section>
-
-    <section xml:id="dhcp4-custom-options">
-      <title>Custom DHCPv4 Options</title>
-      <para>Kea supports custom (non-standard) DHCPv4 options. Assume
-      that we want to define a new DHCPv4 option called "foo" which
-      will have a code 222 and will convey a single, unsigned, 32-bit
-      integer value. We can define such an option by using the
-      following entry in the configuration file:
-<screen>
-"Dhcp4": {
-    "option-def": [
-        {
-            <userinput>"name": "foo",
-            "code": 222,
-            "type": "uint32",
-            "array": false,
-            "record-types": "",
-            "space": "dhcp4",
-            "encapsulate": ""</userinput>
-        }, ...
-    ],
-    ...
-}
-</screen>
-      The <command>false</command> value of the <command>array</command>
-      parameter determines that the option does NOT comprise an array of
-      "uint32" values but is, instead, a single value. Two other parameters have been
-      left blank: <command>record-types</command> and
-      <command>encapsulate</command>. The former specifies the comma-separated
-      list of option data fields, if the option comprises a record of data
-      fields. The <command>record-types</command> value should be non-empty if <command>type</command> is set to
-      "record"; otherwise it must be left blank. The latter parameter specifies
-      the name of the option space being encapsulated by the particular
-      option. If the particular option does not encapsulate any option space, it
-      should be left blank. Note that the <command>option-def</command> configuration statement only defines the
-      format of an option and does not set its value(s).
-      </para>
-
-      <para>The <command>name</command>, <command>code</command>, and
-      <command>type</command> parameters are required; all others are
-      optional. The <command>array</command> default value is
-      <command>false</command>. The <command>record-types</command>
-      and <command>encapsulate</command> default values are blank
-      (i.e. ""). The default <command>space</command> is "dhcp4".
-      </para>
-
-      <para>Once the new option format is defined, its value is set
-      in the same way as for a standard option. For example, the following
-      commands set a global value that applies to all subnets.
-<screen>
-"Dhcp4": {
-    "option-data": [
-        {
-            <userinput>"name": "foo",
-            "code": 222,
-            "space": "dhcp4",
-            "csv-format": true,
-            "data": "12345"</userinput>
-        }, ...
-    ],
-    ...
-}
-</screen>
-      </para>
-
-      <para>New options can take more complex forms than simple use of
-      primitives (uint8, string, ipv4-address, etc); it is possible to
-      define an option comprising a number of existing primitives.
-      </para>
-      <para>
-      For example, assume we want to define a new option that will consist of
-      an IPv4 address, followed by an unsigned 16-bit integer, followed by
-      a boolean value, followed by a text string. Such an option could
-      be defined in the following way:
-<screen>
-"Dhcp4": {
-    "option-def": [
-        {
-            <userinput>"name": "bar",
-            "code": 223,
-            "space": "dhcp4",
-            "type": "record",
-            "array": false,
-            "record-types": "ipv4-address, uint16, boolean, string",
-            "encapsulate": ""</userinput>
-        }, ...
-    ],
-    ...
-}
-</screen>
-      The <command>type</command> is set to "record" to indicate that the option contains
-      multiple values of different types. These types are given as a comma-separated
-      list in the <command>record-types</command> field and should be ones from those listed in <xref linkend="dhcp-types"/>.
-      </para>
-      <para>
-      The values of the option are set as follows:
-<screen>
-"Dhcp4": {
-    "option-data": [
-        {
-            <userinput>"name": "bar",
-            "space": "dhcp4",
-            "code": 223,
-            "csv-format": true,
-            "data": "192.0.2.100, 123, true, Hello World"</userinput>
-        }
-    ],
-    ...
-}</screen>
-      <command>csv-format</command> is set to <command>true</command> to indicate
-      that the <command>data</command> field comprises a command-separated list
-      of values. The values in <command>data</command> must correspond to
-      the types set in the <command>record-types</command> field of the option
-      definition.
-     </para>
-     <para>
-       When <command>array</command> is set to <command>true</command>
-       and <command>type</command> is set to "record", the last field
-       is an array, i.e. it can contain more than one value, as in:
-<screen>
-"Dhcp4": {
-    "option-def": [
-        {
-            <userinput>"name": "bar",
-            "code": 223,
-            "space": "dhcp4",
-            "type": "record",
-            "array": true,
-            "record-types": "ipv4-address, uint16",
-            "encapsulate": ""</userinput>
-        }, ...
-    ],
-    ...
-}
-</screen>
-      The new option content is one IPv4 address followed by one or more 16-
-      bit unsigned integers.
-     </para>
-     <note>
-       <para>In general, boolean values are specified as <command>true</command> or
-       <command>false</command>, without quotes. Some specific boolean parameters may
-       accept also <command>"true"</command>, <command>"false"</command>,
-       <command>0</command>, <command>1</command>, <command>"0"</command>, and
-       <command>"1"</command>.</para>
-     </note>
-     <note>
-       <para>Numbers can be specified in decimal or hexadecimal format.
-        The hexadecimal format can be either plain (e.g. abcd) or
-        prefixed with 0x (e.g. 0xabcd).
-       </para>
-     </note>
-    </section>
-
-    <section id="dhcp4-private-opts">
-      <title>DHCPv4 Private Options</title>
-      <para>
-      Options with a code between 224 and 254 are reserved for private use.
-      They can be defined at the global scope or at the client-class local
-      scope; this allows option definitions to be used depending on context
-      and option data to be set accordingly. For instance, to configure
-      an old PXEClient vendor:
-<screen>
-"Dhcp4": {
-    "client-classes": [
-        {
-            <userinput>"name": "pxeclient",
-            "test": "option[vendor-class-identifier].text == 'PXEClient'",
-            "option-def": [
-                {
-                    "name": "configfile",
-                    "code": 209,
-                    "type": "string"
-                }
-            ],</userinput>
-            ...
-        }, ...
-    ],
-    ...
-}
-</screen>
-      </para>
-      <para>
-      As the Vendor-Specific Information option (code 43) has vendor-
-      specific format, i.e. can carry either raw binary value or
-      sub-options, this mechanism is available for this option too.
-      </para>
-      <para>
-      In the following example taken from a real configuration, two vendor
-      classes use the option 43 for different and incompatible purposes:
-<screen>
-"Dhcp4": {
-    "option-def": [
-        {
-            <userinput>"name": "cookie",
-            "code": 1,
-            "type": "string",
-            "space": "APC"
-        },
-        {
-            "name": "mtftp-ip",
-            "code": 1,
-            "type": "ipv4-address",
-            "space": "PXE"
-        },</userinput>
-        ...
-    ],
-    "client-classes": [
-        {
-            <userinput>"name": "APC",
-            "test": "(option[vendor-class-identifier].text == 'APC'",
-            "option-def": [
-                {
-                    "name": "vendor-encapsulated-options",
-                    "type": "empty",
-                    "encapsulate": "APC"
-                }
-            ],
-            "option-data": [
-                {
-                    "name": "cookie",
-                    "space": "APC",
-                    "data": "1APC"
-                },
-                {
-                    "name": "vendor-encapsulated-options"
-                },</userinput>
-                ...
-            ],
-            ...
-        },
-        {
-            <userinput>"name": "PXE",
-            "test": "(option[vendor-class-identifier].text == 'PXE'",
-            "option-def": [
-                {
-                    "name": "vendor-encapsulated-options",
-                    "type": "empty",
-                    "encapsulate": "PXE"
-                }
-            ],
-            "option-data": [
-                {
-                    "name": "mtftp-ip",
-                    "space": "PXE",
-                    "data": "0.0.0.0"
-                },
-                {
-                    "name": "vendor-encapsulated-options"
-                },</userinput>
-                ...
-            ],
-            ...
-        },
-        ...
-    ],
-    ...
-}
-</screen>
-      </para>
-      <para>
-      The definition used to decode a VSI option is:
-      <orderedlist>
-      <listitem><para>
-      The local definition of a client class the incoming packet belongs to;
-      </para></listitem>
-      <listitem><para>
-      If none, the global definition;
-      </para></listitem>
-      <listitem><para>
-      If none, the last-resort definition described in the next section
-      <xref linkend="dhcp4-vendor-opts"/> (backwards-compatible with
-      previous Kea versions).
-      </para></listitem>
-      </orderedlist>
-      </para>
-      <note>
-      <para>
-      This last-resort definition for the Vendor-Specific Information
-      option (code 43) is not compatible with a raw binary value.
-      So when there are some known cases where a raw binary value
-      will be used, a client class must be defined with a classification
-      expression matching these cases and an option definition for
-      the VSI option with a binary type and no encapsulation.
-      </para>
-      </note>
-      <note>
-      <para>
-      Option definitions in client classes are allowed only for this
-      limited option set (codes 43 and from 224 to 254), and only
-      for DHCPv4.
-      </para>
-      </note>
-    </section>
-
-    <section xml:id="dhcp4-vendor-opts">
-      <title>DHCPv4 Vendor-Specific Options</title>
-      <para>
-      Currently there are two option spaces defined for the DHCPv4 daemon:
-      "dhcp4" (for the top-level DHCPv4 options) and
-      "vendor-encapsulated-options-space", which is empty by default but
-      in which options can be defined. Such options will be carried in the
-      Vendor-Specific Information option (code 43). The following examples
-      show how to define an option "foo" in that space that has a code 1,
-      and comprises an
-      IPv4 address, an unsigned 16-bit integer, and a string. The "foo"
-      option is conveyed in a Vendor-Specific Information option.
-      </para>
-      <para>
-      The first step is to define the format of the option:
-<screen>
-"Dhcp4": {
-    "option-def": [
-        {
-            <userinput>"name": "foo",
-            "code": 1,
-            "space": "vendor-encapsulated-options-space",
-            "type": "record",
-            "array": false,
-            "record-types": "ipv4-address, uint16, string",
-            "encapsulate": ""</userinput>
-        }
-    ],
-    ...
-}</screen>
-     (Note that the option space is set to "vendor-encapsulated-options-space".)
-     Once the option format is defined, the next step is to define actual values
-     for that option:
-<screen>
-"Dhcp4": {
-    "option-data": [
-        {
-            <userinput>"name": "foo",
-            "space": "vendor-encapsulated-options-space",
-            "code": 1,
-            "csv-format": true,
-            "data": "192.0.2.3, 123, Hello World"</userinput>
-        }
-    ],
-    ...
-}</screen>
-    We also include the Vendor-Specific Information option, the option
-    that conveys our sub-option "foo". This is required; otherwise the option
-    will not be included in messages sent to the client.
-<screen>
-"Dhcp4": {
-    "option-data": [
-        {
-            <userinput>"name": "vendor-encapsulated-options"</userinput>
-        }
-    ],
-    ...
-}</screen>
-    Alternatively, the option can be specified using its code.
-
-<screen>
-"Dhcp4": {
-    "option-data": [
-        {
-            <userinput>"code": 43</userinput>
-        }
-    ],
-    ...
-}</screen>
-      </para>
-
-      <para>
-        Another popular option that is often somewhat imprecisely called vendor
-        option is option 125. It's proper name is vendor-independent
-        vendor-specific information option or vivso. The idea behind those
-        options is that each vendor has its own unique set of options with their
-        own custom formats. The vendor is identified by a 32 unsigned integer
-        called enterprise-id or vendor-id. For example, vivso with vendor-id
-        4491 repesents DOCSIS options and you are likely to see many of them
-        when dealing with cable modems.
-      </para>
-
-      <para>
-        In Kea each vendor is represented by its own vendor space. Since there
-        are hundreds of vendors and sometimes they use different option
-        definitions for different hardware, it's impossible for Kea to support
-        them all out of the box. Fortunately, it's easy to define support for
-        new vendor options. Let's take an example of Genexis home gateway. This
-        device requires sending vivso 125 option with a suboption 2 that
-        contains a string with TFTP server URL. To support such a device, three
-        steps are needed. First, we need to define option definitions that will
-        explain how the option is supposed to be formed. Second, we will need to
-        define option values.  Third, we will need to tell Kea when to send
-        those specific options. This last step will be done with client
-        classification.
-      </para>
-
-       <para>
-        An example snippet of a configuration could look similar to the
-        following:
-
-<screen>
-{
-    // First, we need to define that suboption 2 in vivso option for
-    // vendor-id 25167 has specific format (it's a plain string in this example).
-    // After this definition, we can specify values for option tftp.
-    "option-def": [
-    {
-        // We define a short name, so the option could be referenced by name.
-        // The option has code 2 and resides with vendor space 25167.
-        // Its data is a plain string.
-        "name": "tftp",
-        "code": 2,
-        "space": "vendor-25167",
-        "type": "string"
-    } ],
-
-    "client-classes": [
-    {
-        // We now need to tell Kea how to recognize when to use vendor space 25167.
-        // Usually we can use simple expression such as checking if the device
-        // sent a vivso option with specific vendor-id, e.g.  "vendor[4491].exists"
-        // Unfortunately, Genexis is a bit unusual in this aspect, because it
-        // doesn't send vivso. In this case we need to look into vendor class
-        // (option code 60) and see if there's specific string that identifies
-        // the device.
-        "name": "cpe_genexis",
-        "test": "substring(option[60].hex,0,7) == 'HMC1000'",
-
-        // Once the device is recognized, we want to send two options:
-        // the VIVSO option with vendor-id set to 25167 and a suboption 2.
-        "option-data": [
-            {
-                "name": "vivso-suboptions",
-                "data": "25167",
-                "encapsulate": "vendor-25167"
-            },
-
-            // The suboption 2 value is defined as any other option. However,
-            // we want to send this suboption 2, even when the client didn't
-            // explicitly requested it (often there is no way to do that for
-            // vendor options). Therefore we use always-send to force Kea
-            // to always send this option when 25167 vendor space is involved.
-            {
-                "name": "tftp",
-                "space": "vendor-25167",
-                "data": "tftp://192.0.2.1/genexis/HMC1000.v1.3.0-R.img",
-                "always-send": true
-            }
-        ]
-    } ]
-}</screen>
-      </para>
-
-      <para>
-        One aspect requires a bit broader comment. By default Kea sends back
-        only those options that are requested by a client, unless there are
-        protocol rules that tell DHCP server to always send an option. This
-        approach works nicely for most cases and avoids problems with clients
-        refusing responses with options they don't understand. Unfortunately,
-        this is more blurry when we consider vendor options. Some vendors (such
-        as docsis, identified by vendor options 4491) have a mechanism to
-        request specific vendor options and Kea is able to honor that.
-        Unfortunately, for many other vendors, such as Genexis (25167) discussed
-        here, Kea does not have such a mechanism, so it can't sent any
-        suboptions on its own. To solve this issue, we came up with a concept of
-        persistent options. Kea can be told to always send options, even if
-        client didn't request them. This can be achieved by adding
-        "always-send": true to your option definition. Note that in this
-        particular case an option is defined in a vendor space 25167. With the
-        "always-send" enabled, the option will be sent every time there is a
-        need to deal with vendor space 25167.
-      </para>
-
-      <para>
-      Another possibility is to redefine the option;
-      see <xref linkend="dhcp4-private-opts"/>.
-      </para>
-    </section>
-
-    <section xml:id="dhcp4-option-spaces">
-      <title>Nested DHCPv4 Options (Custom Option Spaces)</title>
-      <para>It is sometimes useful to define a completely new option
-      space. This is the case when a user creates a new option in the
-      standard option space ("dhcp4") and wants this option
-      to convey sub-options. Since they are in a separate space,
-      sub-option codes will have a separate numbering scheme and may
-      overlap with the codes of standard options.
-      </para>
-      <para>Note that the creation of a new option space is not required when defining
-      sub-options for a standard option, because it is
-      created by default if the standard option is meant to convey any
-      sub-options (see <xref linkend="dhcp4-vendor-opts"/>).
-      </para>
-      <para>
-      Assume that we want to have a DHCPv4 option called "container" with
-      code 222 that conveys two sub-options with codes 1 and 2.
-      First we need to define the new sub-options:
-<screen>
-"Dhcp4": {
-    "option-def": [
-        {
-            <userinput>"name": "subopt1",
-            "code": 1,
-            "space": "isc",
-            "type": "ipv4-address",
-            "record-types": "",
-            "array": false,
-            "encapsulate": ""
-        },
-        {
-            "name": "subopt2",
-            "code": 2,
-            "space": "isc",
-            "type": "string",
-            "record-types": "",
-            "array": false,
-            "encapsulate": ""</userinput>
-        }
-    ],
-    ...
-}</screen>
-    Note that we have defined the options to belong to a new option space
-    (in this case, "isc").
-    </para>
-    <para>
-    The next step is to define a regular DHCPv4 option with our desired
-    code and specify that it should include options from the new option space:
-<screen>
-"Dhcp4": {
-    "option-def": [
-        ...,
-        {
-            <userinput>"name": "container",
-            "code": 222,
-            "space": "dhcp4",
-            "type": "empty",
-            "array": false,
-            "record-types": "",
-            "encapsulate": "isc"</userinput>
-        }
-    ],
-    ...
-}</screen>
-    The name of the option space in which the sub-options are defined
-    is set in the <command>encapsulate</command> field. The <command>type</command> field is set to <command>empty</command>,
-    to indicate that this option does not carry any data other than
-    sub-options.
-    </para>
-    <para>
-    Finally, we can set values for the new options:
-<screen>
-"Dhcp4": {
-    "option-data": [
-        {
-            <userinput>"name": "subopt1",
-            "code": 1,
-            "space": "isc",
-            "data": "192.0.2.3"</userinput>
-        },
-        }
-            <userinput>"name": "subopt2",
-            "code": 2,
-            "space": "isc",
-            "data": "Hello world"</userinput>
-        },
-        {
-            <userinput>"name": "container",
-            "code": 222,
-            "space": "dhcp4"</userinput>
-        }
-    ],
-    ...
-}
-</screen>
-    </para>
-    <para>Note that it is possible to create an option which carries some data
-    in addition to the sub-options defined in the encapsulated option space. For example,
-    if the "container" option from the previous example were required to carry a uint16
-    value as well as the sub-options, the <command>type</command> value would have to be set to "uint16" in
-    the option definition. (Such an option would then have the following
-    data structure: DHCP header, uint16 value, sub-options.) The value specified
-    with the <command>data</command> parameter â€” which should be a valid integer enclosed in quotes,
-    e.g. "123" â€” would then be assigned to the uint16 field in the "container" option.
-    </para>
-    </section>
-
-    <section xml:id="dhcp4-option-data-defaults">
-      <title>Unspecified Parameters for DHCPv4 Option Configuration</title>
-      <para>In many cases it is not required to specify all parameters for
-      an option configuration and the default values can be used. However, it is
-      important to understand the implications of not specifying some of them,
-      as it may result in configuration errors. The list below explains
-      the behavior of the server when a particular parameter is not explicitly
-      specified:
-
-      <itemizedlist>
-        <listitem>
-          <simpara><command>name</command> - the server requires an option name or
-          option code to identify an option. If this parameter is unspecified, the
-          option code must be specified.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara><command>code</command> - the server requires an option name or
-          option code to identify an option. This parameter may be left unspecified if
-          the <command>name</command> parameter is specified. However, this also
-          requires that the particular option has its definition (it is either a
-          standard option or an administrator created a definition for the option
-          using an 'option-def' structure), as the option definition associates an
-          option with a particular name. It is possible to configure an option
-          for which there is no definition (unspecified option format).
-          Configuration of such options requires the use of the option code.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara><command>space</command> - if the option space is unspecified it
-          will default to 'dhcp4', which is an option space holding the standard DHCPv4
-          options.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara><command>data</command> - if the option data is unspecified it
-          defaults to an empty value. The empty value is mostly used for the
-          options which have no payload (boolean options), but it is legal to specify
-          empty values for some options which carry variable-length data and which
-          the specification allows to have a length of 0. For such options, the data parameter
-          may be omitted in the configuration.</simpara>
-        </listitem>
-
-        <listitem>
-          <simpara><command>csv-format</command> - if this value is not
-          specified, the server will assume that the option data is specified as
-          a list of comma-separated values to be assigned to individual fields
-          of the DHCP option.
-          </simpara>
-        </listitem>
-      </itemizedlist>
-      </para>
-
-    </section>
-
-    <section xml:id="dhcp4-stateless-configuration">
-      <title>Stateless Configuration of DHCPv4 Clients</title>
-      <para>The DHCPv4 server supports the stateless client configuration whereby the
-      client has an IP address configured (e.g. using manual configuration) and only
-      contacts the server to obtain other configuration parameters, e.g. addresses of DNS servers.
-      In order to obtain the stateless configuration parameters, the client sends the
-      DHCPINFORM message to the server with the "ciaddr" set to the address that the
-      client is currently using. The server unicasts the DHCPACK message to the
-      client that includes the stateless configuration ("yiaddr" not set).
-      </para>
-
-      <para>The server will respond to the DHCPINFORM when the client is associated
-      with a subnet defined in the server's configuration. An example
-      subnet configuration will look like this:
-        <screen>
-"Dhcp4": {
-    "subnet4": [
-        {
-            "subnet": "192.0.2.0/24"
-            "option-data": [ {
-                "name": "domain-name-servers",
-                "code": 6,
-                "data": "192.0.2.200,192.0.2.201",
-                "csv-format": true,
-                "space": "dhcp4"
-            } ]
-        }
-    ]
-}</screen>
-      </para>
-      <para>This subnet specifies the single option which will be included in
-      the DHCPACK message to the client in response to DHCPINFORM. Note that
-      the subnet definition does not require the address pool configuration
-      if it will be used solely for the stateless configuration.
-      </para>
-
-      <para>This server will associate the subnet with the client if one of
-      the following conditions is met:
-      <itemizedlist>
-          <listitem>
-            <simpara>The DHCPINFORM is relayed and the giaddr matches the
-            configured subnet.</simpara>
-          </listitem>
-          <listitem>
-            <simpara>The DHCPINFORM is unicast from the client and the ciaddr
-            matches the configured subnet.</simpara>
-          </listitem>
-          <listitem>
-            <simpara>The DHCPINFORM is unicast from the client and the ciaddr is
-            not set, but the source address of the IP packet matches the
-            configured subnet.</simpara>
-          </listitem>
-          <listitem>
-            <simpara>The DHCPINFORM is not relayed and the IP address on the
-            interface on which the message is received matches the configured
-            subnet.</simpara>
-          </listitem>
-      </itemizedlist>
-      </para>
-    </section>
-
-    <section xml:id="dhcp4-client-classifier">
-      <title>Client Classification in DHCPv4</title>
-      <para>
-      The DHCPv4 server includes support for client classification. For a deeper
-      discussion of the classification process see <xref linkend="classify"/>.
-      </para>
-
-      <para>
-      In certain cases it is useful to configure the server to differentiate between DHCP client types
-      and treat them accordingly. Client
-      classification can be used to modify the behavior of almost any part of
-      the DHCP message processing. Kea currently offers client classification via:
-      private options and option 43 deferred unpacking; subnet selection;
-      pool selection; assignment of different options; and, for cable modems, specific options for use with the TFTP server address and the boot file field.
-      </para>
-
-      <para>
-      Kea can be instructed to limit access to given subnets based on class information.
-      This is particularly useful for cases where two types of devices share the
-      same link and are expected to be served from two different subnets. The
-      primary use case for such a scenario is cable networks, where there are two
-      classes of devices: the cable modem itself, which should be handed a lease
-      from subnet A; and all other devices behind the modem, which should get a lease
-      from subnet B. That segregation is essential to prevent overly curious
-      users from playing with their cable modems. For details on how to set up
-      class restrictions on subnets, see <xref linkend="classification-subnets"/>.
-      </para>
-
-      <para>
-      When subnets belong to a shared network, the classification applies
-      to subnet selection but not to pools, e.g. a pool in a subnet
-      limited to a particular class can still be used by clients which do not
-      belong to the class, if the pool they are expected to use is exhausted.
-      So the limit on access based on class information is also available
-      at the pool level; see <xref linkend="classification-pools"/>,
-      within a subnet.
-      This is useful when segregating clients belonging to the same subnet
-      into different address ranges.
-      </para>
-
-      <para>
-      In a similar way, a pool can be constrained to serve only known
-      clients, i.e. clients which have a reservation, using the
-      built-in "KNOWN" or "UNKNOWN" classes. One can assign addresses
-      to registered clients without giving a different address per
-      reservation, for instance when there are not enough available
-      addresses. The determination whether there is a reservation
-      for a given client is made after a subnet is selected, so it
-      is not possible to use KNOWN/UNKNOWN classes to select a shared
-      network or a subnet.
-      </para>
-
-      <para>
-      The process of classification is conducted in five steps.
-      The first step is to assess an incoming packet and assign it to
-      zero or more classes.
-      The second step is to choose a subnet, possibly based on the
-      class information. When the incoming packet is in the special
-      class, "DROP", it is dropped and a debug message logged.
-      The next step is to evaluate class expressions depending on the
-      built-in "KNOWN"/"UNKNOWN" classes after host reservation lookup,
-      using them for pool selection and assigning classes from host reservations.
-      The list of required classes is then built and each class of the list
-      has its expression evaluated; when it returns "true" the packet is added
-      as a member of the class.
-      The last step is to assign options, again possibly based on the class
-      information.
-      More complete and detailed information is available in
-      <xref linkend="classify"/>.
-      </para>
-
-      <para>
-      There are two main methods of classification. The first is automatic and relies
-      on examining the values in the vendor class options or the existence of a
-      host reservation. Information from these
-      options is extracted, and a class name is constructed from it and added to
-      the class list for the packet. The second specifies an expression
-      that is evaluated for each packet. If the result is "true", the packet is
-      a member of the class.
-      </para>
-
-      <note><para>
-        Care should be taken with client classification, as it is easy for
-        clients that do not meet class criteria to be denied all service.
-      </para></note>
-
-      <section>
-        <title>Setting Fixed Fields in Classification</title>
-        <para>
-          It is possible to specify that clients belonging to a particular class
-          should receive packets with specific values in certain fixed fields.
-          In particular, three fixed fields are supported:
-          <command>next-server</command> (conveys an IPv4 address, which is
-          set in the siaddr field), <command>server-hostname</command>
-          (conveys a server hostname, can be up to 64 bytes long, and is sent
-          in the sname field) and <command>boot-file-name</command>
-          (conveys the configuration file, can be up to 128 bytes long, and is
-          sent using the file field).
-        </para>
-        <para>
-          Obviously, there are many ways to assign clients to specific classes,
-          but for the PXE clients the client architecture type option (code 93)
-          seems to be particularly suited to
-          make the distinction. The following example checks if the client
-          identifies itself as a PXE device with architecture EFI x86-64, and
-          sets several fields if it does. See
-          <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://tools.ietf.org/html/rfc4578#section-2.1">Section 2.1 of RFC 4578</link>)
-          or the documentation of your client for specific values.
-        </para>
-          <screen>
-"Dhcp4": {
-    "client-classes": [
-        {
-            "name": "ipxe_efi_x64",
-            "test": "option[93].hex == 0x0009",
-            <userinput>"next-server": "192.0.2.254",
-            "server-hostname": "hal9000",
-            "boot-file-name": "/dev/null"</userinput>
-        },
-        ...
-    ],
-    ...
-          }</screen>
-
-          <para>
-            If there are multiple classes defined and an incoming packet is matched
-            to multiple classes, the class which is evaluated first is used.
-          </para>
-
-          <note><para>
-            The classes are ordered as specified in the configuration.
-          </para></note>
-
-        </section>
-
-      <section>
-        <title>Using Vendor Class Information in Classification</title>
-        <para>
-        The server checks whether an incoming packet includes the vendor class identifier
-        option (60). If it does, the content of that option is prepended with
-        "VENDOR_CLASS_", and it is interpreted as a class. For example,
-        modern cable modems will send this option with value "docsis3.0"
-        and as a result the packet will belong to class "VENDOR_CLASS_docsis3.0".
-        </para>
-
-        <note>
-        <para>
-          Certain special actions for
-          clients in VENDOR_CLASS_docsis3.0
-          can be achieved by defining VENDOR_CLASS_docsis3.0 and setting
-          its next-server and boot-file-name values appropriately.
-        </para>
-        </note>
-
-        <para>
-        This example shows a configuration using an automatically generated
-        "VENDOR_CLASS_" class. The administrator of the network has
-        decided that addresses from range 192.0.2.10 to 192.0.2.20 are
-        going to be managed by the Dhcp4 server and only clients belonging to the
-        docsis3.0 client class are allowed to use that pool.
-
-        <screen>
-"Dhcp4": {
-    "subnet4": [
-        {
-            "subnet": "192.0.2.0/24",
-            "pools": [ { "pool": "192.0.2.10 - 192.0.2.20" } ],
-            <userinput>"client-class": "VENDOR_CLASS_docsis3.0"</userinput>
-        }
-    ],
-    ...
-}</screen>
-        </para>
-
-      </section>
-
-      <section>
-        <title>Defining and Using Custom Classes</title>
-        <para>
-        The following example shows how to configure a class using an expression
-        and a subnet using that class. This configuration defines the
-        class named "Client_foo".
-        It is comprised of all clients whose client ids (option 61) start with the
-        string "foo". Members of this class will be given addresses from
-        192.0.2.10 to 192.0.2.20 and the addresses of their DNS servers
-        set to 192.0.2.1 and 192.0.2.2.
-
-          <screen>
-"Dhcp4": {
-    "client-classes": [
-        {<userinput>
-            "name": "Client_foo",
-            "test": "substring(option[61].hex,0,3) == 'foo'",
-            "option-data": [
-                {
-                    "name": "domain-name-servers",
-                    "code": 6,
-                    "space": "dhcp4",
-                    "csv-format": true,
-                    "data": "192.0.2.1, 192.0.2.2"
-                }
-            ]</userinput>
-        },
-        ...
-    ],
-    "subnet4": [
-        {
-            "subnet": "192.0.2.0/24",
-            "pools": [ { "pool": "192.0.2.10 - 192.0.2.20" } ],
-            <userinput>"client-class": "Client_foo"</userinput>
-        },
-        ...
-    ],
-    ...
-}</screen>
-        </para>
-      </section>
-
-      <section id="dhcp4-required-class">
-        <title>Required Classification</title>
-        <para>
-        In some cases it is useful to limit the scope of a class to
-        a shared-network, subnet, or pool. There are two parameters
-        for this, which instruct
-        the server to evaluate test expressions when
-        required.
-        </para>
-
-        <para>
-        The first one is the per-class <command>only-if-required</command>
-        flag which is false by default. When it is set to
-        <command>true</command>, the test expression of the class is not
-        evaluated at the reception of the incoming packet but later, and
-        only if the class evaluation is required.
-        </para>
-
-        <para>
-        The second is <command>require-client-classes</command>, which
-        takes a list of class names and is valid in shared-network,
-        subnet, and pool scope. Classes in these lists are marked as
-        required and evaluated after selection of this specific
-        shared-network/subnet/pool and before output option processing.
-        </para>
-
-        <para>
-        In this example, a class is assigned to the incoming packet
-        when the specified subnet is used:
-
-        <screen>
-"Dhcp4": {
-    "client-classes": [
-       {<userinput>
-           "name": "Client_foo",
-           "test": "member('ALL')",
-           "only-if-required": true</userinput>
-       },
-       ...
-    ],
-    "subnet4": [
-        {
-            "subnet": "192.0.2.0/24",
-            "pools": [ { "pool": "192.0.2.10 - 192.0.2.20" } ],
-            <userinput>"require-client-classes": [ "Client_foo" ],</userinput>
-            ...
-        },
-        ...
-    ],
-    ...
-}</screen>
-         </para>
-
-         <para>
-         Required evaluation can be used to express complex dependencies,
-         for example, subnet membership. It can also be used to reverse the
-         precedence; if you set an option-data in a subnet, it takes
-         precedence over an option-data in a class. When you move the
-         option-data to a required class and require it in
-         the subnet, a class evaluated earlier may take precedence.
-         </para>
-
-         <para>
-         Required evaluation is also available at shared-network and
-         pool levels. The order in which required classes are considered is:
-         shared-network, subnet, and pool, i.e. in the opposite order in which
-         option-data is processed.
-         </para>
-
-       </section>
-    </section>
-
-    <section xml:id="dhcp4-ddns-config">
-      <title>DDNS for DHCPv4</title>
-      <para>
-      As mentioned earlier, kea-dhcp4 can be configured to generate requests to the
-      DHCP-DDNS server (referred to here as "D2") to update DNS entries. These requests are known as
-      Name Change Requests or NCRs. Each NCR contains the following information:
-      <orderedlist>
-      <listitem><para>
-      Whether it is a request to add (update) or remove DNS entries
-      </para></listitem>
-      <listitem><para>
-      Whether the change requests forward DNS updates (A records), reverse
-      DNS updates (PTR records), or both
-      </para></listitem>
-      <listitem><para>
-      The Fully Qualified Domain Name (FQDN), lease address, and DHCID (information
-      identifying the client associated with the FQDN)
-      </para></listitem>
-      </orderedlist>
-      The parameters for controlling the generation of NCRs for submission to D2
-      are contained in the <command>dhcp-ddns</command> section of the kea-dhcp4 server
-      configuration. The mandatory parameters for the DHCP DDNS configuration
-      are <command>enable-updates</command>, which is unconditionally
-      required, and <command>qualifying-suffix</command>, which has no
-      default value and is required when <command>enable-updates</command>
-      is set to <command>true</command>.
-
-      The two (disabled and enabled) minimal DHCP DDNS configurations are:
-<screen>
-"Dhcp4": {
-    "dhcp-ddns": {
-        <userinput>"enable-updates": false</userinput>
-    },
-    ...
-}
-</screen>
-      and for example:
-<screen>
-"Dhcp4": {
-    "dhcp-ddns": {
-        <userinput>"enable-updates": true,
-        "qualifying-suffix": "example."</userinput>
-    },
-    ...
-}
-</screen>
-
-      The default values for the "dhcp-ddns" section are as follows:
-      <itemizedlist>
-      <listitem><simpara>
-      <command>"server-ip": "127.0.0.1"</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"server-port": 53001</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"sender-ip": ""</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"sender-port": 0</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"max-queue-size": 1024</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"ncr-protocol": "UDP"</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"ncr-format": "JSON"</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"override-no-update": false</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"override-client-update": false</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"replace-client-name": "never"</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"generated-prefix": "myhost"</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"hostname-char-set": ""</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"hostname-char-replacement": ""</command>
-      </simpara></listitem>
-      </itemizedlist>
-      </para>
-
-      <section xml:id="dhcpv4-d2-io-config">
-      <title>DHCP-DDNS Server Connectivity</title>
-      <para>
-      For NCRs to reach the D2 server, kea-dhcp4 must be able
-      to communicate with it. kea-dhcp4 uses the following configuration
-      parameters to control this communication:
-      <itemizedlist>
-      <listitem><simpara>
-      <command>enable-updates</command> - determines whether kea-dhcp4 will
-      generate NCRs. By default, this value is false, so DDNS updates are
-      disabled. To enable DDNS updates set this value to true.
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>server-ip</command> - IP address on which D2 listens for requests. The default is
-      the local loopback interface at address 127.0.0.1. You may specify
-      either an IPv4 or IPv6 address.
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>server-port</command> - port on which D2 listens for requests. The default value
-      is 53001.
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>sender-ip</command> - IP address which kea-dhcp4 uses to send requests to D2.
-      The default value is blank, which instructs kea-dhcp4 to select a suitable
-      address.
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>sender-port</command> - port which kea-dhcp4 uses to send requests to D2. The
-      default value of 0 instructs kea-dhcp4 to select a suitable port.
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>max-queue-size</command> - maximum number of requests allowed to queue waiting to
-      be sent to D2. This value guards against requests accumulating
-      uncontrollably if they are being generated faster than they can be
-      delivered. If the number of requests queued for transmission reaches
-      this value, DDNS updating will be turned off until the queue backlog has
-      been sufficiently reduced. The intent is to allow the kea-dhcp4 server to
-      continue lease operations without running the risk that its memory usage
-      grows without limit. The default value is 1024.
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>ncr-protocol</command> - socket protocol to use when sending requests to D2. Currently
-      only UDP is supported.
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>ncr-format</command> - packet format to use when sending requests to D2.
-      Currently only JSON format is supported.
-      </simpara></listitem>
-      </itemizedlist>
-      By default, kea-dhcp-ddns is assumed to be running on the same machine as kea-dhcp4, and
-      all of the default values mentioned above should be sufficient.
-      If, however, D2 has been configured to listen on a different address or
-      port, these values must be altered accordingly. For example, if D2 has been
-      configured to listen on 192.168.1.10 port 900, the following configuration
-      is required:
-<screen>
-"Dhcp4": {
-    "dhcp-ddns": {
-        <userinput>"server-ip": "192.168.1.10",
-        "server-port": 900</userinput>,
-        ...
-    },
-    ...
-}
-</screen>
-      </para>
-      </section>
-      <section xml:id="dhcpv4-d2-rules-config">
-      <title>When Does the kea-dhcp4 Server Generate a DDNS Request?</title>
-      <para>kea-dhcp4 follows the behavior prescribed for DHCP servers in
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc4702">RFC 4702</link>.
-      It is important to keep in mind that kea-dhcp4 makes the initial decision
-      of when and what to update and forwards that information to D2 in
-      the form of NCRs. Carrying out the actual DNS updates and dealing with
-      such things as conflict resolution are within the purview of D2 itself (<xref linkend="dhcp-ddns-server"/>).
-      This section describes when kea-dhcp4 will generate NCRs and the
-      configuration parameters that can be used to influence this decision.
-      It assumes that the <command>enable-updates</command> parameter is true.
-      </para>
-      <para>
-      In general, kea-dhcp4 will generate DDNS update requests when:
-      <orderedlist>
-      <listitem><para>
-      A new lease is granted in response to a DHCPREQUEST
-      </para></listitem>
-      <listitem><para>
-      An existing lease is renewed but the FQDN associated with it has
-      changed
-      </para></listitem>
-      <listitem><para>
-      An existing lease is released in response to a DHCPRELEASE
-      </para></listitem>
-      </orderedlist>
-      In the second case, lease renewal, two DDNS requests will be issued: one
-      request to remove entries for the previous FQDN, and a second request to
-      add entries for the new FQDN. In the last case, a lease release, a
-      single DDNS request to remove its entries will be made.
-      </para>
-      <para>
-      The decisions involved when granting a new lease (the first case) are more
-      complex. When a new lease is granted, kea-dhcp4 will generate a DDNS
-      update request if the DHCPREQUEST contains either the FQDN option
-      (code 81) or the Host Name option (code 12). If both are present,
-      the server will use the FQDN option. By default, kea-dhcp4
-      will respect the FQDN N and S flags specified by the client as shown
-      in the following table:
-      </para>
-        <table xml:id="fqdn-flag-table">
-          <title>Default FQDN Flag Behavior</title>
-          <tgroup cols="4" align="left">
-          <colspec colname="cflags"/>
-          <colspec colname="meaning"/>
-          <colspec colname="response"/>
-          <colspec colname="sflags"/>
-          <thead>
-              <row>
-                <entry>Client Flags:N-S</entry>
-                <entry>Client Intent</entry>
-                <entry>Server Response</entry>
-                <entry>Server Flags:N-S-O</entry>
-              </row>
-          </thead>
-          <tbody>
-            <row>
-                <entry>0-0</entry>
-                <entry>
-                Client wants to do forward updates, server should do reverse updates
-                </entry>
-                <entry>Server generates reverse-only request</entry>
-                <entry>1-0-0</entry>
-            </row>
-            <row>
-                <entry>0-1</entry>
-                <entry>Server should do both forward and reverse updates</entry>
-                <entry>Server generates request to update both directions</entry>
-                <entry>0-1-0</entry>
-            </row>
-            <row>
-                <entry>1-0</entry>
-                <entry>Client wants no updates done</entry>
-                <entry>Server does not generate a request</entry>
-                <entry>1-0-0</entry>
-            </row>
-          </tbody>
-          </tgroup>
-        </table>
-      <para>
-      The first row in the table above represents "client delegation". Here
-      the DHCP client states that it intends to do the forward DNS updates and
-      the server should do the reverse updates. By default, kea-dhcp4 will honor
-      the client's wishes and generate a DDNS request to the D2 server to update only
-      reverse DNS data. The parameter <command>override-client-update</command> can be used
-      to instruct the server to override client delegation requests. When
-      this parameter is true, kea-dhcp4 will disregard requests for client
-      delegation and generate a DDNS request to update both forward and
-      reverse DNS data. In this case, the N-S-O flags in the server's
-      response to the client will be 0-1-1 respectively.
-      </para>
-      <para>
-      (Note that the flag combination N=1, S=1 is prohibited according to
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc4702">RFC 4702</link>. If such a
-      combination is received from the client, the packet will be dropped by kea-dhcp4.)
-      </para>
-      <para>
-      To override client delegation, set the following values in the configuration file:
-      </para>
-<screen>
-"Dhcp4": {
-    "dhcp-ddns": {
-        <userinput>"override-client-update": true</userinput>,
-        ...
-    },
-    ...
-}
-</screen>
-      <para>
-      The third row in the table above describes the case in which the client
-      requests that no DNS updates be done. The parameter, <command>override-no-update</command>,
-      can be used to instruct the server to disregard the client's wishes. When
-      this parameter is true, kea-dhcp4 will generate DDNS update requests to kea-dhcp-ddns
-      even if the client requests that no updates be done. The N-S-O flags in the
-      server's response to the client will be 0-1-1.
-      </para>
-      <para>
-      To override client delegation, issue the following commands:
-      </para>
-<screen>
-"Dhcp4": {
-    "dhcp-ddns": {
-        <userinput>"override-no-update": true</userinput>,
-        ...
-    },
-    ...
-}
-</screen>
-      <para>
-      kea-dhcp4 will always generate DDNS update requests if the client request
-      only contains the Host Name option. In addition, it will include an FQDN
-      option in the response to the client with the FQDN N-S-O flags set to
-      0-1-0 respectively. The domain name portion of the FQDN option will be
-      the name submitted to D2 in the DDNS update request.
-      </para>
-      </section>
-
-      <section xml:id="dhcpv4-fqdn-name-generation">
-      <title>kea-dhcp4 Name Generation for DDNS Update Requests</title>
-      <para>Each NameChangeRequest must of course include the fully qualified domain
-      name whose DNS entries are to be affected. kea-dhcp4 can be configured to
-      supply a portion or all of that name, based upon what it receives from
-      the client in the DHCPREQUEST.</para>
-      <para>
-       The default rules for constructing the FQDN that will be used for DNS
-       entries are:
-      <orderedlist>
-      <listitem><para>
-        If the DHCPREQUEST contains the client FQDN option, take the candidate name
-        from there; otherwise, take it from the Host Name option.
-      </para></listitem>
-      <listitem><para>
-        If the candidate name is a partial (i.e. unqualified) name, then add a
-        configurable suffix to the name and use the result as the FQDN.
-      </para></listitem>
-      <listitem><para>
-        If the candidate name provided is empty, generate an FQDN using a
-        configurable prefix and suffix.
-      </para></listitem>
-      <listitem><para>
-        If the client provided neither option, then no DNS action will be taken.
-      </para></listitem>
-      </orderedlist>
-        These rules can be amended by setting the
-        <command>replace-client-name</command> parameter, which provides the
-        following modes of behavior:
-      <itemizedlist>
-      <listitem><para>
-        <command>never</command> - Use the name the client sent. If the client
-        sent no name, do not generate one. This is the default mode.
-      </para></listitem>
-      <listitem><para>
-        <command>always</command> - Replace the name the client sent. If the
-        client sent no name, generate one for the client.
-      </para></listitem>
-      <listitem><para>
-        <command>when-present</command> - Replace the name the client sent.
-        If the client sent no name, do not generate one.
-      </para></listitem>
-      <listitem><para>
-        <command>when-not-present</command> - Use the name the client sent.
-        If the client sent no name, generate one for the client.
-      </para></listitem>
-      </itemizedlist>
-      <note>
-        <para>
-    Note that formerly, this parameter was a boolean and permitted only values
-    of <command>true</command> and <command>false</command>. Boolean values
-    have been deprecated and are no longer accepted. If you are currently using
-    booleans, you must replace them with the desired mode name. A value of
-    <command>true</command> maps to <command>"when-present"</command>, while
-    <command>false</command> maps to <command>"never"</command>.
-        </para>
-    </note>
-
-      For example, to instruct kea-dhcp4 to always generate the FQDN for a
-      client, set the parameter <command>replace-client-name</command> to
-      <command>always</command> as follows:
-      </para>
-<screen>
-"Dhcp4": {
-    "dhcp-ddns": {
-        <userinput>"replace-client-name": "always"</userinput>,
-        ...
-    },
-    ...
-}
-</screen>
-      <para>
-      The prefix used in the generation of an FQDN is specified by the
-      <command>generated-prefix</command> parameter. The default value is "myhost". To alter
-      its value, simply set it to the desired string:
-      </para>
-<screen>
-"Dhcp4": {
-    "dhcp-ddns": {
-        <userinput>"generated-prefix": "another.host"</userinput>,
-        ...
-    },
-    ...
-}
-</screen>
-      <para>
-      The suffix used when generating an FQDN, or when qualifying a
-      partial name, is specified by
-      the <command>qualifying-suffix</command> parameter. This
-      parameter has no default value, thus it is mandatory when
-      DDNS updates are enabled.
-      To set its value simply set it to the desired string:
-      </para>
-<screen>
-"Dhcp4": {
-    "dhcp-ddns": {
-        <userinput>"qualifying-suffix": "foo.example.org"</userinput>,
-        ...
-    },
-    ...
-}
-</screen>
-      <para>
-      When generating a name, kea-dhcp4 will construct the name in the format:
-      </para>
-      <para>
-        [generated-prefix]-[address-text].[qualifying-suffix].
-      </para>
-      <para>
-      where address-text is simply the lease IP address converted to a
-      hyphenated string. For example, if the lease address is 172.16.1.10,
-      the qualifying suffix "example.com", and the default value is used for
-      <command>generated-prefix</command>, the generated FQDN would be:
-      </para>
-      <para>
-        myhost-172-16-1-10.example.com.
-      </para>
-      </section>
-      <section xml:id="host-name-sanitization">
-        <title>Sanitizing Client Host Name and FQDN Names</title>
-        It may be that some of your DHCP clients provide values in the Host
-        Name option (Option code 12) or FQDN option (Option code 81) that
-        contain undesirable characters. It is possible to configure kea-dhcp4
-        to sanitize these values. The most typical use case is ensuring
-        that only characters that are permitted by RFC 1035 be included:
-        A-Z, a-z, 0-9, and '-'.
-
-        This may be accomplished with the following two parameters:
-        <itemizedlist>
-        <listitem><simpara>
-        <command>hostname-char-set</command> - a regular expression describing
-        the invalid character set. This can be any valid, regular expression
-        using POSIX extended expression syntax. For example, "[^A-Za-z0-9-]"
-        would replace any character other than the letters A through z, digits
-        0 through 9, and '-'. An empty string, the default value, disables
-        sanitization.
-        </simpara></listitem>
-        <listitem><simpara>
-        <command>hostname-char-replacement</command> - a string of zero or
-        more characters with which to replace each invalid character in the
-        host name. The default value is an empty string and will cause
-        invalid characters to be OMITTED rather than replaced.
-        </simpara></listitem>
-        </itemizedlist>
-        The following configuration will replace anything other than a
-        letter, digit, hyphen, or dot with the letter 'x':
-<screen>
-"Dhcp4": {
-    "dhcp-ddns": {
-        "hostname-char-set": "[^A-Za-z0-9.-]",
-        "hostname-char-replacement": "x",
-        ...
-    },
-    ...
-}
-</screen>
-        Thus, a client-supplied value of "myhost-$[123.org" would become
-        "myhost-xx123.org". Sanitizing is performed only on the portion of
-        the name supplied by the client, and it is performed before applying
-        a qualifying suffix (if one is defined and needed).
-        <note>
-        The following are some considerations to keep in mind:
-        <para>
-        Name sanitizing is meant to catch the more common cases of invalid
-        characters through a relatively simple character-replacement scheme.
-        It is difficult to devise a scheme that works well in all cases,
-        for both Host Name and FQDN options. If you find you have clients
-        that are using odd corner cases of character combinations that cannot
-        be readily handled with this mechanism, you should consider writing
-        a hook that can carry out sufficiently complex logic to address your
-        needs.
-        </para>
-        <para>
-        If your clients include domain names in the Host Name option and you
-        want these preserved, you will need to make sure that the dot, '.', is
-        considered a valid character by the hostname-char-set expression, such
-        as this: "[^A-Za-z0-9.-]". This will not affect dots in FQDN Option
-        values. When scrubbing FQDNs, dots are treated as delimiters and used
-        to separate the option value into individual domain labels that are
-        scrubbed and then re-assembled.
-        </para>
-        <para>
-        If your clients are sending values that differ only by characters
-        considered as invalid by your hostname-char-set, be aware that scrubbing
-        them will yield identical values. In such cases, DDNS conflict rules
-        will permit only one of them to register the name.
-        </para>
-        <para>
-        Finally, given the latitude clients have in the values they send, it is
-        virtually impossible to guarantee that a combination of these two
-        parameters will always yield a name that is valid for use in DNS. For
-        example, using an empty value for hostname-char-replacement could yield
-        an empty domain label within a name, if that label consists only of
-        invalid characters.
-        </para>
-        </note>
-        <note>
-        Since the 1.6.0 Kea release it is possible to specify hostname-char-set
-        and/or hostname-char-replacement at the global scope. This allows
-        to sanitize host names without requiring a dhcp-ddns entry. When
-        a hostname-char parameter is defined at the global scope and
-        in a dhcp-ddns entry the second (local) value is used.
-        </note>
-      </section>
-
-    </section>
-
-    <section xml:id="dhcp4-next-server">
-      <title>Next Server (siaddr)</title>
-      <para>In some cases, clients want to obtain configuration from a TFTP server.
-      Although there is a dedicated option for it, some devices may use the siaddr field
-      in the DHCPv4 packet for that purpose. That specific field can be configured
-      using the <command>next-server</command> directive. It is possible to define it in the global scope or
-      for a given subnet only. If both are defined, the subnet value takes precedence.
-      The value in subnet can be set to 0.0.0.0, which means that <command>next-server</command> should
-      not be sent. It may also be set to an empty string, which means the same as if
-      it were not defined at all, i.e. use the global value.
-      </para>
-      <para>
-      The <command>server-hostname</command> (which conveys a server hostname,
-      can be up to 64 bytes long, and will be sent in the sname field) and
-      <command>boot-file-name</command> (which conveys the configuration file,
-      can be up to 128 bytes long, and will be sent using the file field)
-      directives are handled the same way as <command>next-server</command>.
-      </para>
-
-<screen>
-"Dhcp4": {
-    <userinput>"next-server": "192.0.2.123",
-    "boot-file-name": "/dev/null"</userinput>,
-    ...,
-    "subnet4": [
-        {
-            <userinput>"next-server": "192.0.2.234",
-            "server-hostname": "some-name.example.org",
-            "boot-file-name": "bootfile.efi"</userinput>,
-            ...
-        }
-    ]
-}
-</screen>
-    </section>
-
-    <section xml:id="dhcp4-echo-client-id">
-      <title>Echoing Client-ID (RFC 6842)</title>
-      <para>The original DHCPv4 specification
-      (<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc2131">RFC 2131</link>)
-      states that the DHCPv4
-      server must not send back client-id options when responding to
-      clients. However, in some cases that confused clients that did
-      not have a MAC address or client-id; see
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc6842">RFC 6842</link>
-      for details. That
-      behavior changed with the publication of
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc6842">RFC 6842</link>,
-      which updated
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc2131">RFC 2131</link>.
-      That update states that the server must
-      send the client-id if the client sent it. That is Kea's default behavior.
-      However, in some cases older devices that do not support
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc6842">RFC 6842</link>
-      may refuse to accept responses that include the
-      client-id option. To enable backward compatibility, an optional
-      configuration parameter has been introduced. To configure it,
-      use the following configuration statement:</para>
-
-<screen>
-"Dhcp4": {
-    <userinput>"echo-client-id": false</userinput>,
-    ...
-}
-</screen>
-    </section>
-
-    <section xml:id="dhcp4-match-client-id">
-      <title>Using Client Identifier and Hardware Address</title>
-      <para>The DHCP server must be able to identify the client
-      from which it receives the message and distinguish it from other clients. There are many reasons
-      why this identification is required; the most important ones are:
-      <itemizedlist>
-        <listitem><simpara>When the client contacts the server to allocate a new
-        lease, the server must store the client identification information in
-        the lease database as a search key.</simpara></listitem>
-        <listitem><simpara>When the client is trying to renew or release the existing
-        lease, the server must be able to find the existing lease entry in the
-        database for this client, using the client identification information as a
-        search key.</simpara></listitem>
-        <listitem><simpara>Some configurations use static reservations for the IP
-        addresses and other configuration information. The server's administrator
-        uses client identification information to create these static assignments.
-        </simpara></listitem>
-        <listitem><simpara>In dual-stack networks there is often a need to
-        correlate the lease information stored in DHCPv4 and DHCPv6 servers for
-        a particular host. Using common identification information by the DHCPv4
-        and DHCPv6 clients allows the network administrator to achieve this
-        correlation and better administer the network.</simpara></listitem>
-      </itemizedlist>
-      </para>
-
-      <para>DHCPv4 uses two distinct identifiers which are placed
-      by the client in the queries sent to the server and copied by the server
-      to its responses to the client: "chaddr" and "client identifier". The
-      former was introduced as a part of the BOOTP specification and it is also
-      used by DHCP to carry the hardware address of the interface used to send
-      the query to the server (MAC address for the Ethernet). The latter is
-      carried in the Client-identifier option, introduced in
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc2132">RFC 2132</link>.
-      </para>
-
-      <para><link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc2131">RFC 2131</link>
-      indicates that the server may use both of these identifiers to identify
-      the client but the "client identifier", if present, takes precedence
-      over "chaddr". One of the reasons for this is that "client identifier"
-      is independent from the hardware used by the client to communicate with
-      the server. For example, if the client obtained the lease using one
-      network card and then the network card is moved to another host, the
-      server will wrongly identify this host as the one which obtained
-      the lease. Moreover,
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://tools.ietf.org/html/rfc4361">RFC 4361</link> gives
-      the recommendation to use a DUID
-      (see <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://tools.ietf.org/html/rfc8415">RFC 8415</link>,
-      the DHCPv6 specification)
-      carried as "client identifier" when dual-stack networks are in use
-      to provide consistent identification information for the client, regardless
-      of the protocol type it is using. Kea adheres to these specifications, and
-      the "client identifier" by default takes precedence over the value carried
-      in the "chaddr" field when the server searches, creates, updates, or removes
-      the client's lease.
-      </para>
-
-      <para>When the server receives a DHCPDISCOVER or DHCPREQUEST message from the
-      client, it will try to find out if the client already has a lease in the
-      database and will hand out that lease rather than allocate
-      a new one. Each lease in the lease database is associated with the
-      "client identifier" and/or "chaddr". The server will first use the
-      "client identifier" (if present) to search the lease. If the lease is
-      found, the server will treat this lease as belonging to the client
-      even if the current "chaddr" and the "chaddr" associated with
-      the lease do not match. This facilitates the scenario when the network card
-      on the client system has been replaced and thus the new MAC address
-      appears in the messages sent by the DHCP client. If the server fails
-      to find the lease using the "client identifier", it will perform another lookup
-      using the "chaddr". If this lookup returns no result, the client is
-      considered as not having a lease and the new lease will be created.
-      </para>
-
-      <para>A common problem reported by network operators is that poor
-      client implementations do not use stable client identifiers, instead
-      generating a new "client identifier" each time the client connects
-      to the network. Another well-known case is when the client changes its
-      "client identifier" during the multi-stage boot process (PXE). In such
-      cases, the MAC address of the client's interface remains stable, and
-      using the "chaddr" field to identify the client guarantees that the
-      particular system is considered to be the same client, even though its
-      "client identifier" changes.
-      </para>
-
-      <para>To address this problem, Kea includes a configuration option
-      which enables client identification using "chaddr" only by instructing
-      the server to disregard the server to "ignore" the "client identifier" during
-      lease lookups and allocations for a particular subnet. Consider the following
-      simplified server configuration:</para>
-<screen>
-"Dhcp4": {
-    ...
-    <userinput>"match-client-id": true,</userinput>
-    ...
-    "subnet4": [
-    {
-        "subnet": "192.0.10.0/24",
-        "pools": [ { "pool": "192.0.2.23-192.0.2.87" } ],
-        <userinput>"match-client-id": false</userinput>
-    },
-    {
-        "subnet": "10.0.0.0/8",
-        "pools": [ { "pool": "10.0.0.23-10.0.2.99" } ],
-    }
-    ]
-}
-</screen>
-
-     <para>The <command>match-client-id</command> is a boolean value which
-     controls this behavior. The default value of <userinput>true</userinput>
-     indicates that the server will use the "client identifier" for lease
-     lookups and "chaddr" if the first lookup returns no results. The
-     <command>false</command> means that the server will only
-     use the "chaddr" to search for client's lease. Whether the DHCID for
-     DNS updates is generated from the "client identifier" or "chaddr" is
-     controlled through the same parameter.</para>
-
-     <para>The <command>match-client-id</command> parameter may appear
-     both in the global configuration scope and/or under any subnet
-     declaration. In the example shown above, the effective value of the
-     <command>match-client-id</command> will be <userinput>false</userinput>
-     for the subnet 192.0.10.0/24, because the subnet-specific setting
-     of the parameter overrides the global value of the parameter. The
-     effective value of the <command>match-client-id</command> for the subnet
-     10.0.0.0/8 will be set to <userinput>true</userinput> because the
-     subnet declaration lacks this parameter and the global setting is
-     by default used for this subnet. In fact, the global entry for this
-     parameter could be omitted in this case, because
-     <userinput>true</userinput> is the default value.
-     </para>
-
-     <para>It is important to explain what happens when the client obtains
-     its lease for one setting of the <command>match-client-id</command>
-     and then renews when the setting has been changed. First, consider
-     the case when the client obtains the lease when the
-     <command>match-client-id</command> is set to <userinput>true</userinput>.
-     The server will store the lease information, including "client identifier"
-     (if supplied) and "chaddr", in the lease database. When the setting is
-     changed and the client renews the lease, the server will determine that
-     it should use the "chaddr" to search for the existing lease. If the
-     client hasn't changed its MAC address, the server should successfully
-     find the existing lease. The "client identifier" associated with the
-     returned lease is ignored and the client is allowed to use this lease.
-     When the lease is renewed only the "chaddr" is recorded for this
-     lease, according to the new server setting.
-     </para>
-
-     <para>In the second case the client has the lease with only a "chaddr"
-     value recorded. When the <command>match-client-id</command> setting is changed to
-     <userinput>true</userinput>,
-     the server will first try to use the "client identifier" to find the
-     existing client's lease. This will return no results because the
-     "client identifier" was not recorded for this lease. The server will
-     then use the "chaddr" and the lease will be found. If the lease appears
-     to have no "client identifier" recorded, the server will assume that
-     this lease belongs to the client and that it was created with the previous
-     setting of the <command>match-client-id</command>.
-     However, if the lease contains a "client identifier" which is different
-     from the "client identifier" used by the client, the lease will be
-     assumed to belong to another client and the new lease will be
-     allocated.
-     </para>
-
-    </section>
-
-    <section xml:id="dhcp4-authoritative">
-      <title>Authoritative DHCPv4 Server Behavior</title>
-      <para>The original DHCPv4 specification
-      (<link xmlns:xlink="http://www.w3.org/1999/xlink"
-             xlink:href="http://tools.ietf.org/html/rfc2131">RFC 2131</link>)
-      states that if a client requests an address in the INIT-REBOOT state, of
-      which the server has no knowledge, the server must remain silent,
-      except if the server knows that the client has requested an IP
-      address from the wrong network.
-      By default, Kea follows the behavior of the ISC dhcpd instead of
-      the specification and also remains silent, if the client
-      requests an IP address from the wrong network, because
-      configuration information about a given network segment is not
-      known to be correct.
-      Kea only rejects a client's DHCPREQUEST with a DHCPNAK message if it
-      already has a lease for the client, but with a different IP address.
-      Administrators can override this behavior through the
-      boolean <command>authoritative</command> (<userinput>false</userinput>
-      by default) setting.
-      </para>
-
-      <para>In authoritative mode, <command>authoritative</command> set to
-      <userinput>true</userinput>, Kea always rejects INIT-REBOOT requests from
-      unknown clients with DHCPNAK messages.
-      The <command>authoritative</command> setting can be specified in
-      global, shared-network, and subnet configuration scope and is
-      automatically inherited from the parent scope, if not specified.
-      All subnets in a shared-network must have the same
-      <command>authoritative</command> setting.
-      </para>
-    </section>
-
-     <section xml:id="dhcp4-dhcp4o6-config">
-      <title>DHCPv4-over-DHCPv6: DHCPv4 Side</title>
-      <para>
-      The support of DHCPv4-over-DHCPv6 transport is described in
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc7341">RFC 7341</link>
-      and is implemented using cooperating DHCPv4 and DHCPv6 servers.
-      This section is about the configuration of the DHCPv4 side
-      (the DHCPv6 side is described in <xref linkend="dhcp6-dhcp4o6-config"/>).
-      </para>
-      <note>
-        <para>DHCPv4-over-DHCPv6 support is experimental and the
-        details of the inter-process communication may change; both
-        the DHCPv4 and DHCPv6 sides should be running the same version
-        of Kea. For instance, the support of port relay (RFC 8357) introduced
-        an incompatible change.</para>
-      </note>
-      <para>
-      The <command>dhcp4o6-port</command> global parameter specifies
-      the first of the two consecutive ports of the UDP sockets used
-      for the communication between the DHCPv6 and DHCPv4 servers
-      (the DHCPv4 server is bound to ::1 on <command>port</command> + 1
-      and connected to ::1 on <command>port</command>).
-      </para>
-      <para>
-      With DHCPv4-over-DHCPv6, the DHCPv4 server does not have access
-      to several of the identifiers it would normally use to select a
-      subnet. To address this issue, three new configuration
-      entries have been added; the presence of any of these allows the
-      subnet to be used with DHCPv4-over-DHCPv6. These entries are:
-      <itemizedlist>
-        <listitem>
-        <simpara><command>4o6-subnet</command>: Takes a prefix (i.e., an
-        IPv6 address followed by a slash and a prefix length) which is
-        matched against the source address.
-        </simpara>
-        </listitem>
-        <listitem>
-        <simpara><command>4o6-interface-id</command>: Takes a relay interface
-        ID option value.
-        </simpara>
-        </listitem>
-        <listitem>
-        <simpara><command>4o6-interface</command>: Takes an interface name
-        which is matched against the incoming interface name.
-        </simpara>
-        </listitem>
-      </itemizedlist>
-      </para>
-      <para>
-      The following configuration was used during some tests:
-<screen>
-{
-
-# DHCPv4 conf
-"Dhcp4": {
-    "interfaces-config": {
-        "interfaces": [ "eno33554984" ]
-    },
-
-    "lease-database": {
-        "type": "memfile",
-        "name": "leases4"
-    },
-
-    "valid-lifetime": 4000,
-
-    "subnet4": [ {
-        "subnet": "10.10.10.0/24",
-        <userinput>"4o6-interface": "eno33554984",</userinput>
-        <userinput>"4o6-subnet": "2001:db8:1:1::/64",</userinput>
-        "pools": [ { "pool": "10.10.10.100 - 10.10.10.199" } ]
-    } ],
-
-    <userinput>"dhcp4o6-port": 6767,</userinput>
-
-    "loggers": [ {
-        "name": "kea-dhcp4",
-        "output_options": [ {
-            "output": "/tmp/kea-dhcp4.log"
-        } ],
-        "severity": "DEBUG",
-        "debuglevel": 0
-    } ]
-}
-
-}
-</screen>
-    </para>
-     </section>
-
-
-     <section xml:id="sanity-checks4">
-       <title>Sanity Checks in DHCPv4</title>
-
-       <para>
-         An important aspect of a well-running DHCP system is an assurance that
-         the data remains consistent. However, in some cases it may be convenient
-         to tolerate certain inconsistent data. For example, a network
-         administrator that temporarily removed a subnet from a configuration
-         wouldn't want all the leases associated with it to disappear from the
-         lease database. Kea has a mechanism to better control sanity
-         checks such as this.
-         </para>
-
-       <para>
-         Kea supports a configuration scope called
-         <command>sanity-checks</command>. It currently allows only a
-         single parameter called <command>lease-checks</command>. It
-         governs the verification that is done when a new lease is
-         loaded from a lease file. With the
-         sanity-checks mechanism, it is possible to tell Kea to
-         try to correct inconsistent data.
-       </para>
-
-       <para>
-         Every subnet has a subnet-id value; this is how Kea internally
-         identifies subnets. Each lease has a subnet-id parameter as well, which
-         identifies which subnet it belongs to. However, if the configuration has
-         changed, it is possible that a lease could exist with a subnet-id, but
-         without any subnet that matches it. Also, it may be possible that the
-         subnet's configuration has changed and the subnet-id now belongs to a
-         subnet that does not match the lease. Kea's corrective algorithm first
-         checks to see if there is a subnet with the subnet-id specified by the lease. If
-         there is, it verifies whether the lease belongs to that subnet. If not,
-         depending on the lease-checks setting, the lease is discarded, a
-         warning is displayed, or a new subnet is selected for the lease that
-         matches it topologically.
-       </para>
-
-       <para>
-         There are five levels which are supported:
-       </para>
-
-       <itemizedlist>
-         <listitem>
-           <simpara><command>none</command> - do no special checks; accept the
-           lease as is.</simpara>
-         </listitem>
-         <listitem>
-           <simpara><command>warn</command> - if problems are detected, a
-           warning will be displayed, but the lease data will be accepted
-           anyway. This is the default value. If not explicitly configured to
-           some other value, this level will be used.</simpara>
-         </listitem>
-         <listitem>
-           <simpara><command>fix</command> - If a data inconsistency is
-           discovered, Kea will try to correct it. If the correction is
-           not successful, the incorrect data will be inserted anyway.</simpara>
-         </listitem>
-         <listitem>
-           <simpara><command>fix-del</command> - If a data inconsistency is
-           discovered, Kea will try to correct it. If the correction is not
-           successful, the lease will be rejected. This setting ensures the data's
-           correctness, but some incorrect data may be lost. Use with
-           care.</simpara>
-         </listitem>
-         <listitem>
-           <simpara><command>del</command> - This is the strictest mode. If any
-           inconsistency is detected, the lease is rejected. Use with care.
-           </simpara>
-         </listitem>
-       </itemizedlist>
-
-       <para>This feature is currently implemented for the memfile backend.</para>
-
-       <para>
-         An example configuration that sets this parameter looks as follows:
-<screen>
-"Dhcp4": {
-    "sanity-checks": {
-        <userinput>"lease-checks": "fix-del"</userinput>
-    },
-    ...
-}</screen>
-
-  </para>
-     </section>
-
-  </section> <!-- end of configuring kea-dhcp4 server section -->
-
-  <!-- Host reservation is a large topic. There will be many subsections,
-   so it should be a section on its own. -->
-  <section xml:id="host-reservation-v4">
-    <title>Host Reservation in DHCPv4</title>
-
-    <para>There are many cases where it is useful to provide a configuration on
-    a per-host basis. The most obvious one is to reserve a specific, static
-    address for exclusive use by a given client (host); the returning client will
-    receive the same address from the server every time, and other clients will
-    generally not receive that address. Note that there may be cases when a
-    new reservation has been made for a client for an address currently
-    in use by another client. We call this situation a "conflict." These conflicts
-    get resolved automatically over time as described in subsequent sections.
-    Once the conflict is resolved, the client will keep receiving the reserved
-    configuration when it renews.</para>
-
-    <para>Another example when host reservations are applicable is when a host
-    has specific requirements, e.g. a printer that needs additional DHCP options.
-    Yet another possible use case is to define unique names for hosts.
-    </para>
-
-    <para>Host reservations are defined as parameters for each subnet. Each host
-    must be identified by an identifier, for example the hardware/MAC address. There is an optional
-    <command>reservations</command> array in the <command>subnet4</command>
-    structure. Each element in that array is a structure that holds information
-    about reservations for a single host. In particular, the structure must
-    have an identifier that uniquely identifies a host. In the DHCPv4 context, the
-    identifier is usually a hardware or MAC address. In most cases an IP address
-    will be specified. It is also possible to specify a hostname, host
-    specific options, or fields carried within DHCPv4 message such as siaddr,
-    sname, or file.</para>
-
-    <para>The following example shows how to reserve addresses for specific
-    hosts in a subnet:
-
-<screen>
-"subnet4": [
-    {
-        "pools": [ { "pool":  "192.0.2.1 - 192.0.2.200" } ],
-        "subnet": "192.0.2.0/24",
-        "interface": "eth0",
-        <userinput>"reservations": [
-            {
-                "hw-address": "1a:1b:1c:1d:1e:1f",
-                "ip-address": "192.0.2.202"
-            },
-            {
-                "duid": "0a:0b:0c:0d:0e:0f",
-                "ip-address": "192.0.2.100",
-                "hostname": "alice-laptop"
-            },
-            {
-                "circuit-id": "'charter950'",
-                "ip-address": "192.0.2.203"
-            },
-            {
-                "client-id": "01:11:22:33:44:55:66",
-                "ip-address": "192.0.2.204"
-            }
-        ]</userinput>
-    }
-]
-</screen>
-    The first entry reserves the 192.0.2.202 address for the client that uses
-    a MAC address of 1a:1b:1c:1d:1e:1f. The second entry reserves the address
-    192.0.2.100 and the hostname of alice-laptop for the client using a DUID
-    0a:0b:0c:0d:0e:0f. (Note that if you plan to do DNS updates, it
-    is strongly recommended for the hostnames to be unique.) The third
-    example reserves address 192.0.3.203 for a client whose request
-    would be relayed by a relay agent that inserts a circuit-id option
-    with the value 'charter950'. The fourth entry reserves address
-    192.0.2.204 for a client that uses a client identifier with value
-    01:11:22:33:44:55:66.</para>
-
-    <para>The above example is used for illustrational purposes only
-    and in actual deployments it is recommended to use as few types as possible
-    (preferably just one). See <xref linkend="reservations4-tuning"/> for a detailed
-    discussion of this point.</para>
-
-    <para>Making a reservation for a mobile host that may visit multiple subnets
-    requires a separate host definition in each subnet it is expected to visit.
-    It is not possible to define multiple host definitions with the same hardware
-    address in a single subnet. Multiple host definitions with the same hardware
-    address are valid if each is in a different subnet.
-    </para>
-
-    <para>Adding host reservation incurs a performance penalty. In principle,
-    when a server that does not support host reservation responds to a query,
-    it needs to check whether there is a lease for a given address being
-    considered for allocation or renewal. The server that also supports host
-    reservation has to perform additional checks: not only whether the address is
-    currently used (i.e., if there is a lease for it), but also whether the address
-    could be used by someone else (i.e., if there is a reservation for it). That
-    additional check incurs extra overhead.</para>
-
-    <section xml:id="reservation4-types">
-      <title>Address Reservation Types</title>
-
-      <para>In a typical scenario there is an IPv4 subnet defined,
-      e.g. 192.0.2.0/24, with a certain part of it dedicated for dynamic allocation
-      by the DHCPv4 server. That dynamic part is referred to as a dynamic pool or
-      simply a pool. In principle, a host reservation can reserve any address
-      that belongs to the subnet. The reservations that specify addresses that
-      belong to configured pools are called "in-pool reservations."
-      In contrast, those that do not belong to dynamic pools are called
-      "out-of-pool reservations." There is no formal difference
-      in the reservation syntax and both reservation types are
-      handled uniformly.</para>
-
-      <para>Kea supports global
-      host reservations. These are reservations that are specified at the
-      global level within the configuration and that do not belong to any
-      specific subnet. Kea will still match inbound client packets to a
-      subnet as before, but when the subnet's reservation mode is set to
-      <command>"global"</command>, Kea will look for host reservations only
-      among the global reservations defined. Typically, such reservations would
-      be used to reserve hostnames for clients which may move from one subnet
-      to another.
-      </para>
-      <note>You can reserve any ip-address in a global reservation. Just keep
-      in mind that Kea will not do any sanity checking on the address and for
-      Kea 1.5.0, support for global reservations should be considered experimental.
-      </note>
-    </section>
-
-    <section xml:id="reservation4-conflict">
-      <title>Conflicts in DHCPv4 Reservations</title>
-      <para>As reservations and lease information are stored separately,
-      conflicts may arise. Consider the following series of events: the server
-      has configured the dynamic pool of addresses from the range of 192.0.2.10 to
-      192.0.2.20. Host A requests an address and gets 192.0.2.10. Now the system
-      administrator decides to reserve address 192.0.2.10 for Host B.
-      In general, reserving an address that
-      is currently assigned to someone else is not recommended, but there are
-      valid use cases where such an operation is warranted.</para>
-
-      <para>The server now has a conflict to resolve.
-      If Host B boots up and requests an address, the server is
-      not able to assign the reserved address 192.0.2.10. A naive approach
-      would to be immediately remove the existing lease for Host A
-      and create a new one for Host B. That would not solve the problem,
-      though, because as soon as Host B gets the address, it will detect
-      that the address is already in use by Host A and will send
-      a DHCPDECLINE message. Therefore, in this situation, the server has
-      to temporarily assign a different address from the dynamic pool (not matching what has been
-      reserved) to Host B.</para>
-
-      <!-- let's keep this text around. It describes how that is working in v6
-      <para>When Host A renews its address, the server will discover that
-      the address being renewed is now reserved for someone else (Host
-      B). Therefore, the server will remove the lease and will inform Host A
-      that it is no longer allowed to use it by sending a DHCPNAK message. Host A
-      will then revert to server discovery and will eventually get a different
-      address. The address 192.0.2.10 is then no longer used. When Host B tries
-      to renew its temporarily assigned address, the server will detect that
-      it has a valid lease, but will note that there is a reservation for a different address.
-      The server will send DHCPNAK to inform Host B that its address is no
-      longer usable. The server will also remove its temporary lease. It will
-      revert to the server discovery phase and will eventually send a
-      DHCPREQUEST message. This time the server will find out that there is a
-      reservation for that host and the reserved address 192.0.2.10 is not used,
-      so it will be granted.</para> -->
-
-      <para>When Host A renews its address, the server will discover that
-      the address being renewed is now reserved for another host - Host
-      B. Therefore the server will inform Host A that it is no longer
-      allowed to use it by sending a DHCPNAK message. The server will not remove the
-      lease, though, as there's a small chance that the DHCPNAK may be lost if the
-      network is lossy. If that happens, the client will not receive any
-      responses, so it will retransmit its DHCPREQUEST packet. Once the
-      DHCPNAK is received by Host A, it will revert to server
-      discovery and will eventually get a different address. Besides
-      allocating a new lease, the server will also remove the old one. As
-      a result, address 192.0.2.10 will become free. When Host B
-      tries to renew its temporarily assigned address, the server will detect
-      that it has a valid lease, but will note that there is a reservation for a different
-      address. The server will send DHCPNAK to inform Host B that its address
-      is no longer usable, but will keep its lease (again, the DHCPNAK may be
-      lost, so the server will keep it, until the client returns for a new
-      address). Host B will revert to the server discovery phase and will
-      eventually send a DHCPREQUEST message. This time the server will find
-      that there is a reservation for that host and that the reserved address
-      192.0.2.10 is not used, so it will be granted. It will also remove the
-      lease for the temporarily assigned address that Host B previously
-      obtained.</para>
-
-      <para>This recovery will succeed, even if other hosts attempt to get
-      the reserved address. If Host C requests the address 192.0.2.10 after
-      the reservation is made, the server will either offer a different
-      address (when responding to DHCPDISCOVER) or send DHCPNAK
-      (when responding to DHCPREQUEST).</para>
-
-      <para>The recovery mechanism allows the server to fully recover from a
-      case where reservations conflict with existing leases. This procedure
-      takes time and will roughly take as long as the value set for renew-timer.
-      The best way to avoid such recovery is not to define new reservations that
-      conflict with existing leases. Another recommendation is to use
-      out-of-pool reservations. If the reserved address does not belong to a
-      pool, there is no way that other clients can get it.
-      </para>
-
-    <note>
-     <para>The conflict-resolution mechanism does not work for global
-     reservations. As of Kea 1.5.0, it is generally recommended that you not use
-     global reservations for addresses. If you choose to use them anyway,
-     you must manually ensure that the reserved addresses are not
-     in the dynamic pools.</para>
-    </note>
-
-    </section>
-
-    <section xml:id="reservation4-hostname">
-      <title>Reserving a Hostname</title>
-      <para>When the reservation for a client includes the <command>hostname</command>,
-      the server will return this hostname to the client in
-      the Client FQDN or Hostname options. The server responds with the Client
-      FQDN option only if the client has included Client FQDN option in its
-      message to the server. The server will respond with the Hostname option
-      if the client included Hostname option in its message to the server
-      or when the client requested the Hostname option using the Parameter Request
-      List option. The server will return the Hostname option even if it is not
-      configured to perform DNS updates. The reserved hostname always takes
-      precedence over the hostname supplied by the client or the autogenerated
-      (from the IPv4 address) hostname.</para>
-
-      <para>The server qualifies the reserved hostname with the value
-      of the <command>qualifying-suffix</command> parameter. For example, the
-      following subnet configuration:
-<screen>
-    {
-        "subnet4": [ {
-            "subnet": "10.0.0.0/24",
-            "pools": [ { "pool": "10.0.0.10-10.0.0.100" } ],
-            "reservations": [
-               {
-                 "hw-address": "aa:bb:cc:dd:ee:ff",
-                 "hostname": "alice-laptop"
-               }
-            ]
-         }],
-        "dhcp-ddns": {
-            "enable-updates": true,
-            "qualifying-suffix": "example.isc.org."
-        }
-    }
-</screen>
-      will result in assigning the "alice-laptop.example.isc.org." hostname to the
-      client using the MAC address "aa:bb:cc:dd:ee:ff". If the <command>qualifying-suffix
-      </command> is not specified, the default (empty) value will be used, and
-      in this case the value specified as a <command>hostname</command> will
-      be treated as a fully qualified name. Thus, by leaving the
-      <command>qualifying-suffix</command> empty it is possible to qualify
-      hostnames for different clients with different domain names:
-<screen>
-    {
-        "subnet4": [ {
-            "subnet": "10.0.0.0/24",
-            "pools": [ { "pool": "10.0.0.10-10.0.0.100" } ],
-            "reservations": [
-               {
-                 "hw-address": "aa:bb:cc:dd:ee:ff",
-                 "hostname": "alice-laptop.isc.org."
-               },
-               {
-                 "hw-address": "12:34:56:78:99:AA",
-                 "hostname": "mark-desktop.example.org."
-               }
-
-            ]
-         }],
-        "dhcp-ddns": {
-            "enable-updates": true,
-        }
-    }
-</screen>
-
-      </para>
-    </section>
-
-    <section xml:id="reservation4-options">
-      <title>Including Specific DHCPv4 Options in Reservations</title>
-      <para>Kea offers the ability to specify options on a
-      per-host basis. These options follow the same rules as any other
-      options. These can be standard options (see <xref linkend="dhcp4-std-options"/>), custom options (see <xref linkend="dhcp4-custom-options"/>), or vendor-specific options
-      (see <xref linkend="dhcp4-vendor-opts"/>). The following
-      example demonstrates how standard options can be defined.</para>
-
-      <screen>
-{
-    "subnet4": [ {
-        "reservations": [
-        {
-            "hw-address": "aa:bb:cc:dd:ee:ff",
-            "ip-address": "192.0.2.1",
-            <userinput>"option-data": [
-            {
-                "name": "cookie-servers",
-                "data": "10.1.1.202,10.1.1.203"
-            },
-            {
-                "name": "log-servers",
-                "data": "10.1.1.200,10.1.1.201"
-            } ]</userinput>
-        } ]
-    } ]
-}</screen>
-
-    <para>Vendor-specific options can be reserved in a similar manner:</para>
-
-    <screen>
-{
-    "subnet4": [ {
-        "reservations": [
-        {
-            "hw-address": "aa:bb:cc:dd:ee:ff",
-            "ip-address": "10.0.0.7",
-            <userinput>"option-data": [
-            {
-                "name": "vivso-suboptions",
-                "data": "4491"
-            },
-            {
-                "name": "tftp-servers",
-                "space": "vendor-4491",
-                "data": "10.1.1.202,10.1.1.203"
-            } ]</userinput>
-        } ]
-    } ]
-}</screen>
-
-<para>
- Options defined at host level have the highest priority. In other words,
- if there are options defined with the same type on global, subnet, class, and
- host level, the host-specific values will be used.
-</para>
-
-    </section>
-
-    <section xml:id="reservation4-message-fields">
-      <title>Reserving Next Server, Server Hostname, and Boot File Name</title>
-      <para>BOOTP/DHCPv4 messages include "siaddr", "sname", and "file" fields.
-      Even though DHCPv4 includes corresponding options, such as option 66 and
-      option 67, some clients may not support these options. For this reason, server
-      administrators often use the "siaddr", "sname", and "file" fields instead.</para>
-
-      <para>With Kea, it is possible to make static reservations for these DHCPv4
-      message fields:</para>
-
-    <screen>
-{
-    "subnet4": [ {
-        "reservations": [
-        {
-            "hw-address": "aa:bb:cc:dd:ee:ff",
-            <userinput>"next-server": "10.1.1.2",
-            "server-hostname": "server-hostname.example.org",
-            "boot-file-name": "/tmp/bootfile.efi"</userinput>
-        } ]
-    } ]
-}</screen>
-
-    <para>Note that those parameters can be specified in combination with
-    other parameters for a reservation, e.g. a reserved IPv4 address. These
-    parameters are optional, i.e. a subset of them can be specified, or all of
-    them can be omitted.</para>
-    </section>
-
-    <section xml:id="reservation4-client-classes">
-      <title>Reserving Client Classes in DHCPv4</title>
-      <para><xref linkend="classification-using-expressions"/> explains how
-      to configure the server to assign classes to a client, based on the content
-      of the options that this client sends to the server. Host reservations
-      mechanisms also allow for the static assignment of classes to clients.
-      The definitions of these classes are placed in the Kea
-      configuration. The following configuration snippet shows how to specify
-      that a client belongs to classes <command>reserved-class1</command>
-      and <command>reserved-class2</command>. Those classes are associated with
-      specific options being sent to the clients which belong to them.
-      </para>
-
-<screen>
-{
-    "client-classes": [
-    {
-       "name": "reserved-class1",
-       "option-data": [
-       {
-           "name": "routers",
-           "data": "10.0.0.200"
-       }
-       ]
-    },
-    {
-       "name": "reserved-class2",
-       "option-data": [
-       {
-           "name": "domain-name-servers",
-           "data": "10.0.0.201"
-       }
-       ]
-    }
-    ],
-    "subnet4": [ {
-        "subnet": "10.0.0.0/24",
-        "pools": [ { "pool": "10.0.0.10-10.0.0.100" } ],
-        "reservations": [
-        {
-            "hw-address": "aa:bb:cc:dd:ee:ff",
-            <userinput>
-            "client-classes": [ "reserved-class1", "reserved-class2" ]
-            </userinput>
-        }
-        ]
-    } ]
-}
-
-</screen>
-
-    <para>Static class assignments, as shown above, can be used in conjunction
-    with classification, using expressions. The "KNOWN" or "UNKNOWN" builtin
-    class is added to the packet and any class depending on it (directly or
-    indirectly) and not only-if-required is evaluated.
-    </para>
-
-    <note>
-     <para>If you want to force the evaluation of a class expression after
-     the host reservation lookup, for instance because of a dependency on
-     "reserved-class1" from the previous example, you should add a
-     "member('KNOWN')" statement in the expression.</para>
-    </note>
-
-    </section>
-
-    <section id="reservations4-mysql-pgsql-cql">
-      <title>Storing Host Reservations in MySQL, PostgreSQL, or Cassandra</title>
-
-      <para>
-        It is possible to store host reservations in MySQL, PostgreSQL, or Cassandra. See
-        <xref linkend="hosts6-storage"/> for information on how to configure Kea to use
-        reservations stored in MySQL, PostgreSQL, or Cassandra. Kea provides a dedicated hook for
-        managing reservations in a database; section <xref linkend="host-cmds"/> provides
-        detailed information. The Kea wiki <uri
-        xmlns:xlink="http://www.w3.org/1999/xlink"
-        xlink:href="https://gitlab.isc.org/isc-projects/kea/wikis/designs/commands#23-host-reservations-hr-management">https://gitlab.isc.org/isc-projects/kea/wikis/designs/commands#23-host-reservations-hr-management</uri>
-        provides some examples of how to conduct common host reservation operations.
-      </para>
-
-      <note><simpara>In Kea, the maximum length of an option specified per-host is
-      arbitrarily set to 4096 bytes.</simpara></note>
-    </section>
-
-    <section xml:id="reservations4-tuning">
-      <title>Fine-Tuning DHCPv4 Host Reservation</title>
-
-      <para>The host reservation capability introduces additional restrictions for the
-      allocation engine (the component of Kea that selects an address for a client)
-      during lease selection and renewal. In particular, three
-      major checks are necessary. First, when selecting a new lease, it is not
-      sufficient for a candidate lease to simply not be in use by another DHCP client; it
-      also must not be reserved for another client. Second, when renewing a lease,
-      an additional check must be performed to see whether the address being renewed is
-      reserved for another client. Finally, when a host renews an address, the server
-      must check whether there is a reservation for this host, so the existing
-      (dynamically allocated) address should be revoked and the reserved one be
-      used instead.
-      </para>
-      <para>Some of those checks may be unnecessary in certain deployments and not
-      performing them may improve performance. The Kea server provides the
-      <command>reservation-mode</command> configuration parameter to select the
-      types of reservations allowed for a particular subnet. Each reservation
-      type has different constraints for the checks to be performed by the
-      server when allocating or renewing a lease for the client.
-      Allowed values are:
-
-      <itemizedlist>
-      <listitem><simpara> <command>all</command> - enables both in-pool
-      and out-of-pool host reservation types. This is the default value. This
-      setting is the safest and the most flexible. As all checks are conducted,
-      it is also the slowest. This does not check against global reservations.
-      </simpara></listitem>
-
-      <listitem><simpara> <command>out-of-pool</command> - allows only out-of-
-      pool host reservations. With this setting in place, the server may assume
-      that all host reservations are for addresses that do not belong to the
-      dynamic pool. Therefore, it can skip the reservation checks when dealing
-      with in-pool addresses, thus improving performance. Do not use this mode
-      if any of your reservations use in-pool addresses. Caution is advised when
-      using this setting; Kea does not sanity-check the reservations against
-      <command>reservation-mode</command> and misconfiguration may cause problems.
-      </simpara></listitem>
-
-      <listitem><simpara> <command>global</command> - allows only global
-      host reservations. With this setting in place, the server searches for
-      reservations for a client only among the defined global reservations.
-      If an address is specified, the server will skip the reservation checks
-      done when dealing in other modes, thus improving performance.
-      Caution is advised when using this setting; Kea does not sanity-check
-      the reservations when <command>global</command> and
-      misconfiguration may cause problems.
-      </simpara></listitem>
-
-      <listitem><simpara> <command>disabled</command> - host reservation support is disabled. As there
-      are no reservations, the server will skip all checks. Any reservations defined
-      will be completely ignored. As the checks are skipped, the server may
-      operate faster in this mode.
-      </simpara></listitem>
-
-      </itemizedlist>
-      The parameter can be specified at global, subnet, and shared-network
-      levels.
-      </para>
-
-      <para>
-        An example configuration that disables reservation looks as follows:
-<screen>
-"Dhcp4": {
-    "subnet4": [
-    {
-        "subnet": "192.0.2.0/24",
-        <userinput>"reservation-mode": "disabled"</userinput>,
-        ...
-    }
-    ]
-}
-</screen>
-
-
-      </para>
-      <para>
-        An example configuration using global reservations is shown below:
-<screen>
-"Dhcp4": {
-
-    <userinput>
-    "reservation-mode": "global",
-    "reservations": [
-       {
-        "hw-address": "01:bb:cc:dd:ee:ff",
-        "hostname": "host-one"
-       },
-       {
-        "hw-address": "02:bb:cc:dd:ee:ff",
-        "hostname": "host-two"
-       }
-    ],
-    </userinput>
-    "subnet4": [
-    {
-        "subnet": "192.0.2.0/24",
-        ...
-    }
-    ]
-}
-</screen>
-  For more details regarding global reservations, see <xref linkend="global-reservations4"/>.
-      </para>
-
-
-      <para>Another aspect of the host reservations is the different types of
-      identifiers. Kea currently supports four types of identifiers:
-      hw-address, duid, client-id, and circuit-id. This is beneficial from a
-      usability perspective; however, there is one drawback. For each incoming
-      packet, Kea has to extract each identifier type and then query the
-      database to see if there is a reservation by this particular
-      identifier. If nothing is found, the next identifier is extracted and the next
-      query is issued. This process continues until either a reservation is
-      found or all identifier types have been checked. Over time, with an increasing
-      number of supported identifier types, Kea would become slower and
-      slower.</para>
-
-      <para>To address this problem, a parameter called
-      <command>host-reservation-identifiers</command> is available. It
-      takes a list of identifier types as a parameter. Kea will check only those
-      identifier types enumerated in host-reservation-identifiers. From a
-      performance perspective, the number of identifier types should be kept to a
-      minimum, ideally one. If your deployment uses several
-      reservation types, please enumerate them from most- to least-frequently
-      used, as this increases the chances of Kea finding the reservation using the
-      fewest queries. An example of host reservation identifiers looks
-      as follows:
-
-<screen>
-<userinput>"host-reservation-identifiers": [ "circuit-id", "hw-address", "duid", "client-id" ],</userinput>
-"subnet4": [
-    {
-        "subnet": "192.0.2.0/24",
-        ...
-    }
-]</screen>
-</para>
-
-<para>
-If not specified, the default value is:
-<screen>
-<userinput>"host-reservation-identifiers": [ "hw-address", "duid", "circuit-id", "client-id" ]</userinput>
-</screen>
-<!-- see CfgHostOperations::createConfig4() in
-src/lib/dhcpsrv/cfg_host_operations.cc -->
-
-</para>
-</section>
-
-
-  <section id="global-reservations4">
-    <title>Global Reservations in DHCPv4</title>
-
-    <para>In some deployments, such as mobile, clients can roam within the
-    network and certain parameters must be specified regardless of
-    the client's current location. To facilitate such a need, a global
-    reservation mechanism has been implemented. The idea behind it is that
-    regular host reservations are tied to specific subnets, by using a specific
-    subnet-id. Kea can specify a global
-    reservation that can be used in every subnet that has global reservations
-    enabled.</para>
-
-    <para>This feature can be used to assign certain parameters, such as
-    hostname or other dedicated, host-specific options. It can also be used to
-    assign addresses. However, global reservations that assign addresses bypass
-    the whole topology determination provided by DHCP logic implemented in
-    Kea. It is very easy to misuse this feature and get a configuration that is
-    inconsistent. To give a specific example, imagine a global reservation
-    for address 192.0.2.100 and two subnets 192.0.2.0/24 and 192.0.5.0/24. If
-    global reservations are used in both subnets and a device matching global
-    host reservations visits part of the network that is serviced by
-    192.0.5.0/24, it will get an IP address 192.0.2.100, a subnet 192.0.5.0 and
-    a default router 192.0.5.1. Obviously, such a configuration is unusable, as
-    the client won't be able to reach its default gateway.</para>
-
-    <para>
-      To use global host reservations, a configuration similar to the following
-      can be used:
-
-<screen>
-"Dhcp4:" {
-    // This specifies global reservations. They will apply to all subnets that
-    // have global reservations enabled.
-    <userinput>
-    "reservations": [
-    {
-       "hw-address": "aa:bb:cc:dd:ee:ff",
-       "hostname": "hw-host-dynamic"
-    },
-    {
-       "hw-address": "01:02:03:04:05:06",
-       "hostname": "hw-host-fixed",
-
-       // Use of IP address is global reservation is risky. If used outside of
-       // matching subnet, such as 192.0.1.0/24, it will result in a broken
-       // configuration being handled to the client.
-       "ip-address": "192.0.1.77"
-    },
-    {
-       "duid": "01:02:03:04:05",
-       "hostname": "duid-host"
-    },
-    {
-       "circuit-id": "'charter950'",
-       "hostname": "circuit-id-host"
-    },
-    {
-       "client-id": "01:11:22:33:44:55:66",
-       "hostname": "client-id-host"
-    }
-    ]</userinput>,
-    "valid-lifetime": 600,
-    "subnet4": [ {
-        "subnet": "10.0.0.0/24",
-        <userinput>"reservation-mode": "global",</userinput>
-        "pools": [ { "pool": "10.0.0.10-10.0.0.100" } ]
-    } ]
-}
-</screen>
-    </para>
-
-    <para>When using database backends, the global host reservations are
-    distinguished from regular reservations by using subnet-id value of
-    zero.</para>
-  </section> <!-- end of global reservations -->
-
-  </section>
-  <!-- end of host reservations section -->
-
-
-  <!-- shared networks -->
-
-  <section id="shared-network4">
-    <title>Shared Networks in DHCPv4</title>
-
-    <para>DHCP servers use subnet information in two ways. First, it is used
-    to determine the point of attachment, or simply put, where the client is
-    connected to the network. Second, the subnet information is used to group
-    information pertaining to a specific location in the network. This approach
-    works well in general cases, but there are scenarios where the boundaries are
-    blurred. Sometimes it is useful to have more than one logical IP subnet
-    deployed on the same physical link. The need to understand
-    that two or more subnets are used on the same link requires additional logic
-    in the DHCP server. This capability is
-    called "shared networks" in Kea and ISC DHCP projects. It is sometimes also
-    called "shared subnets." In Microsoft's nomenclature it is called "multinet."
-    </para>
-
-    <para>There are many use cases where the feature is useful; this paragraph
-    explains just a handful of the most common ones. The first and by far the most
-    common use case is an existing network that has grown and is running out of
-    available address space. Rather than migrating all devices to a new, larger
-    subnet, it is easier to simply configure additional subnets on top of the
-    existing one. Sometimes, due to address space fragmentation (e.g. only many
-    disjointed /24s are available), this is the only choice. Also, configuring
-    additional subnets has the advantage of not disrupting the operation of
-    existing devices.</para>
-
-    <para>Another very frequent use case comes from cable networks. There are two types
-    of devices in cable networks: cable modems and the end-user devices behind
-    them. It is a common practice to use different subnets for cable modems to
-    prevent users from tinkering with them. In this case, the
-    distinction is based on the type of device, rather than address-space
-    exhaustion.</para>
-
-    <para>A client connected to a shared network may be assigned an address from
-    any of the pools defined within the subnets belonging to the shared
-    network. Internally, the server selects one of the subnets belonging to a
-    shared network and tries to allocate an address from this subnet. If the
-    server is unable to allocate an address from the selected subnet (e.g., due
-    to address pools exhaustion), it will use another subnet from the same shared
-    network and try to allocate an address from this subnet, etc. Therefore, in the
-    typical case, the server will allocate all addresses available in a given
-    subnet before it starts allocating addresses from other subnets belonging to
-    the same shared network. However, in certain situations the client can be
-    allocated an address from the other subnets before the address pools in the
-    first subnet get exhausted, e.g. when the client provides a hint that
-    belongs to another subnet or the client has reservations in a
-    subnet other than the default.
-    </para>
-
-    <note>
-    <para>Deployments should not assume that Kea waits until it has allocated
-    all the addresses from the first subnet in a shared network before allocating
-    addresses from other subnets.</para>
-    </note>
-
-    <para>In order to define a shared network an additional configuration scope
-    is introduced:
-<screen>
-{
-"Dhcp4": {
-    <userinput>"shared-networks": [
-        {
-            // Name of the shared network. It may be an arbitrary string
-            // and it must be unique among all shared networks.
-            "name": "my-secret-lair-level-1",
-
-            // The subnet selector can be specifed at the shared network level.
-            // Subnets from this shared network will be selected for directly
-            // connected clients sending requests to server's "eth0" interface.
-            "interface": "eth0",
-
-            // This starts a list of subnets in this shared network.
-            // There are two subnets in this example.
-            "subnet4": [
-                {
-                    "subnet": "10.0.0.0/8",
-                    "pools": [ { "pool":  "10.0.0.1 - 10.0.0.99" } ],
-                },
-                {
-                    "subnet": "192.0.2.0/24",
-                    "pools": [ { "pool":  "192.0.2.100 - 192.0.2.199" } ]
-                }
-            ],
-        } ]</userinput>, // end of shared-networks
-
-    // It is likely that in your network you will have a mix of regular,
-    // "plain" subnets and shared networks. It is perfectly valid to mix
-    // them in the same configuration file.
-    //
-    // This is regular subnet. It's not part of any shared-network.
-    "subnet4": [
-        {
-            "subnet": "192.0.3.0/24",
-            "pools": [ { "pool":  "192.0.3.1 - 192.0.3.200" } ],
-            "interface": "eth1"
-        }
-    ]
-
-} // end of Dhcp4
-}
-</screen>
-    </para>
-    <para>As you see in the example, it is possible to mix shared and regular
-    ("plain") subnets. Each shared network must have a unique name. This is
-    similar to the ID for subnets, but gives administrators more flexibility. It is used
-    for logging, but also internally for identifying shared networks.</para>
-
-    <para>In principle it makes sense to define only shared networks that
-    consist of two or more subnets. However, for testing purposes, an empty subnet
-    or a network with just a single subnet is allowed. This
-    is not a recommended practice in production networks, as the shared network
-    logic requires additional processing and thus lowers the server's performance.
-    To avoid unnecessary performance degradation, the shared subnets should only
-    be defined when required by the deployment.
-    </para>
-
-    <para>Shared networks provide an ability to specify many parameters in
-    the shared network scope that will apply to all subnets within it. If
-    necessary, you can specify a parameter in the shared network scope and then
-    override its value in the subnet scope. For example:
-<screen>
-"shared-networks": [
-    {
-        "name": "lab-network3",
-
-        "interface": "eth0",
-
-        // This applies to all subnets in this shared network, unless
-        // values are overridden on subnet scope.
-        <userinput>"valid-lifetime": 600</userinput>,
-
-        // This option is made available to all subnets in this shared
-        // network.
-        <userinput>"option-data": [ {
-            "name": "log-servers",
-            "data": "1.2.3.4"
-        } ]</userinput>,
-
-        "subnet4": [
-            {
-                "subnet": "10.0.0.0/8",
-                "pools": [ { "pool":  "10.0.0.1 - 10.0.0.99" } ],
-
-                // This particular subnet uses different values.
-                <userinput>"valid-lifetime": 1200,
-                "option-data": [
-                {
-                    "name": "log-servers",
-                    "data": "10.0.0.254"
-                },
-                {
-                    "name": "routers",
-                    "data": "10.0.0.254"
-                } ]</userinput>
-            },
-            {
-                 "subnet": "192.0.2.0/24",
-                 "pools": [ { "pool":  "192.0.2.100 - 192.0.2.199" } ],
-
-                 // This subnet does not specify its own valid-lifetime value,
-                 // so it is inherited from shared network scope.
-                 <userinput>"option-data": [
-                 {
-                     "name": "routers",
-                     "data": "192.0.2.1"
-                 } ]</userinput>
-            }
-        ]
-    } ]</screen>
-    In this example, there is a log-servers option defined that is available to
-    clients in both subnets in this shared network. Also, the valid lifetime is
-    set to 10 minutes (600s). However, the first subnet overrides some of the values
-    (valid lifetime is 20 minutes, different IP address for log-servers), but
-    also adds its own option (router address). Assuming a client asking for
-    router and log servers options is assigned a lease from this subnet, it will
-    get a lease for 20 minutes and a log-servers and routers value of 10.0.0.254.
-    If the same client is assigned to the second subnet, it will get a 10-
-    minute lease, a log-servers value of 1.2.3.4, and routers set to 192.0.2.1.
-    </para>
-
-    <section>
-      <title>Local and Relayed Traffic in Shared Networks</title>
-
-    <para>It is possible to specify an interface name in the shared network scope to
-    tell the server that this specific shared network is reachable directly (not
-    via relays) using a local network interface. It is sufficient to specify
-    it once at the shared network level. As all subnets in a shared network are
-    expected to be used on the same physical link, it is a configuration error
-    to attempt to define a shared network using subnets that are reachable over
-    different interfaces. It is possible to specify the interface parameter on each
-    subnet, although its value must be the same for each subnet. Thus it is
-    usually more convenient to specify it once at the shared network level.
-<screen>
-"shared-networks": [
-    {
-        "name": "office-floor-2",
-
-        // This tells Kea that the whole shared networks is reachable over
-        // local interface. This applies to all subnets in this network.
-        <userinput>"interface": "eth0"</userinput>,
-
-        "subnet4": [
-            {
-                "subnet": "10.0.0.0/8",
-                "pools": [ { "pool":  "10.0.0.1 - 10.0.0.99" } ],
-                <userinput>"interface": "eth0"</userinput>
-            },
-            {
-                 "subnet": "192.0.2.0/24",
-                 "pools": [ { "pool":  "192.0.2.100 - 192.0.2.199" } ]
-
-                 // Specifying a different interface name is configuration
-                 // error:
-                 // "interface": "eth1"
-            }
-        ]
-    } ]
-</screen>
-</para>
-
-<para>Somewhat similar to interface names, relay IP addresses can also be
-specified for the whole shared network. However, depending on your relay
-configuration, it may use different IP addresses depending on which subnet
-is being used. Thus there is no requirement to use the same IP relay address
-for each subnet. Here's an example:
-
-<screen>
-"shared-networks": [
-    {
-        "name": "kakapo",
-        <userinput>"relay": {
-            "ip-addresses": [ "192.3.5.6" ]
-        }</userinput>,
-        "subnet4": [
-            {
-                "subnet": "192.0.2.0/26",
-                <userinput>"relay": {
-                    "ip-addresses": [ "192.1.1.1" ]
-                }</userinput>,
-                "pools": [ { "pool": "192.0.2.63 - 192.0.2.63" } ]
-            },
-            {
-                "subnet": "10.0.0.0/24",
-                <userinput>"relay": {
-                    "ip-addresses": [ "192.2.2.2" ]
-                }</userinput>,
-                "pools": [ { "pool": "10.0.0.16 - 10.0.0.16" } ]
-            }
-        ]
-    }
-]</screen>
-In this particular case the relay IP address specified at the network level doesn't
-make much sense, as it is overridden in both subnets, but it was left there
-as an example of how one could be defined at the network level. Note that the
-relay agent IP address typically belongs to the subnet it relays packets from,
-but this is not a strict requirement. Kea accepts any value here
-as long as it is a valid IPv4 address.</para>
-
-    </section>
-    <section>
-      <title>Client Classification in Shared Networks</title>
-
-      <para>Sometimes it is desirable to segregate clients into specific subnets
-      based on certain properties. This mechanism is called client classification
-      and is described in <xref linkend="classify"/>. Client classification
-      can be applied to subnets belonging to shared networks in the same way
-      as it is used for subnets specified outside of shared networks.
-      It is important to understand how the server selects subnets for
-      clients when client classification is in use, to ensure that the
-      desired subnet is selected for a given client type.</para>
-
-      <para>If a subnet is associated with a class, only the clients
-      belonging to this class can use this subnet. If there are no
-      classes specified for a subnet, any client connected to a given shared
-      network can use this subnet. A common mistake is to assume that the
-      subnet including a client class is preferred over subnets without
-      client classes. Consider the following example:
-
-<screen>
-{
-    "client-classes": [
-        {
-            "name": "b-devices",
-            "test": "option[93].hex == 0x0002"
-        }
-    ],
-    "shared-networks": [
-        {
-            "name": "galah",
-            "interface": "eth0",
-            "subnet4": [
-                {
-                    "subnet": "192.0.2.0/26",
-                    "pools": [ { "pool": "192.0.2.1 - 192.0.2.63" } ],
-                },
-                {
-                    "subnet": "10.0.0.0/24",
-                    "pools": [ { "pool": "10.0.0.2 - 10.0.0.250" } ],
-                    <userinput>"client-class": "b-devices"</userinput>
-                }
-            ]
-        }
-    ]
-}
-</screen>
-
-        If the client belongs to the "b-devices" class (because it includes option
-        93 with a value of 0x0002), that doesn't guarantee that the subnet 10.0.0.0/24
-        will be used (or preferred) for this client. The server can use either of
-        the two subnets because the subnet 192.0.2.0/26 is also allowed for
-        this client. The client classification used in this case should be perceived
-        as a way to restrict access to certain subnets, rather than a way to express
-        subnet preference. For example, if the client doesn't belong to the
-        "b-devices" class it may only use the subnet 192.0.2.0/26 and will
-        never use the subnet 10.0.0.0/24.
-      </para>
-
-      <para>A typical use case for client classification is in a cable network,
-      where cable modems should use one subnet and other devices should use
-      another subnet within the same shared network. In this case it is necessary
-      to apply classification on all subnets. The following example defines two
-      classes of devices, and the subnet selection is made based on option 93 values.
-<screen>
-{
-    "client-classes": [
-        {
-
-            "name": "a-devices",
-            "test": "option[93].hex == 0x0001"
-        },
-        {
-            "name": "b-devices",
-            "test": "option[93].hex == 0x0002"
-        }
-    ],
-    "shared-networks": [
-        {
-            "name": "galah",
-            "interface": "eth0",
-            "subnet4": [
-                {
-                    "subnet": "192.0.2.0/26",
-                    "pools": [ { "pool": "192.0.2.1 - 192.0.2.63" } ],
-                    <userinput>"client-class": "a-devices"</userinput>
-                },
-                {
-                    "subnet": "10.0.0.0/24",
-                    "pools": [ { "pool": "10.0.0.2 - 10.0.0.250" } ],
-                    <userinput>"client-class": "b-devices"</userinput>
-                }
-            ]
-        }
-    ]
-}
-</screen>
-In this example each class has its own restriction. Only clients that belong to
-class "a-devices" will be able to use subnet 192.0.2.0/26 and only clients
-belonging to "b-devices" will be able to use subnet 10.0.0.0/24. Care should be
-taken not to define too-restrictive classification rules, as clients that are
-unable to use any subnets will be refused service. However, this may be a
-desired outcome if one wishes to provide service only to clients with known properties
-(e.g. only VoIP phones allowed on a given link).</para>
-
-    <para>
-      Note that it is possible to achieve an effect similar to the one presented in this
-      section without the use of shared networks. If the subnets are placed in
-      the global subnets scope, rather than in the shared network, the server
-      will still use classification rules to pick the right subnet for a given
-      class of devices. The major benefit of placing subnets within the
-      shared network is that common parameters for the logically grouped
-      subnets can be specified once, in the shared network scope, e.g. the
-      "interface" or "relay" parameter. All subnets belonging to this shared
-      network will inherit those parameters.
-    </para>
-    </section>
-
-    <section>
-      <title>Host Reservations in Shared Networks</title>
-
-<para>
-  Subnets that are part of a shared network allow host reservations, similar to
-  regular subnets:
-  <screen>
-{
-    "shared-networks": [
-    {
-        "name": "frog",
-        "interface": "eth0",
-        "subnet4": [
-            {
-                "subnet": "192.0.2.0/26",
-                "id": 100,
-                "pools": [ { "pool": "192.0.2.1 - 192.0.2.63" } ],
-                <userinput>"reservations": [
-                    {
-                        "hw-address": "aa:bb:cc:dd:ee:ff",
-                        "ip-address": "192.0.2.28"
-                    }
-                ]</userinput>
-            },
-            {
-                "subnet": "10.0.0.0/24",
-                "id": 101,
-                "pools": [ { "pool": "10.0.0.1 - 10.0.0.254" } ],
-                <userinput>"reservations": [
-                    {
-                        "hw-address": "11:22:33:44:55:66",
-                        "ip-address": "10.0.0.29"
-                    }
-                ]</userinput>
-            }
-        ]
-    }
-    ]
-}
-  </screen>
-</para>
-<para>It is worth noting that Kea conducts additional checks when processing a
-packet if shared networks are defined. First, instead of simply checking whether
-there's a reservation for a given client in its initially selected subnet, Kea
-looks through all subnets in a shared network for a reservation. This is
-one of the reasons why defining a shared network may impact performance. If
-there is a reservation for a client in any subnet, that particular subnet will
-be picked for the client. Although it's technically not an error, it is
-considered a bad practice to define reservations for the same host in multiple
-subnets belonging to the same shared network.</para>
-
-<para>While not strictly mandatory, it is strongly recommended to use explicit
-"id" values for subnets if you plan to use database storage for host
-reservations. If an ID is not specified, the values for it are autogenerated,
-i.e. it assigns increasing integer values starting from 1. Thus, the
-autogenerated IDs are not stable across configuration changes.</para>
-    </section>
-
-  </section>
-
-    <section xml:id="dhcp4-serverid">
-      <title>Server Identifier in DHCPv4</title>
-      <para>
-        The DHCPv4 protocol uses a "server identifier" to allow clients
-        to discriminate between several servers present on the same link; this
-        value is an IPv4 address of the server. The server chooses the IPv4 address
-        of the interface on which the message from the client (or relay) has been
-        received. A single server instance will use multiple server identifiers
-        if it is receiving queries on multiple interfaces.
-      </para>
-
-      <para>
-        It is possible to override the default server identifier values by specifying the
-        "dhcp-server-identifier" option. This option is only supported at the
-        global, shared network, and subnet levels. It must not be specified
-        on the client class and host reservation levels.
-      </para>
-
-      <para>
-        The following example demonstrates how to override the server identifier for
-        a subnet:
-<screen>
-"subnet4": [
-    {
-        "subnet": "192.0.2.0/24",
-        "option-data": [
-            {
-                "name": "dhcp-server-identifier",
-                "data": "10.2.5.76"
-            }
-        ],
-        ...
-    }
-]</screen>
-</para>
-    </section>
-
-    <section xml:id="dhcp4-subnet-selection">
-      <title>How the DHCPv4 Server Selects a Subnet for the Client</title>
-      <para>
-        The DHCPv4 server differentiates between directly connected clients,
-        clients trying to renew leases, and clients sending their messages through
-        relays. For directly connected clients, the server will check the
-        configuration for the interface on which the message has been received and,
-        if the server configuration doesn't match any configured subnet, the
-        message is discarded.</para>
-        <para>Assuming that the server's interface is configured with the
-        IPv4 address 192.0.2.3, the server will only process messages received through
-        this interface from a directly connected client if there is a subnet
-        configured to which this IPv4 address belongs, e.g. 192.0.2.0/24.
-        The server will use this subnet to assign an IPv4 address for the client.
-      </para>
-      <para>
-        The rule above does not apply when the client unicasts its message, i.e.
-        is trying to renew its lease. Such a message is accepted through any
-        interface. The renewing client sets ciaddr to the currently used IPv4
-        address, and the server uses this address to select the subnet for the client
-        (in particular, to extend the lease using this address).
-      </para>
-      <para>
-        If the message is relayed it is accepted through any interface. The giaddr
-        set by the relay agent is used to select the subnet for the client.
-      </para>
-      <para>
-        It is also possible to specify a relay IPv4 address for a given subnet. It
-        can be used to match incoming packets into a subnet in uncommon configurations,
-        e.g. shared networks. See <xref linkend="dhcp4-relay-override"/> for details.
-      </para>
-      <note>
-        <para>The subnet selection mechanism described in this section is based
-        on the assumption that client classification is not used. The classification
-        mechanism alters the way in which a subnet is selected for the client,
-        depending on the classes to which the client belongs.</para>
-      </note>
-
-    <section xml:id="dhcp4-relay-override">
-      <title>Using a Specific Relay Agent for a Subnet</title>
-      <para>
-        A relay must have an interface connected to the link on which
-        the clients are being configured. Typically the relay has an IPv4
-        address configured on that interface, which belongs to the subnet from which
-        the server will assign addresses. Normally, the
-        server is able to use the IPv4 address inserted by the relay (in the giaddr
-        field of the DHCPv4 packet) to select the appropriate subnet.
-      </para>
-      <para>
-        However, that is not always the case. In certain uncommon â€”
-        but valid â€” deployments, the relay address may not match the subnet. This
-        usually means that there is more than one subnet allocated for a given
-        link. The two most common examples where this is the case are long-lasting
-        network renumbering (where both old and new address space is still being
-        used) and a cable network. In a cable network, both cable modems and the
-        devices behind them are physically connected to the same link, yet
-        they use distinct addressing. In such a case, the DHCPv4 server needs
-        additional information (the IPv4 address of the relay) to properly select
-        an appropriate subnet.
-      </para>
-      <para>
-        The following example assumes that there is a subnet 192.0.2.0/24
-        that is accessible via a relay that uses 10.0.0.1 as its IPv4 address.
-        The server is able to select this subnet for any incoming packets
-        that come from a relay that has an address in the 192.0.2.0/24 subnet.
-        It also selects that subnet for a relay with address 10.0.0.1.
-<screen>
-"Dhcp4": {
-    "subnet4": [
-        {
-            "subnet": "192.0.2.0/24",
-            "pools": [ { "pool": "192.0.2.10 - 192.0.2.20" } ],
-            <userinput>"relay": {
-                "ip-addresses": [ "10.0.0.1" ]
-            }</userinput>,
-            ...
-        }
-    ],
-    ...
-}
-</screen>
-      </para>
-
-      <para>If "relay" is specified, the "ip-addresses" parameter within
-      it is mandatory.</para>
-
-      <note>
-      <para>
-      The current version of Kea uses the
-      "ip-addresses" parameter, which supports specifying a list of addresses.
-      </para>
-      </note>
-
-    </section>
-
-      <section xml:id="dhcp4-srv-example-client-class-relay">
-        <title>Segregating IPv4 Clients in a Cable Network</title>
-        <para>
-          In certain cases, it is useful to mix relay address information,
-          introduced in <xref linkend="dhcp4-relay-override"/>, with client
-          classification, explained in <xref linkend="classify"/>.
-          One specific example is in a cable network, where typically modems
-          get addresses from a different subnet than all the devices connected
-          behind them.
-        </para>
-        <para>
-          Let us assume that there is one CMTS (Cable Modem Termination System)
-          with one CM MAC (a physical link that modems are connected to).
-          We want the modems to get addresses from the 10.1.1.0/24 subnet, while
-          everything connected behind the modems should get addresses from another
-          subnet (192.0.2.0/24). The CMTS that acts as a relay uses address
-          10.1.1.1. The following configuration can serve that configuration:
-<screen>
-"Dhcp4": {
-    "subnet4": [
-        {
-            "subnet": "10.1.1.0/24",
-            "pools":  [ { "pool": "10.1.1.2 - 10.1.1.20" } ],
-            <userinput>"client-class" "docsis3.0",
-            "relay": {
-                "ip-addresses": [ "10.1.1.1 ]"
-            }</userinput>
-        },
-        {
-            "subnet": "192.0.2.0/24",
-            "pools": [ { "pool": "192.0.2.10 - 192.0.2.20" } ],
-            <userinput>"relay": {
-                "ip-addresses": [ "10.1.1.1" ]
-            }</userinput>
-        }
-    ],
-    ...
-}
-</screen>
-      </para>
-      </section>
-
-    </section>
-
-    <section xml:id="dhcp4-decline">
-      <title>Duplicate Addresses (DHCPDECLINE Support)</title>
-
-      <para>The DHCPv4 server is configured with a certain pool of addresses
-      that it is expected to hand out to DHCPv4 clients. It is
-      assumed that the server is authoritative and has complete jurisdiction
-      over those addresses. However, for various reasons, such as
-      misconfiguration or a faulty client implementation that retains its
-      address beyond the valid lifetime, there may be devices connected that use
-      those addresses without the server's approval or knowledge.</para>
-
-      <para>Such an
-      unwelcome event can be detected by legitimate clients (using ARP or ICMP
-      Echo Request mechanisms) and reported to the DHCPv4 server using a DHCPDECLINE
-      message. The server will do a sanity check (to see whether the client declining an
-      address really was supposed to use it), and then will conduct a clean-up
-      operation. Any DNS entries related to that address will be removed, the
-      fact will be logged, and hooks will be triggered. After that is complete, the
-      address will be marked as declined (which indicates that it is used by an
-      unknown entity and thus not available for assignment) and a
-      probation time will be set on it. Unless otherwise configured, the
-      probation period lasts 24 hours; after that period, the server will
-      recover the lease (i.e. put it back into the available state) and the address will
-      be available for assignment again. It should be noted that if the
-      underlying issue of a misconfigured device is not resolved, the duplicate-
-      address scenario will repeat. If reconfigured correctly, this mechanism provides an
-      opportunity to recover from such an event automatically, without any
-      sysadmin intervention.</para>
-
-      <para>To configure the decline probation period to a value other
-      than the default, the following syntax can be used:
-<screen>
-  "Dhcp4": {
-    <userinput>"decline-probation-period": 3600</userinput>,
-    "subnet4": [ ... ],
-    ...
-}
-</screen>
-      The parameter is expressed in seconds, so the example above will instruct
-      the server to recycle declined leases after one hour.</para>
-
-      <para>There are several statistics and hook points associated with the
-      Decline handling procedure. The lease4_decline hook is triggered after the
-      incoming DHCPDECLINE message has been sanitized and the server is about to
-      decline the lease. The declined-addresses statistic is increased after the
-      hook returns (both global and subnet-specific variants). (See
-      <xref linkend="dhcp4-stats"/> and <xref linkend="hooks-libraries"/> for more details
-      on DHCPv4 statistics and Kea hook points.)</para>
-
-      <para>Once the probation time elapses, the declined lease is recovered
-      using the standard expired-lease reclamation procedure, with several
-      additional steps. In particular, both declined-addresses statistics
-      (global and subnet-specific) are decreased. At the same time,
-      reclaimed-declined-addresses statistics (again in two variants, global and
-      subnet-specific) are increased.</para>
-
-      <para>A note about statistics: The server does not decrease the
-      assigned-addresses statistics when a DHCPDECLINE is received and processed
-      successfully. While technically a declined address is no longer assigned,
-      the primary usage of the assigned-addresses statistic is to monitor pool
-      utilization. Most people would forget to include declined-addresses in the
-      calculation, and simply use assigned-addresses/total-addresses. This would
-      cause a bias towards under-representing pool utilization. As this has a
-      potential for major issues, we decided not to decrease assigned-addresses
-      immediately after receiving DHCPDECLINE, but to do it later when Kea
-      recovers the address back to the available pool.</para>
-
-    </section>
-
-    <section xml:id="dhcp4-stats">
-      <title>Statistics in the DHCPv4 Server</title>
-      <note>
-        <para>This section describes DHCPv4-specific statistics. For a general
-        overview and usage of statistics, see <xref linkend="stats"/>.</para>
-      </note>
-
-      <para>
-        The DHCPv4 server supports the following statistics:
-      </para>
-        <table frame="all" xml:id="dhcp4-statistics">
-          <title>DHCPv4 Statistics</title>
-          <tgroup cols="3">
-          <colspec colname="statistic" align="center"/>
-          <colspec colname="type" align="center"/>
-          <colspec colname="description" align="left"/>
-          <thead>
-            <row>
-              <entry>Statistic</entry>
-              <entry>Data Type</entry>
-              <entry>Description</entry>
-            </row>
-          </thead>
-          <tbody>
-
-            <row>
-            <entry>pkt4-received</entry>
-            <entry>integer</entry>
-            <entry>
-            Number of DHCPv4 packets received. This includes all packets: valid,
-            bogus, corrupted, rejected, etc. This statistic is expected to grow
-            rapidly.
-            </entry>
-            </row>
-
-            <row>
-            <entry>pkt4-discover-received</entry>
-            <entry>integer</entry>
-            <entry>
-            Number of DHCPDISCOVER packets received. This statistic is expected to grow; its
-            increase means that clients that just booted started their configuration process
-            and their initial packets reached your Kea server.
-            </entry>
-            </row>
-
-            <row>
-            <entry>pkt4-offer-received</entry>
-            <entry>integer</entry>
-            <entry>
-            Number of DHCPOFFER packets received. This statistic
-            is expected to remain zero at all times, as DHCPOFFER packets are sent
-            by the server and the server is never expected to receive them. A non-zero
-            value indicates an error. One likely cause would be a misbehaving relay
-            agent that incorrectly forwards DHCPOFFER messages towards the server,
-            rather than back to the clients.
-            </entry>
-            </row>
-
-            <row>
-            <entry>pkt4-request-received</entry>
-            <entry>integer</entry>
-            <entry>
-            Number of DHCPREQUEST packets received. This statistic
-            is expected to grow. Its increase means that clients that just booted
-            received the server's response (DHCPOFFER) and accepted it, and are now requesting
-            an address (DHCPREQUEST).
-            </entry>
-            </row>
-
-            <row>
-            <entry>pkt4-ack-received</entry>
-            <entry>integer</entry>
-            <entry>
-            Number of DHCPACK packets received. This statistic
-            is expected to remain zero at all times, as DHCPACK packets are sent
-            by the server and the server is never expected to receive them. A non-zero
-            value indicates an error. One likely cause would be a misbehaving relay
-            agent that incorrectly forwards DHCPACK messages towards the server,
-            rather than back to the clients.
-            </entry>
-            </row>
-
-            <row>
-            <entry>pkt4-nak-received</entry>
-            <entry>integer</entry>
-            <entry>
-            Number of DHCPNAK packets received. This statistic
-            is expected to remain zero at all times, as DHCPNAK packets are sent
-            by the server and the server is never expected to receive them. A non-zero
-            value indicates an error. One likely cause would be a misbehaving relay
-            agent that incorrectly forwards DHCPNAK messages towards the server,
-            rather than back to the clients.
-            </entry>
-            </row>
-
-            <row>
-            <entry>pkt4-release-received</entry>
-            <entry>integer</entry>
-            <entry>
-            Number of DHCPRELEASE packets received. This statistic
-            is expected to grow. Its increase means that clients that had an address
-            are shutting down or ceasing to use their addresses.
-            </entry>
-            </row>
-
-            <row>
-            <entry>pkt4-decline-received</entry>
-            <entry>integer</entry>
-            <entry>
-            Number of DHCPDECLINE packets received. This statistic
-            is expected to remain close to zero. Its increase means that a client
-            leased an address, but discovered that the address is currently
-            used by an unknown device in your network.
-            </entry>
-            </row>
-
-            <row>
-            <entry>pkt4-inform-received</entry>
-            <entry>integer</entry>
-            <entry>
-            Number of DHCPINFORM packets received. This statistic
-            is expected to grow. Its increase means that there are clients that
-            either do not need an address or already have an address and are
-            interested only in getting additional configuration parameters.
-            </entry>
-            </row>
-
-            <row>
-            <entry>pkt4-unknown-received</entry>
-            <entry>integer</entry>
-            <entry>
-            Number of packets received of an unknown type. A non-zero
-            value of this statistic indicates that the server received a packet
-            that it wasn't able to recognize, either with an unsupported type
-            or possibly malformed (without message type option).
-            </entry>
-            </row>
-
-            <row>
-            <entry>pkt4-sent</entry>
-            <entry>integer</entry>
-            <entry>
-            Number of DHCPv4 packets sent. This statistic is expected to grow
-            every time the server transmits a packet. In general, it should
-            roughly match pkt4-received, as most incoming packets cause the
-            server to respond. There are exceptions (e.g. DHCPRELEASE), so
-            do not worry if it is less than pkt4-received.
-            </entry>
-            </row>
-
-            <row>
-            <entry>pkt4-offer-sent</entry>
-            <entry>integer</entry>
-            <entry>
-            Number of DHCPOFFER packets sent. This statistic is expected to
-            grow in most cases after a DHCPDISCOVER is processed. There are
-            certain uncommon, but valid, cases where incoming DHCPDISCOVER packets are
-            dropped, but in general this statistic is expected to be close to
-            pkt4-discover-received.
-            </entry>
-            </row>
-
-            <row>
-            <entry>pkt4-ack-sent</entry>
-            <entry>integer</entry>
-            <entry>
-            Number of DHCPACK packets sent. This statistic is expected to
-            grow in most cases after a DHCPREQUEST is processed. There are
-            certain cases where DHCPNAK is sent instead. In general, the sum of
-            pkt4-ack-sent and pkt4-nak-sent should be close to
-            pkt4-request-received.
-            </entry>
-            </row>
-
-            <row>
-            <entry>pkt4-nak-sent</entry>
-            <entry>integer</entry>
-            <entry>
-            Number of DHCPNAK packets sent. This statistic is expected
-            to grow when the server chooses not to honor the address
-            requested by a client. In general, the sum of
-            pkt4-ack-sent and pkt4-nak-sent should be close to
-            pkt4-request-received.
-            </entry>
-            </row>
-
-            <row>
-            <entry>pkt4-parse-failed</entry>
-            <entry>integer</entry>
-            <entry>
-            Number of incoming packets that could not be parsed. A non-zero value of
-            this statistic indicates that the server received a malformed or truncated packet.
-            This may indicate problems in your network, faulty clients, or a bug in the server.
-            </entry>
-            </row>
-
-            <row>
-            <entry>pkt4-receive-drop</entry>
-            <entry>integer</entry>
-            <entry>
-            Number of incoming packets that were dropped. The
-            exact reason for dropping packets is logged, but the most common
-            reasons may be: an unacceptable packet type, direct responses are
-            forbidden, or the server-id sent by the client does not match
-            the server's server-id.
-            </entry>
-            </row>
-
-            <row>
-              <entry>subnet[id].total-addresses</entry>
-              <entry>integer</entry>
-              <entry>Total number of addresses available for DHCPv4
-              management; in other words, this is the sum of all addresses in
-              all configured pools. This statistic changes only during
-              configuration changes. Note it does not take into account any
-              addresses that may be reserved due to host reservation. The
-              <emphasis>id</emphasis> is the subnet-id of a given subnet. This
-              statistic is exposed for each subnet separately, and is
-              reset during a reconfiguration event.</entry>
-            </row>
-            <row>
-              <entry>subnet[id].assigned-addresses</entry>
-              <entry>integer</entry>
-              <entry>Number of assigned addresses in a
-              given subnet. It increases every time a new lease is
-              allocated (as a result of receiving a DHCPREQUEST message) and is
-              decreased every time a lease is released (a DHCPRELEASE message is
-              received) or expires. The <emphasis>id</emphasis> is the subnet-id
-              of the subnet. This statistic is exposed for each subnet
-              separately, and is reset during a reconfiguration event.
-              </entry>
-            </row>
-            <row>
-              <entry>reclaimed-leases</entry>
-              <entry>integer</entry>
-              <entry>Number of expired leases that have
-              been reclaimed since server startup. It is incremented each time
-              an expired lease is reclaimed and is reset when the server is
-              reconfigured.
-              </entry>
-            </row>
-            <row>
-              <entry>subnet[id].reclaimed-leases</entry>
-              <entry>integer</entry>
-              <entry>Number of expired leases associated
-              with a given subnet (<emphasis>id</emphasis> is the subnet-id)
-              that have been reclaimed since server startup. It is incremented
-              each time an expired lease is reclaimed and is reset when the
-              server is reconfigured.
-              </entry>
-            </row>
-            <row>
-            <entry>declined-addresses</entry>
-            <entry>integer</entry>
-            <entry>
-              Number of IPv4 addresses that are
-              currently declined; a count of the number of leases
-              currently unavailable. Once a lease is recovered, this
-              statistic will be decreased; ideally, this statistic should be
-              zero. If this statistic is non-zero or increasing,
-              a network administrator should investigate whether there is
-              a misbehaving device in the network. This is a global statistic
-              that covers all subnets.
-            </entry>
-            </row>
-
-            <row>
-            <entry>subnet[id].declined-addresses</entry>
-            <entry>integer</entry>
-            <entry>
-              Number of IPv4 addresses that are
-              currently declined in a given subnet; a count of the
-              number of leases currently unavailable. Once a lease is
-              recovered, this statistic will be decreased; ideally, this
-              statistic should be zero. If this statistic is
-              non-zero or increasing, a network administrator should
-              investigate whether there is a misbehaving device in the network. The
-              <emphasis>id</emphasis> is the subnet-id of a given subnet. This
-              statistic is exposed for each subnet separately.
-            </entry>
-            </row>
-
-            <row>
-            <entry>reclaimed-declined-addresses</entry>
-            <entry>integer</entry>
-            <entry>
-              Number of IPv4 addresses that were
-              declined, but have now been recovered. Unlike
-              declined-addresses, this statistic never decreases. It can be used
-              as a long-term indicator of how many actual valid Declines were
-              processed and recovered from. This is a global statistic that
-              covers all subnets.
-            </entry>
-            </row>
-
-            <row>
-            <entry>subnet[id].reclaimed-declined-addresses</entry>
-            <entry>integer</entry>
-            <entry>
-              Number of IPv4 addresses that were
-              declined, but have now been recovered. Unlike
-              declined-addresses, this statistic never decreases. It can be used
-              as a long-term indicator of how many actual valid Declines were
-              processed and recovered from. The
-              <emphasis>id</emphasis> is the subnet-id of a given subnet. This
-              statistic is exposed for each subnet separately.
-            </entry>
-            </row>
-
-        </tbody>
-        </tgroup>
-        </table>
-    </section>
-
-    <section xml:id="dhcp4-ctrl-channel">
-      <title>Management API for the DHCPv4 Server</title>
-      <para>
-        The management API allows the issuing of specific
-        management commands, such as statistics retrieval, reconfiguration, or shutdown.
-        For more details, see <xref linkend="ctrl-channel"/>. Currently, the only
-        supported communication channel type is UNIX stream socket. By default there
-        are no sockets open; to instruct Kea to open a socket, the following entry
-        in the configuration file can be used:
-<screen>
-"Dhcp4": {
-    "control-socket": {
-        "socket-type": "unix",
-        "socket-name": <userinput>"/path/to/the/unix/socket"</userinput>
-    },
-
-    "subnet4": [
-        ...
-    ],
-    ...
-}
-</screen>
-      </para>
-
-      <para>
-        The length of the path specified by the <command>socket-name</command>
-        parameter is restricted by the maximum length for the UNIX socket name
-        on your operating system, i.e. the size of the <command>sun_path</command>
-        field in the <command>sockaddr_un</command> structure, decreased by 1.
-        This value varies on different operating systems between 91 and 107
-        characters. Typical values are 107 on Linux and 103 on FreeBSD.
-      </para>
-
-      <para>
-        Communication over the control channel is conducted using JSON structures.
-        See the <uri
-        xmlns:xlink="http://www.w3.org/1999/xlink"
-        xlink:href="https://jenkins.isc.org/job/Kea_doc/doxygen/d2/d96/ctrlSocket.html">Control Channel section in the Kea Developer's Guide</uri> for more
-        details.
-      </para>
-
-      <para>The DHCPv4 server supports the following operational commands:
-        <itemizedlist>
-            <listitem>build-report</listitem>
-            <listitem>config-get</listitem>
-            <listitem>config-reload</listitem>
-            <listitem>config-set</listitem>
-            <listitem>config-test</listitem>
-            <listitem>config-write</listitem>
-            <listitem>dhcp-disable</listitem>
-            <listitem>dhcp-enable</listitem>
-            <listitem>leases-reclaim</listitem>
-            <listitem>list-commands</listitem>
-            <listitem>server-tag-get</listitem>
-            <listitem>shutdown</listitem>
-            <listitem>version-get</listitem>
-        </itemizedlist>
-         as described in <xref linkend="commands-common"/>. In addition,
-         it supports the following statistics-related commands:
-        <itemizedlist>
-            <listitem>statistic-get</listitem>
-            <listitem>statistic-reset</listitem>
-            <listitem>statistic-remove</listitem>
-            <listitem>statistic-get-all</listitem>
-            <listitem>statistic-reset-all</listitem>
-            <listitem>statistic-remove-all</listitem>
-        </itemizedlist>
-        as described in <xref linkend="command-stats"/>.
-      </para>
-
-    </section>
-
-      <section id="dhcp4-user-contexts">
-        <title>User Contexts in IPv4</title>
-        <para>
-          Kea allows loading hook libraries that sometimes could benefit from
-          additional parameters. If such a parameter is specific to the whole
-          library, it is typically defined as a parameter for the hook library.
-          However, sometimes there is a need to specify parameters that are
-          different for each pool.
-        </para>
-
-        <para>
-          User contexts can store arbitrary data as long as it has valid JSON
-          syntax and its top level element is a map (i.e. the data must be
-          enclosed in curly brackets). However, some hook libraries may expect specific
-          formatting; please consult the specific hook library
-          documentation for details.
-        </para>
-
-        <para>
-          User contexts can be specified at global scope,
-          shared network, subnet, pool, client class, option data, or
-          definition level, and via host reservation. One other useful
-          usage is the ability to store comments or descriptions.
-        </para>
-
-        <para>
-          Let's consider an imaginary case of devices that have color LED
-          lights. Depending on their location, they should glow red, blue, or
-          green. It would be easy to write a hook library that would send
-          specific values as maybe a vendor option. However, the server has to
-          have some way to specify that value for each pool. This need is
-          addressed by user contexts. In essence, any user data can be specified
-          in the user context as long as it is a valid JSON map. For example,
-          the forementioned case of LED devices could be configured in the
-          following way:
-
-          <screen>
-"Dhcp4": {
-    "subnet4": [
-        {
-            "subnet": "192.0.2.0/24",
-            "pools": [ {
-                "pool": "192.0.2.10 - 192.0.2.20",
-                // This is pool specific user context
-                <userinput>"user-context": { "color": "red" }</userinput>
-            } ],
-
-            // This is a subnet specific user context. You can put whatever type
-            // of information you want as long as it is a valid JSON.
-            <userinput>"user-context": {
-                "comment": "network on the second floor",
-                "last-modified": "2017-09-04 13:32",
-                "description": "you can put here anything you like",
-                "phones": [ "x1234", "x2345" ],
-                "devices-registered": 42,
-                "billing": false
-            }</userinput>
-        },
-        ...
-    ],
-    ...
-}</screen>
-        </para>
-
-        <para>
-          Kea does not use that information; it
-          simply stores it and makes it available to the hook libraries. It is up to each
-          hook library to extract that information and use it.
-          The parser translates a "comment" entry into a user context
-          with the entry, which allows a comment to be attached inside the
-          configuration itself.
-        </para>
-        <para>
-          For more background information, see <xref linkend="user-context"/>.
-        </para>
-    </section>
-
-    <section xml:id="dhcp4-std">
-      <title>Supported DHCP Standards</title>
-      <para>The following standards are currently supported:</para>
-      <itemizedlist>
-          <listitem>
-            <simpara><emphasis>Dynamic Host Configuration Protocol</emphasis>,
-            <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc2131">RFC 2131</link>:
-            Supported messages are DHCPDISCOVER (1), DHCPOFFER (2),
-            DHCPREQUEST (3), DHCPRELEASE (7), DHCPINFORM (8), DHCPACK (5), and
-            DHCPNAK(6).</simpara>
-          </listitem>
-          <listitem>
-            <simpara><emphasis>DHCP Options and BOOTP Vendor Extensions</emphasis>,
-            <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc2132">RFC 2132</link>:
-            Supported options are: PAD (0),
-            END(255), Message Type(53), DHCP Server Identifier (54),
-            Domain Name (15), DNS Servers (6), IP Address Lease Time
-            (51), Subnet mask (1), and Routers (3).</simpara>
-          </listitem>
-          <listitem>
-            <simpara><emphasis>DHCP Relay Agent Information Option</emphasis>,
-            <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc3046">RFC 3046</link>:
-            Relay Agent Information option is supported.</simpara>
-          </listitem>
-          <listitem>
-            <simpara><emphasis>Vendor-Identifying Vendor Options for
-            Dynamic Host Configuration Protocol version 4</emphasis>,
-            <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc3925">RFC 3925</link>:
-            Vendor-Identifying Vendor Class and Vendor-Identifying Vendor-Specific
-            Information options are supported.</simpara>
-          </listitem>
-          <listitem>
-            <simpara><emphasis>Client Identifier Option in DHCP Server Replies</emphasis>,
-            <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc6842">RFC 6842</link>:
-            Server by default sends back client-id option. That capability may be
-            disabled. See <xref linkend="dhcp4-echo-client-id"/> for details.
-            </simpara>
-          </listitem>
-      </itemizedlist>
-    </section>
-
-    <section xml:id="dhcp4-limit">
-      <title>DHCPv4 Server Limitations</title>
-      <para>These are the current limitations of the DHCPv4 server
-      software. Most of them are reflections of the current stage of
-      development and should be treated as <quote>not implemented
-      yet</quote>, rather than actual limitations. However, some of them
-      are implications of the design choices made. Those are clearly
-      marked as such.</para>
-      <itemizedlist>
-          <listitem>
-            <simpara>
-              BOOTP (<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc951">RFC 951</link>)
-              is not supported. This is a design choice: BOOTP support is not planned.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>On Linux and BSD system families the DHCP messages are sent
-            and received over the raw sockets (using LPF and BPF) and all packet
-            headers (including data link layer, IP, and UDP headers) are created and
-            parsed by Kea, rather than by the system kernel. Currently, Kea can
-            only parse the data link layer headers with a format adhering to the
-            IEEE 802.3 standard and assumes this data link layer header format
-            for all interfaces. Hence, Kea will fail to work on interfaces
-            which use different data link layer header formats (e.g. Infiniband).
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>The DHCPv4 server does not verify that an
-            assigned address is unused. According to <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc2131">RFC 2131</link>, the
-            allocating server should verify that an address is not used by
-            sending an ICMP echo request.</simpara>
-          </listitem>
-      </itemizedlist>
-    </section>
-
-    <section id="dhcp4-srv-examples">
-      <title>Kea DHCPv4 Server Examples</title>
-
-      <para>
-        A collection of simple-to-use examples for the DHCPv4 component of Kea is
-        available with the source files, located in the doc/examples/kea4
-        directory.
-      </para>
-
-    </section>
-
-    <section id="dhcp4-cb">
-      <title>Configuration Backend in DHCPv4</title>
-      <para>
-        In the <xref linkend="config-backend"/> we have described the
-        Configuration Backend feature, its applicability and limitations. This
-        section focuses on the usage of the CB with the DHCPv4 server. It lists
-        the supported parameters, describes limitations and gives examples of the
-        DHCPv4 server configuration to take advantage of the CB. Please also refer
-        to the sibling section <xref linkend="dhcp6-cb"/> for the
-        DHCPv6 specific usage of the CB.
-      </para>
-
-      <section id="dhcp4-cb-parameters">
-        <title>Supported Parameters</title>
-        <para>The ultimate goal for the CB is to serve as a central configuration
-        repository for one or multiple Kea servers connected to the database.
-        In the future it will be possible to store the most of the server's configuration
-        in the database and reduce the configuration file to bare minimum, i.e.
-        the only mandatory parameter will be the <command>config-control</command>
-        which includes the necessary information to connect to the database. In
-        the Kea 1.6.0 release, however, only the subset of the DHCPv4 server
-        parameters can be stored in the database. All other parameters must be
-        specified in the JSON configuration file, if required.</para>
-
-        <para>The following table lists DHCPv4 specific parameters supported by
-        the Configuration Backend with an indication on which level of the
-        hierarchy it is currently supported. The "n/a" is used in cases
-        when the particular parameter is not applicable on the particular
-        level of the hierarchy or in cases when the parameter is not supported
-        by the server on this level of hierarchy. The "no" is used when
-        the parameter is supported by the server on the particular level of
-        hierarchy but is not configurable via the Configuration Backend.
-        </para>
-
-        <para>All supported parameters can be configured via <command>cb_cmds</command>
-        hooks library described in the <xref linkend="cb-cmds-library"/>. The
-        general rule is that the scalar global parameters are set using the
-        <command>remote-global-parameter4-set</command>. The shared network
-        specific parameters are set using the <command>remote-network4-set</command>.
-        Finally, the subnet and pool level parameters are set using the
-        <command>remote-subnet4-set</command>. Whenever there is an exception from
-        this general rule, it is highlighted in the table. The non-scalar global
-        parameters have dedicated commands, e.g. modifying the global DHCPv4 options
-        (<command>option-data</command>) is performed using the
-        <command>remote-option4-global-set</command>.</para>
-
-        <para>The <xref linkend="cb-sharing"/> explains the concept of shareable
-        and non-shareable configuration elements and the limitations for
-        sharing them between multiple servers. In the DHCP configuration (both DHCPv4
-        and DHCPv6) the shareable configuration elements are: subnets and shared
-        networks. Thus, they can be explicitly associated with multiple server tags.
-        The global parameters, option definitions and global options are non-shareable
-        and they can be associated with only one server tag. This rule does not apply
-        to the configuration elements associated with "all" servers. Any configuration
-        element associated with "all" servers (using "all" keyword as a server tag) is
-        used by all servers connecting to the configuration database.</para>
-
-        <para>
-          <table frame="all" xml:id="dhcp4-cb-parameters">
-            <title>List of DHCPv4 Parameters Supported by the Configuration Backend</title>
-            <tgroup cols="5">
-              <colspec colname="parameter"/>
-              <colspec colname="global" align="center"/>
-              <colspec colname="shared network" align="center"/>
-              <colspec colname="subnet" align="center"/>
-              <colspec colname="pool" align="center"/>
-              <thead>
-                <row>
-                  <entry>Parameter</entry>
-                  <entry>Global</entry>
-                  <entry>Shared Network</entry>
-                  <entry>Subnet</entry>
-                  <entry>Pool</entry>
-                </row>
-              </thead>
-              <tbody>
-                <row><entry>4o6-interface</entry><entry>n/a</entry><entry>n/a</entry><entry>yes</entry><entry>n/a</entry></row>
-                <row><entry>4o6-interface-id</entry><entry>n/a</entry><entry>n/a</entry><entry>yes</entry><entry>n/a</entry></row>
-                <row><entry>4o6-subnet</entry><entry>n/a</entry><entry>n/a</entry><entry>yes</entry><entry>n/a</entry></row>
-                <row><entry>boot-file-name</entry><entry>yes</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry></row>
-                <row><entry>calculate-tee-times</entry><entry>yes</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry></row>
-                <row><entry>client-class</entry><entry>n/a</entry><entry>yes</entry><entry>yes</entry><entry>no</entry></row>
-                <row><entry>decline-probation-period</entry><entry>yes</entry><entry>n/a</entry><entry>n/a</entry><entry>n/a</entry></row>
-                <row><entry>dhcp4o6-port</entry><entry>yes</entry><entry>n/a</entry><entry>n/a</entry><entry>n/a</entry></row>
-                <row><entry>echo-client-id</entry><entry>yes</entry><entry>n/a</entry><entry>n/a</entry><entry>n/a</entry></row>
-                <row><entry>interface</entry><entry>n/a</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry></row>
-                <row><entry>match-client-id</entry><entry>yes</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry></row>
-                <row><entry>next-server</entry><entry>yes</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry></row>
-                <row><entry>option-data</entry><entry>yes (via remote-option4-global-set)</entry><entry>yes</entry><entry>yes</entry><entry>yes</entry></row>
-                <row><entry>option-def</entry><entry>yes (via remote-option-def4-set)</entry><entry>n/a</entry><entry>n/a</entry><entry>n/a</entry></row>
-                <row><entry>rebind-timer</entry><entry>yes</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry></row>
-                <row><entry>renew-timer</entry><entry>yes</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry></row>
-                <row><entry>server-hostname</entry><entry>yes</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry></row>
-                <row><entry>valid-lifetime</entry><entry>yes</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry></row>
-                <row><entry>relay</entry><entry>n/a</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry></row>
-                <row><entry>require-client-classes</entry><entry>no</entry><entry>yes</entry><entry>yes</entry><entry>no</entry></row>
-                <row><entry>reservation-mode</entry><entry>yes</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry></row>
-                <row><entry>t1-percent</entry><entry>yes</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry></row>
-                <row><entry>t2-percent</entry><entry>yes</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry></row>
-              </tbody>
-            </tgroup>
-          </table>
-        </para>
-      </section>
-
-      <section id="dhcp4-cb-json">
-      <title>Enabling Configuration Backend</title>
-      <para>
-        Consider the following configuration snippet:
-<screen>
-{
-    "Dhcp4": {
-        "config-control": {
-            "config-databases": [
-                {
-                    "type": "mysql",
-                    "name": "kea",
-                    "user": "kea",
-                    "password": "kea",
-                    "host": "192.0.2.1",
-                    "port": 3302
-                }
-            ],
-            "config-fetch-wait-time": 20
-        },
-        "hooks-libraries": [
-            {
-                "library": "/usr/local/lib/kea/hooks/libdhcp_mysql_cb.so"
-            },
-            {
-                "library": "/usr/local/lib/kea/hooks/libdhcp_cb_cmds.so"
-            }
-        ],
-        ...
-    }
-}
-</screen>
-      </para>
-      <para>
-        The <command>config-control</command> contains two parameters. The
-        <command>config-databases</command> is a list which contains one
-        element comprising database type, location and the credentials to
-        be used to connect to this database. Note that the parameters specified
-        here correspond to the database specification for the lease database
-        backend and hosts database backend. Currently only one database connection
-        can be specified on the <command>config-databases</command> list. The server
-        will connect to this database during the startup or reconfiguration, and
-        will fetch the configuration available for this server from the database.
-        This configuration is merged into the configuration read from the
-        configuration file.</para>
-
-        <note>
-          <para>Whenever there is a conflict between the parameters specified
-          in the configuration file and the database, the parameters from the
-          database take precedence. We strongly recommend to avoid
-          duplicating parameters in the file and the database but this recommendation
-          is not enforced by the Kea servers. In particular, if the subnets'
-          configuration is sourced from the database, we recommend that all
-          subnets are specified in the database and no subnets are specified
-          in the configuration file. It is possible to specify the
-          subnets in both places, but that must be done with care. The subnets in
-          the configuration file with overlapping ids and/or prefixes with the
-          subnets from the database will be superseded by those from the database.
-          </para>
-        </note>
-
-        <para>
-          Once the Kea server is configured, it starts periodically polling for
-          the configuration changes in the database. The frequency of polling
-          is controlled by the <command>config-fetch-wait-time</command> parameter.
-          It is expressed in seconds and it is the period between the
-          time when the server completed last polling (and possibly the local
-          configuration update) and the time when it begins polling again. In
-          the example above, this period is set to 20 seconds. This means that
-          after adding a new configuration into the database (e.g. added new
-          subnet), it will take up to 20 seconds (plus the time needed to fetch
-          and apply the new configuration) before the server starts using this
-          subnet. The lower the <command>config-fetch-wait-time</command> value,
-          the shorter the time for the server to react to the incremental
-          configuration updates in the database. On the other hand, polling the
-          database too frequently may impact the DHCP server's performance because
-          the server needs to make at least one query to the database to discover
-          the pending configuration updates.The default value of the
-          <command>config-fetch-wait-time</command> is 30 seconds.
-        </para>
-
-        <para>
-          Finally, in the configuration example above, two hooks libraries are loaded.
-          The former, <filename>libdhcp_mysql_cb.so</filename>, is the implementation of
-          the Configuration Backend for MySQL. It must be always present when the
-          server uses MySQL as the configuration repository. Failing to load this
-          library will result in an error during the server configuration if the
-          "mysql" database is selected with the <command>config-control</command>
-          parameter.
-        </para>
-
-        <para>
-          The latter hooks library, <filename>libdhcp_cb_cmds.so</filename>, is
-          optional. It should be loaded when the Kea server instance is to be used
-          for managing the configuration in the database. See the
-          <xref linkend="cb-cmds-library"/> for the details. Note that this hooks
-          library is only available to the ISC customers with a support contract.
-        </para>
-
-      </section>
-
-    </section>
-  </chapter>
diff --git a/doc/guide/dhcp6-srv.xml b/doc/guide/dhcp6-srv.xml
deleted file mode 100644 (file)
index abf65e0..0000000
+++ /dev/null
@@ -1,5858 +0,0 @@
-<!--
- - Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-<!-- Converted by db4-upgrade version 1.1 -->
-<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="dhcp6">
-    <title>The DHCPv6 Server</title>
-
-    <section xml:id="dhcp6-start-stop">
-      <title>Starting and Stopping the DHCPv6 Server</title>
-
-      <para>
-        It is recommended that the Kea DHCPv6 server be started and stopped
-        using <command>keactrl</command> (described in <xref linkend="keactrl"/>);
-        however, it is also possible to run the server directly. It accepts
-        the following command-line switches:
-      </para>
-
-      <itemizedlist>
-          <listitem>
-            <simpara>
-            <command>-c <replaceable>file</replaceable></command> -
-            specifies the configuration file. This is the only mandatory
-            switch.</simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-            <command>-d</command> - specifies whether the server
-            logging should be switched to verbose mode. In verbose mode,
-            the logging severity and debuglevel specified in the configuration
-            file are ignored and "debug" severity and the maximum debuglevel
-            (99) are assumed. The flag is convenient for temporarily
-            switching the server into maximum verbosity, e.g. when
-            debugging.</simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-            <command>-p <replaceable>server-port</replaceable></command> -
-            specifies the local UDP port on which the server will listen.
-            This is only useful during testing, as a DHCPv6 server
-            listening on ports other than the standard ones will not
-            be able to handle regular DHCPv6 queries.</simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-            <command>-P <replaceable>client-port</replaceable></command> -
-            specifies the remote UDP port to which the server will send
-            all responses. This is only useful during testing, as a
-            DHCPv6 server sending responses to ports other than the
-            standard ones will not be able to handle regular DHCPv6
-            queries.</simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-            <command>-t <replaceable>file</replaceable></command> - specifies a
-            configuration file to be tested. Kea-dhcp6 will load it, check it, and
-            exit. During the test, log messages are printed to standard output and
-            error messages to standard error. The result of the test is reported
-            through the exit code (0 = configuration looks ok, 1 = error
-            encountered). The check is not comprehensive; certain checks are
-            possible only when running the server.</simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <command>-v</command> - displays the Kea version and exits.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <command>-V</command> - displays the Kea extended version with
-              additional parameters and exits. The listing includes the versions
-              of the libraries dynamically linked to Kea.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <command>-W</command> - displays the Kea configuration report
-              and exits. The report is a copy of the
-              <filename>config.report</filename> file produced by
-              <userinput>./configure</userinput>; it is embedded in the
-              executable binary.
-            </simpara>
-          </listitem>
-      </itemizedlist>
-
-      <para>
-        On startup, the server will detect available network interfaces
-        and will attempt to open UDP sockets on all interfaces
-        mentioned in the configuration file.
-        Since the DHCPv6 server opens privileged ports, it requires root
-        access. Make sure you run this daemon as root.
-      </para>
-
-      <para>
-        During startup, the server will attempt to create a PID file of the
-        form: [runstatedir]/kea/[conf name].kea-dhcp6.pid where:
-        <itemizedlist>
-            <listitem>
-            <simpara><command>runstatedir</command>: The value as passed into the
-            build configure script; it defaults to "/usr/local/var/run". Note
-            that this value may be overridden at runtime by setting the environment
-            variable KEA_PIDFILE_DIR, although this is intended primarily for testing purposes.
-            </simpara>
-            </listitem>
-            <listitem>
-            <simpara><command>conf name</command>: The configuration file name
-            used to start the server, minus all preceding paths and the file extension.
-            For example, given a pathname of "/usr/local/etc/kea/myconf.txt", the
-            portion used would be "myconf".
-            </simpara>
-            </listitem>
-        </itemizedlist>
-        If the file already exists and contains the PID of a live process,
-        the server will issue a DHCP6_ALREADY_RUNNING log message and exit. It
-        is possible, though unlikely, that the file is a remnant of a system crash
-        and the process to which the PID belongs is unrelated to Kea. In such a
-        case it would be necessary to manually delete the PID file.
-      </para>
-
-      <para>
-        The server can be stopped using the <command>kill</command> command.
-        When running in a console, the server can also be shut down by
-        pressing ctrl-c. It detects the key combination and shuts
-        down gracefully.
-      </para>
-    </section>
-
-    <section xml:id="dhcp6-configuration">
-      <title>DHCPv6 Server Configuration</title>
-<section>
-  <title>Introduction</title>
-      <para>
-        This section explains how to configure the DHCPv6 server using a
-        configuration file. Before DHCPv6 is started, its configuration
-        file has to be created. The basic configuration is as follows:
-<screen>
-{
-# DHCPv6 configuration starts on the next line
-"Dhcp6": {
-
-# First we set up global values
-    "valid-lifetime": 4000,
-    "renew-timer": 1000,
-    "rebind-timer": 2000,
-    "preferred-lifetime": 3000,
-
-# Next we setup the interfaces to be used by the server.
-    "interfaces-config": {
-        "interfaces": [ "eth0" ]
-    },
-
-# And we specify the type of lease database
-    "lease-database": {
-        "type": "memfile",
-        "persist": true,
-        "name": "/var/lib/kea/dhcp6.leases"
-    },
-
-# Finally, we list the subnets from which we will be leasing addresses.
-    "subnet6": [
-        {
-            "subnet": "2001:db8:1::/64",
-            "pools": [
-                 {
-                     "pool": "2001:db8:1::1-2001:db8:1::ffff"
-                 }
-             ]
-        }
-    ]
-# DHCPv6 configuration ends with the next line
-}
-
-} </screen>
-</para>
-
-<para>The following paragraphs provide a brief overview of the parameters in
-the above example, along with
-their format. Subsequent sections of this chapter go into much greater detail
-for these and other parameters.</para>
-
-<para>The lines starting with a hash (#) are comments and are ignored by
-the server; they do not impact its
-operation in any way.</para>
-
-<para>The configuration starts in the first line with the initial
-opening curly bracket (or brace). Each configuration must contain an
-object specifying the configuration of the Kea module using it.
-In the example above this object is called <command>Dhcp6</command>.
-</para>
-
-<note>
-  <para>In the current Kea release it is possible to specify configurations
-  of multiple modules within a single configuration file, but this is not
-  recommended and support for it will be removed in the future releases. The
-  only object, besides the one specifying module configuration, which can
-  (and usually was) included in the same file is <command>Logging</command>.
-  However, we don't include this object in the example above for clarity
-  and its content, the list of loggers, should now be inside the
-  <command>Dhcp4</command> object instead of this deprecated object.
-  </para>
-</note>
-
-<para>The Dhcp6 configuration starts with the <command>"Dhcp6": {</command> line
-and ends with the corresponding closing brace (in the above example,
-the brace after the last comment). Everything defined between those
-lines is considered to be the Dhcp6 configuration.</para>
-
-<para>In the general case, the order in which those parameters appear does not
-matter, but there are two caveats. The first one is to remember that
-the configuration file must be well-formed JSON. That means that the parameters
-for any given scope must be separated by a comma and there must not be a comma
-after the last parameter. When reordering a configuration file, keep in mind that
-moving a parameter to or from the last position in a given scope may also require
-moving the comma. The second caveat is that it is uncommon â€” although
-legal JSON â€” to
-repeat the same parameter multiple times. If that happens, the last occurrence of a
-given parameter in a given scope is used, while all previous instances are
-ignored. This is unlikely to cause any confusion as there are no real-life
-reasons to keep multiple copies of the same parameter in your configuration
-file.</para>
-
-<para>Moving onto the DHCPv6 configuration elements, the first few elements
-define some global parameters. <command>valid-lifetime</command>
-defines how long the addresses (leases) given out by the server are valid. If
-nothing changes, a client that got an address is allowed to use it for 4000
-seconds. (Note that integer numbers are specified as is, without any quotes
-around them.) The address will become deprecated in 3000 seconds, i.e. clients are
-allowed to keep old connections, but can't use this address for creating new
-connections. <command>renew-timer</command> and
-<command> rebind-timer</command> are values that define T1 and T2 timers that
-govern when the client will begin the renewal and rebind procedures.</para>
-
-<para>The <command>interfaces-config</command> map specifies the server
-configuration concerning the network interfaces, on which the server should
-listen to the DHCP messages. The <command>interfaces</command> parameter
-specifies a list of network interfaces on which the server should listen.
-Lists are opened and closed with square brackets, with elements separated
-by commas. To listen on two interfaces, the
-<command>interfaces-config</command> should look like this:
-<screen>
-"interfaces-config": {
-    "interfaces": [ "eth0", "eth1" ]
-},
-</screen>
-</para>
-
-<para>The next couple of lines define the lease database, the place where the server
-stores its lease information. This particular example tells the server to use
-<command>memfile</command>, which is the simplest (and fastest) database
-backend. It uses an in-memory database and stores leases on disk in a CSV
-file. This is a very simple configuration; usually the lease database configuration
-is more extensive and contains additional parameters.  Note that
-<command>lease-database</command>
-is an object and opens up a new scope, using an opening brace.
-Its parameters (just one in this example - <command>type</command>)
-follow. If there were more than one, they would be separated by commas. This
-scope is closed with a closing brace. As more parameters for the Dhcp6 definition
-follow, a trailing comma is present.</para>
-
-<para>Finally, we need to define a list of IPv6 subnets. This is the
-most important DHCPv6 configuration structure as the server uses that
-information to process clients' requests. It defines all subnets from
-which the server is expected to receive DHCP requests. The subnets are
-specified with the <command>subnet6</command> parameter. It is a list,
-so it starts and ends with square brackets.  Each subnet definition in
-the list has several attributes associated with it, so it is a structure
-and is opened and closed with braces. At a minimum, a subnet definition
-has to have at least two parameters: <command>subnet</command> (which
-defines the whole subnet) and <command>pools</command> (which is a list of
-dynamically allocated pools that are governed by the DHCP server).</para>
-
-<para>The example contains a single subnet. If more than one were defined,
-additional elements
-in the <command>subnet6</command> parameter would be specified and
-separated by commas. For example, to define two subnets, the following
-syntax would be used:
-<screen>
-"subnet6": [
-    {
-        "pools": [ { "pool": "2001:db8:1::/112" } ],
-        "subnet": "2001:db8:1::/64"
-    },
-    {
-        "pools": [ { "pool": "2001:db8:2::1-2001:db8:2::ffff" } ],
-        "subnet": "2001:db8:2::/64"
-    }
-]
-</screen>
-Note that indentation is optional and is used for aesthetic purposes only.
-In some cases in may be preferable to use more compact notation.
-</para>
-
-<para>After all parameters are specified, we have two contexts open:
-global and Dhcp6, hence we need two closing curly brackets to close them.
-</para>
-</section>
-
-<section>
-  <title>Lease Storage</title>
-  <para>All leases issued by the server are stored in the lease database.
-  Currently there are four database backends available:  memfile (which is the
-  default backend), MySQL, PostgreSQL, and Cassandra.</para>
-<section>
-  <title>Memfile - Basic Storage for Leases</title>
-
-  <para>The server is able to store lease data in different repositories. Larger
-  deployments may elect to store leases in a database. <xref linkend="database-configuration6"/> describes this option. In typical
-  smaller deployments though, the server will store lease information in a CSV file rather
-  than a database. As well as requiring less administration, an
-  advantage of using a file for storage is that it
-  eliminates a dependency on third-party database software.</para>
-
-  <para>The configuration of the file backend (Memfile) is controlled through
-  the Dhcp6/lease-database parameters. The <command>type</command> parameter
-  is mandatory and it specifies which storage for leases the server should use.
-  The value of <userinput>"memfile"</userinput> indicates that the file should
-  be used as the storage. The following list gives additional optional
-  parameters that can be used to configure the Memfile backend.
-
-  <itemizedlist>
-    <listitem>
-      <simpara><command>persist</command>: controls whether the new leases and
-      updates to existing leases are written to the file. It is strongly
-      recommended that the value of this parameter is set to
-      <userinput>true</userinput> at all times, during the server's normal
-      operation. Not writing leases to disk means that if a server is restarted
-      (e.g. after a power failure), it will not know what addresses have been
-      assigned. As a result, it may hand out addresses to new clients that are
-      already in use. The value of <userinput>false</userinput> is mostly useful
-      for performance-testing purposes. The default value of the
-      <command>persist</command> parameter is <userinput>true</userinput>,
-      which enables writing lease updates
-      to the lease file.
-      </simpara>
-    </listitem>
-
-    <listitem>
-      <simpara><command>name</command>: specifies an absolute location of the lease
-      file in which new leases and lease updates will be recorded. The default value
-      for this parameter is <userinput>"[kea-install-dir]/var/lib/kea/kea-leases6.csv"
-      </userinput>.</simpara>
-    </listitem>
-
-    <listitem>
-      <simpara><command>lfc-interval</command>: specifies the interval, in seconds, at
-      which the server will perform a lease file cleanup (LFC).  This
-      removes redundant (historical) information from the lease file
-      and effectively reduces the lease file size. The cleanup process is described
-      in more detailed fashion further in this section. The default value of the
-      <command>lfc-interval</command> is <userinput>3600</userinput>. A value of 0
-      disables the LFC.</simpara>
-    </listitem>
-
-  </itemizedlist>
-  </para>
-
-  <para>An example configuration of the Memfile backend is presented below:
-
-<screen>
-"Dhcp6": {
-    "lease-database": {
-        <userinput>"type": "memfile"</userinput>,
-        <userinput>"persist": true</userinput>,
-        <userinput>"name": "/tmp/kea-leases6.csv"</userinput>,
-        <userinput>"lfc-interval": 1800</userinput>
-    }
-}
-</screen>
-
-    This configuration selects the <filename>/tmp/kea-leases6.csv</filename> as
-    the storage for lease information and enables persistence (writing lease updates
-    to this file). It also configures the backend to perform a periodic cleanup
-    of the lease file every 30 minutes.
-  </para>
-
-  <para>It is important to know how the lease file contents are organized
-  to understand why the periodic lease file cleanup is needed. Every time
-  the server updates a lease or creates a new lease for the client, the new
-  lease information must be recorded in the lease file. For performance reasons,
-  the server does not update the existing client's lease in the file, as this would
-  potentially require rewriting the entire file. Instead, it simply appends the new lease
-  information to the end of the file; the previous lease entries for the
-  client are not removed. When the server loads leases from the lease file, e.g.
-  at the server startup, it assumes that the latest lease entry for the client
-  is the valid one. The previous entries are discarded, meaning that the
-  server can re-construct the accurate information about the leases even though
-  there may be many lease entries for each client. However, storing many entries
-  for each client results in a bloated lease file and impairs the performance of
-  the server's startup and reconfiguration, as it needs to process a larger number
-  of lease entries.
-  </para>
-
-  <para>Lease file cleanup (LFC) removes all previous entries for each client and
-  leaves only the latest ones. The interval at which the cleanup is performed
-  is configurable, and it should be selected according to the frequency of lease
-  renewals initiated by the clients. The more frequent the renewals, the smaller
-  the value of <command>lfc-interval</command> should be. Note, however, that the
-  LFC takes time and thus it is possible (although unlikely) that, if the
-  <command>lfc-interval</command> is too short, a new cleanup
-  may be started while the previous one is still running. The server would recover from
-  this by skipping the new cleanup when it detects that the previous cleanup
-  is still in progress. But it implies that the actual cleanups will be
-  triggered more rarely than configured. Moreover, triggering a new cleanup
-  adds overhead to the server, which will not be able to respond to new
-  requests for a short period of time when the new cleanup process is spawned.
-  Therefore, it is recommended that the <command>lfc-interval</command> value
-  is selected in a way that would allow for the LFC to complete the cleanup before a
-  new cleanup is triggered.
-  </para>
-
-  <para>Lease file cleanup is performed by a separate process (in the background) to avoid
-  a performance impact on the server process. To avoid the conflicts
-  between two processes both using the same lease files, the LFC process
-  starts with Kea opening new lease file and the actual LFC process
-  operates on the lease file that is no longer used by the server. There are also other files
-  created as a side effect of the lease file cleanup. The detailed
-  description of the LFC is located later in this Kea Administrator's Reference Manual:
-  <xref linkend="kea-lfc" />.</para>
-
-</section>
-
-<section xml:id="database-configuration6">
-  <title>Lease Database Configuration</title>
-
-  <note>
-    <para>Lease database access information must be configured for the DHCPv6 server,
-    even if it has already been configured for the DHCPv4 server. The servers
-    store their information independently, so each server can use a separate
-    database or both servers can use the same database.</para>
-  </note>
-
-  <para>Lease database configuration is controlled through the
-  Dhcp6/lease-database parameters. The type of the database must be set to
-  "memfile", "mysql", "postgresql", or "cql", e.g.:
-<screen>
-"Dhcp6": { "lease-database": { <userinput>"type": "mysql"</userinput>, ... }, ... }
-</screen>
-  Next, the name of the database to hold the leases must be set; this is the
-  name used when the database was created
-  (see <xref linkend="mysql-database-create"/>,
-  <xref linkend="pgsql-database-create"/>,
-  or <xref linkend="cql-database-create"/>).
-<screen>
-"Dhcp6": { "lease-database": { <userinput>"name": "<replaceable>database-name</replaceable>" </userinput>, ... }, ... }
-</screen>
-  For Cassandra:
-<screen>
-"Dhcp6": { "lease-database": { <userinput>"keyspace": "<replaceable>database-name</replaceable>" </userinput>, ... }, ... }
-</screen>
-  If the database is located on a different system from the DHCPv6 server, the
-  database host name must also be specified. (It should be noted that this
-  configuration may have a severe impact on server performance.):
-<screen>
-"Dhcp6": { "lease-database": { <userinput>"host": "<replaceable>remote-host-name</replaceable>"</userinput>, ... }, ... }
-</screen>
-  For Cassandra, multiple contact points can be provided:
-<screen>
-"Dhcp6": { "lease-database": { <userinput>"contact-points": "<replaceable>remote-host-name[, ...]</replaceable>" </userinput>, ... }, ... }
-</screen>
-  Normally, the database will be on the same machine as
-  the DHCPv6 server. In this case, set the value to the empty string:
-<screen>
-"Dhcp6": { "lease-database": { <userinput>"host" : ""</userinput>, ... }, ... }
-</screen>
-  For Cassandra:
-<screen>
-"Dhcp6": { "lease-database": { <userinput>"contact-points": ""</userinput>, ... }, ... }
-</screen>
-  Should the database use a port different than the default, it may be
-  specified as well:
-<screen>
-"Dhcp6": { "lease-database": { <userinput>"port" : 12345</userinput>, ... }, ... }
-</screen>
-  Should the database be located on a different system, you may need to specify a longer interval
-  for the connection timeout:
-<screen>
-"Dhcp6": { "lease-database": { <userinput>"connect-timeout" : <replaceable>timeout-in-seconds</replaceable></userinput>, ... }, ... }
-</screen>
-The default value of five seconds should be more than adequate for local connections.
-If a timeout is given, though, it should be an integer greater than zero.
-  </para>
-  <para>
-The maxiumum number of times the server will automatically attempt to reconnect to
-the lease database after connectivity has been lost may be specified:
-<screen>
-"Dhcp6": { "lease-database": { <userinput>"max-reconnect-tries" : <replaceable>number-of-tries</replaceable></userinput>, ... }, ... }
-</screen>
-If the server is unable to reconnect to the database after making the maximum number
-of attempts the server will exit. A value of zero (the default) disables automatic
-recovery and the server will exit immediately upon detecting a loss of connectivity
-(MySQL and Postgres only).
-  </para>
-  <para>
-The number of milliseconds the server will wait in between attempts to reconnect to the
-lease database after connectivity has been lost may also be specified:
-<screen>
-"Dhcp6": { "lease-database": { <userinput>"reconnect-wait-time" : <replaceable>number-of-milliseconds</replaceable></userinput>, ... }, ... }
-</screen>
-The default value for MySQL and Postgres is 0, which disables automatic recovery and
-causes the server to exit immediately upon detecting the loss of connectivity.
-The default value for Cassandra is 2000 ms.
-  </para>
-
-  <note>
-    <para>
-      Automatic reconnection to database backends is configured individually per backend.
-      This allows you to tailor the recovery parameters to each backend you use.
-      We do suggest that you enable it either for all backends or no backends so you
-      have consistent behavior.  Losing connectivity to a backend for which reconnect
-      is disabled will result in the server shutting itself down. This includes
-      cases when the lease database backend and the hosts database backend are connected to
-      the same database instance.
-    </para>
-  </note>
-
-  <para>
-    <note>Note that host parameter is used by MySQL and PostgreSQL
-    backends. Cassandra has a concept of contact points that could be
-    used to contact the cluster, instead of a single IP or
-    hostname. It takes a list of comma-separated IP addresses, which may be specified as:
-<screen>
-"Dhcp6": { "lease-database": { <userinput>"contact-points" : "192.0.2.1,192.0.2.2"</userinput>, ... }, ... }
-</screen>
-  </note></para>
-
-  <para>Finally, the credentials of the account under which the server will
-  access the database should be set:
-<screen>
-"Dhcp6": { "lease-database": { <userinput>"user": "<replaceable>user-name</replaceable>"</userinput>,
-                               <userinput>"password": "<replaceable>password</replaceable>"</userinput>,
-                              ... },
-           ... }
-</screen>
-  If there is no password to the account, set the password to the empty string
-  "". (This is also the default.)</para>
-</section>
-
-<section xml:id="cassandra-database-configuration6">
-    <title>Cassandra-Specific Parameters</title>
-<para>The parameters are the same for DHCPv4 and DHCPv6. See <xref
-linkend="cassandra-database-configuration4"/> for details.</para>
-</section>
-
-</section>
-
-<section xml:id="hosts6-storage">
-  <title>Hosts Storage</title>
-    <para>Kea is also able to store information about host reservations in the
-    database. The hosts database configuration uses the same syntax as the lease
-    database. In fact, a Kea server opens independent connections for each
-    purpose, be it lease or hosts information. This arrangement gives the most
-    flexibility. Kea can keep leases and host reservations
-    separately, but can also point to the same database. Currently the
-    supported hosts database types are MySQL, PostgreSQL and Cassandra.</para>
-
-    <para>For example, the following configuration can be used to
-    configure connection to MySQL:
-    <screen>
-"Dhcp6": {
-    <userinput>"hosts-database": {
-        "type": "mysql",
-        "name": "kea",
-        "user": "kea",
-        "password": "secret123",
-        "host": "localhost",
-        "port": 3306
-    }</userinput>
-}</screen> Note that depending on your database configuration, many of
-    the parameters may be optional.</para>
-
-
-    <para>Please note that usage of hosts storage is optional. A user can define
-    all host reservations in the configuration file, and that is the recommended way
-    if the number of reservations is small. However, when the number of
-    reservations grows, it is more convenient to use host storage. Please note
-    that both storage methods (configuration file and one of the supported databases)
-    can be used together. If hosts are defined in both places, the definitions
-    from the configuration file are checked first and external storage is checked
-    later, if necessary.</para>
-
-    <para>In fact, host information can be placed in multiple stores. Operations
-    are performed on the stores in the order they are defined in the configuration
-    file, although this leads to a restriction in ordering in the case of a host
-    reservation addition; read-only stores must be configured after a (required)
-    read-write store, or the addition will fail.</para>
-
-<section xml:id="hosts-databases-configuration6">
-  <title>DHCPv6 Hosts Database Configuration</title>
-
-  <para>Hosts database configuration is controlled through the Dhcp6/hosts-database
-  parameters. If enabled, the type of database must be set to "mysql" or
-  "postgresql".
-<screen>
-"Dhcp6": { "hosts-database": { <userinput>"type": "mysql"</userinput>, ... }, ... }
-</screen>
-  Next, the name of the database to hold the reservations must be set; this is the
-  name used when the database was created  (see <xref linkend="supported-databases"/>
-  for instructions on how to set up the desired database type).
-<screen>
-"Dhcp6": { "hosts-database": { <userinput>"name": "<replaceable>database-name</replaceable>" </userinput>, ... }, ... }
-</screen>
-  If the database is located on a different system than the DHCPv6 server, the
-  database host name must also be specified. (Again it should be noted that this
-  configuration may have a severe impact on server performance.)
-<screen>
-"Dhcp6": { "hosts-database": { <userinput>"host": <replaceable>remote-host-name</replaceable></userinput>, ... }, ... }
-</screen>
-  Normally, the database will be on the same machine as
-  the DHCPv6 server. In this case, set the value to the empty string:
-<screen>
-"Dhcp6": { "hosts-database": { <userinput>"host" : ""</userinput>, ... }, ... }
-</screen>
-<screen>
-"Dhcp6": { "hosts-database": { <userinput>"port" : 12345</userinput>, ... }, ... }
-</screen>
-  </para>
-  <para>
-The maximum number of times the server will automatically attempt to reconnect to
-the host database after connectivity has been lost may be specified:
-<screen>
-"Dhcp6": { "host-database": { <userinput>"max-reconnect-tries" : <replaceable>number-of-tries</replaceable></userinput>, ... }, ... }
-</screen>
-If the server is unable to reconnect to the database after making the maximum number
-of attempts the server will exit. A value of zero (the default) disables automatic
-recovery and the server will exit immediately upon detecting a loss of connectivity
-(MySQL and Postgres only). For Cassandra, Kea uses a Cassandra interface that
-connects to all nodes in a cluster at the same time. Any connectivity
-issues should be handled by internal Cassandra mechanisms.
-  </para>
-  <para>
-The number of milliseconds the server will wait between attempts to reconnect to the
-host database after connectivity has been lost may also be specified:
-<screen>
-"Dhcp6": { "hosts-database": { <userinput>"reconnect-wait-time" : <replaceable>number-of-milliseconds</replaceable></userinput>, ... }, ... }
-</screen>
-The default value for MySQL and Postgres is 0, which disables automatic recovery and
-causes the server to exit immediately upon detecting the loss of connectivity.
-The default value for Cassandra is 2000 ms.
-  </para>
-
-    <note>
-      <para>
-        Automatic reconnection to database backends is configured individually per backend.
-        This allows you to tailor the recovery parameters to each backend you use.
-        We do suggest that you enable it either for all backends or no backends so you
-        have consistent behavior. Losing connectivity to a backend for which reconnect
-        is disabled will result in the server shutting itself down. This includes
-        cases when the lease database backend and the hosts database backend are connected to
-        the same database instance.
-      </para>
-    </note>
-
-  <para>Finally, the credentials of the account under which the server will
-  access the database should be set:
-<screen>
-"Dhcp6": { "hosts-database": { <userinput>"user": "<replaceable>user-name</replaceable>"</userinput>,
-                               <userinput>"password": "<replaceable>password</replaceable>"</userinput>,
-                              ... },
-           ... }
-</screen>
-  If there is no password to the account, set the password to the empty string
-  "". (This is also the default.)</para>
-
-  <para>The multiple store extension uses a similar syntax; a configuration
-  is placed into a "hosts-databases" list instead of into a "hosts-database"
-  entry as in:
-<screen>
-"Dhcp6": { "hosts-databases": [ { <userinput>"type": "mysql"</userinput>, ... }, ... ], ... }
-</screen>
-  </para>
-
-  <para>
-    For additional Cassandra-specific parameters, see <xref
-    linkend="cassandra-database-configuration4"/>.</para>
-
-</section>
-
-<section xml:id="read-only-database-configuration6">
-<title>Using Read-Only Databases for Host Reservations</title>
-<para>
-In some deployments the database user whose name is specified in the database backend
-configuration may not have write privileges to the database. This is often
-required by the policy within a given network to secure the data from being
-unintentionally modified. In many cases administrators have deployed inventory databases,
-which contain substantially more information about the hosts than just the
-static reservations assigned to them. The inventory database can be used to create
-a view of a Kea hosts database and such a view is often read-only.
-</para>
-<para>
-Kea host database backends operate with an implicit configuration to both
-read from and write to the database. If the database user does not have
-write access to the host database, the backend will fail to start and the
-server will refuse to start (or reconfigure). However, if access to a read-
-only host database is required for retrieving reservations for clients
-and/or assigning specific addresses and options, it is possible to explicitly
-configure Kea to start in "read-only" mode. This is controlled by the
-<command>readonly</command> boolean parameter as follows:
-<screen>
-"Dhcp6": { "hosts-database": { <userinput>"readonly": true</userinput>, ... }, ... }
-</screen>
-Setting this parameter to <userinput>false</userinput> configures the
-database backend to operate in "read-write" mode, which is also the default
-configuration if the parameter is not specified.
-</para>
-<note><para>The <command>readonly</command> parameter is currently only supported
-for MySQL and PostgreSQL databases.</para></note>
-</section>
-
-</section>
-
-<section xml:id="dhcp6-interface-configuration">
-  <title>Interface Configuration</title>
-  <para>The DHCPv6 server has to be configured to listen on specific network
-  interfaces.  The simplest network interface configuration instructs the server to
-  listen on all available interfaces:
-  <screen>
-"Dhcp6": {
-    "interfaces-config": {
-        "interfaces": [ <userinput>"*"</userinput> ]
-    }
-    ...
-}
-</screen>
-  The asterisk plays the role of a wildcard and means "listen on all interfaces."
-  However, it is usually a good idea to explicitly specify interface names:
-  <screen>
-"Dhcp6": {
-    "interfaces-config": {
-        "interfaces": [ <userinput>"eth1", "eth3"</userinput> ]
-    },
-    ...
-}
-  </screen>
-</para>
-  <para>It is possible to use a wildcard interface name (asterisk) concurrently
-  with explicit interface names:
-  <screen>
-"Dhcp6": {
-    "interfaces-config": {
-        "interfaces": [ <userinput>"eth1", "eth3", "*"</userinput> ]
-    },
-    ...
-}
-  </screen>
-It is anticipated that this form of usage will only be used when it is desired to
-temporarily override a list of interface names and listen on all interfaces.
-  </para>
-
-  <para>As with the DHCPv4 server, binding to specific addresses and
-  disabling re-detection of interfaces are supported. But
-  <command>dhcp-socket-type</command> is not because DHCPv6 uses
-  UDP/IPv6 sockets only. The following example shows how to disable the
-  interface detection:
-  </para>
-
-  <screen>
-"Dhcp6": {
-    "interfaces-config": {
-        "interfaces": [ <userinput>"eth1", "eth3"</userinput> ],
-        "re-detect": <userinput>false</userinput>
-    },
-    ...
-}
-  </screen>
-
-  <para>The loopback interfaces (i.e. the "lo" or "lo0" interface)
-  are not configured by default, unless explicitely mentioned in
-  the configuration. Note that Kea requires a link-local address (which does
-  not exist on all systems), or a specified unicast address as in:
-  </para>
-
-  <screen>
-"Dhcp6": {
-    "interfaces-config": {
-        "interfaces": [ <userinput>"enp0s2/2001:db8::1234:abcd"</userinput> ]
-    },
-    ...
-}
-  </screen>
-
-</section>
-
-    <section xml:id="ipv6-subnet-id">
-      <title>IPv6 Subnet Identifier</title>
-      <para>
-        The subnet identifier is a unique number associated with a particular subnet.
-        In principle, it is used to associate clients' leases with their respective subnets.
-        When a subnet identifier is not specified for a subnet being configured, it will
-        be automatically assigned by the configuration mechanism. The identifiers
-        are assigned from 1 and are monotonically increased for each subsequent
-        subnet: 1, 2, 3 ....
-      </para>
-      <para>
-        If there are multiple subnets configured with auto-generated identifiers and
-        one of them is removed, the subnet identifiers may be renumbered. For example:
-        if there are four subnets and the third is removed, the last subnet will be assigned
-        the identifier that the third subnet had before removal. As a result, the leases
-        stored in the lease database for subnet 3 are now associated with
-        subnet 4, something that may have unexpected consequences. The only remedy for this issue
-        at present is to
-        manually specify a unique identifier for each subnet.
-      </para>
-      <note>
-        Subnet IDs must be greater than zero and less than 4294967295.
-      </note>
-      <para>
-        The following configuration will assign the specified subnet
-        identifier to the newly configured subnet:
-
-        <screen>
-"Dhcp6": {
-    "subnet6": [
-        {
-            "subnet": "2001:db8:1::/64",
-            <userinput>"id": 1024</userinput>,
-            ...
-        }
-    ]
-}
-</screen>
-        This identifier will not change for this subnet unless the "id" parameter is
-        removed or set to 0. The value of 0 forces auto-generation of the subnet
-        identifier.
-      </para>
-      <!-- @todo: describe whether database needs to be updated after changing
-      id -->
-    </section>
-
-    <section xml:id="ipv6-subnet-prefix">
-       <title>IPv6 Subnet Prefix</title>
-       <para>
-        The subnet prefix is the second way to identify a subnet. It does not
-        need to have the address part to match the prefix length, for instance
-        this configuration is accepted:
-
-    <screen>
-"Dhcp6": {
-    "subnet6": [
-        {
-            <userinput>"subnet": "2001:db8:1::1/64"</userinput>,
-            ...
-        }
-    ]
-}
-</screen>
-         Even there is another subnet with the "2001:db8:1::/64" prefix:
-         only the textual form of subnets are compared to avoid duplicates.
-        </para>
-        <note>
-          Abuse of this feature can lead to incorrect subnet selection
-          (see <xref linkend="dhcp6-config-subnets"/>).
-        </note>
-    </section>
-
-    <section xml:id="dhcp6-unicast">
-      <title>Unicast Traffic Support</title>
-      <para>
-        When the DHCPv6 server starts, by default it listens to the DHCP traffic
-        sent to multicast address ff02::1:2 on each interface that it is
-        configured to listen on (see <xref linkend="dhcp6-interface-configuration"/>).
-        In some cases it is useful to configure a server to handle incoming
-        traffic sent to global unicast addresses as well. The most common
-        reason for this is to have relays send their traffic to the server
-        directly. To configure the server to listen on a specific unicast address,
-        the interface name can be
-        optionally followed by a slash, followed by the global unicast address on which
-        the server should listen. The server listens to this address in addition to normal
-        link-local binding and listening on the ff02::1:2 address. The sample configuration
-        below shows how to listen on 2001:db8::1 (a global address)
-        configured on the eth1 interface.
-      </para>
-      <para>
- <screen>
-"Dhcp6": {
-    "interfaces-config": {
-        "interfaces": [ <userinput>"eth1/2001:db8::1"</userinput> ]
-    },
-    ...
-    "option-data": [
-        {
-            "name": "unicast",
-            "data": "2001:db8::1"
-        } ],
-    ...
-}
- </screen>
-
-        This configuration will cause the server to listen on
-        eth1 on the link-local address, the multicast group (ff02::1:2), and 2001:db8::1.
-      </para>
-      <para>
-        Usually unicast support is associated with a server unicast option
-        which allows clients to send unicast messages to the server.
-        The example above includes a server unicast option specification
-        which will cause the client to send messages to the specified
-        unicast address.
-      </para>
-      <para>
-        It is possible to mix interface names, wildcards, and interface names/addresses
-        in the list of interfaces. It is not possible, however, to specify more than one
-        unicast address on a given interface.
-      </para>
-      <para>
-        Care should be taken to specify proper unicast addresses. The server will
-        attempt to bind to the addresses specified without any additional checks.
-        This approach was selected on purpose to allow the software to
-        communicate over uncommon addresses if so desired.
-      </para>
-    </section>
-
-    <section xml:id="dhcp6-address-config">
-      <title>Subnet and Address Pool</title>
-      <para>
-        The main role of a DHCPv6 server is address assignment. For this,
-        the server must be configured with at least one subnet and one pool of dynamic
-        addresses to be managed. For example, assume that the server
-        is connected to a network segment that uses the 2001:db8:1::/64
-        prefix. The administrator of that network decides that addresses from range
-        2001:db8:1::1 to 2001:db8:1::ffff are going to be managed by the Dhcp6
-        server. Such a configuration can be achieved in the following way:
-        <screen>
-"Dhcp6": {
-    <userinput>"subnet6": [
-       {
-           "subnet": "2001:db8:1::/64",
-           "pools": [
-               {
-                   "pool": "2001:db8:1::1-2001:db8:1::ffff"
-               }
-           ],
-           ...
-       }
-    ]</userinput>
-}</screen>
-
-        Note that <command>subnet</command> is defined as a simple string, but
-        the <command>pools</command> parameter is actually a list of pools; for
-        this reason, the pool definition is enclosed in square brackets, even
-        though only one range of addresses is specified.</para>
-
-        <para>Each <command>pool</command> is a structure that contains the
-        parameters that describe a single pool. Currently there is only one
-        parameter, <command>pool</command>, which gives the range of addresses
-        in the pool.</para>
-
-        <para>It is possible to define more than one pool in a
-        subnet; continuing the previous example, further assume that
-        2001:db8:1:0:5::/80 should also be managed by the server. It could be written as
-        2001:db8:1:0:5:: to 2001:db8:1::5:ffff:ffff:ffff, but typing so many 'f's
-        is cumbersome. It can be expressed more simply as 2001:db8:1:0:5::/80. Both
-        formats are supported by Dhcp6 and can be mixed in the pool list.
-        For example, one could define the following pools:
-        <screen>
-"Dhcp6": {
-    <userinput>"subnet6": [
-    {
-        "subnet": "2001:db8:1::/64",
-        "pools": [
-            { "pool": "2001:db8:1::1-2001:db8:1::ffff" },
-            { "pool": "2001:db8:1:05::/80" }
-        ]</userinput>,
-        ...
-    }
-    ]
-}</screen>
-        White space in pool definitions is ignored, so spaces before and after the hyphen are optional.
-        They can be used to improve readability.
-      </para>
-      <para>
-        The number of pools is not limited, but for performance reasons it is recommended to
-        use as few as possible.
-      </para>
-      <para>
-         The server may be configured to serve more than one subnet. To add a second subnet,
-         use a command similar to the following:
-        <screen>
-"Dhcp6": {
-    <userinput>"subnet6": [
-    {
-        "subnet": "2001:db8:1::/64",
-        "pools": [
-            { "pool": "2001:db8:1::1-2001:db8:1::ffff" }
-        ]
-    },
-    {
-        "subnet": "2001:db8:2::/64",
-        "pools": [
-            { "pool": "2001:db8:2::/64" }
-        ]
-    },
-</userinput>
-        ...
-    ]
-}</screen>
-        In this example, we allow the server to
-        dynamically assign all addresses available in the whole subnet. Although
-        rather wasteful, it is certainly a valid configuration to dedicate the
-        whole /64 subnet for that purpose. Note that the Kea server does not preallocate
-        the leases, so there is no danger in using gigantic address pools.
-      </para>
-      <para>
-        When configuring a DHCPv6 server using prefix/length notation, please pay
-        attention to the boundary values. When specifying that the server can use
-        a given pool, it will also be able to allocate the first (typically a network
-        address) address from that pool. For example, for pool 2001:db8:2::/64 the
-        2001:db8:2:: address may be assigned as well. To avoid this,
-        use the "min-max" notation.
-      </para>
-    </section>
-
-    <section>
-      <title>Subnet and Prefix Delegation Pools</title>
-      <para>
-        Subnets may also be configured to delegate prefixes, as defined in
-        <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc8415">RFC 8415</link>,
-        section 6.3. A subnet may have one or more prefix delegation pools.
-        Each pool has a prefixed address, which is specified as a prefix
-        (<command>prefix</command>) and a prefix length
-        (<command>prefix-len</command>), as well as a delegated prefix length
-        (<command>delegated-len</command>). The delegated length must not be
-        shorter than (that is, it must be numerically greater than or equal to) the
-        prefix length. If both the delegated and prefix lengths are equal, the
-        server will be able to delegate only one prefix. The delegated prefix
-        does not have to match the subnet prefix.
-      </para>
-      <para> Below is a sample subnet configuration which enables prefix
-      delegation for the subnet:
-      <screen>
-"Dhcp6": {
-    "subnet6": [
-        {
-            "subnet": "2001:d8b:1::/64",
-            <userinput>"pd-pools": [
-                {
-                    "prefix": "3000:1::",
-                    "prefix-len": 64,
-                    "delegated-len": 96
-                }
-            ]</userinput>
-        }
-    ],
-    ...
-}</screen>
-      </para>
-
-    </section>
-
-    <section xml:id="pd-exclude-option">
-        <title>Prefix Exclude Option</title>
-        <para>
-          For each delegated prefix, the delegating router may choose to exclude
-          a single prefix out of the delegated prefix as specified in
-          <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc6603">RFC 6603</link>.
-          The requesting router must not assign the excluded prefix to any
-          of its downstream interfaces, and it is intended to be used on a
-          link through which the delegating router exchanges DHCPv6 messages with
-          the requesting router. The configuration example below demonstrates how
-          to specify an excluded prefix within a prefix pool definition. The
-          excluded prefix "2001:db8:1:8000:cafe:80::/72" will be sent to a
-          requesting router which includes the Prefix Exclude option in the ORO, and
-          which is delegated a prefix from this pool.
-        </para>
-<screen>
-"Dhcp6": {
-    "subnet6": [
-        {
-            "subnet": "2001:db8:1::/48",
-            "pd-pools": [
-                {
-                    "prefix": "2001:db8:1:8000::",
-                    "prefix-len": 48,
-                    "delegated-len": 64,
-                    "excluded-prefix": "2001:db8:1:8000:cafe:80::",
-                    "excluded-prefix-len": 72
-                }
-            ]
-        }
-    ]
-}
-</screen>
-    </section>
-
-    <section xml:id="dhcp6-std-options">
-      <title>Standard DHCPv6 Options</title>
-      <para>
-        One of the major features of a DHCPv6 server is the ability to provide configuration
-        options to clients. Although there are several options that require
-        special behavior, most options are sent by the server only if the client
-        explicitly requests them. The following example shows how to
-        configure one of the most frequently used options, which supplies the
-        address of DNS servers. Options specified in this way are considered
-        global and apply to all configured subnets.
-
-        <screen>
-"Dhcp6": {
-    "option-data": [
-        {
-           <userinput>"name": "dns-servers",
-           "code": 23,
-           "space": "dhcp6",
-           "csv-format": true,
-           "data": "2001:db8::cafe, 2001:db8::babe"</userinput>
-        },
-        ...
-    ]
-}
-</screen>
-      </para>
-
-    <para>
-      The <command>option-data</command> line creates a new entry in
-      the option-data table. This table contains
-      information on all global options that the server is supposed to configure
-      in all subnets. The <command>name</command> line specifies the option name.
-      (For a complete list
-      of currently supported names, see <xref linkend="dhcp6-std-options-list"/>.) The next line specifies the option code,
-      which must match one of the values from that list. The line beginning with
-      <command>space</command> specifies the option space, which must always be set
-      to "dhcp6" as these are standard DHCPv6 options. For other name spaces,
-      including custom option spaces, see <xref linkend="dhcp6-option-spaces"/>. The following line specifies the format in
-      which the data will be entered; use of CSV (comma-separated values) is
-      recommended. Finally, the <command>data</command> line gives the actual value to be sent to
-      clients. Data is specified as normal text, with values separated by
-      commas if more than one value is allowed.
-    </para>
-
-    <para>
-      Options can also be configured as hexadecimal values. If "csv-format" is
-      set to false, the option data must be specified as a hexadecimal string.
-      The following commands configure the DNS-SERVERS option for all
-      subnets with the following addresses: 2001:db8:1::cafe and
-      2001:db8:1::babe.
-        <screen>
-"Dhcp6": {
-    "option-data": [
-        {
-           <userinput>"name": "dns-servers",
-           "code": 23,
-           "space": "dhcp6",
-           "csv-format": false,
-           "data": "20 01 0D B8 00 01 00 00 00 00 00 00 00 00 CA FE
-                    20 01 0D B8 00 01 00 00 00 00 00 00 00 00 BA BE"</userinput>
-        },
-        ...
-    ]
-}
-        </screen>
-       </para>
-       <note><para>
-       The value for the setting of the "data" element is split across two
-       lines in this example for clarity; when entering the command, the
-       whole string should be entered on the same line.
-       </para></note>
-       <para>
-       Kea supports the following formats when specifying hexadecimal data:
-       <itemizedlist>
-       <listitem>
-       <simpara><command>Delimited octets</command> One or more octets
-       separated by either colons or spaces (':' or ' '). While each octet
-       may contain one or two digits, we strongly recommend always using two
-       digits. Valid examples are "ab:cd:ef" and "ab cd ef".
-       </simpara>
-       </listitem>
-       <listitem>
-       <simpara><command>String of digits</command> A continuous string of
-       hexadecimal digits with or without a "0x" prefix.  Valid examples
-       are "0xabcdef" and "abcdef".
-       </simpara>
-       </listitem>
-       </itemizedlist>
-       Care should be taken to use proper encoding when using hexadecimal
-       format.  Kea's ability to validate data correctness in hexadecimal
-       is limited.
-       </para>
-      <para>
-        Most of the parameters in the "option-data" structure are
-        optional and can be omitted in some circumstances as discussed
-        in <xref linkend="dhcp6-option-data-defaults"/>. Only one
-        of name or code is required; you don't need to specify
-        both. Space has a default value of "dhcp6", so you can skip
-        this as well if you define a regular (not encapsulated) DHCPv6
-        option. Finally, csv-format defaults to true, so it too can
-        be skipped, unless you want to specify the option value as
-        hexstring. Therefore the above example can be simplified to:
-        <screen>
-"Dhcp6": {
-    "option-data": [
-        {
-           <userinput>"name": "dns-servers",
-           "data": "2001:db8::cafe, 2001:db8::babe"</userinput>
-        },
-        ...
-    ]
-}
-        </screen>
-        Defined options are added to the response when the client requests them,
-        as well as any options required by a protocol. An administrator
-        can also specify that an option is always sent, even if a
-        client did not specifically request it. To enforce the addition
-        of a particular option, set the "always-send" flag to true as in:
-        <screen>
-"Dhcp6": {
-    "option-data": [
-        {
-           <userinput>"name": "dns-servers",
-           "data": "2001:db8::cafe, 2001:db8::babe",
-           "always-send": true</userinput>
-        },
-        ...
-    ]
-}
-        </screen>
-        The effect is the same as if the client added the option code in the
-        Option Request Option (or its equivalent for vendor options) so in:
-        <screen>
-"Dhcp6": {
-    "option-data": [
-        {
-           <userinput>"name": "dns-servers",
-           "data": "2001:db8::cafe, 2001:db8::babe",
-           "always-send": true</userinput>
-        },
-        ...
-    ],
-    "subnet6": [
-        {
-           "subnet": "2001:db8:1::/64",
-           "option-data": [
-               {
-                   <userinput>"name": "dns-servers",
-                   "data": "2001:db8:1::cafe, 2001:db8:1::babe"</userinput>
-               },
-               ...
-           ],
-           ...
-        },
-        ...
-    ],
-    ...
-}
-        </screen>
-        The DNS servers option is always added to responses
-        (the always-send is "sticky") but the value is the subnet one
-        when the client is localized in the subnet.
-      </para>
-
-    <para>
-      It is possible to override options on a per-subnet basis. If
-      clients connected to most of your subnets are expected to get the
-      same values of a given option, you should use global options; you
-      can then override specific values for a small number of subnets.
-      On the other hand, if you use different values in each subnet,
-      it does not make sense to specify global option values; rather, you should
-      set only subnet-specific ones.
-     </para>
-
-     <para>
-      The following commands override the global
-      DNS servers option for a particular subnet, setting a single DNS
-      server with address 2001:db8:1::3.
-<screen>
-"Dhcp6": {
-    "subnet6": [
-        {
-            <userinput>"option-data": [
-                {
-                    "name": "dns-servers",
-                    "code": 23,
-                    "space": "dhcp6",
-                    "csv-format": true,
-                    "data": "2001:db8:1::3"
-                },
-                ...
-            ]</userinput>,
-            ...
-        },
-        ...
-    ],
-    ...
-}
-</screen>
-    </para>
-
-     <para>
-       In some cases it is useful to associate some options with an
-       address or prefix pool from which a client is assigned a lease. Pool-
-       specific option values override subnet-specific and global option
-       values. If the client is assigned multiple leases from different
-       pools, the server will assign options from all pools from which the
-       leases have been obtained. However, if the particular option is specified
-       in multiple pools from which the client obtains the leases, only one
-       instance of this option will be handed out to the client. The server's
-       administrator must not try to prioritize assignment of pool-specific
-       options by trying to order pools declarations in the server
-       configuration.
-     </para>
-
-     <para>
-       The following configuration snippet demonstrates how to specify the
-       DNS servers option, which will be assigned to a client only if the
-       client obtains an address from the given pool:
-<screen>
-"Dhcp6": {
-    "subnet6": [
-        {
-            "pools": [
-                {
-                    "pool": "2001:db8:1::100-2001:db8:1::300",
-                    <userinput>"option-data": [
-                        {
-                            "name": "dns-servers",
-                            "data": "2001:db8:1::10"
-                        }
-                    ]</userinput>
-                }
-            ]
-        },
-        ...
-    ],
-    ...
-}
-</screen>
-     </para>
-    <para>
-      Options can also be specified in a class of host reservation scope.
-      The current Kea options precedence order is (from most important):
-      host reservation, pool, subnet, shared network, class, global.
-    </para>
-    <para>
-      The currently supported standard DHCPv6 options are
-      listed in <xref linkend="dhcp6-std-options-list"/>.
-      "Name" and "Code"
-      are the values that should be used as a name/code in the option-data
-      structures. "Type" designates the format of the data; the meanings of
-      the various types is given in <xref linkend="dhcp-types"/>.
-    </para>
-    <para>When a data field is a string, and that string contains
-    the comma (,; U+002C) character, the comma must be escaped with double
-    backslashes (\; U+005C). This double escape is
-    required, because both the routine splitting CSV data into fields
-    and JSON use the same escape character; a single escape (\,) would
-    make the JSON invalid. For example, the string
-    "EST5EDT4,M3.2.0/02:00,M11.1.0/02:00" would be
-    represented as:
-<screen>
-"Dhcp6": {
-    "subnet6": [
-        {
-            "pools": [
-                {
-                    <userinput>"option-data": [
-                        {
-                            "name": "new-posix-timezone",
-                            "data": "EST5EDT4\\,M3.2.0/02:00\\,M11.1.0/02:00"
-                        }
-                    ]</userinput>
-                },
-                ...
-            ],
-            ...
-        },
-        ...
-    ],
-    ...
-}
-</screen>
-    </para>
-    <para>
-      Some options are designated as arrays, which means that more than one
-      value is allowed in such an option. For example, the option dns-servers
-      allows the specification of more than one IPv6 address, enabling
-      clients to obtain the addresses of multiple DNS servers.
-    </para>
-
-<!-- @todo: describe record types -->
-<!-- @todo: describe array in record types -->
-
-      <para>
-        <xref linkend="dhcp6-custom-options"/> describes the configuration
-        syntax to create custom option definitions (formats). Creation of custom
-        definitions for standard options is generally not permitted, even if the
-        definition being created matches the actual option format defined in the
-        RFCs. There is an exception to this rule for standard options for which
-        Kea currently does not provide a definition. In order to use such options,
-        a server administrator must create a definition as described in
-        <xref linkend="dhcp6-custom-options"/> in the 'dhcp6' option space. This
-        definition should match the option format described in the relevant
-        RFC, but the configuration mechanism would allow any option format as it
-        currently has no means to validate it.
-      </para>
-
-    <para>
-      <table frame="all" xml:id="dhcp6-std-options-list">
-        <title>List of Standard DHCPv6 Options</title>
-        <tgroup cols="4">
-        <colspec colname="name"/>
-        <colspec colname="code" align="center"/>
-        <colspec colname="type" align="center"/>
-        <colspec colname="array" align="center"/>
-        <thead>
-          <row><entry>Name</entry><entry>Code</entry><entry>Type</entry><entry>Array?</entry></row>
-        </thead>
-        <tbody>
-<!-- Our engine uses those options on its own, admins must not configure them on their own.
-<row><entry>clientid</entry><entry>1</entry><entry>binary</entry><entry>false</entry></row>
-<row><entry>serverid</entry><entry>2</entry><entry>binary</entry><entry>false</entry></row>
-<row><entry>ia-na</entry><entry>3</entry><entry>record</entry><entry>false</entry></row>
-<row><entry>ia-ta</entry><entry>4</entry><entry>uint32</entry><entry>false</entry></row>
-<row><entry>iaaddr</entry><entry>5</entry><entry>record</entry><entry>false</entry></row>
-<row><entry>oro</entry><entry>6</entry><entry>uint16</entry><entry>true</entry></row> -->
-<row><entry>preference</entry><entry>7</entry><entry>uint8</entry><entry>false</entry></row>
-
-<!-- Our engine uses those options on its own, admins must not configure them on their own.
-<row><entry>elapsed-time</entry><entry>8</entry><entry>uint16</entry><entry>false</entry></row>
-<row><entry>relay-msg</entry><entry>9</entry><entry>binary</entry><entry>false</entry></row>
-<row><entry>auth</entry><entry>11</entry><entry>binary</entry><entry>false</entry></row>
--->
-<row><entry>unicast</entry><entry>12</entry><entry>ipv6-address</entry><entry>false</entry></row>
-<!--
-<row><entry>status-code</entry><entry>13</entry><entry>record</entry><entry>false</entry></row>
-<row><entry>rapid-commit</entry><entry>14</entry><entry>empty</entry><entry>false</entry></row>
-<row><entry>user-class</entry><entry>15</entry><entry>binary</entry><entry>false</entry></row>
-<row><entry>vendor-class</entry><entry>16</entry><entry>record</entry><entry>false</entry></row>
--->
-<!-- Vendor-specific information is configurable by the administrator. -->
-<row><entry>vendor-opts</entry><entry>17</entry><entry>uint32</entry><entry>false</entry></row>
-<!--
-<row><entry>interface-id</entry><entry>18</entry><entry>binary</entry><entry>false</entry></row>
-<row><entry>reconf-msg</entry><entry>19</entry><entry>uint8</entry><entry>false</entry></row>
-<row><entry>reconf-accept</entry><entry>20</entry><entry>empty</entry><entry>false</entry></row> -->
---&gt;
-<row><entry>sip-server-dns</entry><entry>21</entry><entry>fqdn</entry><entry>true</entry></row>
-<row><entry>sip-server-addr</entry><entry>22</entry><entry>ipv6-address</entry><entry>true</entry></row>
-<row><entry>dns-servers</entry><entry>23</entry><entry>ipv6-address</entry><entry>true</entry></row>
-<row><entry>domain-search</entry><entry>24</entry><entry>fqdn</entry><entry>true</entry></row>
-<!-- <row><entry>ia-pd</entry><entry>25</entry><entry>record</entry><entry>false</entry></row> -->
-<!-- <row><entry>iaprefix</entry><entry>26</entry><entry>record</entry><entry>false</entry></row> -->
-<row><entry>nis-servers</entry><entry>27</entry><entry>ipv6-address</entry><entry>true</entry></row>
-<row><entry>nisp-servers</entry><entry>28</entry><entry>ipv6-address</entry><entry>true</entry></row>
-<row><entry>nis-domain-name</entry><entry>29</entry><entry>fqdn</entry><entry>true</entry></row>
-<row><entry>nisp-domain-name</entry><entry>30</entry><entry>fqdn</entry><entry>true</entry></row>
-<row><entry>sntp-servers</entry><entry>31</entry><entry>ipv6-address</entry><entry>true</entry></row>
-<row><entry>information-refresh-time</entry><entry>32</entry><entry>uint32</entry><entry>false</entry></row>
-<row><entry>bcmcs-server-dns</entry><entry>33</entry><entry>fqdn</entry><entry>true</entry></row>
-<row><entry>bcmcs-server-addr</entry><entry>34</entry><entry>ipv6-address</entry><entry>true</entry></row>
-<row><entry>geoconf-civic</entry><entry>36</entry><entry>record (uint8, uint16, binary)</entry><entry>false</entry></row>
-<row><entry>remote-id</entry><entry>37</entry><entry>record (uint32, binary)</entry><entry>false</entry></row>
-<row><entry>subscriber-id</entry><entry>38</entry><entry>binary</entry><entry>false</entry></row>
-<row><entry>client-fqdn</entry><entry>39</entry><entry>record (uint8, fqdn)</entry><entry>false</entry></row>
-<row><entry>pana-agent</entry><entry>40</entry><entry>ipv6-address</entry><entry>true</entry></row>
-<row><entry>new-posix-timezone</entry><entry>41</entry><entry>string</entry><entry>false</entry></row>
-<row><entry>new-tzdb-timezone</entry><entry>42</entry><entry>string</entry><entry>false</entry></row>
-<row><entry>ero</entry><entry>43</entry><entry>uint16</entry><entry>true</entry></row>
-<row><entry>lq-query (1)</entry><entry>44</entry><entry>record (uint8, ipv6-address)</entry><entry>false</entry></row>
-<row><entry>client-data (1)</entry><entry>45</entry><entry>empty</entry><entry>false</entry></row>
-<row><entry>clt-time (1)</entry><entry>46</entry><entry>uint32</entry><entry>false</entry></row>
-<row><entry>lq-relay-data (1)</entry><entry>47</entry><entry>record (ipv6-address, binary)</entry><entry>false</entry></row>
-<row><entry>lq-client-link (1)</entry><entry>48</entry><entry>ipv6-address</entry><entry>true</entry></row>
-<row><entry>v6-lost</entry><entry>51</entry><entry>fqdn</entry><entry>false</entry></row>
-<row><entry>capwap-ac-v6</entry><entry>52</entry><entry>ipv6-address</entry><entry>true</entry></row>
-<row><entry>relay-id</entry><entry>53</entry><entry>binary</entry><entry>false</entry></row>
-<row><entry>v6-access-domain</entry><entry>57</entry><entry>fqdn</entry><entry>false</entry></row>
-<row><entry>sip-ua-cs-list</entry><entry>58</entry><entry>fqdn</entry><entry>true</entry></row>
-<row><entry>bootfile-url</entry><entry>59</entry><entry>string</entry><entry>false</entry></row>
-<row><entry>bootfile-param</entry><entry>60</entry><entry>tuple</entry><entry>true</entry></row>
-<row><entry>client-arch-type</entry><entry>61</entry><entry>uint16</entry><entry>true</entry></row>
-<row><entry>nii</entry><entry>62</entry><entry>record (uint8, uint8, uint8)</entry><entry>false</entry></row>
-<row><entry>aftr-name</entry><entry>64</entry><entry>fqdn</entry><entry>false</entry></row>
-<row><entry>erp-local-domain-name</entry><entry>65</entry><entry>fqdn</entry><entry>false</entry></row>
-<row><entry>rsoo</entry><entry>66</entry><entry>empty</entry><entry>false</entry></row>
-<row><entry>pd-exclude</entry><entry>67</entry><entry>binary</entry><entry>false</entry></row>
-<row><entry>rdnss-selection</entry><entry>74</entry><entry>record (ipv6-address, uint8, fqdn)</entry><entry>true</entry></row>
-<row><entry>client-linklayer-addr</entry><entry>79</entry><entry>binary</entry><entry>false</entry></row>
-<row><entry>link-address</entry><entry>80</entry><entry>ipv6-address</entry><entry>false</entry></row>
-<row><entry>solmax-rt</entry><entry>82</entry><entry>uint32</entry><entry>false</entry></row>
-<row><entry>inf-max-rt</entry><entry>83</entry><entry>uint32</entry><entry>false</entry></row>
-<!-- <row><entry>dhcpv4-message</entry><entry>87</entry><entry>binary</entry><entry>false</entry></row> -->
-<row><entry>dhcp4o6-server-addr</entry><entry>88</entry><entry>ipv6-address</entry><entry>true</entry></row>
-<row><entry>s46-rule</entry><entry>89</entry><entry>record (uint8, uint8, uint8, ipv4-address, ipv6-prefix)</entry><entry>false</entry></row>
-<row><entry>s46-br</entry><entry>90</entry><entry>ipv6-address</entry><entry>false</entry></row>
-<row><entry>s46-dmr</entry><entry>91</entry><entry>ipv6-prefix</entry><entry>false</entry></row>
-<row><entry>s46-v4v6bind</entry><entry>92</entry><entry>record (ipv4-address, ipv6-prefix)</entry><entry>false</entry></row>
-<row><entry>s46-portparams</entry><entry>93</entry><entry>record(uint8, psid)</entry><entry>false</entry></row>
-<row><entry>s46-cont-mape</entry><entry>94</entry><entry>empty</entry><entry>false</entry></row>
-<row><entry>s46-cont-mapt</entry><entry>95</entry><entry>empty</entry><entry>false</entry></row>
-<row><entry>s46-cont-lw</entry><entry>96</entry><entry>empty</entry><entry>false</entry></row>
-<row><entry>v6-captive-portal</entry><entry>103</entry><entry>string</entry><entry>false</entry></row>
-<row><entry>ipv6-address-andsf</entry><entry>143</entry><entry>ipv6-address</entry><entry>true</entry></row>
-        </tbody>
-        </tgroup>
-      </table>
-      Options marked with (1) have option definitions, but the logic
-      behind them is not implemented. That means that technically Kea
-      knows how to parse them in incoming messages or how to send them
-      if configured to do so, but not what to do with them. Since the
-      related RFCs require certain processing, the support for those
-      options is non-functional. However, it may be useful in some
-      limited lab testing; hence the definition formats are listed here.
-    </para>
-    </section>
-
-    <section id="s46-options">
-      <title>Common Softwire46 Options</title>
-      <para>
-        Softwire46 options are involved in IPv4 over IPv6 provisioning by
-        means of tunneling or translation as specified in
-        <ulink url="http://tools.ietf.org/html/rfc7598">RFC 7598</ulink>.
-        The following sections provide configuration examples of these
-        options.
-      </para>
-
-      <section id="s46-containers">
-      <title>Softwire46 Container Options</title>
-      <para>
-        S46 container options group rules and optional port parameters
-        for a specified domain. There are three container options specified
-        in the "dhcp6" (top-level) option space: the MAP-E Container option,
-        the MAP-T Container option, and the S46 Lightweight 4over6 Container option.
-        These options only contain encapsulated options specified below;
-        they do not include any data fields.
-      </para>
-
-      <para>
-        To configure the server to send a specific container option
-        along with all encapsulated options, the container option must be
-        included in the server configuration as shown below:
-<screen>
-"Dhcp6": {
-    ...
-    "option-data": [
-        {
-            "name": "s46-cont-mape"
-        } ],
-    ...
-}
-</screen>
-
-        This configuration will cause the server to include the MAP-E Container
-        option to the client. Use "s46-cont-mapt" or "s46-cont-lw" for the
-        MAP-T Container and S46 Lightweight 4over6 Container options,
-        respectively.
-      </para>
-
-      <para>
-        All remaining Softwire options described below are included in one
-        of the container options. Thus, they have to be included in appropriate
-        option spaces by selecting a "space" name, which specifies in which
-        option they are supposed to be included.
-      </para>
-    </section>
-
-      <section>
-        <title>S46 Rule Option</title>
-        <para>
-          The S46 Rule option is used for conveying the Basic Mapping Rule (BMR)
-          and Forwarding Mapping Rule (FMR).
-<screen>
-{
-    "space": "s46-cont-mape-options",
-    "name": "s46-rule",
-    "data": "128, 0, 24, 192.0.2.0, 2001:db8:1::/64"
-}
-</screen>
-         Another possible "space" value is "s46-cont-mapt-options".
-        </para>
-
-        <para>
-          The S46 Rule option conveys a number of parameters:
-
-      <itemizedlist>
-        <listitem>
-          <simpara><command>flags</command>, an unsigned 8-bit integer, with
-          currently only the most-significant bit specified. It denotes whether
-          the rule can be used for forwarding (128) or not (0).
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara><command>ea-len</command>, an 8-bit-long Embedded Address length. Allowed values
-          range from 0 to 48.</simpara>
-        </listitem>
-
-        <listitem>
-          <simpara><command>IPv4 prefix length</command>, 8 bits long; expresses the prefix length of the
-          Rule IPv4 prefix specified in the ipv4-prefix field. Allowed
-          values range from 0 to 32.</simpara>
-        </listitem>
-
-        <listitem>
-          <simpara><command>IPv4 prefix</command>, a fixed-length 32-bit field that specifies the IPv4
-          prefix for the S46 rule. The bits in the prefix after prefix4-len
-          number of bits are reserved, and MUST be initialized to zero by the
-          sender and ignored by the receiver.</simpara>
-        </listitem>
-
-        <listitem>
-          <simpara><command>IPv6 prefix</command>, in prefix/length notation that specifies the IPv6 domain
-          prefix for the S46 rule. The field is padded on the right with zero
-          bits up to the nearest octet boundary, when prefix6-len is not evenly
-          divisible by 8.</simpara>
-        </listitem>
-
-      </itemizedlist>
-        </para>
-      </section>
-        <section>
-            <title>S46 BR Option</title>
-            <para>
-              The S46 BR option is used to convey the IPv6 address of the
-              Border Relay. This option is mandatory in the MAP-E
-              Container option and is not permitted in the MAP-T and
-              S46 Lightweight 4over6 Container options.
-<screen>
-{
-    "space": "s46-cont-mape-options",
-    "name": "s46-br",
-    "data": "2001:db8:cafe::1",
-}
-</screen>
-           Another possible "space" value is "s46-cont-lw-options".
-          </para>
-        </section>
-
-        <section>
-            <title>S46 DMR Option</title>
-            <para>
-              The S46 DMR option is used to convey values for the Default
-              Mapping Rule (DMR). This option is mandatory in the MAP-T
-              container option and is not permitted in the MAP-E and S46
-              Lightweight 4over6 Container options.
-<screen>
-{
-    "space": "s46-cont-mapt-options",
-    "name": "s46-dmr",
-    "data": "2001:db8:cafe::/64",
-}
-</screen>
-              This option must not be included in other containers.
-            </para>
-        </section>
-
-        <section>
-            <title>S46 IPv4/IPv6 Address Binding option.</title>
-            <para>
-              The S46 IPv4/IPv6 Address Binding option may be used to specify
-              the full or shared IPv4 address of the Customer Edge (CE).
-              The IPv6 prefix field is used by the CE to identify the
-              correct prefix to use for the tunnel source.
-<screen>
-{
-    "space": "s46-cont-lw",
-    "name": "s46-v4v6bind",
-    "data": "192.0.2.3, 2001:db8:1:cafe::/64"
-}
-</screen>
-            This option must not be included in other containers.
-          </para>
-        </section>
-        <section>
-            <title>S46 Port Parameters</title>
-            <para>
-              The S46 Port Parameters option specifies optional port-set
-              information that MAY be provided to CEs.
-<screen>
-{
-    "space": "s46-rule-options",
-    "name": "s46-portparams",
-    "data": "2, 3/4",
-}
-</screen>
-              Another possible "space" value is "s46-v4v6bind", to include
-              this option in the S46 IPv4/IPv6 Address Binding option.
-            </para>
-            <para>
-              Note that the second value in the example above specifies the
-              PSID and PSID-length fields in the format of PSID/PSID length.
-              This is equivalent to the values of PSID-len=4 and
-              PSID=12288 conveyed in the S46 Port Parameters option.
-            </para>
-        </section>
-    </section>
-
-    <section xml:id="dhcp6-custom-options">
-      <title>Custom DHCPv6 Options</title>
-      <para>It is possible to define options in addition to the standard ones.
-      Assume that we want to define a new DHCPv6 option called "foo" which will have
-      code 100 and which will convey a single, unsigned, 32-bit integer value. We can define
-      such an option by using the following commands:
-<screen>
-"Dhcp6": {
-    "option-def": [
-        {
-            <userinput>"name": "foo",
-            "code": 100,
-            "type": "uint32",
-            "array": false,
-            "record-types": "",
-            "space": "dhcp6",
-            "encapsulate": ""</userinput>
-        }, ...
-    ],
-    ...
-}
-</screen>
-      The "false" value of the <command>array</command> parameter determines that the option does
-      NOT comprise an array of "uint32" values but is, instead, a single value. Two
-      other parameters have been left blank: <command>record-types</command> and
-      <command>encapsulate</command>.
-      The former specifies the comma-separated list of option data fields, if the
-      option comprises a record of data fields. The <command>record-types</command> value should
-      be non-empty if <command>type</command> is set to "record"; otherwise it must be left
-      blank. The latter parameter specifies the name of the option space being
-      encapsulated by the particular option. If the particular option does not
-      encapsulate any option space, it should be left blank.  Note that the above
-      example only defines the format of the new option and does not set its
-      value(s).
-      </para>
-
-      <para>Only the <command>name</command>, <command>code</command>, and
-      <command>type</command> parameters are required; all others are
-      optional. The <command>array</command> default value is
-      <command>false</command>. The <command>record-types</command>
-      and <command>encapsulate</command> default values are blank
-      (i.e. ""). The default <command>space</command> is "dhcp6".
-      </para>
-
-      <para>Once the new option format is defined, its value is set
-      in the same way as for a standard option. For example, the following
-      commands set a global value that applies to all subnets.
-<screen>
-"Dhcp6": {
-    "option-data": [
-        {
-            <userinput>"name": "foo",
-            "code": 100,
-            "space": "dhcp6",
-            "csv-format": true,
-            "data": "12345"</userinput>
-        }, ...
-    ],
-    ...
-}
-</screen>
-      </para>
-
-      <para>New options can take more complex forms than simple use of
-      primitives (uint8, string, ipv6-address, etc); it is possible to
-      define an option comprising a number of existing primitives.
-      </para>
-      <para>
-      For example, assume we want to define a new option that will consist of an IPv6
-      address, followed by an unsigned 16-bit integer, followed by a
-      boolean value, followed by a text string. Such an option could
-      be defined in the following way:
-<screen>
-"Dhcp6": {
-    "option-def": [
-        {
-            <userinput>"name": "bar",
-            "code": 101,
-            "space": "dhcp6",
-            "type": "record",
-            "array": false,
-            "record-types": "ipv6-address, uint16, boolean, string",
-            "encapsulate": ""</userinput>
-        }, ...
-    ],
-    ...
-}
-</screen>
-      The "type" is set to "record" to indicate that the option contains
-      multiple values of different types. These types are given as a comma-separated
-      list in the <command>record-types</command> field and should be ones from those listed in <xref linkend="dhcp-types"/>.
-      </para>
-      <para>
-      The values of the options are set in a <command>option-data</command> statement as follows:
-<screen>
-"Dhcp6": {
-    "option-data": [
-        {
-            <userinput>"name": "bar",
-            "space": "dhcp6",
-            "code": 101,
-            "csv-format": true,
-            "data": "2001:db8:1::10, 123, false, Hello World"</userinput>
-        }
-    ],
-    ...
-}</screen>
-
-      <command>csv-format</command> is set to <command>true</command> to indicate
-      that the <command>data</command> field comprises a command-separated list
-      of values. The values in <command>data</command> must correspond to the types set in
-      the <command>record-types</command> field of the option definition.
-      </para>
-
-      <para>
-      When <command>array</command> is set to <command>true</command>
-      and <command>type</command> is set to "record", the last field
-      is an array, i.e. it can contain more than one value, as in:
-<screen>
-"Dhcp6": {
-    "option-def": [
-        {
-            <userinput>"name": "bar",
-            "code": 101,
-            "space": "dhcp6",
-            "type": "record",
-            "array": true,
-            "record-types": "ipv6-address, uint16",
-            "encapsulate": ""</userinput>
-        }, ...
-    ],
-    ...
-}
-</screen>
-      The new option content is one IPv6 address followed by one or more 16-
-      bit unsigned integers.
-      </para>
-
-      <note>
-       <para>In general, boolean values are specified as <command>true</command> or
-       <command>false</command>, without quotes. Some specific boolean parameters may
-       accept also <command>"true"</command>, <command>"false"</command>,
-       <command>0</command>, <command>1</command>, <command>"0"</command>, and
-       <command>"1"</command>.</para>
-      </note>
-
-    </section>
-
-    <section xml:id="dhcp6-vendor-opts">
-      <title>DHCPv6 Vendor-Specific Options</title>
-      <para>
-      Currently there are two option spaces defined for the DHCPv6
-      daemon: "dhcp6" (for top-level DHCPv6 options) and "vendor-opts-space",
-      which is empty by default, but in which options can be defined.
-      Those options are carried in the Vendor-Specific
-      Information option (code 17). The following examples show how to
-      define an option "foo" with code 1 that consists of an IPv6 address,
-      an unsigned 16-bit integer, and a string. The "foo" option is
-      conveyed in a Vendor-Specific Information option, which
-      comprises a single uint32 value that is set to "12345".
-      The sub-option "foo" follows the data field holding this value.
-      <screen>
-"Dhcp6": {
-    "option-def": [
-        {
-            <userinput>"name": "foo",
-            "code": 1,
-            "space": "vendor-opts-space",
-            "type": "record",
-            "array": false,
-            "record-types": "ipv6-address, uint16, string",
-            "encapsulate": ""</userinput>
-        }
-    ],
-    ...
-}</screen>
-     (Note that the option space is set to <command>vendor-opts-space</command>.)
-     Once the option format is defined, the next step is to define actual values
-     for that option:
-<screen>
-"Dhcp6": {
-    "option-data": [
-        {
-            <userinput>"name": "foo",
-            "space": "vendor-opts-space",
-            "data": "2001:db8:1::10, 123, Hello World"</userinput>
-        },
-        ...
-    ],
-    ...
-}</screen>
-    We should also define a value (enterprise-number) for the
-    Vendor-Specific Information option, that conveys our option "foo".
-<screen>
-"Dhcp6": {
-    "option-data": [
-        ...,
-        {
-            <userinput>"name": "vendor-opts",
-            "data": "12345"</userinput>
-        }
-    ],
-    ...
-}</screen>
-    Alternatively, the option can be specified using its code.
-<screen>
-"Dhcp6": {
-    "option-data": [
-        ...,
-        {
-            <userinput>"code": 17,
-            "data": "12345"</userinput>
-        }
-    ],
-    ...
-}</screen>
-      </para>
-    </section>
-
-    <section xml:id="dhcp6-option-spaces">
-      <title>Nested DHCPv6 Options (Custom Option Spaces)</title>
-      <para>It is sometimes useful to define completely new option
-      spaces. This is the case when a user wants their new option to
-      convey sub-options that use a separate numbering scheme, for
-      example sub-options with codes 1 and 2. Those option codes
-      conflict with standard DHCPv6 options, so a separate option
-      space must be defined.
-      </para>
-      <para>Note that the creation of a new option space is not required when
-      defining sub-options for a standard option, because it is
-      created by default if the standard option is meant to convey
-      any sub-options (see <xref linkend="dhcp6-vendor-opts"/>).
-      </para>
-      <para>
-      Assume that we want to have a DHCPv6 option called "container"
-      with code 102 that conveys two sub-options with codes 1 and 2.
-      First we need to define the new sub-options:
-<screen>
-"Dhcp6": {
-    "option-def": [
-        {
-            <userinput>"name": "subopt1",
-            "code": 1,
-            "space": "isc",
-            "type": "ipv6-address",
-            "record-types": "",
-            "array": false,
-            "encapsulate": ""</userinput>
-        },
-        {
-            <userinput>"name": "subopt2",
-            "code": 2,
-            "space": "isc",
-            "type": "string",
-            "record-types": "",
-            "array": false
-            "encapsulate": ""</userinput>
-        }
-    ],
-    ...
-}</screen>
-    Note that we have defined the options to belong to a new option space
-    (in this case, "isc").
-    </para>
-    <para>
-The next step is to define a regular DHCPv6 option and specify that it
-should include options from the new option space:
-<screen>
-"Dhcp6": {
-    "option-def": [
-        ...,
-        {
-            <userinput>"name": "container",
-            "code": 102,
-            "space": "dhcp6",
-            "type": "empty",
-            "array": false,
-            "record-types": "",
-            "encapsulate": "isc"</userinput>
-        }
-    ],
-    ...
-}</screen>
-
-    The name of the option space in which the sub-options are defined is set in
-    the <command>encapsulate</command> field. The <command>type</command> field
-    is set to <command>empty</command>, which limits this option to only carrying
-    data in sub-options.
-    </para>
-    <para>
-    Finally, we can set values for the new options:
-<screen>
-"Dhcp6": {
-    "option-data": [
-        {
-            <userinput>"name": "subopt1",
-            "code": 1,
-            "space": "isc",
-            "data": "2001:db8::abcd"</userinput>
-        },
-        }
-            <userinput>"name": "subopt2",
-            "code": 2,
-            "space": "isc",
-            "data": "Hello world"</userinput>
-        },
-        {
-            <userinput>"name": "container",
-            "code": 102,
-            "space": "dhcp6"</userinput>
-        }
-    ],
-    ...
-}
-</screen>
-    </para>
-
-    <para>Note that it is possible to create an option which carries some data
-    in addition to the sub-options defined in the encapsulated option space.
-    For example, if the "container" option from the previous example were
-    required to carry a uint16 value as well as the sub-options, the <command>type</command>
-    value would have to be set to "uint16" in the option definition. (Such an
-    option would then have the following data structure: DHCP header, uint16
-    value, sub-options.) The value specified with the <command>data</command> parameter â€” which
-    should be a valid integer enclosed in quotes, e.g. "123" â€” would then be
-    assigned to the uint16 field in the "container" option.
-    </para>
-    </section>
-
-    <section xml:id="dhcp6-option-data-defaults">
-      <title>Unspecified Parameters for DHCPv6 Option Configuration</title>
-      <para>In many cases it is not required to specify all parameters for
-      an option configuration and the default values can be used. However, it is
-      important to understand the implications of not specifying some of them,
-      as it may result in configuration errors. The list below explains
-      the behavior of the server when a particular parameter is not explicitly
-      specified:
-
-      <itemizedlist>
-        <listitem>
-          <simpara><command>name</command> - the server requires an option name or
-          option code to identify an option. If this parameter is unspecified, the
-          option code must be specified.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara><command>code</command> - the server requires an option name or
-          option code to identify an option. This parameter may be left unspecified if
-          the <command>name</command> parameter is specified. However, this also
-          requires that the particular option have a definition (either as a
-          standard option or an administrator-created definition for the option
-          using an 'option-def' structure), as the option definition associates an
-          option with a particular name. It is possible to configure an option
-          for which there is no definition (unspecified option format).
-          Configuration of such options requires the use of the option code.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara><command>space</command> - if the option space is unspecified it
-          will default to 'dhcp6', which is an option space holding standard DHCPv6
-          options.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara><command>data</command> - if the option data is unspecified it
-          defaults to an empty value. The empty value is mostly used for the
-          options which have no payload (boolean options), but it is legal to specify
-          empty values for some options which carry variable-length data and which
-          the specification allows a length of 0. For such options, the data parameter
-          may be omitted in the configuration.</simpara>
-        </listitem>
-
-        <listitem>
-          <simpara><command>csv-format</command> - if this value is not
-          specified the server will assume that the option data is specified as
-          a list of comma-separated values to be assigned to individual fields
-          of the DHCP option.
-          </simpara>
-        </listitem>
-      </itemizedlist>
-      </para>
-
-    </section>
-
-    <section xml:id="dhcp6-t1-t2-times">
-      <title>Controlling the Values Sent for T1 and T2 Times</title>
-      <para>
-      According to <link xmlns:xlink="http://www.w3.org/1999/xlink"
-      xlink:href="http://tools.ietf.org/html/rfc8415">RFC 8415, section 21.4</link>,
-      the recommended T1 and T2 values are 50% and 80%
-      of the preferred lease time, repsectively.  Kea can be configured
-      to send values that are specified explicitly or that are calculated as
-      percentages of the preferred lease time.  The server's behavior is governed
-      by combination of configuration parameters, two of which have already been
-      mentioned.
-      </para><para>
-      Beginning with Kea 1.6.0 lease preferred and valid lifetime are extended from
-      single values to triplets with minimum, default and maximum values using:
-      <itemizedlist>
-        <listitem>
-         <simpara><command>min-preferred-lifetime</command> - specifies the minimum preferred lifetime (optional).
-          </simpara>
-        </listitem>
-        <listitem>
-         <simpara><command>preferred-lifetime</command> - specifies the default preferred lifetime.
-          </simpara>
-        </listitem>
-        <listitem>
-         <simpara><command>max-preferred-lifetime</command> - specifies the maximum preferred lifetime (optional).
-          </simpara>
-        </listitem>
-        <listitem>
-         <simpara><command>min-valid-lifetime</command> - specifies the minimum valid lifetime (optional).
-          </simpara>
-        </listitem>
-        <listitem>
-         <simpara><command>valid-lifetime</command> - specifies the default valid lifetime.
-          </simpara>
-        </listitem>
-        <listitem>
-         <simpara><command>max-valid-lifetime</command> - specifies the maximum valid lifetime (optional).
-          </simpara>
-        </listitem>
-      </itemizedlist>
-      When the client does not specify lifetimes the default is used. When
-      it specifies a lifetime using IAADDR or IAPREFIX sub option with not
-      zero values these values are used when they are between configured
-      minimum (lower values are round up) and maximum (larger values are
-      round down) bounds.
-      </para><para>
-      To send specific, fixed values use the following two parameters:
-      <itemizedlist>
-        <listitem>
-          <simpara><command>renew-timer</command> - specifies the value of T1 in
-          seconds.
-          </simpara>
-        </listitem>
-        <listitem>
-          <simpara><command>rebind-timer</command> - specifies the value of T2 in
-          seconds.
-          </simpara>
-        </listitem>
-      </itemizedlist>
-      You may specify any value for T2 greater than or equal to zero.  When specifying
-      T1 it must be less than T2.  This flexibility is allowed to support a use case
-      where admins want to suppress client renewals and rebinds by deferring them beyond
-      the life span of the lease.  This should cause the lease to expire, rather than
-      get renewed by clients.  If T1 is specified as larger than T2, it will be set to
-      zero in the outbound IA.
-      </para>
-
-      <para>
-        In great majority of cases the values should follow this rule: T1 &lt;
-        T2 &lt; preferred lifetime &lt; valid lifetime. Alternatively, both T1
-        and T2 values can be configured to 0, which is a signal to DHCPv6
-        clients that they may renew at their own discretion. However, there are
-        known broken client implementations out there that will start renewing
-        immediately. If you plan to use T1=T2=0 values, please test first and
-        make sure your clients behave rationally.
-      </para>
-
-      <para>
-        In some rare cases there may be a need to disable client's
-        ability to renew addresses. This is undesired from protocol perspective
-        and should be avoided if possible. However, if you want to do this, you
-        can configure your T1 and T2 values to be equal or greater to your valid
-        lifetime. Be advised that this will cause your clients to ocasionally
-        lose their addresses, which is generally perceived as poor
-        service. However, there may be some rare business cases when this is
-        desired (e.g. when you want to break long lasting connections on purpose).
-      </para>
-      <para>
-      Calculating the values is controlled by the following three parameters.
-      <itemizedlist>
-        <listitem>
-          <simpara>
-            <command>calculate-tee-times</command> - when true, T1 and T2 will be
-            calculated as percentages of the valid lease time. It defaults to true.
-          </simpara>
-        </listitem>
-        <listitem>
-          <simpara>
-            <command>t1-percent</command> - the percentage of the valid lease time to
-            use for T1. It is expressed as a real number between 0.0 and 1.0 and must
-            be less than t2-percent. The default value is 0.5 per RFC 8415.
-          </simpara>
-        </listitem>
-        <listitem>
-          <simpara>
-            <command>t2-percent</command> - the percentage of the valid lease time to
-            use for T2. It is expressed as a real number between 0.0 and 1.0 and must
-            be greater than t1-percent. The default value is 0.8 per RFC 8415.
-          </simpara>
-        </listitem>
-        </itemizedlist>
-      </para>
-      <note>
-      In the event that both explicit values are specified and
-      calculate-tee-times is true, the server will use the explicit
-      values.  If you plan on having a mixture where some subnets or
-      share-networks will use explicit values and some will use
-      calculated values you must not define the explicit values at any
-      level higher than where they will be used.  Inheriting them from
-      too high of a scope, such as global, will cause them to have
-      values at every level underneath (shared-networks and subnets),
-      effectively disabling calculated values.
-      </note>
-    </section>
-
-    <section xml:id="dhcp6-config-subnets">
-      <title>IPv6 Subnet Selection</title>
-      <para>
-        The DHCPv6 server may receive requests from local (connected to the
-        same subnet as the server) and remote (connected via relays) clients.
-        As the server may have many subnet configurations defined, it must select
-        an appropriate subnet for a given request.
-      </para>
-      <para>
-        In IPv4, the server can determine which of the configured subnets are local,
-        as there is a reasonable expectation that the
-        server will have a (global) IPv4 address configured on the interface,
-        and it can use that information to detect whether a subnet is local.
-        That assumption is not true in IPv6; the DHCPv6 server must be able
-        to operate while only using link-local addresses. Therefore, an optional
-        <command>interface</command> parameter is available within a subnet definition
-        to designate that a given subnet is local, i.e. reachable directly over
-        the specified interface. For example, the server that is intended to serve
-        a local subnet over eth0 may be configured as follows:
-        <screen>
-"Dhcp6": {
-    "subnet6": [
-        {
-            "subnet": "2001:db8:beef::/48",
-            "pools": [
-                 {
-                     "pool": "2001:db8:beef::/48"
-                 }
-             ],
-            <userinput>"interface": "eth0"</userinput>
-        }
-    ],
-    ...
-}
-</screen>
-        </para>
-      </section>
-
-      <section xml:id="dhcp6-rapid-commit">
-        <title>Rapid Commit</title>
-        <para>The Rapid Commit option, described in
-        <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc8415">RFC 8415</link>, is supported
-        by the Kea DHCPv6 server. However, support is disabled by default. It can be enabled on a per-subnet basis using the
-        <command>rapid-commit</command> parameter as shown below:
-<screen>
-"Dhcp6": {
-    "subnet6": [
-        {
-            "subnet": "2001:db8:beef::/48",
-            <userinput>"rapid-commit": true</userinput>,
-            "pools": [
-                 {
-                     "pool": "2001:db8:beef::1-2001:db8:beef::10"
-                 }
-             ],
-        }
-    ],
-    ...
-}
-</screen>
-        </para>
-        <para>
-          This setting only affects the subnet for which the
-          <command>rapid-commit</command> is set to <command>true</command>.
-          For clients connected to other subnets, the server will ignore the
-          Rapid Commit option sent by the client and will follow the 4-way
-          exchange procedure, i.e. respond with an Advertise for a Solicit
-          containing a Rapid Commit option.
-        </para>
-      </section>
-
-      <section xml:id="dhcp6-relays">
-        <title>DHCPv6 Relays</title>
-        <para>
-          A DHCPv6 server with multiple subnets defined must select the
-          appropriate subnet when it receives a request from a client. For clients
-          connected via relays, two mechanisms are used:
-        </para>
-        <para>
-          The first uses the linkaddr field in the RELAY_FORW message. The name
-          of this field is somewhat misleading in that it does not contain a link-layer
-          address; instead, it holds an address (typically a global address) that is
-          used to identify a link. The DHCPv6 server checks to see whether the address belongs
-          to a defined subnet and, if it does, that subnet is selected for the client's
-          request.
-        </para>
-        <para>
-          The second mechanism is based on interface-id options. While forwarding a client's
-          message, relays may insert an interface-id option into the message that
-          identifies the interface on the relay that received the message. (Some
-          relays allow configuration of that parameter, but it is sometimes
-          hardcoded and may range from the very simple (e.g. "vlan100") to the very cryptic;
-          one example seen on real hardware was "ISAM144|299|ipv6|nt:vp:1:110"). The
-          server can use this information to select the appropriate subnet.
-          The information is also returned to the relay, which then knows the
-          interface to use to transmit the response to the client. For
-          this to work successfully, the relay interface IDs must be unique within
-          the network and the server configuration must match those values.
-        </para>
-        <para>
-          When configuring the DHCPv6 server, it should be noted that two
-          similarly named parameters can be configured for a subnet:
-          <itemizedlist>
-            <listitem><simpara>
-              <command>interface</command> defines which local network interface can be used
-              to access a given subnet.
-            </simpara></listitem>
-            <listitem><simpara>
-              <command>interface-id</command> specifies the content of the interface-id option
-              used by relays to identify the interface on the relay to which
-              the response packet is sent.
-            </simpara></listitem>
-          </itemizedlist>
-          The two are mutually exclusive; a subnet cannot be reachable both locally
-          (direct traffic) and via relays (remote traffic). Specifying both is a
-          configuration error and the DHCPv6 server will refuse such a configuration.
-        </para>
-
-        <para>
-          The following example configuration shows how to specify an interface-id with
-          a value of "vlan123":
-          <screen>
-"Dhcp6": {
-    "subnet6": [
-        {
-            "subnet": "2001:db8:beef::/48",
-            "pools": [
-                 {
-                     "pool": "2001:db8:beef::/48"
-                 }
-             ],
-            <userinput>"interface-id": "vlan123"</userinput>
-        }
-    ],
-    ...
-}
-</screen>
-        </para>
-      </section>
-
-    <section xml:id="dhcp6-rsoo">
-      <title>Relay-Supplied Options</title>
-      <para><link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc6422">RFC 6422</link>
-      defines a mechanism called Relay-Supplied DHCP Options. In certain cases relay
-      agents are the only entities that may have specific information, and they can
-      insert options when relaying messages from the client to the server. The
-      server will then do certain checks and copy those options to the response
-      sent to the client.</para>
-
-      <para>There are certain conditions that must be met for the option to be
-      included. First, the server must not provide the option itself; in
-      other words, if both relay and server provide an option, the server always
-      takes precedence. Second, the option must be RSOO-enabled. (RSOO is the "Relay Supplied Options option.") IANA maintains a
-      list of RSOO-enabled options <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#options-relay-supplied">here</link>.
-      However, there may be cases when system administrators want to echo other
-      options. Kea can be instructed to treat other options as RSOO-enabled.
-      For example, to mark options 110, 120, and 130 as RSOO-enabled, the following
-      syntax should be used:
-<screen>
-"Dhcp6": {
-    <userinput>"relay-supplied-options": [ "110", "120", "130" ],</userinput>
-    ...
-}
-</screen>
-      </para>
-      <para>As of February 2019, only option 65 is RSOO-enabled by IANA. This
-      option will always be treated as such, so there is no need to explicitly
-      mark it. Also, when enabling standard options, it is possible to use their
-      names, rather than option code, e.g. use
-      <command>dns-servers</command> instead of <command>23</command>. See
-      <xref linkend="dhcp6-std-options-list"/> for the names. In certain cases
-      it could also work for custom options, but due to the nature of the parser
-      code this may be unreliable and should be avoided.
-      </para>
-
-    </section>
-
-    <section xml:id="dhcp6-client-classifier">
-      <title>Client Classification in DHCPv6</title>
-      <para>
-      The DHCPv6 server includes support for client classification.  For a deeper
-      discussion of the classification process see <xref linkend="classify"/>.
-      </para>
-
-      <para>
-      In certain cases it is useful to configure the server to differentiate between
-      DHCP client types and treat them accordingly. Client
-      classification can be used to modify the behavior of almost any part of
-      the DHCP message processing. In the current release of Kea, there are three
-      mechanisms that take advantage of client classification in DHCPv6: subnet
-      selection, address pool selection, and DHCP options assignment.
-      </para>
-
-      <para>
-      Kea can be instructed to limit access to given subnets based on class information.
-      This is particularly useful for cases where two types of devices share the
-      same link and are expected to be served from two different subnets. The
-      primary use case for such a scenario is cable networks, where there are two
-      classes of devices: the cable modem itself, which should be handed a lease
-      from subnet A; and all other devices behind the modem, which should get a lease
-      from subnet B. That segregation is essential to prevent overly curious
-      users from playing with their cable modems. For details on how to set up
-      class restrictions on subnets, see <xref linkend="classification-subnets"/>.
-      </para>
-
-      <para>
-      When subnets belong to a shared network, the classification applies
-      to subnet selection but not to pools, e.g., a pool in a subnet
-      limited to a particular class can still be used by clients which do not
-      belong to the class, if the pool they are expected to use is exhausted.
-      So the limit on access based on class information is also available
-      at the address/prefix pool level; see <xref
-      linkend="classification-pools"/>, within a subnet.
-      This is useful when segregating clients belonging to the same subnet
-      into different address ranges.
-      </para>
-
-      <para>
-      In a similar way, a pool can be constrained to serve only known
-      clients, i.e. clients which have a reservation, using the
-      built-in "KNOWN" or "UNKNOWN" classes. One can assign addresses
-      to registered clients without giving a different address per
-      reservation, for instance when there are not enough available
-      addresses. The determination whether there is a reservation
-      for a given client is made after a subnet is selected, so it
-      is not possible to use KNOWN/UNKNOWN classes to select a shared
-      network or a subnet.
-      </para>
-
-      <para>
-      The process of classification is conducted in five steps.
-      The first step is to assess an incoming packet and assign it to
-      zero or more classes.
-      Next, a subnet is chosen, possibly based on the
-      class information. When the incoming packet is in the special
-      class, "DROP", it is dropped and a debug message logged.
-      After that, class expressions are evaluated depending on the
-      built-in "KNOWN"/"UNKNOWN" classes after host reservation lookup,
-      using them for pool/pd-pool selection and assigning classes from host
-      reservations.
-      The list of required classes is then built and each class of the list
-      has its expression evaluated; when it returns "true" the packet is added
-      as a member of the class.
-      Finally, options are assigned, again possibly based on the class
-      information.
-      More complete and detailed information is available in
-      <xref linkend="classify"/>.
-      </para>
-
-      <para>
-      There are two main methods of classification. The first is automatic and relies
-      on examining the values in the vendor class options or the existence of a
-      host reservation. Information from these
-      options is extracted, and a class name is constructed from it and added to
-      the class list for the packet. The second specifies an expression
-      that is evaluated for each packet. If the result is "true", the packet is
-      a member of the class.
-      </para>
-
-      <note><para>
-        Care should be taken with client classification, as it is easy for
-        clients that do not meet class criteria to be denied all service.
-      </para></note>
-
-      <section>
-        <title>Defining and Using Custom Classes</title>
-        <para>
-        The following example shows how to configure a class using an expression
-        and a subnet using that class. This configuration defines the
-        class named "Client_enterprise". It is comprised
-        of all clients whose client identifiers start with the given hex string (which
-        would indicate a DUID based on an enterprise id of 0xAABBCCDD).
-        They will be given an address from 2001:db8:1::0 to 2001:db8:1::FFFF and
-        the addresses of their DNS servers set to 2001:db8:0::1 and 2001:db8:2::1.
-
-        <screen>
-"Dhcp6": {
-    "client-classes": [
-        {<userinput>
-            "name": "Client_enterprise",
-            "test": "substring(option[1].hex,0,6) == 0x0002AABBCCDD",
-            "option-data": [
-                {
-                    "name": "dns-servers",
-                    "code": 23,
-                    "space": "dhcp6",
-                    "csv-format": true,
-                    "data": "2001:db8:0::1, 2001:db8:2::1"
-                }
-            ]</userinput>
-        },
-        ...
-    ],
-    "subnet6": [
-        {
-            "subnet": "2001:db8:1::/64",
-            "pools": [ { "pool": "2001:db8:1::-2001:db8:1::ffff" } ],
-            <userinput>"client-class": "Client_enterprise"</userinput>
-        }
-    ],
-    ...
-}</screen>
-      </para>
-
-      <para>
-      This example shows a configuration using an automatically generated
-      "VENDOR_CLASS_" class. The administrator of the network has
-      decided that addresses in the range 2001:db8:1::1 to 2001:db8:1::ffff are
-      to be managed by the DHCP6 server and that only clients belonging to the
-      eRouter1.0 client class are allowed to use that pool.
-
-        <screen>
-"Dhcp6": {
-    "subnet6": [
-        {
-            "subnet": "2001:db8:1::/64",
-            "pools": [
-                 {
-                     "pool": "2001:db8:1::-2001:db8:1::ffff"
-                 }
-             ],
-            <userinput>"client-class": "VENDOR_CLASS_eRouter1.0"</userinput>
-        }
-    ],
-    ...
-}
-</screen>
-        </para>
-      </section>
-
-      <section id="dhcp6-required-class">
-        <title>Required Classification</title>
-        <para>
-        In some cases it is useful to limit the scope of a class to
-        a shared-network, subnet, or pool. There are two parameters
-        which are used to limit the scope of the class by instructing
-        the server to perform evaluation of test expressions when
-        required.
-        </para>
-
-        <para>
-        The first one is the per-class <command>only-if-required</command>
-        flag which is false by default. When it is set to
-        <command>true</command>, the test expression of the class is not
-        evaluated at the reception of the incoming packet but later, and
-        only if the class evaluation is required.
-        </para>
-
-        <para>
-        The second is <command>require-client-classes</command>, which
-        takes a list of class names and is valid in shared-network,
-        subnet, and pool scope. Classes in these lists are marked as
-        required and evaluated after selection of this specific
-        shared-network/subnet/pool and before output option processing.
-        </para>
-
-        <para>
-        In this example, a class is assigned to the incoming packet
-        when the specified subnet is used:
-
-        <screen>
-"Dhcp6": {
-    "client-classes": [
-       {<userinput>
-           "name": "Client_foo",
-           "test": "member('ALL')",
-           "only-if-required": true</userinput>
-       },
-       ...
-    ],
-    "subnet6": [
-        {
-            "subnet": "2001:db8:1::/64"
-            "pools": [
-                 {
-                     "pool": "2001:db8:1::-2001:db8:1::ffff"
-                 }
-             ],
-            <userinput>"require-client-classes": [ "Client_foo" ],</userinput>
-            ...
-        },
-        ...
-    ],
-    ...
-}</screen>
-         </para>
-
-         <para>
-         Required evaluation can be used to express complex dependencies,
-         for example, subnet membership. It can also be used to reverse the
-         precedence; if you set an option-data in a subnet it takes
-         precedence over an option-data in a class. When you move the
-         option-data to a required class and require it in
-         the subnet, a class evaluated earlier may take precedence.
-         </para>
-
-         <para>
-         Required evaluation is also available at shared-network and
-         pool/pd-pool levels. The order in which required classes are
-         considered is: shared-network, subnet, and (pd-)pool, i.e.
-         the opposite order that option-data is processed.
-         </para>
-
-       </section>
-    </section>
-
-    <section xml:id="dhcp6-ddns-config">
-      <title>DDNS for DHCPv6</title>
-      <para>
-      As mentioned earlier, kea-dhcp6 can be configured to generate requests to
-      the DHCP-DDNS server (referred to here as "D2") to update
-      DNS entries. These requests are known as Name Change Requests or NCRs.
-      Each NCR contains the following information:
-      <orderedlist>
-      <listitem><para>
-      Whether it is a request to add (update) or remove DNS entries
-      </para></listitem>
-      <listitem><para>
-      Whether the change requests forward DNS updates (AAAA records), reverse
-      DNS updates (PTR records), or both
-      </para></listitem>
-      <listitem><para>
-      The Fully Qualified Domain Name (FQDN), lease address, and DHCID (information identifying the client associated with the FQDN)
-      </para></listitem>
-      </orderedlist>
-      The parameters controlling the generation of NCRs for submission to D2
-      are contained in the <command>dhcp-ddns</command> section of the kea-dhcp6 server
-      configuration. The mandatory parameters for the DHCP DDNS configuration
-      are <command>enable-updates</command>, which is unconditionally
-      required, and <command>qualifying-suffix</command>, which has no
-      default value and is required when <command>enable-updates</command>
-      is set to <command>true</command>.
-
-      The two (disabled and enabled) minimal DHCP DDNS configurations are:
-<screen>
-"Dhcp6": {
-    "dhcp-ddns": {
-        <userinput>"enable-updates": false</userinput>
-    },
-    ...
-}
-</screen>
-      and for example:
-<screen>
-"Dhcp6": {
-    "dhcp-ddns": {
-        <userinput>"enable-updates": true,
-        "qualifying-suffix": "example."</userinput>
-    },
-    ...
-}
-</screen>
-
-      The default values for the "dhcp-ddns" section are as follows:
-      <itemizedlist>
-      <listitem><simpara>
-      <command>"server-ip": "127.0.0.1"</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"server-port": 53001</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"sender-ip": ""</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"sender-port": 0</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"max-queue-size": 1024</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"ncr-protocol": "UDP"</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"ncr-format": "JSON"</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"override-no-update": false</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"override-client-update": false</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"replace-client-name": "never"</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"generated-prefix": "myhost"</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"hostname-char-set": ""</command>
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>"hostname-char-replacement": ""</command>
-      </simpara></listitem>
-      </itemizedlist>
-      </para>
-
-      <section xml:id="dhcpv6-d2-io-config">
-      <title>DHCP-DDNS Server Connectivity</title>
-      <para>
-      For NCRs to reach the D2 server, kea-dhcp6 must be able
-      to communicate with it. kea-dhcp6 uses the following configuration
-      parameters to control this communication:
-      <itemizedlist>
-      <listitem><simpara>
-      <command>enable-updates</command> - determines whether kea-dhcp6 will
-      generate NCRs. If missing, this value is assumed to be false, so DDNS updates
-      are disabled. To enable DDNS updates set this value to true.
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>server-ip</command> - IP address on which D2 listens for requests. The default is
-      the local loopback interface at address 127.0.0.1. You may specify
-      either an IPv4 or IPv6 address.
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>server-port</command> - port on which D2 listens for requests. The default value
-      is 53001.
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>sender-ip</command> - IP address which kea-dhcp6 uses to send requests to D2.
-      The default value is blank, which instructs kea-dhcp6 to select a suitable
-      address.
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>sender-port</command> - port which kea-dhcp6 uses to send requests to D2. The
-      default value of 0 instructs kea-dhcp6 to select a suitable port.
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>max-queue-size</command> - maximum number of requests allowed to queue waiting to
-      be sent to D2. This value guards against requests accumulating
-      uncontrollably if they are being generated faster than they can be
-      delivered. If the number of requests queued for transmission reaches
-      this value, DDNS updating will be turned off until the queue backlog has
-      been sufficiently reduced. The intent is to allow kea-dhcp6 to
-      continue lease operations without running the risk that its memory usage
-      grows without limit. The default value is 1024.
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>ncr-protocol</command> - socket protocol to use when sending requests to D2. Currently
-      only UDP is supported.
-      </simpara></listitem>
-      <listitem><simpara>
-      <command>ncr-format</command> - packet format to use when sending requests to D2.
-      Currently only JSON format is supported.
-      </simpara></listitem>
-      </itemizedlist>
-      By default, kea-dhcp-ddns is assumed to be running on the same machine as kea-dhcp6, and
-      all of the default values mentioned above should be sufficient.
-      If, however, D2 has been configured to listen on a different address or
-      port, these values must altered accordingly. For example, if D2 has been
-      configured to listen on 2001:db8::5 port 900, the following configuration
-      is required:
-<screen>
-"Dhcp6": {
-    "dhcp-ddns": {
-        <userinput>"server-ip": "2001:db8::5",
-        "server-port": 900</userinput>,
-        ...
-    },
-    ...
-}
-</screen>
-      </para>
-      </section>
-      <section xml:id="dhcpv6-d2-rules-config">
-      <title>When Does the kea-dhcp6 Server Generate a DDNS Request?</title>
-      <para>kea-dhcp6 follows the behavior prescribed for DHCP servers in
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc4704">RFC 4704</link>.
-      It is important to keep in mind that kea-dhcp6 makes the initial
-      decision of when and what to update and forwards that
-      information to D2 in the form of NCRs. Carrying out the actual
-      DNS updates and dealing with such things as conflict resolution
-      are within the purview of D2 itself (<xref linkend="dhcp-ddns-server"/>).
-      This section describes when kea-dhcp6 will generate NCRs and the
-      configuration parameters that can be used to influence this decision.
-      It assumes that the <command>enable-updates</command> parameter is true.
-      </para>
-      <note>
-        <para>
-        Currently the interface between kea-dhcp6 and D2 only supports requests
-        which update DNS entries for a single IP address. If a lease grants
-        more than one address, kea-dhcp6 will create the DDNS update request for
-        only the first of these addresses.
-        </para>
-      </note>
-      <para>
-      In general, kea-dhcp6 will generate DDNS update requests when:
-      <orderedlist>
-      <listitem><para>
-      A new lease is granted in response to a DHCPREQUEST
-      </para></listitem>
-      <listitem><para>
-      An existing lease is renewed but the FQDN associated with it has
-      changed
-      </para></listitem>
-      <listitem><para>
-      An existing lease is released in response to a DHCPRELEASE
-      </para></listitem>
-      </orderedlist>
-      In the second case, lease renewal, two DDNS requests will be issued: one
-      request to remove entries for the previous FQDN, and a second request to
-      add entries for the new FQDN. In the last case, a lease release, a
-      single DDNS request to remove its entries will be made.
-      </para>
-      <para>
-      The decisions involved when granting a new lease the first case) are more
-      complex. When a new lease is granted, kea-dhcp6 will generate a DDNS
-      update request only if the DHCPREQUEST contains the FQDN option (code 39).
-      By default, kea-dhcp6 will respect the FQDN N and S flags specified by the client
-      as shown in the following table:
-      </para>
-        <table xml:id="dhcp6-fqdn-flag-table">
-          <title>Default FQDN Flag Behavior</title>
-          <tgroup cols="4" align="left">
-          <colspec colname="cflags"/>
-          <colspec colname="meaning"/>
-          <colspec colname="response"/>
-          <colspec colname="sflags"/>
-          <thead>
-              <row>
-                <entry>Client Flags:N-S</entry>
-                <entry>Client Intent</entry>
-                <entry>Server Response</entry>
-                <entry>Server Flags:N-S-O</entry>
-              </row>
-          </thead>
-          <tbody>
-            <row>
-                <entry>0-0</entry>
-                <entry>
-                Client wants to do forward updates, server should do reverse updates
-                </entry>
-                <entry>Server generates reverse-only request</entry>
-                <entry>1-0-0</entry>
-            </row>
-            <row>
-                <entry>0-1</entry>
-                <entry>Server should do both forward and reverse updates</entry>
-                <entry>Server generates request to update both directions</entry>
-                <entry>0-1-0</entry>
-            </row>
-            <row>
-                <entry>1-0</entry>
-                <entry>Client wants no updates done</entry>
-                <entry>Server does not generate a request</entry>
-                <entry>1-0-0</entry>
-            </row>
-          </tbody>
-          </tgroup>
-        </table>
-      <para>
-      The first row in the table above represents "client delegation". Here
-      the DHCP client states that it intends to do the forward DNS updates and
-      the server should do the reverse updates. By default, kea-dhcp6 will honor
-      the client's wishes and generate a DDNS request to D2 to update only
-      reverse DNS data. The parameter <command>override-client-update</command> can be used
-      to instruct the server to override client delegation requests. When
-      this parameter is true, kea-dhcp6 will disregard requests for client
-      delegation and generate a DDNS request to update both forward and
-      reverse DNS data. In this case, the N-S-O flags in the server's
-      response to the client will be 0-1-1 respectively.
-      </para>
-      <para>
-      (Note that the flag combination N=1, S=1 is prohibited according to
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc4702">RFC 4702</link>. If such a
-      combination is received from the client, the packet will be dropped by kea-dhcp6.)
-      </para>
-      <para>
-      To override client delegation, set the following values in the configuration file:
-      </para>
-<screen>
-"Dhcp6": {
-    "dhcp-ddns": {
-        <userinput>"override-client-update": true</userinput>,
-        ...
-    },
-    ...
-}
-</screen>
-      <para>
-      The third row in the table above describes the case in which the client
-      requests that no DNS updates be done. The parameter, <command>override-no-update</command>,
-      can be used to instruct the server to disregard the client's wishes. When
-      this parameter is true, kea-dhcp6 will generate DDNS update requests to
-      kea-dhcp-ddns even if the client requests no updates be done. The N-S-O
-      flags in the server's response to the client will be 0-1-1.
-      </para>
-      <para>
-      To override client delegation, issue the following commands:
-      </para>
-<screen>
-"Dhcp6": {
-    "dhcp-ddns": {
-        <userinput>"override-no-update": true</userinput>,
-        ...
-    },
-    ...
-}
-</screen>
-      </section>
-      <section xml:id="dhcpv6-fqdn-name-generation">
-      <title>kea-dhcp6 Name Generation for DDNS Update Requests</title>
-      <para>Each Name Change Request must of course include the fully qualified
-      domain name whose DNS entries are to be affected. kea-dhcp6 can be
-      configured to supply a portion or all of that name, based upon what it
-      receives from the client in the DHCPREQUEST.</para>
-      <para>
-       The default rules for constructing the FQDN that will be used for DNS
-       entries are:
-      <orderedlist>
-      <listitem><para>
-        If the DHCPREQUEST contains the client FQDN option, take the candidate name
-        from there.
-      </para></listitem>
-      <listitem><para>
-        If the candidate name is a partial (i.e. unqualified) name, then add a
-        configurable suffix to the name and use the result as the FQDN.
-      </para></listitem>
-      <listitem><para>
-        If the candidate name provided is empty, generate an FQDN using a
-        configurable prefix and suffix.
-      </para></listitem>
-      <listitem><para>
-        If the client provided neither option, then no DNS action will be taken.
-      </para></listitem>
-      </orderedlist>
-        These rules can be amended by setting the
-        <command>replace-client-name</command> parameter, which provides the
-        following modes of behavior:
-      <itemizedlist>
-      <listitem><para>
-        <command>never</command> - Use the name the client sent. If the client
-        sent no name, do not generate one. This is the default mode.
-      </para></listitem>
-      <listitem><para>
-        <command>always</command> - Replace the name the client sent. If the
-        client sent no name, generate one for the client.
-      </para></listitem>
-      <listitem><para>
-        <command>when-present</command> - Replace the name the client sent.
-        If the client sent no name, do not generate one.
-      </para></listitem>
-      <listitem><para>
-        <command>when-not-present</command> - Use the name the client sent.
-        If the client sent no name, generate one for the client.
-      </para></listitem>
-      </itemizedlist>
-    <note>
-    Note that in early versions of Kea, this parameter was a boolean and permitted only values
-    of <command>true</command> and <command>false</command>. Boolean values
-    have been deprecated and are no longer accepted. If you are currently using
-    booleans, you must replace them with the desired mode name. A value of
-    <command>true</command> maps to <command>"when-present"</command>, while
-    <command>false</command> maps to <command>"never"</command>.
-    </note>
-
-      For example, to instruct kea-dhcp6 to always generate the FQDN for a
-      client, set the parameter <command>replace-client-name</command> to
-      <command>always</command> as follows:
-      </para>
-<screen>
-"Dhcp6": {
-    "dhcp-ddns": {
-        <userinput>"replace-client-name": "always"</userinput>,
-        ...
-    },
-    ...
-}
-</screen>
-      <para>
-      The prefix used in the generation of an FQDN is specified by the
-      <command>generated-prefix</command> parameter. The default value is "myhost". To alter
-      its value, simply set it to the desired string:
-      </para>
-<screen>
-"Dhcp6": {
-    "dhcp-ddns": {
-        <userinput>"generated-prefix": "another.host"</userinput>,
-        ...
-    },
-    ...
-}
-</screen>
-      <para>
-      The suffix used when generating an FQDN, or when qualifying a
-      partial name, is specified by
-      the <command>qualifying-suffix</command> parameter. This
-      parameter has no default value, thus it is mandatory when
-      DDNS updates are enabled.
-      To set its value simply set it to the desired string:
-      </para>
-<screen>
-"Dhcp6": {
-    "dhcp-ddns": {
-        <userinput>"qualifying-suffix": "foo.example.org"</userinput>,
-        ...
-    },
-    ...
-}
-</screen>
-      </section>
-      <para>
-      When qualifying a partial name, kea-dhcp6 will construct the name in the
-      format:
-      </para>
-      <para>
-        [candidate-name].[qualifying-suffix].
-      </para>
-      <para>
-      where candidate-name is the partial name supplied in the DHCPREQUEST.
-      For example, if the FQDN domain name value is "some-computer" and the
-      qualifying-suffix "example.com", the generated FQDN is:
-      </para>
-      <para>
-        some-computer.example.com.
-      </para>
-      <para>
-      When generating the entire name, kea-dhcp6 will construct the name in the
-      format:
-      </para>
-      <para>
-        [generated-prefix]-[address-text].[qualifying-suffix].
-      </para>
-      <para>
-      where address-text is simply the lease IP address converted to a
-      hyphenated string. For example, if the lease address is 3001:1::70E,
-      the qualifying suffix "example.com", and the default value is used for
-      <command>generated-prefix</command>, the generated FQDN would be:
-      </para>
-      <para>
-        myhost-3001-1--70E.example.com.
-      </para>
-      <section xml:id="host-name-sanitization">
-        <title>Sanitizing Client FQDN Names</title>
-        It may be that some of your DHCP clients provide values in the name
-        component of the FQDN option (Option code 39) that contain undesirable
-        characters. It is possible to configure kea-dhcp6 to sanitize these
-        values. The most typical use case is ensuring that only
-        characters that are permitted by RFC 1035 be included:
-        A-Z,a-z,0-9, and '-'.
-
-        This may be accomplished with the following two parameters:
-        <itemizedlist>
-        <listitem><simpara>
-        <command>hostname-char-set</command> - a regular expression describing
-        the invalid character set. This can be any valid, regular expression
-        using POSIX extended expression syntax. For example, "[^A-Za-z0-9-]"
-        would replace any character other than the letters A through z, digits
-        0 through 9, and '-'. An empty string, the default value, disables
-        sanitization.
-        </simpara></listitem>
-        <listitem><simpara>
-        <command>hostname-char-replacement</command> - a string of zero or
-        more characters with which to replace each invalid character in the
-        client value. The default value is an empty string and will cause
-        invalid characters to be OMITTED rather than replaced.
-        </simpara></listitem>
-        </itemizedlist>
-        The following configuration will replace anything other than a
-        letter, digit, hyphen, or dot with the letter 'x':
-<screen>
-"Dhcp4": {
-    "dhcp-ddns": {
-        "hostname-char-set": "[^A-Za-z0-9.-]",
-        "hostname-char-replacement": "x",
-        ...
-    },
-    ...
-}
-</screen>
-        Thus, a client supplied value of "myhost-$[123.org" would become
-        "myhost-xx123.org". Sanitizing is performed only on the portion of
-        the name supplied by the client, and it is performed before applying
-        a qualifying suffix (if one is defined and needed).
-        <note>
-        The following are some considerations to keep in mind:
-        <para>
-        Name sanitizing is meant to catch the more common cases of invalid
-        characters through a relatively simple character-replacement scheme.
-        It is difficult to devise a scheme that works well in all cases.
-        If you find you have clients that are using odd corner cases of
-        character combinations that cannot be readily handled with this
-        mechanism, you should consider writing a hook that can carry out
-        sufficiently complex logic to address your needs.
-        </para>
-        <para>
-        Do not include dots in your hostname-char-set expression.
-        When scrubbing FQDNs, dots are treated as delimiters and used to
-        separate the option value into individual domain labels that are
-        scrubbed and then re-assembled.
-        </para>
-        <para>
-        If your clients are sending values that differ only by characters
-        considered as invalid by your hostname-char-set, be aware that scrubbing
-        them will yield identical values. In such cases, DDNS conflict rules
-        will permit only one of them to register the name.
-        </para>
-        <para>
-        Finally, given the latitude clients have in the values they send, it is
-        virtually impossible to guarantee that a combination of these two
-        parameters will always yield a name that is valid for use in DNS. For
-        example, using an empty value for hostname-char-replacement could yield
-        an empty domain label within a name, if that label consists only of
-        invalid characters.
-        </para>
-        </note>
-        <note>
-        Since the 1.6.0 Kea release it is possible to specify hostname-char-set
-        and/or hostname-char-replacement at the global scope. This allows
-        to sanitize host names without requiring a dhcp-ddns entry. When
-        a hostname-char parameter is defined at the global scope and
-        in a dhcp-ddns entry the second (local) value is used.
-        </note>
-      </section>
-    </section>
-
-    <section xml:id="dhcp6-dhcp4o6-config">
-      <title>DHCPv4-over-DHCPv6: DHCPv6 Side</title>
-      <para>
-      The support of DHCPv4-over-DHCPv6 transport is described in
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc7341">RFC 7341</link>
-      and is implemented using cooperating DHCPv4 and DHCPv6 servers.
-      This section is about the configuration of the DHCPv6 side
-      (the DHCPv4 side is described in <xref linkend="dhcp4-dhcp4o6-config"/>).
-      </para>
-      <note>
-      DHCPv4-over-DHCPv6 support is experimental and the details of
-      the inter-process communication may change; both the
-      DHCPv4 and DHCPv6 sides should be running the same version of Kea.
-      For instance, the support of port relay (RFC 8357) introduced
-      an incompatible change.
-      </note>
-      <para>
-      There is only one specific parameter for the DHCPv6 side:
-      <command>dhcp4o6-port</command>, which specifies the first of the
-      two consecutive ports of the UDP sockets used for the communication
-      between the DHCPv6 and DHCPv4 servers (the DHCPv6 server is bound
-      to ::1 on <command>port</command> and connected to ::1 on
-      <command>port</command> + 1).
-      </para>
-      <para>
-      Two other configuration entries are generally required: unicast traffic
-      support (see <xref linkend="dhcp6-unicast"/>) and DHCP 4o6 server
-      address option (name "dhcp4o6-server-addr", code  88).
-      </para>
-      <para>
-      The following configuration was used during some tests:
-<screen>
-{
-
-# DHCPv6 conf
-"Dhcp6": {
-
-    "interfaces-config": {
-        "interfaces": [ "eno33554984/2001:db8:1:1::1" ]
-    },
-
-    "lease-database": {
-        "type": "memfile",
-        "name": "leases6"
-    },
-
-    "preferred-lifetime": 3000,
-    "valid-lifetime": 4000,
-    "renew-timer": 1000,
-    "rebind-timer": 2000,
-
-    "subnet6": [ {
-        "subnet": "2001:db8:1:1::/64",
-        "interface": "eno33554984",
-        "pools": [ { "pool": "2001:db8:1:1::1:0/112" } ]
-    } ],
-
-    <userinput>"dhcp4o6-port": 6767,
-
-    "option-data": [ {
-        "name": "dhcp4o6-server-addr",
-        "code": 88,
-        "space": "dhcp6",
-        "csv-format": true,
-        "data": "2001:db8:1:1::1"
-    } ],
-</userinput>
-
-    "loggers": [ {
-        "name": "kea-dhcp6",
-        "output_options": [ {
-            "output": "/tmp/kea-dhcp6.log"
-        } ],
-        "severity": "DEBUG",
-        "debuglevel": 0
-    } ]
-}
-
-}
-</screen>
-      </para>
-      <note>
-      Relayed DHCPv4-QUERY DHCPv6 messages are not supported.
-      </note>
-    </section>
-
-     <section xml:id="sanity-checks6">
-       <title>Sanity Checks in DHCPv6</title>
-
-       <para>
-         An important aspect of a well-running DHCP system is an assurance that
-         the data remains consistent. However, in some cases it may be convenient
-         to tolerate certain inconsistent data. For example, a network
-         administrator that temporarily removed a subnet from a configuration
-         wouldn't want all the leases associated with it disappear from the
-         lease database. Kea has a mechanism to control sanity
-         checks for situations such as this.
-       </para>
-
-       <para>
-         Kea supports a configuration scope called
-         <command>sanity-checks</command>. It currently allows only a
-         single parameter called <command>lease-checks</command>, which
-         governs the verification carried out when a new lease is
-         loaded from a lease file. This mechanism permits Kea to
-         attempt to correct inconsistent data.
-       </para>
-
-       <para>
-         Every subnet has a subnet-id value; this is how Kea internally
-         identifies subnets. Each lease has a subnet-id parameter as well, which
-         identifies which subnet it belongs to. However, if the configuration has
-         changed, it is possible that a lease could exist with a subnet-id, but
-         without any subnet that matches it. Also, it may be possible that the
-         subnet's configuration has changed and the subnet-id now belongs to a
-         subnet that does not match the lease. Kea's corrective algorithm first
-         checks to see if there is a subnet with the subnet-id specified by the lease. If
-         there is, it verifies whether the lease belongs to that subnet. If not,
-         depending on the lease-checks setting, the lease is discarded, a
-         warning is displayed, or a new subnet is selected for the lease that
-         matches it topologically.
-       </para>
-
-       <para>
-         Since delegated prefixes do not have to belong to a subnet in which
-         they're offered, there is no way to implement such a mechanism for IPv6
-         prefixes. As such, the mechanism works for IPv6 addresses only.
-       </para>
-
-       <para>
-         There are five levels which are supported:
-       </para>
-
-       <itemizedlist>
-         <listitem>
-           <simpara><command>none</command> - do no special checks; accept the
-           lease as is</simpara>
-         </listitem>
-         <listitem>
-           <simpara><command>warn</command> - if problems are detected, a
-           warning will be displayed, but the lease data will be accepted
-           anyway. This is the default value.</simpara>
-         </listitem>
-         <listitem>
-           <simpara><command>fix</command> - If data inconsistency is
-           discovered, Kea will try to correct it. If the correction is
-           not successful, the incorrect data will be inserted anyway.</simpara>
-         </listitem>
-         <listitem>
-           <simpara><command>fix-del</command> - If a data inconsistency is
-           discovered, Kea will try to correct it. If the correction is not
-           succesful, the lease will be rejected. This setting ensures the data's
-           correctness, but some incorrect data may be lost. Use with
-           care.</simpara>
-         </listitem>
-         <listitem>
-           <simpara><command>del</command> - This is the strictest mode. If any
-           inconsistency is detected, the lease is rejected. Use with care.
-           </simpara>
-         </listitem>
-       </itemizedlist>
-
-       <para>This feature is currently implemented for the memfile backend.</para>
-
-       <para>
-         An example configuration that sets this parameter looks as follows:
-<screen>
-"Dhcp6": {
-    "sanity-checks": {
-        <userinput>"lease-checks": "fix-del"</userinput>
-    },
-    ...
-}</screen>
-              </para>
-
-       </section>
-
-   </section>
-
-  <!-- Host reservation is a large topic. There will be many subsections,
-   so it should be a section on its own. -->
-  <section xml:id="host-reservation-v6">
-    <title>Host Reservation in DHCPv6</title>
-
-    <para>There are many cases where it is useful to provide a configuration on
-    a per-host basis. The most obvious one is to reserve a specific, static IPv6
-    address or/and prefix for exclusive use by a given client (host); the returning
-    client will get the same address or/and prefix every time, and other clients will
-    never get that address. Another example when host reservations are applicable is when a host
-    has specific requirements, e.g. a printer that needs additional DHCP options
-    or a cable modem that needs specific parameters. Yet another possible use case
-    is to define unique names for hosts.</para>
-
-    <para>Note that there may be cases when a
-    new reservation has been made for a client for the address or prefix
-    currently in use by another client. We call this situation a "conflict." The
-    conflicts get resolved automatically over time as described in subsequent
-    sections. Once the conflict is resolved, the client will keep receiving the reserved
-    configuration when it renews.</para>
-
-    <para>Host reservations are defined as parameters for each subnet. Each host
-    must be identified by either DUID or its hardware/MAC address. See
-    <xref linkend="mac-in-dhcpv6"/> for details. There is an optional
-    <command>reservations</command> array in the
-    <command>subnet6</command> structure. Each element in that array
-    is a structure that holds information about a single host. In
-    particular, the structure has an identifier that
-    uniquely identifies a host. In the DHCPv6 context, such an identifier
-    is usually a DUID, but can also be a hardware or MAC address.
-    One or more addresses or prefixes may also be specified, and it is
-    possible to specify a hostname and DHCPv6 options for a given host.</para>
-
-    <para>The following example shows how to reserve addresses and prefixes
-    for specific hosts:
-
-<screen>
-"subnet6": [
-    {
-        "subnet": "2001:db8:1::/48",
-        "pools": [ { "pool": "2001:db8:1::/80" } ],
-        "pd-pools": [
-            {
-                "prefix": "2001:db8:1:8000::",
-                "prefix-len": 48,
-                "delegated-len": 64
-            }
-        ],
-        <userinput>"reservations": [
-            {
-                "duid": "01:02:03:04:05:0A:0B:0C:0D:0E",
-                "ip-addresses": [ "2001:db8:1::100" ]
-            },
-            {
-                "hw-address": "00:01:02:03:04:05",
-                "ip-addresses": [ "2001:db8:1::101", "2001:db8:1::102" ]
-            },
-            {
-                "duid": "01:02:03:04:05:06:07:08:09:0A",
-                "ip-addresses": [ "2001:db8:1::103" ],
-                "prefixes": [ "2001:db8:2:abcd::/64" ],
-                "hostname": "foo.example.com"
-            }
-        ]</userinput>
-    }
-]
-</screen>
-
-    This example includes reservations for three different clients. The first reservation
-    is for the address 2001:db8:1::100 for a client using DUID
-    01:02:03:04:05:0A:0B:0C:0D:0E. The second reservation is for two addresses
-    2001:db8:1::101 and 2001:db8:1::102, for a client using MAC address
-    00:01:02:03:04:05. Lastly, address 2001:db8:1::103 and prefix 2001:db8:2:abcd::/64
-    are reserved for a client using DUID 01:02:03:04:05:06:07:08:09:0A. The
-    last reservation also assigns a hostname to this client.
-    </para>
-
-    <para>Note that DHCPv6 allows a single client to lease multiple addresses
-    and multiple prefixes at the same time. Therefore <command>ip-addresses</command>
-    and <command>prefixes</command> are plural and are actually arrays.
-    When the client sends multiple IA options (IA_NA or IA_PD), each reserved
-    address or prefix is assigned to an individual IA of the appropriate type. If
-    the number of IAs of a specific type is lower than the number of reservations
-    of that type, the number of reserved addresses or prefixes assigned to the
-    client is equal to the number of IA_NAs or IA_PDs sent by the client; that is,
-    some reserved addresses or prefixes are not assigned. However,
-    they still remain reserved for this client and the server will not assign
-    them to any other client. If the number of IAs of a specific type sent by the
-    client is greater than the number of reserved addresses or prefixes, the
-    server will try to assign all reserved addresses or prefixes to the individual
-    IAs and dynamically allocate addresses or prefixes to the remaining IAs. If the
-    server cannot assign a reserved address or prefix because it is in use,
-    the server will select the next reserved address or prefix and try to assign it to
-    the client. If the server subsequently finds that there are no more reservations
-    that can be assigned to the client at that moment, the server will try to
-    assign leases dynamically.
-    </para>
-
-    <para>Making a reservation for a mobile host that may visit multiple subnets
-    requires a separate host definition in each subnet it is expected to visit.
-    It is not possible to define multiple host definitions with the same hardware
-    address in a single subnet. Multiple host definitions with the same hardware
-    address are valid if each is in a different subnet. The reservation for a given host
-    should include only one identifier, either DUID or hardware address. Defining
-    both for the same host is considered a configuration error.
-    </para>
-
-    <para>Adding host reservations incurs a performance penalty. In principle,
-    when a server that does not support host reservation responds to a query,
-    it needs to check whether there is a lease for a given address being
-    considered for allocation or renewal. The server that also supports host
-    reservation has to perform additional checks: not only whether the address is
-    currently used (i.e., if there is a lease for it), but also whether the address
-    could be used by someone else (i.e., if there is a reservation for it). That
-    additional check incurs extra overhead.</para>
-
-    <section xml:id="reservation6-types">
-      <title>Address/Prefix Reservation Types</title>
-
-      <para>In a typical scenario there is an IPv6 subnet defined, with a certain
-      part of it dedicated for dynamic address allocation by the DHCPv6
-      server. There may be an additional address space defined for prefix
-      delegation. Those dynamic parts are referred to as dynamic pools, address
-      and prefix pools, or simply pools. In principle, a host reservation can
-      reserve any address or prefix that belongs to the subnet. The reservations
-      that specify addresses that belongs to configured pools are called
-      "in-pool reservations." In contrast, those that do not
-      belong to dynamic pools are called "out-of-pool
-      reservations." There is no formal difference in the reservation
-      syntax and both reservation types are handled
-      uniformly.</para>
-
-      <para>Kea supports global
-      host reservations. These are reservations that are specified at the
-      global level within the configuration and that do not belong to any
-      specific subnet. Kea will still match inbound client packets to a
-      subnet as before, but when the subnet's reservation mode is set to
-      <command>"global"</command>, Kea will look for host reservations only
-      among the global reservations defined. Typcially, such reservations would
-      be used to reserve hostnames for clients which may move from one subnet
-      to another.
-      </para>
-
-      <note>You can reserve any ip-address or prefix in a global reservation.
-      Just keep in mind that Kea will not do any sanity checking on the address
-      or prefix and that for Kea 1.5.0, support for global reservations should
-      be considered experimental.
-      </note>
-
-    </section>
-
-    <section xml:id="reservation6-conflict">
-      <title>Conflicts in DHCPv6 Reservations</title>
-      <para>As reservations and lease information are stored separately,
-      conflicts may arise. Consider the following series of events: the server
-      has configured the dynamic pool of addresses from the range of 2001:db8::10
-      to 2001:db8::20. Host A requests an address and gets 2001:db8::10. Now the
-      system administrator decides to reserve address 2001:db8::10 for Host B.
-      In general, reserving an address
-      that is currently assigned to someone else is not recommended, but there
-      are valid use cases where such an operation is warranted.</para>
-
-      <para>The server now has a conflict to resolve.
-      If Host B boots up and requests an address, the server is
-      not able to assign the reserved address 2001:db8::10. A naive approach
-      would to be immediately remove the lease for Host A and create a new one
-      for Host B. That would not solve the problem, though, because as soon as
-      Host B gets the address, it will detect that the address is already in use
-      by someone else (Host A) and will send a DHCPDECLINE message. Therefore, in this
-      situation, the server has to temporarily assign a different address from the
-      dynamic pool (not matching what has been reserved) to Host B.</para>
-
-      <para>When Host A renews its address, the server will discover that
-      the address being renewed is now reserved for someone else (Host
-      B). Therefore, the server will remove the lease for 2001:db8::10, select
-      a new address, and create a new lease for it. It will send two
-      addresses in its response: the old address, with lifetime set to 0 to
-      explicitly indicate that it is no longer valid; and the new address, with a
-      non-zero lifetime. When Host B renews its temporarily assigned
-      address, the server will detect that the existing lease does not match the
-      reservation, so it will release the current address Host B has and will
-      create a new lease matching the reservation. As before, the server
-      will send two addresses: the temporarily assigned one with zeroed
-      lifetimes, and the new one that matches the reservation with proper lifetimes
-      set.</para>
-
-      <para>This recovery will succeed, even if other hosts attempt to get
-      the reserved address. If Host C requests the address 2001:db8::10 after
-      the reservation is made, the server will propose a different address.</para>
-
-      <para>This recovery mechanism allows the server to fully recover from a
-      case where reservations conflict with existing leases. This procedure
-      takes time and will roughly take as long as the value set for renew-timer.
-      The best way to avoid such recovery is not to define new reservations that
-      conflict with existing leases. Another recommendation is to use
-      out-of-pool reservations. If the reserved address does not belong to a
-      pool, there is no way that other clients can get this address.
-      </para>
-
-    <note>
-     <para>The conflict-resolution mechanism does not work for global
-     reservations. As of Kea 1.5.0, it is generally recommended not to use
-     global reservations for addresses or prefixes. If you choose to use them
-     anyway, you must manually ensure that the reserved values are not
-     in the dynamic pools.</para>
-    </note>
-
-    </section>
-
-    <section xml:id="reservation6-hostname">
-      <title>Reserving a Hostname</title>
-      <para>When the reservation for a client includes the <command>hostname</command>,
-      the server will assign this hostname to the client and send
-      it back in the Client FQDN, if the client sent the FQDN option to the
-      server. The reserved hostname always takes precedence over the hostname
-      supplied by the client (via the FQDN option) or the autogenerated
-      (from the IPv6 address) hostname.</para>
-
-      <para>The server qualifies the reserved hostname with the value
-      of the <command>qualifying-suffix</command> parameter. For example, the
-      following subnet configuration:
-<screen>
-"subnet6": [
-    {
-        "subnet": "2001:db8:1::/48",
-        "pools": [ { "pool": "2001:db8:1::/80" } ],
-        "reservations": [
-            {
-                "duid": "01:02:03:04:05:0A:0B:0C:0D:0E",
-                "ip-addresses": [ "2001:db8:1::100" ]
-                "hostname": "alice-laptop"
-            }
-        ]
-    }
-],
-"dhcp-ddns": {
-    "enable-updates": true,
-    "qualifying-suffix": "example.isc.org."
-}
-</screen>
-      will result in assigning the "alice-laptop.example.isc.org." hostname to the
-      client using the DUID "01:02:03:04:05:0A:0B:0C:0D:0E". If the <command>qualifying-suffix
-      </command> is not specified, the default (empty) value will be used, and
-      in this case the value specified as a <command>hostname</command> will
-      be treated as a fully qualified name. Thus, by leaving the
-      <command>qualifying-suffix</command> empty it is possible to qualify
-      hostnames for different clients with different domain names:
-<screen>
-"subnet6": [
-    {
-        "subnet": "2001:db8:1::/48",
-        "pools": [ { "pool": "2001:db8:1::/80" } ],
-        "reservations": [
-            {
-                "duid": "01:02:03:04:05:0A:0B:0C:0D:0E",
-                "ip-addresses": [ "2001:db8:1::100" ]
-                "hostname": "mark-desktop.example.org."
-            }
-        ]
-    }
-],
-"dhcp-ddns": {
-    "enable-updates": true,
-}
-</screen>
-      The above example results in the assignment of the "mark-desktop.example.org." hostname to the
-      client using the DUID "01:02:03:04:05:0A:0B:0C:0D:0E".
-    </para>
-</section>
-
-    <section xml:id="reservation6-options">
-      <title>Including Specific DHCPv6 Options in Reservations</title>
-      <para>Kea offers the ability to specify options on a
-      per-host basis. These options follow the same rules as any other
-      options. These can be standard options (see <xref linkend="dhcp6-std-options"/>), custom options (see <xref linkend="dhcp6-custom-options"/>), or vendor-specific options
-      (see <xref linkend="dhcp6-vendor-opts"/>). The following
-      example demonstrates how standard options can be defined.</para>
-
-      <screen>
-"reservations": [
-{
-   "duid": "01:02:03:05:06:07:08",
-   "ip-addresses": [ "2001:db8:1::2" ],
-    <userinput>"option-data": [
-    {
-        "option-data": [ {
-            "name": "dns-servers",
-            "data": "3000:1::234"
-        },
-        {
-            "name": "nis-servers",
-            "data": "3000:1::234"
-        }
-    } ]</userinput>
-} ]</screen>
-
-    <para>Vendor-specific options can be reserved in a similar manner:</para>
-
-    <screen>
-"reservations": [
-{
-    "duid": "aa:bb:cc:dd:ee:ff",
-    "ip-addresses": [ "2001:db8::1" ],
-    <userinput>"option-data": [
-    {
-        "name": "vendor-opts",
-        "data": 4491
-    },
-    {
-        "name": "tftp-servers",
-        "space": "vendor-4491",
-        "data": "3000:1::234"
-    } ]</userinput>
-} ]</screen>
-
-<para>
- Options defined at host level have the highest priority. In other words,
- if there are options defined with the same type on global, subnet, class, and
- host level, the host-specific values will be used.
-</para>
-
-    </section>
-
-    <section xml:id="reservation6-client-classes">
-      <title>Reserving Client Classes in DHCPv6</title>
-      <para><xref linkend="classification-using-expressions"/> explains how
-      to configure the server to assign classes to a client, based on the content
-      of the options that this client sends to the server. Host reservations
-      mechanisms also allow for the static assignment of classes to clients.
-      The definitions of these classes are placed in the Kea
-      configuration. The following configuration snippet shows how to specify
-      that the client belongs to classes <command>reserved-class1</command>
-      and <command>reserved-class2</command>. Those classes are associated with
-      specific options being sent to the clients which belong to them.
-      </para>
-<screen>
-{
-    "client-classes": [
-    {
-       "name": "reserved-class1",
-       "option-data": [
-       {
-           "name": "dns-servers",
-           "data": "2001:db8:1::50"
-       }
-       ]
-   },
-   {
-       "name": "reserved-class2",
-       "option-data": [
-       {
-           "name": "nis-servers",
-           "data": "2001:db8:1::100"
-       }
-       ]
-    }
-    ],
-    "subnet6": [
-    {   "pools": [ { "pool": "2001:db8:1::/64" } ],
-        "subnet": "2001:db8:1::/48",
-        "reservations": [
-        {
-            "duid": "01:02:03:04:05:06:07:08",
-            <userinput>
-            "client-classes": [ "reserved-class1", "reserved-class2" ]
-            </userinput>
-         } ]
-     } ]
- }
-
-</screen>
-    <para>Static class assignments, as shown above, can be used in conjunction
-    with classification, using expressions. The "KNOWN" or "UNKNOWN" builtin
-    class is added to the packet and any class depending on it (directly or
-    indirectly) and not only-if-required is evaluated.
-    </para>
-
-    <note>
-     <para>If you want to force the evaluation of a class expression after
-     the host reservation lookup, for instance because of a dependency on
-     "reserved-class1" from the previous example, you should add a
-     "member('KNOWN')" statement in the expression.</para>
-    </note>
-
-    </section>
-
-    <section id="reservations6-mysql-pgsql-cql">
-      <title>Storing Host Reservations in MySQL, PostgreSQL, or Cassandra</title>
-
-      <para>
-        It is possible to store host reservations in MySQL, PostgreSQL, or Cassandra. See
-        <xref linkend="hosts6-storage"/> for information on how to configure Kea to use
-        reservations stored in MySQL, PostgreSQL, or Cassandra. Kea provides a dedicated hook for
-        managing reservations in a database; section <xref linkend="host-cmds"/> provides
-        detailed information. The Kea wiki <uri
-        xmlns:xlink="http://www.w3.org/1999/xlink"
-        xlink:href="https://gitlab.isc.org/isc-projects/kea/wikis/designs/commands#23-host-reservations-hr-management">https://gitlab.isc.org/isc-projects/kea/wikis/designs/commands#23-host-reservations-hr-management</uri>
-        provides some examples of how to conduct common host reservations operations.
-      </para>
-
-      <note><simpara>In Kea, the maximum length of an option specified per-host is
-      arbitrarily set to 4096 bytes.</simpara></note>
-    </section>
-
-    <section xml:id="reservations6-tuning">
-      <title>Fine Tuning DHCPv6 Host Reservation</title>
-
-      <para>The host reservation capability introduces additional restrictions for the
-      allocation engine (the component of Kea that selects an address for a client)
-      during lease selection and renewal. In particular, three
-      major checks are necessary. First, when selecting a new lease, it is not
-      sufficient for a candidate lease to simply not be in use by another DHCP client; it
-      also must not be reserved for another client. Second, when renewing a lease,
-      an additional check must be performed to see whether the address being renewed is
-      reserved for another client. Finally, when a host renews an address or a
-      prefix, the server must check whether there is a reservation for this host,
-      so the existing (dynamically allocated) address should be revoked and the
-      reserved one be used instead.
-      </para>
-      <para>Some of those checks may be unnecessary in certain deployments and not
-      performing them may improve performance. The Kea server provides the
-      <command>reservation-mode</command> configuration parameter to select the
-      types of reservations allowed for a particular subnet. Each reservation
-      type has different constraints for the checks to be performed by the
-      server when allocating or renewing a lease for the client.
-      Allowed values are:
-
-      <itemizedlist>
-      <listitem><simpara> <command>all</command> - enables both in-pool
-      and out-of-pool host reservation types. This setting is the default value, and
-      is the safest and most flexible. However, as all checks are conducted,
-      it is also the slowest. It does not check against global reservations.
-      </simpara></listitem>
-
-      <listitem><simpara> <command>out-of-pool</command> - allows only out of
-      pool host reservations. With this setting in place, the server may assume
-      that all host reservations are for addresses that do not belong to the
-      dynamic pool. Therefore, it can skip the reservation checks when dealing
-      with in-pool addresses, thus improving performance. Do not use this mode
-      if any of your reservations use in-pool addresses. Caution is advised when
-      using this setting; Kea does not sanity-check the reservations against
-      <command>reservation-mode</command> and misconfiguration may cause
-      problems.
-      </simpara></listitem>
-
-      <listitem><simpara> <command>global</command> - allows only global
-      host reservations. With this setting in place, the server searches for
-      reservations for a client only among the defined global reservations.
-      If an address is specified, the server will skip the reservation checks
-      carried out when dealing in other modes, thus improving performance.
-      Caution is advised when using this setting; Kea does not sanity-check
-      the reservations when <command>global</command> and
-      misconfiguration may cause problems.
-      </simpara></listitem>
-
-      <listitem><simpara> <command>disabled</command> - host reservation support is disabled. As there
-      are no reservations, the server will skip all checks. Any reservations defined
-      will be completely ignored. As the checks are skipped, the server may
-      operate faster in this mode.
-      </simpara></listitem>
-
-      </itemizedlist>
-      The parameter can be specified at global, subnet, and shared-network
-      levels.
-      </para>
-
-      <para>
-        An example configuration that disables reservation looks as follows:
-        <screen>
-"Dhcp6": {
-    "subnet6": [
-        {
-        "subnet": "2001:db8:1::/64",
-        <userinput>"reservation-mode": "disabled"</userinput>,
-        ...
-        }
-    ]
-}
-       </screen>
-      </para>
-
-      <para>
-        An example configuration using global reservations is shown below:
-<screen>
-"Dhcp6": {
-
-    <userinput>
-    "reservation-mode": "global",
-    "reservations": [
-       {
-        "duid": "00:03:00:01:11:22:33:44:55:66",
-        "hostname": "host-one"
-       },
-       {
-        "duid": "00:03:00:01:99:88:77:66:55:44",
-        "hostname": "host-two"
-       }
-    ],
-    </userinput>
-    "subnet6": [
-    {
-        "subnet": "2001:db8:1::/64",
-        ...
-    }
-    ]
-}
-</screen>
-    For more details regarding global reservations, see
-    <xref linkend="global-reservations6"/>.
-    </para>
-
-      <para>Another aspect of the host reservations is the different types of
-      identifiers. Kea currently supports two types of identifiers
-      in DHCPv6: hardware address and DUID. This is beneficial from a
-      usability perspective; however, there is one drawback. For each incoming
-      packet Kea has to to extract each identifier type and then query the
-      database to see if there is a reservation by this particular
-      identifier. If nothing is found, the next identifier is extracted and the next
-      query is issued. This process continues until either a reservation is
-      found or all identifier types have been checked. Over time, with an increasing
-      number of supported identifier types, Kea would become slower and
-      slower.</para>
-
-      <para>To address this problem, a parameter called
-      <command>host-reservation-identifiers</command> has been introduced. It
-      takes a list of identifier types as a parameter. Kea will check only those
-      identifier types enumerated in host-reservation-identifiers. From a
-      performance perspective, the number of identifier types should be kept to a
-      minimum, ideally one. If your deployment uses several
-      reservation types, please enumerate them from most- to least-frequently
-      used, as this increases the chances of Kea finding the reservation using the
-      fewest queries. An example of host reservation identifiers looks
-      as follows:
-
-<screen>
-<userinput>"host-reservation-identifiers": [ "duid", "hw-address" ],</userinput>
-"subnet6": [
-    {
-        "subnet": "2001:db8:1::/64",
-        ...
-    }
-]</screen>
-</para>
-
-<para>
-If not specified, the default value is:
-<screen>
-<userinput>"host-reservation-identifiers": [ "hw-address", "duid" ]</userinput>
-</screen>
-
-</para>
-
-</section>
-  <section id="global-reservations6">
-    <title>Global Reservations in DHCPv6</title>
-
-    <para>In some deployments, such as mobile, clients can roam within the
-    network and certain parameters must be specified regardless of
-    the client's current location. To facilitate such a need, a global
-    reservation mechanism has been implemented. The idea behind it is that
-    regular host reservations are tied to specific subnets, by using a specific
-    subnet-id. Kea can specify a global
-    reservation that can be used in every subnet that has global reservations
-    enabled.</para>
-
-    <para>This feature can be used to assign certain parameters, such as
-    hostname or other dedicated, host-specific options. It can also be used to
-    assign addresses or prefixes. However, global reservations that assign
-    either of these bypass the whole topology determination provided by DHCP
-    logic implemented in Kea. It is very easy to misuse this feature and get a
-    configuration that is inconsistent. To give a specific example, imagine a
-    global reservation for an address 2001:db8:1111::1 and two subnets
-    2001:db8:1111::/48 and 2001:db8:ffff::/48. If global reservations are used
-    in both subnets and a device matching global host reservations visits part
-    of the network that is covered by 2001:db8:ffff::/48, it will get an IP
-    address 2001:db8:ffff::1, which will be outside of the prefix announced
-    by its local router using Router Advertisements. Such a configuration
-    would be unusable or, at the very least, riddled with issues, such as
-    downlink traffic not reaching the device.</para>
-
-    <para>
-      To use global host reservations, a configuration similar to the following
-      can be used:
-
-<screen>
-"Dhcp6:" {
-    // This specifies global reservations. They will apply to all subnets that
-    // have global reservations enabled.
-    <userinput>
-    "reservations": [
-    {
-       "hw-address": "aa:bb:cc:dd:ee:ff",
-       "hostname": "hw-host-dynamic"
-    },
-    {
-       "hw-address": "01:02:03:04:05:06",
-       "hostname": "hw-host-fixed",
-
-       // Use of IP address is global reservation is risky. If used outside of
-       // matching subnet, such as 3001::/64, it will result in a broken
-       // configuration being handled to the client.
-       "ip-address": "2001:db8:ff::77"
-    },
-    {
-       "duid": "01:02:03:04:05",
-       "hostname": "duid-host"
-    }
-    ]</userinput>,
-    "valid-lifetime": 600,
-    "subnet4": [ {
-        "subnet": "2001:db8:1::/64",
-        <userinput>"reservation-mode": "global",</userinput>
-        "pools": [ { "pool": "2001:db8:1::-2001:db8:1::100" } ]
-    } ]
-}
-</screen>
-    </para>
-
-    <para>When using database backends, the global host reservations are
-    distinguished from regular reservations by using subnet-id value of
-    zero.</para>
-<!-- see CfgHostOperations::createConfig6() in
-     src/lib/dhcpsrv/cfg_host_operations.cc -->
-
-   </section>
-
-    <!-- @todo: add support for per IA reservation (that specifies IAID in
-                the ip-addresses and prefixes) -->
-  </section>
-  <!-- end of host reservations section -->
-
-  <!-- shared networks starts here -->
-  <section id="shared-network6">
-    <title>Shared Networks in DHCPv6</title>
-
-    <para>DHCP servers use subnet information in two ways. First, it is used
-    to determine the point of attachment, or simply put, where the client is
-    connected to the network. Second, the subnet information is used to group
-    information pertaining to a specific location in the network. This approach
-    works well in general cases, but there are scenarios where the boundaries are
-    blurred. Sometimes it is useful to have more than one logical IP subnet
-    being deployed on the same physical link. The need to understand
-    that two or more subnets are used on the same link requires additional logic
-    in the DHCP server. This capability is
-    called "shared networks" in Kea and ISC DHCP configurations. It is sometimes also
-    called "shared subnets." In Microsoft's nomenclature it is called "multinet."
-    </para>
-
-    <para>There are many use cases where the feature is useful. The most common
-    example in the IPv4 case is when the server is running out of available
-    addresses in a subnet. This is less common in IPv6, but shared networks
-    are still useful in IPv6. One of the use cases is an exhaustion of IPv6-
-    delegated prefixes within a subnet. Another IPv6-specific example
-    is an experiment with an addressing scheme. With the advent of IPv6 deployment
-    and a vast address space, many organizations split the address space into
-    subnets, deploy it, and then after a while discover that they want to split it
-    differently. In the transition period, they want both old and new addressing
-    to be available. Thus the need for more than one subnet on the same physical
-    link.</para>
-
-    <para>Finally, the case of cable networks is directly applicable in
-    IPv6. There are two types of devices in cable networks: cable modems and the
-    end-user devices behind them. It is a common practice to use different
-    subnets for cable modems to prevent users from tinkering with them.
-    In this case, the distinction is based on the type of device, rather
-    than address-space exhaustion.</para>
-
-    <para>A client connected to a shared network may be assigned a lease (address
-    or prefix) from any of the pools defined within the subnets belonging to the
-    shared network. Internally, the server selects one of the subnets belonging to a
-    shared network and tries to allocate a lease from this subnet. If the
-    server is unable to allocate a lease from the selected subnet (e.g., due
-    to pools exhaustion), it will use another subnet from the same shared
-    network and try to allocate a lease from this subnet, etc. Therefore, in the
-    typical case, the server will allocate all leases available in a given
-    subnet before it starts allocating leases from other subnets belonging to
-    the same shared network. However, in certain situations the client can be
-    allocated a lease from the other subnets before the pools in the first
-    subnet get exhausted, e.g. when the client provides a hint that belongs
-    to another subnet or the client has reservations in a subnet other than
-    the default.
-    </para>
-
-    <note>
-    <para>Deployments should not assume that Kea waits until it has
-    allocated all the addresses from the first subnet in a shared network
-    before allocating addresses from other subnets.</para>
-    </note>
-
-    <para>In order to define a shared network an additional configuration scope
-    is introduced:
-<screen>
-{
-"Dhcp6": {
-    <userinput>"shared-networks": [
-        {
-            // Name of the shared network. It may be an arbitrary string
-            // and it must be unique among all shared networks.
-            "name": "ipv6-lab-1",
-
-            // The subnet selector can be specifed on the shared network level.
-            // Subnets from this shared network will be selected for clients
-            // communicating via relay agent having the specified IP address.
-            "relay": {
-                "ip-addresses": [ "2001:db8:2:34::1" ]
-            },
-
-            // This starts a list of subnets in this shared network.
-            // There are two subnets in this example.
-            "subnet6": [
-                {
-                    "subnet": "2001:db8::/48",
-                    "pools": [ { "pool":  "2001:db8::1 - 2001:db8::ffff" } ]
-                },
-                {
-                    "subnet": "3ffe:ffe::/64",
-                    "pools": [ { "pool":  "3ffe:ffe::/64" } ]
-                }
-            ]
-        } ]</userinput>, // end of shared-networks
-
-    // It is likely that in your network you'll have a mix of regular,
-    // "plain" subnets and shared networks. It is perfectly valid to mix
-    // them in the same config file.
-    //
-    // This is regular subnet. It's not part of any shared-network.
-    "subnet6": [
-        {
-            "subnet": "2001:db9::/48",
-            "pools": [ { "pool":  "2001:db9::/64" } ],
-            "relay": {
-                "ip-addresses": [ "2001:db8:1:2::1" ]
-            }
-        }
-    ]
-
-} // end of Dhcp6
-}
-</screen>
-    </para>
-    <para>As you see in the example, it is possible to mix shared and regular
-    ("plain") subnets. Each shared network must have a unique name. This is
-    similar to the ID for subnets, but gives administrators more flexibility. This is used
-    for logging, but also internally for identifying shared networks.</para>
-
-    <para>In principle it makes sense to define only shared networks that
-    consist of two or more subnets. However, for testing purposes it is allowed
-    to define a shared network with just one subnet or even an empty one. This
-    is not a recommended practice in production networks, as the shared network
-    logic requires additional processing and thus lowers the server's performance.
-    To avoid unnecessary performance degradation, the shared subnets should only
-    be defined when required by the deployment.
-    </para>
-
-    <para>Shared networks provide an ability to specify many parameters in
-    the shared network scope that will apply to all subnets within it. If
-    necessary, you can specify a parameter in the shared network scope and then
-    override its value in the subnet scope. For example:
-<screen>
-"shared-networks": [
-    {
-        "name": "lab-network3",
-        "relay": {
-             "ip-addresses": [ "2001:db8:2:34::1" ]
-        },
-
-        // This applies to all subnets in this shared network, unless
-        // values are overridden on subnet scope.
-        <userinput>"valid-lifetime": 600</userinput>,
-
-        // This option is made available to all subnets in this shared
-        // network.
-        <userinput>"option-data": [ {
-            "name": "dns-servers",
-            "data": "2001:db8::8888"
-        } ]</userinput>,
-
-        "subnet6": [
-            {
-                "subnet": "2001:db8:1::/48",
-                "pools": [ { "pool":  "2001:db8:1::1 - 2001:db8:1::ffff" } ],
-
-                // This particular subnet uses different values.
-                <userinput>"valid-lifetime": 1200,
-                "option-data": [
-                {
-                    "name": "dns-servers",
-                    "data": "2001:db8::1:2"
-                },
-                {
-                    "name": "unicast",
-                    "data": "2001:abcd::1"
-                } ]</userinput>
-            },
-            {
-                 "subnet": "2001:db8:2::/48",
-                 "pools": [ { "pool":  "2001:db8:2::1 - 2001:db8:2::ffff" } ],
-
-                 // This subnet does not specify its own valid-lifetime value,
-                 // so it is inherited from shared network scope.
-                 <userinput>"option-data": [
-                 {
-                     "name": "dns-servers",
-                     "data": "2001:db8:cafe::1"
-                 } ]</userinput>
-            }
-        ],
-    } ]</screen>
-
-    In this example, there is a dns-servers option defined that is available to
-    clients in both subnets in this shared network. Also, a valid lifetime is
-    set to 10 minutes (600s). However, the first subnet overrides some of the values
-    (valid lifetime is 20 minutes, different IP address for dns-servers), but
-    also adds its own option (unicast address). Assuming a client asking for a
-    server unicast and dns servers options is assigned a lease from this subnet,
-    it will get a lease for 20 minutes and dns-servers, and be allowed to use
-    server unicast at address 2001:abcd::1. If the same client is assigned to
-    the second subnet, it will get a 10-minute lease, a dns-servers value of
-    2001:db8:cafe::1, and no server unicast.
-    </para>
-
-    <para>Some parameters must be the same in all subnets in the same shared
-    network. This restriction applies to the <command>interface</command> and
-    <command>rapid-commit</command> settings. The most convenient way is to
-    define them on the shared network scope, but you may specify them for each
-    subnet. However, care should be taken for each subnet to have the same
-    value.</para>
-
-    <section>
-      <title>Local and Relayed Traffic in Shared Networks</title>
-
-    <para>It is possible to specify an interface name in the shared network scope to
-    tell the server that this specific shared network is reachable directly (not
-    via relays) using a local network interface. It is sufficient to specify
-    it once at the shared network level. As all subnets in a shared network are
-    expected to be used on the same physical link, it is a configuration error
-    to attempt to define a shared network using subnets that are reachable over
-    different interfaces. It is possible to specify the interface parameter on each
-    subnet, although its value must be the same for each subnet. Thus it is
-    usually more convenient to specify it once at the shared network level.
-<screen>
-"shared-networks": [
-    {
-        "name": "office-floor-2",
-
-        // This tells Kea that the whole shared networks is reachable over
-        // local interface. This applies to all subnets in this network.
-        <userinput>"interface": "eth0"</userinput>,
-
-        "subnet6": [
-            {
-                "subnet": "2001:db8::/64",
-                "pools": [ { "pool":  "2001:db8::1 - 2001:db8::ffff" } ],
-                <userinput>"interface": "eth0"</userinput>
-            },
-            {
-                 "subnet": "3ffe:abcd::/64",
-                 "pools": [ { "pool":  "3ffe:abcd::1 - 3ffe:abcd::ffff" } ]
-
-                 // Specifying a different interface name is configuration
-                 // error:
-                 // "interface": "eth1"
-            }
-        ],
-    } ]
-</screen>
-</para>
-
-<para>Somewhat similar to interface names, relay IP addresses can also be
-specified for the whole shared network. However, depending on your relay
-configuration, it may use different IP addresses depending on which subnet
-is being used. Thus there is no requirement to use the same IP relay address
-for each subnet. Here's an example:
-
-<screen>
-"shared-networks": [
-    {
-        "name": "kakapo",
-        <userinput>"relay": {
-            "ip-addresses":  [ "2001:db8::abcd" ]
-        }</userinput>,
-        "subnet6": [
-            {
-                "subnet": "2001:db8::/64",
-                <userinput>"relay": {
-                    "ip-addresses": [ "2001:db8::1234" ]
-                }</userinput>,
-                "pools": [ { "pool":  "2001:db8::1 - 2001:db8::ffff" } ]
-            },
-            {
-                 "subnet": "3ffe:abcd::/64",
-                 "pools": [ { "pool":  "3ffe:abcd::1 - 3ffe:abcd::ffff" } ],
-                 <userinput>"relay": {
-                    "ip-addresses": [ "3ffe:abcd::cafe" ]
-                 }</userinput>
-            }
-        ]
-    }
-]</screen>
-In this particular case the relay IP address specified at the network level doesn't
-have much sense, as it is overridden in both subnets, but it was left there
-as an example of how one could be defined at the network level. Note that the
-relay agent IP address typically belongs to the subnet it relays packets from,
-but this is not a strict requirement. Kea accepts any value here
-as long as it is a valid IPv6 address.</para>
-
-    </section>
-    <section>
-      <title>Client Classification in Shared Networks</title>
-
-      <para>Sometimes it is desirable to segregate clients into specific subnets
-      based on certain properties. This mechanism is called client classification
-      and is described in <xref linkend="classify"/>. Client classification
-      can be applied to subnets belonging to shared networks in the same way
-      as it is used for subnets specified outside of shared networks.
-      It is important to understand how the server selects subnets for
-      clients when client classification is in use, to ensure that the
-      desired subnet is selected for a given client type.</para>
-
-      <para>If a subnet is associated with a class, only the clients
-      belonging to this class can use this subnet. If there are no
-      classes specified for a subnet, any client connected to a given shared
-      network can use this subnet. A common mistake is to assume that the
-      subnet including a client class is preferred over subnets without
-      client classes. Consider the following example:
-
-<screen>
-{
-    "client-classes": [
-        {
-            "name": "b-devices",
-            "test": "option[1234].hex == 0x0002"
-        }
-    ],
-    "shared-networks": [
-        {
-            "name": "galah",
-            "relay": {
-                "ip-address": [ "2001:db8:2:34::1" ]
-            },
-            "subnet6": [
-                {
-                    "subnet": "2001:db8:1::/64",
-                    "pools": [ { "pool": "2001:db8:1::20 - 2001:db8:1::ff" } ],
-                },
-                {
-                    "subnet": "2001:db8:3::/64",
-                    "pools": [ { "pool": "2001:db8:3::20 - 2001:db8:3::ff" } ],
-                    <userinput>"client-class": "b-devices"</userinput>
-                }
-            ]
-        }
-    ]
-}
-</screen>
-
-        If the client belongs to the "b-devices" class (because it includes option
-        1234 with a value of 0x0002), that doesn't guarantee that the subnet 2001:db8:3::/64
-        will be used (or preferred) for this client. The server can use either of
-        the two subnets because the subnet 2001:db8:1::/64 is also allowed for
-        this client. The client classification used in this case should be perceived
-        as a way to restrict access to certain subnets, rather than a way to express
-        subnet preference. For example, if the client doesn't belong to the
-        "b-devices" class it may only use the subnet 2001:db8:1::/64 and will
-        never use the subnet 2001:db8:3::/64.
-      </para>
-
-      <para>A typical use case for client classification is in a cable network,
-      where cable modems should use one subnet and other devices should use
-      another subnet within the same shared network. In this case it is necessary
-      to apply classification on all subnets. The following example defines two
-      classes of devices, and the subnet selection is made based on option 1234 values.
-<screen>
-{
-    "client-classes": [
-        {
-
-            "name": "a-devices",
-            "test": "option[1234].hex == 0x0001"
-        },
-        {
-            "name": "b-devices",
-            "test": "option[1234].hex == 0x0002"
-        }
-    ],
-    "shared-networks": [
-        {
-            "name": "galah",
-            "relay": {
-                "ip-addresses":  [ "2001:db8:2:34::1" ]
-            },
-            "subnet6": [
-                {
-                    "subnet": "2001:db8:1::/64",
-                    "pools": [ { "pool": "2001:db8:1::20 - 2001:db8:1::ff" } ],
-                    <userinput>"client-class": "a-devices"</userinput>
-                },
-                {
-                    "subnet": "2001:db8:3::/64",
-                    "pools": [ { "pool": "2001:db8:3::20 - 2001:db8:3::ff" } ],
-                    <userinput>"client-class": "b-devices"</userinput>
-                }
-            ]
-        }
-    ]
-}
-</screen>
-In this example each class has its own restriction. Only clients that belong to
-class "a-devices" will be able to use subnet 2001:db8:1::/64 and only clients
-belonging to "b-devices" will be able to use subnet 2001:db8:3::/64. Care should
-be taken not to define too-restrictive classification rules, as clients that are
-unable to use any subnets will be refused service. However, this may be a
-desired outcome if one wishes to provide service only to clients with known properties
-(e.g. only VoIP phones allowed on a given link).</para>
-
-    <para>
-      Note that it is possible to achieve an effect similar to the one presented in this
-      section without the use of shared networks. If the subnets are placed in
-      the global subnets scope, rather than in the shared network, the server
-      will still use classification rules to pick the right subnet for a given
-      class of devices. The major benefit of placing subnets within the
-      shared network is that common parameters for the logically grouped
-      subnets can be specified once, in the shared network scope, e.g. the
-      "interface" or "relay" parameter. All subnets belonging to this shared
-      network will inherit those parameters.
-    </para>
-
-    </section>
-
-    <section>
-      <title>Host Reservations in Shared Networks</title>
-
-<para>
-  Subnets that are part of a shared network allow host reservations, similar to
-  regular subnets:
-  <screen>
-{
-    "shared-networks": [
-    {
-        "name": "frog",
-        "relay": {
-            "ip-addresses": [ "2001:db8:2:34::1" ]
-        },
-        "subnet6": [
-            {
-                "subnet": "2001:db8:1::/64",
-                "id": 100,
-                "pools": [ { "2001:db8:1::1 - 2001:db8:1::64" } ],
-                <userinput>"reservations": [
-                {
-                    "duid": "00:03:00:01:11:22:33:44:55:66",
-                    "ip-addresses": [ "2001:db8:1::28" ]
-                }
-                ]</userinput>
-            },
-            {
-                "subnet": "2001:db8:3::/64",
-                "id": 101,
-                "pools": [ { "pool": "2001:db8:3::1 - 2001:db8:3::64" } ],
-                <userinput>"reservations": [
-                    {
-                        "duid": "00:03:00:01:aa:bb:cc:dd:ee:ff",
-                        "ip-addresses": [ "2001:db8:2::28" ]
-                    }
-                ]</userinput>
-            }
-        ]
-    }
-    ]
-}
-  </screen>
-</para>
-<para>It is worth noting that Kea conducts additional checks when processing a
-packet if shared networks are defined. Instead of simply checking whether
-there's a reservation for a given client in its initially selected subnet, it
-looks through all subnets in a shared network for a reservation. This is
-one of the reasons why defining a shared network may impact performance. If
-there is a reservation for a client in any subnet, that particular subnet will
-be picked for the client. Although it's technically not an error, it is
-considered a bad practice to define reservations for the same host in multiple
-subnets belonging to the same shared network.</para>
-
-<para>While not strictly mandatory, it is strongly recommended to use explicit
-"id" values for subnets if you plan to use database storage for host
-reservations. If ID is not specified, the values for it are autogenerated,
-i.e. it assigns increasing integer values starting from 1. Thus, the
-autogenerated IDs are not stable across configuration changes.
-</para>
-    </section>
-
-  </section>
-
-  <!-- end of shared networks -->
-
-    <section xml:id="dhcp6-serverid">
-      <title>Server Identifier in DHCPv6</title>
-      <para>The DHCPv6 protocol uses a "server identifier" (also known
-      as a DUID) to allow clients to discriminate between several
-      servers present on the same link.
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc8415">RFC 8415</link>
-      currently defines four DUID types: DUID-LLT, DUID-EN, DUID-LL, and DUID-UUID.
-      </para>
-
-      <para>The Kea DHCPv6 server generates a server identifier once, upon
-      the first startup, and stores it in a file. This identifier is not
-      modified across restarts of the server and so is a stable identifier.</para>
-
-      <para>Kea follows the recommendation from
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc8415">RFC 8415</link>
-      to use DUID-LLT as the default server identifier. However, we have
-      received reports that some deployments require different DUID
-      types, and there is a need to administratively select both DUID
-      type and/or its contents.</para>
-
-      <para>The server identifier can be configured using parameters
-      within the <command>server-id</command> map element in the global
-      scope of the Kea configuration file. The following example
-      demonstrates how to select DUID-EN as a server identifier:
-
-<screen>
-"Dhcp6": {
-    "server-id": {
-        "type": "EN"
-    },
-    ...
-}
-</screen>
-
-      </para>
-
-      <para>Currently supported values for <command>type</command>
-      parameter are: "LLT", "EN", and "LL", for DUID-LLT, DUID-EN, and
-      DUID-LL respectively.</para>
-
-      <para>When a new DUID type is selected the server generates its
-      value and replaces any existing DUID in the file. The server then
-      uses the new server identifier in all future interactions with the
-      clients.</para>
-
-      <note><para>If the new server identifier is created after some clients
-      have obtained their leases, the clients using the old identifier are not
-      able to renew the leases; the server will ignore messages
-      containing the old server identifier. Clients will continue sending
-      Renew until they transition to the rebinding state. In this state, they
-      will start sending Rebind messages to the multicast address without
-      a server identifier. The server will respond to the Rebind messages
-      with a new server identifier, and the clients will associate the
-      new server identifier with their leases. Although the clients will
-      be able to keep their leases and will eventually learn the new server
-      identifier, this will be at the cost of an increased number of renewals
-      and multicast traffic due to a need to rebind. Therefore, it is
-      recommended that modification of the server identifier type
-      and value is avoided if the server has already assigned leases and these
-      leases are still valid.</para></note>
-
-      <para>There are cases when an administrator needs to explicitly
-      specify a DUID value rather than allow the server to generate it.
-      The following example demonstrates how to explicitly set all
-      components of a DUID-LLT.
-
-<screen>
-"Dhcp6": {
-    "server-id": {
-        "type": "LLT",
-        "htype": 8,
-        "identifier": "A65DC7410F05",
-        "time": 2518920166
-    },
-    ...
-}
-</screen>
-
-      where:
-      <itemizedlist>
-        <listitem><simpara><command>htype</command> is a 16-bit unsigned value
-        specifying hardware type,</simpara></listitem>
-        <listitem><simpara><command>identifier</command> is a link-layer
-        address, specified as a string of hexadecimal digits, and</simpara>
-        </listitem>
-        <listitem><simpara><command>time</command> is a 32-bit unsigned
-        time value.</simpara></listitem>
-      </itemizedlist>
-      </para>
-
-      <para>The hexadecimal representation of the DUID generated as a result
-      of the configuration specified above will be:
-<screen>
- 00:01:00:08:96:23:AB:E6:A6:5D:C7:41:0F:05
-|type |htype|   time    |   identifier    |
-</screen>
-      </para>
-
-      <para>A special value of 0 for "htype" and "time" is allowed,
-      which indicates that the server should use ANY value for these
-      components. If the server already uses a DUID-LLT it will use the
-      values from this DUID; if the server uses a DUID of a different type
-      or doesn't yet use any DUID, it will generate these values.
-      Similarly, if the "identifier" is assigned an empty string, the
-      value of the identifier will be generated. Omitting any of these
-      parameters is equivalent to setting them to those special values.
-      </para>
-
-      <para>For example, the following configuration:
-<screen>
-"Dhcp6": {
-    "server-id": {
-        "type": "LLT",
-        "htype": 0,
-        "identifier": "",
-        "time": 2518920166
-    },
-    ...
-}
-</screen>
-
-      indicates that the server should use ANY link-layer address and
-      hardware type. If the server is already using DUID-LLT, it will
-      use the link-layer address and hardware type from the existing DUID.
-      If the server is not yet using any DUID, it will use the link-layer
-      address and hardware type from one of the available network
-      interfaces. The server will use an explicit value of time; if it
-      is different than a time value present in the currently used
-      DUID, that value will be replaced, effectively
-      modifying the current server identifier.
-      </para>
-
-      <para>
-        The following example demonstrates an explicit configuration of
-        a DUID-EN:
-
-<screen>
-"Dhcp6": {
-    "server-id": {
-        "type": "EN",
-        "enterprise-id": 2495,
-        "identifier": "87ABEF7A5BB545"
-    },
-    ...
-}
-</screen>
-
-      where:
-      <itemizedlist>
-        <listitem><simpara><command>enterprise-id</command> is a 32-bit
-        unsigned value holding an enterprise number, and </simpara></listitem>
-        <listitem><simpara><command>identifier</command> is a variable-
-        length identifier within DUID-EN.</simpara></listitem>
-      </itemizedlist>
-      </para>
-
-      <para>
-        The hexadecimal representation of the DUID-EN created according to
-        the configuration above is:
-<screen>
- 00:02:00:00:09:BF:87:AB:EF:7A:5B:B5:45
-|type |  ent-id   |     identifier     |
-</screen>
-      </para>
-
-      <para>As in the case of the DUID-LLT, special values can be used for the
-      configuration of the DUID-EN. If the <command>enterprise-id</command> is 0, the server
-      will use a value from the existing DUID-EN. If the server is not using
-      any DUID or the existing DUID has a different type, the ISC enterprise
-      id will be used. When an empty string is entered for <command>identifier</command>, the
-      identifier from the existing DUID-EN will be used. If the server is
-      not using any DUID-EN, a new 6-byte-long identifier will be generated.
-      </para>
-
-      <para>DUID-LL is configured in the same way as DUID-LLT except
-      that the <command>time</command> parameter has no effect for DUID-LL,
-      because this DUID type only comprises a hardware type and link-layer
-      address. The following example demonstrates how to configure DUID-LL:
-
-<screen>
-"Dhcp6": {
-    "server-id": {
-        "type": "LL",
-        "htype": 8,
-        "identifier": "A65DC7410F05"
-    },
-    ...
-}
-</screen>
-
-      </para>
-
-      <para>
-      which will result in the following server identifier:
-
-<screen>
- 00:03:00:08:A6:5D:C7:41:0F:05
-|type |htype|   identifier    |
-</screen>
-      </para>
-
-      <para>The server stores the generated server identifier in the following
-      location: [kea-install-dir]/var/lib/kea/kea-dhcp6-serverid.
-      </para>
-
-      <para>In some uncommon deployments where no stable storage is
-      available, the server should be configured not to try to
-      store the server identifier. This choice is controlled
-      by the value of the <command>persist</command> boolean parameter:
-<screen>
-"Dhcp6": {
-    "server-id": {
-        "type": "EN",
-        "enterprise-id": 2495,
-        "identifier": "87ABEF7A5BB545",
-        "persist": false
-    },
-    ...
-}
-</screen>
-      </para>
-      <para>The default value of the "persist" parameter is
-      <command>true</command>, which configures the server to store the
-      server identifier on a disk.</para>
-
-      <para>In the example above, the server is configured not to store
-      the generated server identifier on a disk. But if the server
-      identifier is not modified in the configuration, the same value
-      will be used after server restart, because the entire server
-      identifier is explicitly specified in the configuration.</para>
-    </section>
-
-    <section xml:id="data-directory">
-      <title>DHCPv6 data directory</title>
-      <para>The Kea DHCPv6 server puts the server identifier file and the
-      default memory lease file into its data directory. By default
-      this directory is <filename><userinput>prefix</userinput>/var/lib/kea</filename>
-      but this location can be changed using the
-      <command>data-directory</command> global parameter as in:
-<screen>
-"Dhcp6": {
-    <userinput>"data-directory": "/var/tmp/kea-server6"</userinput>,
-    ...
-}
-</screen>
-      </para>
-    </section>
-
-    <section xml:id="stateless-dhcp6">
-      <title>Stateless DHCPv6 (Information-Request Message)</title>
-      <para>Typically DHCPv6 is used to assign both addresses and options. These
-      assignments (leases) have a state that changes over time, hence
-      their name, stateful. DHCPv6 also supports a stateless mode,
-      where clients request configuration options only. This mode is
-      considered lightweight from the server perspective, as it does not require
-      any state tracking, and carries the stateless name.</para>
-      <para>The Kea server supports stateless mode. Clients can send
-      Information-Request messages and the server sends back
-      answers with the requested options (providing the options are
-      available in the server configuration).  The server attempts to
-      use per-subnet options first. If that fails - for whatever reason - it
-      then tries to provide options defined in the global scope.</para>
-
-      <para>Stateless and stateful mode can be used together. No special
-      configuration directives are required to handle this; simply use the
-      configuration for stateful clients and the stateless clients will get
-      just the options they requested.</para>
-
-      <para>This usage of global options allows for an interesting case.
-      It is possible to run a server that provides only options and no
-      addresses or prefixes. If the options have the same value in each
-      subnet, the configuration can define required options in the global
-      scope and skip subnet definitions altogether. Here's a simple example of
-      such a configuration:
-<screen>
-"Dhcp6": {
-    "interfaces-config": {
-        "interfaces": [ "ethX" ]
-    },
-    <userinput>"option-data": [ {
-        "name": "dns-servers",
-        "data": "2001:db8::1, 2001:db8::2"
-    } ]</userinput>,
-    "lease-database": {
-        "type": "memfile"
-    }
- }
-</screen>
-      This very simple configuration will provide DNS server information
-      to all clients in the network, regardless of their location. Note the
-      specification of the memfile lease database; this is needed as
-      Kea requires a lease database to be specified
-      even if it is not used.</para>
-    </section>
-
-    <section xml:id="dhcp6-rfc7550">
-      <title>Support for RFC 7550 (now part of RFC 8415)</title>
-      <para><link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc7550">RFC 7550</link>
-      introduced some changes to the previous DHCPv6 specifications,
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc3315">RFC 3315</link>
-      and <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc3633">RFC 3633</link>,
-      to resolve a few issues with the coexistence of multiple stateful
-      options in the messages sent between the clients and servers. Those
-      changes were later included in the most recent DHCPv6 protocol specification,
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc8415">RFC 8415</link>,
-      which obsoleted <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc7550">RFC 7550</link>.
-      Kea supports <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc8415">RFC 8415</link>
-      along with these protocol changes, which are briefly described below.
-      </para>
-
-      <para>When a client, such as a requesting router, requests an allocation
-      of both addresses and prefixes during the 4-way (SARR) exchange with the
-      server, and the server is not configured to allocate any prefixes but it
-      can allocate some addresses, it will respond with the IA_NA(s) containing
-      allocated addresses and the IA_PD(s) containing the NoPrefixAvail status code.
-      According to the updated specifications, if the client can operate without
-      prefixes it should accept allocated addresses and transition to
-      the "bound" state. When the client subsequently sends Renew/Rebind messages
-      to the server, according to the T1 and T2 times, to extend the lifetimes of
-      the allocated addresses, and if the client is still interested in obtaining
-      prefixes from the server, it may also include an IA_PD in the Renew/Rebind
-      to request allocation of the prefixes. If the server still cannot
-      allocate the prefixes, it will respond with the IA_PD(s) containing the
-      NoPrefixAvail status code. However, if the server can allocate the
-      prefixes it will allocate and send them in the IA_PD(s) to the client.
-      A similar situation occurs when the server is unable to allocate addresses
-      for the client but can delegate prefixes. The client may request allocation
-      of the addresses while renewing the delegated prefixes. Allocating leases for
-      other IA types while renewing existing leases is by default supported by
-      the Kea DHCPv6 server, and the server provides no configuration mechanisms
-      to disable this behavior.</para>
-
-      <para>
-        The following are the other behaviors first introduced in
-        <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc7550">RFC 7550</link>
-        (now part of
-        <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc8415">RFC 8415</link>)
-        and supported by the Kea DHCPv6 server:
-        <itemizedlist>
-          <listitem><simpara>Set T1/T2 timers to the same value for all
-          stateful (IA_NA and IA_PD) options to facilitate renewal of all
-          a client's leases at the same time (in a single message exchange),
-          </simpara></listitem>
-          <listitem><simpara>Place NoAddrsAvail and NoPrefixAvail status codes
-          in the IA_NA and IA_PD options in the Advertise message,
-          rather than as the top-level options.</simpara></listitem>
-        </itemizedlist>
-      </para>
-    </section>
-
-    <section xml:id="dhcp6-relay-override">
-      <title>Using a Specific Relay Agent for a Subnet</title>
-      <para>
-        The relay must have an interface connected to the link on which
-        the clients are being configured. Typically the relay has a global IPv6
-        address configured on the interface that belongs to the subnet from which
-        the server will assign addresses. Normally, the
-        server is able to use the IPv6 address inserted by the relay (in the link-addr
-        field in RELAY-FORW message) to select the appropriate subnet.
-      </para>
-      <para>
-        However, that is not always the case. The relay
-        address may not match the subnet in certain deployments. This
-        usually means that there is more than one subnet allocated for a given
-        link. The two most common examples where this is the case are long-lasting
-        network renumbering (where both old and new address space is still being
-        used) and a cable network. In a cable network, both cable modems and the
-        devices behind them are physically connected to the same link, yet
-        they use distinct addressing. In such a case, the DHCPv6 server needs
-        additional information (like the value of the interface-id option or the IPv6
-        address inserted in the link-addr field in the RELAY-FORW message) to
-        properly select an appropriate subnet.
-      </para>
-      <para>
-        The following example assumes that there is a subnet 2001:db8:1::/64
-        that is accessible via a relay that uses 3000::1 as its IPv6 address.
-        The server is able to select this subnet for any incoming packets
-        that come from a relay with an address in 2001:db8:1::/64 subnet.
-        It also selects that subnet for a relay with address 3000::1.
-        <screen>
-"Dhcp6": {
-    "subnet6": [
-        {
-            "subnet": "2001:db8:1::/64",
-            "pools": [
-                 {
-                     "pool": "2001:db8:1::1-2001:db8:1::ffff"
-                 }
-             ],
-             <userinput>"relay": {
-                 "ip-addresses": [ "3000::1" ]
-             }</userinput>
-        }
-    ]
-}
-</screen>
-      </para>
-
-      <para>If "relay" is specified, the "ip-addresses" parameter within
-      it is mandatory.</para>
-
-      <note>
-      <para>
-      The current version of Kea uses the "ip-addresses" parameter, which supports specifying a list of addresses.
-      </para>
-      </note>
-
-    </section>
-
-      <section xml:id="dhcp6-client-class-relay">
-        <title>Segregating IPv6 Clients in a Cable Network</title>
-        <para>
-          In certain cases, it is useful to mix relay address information,
-          introduced in <xref linkend="dhcp6-relay-override"/>, with client
-          classification, explained in <xref linkend="classify"/>.
-          One specific example is in a cable network, where typically modems
-          get addresses from a different subnet than all devices connected
-          behind them.
-        </para>
-        <para>
-          Let us assume that there is one CMTS (Cable Modem Termination System)
-          with one CM MAC (a physical link that modems are connected to).
-          We want the modems to get addresses from the 3000::/64 subnet,
-          while everything connected behind the modems should get addresses from
-          another subnet (2001:db8:1::/64). The CMTS that acts as a relay
-          uses address 3000::1. The following configuration can serve
-          that configuration:
-        <screen>
-"Dhcp6": {
-    "subnet6": [
-        {
-            "subnet": "3000::/64",
-            "pools": [
-                { "pool": "3000::2 - 3000::ffff" }
-            ],
-            <userinput>"client-class": "VENDOR_CLASS_docsis3.0",
-            "relay": {
-                "ip-addresses": [ "3000::1" ]
-            }</userinput>
-        },
-
-        {
-            "subnet": "2001:db8:1::/64",
-            "pools": [
-                 {
-                     "pool": "2001:db8:1::1-2001:db8:1::ffff"
-                 }
-             ],
-             <userinput>"relay": {
-                 "ip-addresses": [ "3000::1" ]
-             }</userinput>
-        }
-    ]
-}
-</screen>
-      </para>
-      </section>
-
-    <section xml:id="mac-in-dhcpv6">
-      <title>MAC/Hardware Addresses in DHCPv6</title>
-      <para>MAC/hardware addresses are available in DHCPv4 messages
-      from the clients, and administrators
-      frequently use that information to perform certain tasks like per-host
-      configuration and address reservation for specific MAC addresses.
-      Unfortunately, the DHCPv6 protocol does not provide any completely reliable way
-      to retrieve that information. To mitigate that issue, a number of mechanisms
-      have been implemented in Kea. Each
-      of these mechanisms works in certain cases, but may fail in others.
-      Whether the mechanism works in a particular deployment is
-      somewhat dependent on the network topology and the technologies used.</para>
-
-      <para>Kea allows specification of which of the supported methods should be
-      used and in what order. This configuration may be considered a fine tuning
-      of the DHCP deployment. In a typical deployment the default
-      value of <command>"any"</command> is sufficient and there is no
-      need to select specific methods. Changing the value of this parameter
-      is the most useful in cases when an administrator wants to disable
-      certain methods; for example, if the administrator trusts the network infrastructure
-      more than the information provided by the clients themselves, they
-      may prefer information provided by the relays over that
-      provided by the clients.
-      </para>
-      <para>
-      The configuration is controlled by the <command>mac-sources</command>
-      parameter as follows:
-        <screen>
-"Dhcp6": {
-    <userinput>"mac-sources": [ "method1", "method2", "method3", ... ]</userinput>,
-
-    "subnet6": [ ... ],
-
-    ...
-}
-</screen>
-
-    When not specified, a special value of "any" is used, which
-    instructs the server to attempt to try all the methods in sequence and use the
-    value returned by the first one that succeeds. If specified, it
-    must have at least one value.</para>
-
-    <para>Supported methods are:
-    <itemizedlist>
-      <listitem>
-        <simpara><command>any</command> - Not an actual method, just a keyword that
-        instructs Kea to try all other methods and use the first one that succeeds.
-        This is the default operation if no <command>mac-sources</command> are defined.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara><command>raw</command> - In principle, a DHCPv6 server could use raw
-        sockets to receive incoming traffic and extract MAC/hardware address
-        information. This is currently not implemented for DHCPv6 and this value has
-        no effect.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara><command>duid</command> - DHCPv6 uses DUID identifiers instead of
-        MAC addresses. There are currently four DUID types defined, and two of them
-        (DUID-LLT, which is the default, and DUID-LL) convey MAC address information.
-        Although <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="" utl="http://tools.ietf.org/html/rfc8415">RFC 8415</link> forbids
-        it, it is possible to parse those DUIDs and extract
-        necessary information from them. This method is not completely reliable, as
-        clients may use other DUID types, namely DUID-EN or DUID-UUID.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara><command>ipv6-link-local</command> - Another possible acquisition
-        method comes from the source IPv6 address. In typical usage, clients are
-        sending their packets from IPv6 link-local addresses. There is a good chance
-        that those addresses are based on EUI-64, which contains a MAC address. This
-        method is not completely reliable, as clients may use other link-local address
-        types. In particular, privacy extensions, defined in
-        <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc4941">RFC 4941</link>, do not use
-        MAC addresses. Also note that successful extraction requires that the
-        address's u-bit must be set to 1 and its g-bit set to 0, indicating that it
-        is an interface identifier as per
-        <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc2373#section-2.5.1">
-        RFC 2373, section 2.5.1</link>.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara><command>client-link-addr-option</command> - One extension defined
-        to alleviate missing MAC issues is the client link-layer address option, defined
-        in <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc6939">RFC 6939</link>. This is
-        an option that is inserted by a relay and contains information about a client's
-        MAC address. This method requires a relay agent that supports the option and
-        is configured to insert it. This method is useless for directly connected
-        clients. This parameter can also be specified as <command>rfc6939</command>,
-        which is an alias for <command>client-link-addr-option</command>.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara><command>remote-id</command> -
-        <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc4649">RFC 4649</link>
-        defines a remote-id option that is inserted by a relay agent. Depending
-        on the relay agent configuration, the inserted option may convey the client's
-        MAC address information. This parameter can also be specified as
-        <command>rfc4649</command>, which is an alias for <command>remote-id</command>.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara><command>subscriber-id</command> - Another option
-        that is somewhat similar to the previous one is subscriber-id,
-        defined in <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc4580">RFC
-        4580</link>. It, too, is inserted by a relay agent that is
-        configured to insert it. This parameter can also be specified
-        as <command>rfc4580</command>, which is an alias for
-        <command>subscriber-id</command>. This method is currently not
-        implemented.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara><command>docsis-cmts</command> - Yet another possible source of MAC
-        address information are the DOCSIS options inserted by a CMTS that acts
-        as a DHCPv6 relay agent in cable networks. This method attempts to extract
-        MAC address information from suboption 1026 (cm mac) of the vendor-specific option
-        with vendor-id=4491. This vendor option is extracted from the relay-forward message,
-        not the original client's message.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara><command>docsis-modem</command> - The final possible source of MAC
-        address information are the DOCSIS options inserted by the cable modem itself.
-        This method attempts to extract MAC address information from suboption 36 (device id)
-        of the vendor-specific option with vendor-id=4491. This vendor option is extracted from
-        the original client's message, not from any relay options.
-        </simpara>
-      </listitem>
-    </itemizedlist>
-  </para>
-
-  <para>Empty mac-sources is not allowed. If you do not want to specify it,
-  either simply omit the mac-sources definition or specify it with the "any" value
-  which is the default.</para>
-  </section>
-
-    <section xml:id="dhcp6-decline">
-      <title>Duplicate Addresses (DECLINE Support)</title>
-
-      <para>The DHCPv6 server is configured with a certain pool of
-      addresses that it is expected to hand out to DHCPv6 clients.
-      It is assumed that the server is authoritative and has complete
-      jurisdiction over those addresses. However, for various
-      reasons, such as misconfiguration or a faulty client implementation
-      that retains its address beyond the valid lifetime, there may be
-      devices connected that use those addresses without the server's
-      approval or knowledge.</para>
-
-      <para>Such an unwelcome event can be detected
-      by legitimate clients (using Duplicate Address Detection) and
-      reported to the DHCPv6 server using a DHCPDECLINE message. The server
-      will do a sanity check (to see whether the client declining an address really
-      was supposed to use it), and then will conduct a clean-up operation
-      and confirm it by sending back a REPLY message. Any DNS entries
-      related to that address will be removed, the fact will be logged,
-      and hooks will be triggered. After that is complete, the address
-      will be marked as declined (which indicates that it is used by
-      an unknown entity and thus not available for assignment)
-      and a probation time will be set on it. Unless otherwise
-      configured, the probation period lasts 24 hours; after that
-      period, the server will recover the lease (i.e. put it back into
-      the available state) and the address will be available for assignment
-      again. It should be noted that if the underlying issue of a
-      misconfigured device is not resolved, the duplicate-address
-      scenario will repeat. If reconfigured correctly, this mechanism provides an
-      opportunity to recover from such an event automatically, without
-      any system administrator intervention.</para>
-
-      <para>To configure the decline probation period to a value other
-      than the default, the following syntax can be used:
-<screen>
-  "Dhcp6": {
-    <userinput>"decline-probation-period": 3600</userinput>,
-    "subnet6": [ ... ],
-    ...
-}
-</screen>
-      The parameter is expressed in seconds, so the example above will instruct
-      the server to recycle declined leases after one hour.</para>
-
-      <para>There are several statistics and hook points associated with the
-      Decline handling procedure. The lease6_decline hook is triggered after the
-      incoming DHCPDECLINE message has been sanitized and the server is about to decline
-      the lease. The declined-addresses statistic is increased after the
-      hook returns (both global and subnet-specific variants). (See
-      <xref linkend="dhcp6-stats"/> and <xref linkend="hooks-libraries"/> for more details
-      on DHCPv6 statistics and Kea hook points.)</para>
-
-      <para>Once the probation time elapses, the declined lease is recovered
-      using the standard expired-lease reclamation procedure, with several
-      additional steps. In particular, both declined-addresses statistics
-      (global and subnet-specific) are decreased. At the same time,
-      reclaimed-declined-addresses statistics (again in two variants, global and
-      subnet-specific) are increased.</para>
-
-      <para>A note about statistics: The server does not decrease the
-      assigned-addresses statistics when a DHCPDECLINE message is received and
-      processed successfully. While technically a declined address is no longer
-      assigned, the primary usage of the assigned-addresses statistic is to
-      monitor pool utilization. Most people would forget to include
-      declined-addresses in the calculation, and simply use
-      assigned-addresses/total-addresses. This would cause a bias towards
-      under-representing pool utilization. As this has a potential for major
-      issues, we decided not to decrease assigned-addresses immediately after
-      receiving DHCPDECLINE, but to do it later when Kea recovers the address back to
-      the available pool.</para>
-    </section>
-
-    <section xml:id="dhcp6-stats">
-      <title>Statistics in the DHCPv6 Server</title>
-      <note>
-        <para>This section describes DHCPv6-specific statistics. For a general
-        overview and usage of statistics, see <xref linkend="stats"/>.</para>
-      </note>
-
-      <para>
-        The DHCPv6 server supports the following statistics:
-      </para>
-        <table frame="all" xml:id="dhcp6-statistics">
-          <title>DHCPv6 Statistics</title>
-          <tgroup cols="3">
-          <colspec colname="statistic" align="center"/>
-          <colspec colname="type" align="center"/>
-          <colspec colname="description" align="left"/>
-          <thead>
-            <row>
-              <entry>Statistic</entry>
-              <entry>Data Type</entry>
-              <entry>Description</entry>
-            </row>
-          </thead>
-          <tbody>
-
-            <row>
-              <entry>pkt6-received</entry>
-              <entry>integer</entry>
-              <entry>Number of DHCPv6 packets received. This includes all packets:
-              valid, bogus, corrupted, rejected, etc. This statistic is expected
-              to grow rapidly.</entry>
-            </row>
-
-            <row>
-              <entry>pkt6-receive-drop</entry>
-              <entry>integer</entry>
-              <entry>Number of incoming packets that were dropped. The exact reason
-              for dropping packets is logged, but the most common reasons may
-              be: an unacceptable or not supported packet type is received, direct responses
-              are forbidden, the server-id sent by the client does not match the
-              server's server-id, or the packet is malformed.</entry>
-            </row>
-
-            <row>
-              <entry>pkt6-parse-failed</entry>
-              <entry>integer</entry>
-              <entry>Number of incoming packets that could not be parsed.
-              A non-zero value of this statistic indicates that the server
-              received a malformed or truncated packet. This may indicate problems
-              in your network, faulty clients, faulty relay agents, or a bug in the
-              server.</entry>
-            </row>
-
-            <row>
-              <entry>pkt6-solicit-received</entry>
-              <entry>integer</entry>
-              <entry>
-                Number of SOLICIT packets received. This statistic is expected
-                to grow; its increase means that clients that just booted
-                started their configuration process and their initial packets
-                reached your Kea server.
-              </entry>
-            </row>
-
-            <row>
-              <entry>pkt6-advertise-received</entry>
-              <entry>integer</entry>
-              <entry>
-                Number of ADVERTISE packets received. Advertise packets are sent
-                by the server and the server is never expected to receive them. A non-zero
-                value of this statistic indicates an error occurring in the network.
-                One likely cause would be a misbehaving relay agent that incorrectly
-                forwards ADVERTISE messages towards the server, rather than back to the
-                clients.
-              </entry>
-            </row>
-
-            <row>
-              <entry>pkt6-request-received</entry>
-              <entry>integer</entry>
-              <entry>Number of DHCPREQUEST packets received. This statistic
-                is expected to grow. Its increase means that clients that just booted
-                received the server's response (DHCPADVERTISE) and accepted it, and are now
-                requesting an address (DHCPREQUEST).
-              </entry>
-            </row>
-
-            <row>
-              <entry>pkt6-reply-received</entry>
-              <entry>integer</entry>
-              <entry>Number of REPLY packets received. This statistic is
-              expected to remain zero at all times, as REPLY packets are sent by
-              the server and the server is never expected to receive
-              them. A non-zero value indicates an error. One likely cause would be
-              a misbehaving relay agent that incorrectly forwards REPLY messages
-              towards the server, rather than back to the clients.
-              </entry>
-            </row>
-
-            <row>
-              <entry>pkt6-renew-received</entry>
-              <entry>integer</entry>
-              <entry>Number of RENEW packets received. This statistic
-                is expected to grow; its increase means that clients received their
-                addresses and prefixes and are trying to renew them.
-              </entry>
-            </row>
-
-            <row>
-              <entry>pkt6-rebind-received</entry>
-              <entry>integer</entry>
-              <entry>Number of REBIND packets received. A non-zero value
-              indicates that clients didn't receive responses to their RENEW messages
-              (through the regular lease-renewal mechanism) and are attempting to find any server
-              that is able to take over their leases. It may mean that some servers'
-              REPLY messages never reached the clients.
-              </entry>
-            </row>
-
-            <row>
-              <entry>pkt6-release-received</entry>
-              <entry>integer</entry>
-              <entry>Number of RELEASE packets received. This statistic is expected
-              to grow when a device is being shut down in the network; it
-              indicates that the address or prefix assigned is reported as no longer
-              needed. Note that many devices, especially wireless, do not send RELEASE
-              packets either because of design choice or due to the client moving out
-              of range.
-              </entry>
-            </row>
-
-            <row>
-            <entry>pkt6-decline-received</entry>
-            <entry>integer</entry>
-            <entry>
-              Number of DECLINE packets received. This statistic is expected to
-              remain close to zero. Its increase means that a client leased an
-              address, but discovered that the address is currently used by an
-              unknown device in your network. If this statistic is growing, it
-              may indicate a misconfigured server or devices that have statically
-              assigned conflicting addresses.
-            </entry>
-            </row>
-
-            <row>
-              <entry>pkt6-infrequest-received</entry>
-              <entry>integer</entry>
-              <entry>
-                Number of INFORMATION-REQUEST packets received. This statistic
-                is expected to grow if there are devices that are using
-                stateless DHCPv6. INFORMATION-REQUEST messages are used by
-                clients that request stateless configuration, i.e. options
-                and parameters other than addresses or prefixes.
-              </entry>
-            </row>
-
-            <row>
-              <entry>pkt6-dhcpv4-query-received</entry>
-              <entry>integer</entry>
-              <entry>
-                Number of DHCPv4-QUERY packets received. This
-                statistic is expected to grow if there are devices
-                that are using DHCPv4-over-DHCPv6. DHCPv4-QUERY
-                messages are used by DHCPv4 clients on an IPv6-only
-                line which encapsulates the requests over DHCPv6.
-              </entry>
-            </row>
-
-            <row>
-              <entry>pkt6-dhcpv4-response-received</entry>
-              <entry>integer</entry>
-              <entry>
-                Number of DHCPv4-RESPONSE packets received. This
-                statistic is expected to remain zero at all times, as
-                DHCPv4-RESPONSE packets are sent by the server and the
-                server is never expected to receive them. A non-zero
-                value indicates an error. One likely cause would be a
-                misbehaving relay agent that incorrectly forwards
-                DHCPv4-RESPONSE message towards the server rather than
-                back to the clients.
-              </entry>
-            </row>
-
-            <row>
-              <entry>pkt6-unknown-received</entry>
-              <entry>integer</entry>
-              <entry>Number of packets received of an unknown type. A non-zero
-              value of this statistic indicates that the server received a
-              packet that it wasn't able to recognize; either it had an unsupported
-              type or was possibly malformed.</entry>
-            </row>
-
-            <row>
-              <entry>pkt6-sent</entry>
-              <entry>integer</entry>
-              <entry>Number of DHCPv6 packets sent. This statistic is expected
-              to grow every time the server transmits a packet. In general, it
-              should roughly match pkt6-received, as most incoming packets cause
-              the server to respond. There are exceptions (e.g. server receiving a
-              REQUEST with server-id matching other server), so do not worry if
-              it is less than pkt6-received.</entry>
-            </row>
-
-            <row>
-              <entry>pkt6-advertise-sent</entry>
-              <entry>integer</entry>
-              <entry>Number of ADVERTISE packets sent. This statistic is
-              expected to grow in most cases after a SOLICIT is processed. There
-              are certain uncommon, but valid, cases where incoming SOLICIT packets are
-              dropped, but in general this statistic is expected to be close to
-              pkt6-solicit-received.</entry>
-            </row>
-
-            <row>
-              <entry>pkt6-reply-sent</entry>
-              <entry>integer</entry>
-              <entry>Number of REPLY packets sent. This statistic is expected to
-              grow in most cases after a SOLICIT (with rapid-commit), REQUEST,
-              RENEW, REBIND, RELEASE, DECLINE, or INFORMATION-REQUEST is
-              processed. There are certain cases where there is no response.
-              </entry>
-            </row>
-
-            <row>
-              <entry>pkt6-dhcpv4-response-sent</entry>
-              <entry>integer</entry>
-              <entry>Number of DHCPv4-RESPONSE packets sent. This
-              statistic is expected to grow in most cases after a
-              DHCPv4-QUERY is processed. There are certain cases where
-              there is no response.
-              </entry>
-            </row>
-
-            <row>
-            <entry>subnet[id].total-nas</entry>
-            <entry>integer</entry>
-            <entry>
-            Total number of NA addresses available for
-            DHCPv6 management for a given subnet; in other words, this is the sum
-            of all addresses in all configured pools. This statistic changes only
-            during configuration changes. Note that it does not take into account any
-            addresses that may be reserved due to host reservation. The
-            <emphasis>id</emphasis> is the subnet-id of a given subnet. This
-            statistic is exposed for each subnet separately, and is
-            reset during a reconfiguration event.
-            </entry>
-            </row>
-
-            <row>
-            <entry>subnet[id].assigned-nas</entry>
-            <entry>integer</entry>
-            <entry>
-            Number of NA addresses in a given subnet that
-            are assigned. It increases every time a new lease is allocated
-            (as a result of receiving a REQUEST message) and is decreased every time a
-            lease is released (a RELEASE message is received) or expires. The
-            <emphasis>id</emphasis> is the subnet-id of a given subnet. This
-            statistic is exposed for each subnet separately, and is
-            reset during a reconfiguration event.
-            </entry>
-            </row>
-
-            <row>
-            <entry>subnet[id].total-pds</entry>
-            <entry>integer</entry>
-            <entry>
-            Total number of PD prefixes available for
-            DHCPv6 management for a given subnet; in other words, this is the sum
-            of all prefixes in all configured pools. This statistic changes only
-            during configuration changes. Note it does not take into account any
-            prefixes that may be reserved due to host reservation. The
-            <emphasis>id</emphasis> is the subnet-id of a given subnet. This
-            statistic is exposed for each subnet separately, and is
-            reset during a reconfiguration event.
-            </entry>
-            </row>
-
-            <row>
-            <entry>subnet[id].assigned-pds</entry>
-            <entry>integer</entry>
-            <entry>
-            Number of PD prefixes in a given subnet that
-            are assigned. It increases every time a new lease is allocated
-            (as a result of receiving a REQUEST message) and is decreased every time a
-            lease is released (a RELEASE message is received) or expires. The
-            <emphasis>id</emphasis> is the subnet-id of a given subnet. This statistic
-            is exposed for each subnet separately, and is reset during a
-            reconfiguration event.
-            </entry>
-            </row>
-
-            <row>
-              <entry>reclaimed-leases</entry>
-              <entry>integer</entry>
-              <entry> Number of expired leases that have been
-              reclaimed since server startup. It is incremented each time an expired
-              lease is reclaimed (counting both NA and PD reclamations) and is reset
-              when the server is reconfigured.
-              </entry>
-            </row>
-
-            <row>
-              <entry>subnet[id].reclaimed-leases</entry>
-              <entry>integer</entry>
-              <entry>Number of expired leases associated with
-              a given subnet (<emphasis>"id"</emphasis> is the subnet-id) that have
-              been reclaimed since server startup. It is incremented each time an expired
-              lease is reclaimed (counting both NA and PD reclamations) and is reset
-              when the server is reconfigured.
-              </entry>
-            </row>
-
-            <row>
-            <entry>declined-addresses</entry>
-            <entry>integer</entry>
-            <entry>
-              Number of IPv6 addresses that are
-              currently declined; a count of the number of leases
-              currently unavailable. Once a lease is recovered, this
-              statistic will be decreased; ideally, this statistic should be
-              zero. If this statistic is non-zero or increasing,
-              a network administrator should investigate whether there is
-              a misbehaving device in the network. This is a global statistic
-              that covers all subnets.
-            </entry>
-            </row>
-
-            <row>
-            <entry>subnet[id].declined-addresses</entry>
-            <entry>integer</entry>
-            <entry>
-              Number of IPv6 addresses that are
-              currently declined in a given subnet; a count of the
-              number of leases currently unavailable. Once a lease is
-              recovered, this statistic will be decreased; ideally, this
-              statistic should be zero. If this statistic is
-              non-zero or increasing, a network administrator should
-              investigate whether there is a misbehaving device in the network. The
-              <emphasis>id</emphasis> is the subnet-id of a given subnet. This
-              statistic is exposed for each subnet separately.
-            </entry>
-            </row>
-
-            <row>
-            <entry>reclaimed-declined-addresses</entry>
-            <entry>integer</entry>
-            <entry>
-              Number of IPv6 addresses that were
-              declined, but have now been recovered. Unlike
-              declined-addresses, this statistic never decreases. It can be used
-              as a long-term indicator of how many actual valid Declines were
-              processed and recovered from. This is a global statistic that
-              covers all subnets.
-            </entry>
-            </row>
-
-            <row>
-            <entry>subnet[id].reclaimed-declined-addresses</entry>
-            <entry>integer</entry>
-            <entry>
-              Number of IPv6 addresses that were
-              declined, but have now been recovered. Unlike
-              declined-addresses, this statistic never decreases. It can be used
-              as a long-term indicator of how many actual valid Declines were
-              processed and recovered from. The
-              <emphasis>id</emphasis> is the subnet-id of a given subnet. This
-              statistic is exposed for each subnet separately.
-            </entry>
-            </row>
-
-        </tbody>
-        </tgroup>
-        </table>
-    </section>
-
-    <section xml:id="dhcp6-ctrl-channel">
-      <title>Management API for the DHCPv6 Server</title>
-      <para>
-        The management API allows the issuing of specific
-        management commands, such as statistics retrieval, reconfiguration, or shutdown.
-        For more details, see <xref linkend="ctrl-channel"/>. Currently, the only
-        supported communication channel type is UNIX stream socket. By default there
-        are no sockets open; to instruct Kea to open a socket, the following entry
-        in the configuration file can be used:
-<screen>
-"Dhcp6": {
-    "control-socket": {
-        "socket-type": "unix",
-        "socket-name": <userinput>"/path/to/the/unix/socket"</userinput>
-    },
-
-    "subnet6": [
-        ...
-    ],
-    ...
-}
-</screen>
-      </para>
-
-      <para>
-        The length of the path specified by the <command>socket-name</command>
-        parameter is restricted by the maximum length for the UNIX socket name
-        on your operating system, i.e. the size of the <command>sun_path</command>
-        field in the <command>sockaddr_un</command> structure, decreased by 1.
-        This value varies on different operating systems between 91 and 107
-        characters. Typical values are 107 on Linux and 103 on FreeBSD.
-      </para>
-
-      <para>
-        Communication over the control channel is conducted using JSON structures.
-        See the <uri
-        xmlns:xlink="http://www.w3.org/1999/xlink"
-        xlink:href="https://jenkins.isc.org/job/Kea_doc/doxygen/d2/d96/ctrlSocket.html">Control Channel section in the Kea Developer's Guide</uri> for more
-        details.
-      </para>
-
-      <para>The DHCPv6 server supports the following operational commands:
-        <itemizedlist>
-            <listitem>build-report</listitem>
-            <listitem>config-get</listitem>
-            <listitem>config-reload</listitem>
-            <listitem>config-set</listitem>
-            <listitem>config-test</listitem>
-            <listitem>config-write</listitem>
-            <listitem>dhcp-disable</listitem>
-            <listitem>dhcp-enable</listitem>
-            <listitem>leases-reclaim</listitem>
-            <listitem>list-commands</listitem>
-            <listitem>server-tag-get</listitem>
-            <listitem>shutdown</listitem>
-            <listitem>version-get</listitem>
-        </itemizedlist>
-         as described in <xref linkend="commands-common"/>. In addition,
-         it supports the following statistics-related commands:
-        <itemizedlist>
-            <listitem>statistic-get</listitem>
-            <listitem>statistic-reset</listitem>
-            <listitem>statistic-remove</listitem>
-            <listitem>statistic-get-all</listitem>
-            <listitem>statistic-reset-all</listitem>
-            <listitem>statistic-remove-all</listitem>
-        </itemizedlist>
-        as described in <xref linkend="command-stats"/>.
-      </para>
-
-    </section>
-
-      <section id="dhcp6-user-contexts">
-        <title>User Contexts in IPv6</title>
-        <para>
-          Kea allows loading hook libraries that sometimes could benefit from
-          additional parameters. If such a parameter is specific to the whole
-          library, it is typically defined as a parameter for the hook library.
-          However, sometimes there is a need to specify parameters that are
-          different for each pool.
-        </para>
-
-        <para>
-          User contexts can store arbitrary data as long as it has valid JSON
-          syntax and its top level element is a map (i.e. the data must be
-          enclosed in curly brackets). However, some hook libraries may expect specific
-          formatting; please consult the specific hook library
-          documentation for details.
-        </para>
-
-        <para>
-          User contexts can be specified at global scope,
-          shared network, subnet, pool, client class, option data, or
-          definition level, and via host reservation. One other useful
-          usage is the ability to store comments or descriptions.
-        </para>
-
-        <para>
-          Let's consider a lightweight 4over6 deployment as an example. It is an
-          IPv6 transition technology that allows mapping IPv6 prefixes into full
-          or partial IPv4 addresses. In the DHCP context, these are specific
-          parameters that are supposed to be delivered to clients in the form of
-          additional options. Values of these options are correlated to
-          delegated prefixes, so it is reasonable to keep these parameters
-          together with the PD pool. On the other hand, lightweight 4over6 is
-          not a commonly used feature, so it is not a part of the base Kea
-          code. The solution to this problem is to use user context. For each PD
-          pool that is expected to be used for lightweight 4over6, a user context
-          with extra parameters is defined. Those extra parameters will be used
-          by a hook library that would be loaded only when dynamic calculation of
-          the lightweight 4over6 option is actually needed. An example
-          configuration looks as follows:
-          <screen>
-"Dhcp6": {
-    "subnet6": [ {
-        "pd-pools": [
-        {
-            "prefix":  "2001:db8::",
-            "prefix-len": 56,
-            "delegated-len": 64,
-
-            // This is a pool specific context.
-            <userinput>"user-context": {
-                "threshold-percent": 85,
-                "v4-network": "192.168.0.0/16",
-                "v4-overflow": "10.0.0.0/16",
-                "lw4over6-sharing-ratio": 64,
-                "lw4over6-v4-pool": "192.0.2.0/24",
-                "lw4over6-sysports-exclude": true,
-                "lw4over6-bind-prefix-len": 56
-            }</userinput>
-        } ],
-        "subnet": "2001:db8::/32",
-
-        // This is a subnet specific context. You can put any type of
-        // information here as long as it is a valid JSON.
-        <userinput>"user-context": {
-            "comment": "Those v4-v6 migration technologies are tricky.",
-            "experimental": true,
-            "billing-department": 42,
-            "contact-points": [ "Alice", "Bob" ]
-        }</userinput>
-    } ],
-    ...
-}</screen>
-        </para>
-
-        <para>
-          Kea does not interpret or use the content of the user context;
-          it simply stores it, making it available to the hook
-          libraries. It is up to each hook library to extract the information
-          and use it.
-          The parser translates a "comment" entry into a user context
-          with the entry, which allows a comment to be attached inside the
-          configuration itself.
-        </para>
-        <para>
-          For more background information, see <xref linkend="user-context"/>.
-        </para>
-    </section>
-
-    <section xml:id="dhcp6-std">
-      <title>Supported DHCPv6 Standards</title>
-      <para>The following standards are currently
-      supported:</para>
-      <itemizedlist>
-          <listitem>
-            <simpara><emphasis>Dynamic Host Configuration Protocol for IPv6</emphasis>,
-            <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc3315">RFC 3315</link>:
-            Supported messages are SOLICIT,
-            ADVERTISE, REQUEST, RELEASE, RENEW, REBIND, INFORMATION-REQUEST,
-            CONFIRM and REPLY.</simpara>
-          </listitem>
-          <listitem>
-            <simpara><emphasis>IPv6 Prefix Options for
-            Dynamic Host Configuration Protocol (DHCP) version 6</emphasis>,
-            <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc3633">RFC 3633</link>:
-            Supported options are IA_PD and
-            IA_PREFIX. Also supported is the status code NoPrefixAvail.</simpara>
-          </listitem>
-          <listitem>
-            <simpara><emphasis>DNS Configuration options for Dynamic Host
-            Configuration Protocol for IPv6 (DHCPv6)</emphasis>,
-            <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc3646">RFC 3646</link>:
-            Supported option is DNS_SERVERS.</simpara>
-          </listitem>
-          <listitem>
-            <simpara><emphasis>The Dynamic Host Configuration Protocol for IPv6 (DHCPv6)
-            Relay Agent Remote-ID Option</emphasis>,
-            <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc4649">RFC 4649</link>:
-            REMOTE-ID option is supported.</simpara>
-          </listitem>
-          <listitem>
-            <simpara><emphasis>The Dynamic Host Configuration Protocol for IPv6 (DHCPv6) Client
-            Fully Qualified Domain Name (FQDN) Option</emphasis>,
-            <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc4704">RFC 4704</link>:
-            Supported option is CLIENT_FQDN.</simpara>
-          </listitem>
-          <listitem>
-            <simpara><emphasis>Dynamic Host Configuration Protocol for IPv6 (DHCPv6)
-            Option for Dual-Stack Lite</emphasis>,
-            <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc6334">RFC 6334</link>:
-            the AFTR-Name DHCPv6 Option is supported.</simpara>
-          </listitem>
-          <listitem>
-            <simpara><emphasis>Relay-Supplied DHCP Options</emphasis>,
-            <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc6422">RFC 6422</link>:
-            Full functionality is supported: OPTION_RSOO, ability of the server
-            to echo back the options, checks whether an option is RSOO-enabled,
-            ability to mark additional options as RSOO-enabled.</simpara>
-          </listitem>
-          <listitem>
-            <simpara><emphasis>Prefix Exclude Option for DHCPv6-based Prefix
-            Delegation</emphasis>,
-            <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc6603">RFC
-            6603</link>: Prefix Exclude option is supported.</simpara>
-          </listitem>
-          <listitem>
-            <simpara><emphasis>Client Link-Layer Address Option in
-            DHCPv6</emphasis>,
-            <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc6939">RFC
-            6939</link>: Supported option is client link-layer
-            address option.</simpara>
-          </listitem>
-          <listitem>
-            <simpara><emphasis>Issues and Recommendations with Multiple
-            Stateful DHCPv6 Options</emphasis>,
-            <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc7550">RFC
-            7550</link>: All recommendations related to the DHCPv6 server
-            operation are supported.</simpara>
-          </listitem>
-          <listitem>
-            <simpara><emphasis>DHCPv6 Options for Configuration of Softwire
-            Address and Port-Mapped Clients</emphasis>,
-            <ulink url="http://tools.ietf.org/html/rfc7598">RFC
-            7598</ulink>: All options indicated in this specification are
-            supported by the DHCPv6 server.</simpara>
-          </listitem>
-          <listitem>
-            <simpara><emphasis>Dynamic Host Configuration Protocol for IPv6 (DHCPv6)</emphasis>,
-            <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc8415">RFC 8415</link>:
-            New DHCPv6 protocol specification which obsoletes RFC 3315, RFC 3633, RFC 3736, RFC 4242, RFC 7083,
-            RFC 7283, and RFC 7550</simpara>
-          </listitem>
-      </itemizedlist>
-    </section>
-
-    <section xml:id="dhcp6-limit">
-      <title>DHCPv6 Server Limitations</title>
-      <para> These are the current limitations of the DHCPv6 server
-      software. Most of them are reflections of the current stage of
-      development and should be treated as <quote>not implemented
-      yet</quote>, rather than actual limitations.</para>
-      <itemizedlist>
-        <listitem>
-          <simpara>
-            The server will allocate, renew, or rebind a maximum of one lease
-            for a particular IA option (IA_NA or IA_PD) sent by a client.
-            <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc8415">RFC 8415</link>
-            allows for multiple addresses or prefixes to be allocated for a single IA.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>Temporary addresses are not supported.</simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            Client reconfiguration (RECONFIGURE) is not yet supported.
-          </simpara>
-        </listitem>
-      </itemizedlist>
-    </section>
-
-    <section id="dhcp6-srv-examples">
-      <title>Kea DHCPv6 server examples</title>
-
-      <para>
-        A collection of simple-to-use examples for the DHCPv6 component of Kea is
-        available with the source files, located in the doc/examples/kea6
-        directory.
-      </para>
-
-    </section>
-
-    <section id="dhcp6-cb">
-      <title>Configuration Backend in DHCPv6</title>
-      <para>
-        In the <xref linkend="config-backend"/> we have described the
-        Configuration Backend feature, its applicability and limitations. This
-        section focuses on the usage of the CB with the DHCPv6 server. It lists
-        the supported parameters, describes limitations and gives examples of the
-        DHCPv6 server configuration to take advantage of the CB. Please also refer
-        to the sibling section <xref linkend="dhcp4-cb"/> for the
-        DHCPv4 specific usage of the CB.
-      </para>
-
-      <section id="dhcp6-cb-parameters">
-        <title>Supported Parameters</title>
-        <para>The ultimate goal for the CB is to serve as a central configuration
-        repository for one or multiple Kea servers connected to the database.
-        In the future it will be possible to store the most of the server's configuration
-        in the database and reduce the configuration file to bare minimum, i.e.
-        the only mandatory parameter will be the <command>config-control</command>
-        which includes the necessary information to connect to the database. In
-        the Kea 1.6.0 release, however, only the subset of the DHCPv4 server
-        parameters can be stored in the database. All other parameters must be
-        specified in the JSON configuration file, if required.</para>
-
-        <para>The following table lists DHCPv6 specific parameters supported by
-        the Configuration Backend with an indication on which level of the
-        hierarchy it is currently supported. The "n/a" is used in cases
-        when the particular parameter is not applicable on the particular
-        level of the hierarchy or in cases when the parameter is not supported
-        by the server on this level of hierarchy. The "no" is used when
-        the parameter is supported by the server on the particular level of
-        hierarchy but is not configurable via the Configuration Backend.
-        </para>
-
-        <para>All supported parameters can be configured via <command>cb_cmds</command>
-        hooks library described in the <xref linkend="cb-cmds-library"/>. The
-        general rule is that the scalar global parameters are set using the
-        <command>remote-global-parameter6-set</command>. The shared network
-        specific parameters are set using the <command>remote-network6-set</command>.
-        Finally, the subnet and pool level parameters are set using the
-        <command>remote-subnet6-set</command>. Whenever there is an exception from
-        this general rule, it is highlighted in the table. The non-scalar global
-        parameters have dedicated commands, e.g. modifying the global DHCPv6 options
-        (<command>option-data</command>) is performed using the
-        <command>remote-option6-global-set</command>.</para>
-
-
-        <para>
-          <table frame="all" xml:id="dhcp6-cb-parameters">
-            <title>List of DHCPv6 Parameters Supported by the Configuration Backend</title>
-            <tgroup cols="6">
-              <colspec colname="parameter"/>
-              <colspec colname="global" align="center"/>
-              <colspec colname="shared network" align="center"/>
-              <colspec colname="subnet" align="center"/>
-              <colspec colname="pool" align="center"/>
-              <colspec colname="pd-pool" align="center"/>
-              <thead>
-                <row>
-                  <entry>Parameter</entry>
-                  <entry>Global</entry>
-                  <entry>Shared Network</entry>
-                  <entry>Subnet</entry>
-                  <entry>Pool</entry>
-                  <entry>Prefix Delegation Pool</entry>
-                </row>
-              </thead>
-              <tbody>
-                <row><entry>calculate-tee-times</entry><entry>yes</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry><entry>n/a</entry></row>
-                <row><entry>client-class</entry><entry>n/a</entry><entry>yes</entry><entry>yes</entry><entry>no</entry><entry>no</entry></row>
-                <row><entry>decline-probation-period</entry><entry>yes</entry><entry>n/a</entry><entry>n/a</entry><entry>n/a</entry><entry>n/a</entry></row>
-                <row><entry>delegated-len</entry><entry>n/a</entry><entry>n/a</entry><entry>n/a</entry><entry>n/a</entry><entry>yes</entry></row>
-                <row><entry>dhcp4o6-port</entry><entry>yes</entry><entry>n/a</entry><entry>n/a</entry><entry>n/a</entry><entry>n/a</entry></row>
-                <row><entry>excluded-prefix</entry><entry>n/a</entry><entry>n/a</entry><entry>n/a</entry><entry>n/a</entry><entry>no</entry></row>
-                <row><entry>excluded-prefix-len</entry><entry>n/a</entry><entry>n/a</entry><entry>n/a</entry><entry>n/a</entry><entry>no</entry></row>
-                <row><entry>interface</entry><entry>n/a</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry><entry>n/a</entry></row>
-                <row><entry>interface-id</entry><entry>n/a</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry><entry>n/a</entry></row>
-                <row><entry>option-data</entry><entry>yes (via remote-option6-global-set)</entry><entry>yes</entry><entry>yes</entry><entry>yes</entry><entry>yes</entry></row>
-                <row><entry>option-def</entry><entry>yes (via remote-option-def6-set)</entry><entry>n/a</entry><entry>n/a</entry><entry>n/a</entry><entry>n/a</entry></row>
-                <row><entry>preferred-lifetime</entry><entry>yes</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry><entry>n/a</entry></row>
-                <row><entry>prefix</entry><entry>n/a</entry><entry>n/a</entry><entry>n/a</entry><entry>n/a</entry><entry>yes</entry></row>
-                <row><entry>prefix-len</entry><entry>n/a</entry><entry>n/a</entry><entry>n/a</entry><entry>n/a</entry><entry>yes</entry></row>
-                <row><entry>rapid-commit</entry><entry>yes</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry><entry>n/a</entry></row>
-                <row><entry>rebind-timer</entry><entry>yes</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry><entry>n/a</entry></row>
-                <row><entry>relay</entry><entry>n/a</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry><entry>n/a</entry></row>
-                <row><entry>renew-timer</entry><entry>yes</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry><entry>n/a</entry></row>
-                <row><entry>require-client-classes</entry><entry>n/a</entry><entry>yes</entry><entry>yes</entry><entry>no</entry><entry>no</entry></row>
-                <row><entry>reservation-mode</entry><entry>yes</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry><entry>n/a</entry></row>
-                <row><entry>t1-percent</entry><entry>yes</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry><entry>n/a</entry></row>
-                <row><entry>t2-percent</entry><entry>yes</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry><entry>n/a</entry></row>
-                <row><entry>valid-lifetime</entry><entry>yes</entry><entry>yes</entry><entry>yes</entry><entry>n/a</entry><entry>n/a</entry></row>
-              </tbody>
-            </tgroup>
-          </table>
-        </para>
-      </section>
-
-      <section id="dhcp6-cb-json">
-      <title>Enabling Configuration Backend</title>
-      <para>
-        The following configuration snippet demonstrates how to enable the MySQL
-        Configuration Backend for the DHCPv6 server:
-
-<screen>
-{
-    "Dhcp6": {
-        "config-control": {
-            "config-databases": [
-                {
-                    "type": "mysql",
-                    "name": "kea",
-                    "user": "kea",
-                    "password": "kea",
-                    "host": "2001:db8:1::1",
-                    "port": 3302
-                }
-            ],
-            "config-fetch-wait-time": 20
-        },
-        "hooks-libraries": [
-            {
-                "library": "/usr/local/lib/kea/hooks/libdhcp_mysql_cb.so"
-            },
-            {
-                "library": "/usr/local/lib/kea/hooks/libdhcp_cb_cmds.so"
-            }
-        ],
-        ...
-    }
-}
-</screen>
-      </para>
-
-      <para>
-        The configuration structure is almost identical as for the DHCPv4
-        server (see <xref linkend="dhcp4-cb-json"/> for the detailed description).
-      </para>
-
-      </section>
-
-    </section>
-
-  </chapter>
diff --git a/doc/guide/hammer.xml b/doc/guide/hammer.xml
deleted file mode 100644 (file)
index dd54270..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-<!--
- - Copyright (C) 2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/.
--->
-
-<!-- need this include to make the &keaversion; macro work -->
-<!DOCTYPE book [
-<!ENTITY % keaversion SYSTEM "version.ent">
-%keaversion;
-]>
-
-<section xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="hammer">
-  <title>Hammer Building Tool</title>
-  <para>
-    An optionl building tool called Hammer was introduced with Kea 1.6.0. It
-    is a Python 3 script that lets users automate tasks related to building
-    Kea, such as setting up virtual machines, installing Kea dependencies,
-    compiling Kea with various options, running unit-tests and more. This tool
-    was created primarily for internal QA purposes at ISC and it is
-    not included in the Kea distribution. However, it is available in
-    the Kea git repository. This tool was developed primarily for
-    internal purpose and ISC cannot guarantee its proper operation. If
-    you decide to use it, please do so with care.
-  </para>
-
-  <note>
-    <simpara>Use of this tool is completely optional. Everything it does can
-    be done manually.</simpara>
-  </note>
-
-  <para>
-    The first time user is strongly encouraged to look at Hammer's built in
-    help: <screen><userinput>./hammer.py --help</userinput></screen> It will
-    list available parameters.
-  </para>
-
-  <para>
-    Hammer is able to set up various operating systems running eiter in LXC
-    or in VirtualBox. To list of supported systems, use
-    <command>supported-systems</command> command:
-    <screen>
-$<userinput>./hammer.py supported-systems</userinput>
-fedora:
-  - 27: lxc, virtualbox
-  - 28: lxc, virtualbox
-  - 29: lxc, virtualbox
-centos:
-  - 7: lxc, virtualbox
-rhel:
-  - 8: virtualbox
-ubuntu:
-  - 16.04: lxc, virtualbox
-  - 18.04: lxc, virtualbox
-  - 18.10: lxc, virtualbox
-debian:
-  - 8: lxc, virtualbox
-  - 9: lxc, virtualbox
-freebsd:
-  - 11.2: virtualbox
-  - 12.0: virtualbox
-    </screen>
-
-    It is also possible to run build locally, in current system (if
-    the OS is supported).
-  </para>
-
-  <!-- @todo: explain how to install deps (hammer ensure-hammer-deps), explain
-       what is installed -->
-  <para>
-    At first it is required to install Hammer dependencies which is Vagrant and either
-    VirtualBox or LXC. To make life easier Hammer can install Vagrant and required
-    Vagrant plugins using the command:
-    <screen><userinput>./hammer.py ensure-hammer-deps</userinput></screen>
-
-    VirtualBox and LXC need to be installed manually.
-  </para>
-
-  <para>
-    Basic functionality provided by Hammer is preparing building environment and
-    performing actual build and running unit tests locally, in current system.
-    This can be achieved by running the command:
-    <screen><userinput>./hammer.py build -p local</userinput></screen>
-  </para>
-
-  <para>
-    The scope of the process can be defined using --with (-w) and --without (-x) options.
-    By default the build command will build Kea with documentation, install it locally
-    and run unit tests.
-  </para>
-
-  <para>
-    To exclude installation and generating docs do:
-    <screen><userinput>./hammer.py build -p local -x install docs</userinput></screen>
-  </para>
-
-  <para>
-    The basic scope can be extended by: mysql, pgsql, cql, native-pkg, radius, shell, forge.
-  </para>
-
-  <note>
-    <simpara>For build Kea locally installing Hammer dependencies like Vagrant is not needed.</simpara>
-  </note>
-
-  <para>
-    Hammer can be told to set up a new virtual machine with specified operating system
-    and not running the build:
-    <screen><userinput>./hammer.py prepare-system -p virtualbox -s freebsd -r 12.0</userinput></screen>
-    This way we can prepare a system for our own use. To get to such system using SSH invoke:
-    <screen><userinput>./hammer.py ssh -p virtualbox -s freebsd -r 12.0</userinput></screen>
-  </para>
-
-  <para>
-    It is possible to speed up subsequent Hammer builds. To achieve this Hammer
-    employs <ulink url="https://ccache.samba.org/">ccache</ulink>. During compilation
-    ccache stores object to shared folder. In subsequent runs instead doing actuall
-    compilation ccache just returns stored earlier objects. Cache with objects for
-    reuse needs to be stored outside of VM or LXC. To indicate such folder Hammer
-    requires providing --ccache-dir parameter. In indicated folder there are stored
-    objects for each target operating system separatelly.
-    <screen><userinput>
-      ./hammer.py build -p lxc -s ubuntu -r 18.04 --ccache-dir ~/kea-ccache
-    </userinput></screen>
-  </para>
-
-  <note>
-    <simpara>For now ccache is only supported for LXC provider in Hammer. Support
-    for VirtualBox will be added later.</simpara>
-  </note>
-
-  <para>
-    For more information check: <screen><userinput>./hammer.py --help</userinput></screen>
-  </para>
-
-</section>
diff --git a/doc/guide/hooks-cb-cmds.xml b/doc/guide/hooks-cb-cmds.xml
deleted file mode 100644 (file)
index 57d6fa2..0000000
+++ /dev/null
@@ -1,1512 +0,0 @@
-<!--
- - Copyright (C) 2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-
-    <section id="cb-cmds-library">
-      <title>cb_cmds: Configuration Backend Commands</title>
-      <para>
-        This section describes the <command>cb_cmds</command> hooks library
-        which is used to manage Kea servers' configurations in the Configuration
-        Backends. This library must be used in conjuction with the available CB
-        hooks libraries  implementing the common APIs to create, read, update
-        and delete (CRUD) the configuration information in the respective
-        databases. For example: the <command>mysql_cb</command> hooks library,
-        released in Kea 1.6.0, implements this API for MySQL. In order to manage
-        the configuration information in the MySQL database both
-        <command>mysql_cb</command> and <command>cb_cmds</command> libraries
-        must be loaded by the server used for the configuration management.
-      </para>
-
-      <para>The <command>cb_cmds</command> library is only available to ISC
-      customers with a support contract.
-
-      <note>
-        <para>This library may only be loaded by the <command>kea-dhcp4</command>
-        or the <command>kea-dhcp6</command> process.
-        </para>
-      </note>
-      </para>
-
-      <section>
-        <title>Commands Structure</title>
-        <para>There are 5 types of commands supported by this library:</para>
-        <itemizedlist>
-          <listitem><simpara><command>del</command> - delete selected object from the
-          database, e.g. <command>remote-global-parameter4-del</command>
-          </simpara></listitem>
-          <listitem><simpara><command>get</command> - fetch selected object from the
-          database, e.g. <command>remote-subnet4-get</command>,</simpara></listitem>
-          <listitem><simpara><command>get-all</command> - fetch all objects of the
-          particular type from the database, e.g.
-          <command>remote-option-def4-get-all</command>,</simpara></listitem>
-          <listitem><simpara><command>list</command> - list all objects of the particular
-          type in the database, e.g. <command>remote-network4-list</command>; this class
-          of commands returns brief information about each object comparing to the output
-          of <command>get-all</command>,</simpara>
-          </listitem>
-          <listitem><simpara><command>set</command> - creates or replaces an object
-          of the given type in the database, e.g. <command>remote-option4-global-set</command>
-          .</simpara></listitem>
-        </itemizedlist>
-
-        <para>All types of commands accept optional <command>remote</command> map which
-        selects the database instance to which the command refers. For example:
-<screen>
-{
-    "command": "remote-subnet4-list",
-    "arguments": {
-        "remote": {
-            "type": "mysql",
-            "host": "192.0.2.33",
-            "port": 3302
-        }
-    }
-}
-</screen>
-        </para>
-        <para>
-          selects the MySQL database, running on host 192.0.2.33 and port 3302, to
-          fetch the list of subnets from. All parameters in the
-          <command>remote</command> are optional. The <command>port</command>
-          parameter can be only specified in conjuction with the
-          <command>host</command>. If no parameters in the <command>remote</command>
-          parameter are to be specified, the parameter should be omitted. In this
-          case, the server will use the first backend listed in the
-          <command>config-control</command> map within the configuration of the
-          server receiving the command.
-        </para>
-
-        <note>
-          <para>
-            In the Kea 1.6.0 release, it is possible to configure the Kea server to
-            use only one configuration backend. Strictly speaking, it is possible
-            to point Kea server to at most one MySQL database using the
-            <command>config-control</command> parameter. That's why, in this
-            release, the <command>remote</command> parameter may be omitted in
-            the commands because the cb_cmds hooks library will use by default
-            the sole backend.
-          </para>
-        </note>
-      </section>
-
-      <section id="cb-cmds-dhcp">
-        <title>Control Commands for DHCP Servers</title>
-        <para>This section describes and gives some examples of the control
-        commands implemented by the <command>cb_cmds</command> hooks library, to manage
-        the configuration information of the DHCPv4 and DHCPv6 servers. Many of the
-        commands are almost identical between DHCPv4 and DHCPv6, i.e. only differ by the
-        command name. Other commands slightly differ by the structure of the inserted
-        data, e.g. the structure of the IPv4 subnet information is different than the
-        structure of the IPv6 subnet. Nevertheless, they still share the structure of
-        the command arguments and thus it makes sense to describe them together.</para>
-
-        <para>In the following sections, various commands are described and the
-        usage examples are provided. In the sections jointly describing the DHCPv4 and
-        DHCPv6 variants of the particular command we sometimes use the following
-        notation - the <command>remote-subnet[46]-set</command> is the wildcard
-        name for the two commands: <command>remote-subnet4-set</command> and
-        <command>remote-subnet6-set</command>.</para>
-
-        <para>In addition, whenever the text in the subsequent sections refers to a
-        DHCP command or DHCP parameter, it refers to both DHCPv4 and DHCPv6
-        variants. The text specific to the particular server type refers to them as:
-        DHCPv4 command, DHCPv4 parameter, DHCPv6 command, DHCPv6 parameter etc.
-        </para>
-
-        <section id="cb-cmds-metadata">
-          <title>Metadata</title>
-          <para>The typical response to the <command>get</command> or <command>list</command>
-          command includes a list of returned objects (e.g. subnets) and each such
-          object contains the <command>metadata</command> map with some database specific
-          information describing this object. In other words, the metadata contains any
-          information about the fetched object which may be useful for the administrator,
-          but is not the part of the object specification from the DHCP server standpoint.
-          In the Kea 1.6.0 release, the metadata is limited to the
-          <command>server-tags</command>, which describes the associations of the object
-          with the selected servers or all servers.
-          </para>
-
-          <para>The following is the example response to the <command>remote-network4-list</command>
-          command, which includes the metadata:
-          <screen>
-{
-    "result": 0,
-    "text": "1 IPv4 shared network(s) found.",
-    "arguments": {
-        "shared-networks": [
-            {
-                "name": "level3",
-                "metadata": {
-                    "server-tags": [ "all" ]
-                }
-            }
-        ],
-        "count": 1
-    }
-}
-         </screen>
-         </para>
-
-          <para>Client implementations must not assume that the metadata contains
-          only the <command>server-tags</command> parameter. In the future releases
-          this map will be extended with additional information, e.g. object
-          modification time, log message created during the last modification etc.
-          </para>
-        </section>
-
-        <section id="command-remote-server4-del">
-          <title>remote-server4-del, remote-server6-del commands</title>
-          <para id="command-remote-server6-del">This command is used to delete the
-          information about a selected DHCP server from the configuration database.
-          The server is identified by a unique case insensitive server tag.
-          For example:
-<screen>
-{
-    "command": "remote-server4-del",
-    "arguments": {
-        "servers": [
-            {
-                "server-tag": "server1"
-            }
-        ],
-        "remote": {
-            "type": "mysql"
-        }
-    }
-}
-</screen>
-          </para>
-          <para>As a result of this command, the user defined server called
-          <command>server1</command> is removed from the database. All associations
-          of the configuration information with this server are automatically
-          removed from the database. The non-shareable configuration information,
-          such as: global parameters, option definitions and global options
-          associated with the server are removed from the database. The shareable
-          configuration information, i.e. the configuration elements which may be
-          associated with more than one server, is preserved. In particular,
-          the subnets and shared networks associated with the deleted servers are
-          preserved. If any of the shareable configuration elements was associated
-          only with the deleted server, this object becomes unassigned (orphaned).
-          For example: if a subnet has been created and associated with the
-          <command>server1</command> using the <command>remote-subnet4-set</command>
-          command and the server1 is subsequently deleted, the subnet remains in the
-          database but none of the servers can use this subnet. The subnet can
-          be updated using the <command>remote-subnet4-set</command> and
-          associated with some other server or with all servers using the special
-          server tag "all". Such subnet can be also deleted from the database
-          using the <command>remote-subnet4-del-by-id</command> or
-          <command>remote-subnet4-del-by-prefix</command>, if it is no longer
-          needed.
-          </para>
-
-          <para>The following is the successful response to the
-          <command>remote-server4-del</command> command:
-<screen>
-{
-    "result": 0,
-    "text": "1 DHCPv4 server(s) deleted."
-    "arguments": {
-        "count": 1
-    }
-}
-</screen>
-          </para>
-          <note>
-            <simpara>The <command>remote-server4-del</command> and
-            <command>remote-server6-del</command> commands must be used with care,
-            because an accidental deletion of the server causes some parts of the existing
-            configurations to be lost permanently from the database. This operation
-            is not reversible. Re-creation of the accidentally deleted server does not
-            revert the lost configuration for that server and such configuration
-            must be re-created manually by the user.
-            </simpara>
-          </note>
-        </section>
-
-        <section id="command-remote-server4-get">
-          <title>remote-server4-get, remote-server6-get commands</title>
-          <para id="command-remote-server6-get">This command is used to fetch the
-          information about the selected DHCP server from the configuration database.
-          For example:
-<screen>
-{
-    "command": "remote-server6-get"
-    "arguments": {
-        "servers": [
-            {
-                "server-tag": "server1"
-            }
-        ],
-        "remote": {
-            "type": "mysql"
-        }
-    }
-}
-</screen>
-          </para>
-
-          <para>This command fetches the information about the DHCPv6 server identified
-          by the server tag <command>server1</command>. The server tag is case insensitive.
-          A successful response returns  basic information about the server, such as
-          server tag and the user's description of the server:
-<screen>
-{
-    "result": 0,
-    "text": "DHCP server server1 found.",
-    "arguments": {
-        "servers": [
-            {
-                "server-tag": "server1",
-                "description": "A DHCPv6 server located on the first floor."
-            }
-        ],
-        "count": 1
-    }
-}
-</screen>
-          </para>
-        </section>
-
-        <section id="command-remote-server4-get-all">
-          <title>remote-server4-get-all, remote-server6-get-all commands</title>
-          <para id="command-remote-server6-get-all">This command is used to fetch all user
-          defined DHCPv4 or DHCPv6 servers from the database. The command structure
-          is very simple:
-<screen>
-{
-    "command": "remote-server4-get-all"
-    "arguments": {
-        "remote": {
-            "type": "mysql"
-        }
-    }
-}
-</screen>
-          </para>
-          <para>The response includes basic information about each server, such as
-          its server tag and description:
-<screen>
-{
-    "result": 0,
-    "text": "DHCPv4 servers found.",
-    "arguments": {
-        "servers": [
-            {
-                "server-tag": "server1",
-                "description": "A DHCP server located on the first floor."
-            },
-            {
-                "server-tag": "server2",
-                "description": "An old DHCP server to be soon replaced."
-            }
-        ],
-        "count": 2
-    }
-}
-</screen>
-          </para>
-        </section>
-
-        <section id="command-remote-server4-set">
-          <title>remote-server4-set, remote-server6-set commands</title>
-          <para id="command-remote-server6-set">This command is used to create or replace
-          an information about a DHCP server in the database. The information about the
-          server must be created when there is a need to differentiate the configurations
-          used by various Kea instances connecting to the same database. Various
-          configuration elements, e.g. global parameters, subnets etc. may be explicitly
-          associated with the selected servers (using server tags as identifiers),
-          allowing only these servers to use the respective configuration elements.
-          Using the particular server tag to make such associations is only possible when
-          the server information has been stored in the database via the
-          <command>remote-server4-set</command> or
-          <command>remote-server6-set</command> commands. The following command creates
-          a new (or updates an existing) DHCPv6 server in the database:
-<screen>
-{
-    "command": "remote-server6-set"
-    "arguments": {
-        "servers": [
-            {
-                "server-tag": "server1",
-                "description": "A DHCP server on the ground floor."
-            }
-        ],
-        "remote": {
-            "type": "mysql"
-        }
-    }
-}
-</screen>
-          </para>
-          <para>The server tag must be unique accross all servers in the database. When
-          the server information under the given server tag already exists, it is replaced
-          with the new information. The specified server tag is case insensitive. The
-          maximum length of the server tag is 256 characters. The following keywords are
-          reserved and must not be used as server tags: "all" and "any".</para>
-
-          <para>The following is the example response to the above command:
-<screen>
-{
-    "result": 0,
-    "text": "DHCPv6 server successfully set.",
-    "arguments": {
-        "servers": [
-            {
-                "server-tag": "server1",
-                "description": "A DHCP server on the ground floor."
-            }
-        ]
-    }
-}
-</screen>
-          </para>
-        </section>
-
-        <section id="command-remote-global-parameter4-del">
-          <title>remote-global-parameter4-del, remote-global-parameter6-del commands</title>
-          <para id="command-remote-global-parameter6-del">This command is used to
-          delete a global DHCP parameter from the configuration database. When the
-          parameter is deleted from the database the server will use the value
-          specified in the configuration file for this parameter or a default
-          value if the parameter is not specified in the configuration file.</para>
-          <para>The following command attempts to delete the DHCPv4
-          <command>renew-timer</command> parameter common for all servers from
-          the database:
-          <screen>
-{
-    "command": "remote-global-parameter4-del",
-    "arguments": {
-        "parameters": [ "renew-timer" ],
-        "remote": {
-            "type": "mysql"
-         },
-         "server-tags": [ "all" ]
-    }
-}
-          </screen>
-          </para>
-
-          <para>
-            If the server specific parameter is to be deleted, the <command>server-tags</command>
-            list must contain the tag of the appropriate server. There must be exactly one
-            server tag specified in this list.
-          </para>
-        </section>
-
-        <section id="command-remote-global-parameter4-get">
-          <title>remote-global-parameter4-get, remote-global-parameter6-get commands</title>
-          <para id="command-remote-global-parameter6-get">These commands are used to
-          fetch a scalar global DHCP parameter from the configuration database.</para>
-          <para>The following command attempts to fetch the
-          <command>boot-file-name</command> parameter for the "server1":
-          <screen>
-{
-    "command": "remote-global-parameter4-get",
-    "arguments": {
-        "parameters": [ "boot-file-name" ],
-         "remote": {
-             "type": "mysql"
-         },
-         "server-tags": [ "server1" ]
-    }
-}
-          </screen>
-          </para>
-          <para>
-            The returned value has one of the four scalar types: string, integer, real
-            or boolean. Non scalar global configuration parameters, such as map or list,
-            are not returned by this command.</para>
-
-            <para>In case of the example above the string value is returned, e.g.:
-            <screen>
-{
-    "result": 0,
-    "text": "1 DHCPv4 global parameter found.",
-    "arguments": {
-        "parameters": {
-            "boot-file-name": "/dev/null",
-            "metadata": {
-                "server-tags": [ "all" ]
-            }
-        },
-        "count": 1
-    }
-}
-            </screen>
-          </para>
-
-          <para>
-            Note that the response above indicates that the returned parameter is associated
-            with "all" servers rather than "server1" used in the command. This indicates
-            that there is no server1 specific value in the database. Therefore, the value
-            shared by all servers is returned. If there was the server1 specific value
-            in the database this value would be returned instead.
-          </para>
-
-          <para>
-            The example response for the integer value is:
-            <screen>
-{
-    "result": 0,
-    "text": "1 DHCPv4 global parameter found.",
-    "arguments": {
-        "parameters": {
-            "renew-timer": 2000,
-            "metadata": {
-                "server-tags": [ "server1" ]
-            }
-        },
-        "count": 1
-    }
-}
-            </screen>
-          </para>
-
-          <para>
-            The real value:
-            <screen>
-{
-    "result": 0,
-    "text": "1 DHCPv4 global parameter found.",
-    "arguments": {
-        "parameters": {
-            "t1-percent": 0.85,
-            "metadata": {
-                "server-tags": [ "all" ]
-            }
-        },
-        "count": 1
-    }
-}
-            </screen>
-          </para>
-
-          <para>
-            Finally, the boolean value:
-            <screen>
-{
-    "result": 0,
-    "text": "1 DHCPv4 global parameter found.",
-    "arguments": {
-        "parameters": {
-            "match-client-id": true,
-            "metadata": {
-                "server-tags": [ "server2" ]
-            }
-        },
-        "count": 1
-    }
-}
-            </screen>
-          </para>
-        </section>
-
-        <section id="command-remote-global-parameter4-get-all">
-          <title>remote-global-parameter4-get-all, remote-global-parameter6-get-all commands</title>
-          <para id="command-remote-global-parameter6-get-all">These commands are used to
-          fetch all global DHCP parameters from the database for the specified server.
-          The following example demonstrates how to fetch all global parameters to be
-          used by the server "server1":
-<screen>
-{
-    "command": "remote-global-parameter4-get-all",
-    "arguments": {
-        "remote": {
-            "type": "mysql"
-        },
-        "server-tags": [ "server1" ]
-    }
-}
-</screen>
-          </para>
-
-          <para>
-            The example response may look as follows:
-<screen>
-{
-    "result": 0,
-    "text": "DHCPv4 global parameters found.",
-    "arguments": {
-        "parameters": [
-            {
-                "boot-file-name": "/dev/null",
-                "metadata": {
-                    "server-tags": [ "server1" ]
-                }
-            },
-            {
-                "match-client-id": true,
-                "metadata": {
-                    "server-tags": [ "all" ]
-                }
-            }
-        ],
-        "count": 2
-    }
-}
-</screen>
-          </para>
-
-          <para>
-            The example response contains two parameters, one string parameter and one
-            boolean parameter. The metadata returned for each parameter indicates
-            if this parameter is specific to the "server1" or all servers. Since the
-            <command>match-client-id</command> value is associated with "all" servers
-            it indicates that there is no server1 specific setting for this parameter.
-            Each parameter always has exactly one server tag associated with it, because
-            the global parameters are non-shareable configuration elements.
-          </para>
-
-          <note>
-            <simpara>
-              If the server tag is set to "all" in the command, the response will
-              contain only the global parameters associated with the logical server
-              "all". When the server tag points to the specific server (as in the
-              example above), the returned list combines parameters associated with
-              this server and all servers, but the former take precedence.
-            </simpara>
-          </note>
-        </section>
-
-        <section id="command-remote-global-parameter4-set">
-          <title>remote-global-parameter4-set</title>
-          <para id="command-remote-global-parameter6-set">This command is used to
-          create scalar global DHCP parameters in the database. If any of the parameters
-          already exists, its value is replaced as a result of this command. It is
-          possible to set multiple parameters within a single command, each having
-          one of the four types: a string, integer, real or boolean. For example:
-          <screen>
-{
-    "command": "remote-global-parameter4-set"
-    "arguments": {
-        "parameters": {
-            "boot-file-name": "/dev/null",
-            "renew-timer": 2000,
-            "t1-percent": 0.85,
-            "match-client-id": true
-        },
-        "remote": {
-            "type": "mysql"
-        },
-        "server-tags": [ "server1" ]
-    }
-}
-          </screen>
-          </para>
-          <para>An error is returned if any of the parameters is not supported by the
-          DHCP server or its type does not match. Care should be taken when
-          multiple parameters are specified in a single command because it is
-          possible that only some of the parameters are stored successfully and
-          some fail. If an error occurred when processing this command, it is
-          recommended to use <command>remote-global-parameter[46]-get-all</command>
-          to check which of the parameters have been stored/updated successfully
-          and which failed.</para>
-
-          <para>The <command>server-tags</command> list is mandatory and it must
-          contain a single server tag or the keyword "all". In the example above,
-          all specified parameters are associated with the "server1" server.
-          </para>
-        </section>
-
-        <section id="command-remote-network4-del">
-          <title>remote-network4-del, remote-network6-del commands</title>
-          <para id="command-remote-network6-del">These commands are used to delete an
-          IPv4 or IPv6 shared network from the database. The optional parameter
-          <command>subnets-action</command> determines whether the subnets belonging
-          to the deleted shared network should also be deleted or preserved.
-          The <command>subnets-action</command> defaults to <command>keep</command>,
-          which preserves the subnets. If it is set to <command>delete</command>,
-          the subnets are deleted along with the shared network.</para>
-
-          <para>The following command:
-          <screen>
-{
-    "command": "remote-network6-del",
-    "arguments": {
-        "shared-networks": [
-            {
-                "name": "level3"
-            }
-        ],
-        "subnets-action": "keep",
-        "remote": {
-            "type": "mysql"
-        }
-    }
-}
-          </screen>
-            deletes the "level3" IPv6 shared network. The subnets are preserved
-            but they are disassociated from the deleted shared network and become
-            global. This behavior corresponds to the behavior of the
-            <command>network[46]-del</command> commands with respect to the
-            <command>subnets-action</command>.
-          </para>
-
-          <para>
-            Note that the <command>server-tags</command> parameter must not be used
-            for this command.
-          </para>
-        </section>
-
-        <section id="command-remote-network4-get">
-          <title>remote-network4-get, remote-network6-get commands</title>
-          <para id="command-remote-network6-get">These commands are used to retrieve
-          the information about an IPv4 or IPv6 shared network. The optional
-          parameter <command>subnets-include</command> denotes whether the
-          subnets belonging to the shared network should also be returned. This
-          parameter defaults to <command>no</command> in which case the subnets are
-          not returned. If this parameter is set to <command>full</command>,
-          the subnets are returned together with the shared network.</para>
-
-          <para>The following command fetches the "level3" IPv6 shared network along
-          with the full information about the subnets belonging to it:
-          <screen>
-{
-    "command": "remote-network6-get",
-    "arguments": {
-        "shared-networks": [
-            {
-                "name": "level3"
-            }
-        ],
-        "subnets-include": "full",
-        "remote": {
-            "type": "mysql"
-        }
-    }
-}
-          </screen>
-          </para>
-
-          <para>
-            Note that the <command>server-tags</command> parameter must not be used
-            for this command.
-          </para>
-        </section>
-
-        <section id="command-remote-network4-list">
-          <title>remote-network4-list, remote-network6-list commands</title>
-          <para id="command-remote-network6-list">These commands are used to list all
-          IPv4 or IPv6 shared networks for a server.
-          </para>
-
-          <para>The following command retrieves all shared networks to be used by the
-          "server1" and "server2":
-          <screen>
-{
-    "command": "remote-network4-list"
-    "arguments": {
-        "remote": {
-            "type": "mysql"
-        },
-        "server-tags": [ "server1", "server2" ]
-    }
-}
-          </screen>
-          </para>
-
-          <para>The <command>server-tags</command> parameter is mandatory and it contains
-          one or more server tags. It may contain the keyword "all" to fetch the shared
-          networks associated with all servers. When the <command>server-tags</command>
-          list contains the <command>null</command> value the returned response contains
-          a list of unassigned shared networks, i.e. the networks which are associated
-          with no servers. For example:
-
-          <screen>
-{
-    "command": "remote-network4-list"
-    "arguments": {
-        "remote": {
-            "type": "mysql"
-        },
-        "server-tags": [ null ]
-    }
-}
-          </screen>
-          </para>
-
-          <para>
-            The example response to this command when non-null server tags are specified
-            looks similar to this:
-            <screen>
-{
-    "result": 0,
-    "text": "3 IPv4 shared network(s) found.",
-    "arguments": {
-        "shared-networks": [
-            {
-                "name": "ground floor",
-                "metadata": {
-                    "server-tags": [ "all" ]
-                }
-            },
-            {
-                "name": "floor2",
-                "metadata": {
-                    "server-tags": [ "server1" ]
-                }
-            },
-            {
-                "name": "floor3",
-                "metadata": {
-                    "server-tags": [ "server2" ]
-                }
-            }
-        ],
-        "count": 3
-    }
-}
-            </screen>
-          </para>
-
-          <para>
-            The returned information about each shared network merely contains the
-            shared network name and the metadata. In order to fetch the detailed
-            information about the selected shared network, use the
-            <command>remote-network[46]-get</command> command.
-          </para>
-
-          <para>
-            The example response above contains three shared networks. One of the
-            shared networks is associated will all servers, so it is included in
-            the list of shared networks to be used by the "server1" and "server2".
-            The remaining two shared networks are returned because one of them
-            is associated with the "server1" and another one is associated with
-            the "server2".
-          </para>
-
-          <para>
-            When listing unassigned shared networks, the response will look similar
-            to this:
-            <screen>
-{
-    "result": 0,
-    "text": "1 IPv4 shared network(s) found.",
-    "arguments": {
-        "shared-networks": [
-            {
-                "name": "fancy",
-                "metadata": {
-                    "server-tags": [ null ]
-                }
-            }
-        ],
-        "count": 1
-    }
-}
-            </screen>
-          </para>
-
-          <para>
-            The <command>null</command> value in the metadata indicates that the
-            returned shared network is unassigned.
-          </para>
-
-        </section>
-
-        <section id="command-remote-network4-set">
-          <title>remote-network4-set</title>
-          <para id="command-remote-network6-set">These commands creates new or replaces an
-          existing IPv4 or IPv6  shared network in the database. The structure of the
-          shared network information is the same as in the Kea configuration file
-          (see <xref linkend="shared-network4"/> and <xref linkend="shared-network6"/>
-          for details), except that it is not allowed to specify subnets along with
-          the shared network information. Including the <command>subnet4</command>
-          or <command>subnet6</command> parameter within the shared network information
-          will result in an error.</para>
-
-          <para>These commands are intended to be used for managing the shared network
-          specific information and DHCP options. In order to associate and disassociate
-          the subnets with the shared networks the <command>remote-subnet[46]-set</command>
-          commands should be used.
-          </para>
-
-          <para>
-            The following command adds the IPv6 shared network "level3" to the database:
-            <screen>
-{
-    "command": "remote-network6-set",
-    "arguments": {
-        "shared-networks": [
-            {
-                "name": "level3",
-                "interface": "eth0",
-                "option-data": [ {
-                    "name": "sntp-servers",
-                    "data": "2001:db8:1::1"
-                } ],
-            }
-        ],
-        "remote": {
-            "type": "mysql"
-        },
-        "server-tags": [ "all" ]
-    }
-}
-            </screen>
-          </para>
-          <para>
-            This command includes the <command>interface</command> parameter which sets
-            the shared network level interface name. Remaining shared network level
-            parameters, which are not specified with the command, will be marked as
-            "unspecified" in the database. The DHCP server will use the global values
-            for unspecified parameters or, if the global values are not specified,
-            the default values will be used.
-          </para>
-
-          <para>
-            The <command>server-tags</command> list is mandatory for this command
-            and it must include one or more server tags. As a result the shared network
-            is associated with all listed servers. The shared network may be associated
-            with all servers connecting to the database when the keyword "all" is included.
-          </para>
-
-          <note>
-            <para>
-              Same as for other "set" commands, this command replaces the entire
-              information about the given shared network in the database if the
-              shared network already exists. Therefore, when sending this command,
-              make sure to always include all parameters that must be specified for
-              the updated shared network instance. Any unspecified parameter will
-              be marked unspecified in the database, even if its value was present
-              prior to sending the command.
-            </para>
-          </note>
-        </section>
-
-        <section id="command-remote-option-def4-del">
-          <title>remote-option-def4-del, remote-option-def6-del commands</title>
-          <para id="command-remote-option-def6-del">These commands are used to delete
-          a DHCP option definition from the database. The option definition is
-          identified by an option code and option space. For example:
-          <screen>
-{
-    "command": "remote-option-def6-del",
-    "arguments": {
-        "option-defs": [
-            {
-                "code": 1,
-                "space": "isc"
-            }
-        ],
-        "remote": {
-            "type": "mysql"
-        },
-        "server-tags": [ "server1" ]
-    }
-}
-          </screen>
-             deletes the definition of the option associated with the "server1",
-             having the code of 1 and belonging to the option space "isc". The
-             default option spaces are "dhcp4" and "dhcp6" for the DHCPv4 and
-             DHCPv6 top level options respectively. If there is no such option
-             explicitly associated with the server1, no option is deleted. In
-             order to delete an option belonging to "all" servers, the keyword
-             "all" must be used as server tag. The <command>server-tags</command>
-             list must contain exactly one tag. It must not include the
-             <command>null</command> value.
-          </para>
-        </section>
-
-        <section id="command-remote-option-def4-get">
-          <title>remote-option-def4-get, remote-option-def6-get commands</title>
-          <para id="command-remote-option-def6-get">These commands are used to
-          fetch a specified DHCP option definition from the database. The option
-          definition is identified by the option code and option space. The default
-          option spaces are "dhcp4" and "dhcp6" for the DHCPv4 and DHCPv6 top level
-          options respectively.</para>
-
-          <para>The following command retrieves a DHCPv4 option definition
-          associated with all servers, having the code of 1 and belonging to
-          the option space "isc":
-          <screen>
-{
-    "command": "remote-option-def4-get"
-    "arguments": {
-        "option-defs": [
-            {
-                "code": 1,
-                "space": "isc"
-            }
-        ],
-        "remote": {
-            "type": "mysql"
-        },
-        "server-tags": [ "all" ]
-    }
-}
-          </screen>
-          </para>
-
-          <para>The <command>server-tags</command> list must include exactly
-          one server tag or the keyword "all". It must not contain the
-          <command>null</command> value.
-          </para>
-        </section>
-
-        <section id="command-remote-option-def4-get-all">
-          <title>remote-option-def4-get-all, remote-option-def6-get-all commands</title>
-          <para id="command-remote-option-def6-get-all">These commands are used to
-          fetch all DHCP option definitions from the database for the particular
-          server or all servers. For example:
-          <screen>
-{
-    "command": "remote-option-def6-get-all"
-    "arguments": {
-        "remote": {
-            "type": "mysql"
-        },
-        "server-tags": [ "all" ]
-    }
-}
-          </screen>
-          </para>
-          <para>This command attempts to fetch all DHCPv6 option definitions associated
-          with "all" servers. The <command>server-tags</command> list is mandatory for
-          this command and it must include exactly one server tag or the keyword "all".
-          It must not include the <command>null</command> value.</para>
-
-          <para>The following is the example response to this command:
-          <screen>
-{
-    "result": 0,
-    "text": "1 DHCPv6 option definition(s) found.",
-    "arguments": {
-        "option-defs": [
-            {
-                "name": "bar",
-                "code": 1012,
-                "space": "dhcp6",
-                "type": "record",
-                "array": true,
-                "record-types": "ipv6-address, uint16",
-                "encapsulate": "",
-                "metadata": {
-                    "server-tags": [ "all" ]
-                }
-            }
-        ],
-        "count": 1
-    }
-}
-          </screen>
-          </para>
-          <para>The response contains an option definition associated with all servers
-          as indicated by the metadata.
-          </para>
-        </section>
-
-        <section id="command-remote-option-def4-set">
-          <title>remote-option-def4-set, remote-option-def6-set commands</title>
-          <para id="command-remote-option-def6-set">These commands create a new
-          DHCP option definition or replace an existing option definition in the
-          database. The structure of the option definition information is the
-          same as in the Kea configuration file (see <xref linkend="dhcp4-custom-options"/>
-          and <xref linkend="dhcp6-custom-options"/>).
-          The following command creates the DHCPv4 option definition in the top
-          level "dhcp4" option space and associates it with the "server1":
-          <screen>
-{
-    "command": "remote-option-def4-set",
-    "arguments": {
-        "option-defs": [
-            {
-                "name": "foo",
-                "code": 222,
-                "type": "uint32",
-                "array": false,
-                "record-types": "",
-                "space": "dhcp4",
-                "encapsulate": ""
-            }
-        ],
-        "remote": {
-            "type": "mysql"
-        },
-        "server-tags": [ "server1" ]
-    }
-}
-          </screen>
-          </para>
-
-          <para>The <command>server-tags</command> list must include exactly one
-          server tag or the keyword "all". It must not contain the
-          <command>null</command> value.</para>
-        </section>
-
-        <section id="command-remote-option4-global-del">
-          <title>remote-option4-global-del, remote-option6-global-del commands</title>
-          <para id="command-remote-option6-global-del">These commands are used to delete
-          a global DHCP option from the database. The option is identified by an option
-          code and option space. For example:
-          <screen>
-{
-    "command": "remote-option4-global-del",
-    "arguments": {
-        "options": [
-            {
-                "code": 5
-                "space": "dhcp4"
-            }
-        ],
-        "remote": {
-            "type": "mysql"
-        },
-        "server-tags": [ "server1" ]
-    }
-}
-          </screen>
-          </para>
-          <para>
-            The "dhcp4" is the top level option space where the standard DHCPv4
-            options belong. The <command>server-tags</command> is mandatory and
-            it must include a single option tag or the keyword "all". If the
-            explicit server tag is specified then this command attempts to delete
-            a global option associated with this server. If there is no such option
-            associated with the given server, no option is deleted. In order to
-            delete the option associated with all servers, the keyword "all"
-            must be specified.
-          </para>
-        </section>
-
-        <section id="command-remote-option4-global-get">
-          <title>remote-option4-global-get, remote-option6-global-get commands</title>
-          <para id="command-remote-option6-global-get">These commands are used to fetch
-          a global DHCP option from the database. The option is identified by the code
-          and option space. The top level option spaces where DHCP standard options
-          belong are called "dhcp4" and "dhcp6" for the DHCPv4 and DHCPv6 servers
-          respectively.
-          </para>
-          <para>
-            The following command retrieves the IPv6 "DNS Servers" (code 23) option
-            associated with all servers:
-            <screen>
-{
-    "command": remote-option6-global-get",
-    "arguments": {
-        "options": [
-            {
-                "code": 23,
-                "space": "dhcp6"
-            }
-        ],
-        "remote": {
-            "type": "mysql"
-        },
-        "server-tags": [ "all" ]
-    }
-}
-            </screen>
-          </para>
-          <para>
-            The <command>server-tags</command> is mandatory and it must include
-            exactly one server tag or the keyword "all". It must not contain the
-            <command>null</command> value.
-          </para>
-        </section>
-
-        <section id="command-remote-option4-global-get-all">
-          <title>remote-option4-global-get-all, remote-option6-global-get-all commands</title>
-          <para id="command-remote-option6-global-get-all">These commands are used to fetch
-          all global DHCP options from the configuration database for the particular server
-          or for all servers. The following command fetches all global DHCPv4 options for
-          the "server1":
-          <screen>
-{
-    "command": "remote-option6-global-get-all",
-    "arguments": {
-        "remote": {
-            "type": "mysql"
-        },
-        "server-tags": [ "server1" ]
-    }
-}
-          </screen>
-          </para>
-          <para>The <command>server-tags</command> list is mandatory for this command and
-          it must contain exactly one server tag or a keyword "all". It must not contain
-          the <command>null</command> value. The following is the example response to this
-          command with a single option being associated with the "server1" returned:
-          <screen>
-{
-    "result": 0,
-    "text": "DHCPv4 options found.",
-    "arguments": {
-        "options": [
-            {
-                "name": "domain-name-servers",
-                "code": 6,
-                "space": "dhcp4",
-                "csv-format": false,
-                "data": "192.0.2.3",
-                "metadata": {
-                    "server-tags": [ "server1" ]
-                }
-            }
-        ],
-        "count": 1
-    }
-}
-          </screen>
-          </para>
-        </section>
-
-        <section id="command-remote-option4-global-set">
-          <title>remote-option4-global-set, remote-option6-global-set command</title>
-          <para id="command-remote-option6-global-set">These commands create a new
-          global DHCP option or replace an existing option in the database. The
-          structure of the option information is the same as in the Kea configuration
-          file (see <xref linkend="dhcp4-std-options"/> and
-          see <xref linkend="dhcp4-std-options"/>). For example:
-          <screen>
-{
-    "command": "remote-option6-global-set",
-    "arguments": {
-        "options": [
-            {
-                "name": "dns-servers",
-                "data": "2001:db8:1::1"
-            }
-        ],
-        "remote": {
-            "type": "mysql"
-        },
-        "server-tags": [ "server1" ]
-    }
-}
-          </screen>
-          </para>
-          <para>The <command>server-tags</command> list is mandatory for this command
-          and it must include exactly one server tag or the keyword "all". It must
-          not include the <command>null</command> value. The command above associates
-          the option with the "server1" server.
-          </para>
-          <para>Note that specifying an option name instead of the option code only works
-          reliably for the standard DHCP options. When specifying a value for the
-          user defined DHCP option, the option code should be specified instead of
-          the name. For example:
-          <screen>
-{
-    "command": "remote-option6-global-set",
-    "arguments": {
-        "options": [
-            {
-                "code": 1,
-                "space": "isc",
-                "data": "2001:db8:1::1"
-            }
-        ],
-        "server-tags": [ "server1" ]
-    }
-}
-          </screen>
-          </para>
-        </section>
-
-        <section id="command-remote-subnet4-del-by-id">
-          <title>remote-subnet4-del-by-id, remote-subnet6-del-by-id command</title>
-          <para id="command-remote-subnet6-del-by-id">This is the first variant of
-          the commands used to delete an IPv4 or IPv6 subnet from the database.
-          It uses subnet ID to identify the subnet. For example, in order to
-          delete the IPv4 subnet with ID of 5:
-          <screen>
-{
-    "command": "remote-subnet4-del-by-id",
-    "arguments": {
-        "subnets": [
-            {
-                "id": 5
-            }
-        ],
-        "remote": {
-            "type": "mysql"
-        }
-    }
-}
-          </screen>
-          </para>
-          <para>The <command>server-tags</command> parameter must not be used
-          with this command.
-          </para>
-        </section>
-
-        <section id="command-remote-subnet4-del-by-prefix">
-          <title>remote-subnet4-del-by-prefix, remote-subnet6-del-by-prefix commands</title>
-          <para id="command-remote-subnet6-del-by-prefix">This is the second variant
-          of the commands used to delete an IPv4 or IPv6 subnet from the database.
-          It uses the subnet prefix to identify the subnet. For example:
-          <screen>
-{
-    "command": "remote-subnet6-del-by-prefix",
-    "arguments": {
-        "subnets": [
-            {
-                "subnet": "2001:db8:1::/64"
-            }
-        ],
-        "remote": {
-            "type": "mysql"
-        }
-    }
-}
-          </screen>
-          </para>
-          <para>The <command>server-tags</command> parameter must not be used with
-          this command.</para>
-        </section>
-
-        <section id="command-remote-subnet4-get-by-id">
-          <title>remote-subnet4-get-by-id, remote-subnet6-get-by-id commands</title>
-          <para id="command-remote-subnet6-get-by-id">This is the first variant of
-          the commands used to fetch an IPv4 or IPv6  subnet from the database. It
-          uses a subnet ID to identify the subnet. For example:
-          <screen>
-{
-    "command": "remote-subnet4-get-by-id",
-    "arguments": {
-        "subnets": [
-            {
-                "id": 5
-            }
-        ],
-        "remote": {
-            "type": "mysql"
-        }
-    }
-}
-          </screen>
-          </para>
-          <para>The <command>server-tags</command> parameter must not be used with
-          this command.</para>
-        </section>
-
-        <section id="command-remote-subnet4-get-by-prefix">
-          <title>remote-subnet4-get-by-prefix, remote-subnet6-get-by-prefix command</title>
-          <para id="command-remote-subnet6-get-by-prefix">This is the second variant
-          of the commands used to fetch an IPv4 or IPv6 subnet from the database. It
-          uses a subnet prefix to identify the subnet. For example:
-          <screen>
-{
-    "command": "remote-subnet6-get-by-prefix",
-    "arguments": {
-        "subnets": [
-            {
-                "subnet": "2001:db8:1::/64"
-            }
-        ],
-        "remote": {
-            "type": "mysql"
-        }
-    }
-}
-          </screen>
-          </para>
-          <para>The <command>server-tags</command> parameter must not be used with
-          this command.</para>
-        </section>
-
-        <section id="command-remote-subnet4-list">
-          <title>remote-subnet4-list, remote-subnet6-list commands</title>
-          <para id="command-remote-subnet6-list">These commands are used to list
-          all IPv4 or IPv6 subnets from the database for selected servers or all
-          servers. The following command retrieves all servers to be used by the
-          "server1" and "server2":
-          <screen>
-{
-    "command": "remote-subnet4-list"
-    "arguments": {
-        "remote": {
-            "type": "mysql"
-        },
-        "server-tags": [ "server1", "server2" ]
-    }
-}
-          </screen>
-          </para>
-          <para>The <command>server-tags</command> parameter is mandatory and it contains
-          one or more server tags. It may contain the keyword "all" to fetchg the subnets
-          associated with all servers. When the <command>server-tags</command> list contains
-          the <command>null</command> value the returned response contains a list of
-          unassigned subnets, i.e. the subnets which are associated with no servers.
-          For example:
-          <screen>
-{
-    "command": "remote-subnet4-list"
-    "arguments": {
-        "remote": {
-            "type": "mysql"
-        },
-        "server-tags": [ null ]
-    }
-}
-          </screen>
-          </para>
-          <para>The example response to this command when non-null server tags are specified
-          looks similar to this:
-          <screen>
-{
-    "result": 0,
-    "text": "2 IPv4 subnet(s) found.",
-    "arguments": {
-        "subnets": [
-            {
-                "id": 1,
-                "subnet": "192.0.2.0/24",
-                "shared-network-name": null,
-                "metadata": {
-                    "server-tags": [ "server1", "server2" ]
-                }
-            },
-            {
-                "id": 2,
-                "subnet": "192.0.3.0/24",
-                "shared-network-name": null,
-                "metadata": {
-                    "server-tags": [ "all" ]
-                }
-            }
-        ],
-        "count": 2
-    }
-}
-          </screen>
-          </para>
-          <para>The returned information about each subnet is limited to subnet identifier,
-          prefix and associated shared network name. In order to retrieve full
-          information about the selected subnet use the
-          <command>remote-subnet[46]-get-by-id</command> or
-          <command>remote-subnet[46]-get-by-prefix</command>.
-          </para>
-          <para>The example response above contains two subnets. One of the subnets is
-          associated with both servers: "server1" and "server2". The second subnet is
-          associated with all servers, thus it is also present in the configuration for
-          the "server1" and "server2".
-          </para>
-          <para>When listing unassigned subnets, the response will look similar to this:
-          <screen>
-{
-    "result": 0,
-    "text": "1 IPv4 subnet(s) found.",
-    "arguments": {
-        "subnets": [
-            {
-                "id": 3,
-                "subnet": "192.0.4.0/24",
-                "shared-network-name": null,
-                "metadata": {
-                    "server-tags": [ null ]
-                }
-            }
-        ],
-        "count": 1
-    }
-}
-          </screen>
-          </para>
-          <para>The <command>null</command> value in the metadata indicates that the
-          returned subnet is unassigned.
-          </para>
-        </section>
-
-        <section id="command-remote-subnet4-set">
-          <title>remote-subnet4-set, remote-subnet6-set commands</title>
-          <para id="command-remote-subnet6-set">These commands are used to create
-          a new IPv4 or IPv6 subnet or replace an existing subnet in the database.
-          Setting the subnet also associates or disassociates the subnet with a
-          shared network.</para>
-
-          <para>The structure of the subnet information is similar to the structure
-          used in the configuration file (see <xref linkend="dhcp4-configuration"/>
-          and <xref linkend="dhcp6-configuration"/>). The subnet information
-          conveyed in the <command>remote-subnet[46]-set</command> must include
-          additional parameter <command>shared-network-name</command> which denotes
-          whether the subnet belongs to a shared network or not.
-          </para>
-
-          <para>Consider the following example:
-          <screen>
-{
-    "command": "remote-subnet4-set",
-    "arguments": {
-        "subnets": [
-            {
-                "id": 5,
-                "subnet": "192.0.2.0/24",
-                "shared-network-name": "level3",
-                "pools": [ { "pool": "192.0.2.100-192.0.2.200" } ],
-                "option-data": [ {
-                    "name": "routers",
-                    "data": "192.0.2.1"
-                } ]
-            }
-        ],
-        "remote": {
-            "type": "mysql"
-        },
-        "server-tags": [ "all" ]
-    }
-}
-          </screen>
-          </para>
-
-          <para>It creates the subnet and associates the subnet with the "level3"
-          shared network. The "level3" must be created with the
-          <command>remote-network4-set</command> prior to creating the subnet.
-          </para>
-
-          <para>If the created subnet must be global (not associated with any
-          shared network), the <command>shared-network-name</command> must be
-          explicitly set to <command>null</command>:
-          <screen>
-{
-    "command": "remote-subnet4-set",
-    "arguments": {
-        "subnets": [
-            {
-                "id": 5,
-                "subnet": "192.0.2.0/24",
-                "shared-network-name": null,
-                "pools": [ { "pool": "192.0.2.100-192.0.2.200" } ],
-                "option-data": [ {
-                    "name": "routers",
-                    "data": "192.0.2.1"
-                } ]
-           }
-        ],
-        "server-tags": [ "all" ]
-    }
-}
-          </screen>
-          </para>
-
-          <para>The subnet created in the previous example is replaced with the
-          new subnet having the same parameters but it becomes global.</para>
-
-          <para>The <command>shared-network-name</command> parameter is mandatory
-          for the <command>remote-subnet4-set</command> command. The
-          <command>server-tags</command> list is mandatory and it must include
-          one or more server tags. As a result, the subnet is associated with
-          all of the listed servers. It may also be associated with "all" servers
-          connecting to the database when the keyword "all" is used as the server
-          tag.</para>
-
-          <note>
-            <para>
-              Same as for other "set" commands, this command replaces the entire
-              information about the particular subnet in the database, if the subnet
-              information is already present. Therefore, when sending this command,
-              make sure to always include all parameters that must be specified for
-              the updated subnet instance. Any unspecified parameter will be marked
-              as unspecified in the database, even if its value was present prior to
-              sending the command.
-            </para>
-          </note>
-        </section>
-
-      </section>
-
-    </section>
diff --git a/doc/guide/hooks-class-cmds.xml b/doc/guide/hooks-class-cmds.xml
deleted file mode 100644 (file)
index e7946b2..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-<!--
- - Copyright (C) 2018-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-
-    <section xml:id="class-cmds-library">
-      <title>class_cmds: Class Commands</title>
-      <para>
-        This section describes the Class Commands hooks library, which exposes
-        several control commands for manipulating client classes (part of
-        the Kea DHCP servers' configurations) without the need to restart those
-        servers. Using these commands it is possible to add, update, delete, and
-        list client classes configured for a given server.
-
-        <note>
-          <para>This library may only be loaded by the <command>kea-dhcp4</command>
-          or the <command>kea-dhcp6</command> process.
-          </para>
-        </note>
-
-        <para>The Class Commands hooks library is available to premium Kea
-        customers only.</para>
-      </para>
-
-      <section xml:id="command-class-add">
-        <title>class-add Command</title>
-        <para>The <command>class-add</command> command adds a new client
-        class to the DHCP server configuration. This class is appended at the
-        end of the list of classes used by the server and may depend
-        on any of the already configured client classes.</para>
-        <para>The following example demonstrates how to add a new client class
-        to the DHCPv4 server configuration:
-<screen>
-{
-    "command": "class-add",
-    "arguments": {
-        "client-classes": [
-            {
-                "name": "ipxe_efi_x64",
-                "test": "option[93].hex == 0x0009",
-                "next-server": "192.0.2.254",
-                "server-hostname": "hal9000",
-                "boot-file-name": "/dev/null"
-            }
-        ]
-    }
-}
-</screen>
-        </para>
-        <para>
-          Note that the <command>client-classes</command> parameter is a JSON list,
-          but it allows only a single client class to be present.
-        </para>
-
-        <para>
-          Here is the response to the <command>class-add</command>
-          command in our example:
-<screen>
-{
-    "result": 0,
-    "text": "Class 'ipxe_efi_x64' added."
-}
-</screen>
-        </para>
-      </section>
-
-      <section xml:id="command-class-update">
-        <title>class-update Command</title>
-        <para>
-          The <command>class-update</command> command updates an existing
-          client class in the DHCP server configuration. If the client class with the
-          given name doesn't exist, the server returns the result code of 3, which means that
-          the server configuration is not modified and the client class does not exist. The
-          <command>class-add</command> command must be used instead to create the new
-          client class.
-        </para>
-        <para>
-          The <command>class-update</command> command has the same argument structure
-          as the <command>class-add</command> command:
-<screen>
-{
-    "command": "class-update",
-    "arguments": {
-        "client-classes": [
-            {
-                "name": "ipxe_efi_x64",
-                "test": "option[93].hex == 0x0017",
-                "next-server": "0.0.0.0",
-                "server-hostname": "xfce",
-                "boot-file-name": "/dev/null"
-            }
-        ]
-    }
-}
-</screen>
-        </para>
-        <para>
-          Here is the response for our example:
-<screen>
-{
-    "result": 0,
-    "text": "Class 'ipxe_efi_x64' updated."
-}
-</screen>
-        </para>
-        <para>
-          Any parameter of the client class can be modified with this command, except
-          <command>name</command>. There is currently no way to rename the class,
-          because the class name is used as a key for searching the class to be updated.
-          To achieve a similar effect to renaming the class, an existing class
-          can be removed with the <command>class-del</command> command and then added
-          again with a different name using <command>class-add</command>. Note, however,
-          that the class with the new name will be added at the end of the list of
-          configured classes.
-        </para>
-      </section>
-
-      <section xml:id="command-class-del">
-        <title>class-del Command</title>
-        <para>The <command>class-del</command> is used to remove a particular class
-        from the server configuration. The class to be removed is identified by name.
-        The class is not removed if there are other classes depending on it;
-        to remove such a class, the dependent classes must be removed first.</para>
-        <para>The following is a sample command removing the
-        <command>ipxe_efi_x64</command> class:
-<screen>
-{
-    "command": "class-del",
-    "arguments": {
-        {
-            "name": "ipxe_efi_x64"
-        }
-    }
-}
-</screen>
-        </para>
-        <para>Here is the response to the <command>class-del</command>
-        command in our example, when the specified client class has been found:
-<screen>
-{
-    "result": 0,
-    "text": "Class 'ipxe_efi_x64' deleted."
-}
-</screen>
-        </para>
-        <para>If the class doesn't exist, the result of 3 is returned.</para>
-      </section>
-
-      <section xml:id="command-class-list">
-        <title>class-list Command</title>
-        <para><command>class-list</command> is used to retrieve a list of all
-        client classes. This command includes no arguments:
-<screen>
-{
-    "command": "class-list"
-}
-</screen>
-        </para>
-        <para>
-          Here is the response of the server in our example, including the list
-          of client classes:
-<screen>
-{
-    "result": 0,
-    "text": "2 classes found",
-    "arguments": {
-        "client-classes": [
-            {
-                "name": "ipxe_efi_x64"
-            },
-            {
-                "name": "pxeclient"
-            }
-        ]
-    }
-}
-</screen>
-        </para>
-        <para>
-          Note that the returned list does not contain full class definitions, but
-          merely class names. To retrieve full class information, the
-          <command>class-get</command> command should be used.
-        </para>
-      </section>
-
-      <section xml:id="command-class-get">
-        <title>class-get Command</title>
-        <para><command>class-get</command> is used to retrieve detailed information
-        about a specified class. The command structure is very simple:
-<screen>
-{
-    "command": "class-get",
-    "arguments": {
-        "name": "pxeclient"
-    }
-}
-</screen>
-        </para>
-        <para>
-          If the class with the specified name does not exist, the status code of 3
-          is returned. If the specified client class exists, the class details are
-          returned in the following format:
-<screen>
-{
-    "result": 0,
-    "text": "Class 'pxeclient' definition returned",
-    "arguments": {
-        "client-classes": [
-            {
-                "name": "pxeclient",
-                "only-if-required": true,
-                "test": "option[vendor-class-identifier].text == 'PXEClient'",
-                "option-def": [
-                    {
-                        "name": "configfile",
-                        "code": 209,
-                        "type": "string"
-                    }
-                ],
-                "option-data": [ ],
-                "next-server": "0.0.0.0",
-                "server-hostname": "xfce",
-                "boot-file-name": "/dev/null"
-            }
-        ]
-    }
-}
-</screen>
-        </para>
-        <para>
-          Note that the example above is DHCPv4-specific; the last three parameters
-          are only returned by the DHCPv4 server and are never returned by the DHCPv6
-          server. Also, some of the parameters provided in this example may not be
-          returned if they are not specified for the class. Specifically,
-          <command>only-if-required</command>, <command>test</command>, and
-          <command>option-def</command> are not returned if they are not specified
-          for the class.
-        </para>
-      </section>
-    </section>
diff --git a/doc/guide/hooks-ha.xml b/doc/guide/hooks-ha.xml
deleted file mode 100644 (file)
index 5946353..0000000
+++ /dev/null
@@ -1,1423 +0,0 @@
-<!--
- - Copyright (C) 2018-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-
-    <section xml:id="high-availability-library">
-      <title>ha: High Availability</title>
-      <para>
-        This section describes the High Availability hooks library, which can be
-        loaded on a pair of DHCPv4 or DHCPv6 servers to increase the reliability of
-        the DHCP service in the event of an outage of one of the servers. This library
-        was previously only available to ISC's paid subscribers, but is now part of
-        the open source Kea, available to all users.
-
-        <note>
-          <para>This library may only be loaded by the <command>kea-dhcp4</command>
-          or the <command>kea-dhcp6</command> process.
-          </para>
-        </note>
-      </para>
-      <para>
-        High Availability (HA) of the DHCP service is provided by running multiple
-        cooperating server instances. If any of these instances becomes
-        unavailable for any reason (DHCP software crash, Control Agent
-        software crash, power outage, hardware failure), a surviving
-        server instance can continue providing reliable service to clients. Many
-        DHCP server implementations include the "DHCP Failover" protocol, whose most
-        significant features are communication between the servers, partner
-        failure detection, and lease synchronization between the servers.
-        However, the DHCPv4 failover standardization process was never completed
-        by the IETF. The DHCPv6 failover standard (RFC 8156) was published, but it
-        is complex, difficult to use, has significant operational constraints,
-        and is different than its v4 counterpart.
-        Although it may be useful for some users to use a "standard" failover
-        protocol, it seems that most Kea users are simply interested in
-        a working solution which guarantees high availability of the DHCP
-        service. Therefore, the Kea HA hook library derives major concepts from the
-        DHCP Failover protocol but uses its own solutions for communication and
-        configuration. It offers its own state machine, which greatly simplifies its
-        implementation and generally fits better into Kea, and it provides the
-        same features in both DHCPv4 and DHCPv6. This document intentionally
-        uses the term "High Availability" rather than "Failover" to emphasize that
-        it is not the Failover protocol implementation.
-      </para>
-      <para>
-        The following sections describe the configuration and operation of the Kea
-        HA hook library.
-      </para>
-
-      <section>
-        <title>Supported Configurations</title>
-        <para>The Kea HA hook library supports two configurations, also known as HA
-        modes: load balancing and hot standby. In the load-balancing mode,
-        two servers respond to DHCP requests. The load-balancing function
-        is implemented as described in <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://tools.ietf.org/html/rfc3074">RFC 3074</link>, with each server responding to
-        half the received DHCP queries. When one of the servers allocates a lease
-        for a client, it notifies the partner server over the control channel
-        (RESTful API), so the partner can save the lease information in its
-        own database. If the communication with the partner is unsuccessful,
-        the DHCP query is dropped and the response is not returned to the DHCP
-        client. If the lease update is successful, the response is returned to
-        the DHCP client by the server which has allocated the lease. By
-        exchanging lease updates, both servers get a copy of all leases
-        allocated by the entire HA setup, and either server can be switched
-        to handle the entire DHCP traffic if its partner becomes unavailable.</para>
-
-        <para>In the load-balancing configuration, one of the servers must be
-        designated as "primary" and the other as "secondary."
-        Functionally, there is no difference between the two during normal
-        operation. This distinction is required when the two servers are
-        started at (nearly) the same time and have to synchronize their
-        lease databases. The primary server synchronizes the database first.
-        The secondary server waits for the primary server to complete the
-        lease database synchronization before it starts the synchronization.
-        </para>
-
-        <para>In the hot-standby configuration, one of the servers is also designated as
-        "primary" and the second as "secondary". However, during
-        normal operation, the primary server is the only one that responds to
-        DHCP requests. The secondary or standby server receives lease updates from the
-        primary over the control channel; however, it does not respond to any
-        DHCP queries as long as the primary is running or, more accurately,
-        until the secondary considers the primary to be offline. If the
-        secondary server detects the failure of the primary, it starts
-        responding to all DHCP queries.
-        </para>
-
-        <para>In the configurations described above, the primary, secondary, and
-        standby are referred to as "active" servers, because they receive
-        lease updates and can automatically react to the partner's failures by
-        responding to the DHCP queries which would normally be handled by the
-        partner. The HA hook library supports another server type/role:
-        backup server. The use of a backup server is optional. They can be used
-        in both load balancing and hot standby setup, in addition to the active
-        servers. There is no limit on the number of backup servers in the HA
-        setup; however, the presence of backup servers increases the latency
-        of DHCP responses, because not only do active servers send lease
-        updates to each other, but also to the backup servers.
-        </para>
-      </section>
-
-      <section>
-        <title>Clocks on Active Servers</title>
-        <para>Synchronized clocks are essential for the HA setup to operate
-        reliably. The servers share lease information via lease updates and
-        during synchronization of the databases. The lease information includes
-        the time when the lease has been allocated and when it expires. Some
-        clock skew between the servers participating in the HA setup usually
-        exists; this is acceptable as long as the clock skew is relatively low,
-        compared to the lease lifetimes. However, if the clock skew becomes too
-        high, the different lease expiration times on different
-        servers may cause the HA system to malfunction. For example, one server
-        may consider a lease to be expired when it is actually still valid. The lease
-        reclamation process may remove a name associated with this lease from
-        the DNS, causing problems when the client later attempts to renew the lease.</para>
-
-        <para>Each active server monitors the clock skew by comparing its current
-        time with the time returned by its partner in response to the heartbeat
-        command. This gives a good approximation of the clock skew, although it
-        doesn't take into account the time between sending the response by the
-        partner and receiving this response by the server which sent the
-        heartbeat command. If the clock skew exceeds 30 seconds, a warning log
-        message is issued. The administrator may correct this problem by
-        synchronizing the clocks (e.g. using NTP); the servers should notice
-        the clock skew correction and stop issuing the warning</para>
-
-        <para>If the clock skew is not corrected and exceeds 60 seconds, the
-        HA service on each of the servers is terminated, i.e. the state
-        machine enters the <command>terminated</command> state. The servers
-        will continue to respond to DHCP clients (as in the load-balancing
-        or hot-standby mode), but will exchange neither lease updates nor
-        heartbeats and their lease databases will diverge. In this case, the
-        administrator should synchronize the clocks and restart the servers.
-        </para>
-      </section>
-
-      <section xml:id="ha-server-states">
-        <title>Server States</title>
-        <para id="command-ha-heartbeat">A DHCP server operating
-        within an HA setup runs a state machine,
-        and the state of the server can be retrieved by its peers using the
-        <command>ha-heartbeat</command> command sent over the RESTful API. If
-        the partner server doesn't respond to the <command>ha-heartbeat</command>
-        command within the specified amount of time, the communication is
-        considered interrupted and the server may (depending on the configuration)
-        use additional measures (described later in this document) to verify that
-        the partner is still operating. If it finds that the partner is not
-        operating, the server transitions to the <command>partner-down</command>
-        state to handle the entire DHCP traffic directed to the system.</para>
-
-        <para>In this case, the surviving server continues to send the
-        <command>ha-heartbeat</command> command to detect when the partner wakes
-        up. At that time, the partner synchronizes the lease database and when it is again
-        ready to operate, the surviving server returns to normal operation,
-        i.e. the <command>load-balancing</command> or <command>hot-standby</command>
-        state.</para>
-
-        <para>The following is the list of all possible server states:
-
-        <itemizedlist mark="bullet">
-          <listitem><para><command>backup</command> - normal operation of the
-          backup server. In this state it receives lease updates from the active
-          servers.</para></listitem>
-
-          <listitem><para><command>hot-standby</command> - normal operation of
-          the active server running in the hot-standby mode; both the primary and
-          the standby server are in this state during their normal operation.
-          The primary server responds to DHCP queries and sends lease updates
-          to the standby server and to any backup servers that
-          are present.</para></listitem>
-
-          <listitem><para><command>load-balancing</command> - normal operation
-          of the active server running in the load-balancing mode; both the primary
-          and the secondary server are in this state during their normal operation.
-          Both servers respond to DHCP queries and send lease updates
-          to each other and to any backup servers that are
-          present.</para></listitem>
-
-          <listitem><para><command>partner-down</command> - an active server
-          transitions to this state after detecting that its partner (another
-          active server) is offline. The server does not transition to this state
-          if only a backup server is unavailable. In the <command>
-          partner-down</command> state the active server responds to all DHCP queries,
-          including those queries which are normally handled by the server
-          that is now unavailable.</para></listitem>
-
-          <listitem><para><command>ready</command> - an active server transitions
-          to this state after synchronizing its lease database with an active
-          partner. This state indicates to the partner - which may be in the
-          <command>partner-down</command> state - that it should return to
-          normal operation. If and when it does, the server in the <command>
-          ready</command> state will also start normal operation.</para>
-          </listitem>
-
-          <listitem><para><command>syncing</command> - an active server
-          transitions to this state to fetch leases from the active partner
-          and update the local lease database. When in this state, the server
-          issues the <command>dhcp-disable</command> command to disable the DHCP
-          service of the partner from which the leases are fetched. The DHCP
-          service is disabled for the maximum time of 60 seconds, after which
-          it is automatically re-enabled, in case the syncing partner was unable
-          to re-enable the service. If the synchronization is
-          completed, the syncing server issues the <command>dhcp-enable
-          </command> command to re-enable the DHCP service of its partner. The
-          syncing operation is synchronous; the server waits for an
-          answer from the partner and does nothing else while the
-          lease synchronization takes place. A server that is configured
-          not to synchronize the lease database with its partner, i.e. when the
-          <command>sync-leases</command> configuration parameter is set to
-          <command>false</command>, will never transition to this state.
-          Instead, it will transition directly from the
-          <command>waiting</command> state to the <command>ready</command> state.
-          </para></listitem>
-
-          <listitem><para><command>terminated</command> - an active server
-          transitions to this state when the High Availability hooks library
-          is unable to further provide reliable service and a manual
-          intervention of the administrator is required to correct the problem.
-          Various issues with the HA setup may cause the
-          server to transition to this state.
-          While in this state, the server continues responding to
-          DHCP clients based on the HA mode selected (load-balancing or
-          hot-standby), but the lease updates are not exchanged and the
-          heartbeats are not sent. Once a server has entered the
-          "terminated" state, it will remain in this state until it is
-          restarted. The administrator must correct the issue which caused
-          this situation prior to restarting the server (e.g. synchronize clocks).
-          Otherwise, the server will return to the "terminated" state once
-          it finds that the issue persists.
-          </para></listitem>
-
-          <listitem><para><command>waiting</command> - each started server
-          instance enters this state. The backup server transitions
-          directly from this state to the <command>backup</command> state.
-          An active server sends a heartbeat to its partner to check its
-          state; if the partner appears to be unavailable, the server
-          transitions to the <command>partner-down</command> state. If the partner is
-          available, the server transitions to the <command>syncing</command> or
-          <command>ready</command> state, depending on the setting of the
-          <command>sync-leases</command> configuration parameter. If
-          both servers appear to be in the <command>waiting</command>
-          state (concurrent startup), the primary server transitions to
-          the next state first. The secondary or standby server remains
-          in the <command>waiting</command> state until the primary
-          transitions to the <command>ready</command> state.</para></listitem>.
-        </itemizedlist></para>
-
-        <note>
-          <para>Currently, restarting the HA service from the
-          <command>terminated</command> state requires restarting the
-          DHCP server or reloading its configuration.</para>
-        </note>
-
-        <para>Whether the server responds to the DHCP queries and which
-        queries it responds to is a matter of the server's state, if no
-        administrative action is performed to configure the server
-        otherwise. The following table provides the default behavior for
-        various states.</para>
-
-        <para>The <command>DHCP Server Scopes</command> denote what group
-        of received DHCP queries the server responds to in the given state.
-        An in-depth explanation of the scopes can be found below.
-        </para>
-
-        <para>
-          <table frame="all" xml:id="ha-default-states-behavior">
-            <title>Default Behavior of the Server in Various HA States</title>
-            <tgroup cols="4">
-              <colspec colname="state"/>
-              <colspec colname="server type" align="center"/>
-              <colspec colname="dhcp-service" align="center"/>
-              <colspec colname="dhcp-service-scopes" align="center"/>
-              <thead>
-                <row>
-                  <entry>State</entry>
-                  <entry>Server Type</entry>
-                  <entry>DHCP Service</entry>
-                  <entry>DHCP Service Scopes</entry>
-                </row>
-              </thead>
-              <tbody>
-                <row>
-                  <entry>backup</entry>
-                  <entry>backup server</entry>
-                  <entry>disabled</entry>
-                  <entry>none</entry>
-                </row>
-                <row>
-                  <entry>hot-standby</entry>
-                  <entry>primary or standby (hot-standby mode)</entry>
-                  <entry>enabled</entry>
-                  <entry><command>HA_server1</command> if primary, none otherwise</entry>
-                </row>
-                <row>
-                  <entry>load-balancing</entry>
-                  <entry>primary or secondary (load-balancing mode)</entry>
-                  <entry>enabled</entry>
-                  <entry><command>HA_server1</command> or <command>HA_server2</command></entry>
-                </row>
-                <row>
-                  <entry>partner-down</entry>
-                  <entry>active server</entry>
-                  <entry>enabled</entry>
-                  <entry>all scopes</entry>
-                </row>
-                <row>
-                  <entry>ready</entry>
-                  <entry>active server</entry>
-                  <entry>disabled</entry>
-                  <entry>none</entry>
-                </row>
-                <row>
-                  <entry>syncing</entry>
-                  <entry>active server</entry>
-                  <entry>disabled</entry>
-                  <entry>none</entry>
-                </row>
-                <row>
-                  <entry>terminated</entry>
-                  <entry>active server</entry>
-                  <entry>enabled</entry>
-                  <entry>same as in the load-balancing or hot-standby state</entry>
-                </row>
-                <row>
-                  <entry>waiting</entry>
-                  <entry>any server</entry>
-                  <entry>disabled</entry>
-                  <entry>none</entry>
-                </row>
-              </tbody>
-            </tgroup>
-          </table>
-        </para>
-
-        <para>The DHCP service scopes require some explanation. The HA
-        configuration must specify a unique name for each server within
-        the HA setup. This document uses the following convention within
-        provided examples: <command>server1</command> for a primary server,
-        <command>server2</command> for the secondary or standby server, and
-        <command>server3</command> for the backup server. In real life
-        any names can be used as long as they remain unique.</para>
-
-        <para>In the load-balancing mode there are two scopes named after
-        the active servers: <command>HA_server1</command> and <command>
-        HA_server2</command>. The DHCP queries load-balanced to
-        <command>server1</command> belong to the <command>HA_server1</command>
-        scope and the queries load-balanced to <command>server2</command>
-        belong to the <command>HA_server2</command> scope. If either of the
-        servers is in the <command>partner-down</command> state, the active partner is
-        responsible for serving both scopes.</para>
-
-        <para>In the hot-standby mode, there is only one scope - <command>
-        HA_server1</command> - because only <command>server1</command>
-        is responding to DHCP queries. If that server becomes unavailable,
-        <command>server2</command> becomes responsible for this scope.
-        </para>
-
-        <para>The backup servers do not have their own scopes. In some
-        cases they can be used to respond to queries belonging to
-        the scopes of the active servers. Also, a server which is neither
-        in the partner-down state nor in normal operation serves
-        no scopes.</para>
-
-        <para>The scope names can be used to associate pools, subnets,
-        and networks with certain servers, so only these servers
-        can allocate addresses or prefixes from those pools, subnets,
-        or networks. This is done via the client classification mechanism
-        (see below).</para>
-      </section>
-
-      <section xml:id="ha-scope-transition">
-        <title>Scope Transition in a Partner-Down Case</title>
-        <para>When one of the servers finds that its partner is unavailable,
-        it starts serving clients from both its own scope and the scope of the
-        unavailable partner. This is straightforward
-        for new clients, i.e. those sending DHCPDISCOVER (DHCPv4) or Solicit
-        (DHCPv6), because those requests are not sent to any particular server.
-        The available server will respond to all such queries when it is
-        in the <command>partner-down</command> state.</para>
-
-        <para>When a client renews a lease, it sends its
-        DHCPREQUEST (DHCPv4) or Renew (DHCPv6) message directly to the
-        server which has allocated the lease being renewed. If this
-        server is no longer available, the client will get no response. In
-        that case, the client continues to use its lease and attempts to
-        renew until the rebind timer (T2) elapses. The client then enters
-        the rebinding phase, in which it sends a DHCPREQUEST (DHCPv4) or
-        Rebind (DHCPv6) message to any available server. The surviving
-        server will receive the rebinding request and will typically
-        extend the lifetime of the lease. The client then continues to
-        contact that new server to renew its lease as appropriate.</para>
-
-        <para>If and when the other server once again becomes available, both active servers
-        will eventually transition to the <command>load-balancing</command>
-        or <command>hot-standby</command> state, in which they will again be
-        responsible for their own scopes. Some clients belonging to the
-        scope of the restarted server will try to renew their leases
-        via the surviving server, but this server will not respond to them
-        anymore; the client will eventually transition back to the
-        correct server via the rebinding mechanism.</para>
-      </section>
-
-      <section xml:id="ha-load-balancing-config">
-        <title>Load-Balancing Configuration</title>
-        <para>The following is the configuration snippet to enable
-        high availability on the primary server within the load-balancing
-        configuration. The same configuration should be applied on the
-        secondary and backup servers, with the only difference that
-        <command>this-server-name</command> should be set to
-        <command>server2</command> and <command>server3</command>
-        on those servers, respectively.
-<screen>
-{
-"Dhcp4": {
-
-    ...
-
-    "hooks-libraries": [
-        {
-            "library": "/usr/lib/kea/hooks/libdhcp_lease_cmds.so",
-            "parameters": { }
-        },
-        {
-            "library": "/usr/lib/kea/hooks/libdhcp_ha.so",
-            "parameters": {
-                "high-availability": [ {
-                    "this-server-name": "server1",
-                    "mode": "load-balancing",
-                    "heartbeat-delay": 10000,
-                    "max-response-delay": 10000,
-                    "max-ack-delay": 5000,
-                    "max-unacked-clients": 5,
-                    "peers": [
-                        {
-                            "name": "server1",
-                            "url": "http://192.168.56.33:8080/",
-                            "role": "primary",
-                            "auto-failover": true
-                        },
-                        {
-                            "name": "server2",
-                            "url": "http://192.168.56.66:8080/",
-                            "role": "secondary",
-                            "auto-failover": true
-                        },
-                        {
-                            "name": "server3",
-                            "url": "http://192.168.56.99:8080/",
-                            "role": "backup",
-                            "auto-failover": false
-                        }
-                    ]
-                } ]
-            }
-        }
-    ],
-
-    "subnet4": [
-        {
-            "subnet": "192.0.3.0/24",
-            "pools": [
-                {
-                    "pool": "192.0.3.100 - 192.0.3.150",
-                    "client-class": "HA_server1"
-                },
-                {
-                    "pool": "192.0.3.200 - 192.0.3.250",
-                    "client-class": "HA_server2"
-                }
-            ],
-
-            "option-data": [
-                {
-                    "name": "routers",
-                    "data": "192.0.3.1"
-                }
-            ],
-
-            "relay": { "ip-address": "10.1.2.3" }
-        }
-    ],
-
-    ...
-
-}
-
-}
-</screen>
-        </para>
-
-        <para>Two hook libraries must be loaded to enable HA:
-        <filename>libdhcp_lease_cmds.so</filename> and
-        <filename>libdhcp_ha.so</filename>. The latter implements the
-        HA feature, while the former enables control
-        commands required by HA to fetch and manipulate leases on the
-        remote servers. In the example provided above, it is assumed that
-        Kea libraries are installed in the <filename>/usr/lib</filename>
-        directory. If Kea is not installed in the /usr directory, the
-        hook libraries locations must be updated accordingly.
-        </para>
-
-        <para>The HA configuration is specified within the scope of
-        <filename>libdhcp_ha.so</filename>. Note that the top-level
-        parameter <command>high-availability</command> is a list, even
-        though it currently contains only one entry.</para>
-
-        <para>The following are the global parameters which control the server's
-        behavior with respect to HA:
-        <itemizedlist mark="bullet">
-          <listitem><para><command>this-server-name</command> - is a unique
-          identifier of the server within this HA setup. It must match with one
-          of the servers specified within the <command>peers</command> list.
-          </para></listitem>
-
-          <listitem><para><command>mode</command> - specifies an HA mode
-          of operation. Currently supported modes are <command>load-balancing
-          </command> and <command>hot-standby</command>.</para></listitem>
-
-          <listitem><para><command>heartbeat-delay</command> - specifies
-          a duration in milliseconds between sending the last heartbeat (or other command sent
-          to the partner) and the next heartbeat. The heartbeats are sent
-          periodically to gather the status of the partner and to verify whether
-          the partner is still operating. The default value of this parameter is
-          10000 ms.</para></listitem>
-
-          <listitem><para><command>max-response-delay</command> - specifies a
-          duration in milliseconds since the last successful communication with the
-          partner, after which the server assumes that communication with
-          the partner is interrupted. This duration should be greater than
-          the <command>heartbeat-delay</command>. Usually it is greater than
-          the duration of multiple <command>heartbeat-delay</command> values.
-          When the server detects that communication is interrupted, it
-          may transition to the <command>partner-down</command> state (when
-          <command>max-unacked-clients</command> is 0) or trigger the failure-
-          detection procedure using the values of the two parameters below.
-          The default value of this parameter is 60000.
-          </para></listitem>
-
-          <listitem><para><command>max-ack-delay</command> - is one of
-          the parameters controlling partner failure-detection. When
-          communication with the partner is interrupted, the server examines the values
-          of the <command>secs</command> field (DHCPv4) or <command>Elapsed Time
-          </command> option (DHCPv6), which denote how long the DHCP client has been
-          trying to communicate with the DHCP server. This parameter specifies the
-          maximum time in milliseconds for the client to try to communicate with the
-          DHCP server, after which this server assumes that the client failed to
-          communicate with the DHCP server (is "unacked"). The default value of
-          this parameter is 10000.</para></listitem>
-
-          <listitem><para><command>max-unacked-clients</command> - specifies
-          how many "unacked" clients are allowed (see <command>max-ack-delay</command>)
-          before this server assumes that the partner is offline and transitions
-          to the <command>partner-down</command> state. The special value of 0
-          is allowed for this parameter, which disables the failure-detection
-          mechanism. In this case, a server that can't communicate with its
-          partner over the control channel assumes that the partner server is
-          down and transitions to the <command>partner-down</command> state
-          immediately. The default value of this parameter is 10.</para>
-          </listitem>
-
-        </itemizedlist>
-        </para>
-
-        <para>
-          The values of <command>max-ack-delay</command> and
-          <command>max-unacked-clients</command> must be selected carefully, taking
-          into account the specifics of the network in which the DHCP servers are
-          operating. Note that the server in question may not respond to some
-          DHCP clients because these clients are not to be serviced
-          by this server according to administrative policy. The server may also
-          drop malformed queries from clients. Therefore, selecting too
-          low a value for the <command>max-unacked-clients</command> parameter may
-          result in a transition to the <command>partner-down</command>
-          state even though the partner is still operating. On the other
-          hand, selecting too high a value may result in never transitioning
-          to the <command>partner-down</command> state if the DHCP
-          traffic in the network is very low (e.g. nighttime), because the
-          number of distinct clients trying to communicate with the server
-          could be lower than the <command>max-unacked-clients</command> setting.
-        </para>
-
-        <para>In some cases it may be useful to disable the failure-detection
-        mechanism altogether, if the servers are located very close to each
-        other and network partitioning is unlikely, i.e. failure to
-        respond to heartbeats is only possible when the partner is offline.
-        In such cases, set the <command>max-unacked-clients</command> to 0.
-        </para>
-
-        <para>The <command>peers</command> parameter contains a list of servers
-        within this HA setup. This configuration must contain at least
-        one primary and one secondary server. It may also contain an unlimited
-        number of backup servers. In this example, there is one backup server
-        which receives lease updates from the active servers.</para>
-
-        <para>These are the parameters specified for each of the
-        peers within this list:
-
-        <itemizedlist mark="bullet">
-          <listitem><para><command>name</command> - specifies a unique name for
-          the server.</para></listitem>
-
-          <listitem><para><command>url</command> - specifies the URL to be used to
-          contact this server over the control channel. Other servers use this
-          URL to send control commands to that server.</para></listitem>
-
-          <listitem><para><command>role</command> - denotes the role of the
-          server in the HA setup. The following roles are supported in the
-          load-balancing configuration: <command>primary</command>,
-          <command>secondary</command>, and <command>backup</command>.
-          There must be exactly one primary and one secondary server in the
-          load-balancing setup.</para></listitem>
-
-          <listitem><para><command>auto-failover</command> - a boolean value
-          which denotes whether a server detecting a partner's failure should
-          automatically start serving the partner's clients. The default value of
-          this parameter is true.</para></listitem>
-
-        </itemizedlist>
-        </para>
-
-        <para>In our example configuration, both active servers can allocate
-        leases from the subnet "192.0.3.0/24". This subnet contains two
-        address pools: "192.0.3.100 - 192.0.3.150" and "192.0.3.200 - 192.0.3.250",
-        which are associated with HA server scopes using client classification.
-        When <command>server1</command> processes a DHCP query, it uses
-        the first pool for lease allocation. Conversely, when
-        <command>server2</command> processes a DHCP query it uses the
-        second pool. When either of the servers is in the <command>partner-down
-        </command> state, it can serve leases from both pools and it
-        selects the pool which is appropriate for the received query. In
-        other words, if the query would normally be processed by
-        <command>server2</command> but this server is not available,
-        <command>server1</command> will allocate the lease from the pool of
-        "192.0.3.200 - 192.0.3.250".
-        </para>
-
-      </section> <!-- end of ha-load-balancing-config -->
-
-      <section xml:id="ha-load-balancing-advanced-config">
-        <title>Load Balancing with Advanced Classification</title>
-        <para>In the previous section, we provided an example of
-        a load-balancing configuration with client classification limited
-        to the <command>HA_server1</command> and <command>HA_server2</command>
-        classes, which are dynamically assigned to the received DHCP queries.
-        In many cases, HA will be needed in deployments which already
-        use some other client classification.
-        </para>
-        <para>
-          Suppose there is a system which classifies devices into two groups:
-          phones and laptops, based on some classification criteria specified in
-          Kea configuration file. Both types of devices are allocated leases
-          from different address pools. Introducing HA in the load-balancing mode
-          results in a further split of each of those pools, as
-          each server allocates leases for some phones and
-          some laptops. This requires each of the existing pools
-          to be split between <command>HA_server1</command> and
-          <command>HA_server2</command>, so we end up with the following classes:
-
-          <itemizedlist>
-            <listitem><simpara>phones_server1</simpara></listitem>
-            <listitem><simpara>laptops_server1</simpara></listitem>
-            <listitem><simpara>phones_server2</simpara></listitem>
-            <listitem><simpara>laptops_server2</simpara></listitem>
-          </itemizedlist>
-        </para>
-
-        <para>The corresponding server configuration using advanced classification
-        (and <command>member</command> expression) is provided below. For brevity's sake,
-        the HA hook library configuration has been removed from this example.
-<screen>
-{
-"Dhcp4": {
-
-    "client-classes": [
-        {
-            "name": "phones",
-            "test": "substring(option[60].hex,0,6) == 'Aastra'",
-        },
-        {
-            "name": "laptops",
-            "test": "not member('phones')"
-        },
-        {
-            "name": "phones_server1",
-            "test": "member('phones') and member('HA_server1')"
-        },
-        {
-            "name": "phones_server2",
-            "test": "member('phones') and member('HA_server2')"
-        },
-        {
-            "name": "laptops_server1",
-            "test": "member('laptops') and member('HA_server1')"
-        },
-        {
-            "name": "laptops_server2",
-            "test": "member('laptops') and member('HA_server2')"
-        }
-    ],
-
-    "hooks-libraries": [
-        {
-            "library": "/usr/lib/kea/hooks/libdhcp_lease_cmds.so",
-            "parameters": { }
-        },
-        {
-            "library": "/usr/lib/kea/hooks/libdhcp_ha.so",
-            "parameters": {
-                "high-availability": [ {
-
-                    ...
-
-                } ]
-            }
-        }
-    ],
-
-    "subnet4": [
-        {
-            "subnet": "192.0.3.0/24",
-            "pools": [
-                {
-                    "pool": "192.0.3.100 - 192.0.3.125",
-                    "client-class": "phones_server1"
-                },
-                {
-                    "pool": "192.0.3.126 - 192.0.3.150",
-                    "client-class": "laptops_server1"
-                },
-                {
-                    "pool": "192.0.3.200 - 192.0.3.225",
-                    "client-class": "phones_server2"
-                },
-                {
-                    "pool": "192.0.3.226 - 192.0.3.250",
-                    "client-class": "laptops_server2"
-                }
-            ],
-
-            "option-data": [
-                {
-                    "name": "routers",
-                    "data": "192.0.3.1"
-                }
-            ],
-
-            "relay": { "ip-address": "10.1.2.3" }
-        }
-    ],
-
-    ...
-
-}
-
-}
-</screen>
-        </para>
-
-        <para>The configuration provided above splits the address range into
-        four pools: two pools dedicated to server1 and two to
-        server2. Each server can assign leases to both phones and laptops.
-        Both groups of devices are assigned addresses from different pools.
-        The <command>HA_server1</command> and <command>HA_server2</command> classes
-        are built-in (see <xref linkend="classification-using-vendor"/>)
-        and do not need to be declared. They are assigned dynamically by
-        the HA hook library as a result of the load-balancing algorithm.
-        <command>phones_*</command> and <command>laptop_*</command> evaluate to
-        "true" when the query belongs to a given combination of other classes,
-        e.g. <command>HA_server1</command> and <command>phones</command>.
-        The pool is selected accordingly as a result of such an evaluation.
-        </para>
-
-        <para>Consult <xref linkend="classify"/> for details on how to use the
-        <command>member</command> expression and class dependencies.</para>
-
-      </section> <!-- end of ha-load-balancing-advanced-config -->
-
-      <section xml:id="ha-hot-standby-config">
-        <title>Hot-Standby Configuration</title>
-        <para>The following is an example configuration of the primary server
-        in the hot-standby configuration:
-<screen>
-{
-"Dhcp4": {
-
-    ...
-
-    "hooks-libraries": [
-        {
-            "library": "/usr/lib/kea/hooks/libdhcp_lease_cmds.so",
-            "parameters": { }
-        },
-        {
-            "library": "/usr/lib/kea/hooks/libdhcp_ha.so",
-            "parameters": {
-                "high-availability": [ {
-                    "this-server-name": "server1",
-                    "mode": "hot-standby",
-                    "heartbeat-delay": 10000,
-                    "max-response-delay": 10000,
-                    "max-ack-delay": 5000,
-                    "max-unacked-clients": 5,
-                    "peers": [
-                        {
-                            "name": "server1",
-                            "url": "http://192.168.56.33:8080/",
-                            "role": "primary",
-                            "auto-failover": true
-                        },
-                        {
-                            "name": "server2",
-                            "url": "http://192.168.56.66:8080/",
-                            "role": "standby",
-                            "auto-failover": true
-                        },
-                        {
-                            "name": "server3",
-                            "url": "http://192.168.56.99:8080/",
-                            "role": "backup",
-                            "auto-failover": false
-                        }
-                    ]
-                } ]
-            }
-        }
-    ],
-
-    "subnet4": [
-        {
-            "subnet": "192.0.3.0/24",
-            "pools": [
-                {
-                    "pool": "192.0.3.100 - 192.0.3.250",
-                    "client-class": "HA_server1"
-                }
-            ],
-
-            "option-data": [
-                {
-                    "name": "routers",
-                    "data": "192.0.3.1"
-                }
-            ],
-
-            "relay": { "ip-address": "10.1.2.3" }
-        }
-    ],
-
-    ...
-
-}
-
-}
-</screen>
-        </para>
-
-        <para>This configuration is very similar to the load-balancing
-        configuration described in <xref linkend="ha-load-balancing-config"/>,
-        with a few notable differences.</para>
-
-        <para>The <command>mode</command> is now set to <command>hot-standby</command>,
-        in which only one server responds to DHCP clients.
-        If the primary server is online, it responds to
-        all DHCP queries. The <command>standby</command> server takes over all
-        DHCP traffic if it discovers that the primary is unavailable.
-        </para>
-
-        <para>In this mode, the non-primary active server is called
-        <command>standby</command> and that is its role.</para>
-
-        <para>Finally, because there is always one server responding to
-        DHCP queries, there is only one scope - <command>HA_server1</command> -
-        in use within pools definitions. In fact, the <command>client-class</command>
-        parameter could be removed from this configuration without harm,
-        because there can be no conflicts in lease allocations by different
-        servers as they do not allocate leases concurrently. The
-        <command>client-class</command> remains in this example mostly for
-        demonstration purposes, to highlight the differences between the
-        hot-standby and load-balancing modes of operation.</para>
-      </section> <!-- end of ha-hot-standby-config -->
-
-      <section xml:id="ha-sharing-lease-info">
-        <title>Lease Information Sharing</title>
-        <para>An HA-enabled server informs its active partner about allocated
-        or renewed leases by sending appropriate control commands, and the partner
-        updates the lease information in its own database. When the server starts
-        up for the first time or recovers after a failure, it synchronizes its
-        lease database with its partner. These two mechanisms guarantee
-        consistency of the lease information between the servers and allow the
-        designation of one of the servers to handle the entire DHCP traffic load if
-        the other server becomes unavailable.</para>
-
-        <para>In some cases, though, it is desirable to disable lease updates
-        and/or database synchronization between the active servers, if the
-        exchange of information about the allocated leases is performed
-        using some other mechanism. Kea supports various database types
-        that can be used to store leases, including MySQL, Postgres, and Cassandra.
-        Those databases include built-in solutions for data replication which
-        are often used by Kea administrators to provide redundancy.</para>
-
-        <para>The HA hook library supports such scenarios by
-        disabling lease updates over the control channel and/or lease database
-        synchronization, leaving the server to rely on the database replication
-        mechanism. This is controlled by the two boolean parameters
-        <command>send-lease-updates</command> and <command>sync-leases</command>,
-        whose values default to true:
-
-<screen>
-{
-"Dhcp4": {
-
-    ...
-
-    "hooks-libraries": [
-        {
-            "library": "/usr/lib/kea/hooks/libdhcp_lease_cmds.so",
-            "parameters": { }
-        },
-        {
-            "library": "/usr/lib/kea/hooks/libdhcp_ha.so",
-            "parameters": {
-                "high-availability": [ {
-                    "this-server-name": "server1",
-                    "mode": "load-balancing",
-                    "send-lease-updates": false,
-                    "sync-leases": false,
-                    "peers": [
-                        {
-                            "name": "server1",
-                            "url": "http://192.168.56.33:8080/",
-                            "role": "primary"
-                        },
-                        {
-                            "name": "server2",
-                            "url": "http://192.168.56.66:8080/",
-                            "role": "secondary"
-                        }
-                    ]
-                } ]
-            }
-        }
-    ],
-
-    ...
-
-}
-</screen>
-        </para>
-
-        <para>
-          In the most typical use case, both parameters are set to the same
-          value, i.e. both are <command>false</command> if database
-          replication is in use, or both are <command>true</command> otherwise.
-          Introducing two separate parameters to control lease updates and
-          lease-database synchronization is aimed at possible special use
-          cases; for example, when synchronization is performed by copying a lease file
-          (therefore <command>sync-leases</command> is set to
-          <command>false</command>), but lease updates should be conducted
-          as usual (<command>send-lease-updates</command> is set to
-          <command>true</command>). It should be noted that Kea does not
-          natively support such use cases, but users may develop their own
-          scripts and tools around Kea to provide such mechanisms. The HA
-          hooks library configuration is designed to maximize flexibility of administration.
-        </para>
-      </section>
-
-      <section xml:id="ha-syncing-page-limit">
-        <title>Controlling Lease-Page Size Limit</title>
-        <para>An HA-enabled server initiates synchronization of the lease
-        database after downtime or upon receiving the <command>ha-sync</command>
-        command. The server uses commands described in
-        <xref linkend="lease-get-page-cmds"/> to fetch leases from its
-        partner server (lease queries). The size of the results page
-        (the maximum number of leases to be returned in a single response to one
-        of these commands) can be controlled via HA hooks library configuration.
-        Increasing the page size decreases the number of lease queries sent to
-        the partner server, but it causes the partner server to generate
-        larger responses, which lengthens transmission time as well as
-        increases memory and CPU utilization on both servers. Decreasing the
-        page size helps to decrease resource utilization, but requires
-        more lease queries to be issued to fetch the entire lease
-        database.</para>
-        <para>The default value of the <command>sync-page-limit</command> command
-        controlling the page size is 10000. This means that the entire
-        lease database can be fetched with a single command if the
-        size of the database is equal to or less than 10000 lines.
-        </para>
-      </section>
-
-      <section xml:id="ha-syncing-timeouts">
-        <title>Discussion About Timeouts</title>
-        <para>In deployments with a large number of clients connected to the
-        network, lease-database synchronization after a server failure
-        may be a time-consuming operation. The synchronizing server must
-        gather all leases from its partner, which yields a large response
-        over the RESTful interface. The server receives leases using the
-        paging mechanism described in <xref linkend="ha-syncing-page-limit"/>.
-        Before the page of leases is fetched, the synchronizing server
-        sends a <command>dhcp-disable</command> command to disable the DHCP
-        service on the partner server. If the service is already disabled, this
-        command will reset the timeout for the DHCP service being disabled.
-        This timeout value is by default set to 60 seconds. If fetching a
-        single page of leases takes longer than the specified time, the partner server will assume that
-        the synchronizing server died and will resume its DHCP service.
-        The connection of the synchronizing server with its partner is also
-        protected by the timeout. If the synchronization of a single page
-        of leases takes longer than the specified time, the synchronizing server
-        terminates the connection and the synchronization fails.
-        Both timeout values are controlled by a single configuration
-        parameter: <command>sync-timeout</command>. The following
-        configuration snippet demonstrates how to modify the timeout for
-        automatic re-enabling of the DHCP service on the partner server
-        and how to increase the timeout for fetching a single page of leases from 60 seconds
-        to 90 seconds:
-<screen>
-{
-"Dhcp4": {
-
-    ...
-
-    "hooks-libraries": [
-        {
-            "library": "/usr/lib/kea/hooks/libdhcp_lease_cmds.so",
-            "parameters": { }
-        },
-        {
-            "library": "/usr/lib/kea/hooks/libdhcp_ha.so",
-            "parameters": {
-                "high-availability": [ {
-                    "this-server-name": "server1",
-                    "mode": "load-balancing",
-                    "sync-timeout": 90000,
-                    "peers": [
-                        {
-                            "name": "server1",
-                            "url": "http://192.168.56.33:8080/",
-                            "role": "primary"
-                        },
-                        {
-                            "name": "server2",
-                            "url": "http://192.168.56.66:8080/",
-                            "role": "secondary"
-                        }
-                    ]
-                } ]
-            }
-        }
-    ],
-
-    ...
-
-}
-</screen>
-        </para>
-
-        <para>
-          It is important to note that extending this <command>sync-timeout</command> value may sometimes
-          be insufficient to prevent issues with timeouts during
-          lease-database synchronization. The control commands travel via the
-          Control Agent, which also monitors incoming (with a synchronizing
-          server) and outgoing (with a DHCP server) connections for timeouts.
-          The DHCP server also monitors the connection from the Control
-          Agent for timeouts. Those timeouts cannot currently be modified
-          via configuration; extending these timeouts is only possible by
-          modifying them in the Kea code and recompiling the server. The
-          relevant constants are located in the Kea source at:
-          <filename>src/lib/config/timeouts.h</filename>.
-        </para>
-      </section>
-
-      <section xml:id="ha-pause-state-machine">
-        <title>Pausing HA State Machine</title>
-        <para>The high-availability state machine includes many different
-        states described in detail in <xref linkend="ha-server-states"/>.
-        The server enters each state when certain conditions are met, most
-        often taking into account the partner server's state. In some states
-        the server performs specific actions, e.g. synchronization of the
-        lease database in the <command>syncing</command> state or responding
-        to DHCP queries according to the configured mode of operation in the
-        <command>load-balancing</command> and <command>hot-standby</command>
-        states.
-        </para>
-        <para>
-          By default, transitions between the states are performed
-          automatically and the server administrator has no direct control
-          when the transitions take place; in most cases, the
-          administrator doesn't need such control. In some situations,
-          however, the administrator may want to "pause" the HA state
-          machine in a selected state to perform some additional administrative
-          actions before the server transitions to the next state.
-        </para>
-
-        <para>Consider a server failure which results in the loss of the entire
-        lease database. Typically, the server will rebuild its lease database
-        when it enters the <command>syncing</command> state by querying
-        the partner server for leases, but it is possible that the
-        partner was also experiencing a failure and lacks lease information.
-        In this case, it may be required to reconstruct lease databases on
-        both servers from some external source, e.g. a backup server. If the
-        lease database is to be reconstructed via RESTful API, the
-        servers should be started in the initial, i.e. <command>waiting</command>,
-        state and remain in this state while leases are being added. In
-        particular, the servers should not attempt to synchronize their lease
-        databases nor start serving DHCP clients.
-        </para>
-
-        <para>The HA hooks library provides configuration parameters and a
-        command to control when the HA state machine should be paused and
-        resumed. The following configuration causes the HA state machine
-        to pause in the <command>waiting</command> state after server startup.
-<screen>
-"Dhcp4": {
-
-    ...
-
-    "hooks-libraries": [
-        {
-            "library": "/usr/lib/kea/hooks/libdhcp_lease_cmds.so",
-            "parameters": { }
-        },
-        {
-            "library": "/usr/lib/kea/hooks/libdhcp_ha.so",
-            "parameters": {
-                "high-availability": [ {
-                    "this-server-name": "server1",
-                    "mode": "load-balancing",
-                    "peers": [
-                        {
-                            "name": "server1",
-                            "url": "http://192.168.56.33:8080/",
-                            "role": "primary"
-                        },
-                        {
-                            "name": "server2",
-                            "url": "http://192.168.56.66:8080/",
-                            "role": "secondary"
-                        }
-                    ],
-                    "state-machine": {
-                        "states":  [
-                            {
-                                "state": "waiting",
-                                "pause": "once"
-                            }
-                        ]
-                    }
-                } ]
-            }
-        }
-    ],
-
-    ...
-
-}
-</screen>
-        </para>
-
-        <para>The <command>pause</command> parameter value <command>once</command>
-        denotes that the state machine should be paused upon the first transition
-        to the <command>waiting</command> state; later transitions to this state
-        will not cause the state machine to pause. Two other supported values of the
-        <command>pause</command> parameter are: <command>always</command> and
-        <command>never</command>. The latter is the default value for each state,
-        which instructs the server never to pause the state machine.
-        </para>
-
-        <para>In order to "unpause" the state machine, the <command>ha-continue</command>
-        command must be sent to the paused server. This command does not take
-        any arguments. See <xref linkend="ha-control-commands"/> for details
-        about commands specific to the HA hooks library.
-        </para>
-
-        <para>It is possible to configure the state machine to pause in more than
-        one state. Consider the following configuration:
-<screen>
-"Dhcp4": {
-
-    ...
-
-    "hooks-libraries": [
-        {
-            "library": "/usr/lib/kea/hooks/libdhcp_lease_cmds.so",
-            "parameters": { }
-        },
-        {
-            "library": "/usr/lib/kea/hooks/libdhcp_ha.so",
-            "parameters": {
-                "high-availability": [ {
-                    "this-server-name": "server1",
-                    "mode": "load-balancing",
-                    "peers": [
-                        {
-                            "name": "server1",
-                            "url": "http://192.168.56.33:8080/",
-                            "role": "primary"
-                        },
-                        {
-                            "name": "server2",
-                            "url": "http://192.168.56.66:8080/",
-                            "role": "secondary"
-                        }
-                    ],
-                    "state-machine": {
-                        "states": [
-                            {
-                                "state": "ready",
-                                "pause": "always"
-                            },
-                            {
-                                "state": "partner-down",
-                                "pause": "once"
-                            }
-                        ]
-                    }
-                } ]
-            }
-        }
-    ],
-
-    ...
-
-}
-</screen>
-        </para>
-
-        <para>This configuration instructs the server to pause the state
-        machine every time it transitions to the <command>ready</command> state
-        and upon the first transition to the <command>partner-down</command>
-        state.</para>
-
-        <para>Refer to <xref linkend="ha-server-states"/> for a complete
-        list of server states. The state machine can be paused in any of the
-        supported states; however, it is not practical for the
-        <command>backup</command> and <command>terminated</command> states because
-        the server never transitions out of these states anyway.
-        </para>
-
-        <note><para>In the <command>syncing</command> state the server is paused
-        before it makes an attempt to synchronize the lease database with a partner.
-        To pause the state machine after lease-database synchronization,
-        use the <command>ready</command> state instead.
-        </para></note>
-
-        <note><para>The state of the HA state machine depends on the state of the
-        cooperating server. Therefore, it must be taken into account that
-        pausing the state machine of one server may affect the operation of the
-        partner server. For example: if the primary server is paused in the
-        <command>waiting</command> state, the partner server will also remain in
-        the <command>waiting</command> state until the state machine of the
-        primary server is resumed and that server transitions to the
-        <command>ready</command> state.</para></note>
-      </section>
-
-      <section xml:id="ha-ctrl-agent-config">
-        <title>Control Agent Configuration</title>
-        <para><xref linkend="kea-ctrl-agent"/> describes in detail the
-        Kea daemon, which provides a RESTful interface to control Kea servers.
-        The same functionality is used by the High Availability hook library to
-        establish communication between the HA peers. Therefore, the HA
-        library requires that the Control Agent (CA) be started for each DHCP
-        instance within the HA setup. If the Control Agent is not started,
-        the peers will not be able to communicate with the particular DHCP
-        server (even if the DHCP server itself is online) and may eventually
-        consider this server to be offline.
-        </para>
-
-        <para>The following is an example configuration for the CA running
-        on the same machine as the primary server. This configuration is
-        valid for both the load-balancing and the hot-standby cases presented in
-        previous sections.
-
-<screen>
-{
-"Control-agent": {
-    "http-host": "192.168.56.33",
-    "http-port": 8080,
-
-    "control-sockets": {
-        "dhcp4": {
-            "socket-type": "unix",
-            "socket-name": "/tmp/kea-dhcp4-ctrl.sock"
-        },
-        "dhcp6": {
-            "socket-type": "unix",
-            "socket-name": "/tmp/kea-dhcp6-ctrl.sock"
-        }
-    }
-}
-}
-</screen>
-        </para>
-      </section> <!-- end of ha-ctrl-agent-config -->
-
-      <section xml:id="ha-control-commands">
-        <title>Control Commands for High Availability</title>
-        <para>Even though the HA hook library is designed to automatically
-        resolve issues with DHCP service interruptions by redirecting the
-        DHCP traffic to a surviving server and synchronizing the lease
-        database when required, it may be useful for the administrator to
-        have more control over the server behavior. In particular, it may be
-        useful to be able to trigger lease-database synchronization on demand.
-        It may also be useful to manually set the HA scopes that are being
-        served.</para>
-
-        <para>Note that the backup server can sometimes be used to handle
-        DHCP traffic if both active servers are down. The backup
-        servers do not perform failover function automatically. Thus, in
-        order to use the backup server to respond to DHCP queries,
-        the server administrator must enable this function manually.
-        </para>
-
-        <para>The following sections describe commands supported by the
-        HA hook library which are available for the administrator.
-        </para>
-
-        <section xml:id="command-ha-sync">
-          <title>ha-sync Command</title>
-          <para>The <command>ha-sync</command> command instructs the
-          server to synchronize its local lease database with the
-          selected peer. The server fetches all leases from the peer and
-          updates those locally stored leases which are older than
-          those fetched. It also creates new leases when any of those
-          fetched do not exist in the local database. All leases that
-          are not returned by the peer but are in the local database are
-          preserved. The database synchronization is unidirectional;
-          only the database on the server to which the command has been
-          sent is updated. In order to synchronize the peer's database a
-          separate <command>ha-sync</command> has to be issued to that
-          peer.</para>
-
-          <para>Database synchronization may be triggered for
-          both active and backup server types. The <command>ha-sync</command> command
-          has the following structure (DHCPv4 server case):
-<screen>
-{
-    "command": "ha-sync",
-    "service": [ "dhcp4 "],
-    "arguments": {
-        "server-name": "server2",
-        "max-period": 60
-    }
-}
-</screen>
-          </para>
-
-          <para>
-            When the server receives this command it first disables the
-            DHCP service of the server from which it will be fetching leases, by
-            sending the <command>dhcp-disable</command> command to that server.
-            The <command>max-period</command> parameter specifies the maximum
-            duration (in seconds) for which the DHCP service should be disabled.
-            If the DHCP service is successfully disabled, the synchronizing
-            server will fetch leases from the remote server by issuing one or
-            more <command>lease4-get-page</command> commands. When the lease-
-            database synchronization is complete, the synchronizing server sends
-            the <command>dhcp-enable</command> command to the peer to re-enable its
-            DHCP service.
-          </para>
-
-          <para>The <command>max-period</command> value should be sufficiently
-          long to guarantee that it doesn't elapse before the synchronization
-          is completed. Otherwise, the DHCP server will automatically enable
-          its DHCP function while the synchronization is still in progress.
-          If the DHCP server subsequently allocates any leases during the
-          synchronization, those new (or updated) leases will not be fetched
-          by the synchronizing server, leading to database inconsistencies.
-          </para>
-        </section> <!-- ha-sync-command -->
-
-        <section xml:id="command-ha-scopes">
-          <title>ha-scopes Command</title>
-          <para>This command allows modification of the HA scopes that the
-          server is serving. Consult <xref linkend="ha-load-balancing-config"/>
-          and <xref linkend="ha-hot-standby-config"/> to learn what scopes
-          are available for different HA modes of operation. The
-          <command>ha-scopes</command> command has the following structure
-          (DHCPv4 server case):
-<screen>
-{
-    "command": "ha-scopes",
-    "service": [ "dhcp4" ],
-    "arguments": {
-        "scopes": [ "HA_server1", "HA_server2" ]
-    }
-}
-</screen>
-          </para>
-
-          <para>This command configures the server to handle traffic from
-          both <command>HA_server1</command> and <command>HA_server2</command>
-          scopes. In order to disable all scopes specify an empty list:
-
-<screen>
-{
-    "command": "ha-scopes",
-    "service": [ "dhcp4 "],
-    "arguments": {
-        "scopes": [ ]
-    }
-}
-</screen>
-          </para>
-        </section> <!-- ha-scopes-command -->
-
-        <section xml:id="command-ha-continue">
-        <title>ha-continue Command</title>
-        <para>This command is used to resume the operation of the paused HA
-        state machine, as described in <xref linkend="ha-pause-state-machine"/>.
-        It takes no arguments, so the command structure is as simple as:
-<screen>
-{
-    "command": "ha-continue"
-}
-</screen>
-      </para>
-        </section> <!-- ha-continue-command -->
-
-      </section> <!-- ha-control-commands -->
-
-    </section> <!-- end of high-availability-library -->
diff --git a/doc/guide/hooks-host-cache.xml b/doc/guide/hooks-host-cache.xml
deleted file mode 100644 (file)
index 7a133a8..0000000
+++ /dev/null
@@ -1,300 +0,0 @@
-<section xml:id="hooks-host-cache">
-  <title>host_cache: Caching Host Reservations</title>
-  <para>Some database backends, such as RADIUS, are considered
-  slow and may take a long time to respond. Since Kea in general is
-  synchronous, the backend performance directly affects the DHCP
-  performance. To minimize the impact and improve performance, the
-  Host Cache library provides a way to cache information from the database locally.
-  This includes negative caching, i.e. the ability to remember
-  that there is no client information in the database.</para>
-
-
-  <para>
-
-  </para>
-
-  <para>
-    <note>
-      <para>This library may only be loaded by the <command>kea-dhcp4</command>
-      or the <command>kea-dhcp6</command> process.
-      </para>
-    </note>
-
-    In principle, this hook library can be used with any backend that may introduce
-    performance degradation (MySQL, PostgreSQL, Cassandra, RADIUS).
-    Host Cache must be loaded for the RADIUS accounting
-    mechanism to work.
-  </para>
-
-  <para>
-    The Host Cache hook library is currently very simple. It takes only
-    one optional parameter ("maximum") that defines the maximum number
-    of hosts to be cached. If not specified, the default value of 0 is
-    used, which means there is no limit. The hook library can be
-    loaded the same way as any other hook library; for example, this
-    configuration could be used:
-
-<screen>
-  "Dhcp4": {
-
-  // Your regular DHCPv4 configuration parameters here.
-
-  "hooks-libraries": [
-  {
-      "library": "/usr/local/lib/kea/hooks/libdhc_host_cache.so",
-      "parameters": {
-
-          // Tells Kea to never cache more than 1000 hosts.
-          "maximum": 1000
-
-      }
-  } ]</screen>
-  </para>
-
-  <para>
-    Once loaded, the Host Cache hook library provides a number
-    of new commands which can be used either over the control
-    channel (see <xref linkend="ctrl-channel-client"/>) or the REST API
-    (see <xref linkend="agent-overview"/>). An example REST API client
-    is described in <xref linkend="shell-overview"/>. The following
-    sections describe the commands available.
-  </para>
-
-  <section id="command-cache-flush">
-    <title>cache-flush Command</title>
-    <para>This command allows removal of a specified number of cached
-    host entries. It takes one parameter, which defines the number of
-    hosts to be removed. An example usage looks as follows:
-<screen>
-{
-    "command": "cache-flush",
-    "arguments": 1000
-}</screen>
-This command will remove 1000 hosts. If you want to delete all
-cached hosts, please use cache-clear instead. The hosts are stored
-in FIFO order, so the oldest entries are always removed.
-    </para>
-  </section>
-
-  <section id="command-cache-clear">
-    <title>cache-clear Command</title>
-    <para>This command allows removal of all cached
-    host entries. An example usage looks as follows:
-<screen>
-{
-    "command": "cache-clear"
-}</screen>
-This command will remove all hosts. If you want to delete only a
-certain number of cached hosts, please use cache-flush instead.
-    </para>
-  </section>
-
-  <section id="command-cache-size">
-    <title>cache-size Command</title>
-    <para>This command returns the number of host entries.
-    An example usage looks as follows:
-<screen>
-{
-    "command": "cache-size"
-}</screen>
-    </para>
-  </section>
-
-  <section id="command-cache-write">
-    <title>cache-write Command</title>
-    <para>In general, the cache content is considered a runtime
-    state and the server can be shut down or restarted as usual; the
-    cache will then be repopulated after restart. However, there are
-    some cases when it is useful to store the contents of the cache. One
-    such case is RADIUS, where the cached hosts also retain
-    additional cached RADIUS attributes; there is no easy way to
-    obtain this information again, because renewing clients send their
-    packet to the DHCP server directly. Another use
-    case is when you want to restart the server and for performance
-    reasons you want it to start with a hot (populated) cache.
-    </para>
-
-    <para>This command allows writing the contents of the in-memory cache
-    to a file on disk. It takes one parameter, which defines the
-    filename. An example usage looks as follows:
-<screen>
-{
-    "command": "cache-write",
-    "arguments": "/tmp/kea-host-cache.json"
-}</screen>
-This causes the contents to be stored in the /tmp/kea-host-cache.json file.
-That file can then be loaded with the cache-load command or processed by
-any other tool that is able to understand JSON format.
-    </para>
-
-
-  </section>
-
-  <section id="command-cache-load">
-    <title>cache-load Command</title>
-    <para>See the previous section for a discussion of use cases
-    where it may be useful to write and load contents of the host
-    cache to disk.</para>
-
-    <para>This command allows the contents of a file on disk to be loaded into
-    an in-memory cache. It takes one parameter, which defines the
-    filename. An example usage looks as follows:
-<screen>
-{
-    "command": "cache-load",
-    "arguments": "/tmp/kea-host-cache.json"
-}</screen>
-This command will store the contents to the /tmp/kea-host-cache.json file.
-That file can then be loaded with the cache-load command or processed by
-any other tool that is able to understand JSON format.
-    </para>
-
-  </section>
-
-  <section id="command-cache-get">
-    <title>cache-get Command</title>
-    <para>This command is similar to cache-write, but instead of
-    writing the cache contents to disk, it returns the contents to
-    whoever sent the command.</para>
-    <para>This command allows the contents of a file on disk to be loaded into
-    an in-memory cache. It takes one parameter, which defines the
-    filename. An example usage looks as follows:
-<screen>
-{
-    "command": "cache-get"
-}</screen>
-This command will return all the cached hosts. Note that the response
-may be large.
-    </para>
-  </section>
-
-  <section id="command-cache-get-by-id">
-    <title>cache-get-by-id Command</title>
-    <para>This command is similar to cache-get, but instead of
-    returning the whole content it returns only the entries matching
-    the given identifier.</para>
-    <para>It takes one parameter, which defines the identifier of
-    wanted cached host reservations. An example usage looks as follows:
-<screen>
-{
-    "command": "cache-get-by-id",
-    "arguments": {
-        "hw-address": "01:02:03:04:05:06"
-    }
-}</screen>
-This command will return all the cached hosts with the given hardware address.
-    </para>
-  </section>
-
-  <section id="command-cache-insert">
-    <title>cache-insert Command</title>
-    <para>This command may be used to manually insert a host into the
-    cache; there are very few use cases when this command could be
-    useful. This command expects its arguments to follow the usual
-    syntax for specifying host reservations (see <xref
-    linkend="host-reservation-v4"/> or <xref
-    linkend="host-reservation-v6"/>), with one difference: the
-    subnet-id value must be specified explicitly.</para>
-
-    <para>
-      An example command that will insert an IPv4 host into the host
-      cache looks as follows:
-<screen>
-{
-    "command": "cache-insert",
-    "arguments": {
-        "hw-address": "01:02:03:04:05:06",
-        "subnet-id4": 4,
-        "subnet-id6": 0,
-        "ip-address": "192.0.2.100",
-        "hostname": "somehost.example.org",
-        "client-classes4": [ ],
-        "client-classes6": [ ],
-        "option-data4": [ ],
-        "option-data6": [ ],
-        "next-server": "192.0.0.2",
-        "server-hostname": "server-hostname.example.org",
-        "boot-file-name": "bootfile.efi",
-        "host-id": 0
-    }
-}</screen>
-
-    </para>
-
-    <para>
-      An example command that will insert an IPv6 host into the host
-      cache looks as follows:
-<screen>
-{
-    "command": "cache-insert",
-    "arguments": {
-        "hw-address": "01:02:03:04:05:06",
-        "subnet-id4": 0,
-        "subnet-id6": 6,
-        "ip-addresses": [ "2001:db8::cafe:babe" ],
-        "prefixes": [ "2001:db8:dead:beef::/64" ],
-        "hostname": "",
-        "client-classes4": [ ],
-        "client-classes6": [ ],
-        "option-data4": [ ],
-        "option-data6": [ ],
-        "next-server": "0.0.0.0",
-        "server-hostname": "",
-        "boot-file-name": "",
-        "host-id": 0
-    }
-}</screen>
-    </para>
-  </section>
-
-  <section id="command-cache-remove">
-    <title>cache-remove Command</title>
-    <para>Sometimes it is useful to remove a single entry from the
-    host cache. A good use case is a situation where the device is up,
-    Kea has already provided configuration, and the host entry is in
-    cache. As a result of administrative action (e.g. customer hasn't
-    paid their bills or has perhaps been upgraded to better service), the
-    information in the backend (e.g. MySQL or RADIUS) is being
-    updated. However, since cache is in use, Kea does not notice the
-    change as the cached values are used. The cache-remove command can
-    solve this problem by removing a cached entry after administrative
-    changes.</para>
-
-    <para>
-      The cache-remove command works similarly to the reservation-get
-      command. It allows querying by two parameters:
-      either subnet-id4 or subnet-id6; or
-      ip-address (may be an IPv4 or IPv6 address), hw-address (specifies
-      hardware/MAC address), duid, circuit-id, client-id, or flex-id.
-    </para>
-
-    <para>
-      An example command to remove an IPv4 host with reserved address
-      192.0.2.1 from a subnet with a subnet-id 123 looks as follows:
-<screen>
-{
-    "command": "cache-remove",
-    "arguments": {
-        "ip-address": "192.0.2.1",
-        "subnet-id": 123
-    }
-}</screen>
-    </para>
-    <para>
-      Another example that removes an IPv6 host identifier by DUID and
-      specific subnet-id is:
-<screen>
-{
-    "command": "cache-remove",
-    "arguments": {
-        "duid": "00:01:ab:cd:f0:a1:c2:d3:e4",
-        "subnet-id": 123
-    }
-}</screen>
-    </para>
-
-  </section>
-
-
-
-</section>
diff --git a/doc/guide/hooks-lease-cmds.xml b/doc/guide/hooks-lease-cmds.xml
deleted file mode 100644 (file)
index 1b46cf2..0000000
+++ /dev/null
@@ -1,870 +0,0 @@
-<!--
- - Copyright (C) 2018-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-
-      <section xml:id="lease-cmds">
-        <title>lease_cmds: Lease Commands</title>
-        <para>
-          This section describes the hook library with
-          commands used to manage leases. Kea provides a way to store lease
-          information in several backends (memfile, MySQL, PostgreSQL and
-          Cassandra), and this library provides a interface that can
-          manipulate leases in a unified, safe way. In particular, it allows
-          things previously impossible: lease manipulation in memfile while Kea
-          is running, sanity check changes, lease existence checks, and removal of all
-          leases belonging to a specific subnet. It can also catch more obscure
-          errors, like an attempt to add a lease with a subnet-id that does not exist in the
-          configuration, or configuring a lease to use an address that is outside
-          of the subnet to which it is supposed to belong.
-          The library also provides a non-programmatic way to manage user contexts
-          associated with leases.
-
-          <note>
-            <para>This library may only be loaded by the <command>kea-dhcp4</command>
-            or the <command>kea-dhcp6</command> process.
-            </para>
-          </note>
-        </para>
-
-        <para>There are many use cases where an administrative command may be
-        useful; for example, during migration between servers or
-        different vendors, when a certain network is being retired, or when a
-        device has been disconnected and the sysadmin knows for sure that it
-        will not be coming back. The "get" queries may be useful for automating
-        certain management and monitoring tasks. They can also act as
-        preparatory steps for lease updates and removals.</para>
-
-        <para>
-          This library provides the following commands:
-          <itemizedlist>
-            <listitem>
-              <para><command>lease4-add</command> - adds a new IPv4 lease;</para>
-            </listitem>
-            <listitem>
-              <para><command>lease6-add</command> - adds a new IPv6 lease;</para>
-            </listitem>
-            <listitem>
-              <para><command>lease6-bulk-apply</command> - creates, updates and/or
-              deletes multiple IPv6 leases in a single transaction;</para>
-            </listitem>
-            <listitem>
-              <para><command>lease4-get</command> - checks whether an IPv4 lease with
-              the specified parameters exists and returns it if it does;</para>
-            </listitem>
-            <listitem>
-              <para><command>lease6-get</command> - checks whether an IPv6 lease with
-              the specified parameters exists and returns it if it does;</para>
-            </listitem>
-            <listitem>
-              <para><command>lease4-get-all</command> - returns all IPv4 leases
-              or all IPv4 leases for the specified subnets;</para>
-            </listitem>
-            <listitem>
-              <para><command>lease6-get-all</command> - returns all IPv6 leases
-              or all IPv6 leases for the specified subnets;</para>
-            </listitem>
-            <listitem>
-              <para><command>lease4-get-page</command> - returns a set ("page")
-              of leases from the list of all IPv4 leases in the database. 
-              By iterating through the pages it is possible to retrieve all the leases;</para>
-            </listitem>
-            <listitem>
-              <para><command>lease6-get-page</command> - returns a set ("page")
-              of leases from the list of all IPv6 leases in the database. 
-              By iterating through the pages it is possible to retrieve all the leases;</para>
-            </listitem>
-            <listitem>
-              <para><command>lease4-del</command> - deletes an IPv4
-              lease with the specified parameters;</para>
-            </listitem>
-            <listitem>
-              <para><command>lease6-del</command> - deletes an IPv6
-              lease with the specified parameters;</para>
-            </listitem>
-            <listitem>
-              <para><command>lease4-update</command> - updates an IPv4 lease;</para>
-            </listitem>
-            <listitem>
-              <para><command>lease6-update</command> - updates an IPv6 lease;</para>
-            </listitem>
-            <listitem>
-              <para><command>lease4-wipe</command> - removes all leases from a
-              specific IPv4 subnet or from all subnets;</para>
-            </listitem>
-            <listitem>
-              <para><command>lease6-wipe</command> - removes all leases from a
-              specific IPv6 subnet or from all subnets;</para>
-            </listitem>
-          </itemizedlist>
-
-        </para>
-
-        <para>The lease commands library is part of the open source code and is
-        available to every Kea user.</para>
-
-        <para>
-          All commands use JSON syntax and can be issued either using
-          control channel (see <xref linkend="ctrl-channel"/>) or Control
-          Agent (see <xref linkend="kea-ctrl-agent"/>).
-        </para>
-
-        <para>
-          The library can be loaded in the same way as other hook libraries, and it
-          does not take any parameters. It supports both DHCPv4 and DHCPv6
-          servers.
-<screen>
-"Dhcp6": { <userinput>
-    "hooks-libraries": [
-        {
-            "library": "/path/libdhcp_lease_cmds.so"
-        }
-        ...
-    ] </userinput>
-}
-</screen>
-        </para>
-
-        <section id="command-lease4-add">
-          <title>lease4-add, lease6-add Commands</title>
-        <para id="command-lease6-add">
-          The <command>lease4-add</command> and <command>lease6-add</command>
-          commands allow for the creation of a new lease. Typically Kea creates
-          a lease when it first sees a new device; however,
-          sometimes it may be convenient to create the lease
-          manually. The <command>lease4-add</command> command requires
-          at least two parameters: an IPv4 address and an identifier, i.e. hardware
-          (MAC) address. A third parameter, subnet-id, is optional. If the subnet-id is not
-          specified or the specified value is 0, Kea will try to determine the
-          value by running a subnet-selection procedure. If specified, however,
-          its value must match the existing subnet. The simplest successful
-          call might look as follows:
-<screen>
-{
-    "command": "lease4-add",
-    "arguments": {
-        "ip-address": "192.0.2.202",
-        "hw-address": "1a:1b:1c:1d:1e:1f"
-    }
-}
-</screen>
-        </para>
-
-        <para>The <command>lease6-add</command> command requires three parameters: an
-        IPv6 address, an IAID value (identity association identifier, a value
-        sent by clients), and a DUID. As with lease4-add, the subnet-id parameter is optional. If the subnet-id is not
-        specified or the provided value is 0, Kea will try to determine the
-        value by running a subnet-selection procedure. If specified, however,
-        its value must match the existing subnet. For
-        example:
-<screen>
-{
-    "command": "lease6-add",
-    "arguments": {
-        "subnet-id": 66,
-        "ip-address": "2001:db8::3",
-        "duid": "1a:1b:1c:1d:1e:1f:20:21:22:23:24",
-        "iaid": 1234
-    }
-}</screen>
-
-<command>lease6-add</command> can also be used to add leases for IPv6
-prefixes. In this case there are three additional parameters that must be
-specified: subnet-id, type (set to value of "IA_PD"), and prefix
-length. The actual prefix is set using ip-address field. Note that Kea cannot
-guess subnet-id values for prefixes; they must be specified explicitly.
-For example, to configure a lease for prefix 2001:db8:abcd::/48, the following
-command can be used:
-
-<screen>
-{
-    "command": "lease6-add",
-    "arguments": {
-        "subnet-id": 66,
-        "type": "IA_PD",
-        "ip-address": "2001:db8:abcd::",
-        "prefix-len": 48,
-        "duid": "1a:1b:1c:1d:1e:1f:20:21:22:23:24",
-        "iaid": 1234
-    }
-}</screen>
-
-The commands can take a number of additional optional parameters:
-          <itemizedlist>
-            <listitem>
-              <para><command>valid-lft</command> - specifies the lifetime of the
-              lease, expressed in seconds. If not specified, the value
-              configured in the subnet related to the specified subnet-id is
-              used.</para>
-            </listitem>
-            <listitem>
-              <para><command>expire</command> - creates a timestamp of the lease
-              expiration time, expressed in unix format (seconds since 1 Jan
-              1970). If not specified, the default value is now + the lease lifetime (the value of valid-lft).</para>
-            </listitem>
-            <listitem>
-              <para><command>fqdn-fwd</command> - specifies whether the lease
-              should be marked as if a forward DNS update were conducted. Note this
-              only affects the the data stored in the lease database, and no DNS update
-              will be performed. If configured, a DNS
-              update to remove the A or AAAA records will be conducted when the
-              lease is removed due to expiration or being released by a
-              client. If not specified, the default value is false. The hostname
-              parameter must be specified if fqdn-fwd is set to true.</para>
-            </listitem>
-            <listitem>
-              <para><command>fqdn-rev</command> - specifies whether the lease
-              should be marked as if reverse DNS update were conducted. Note this
-              only affects the the data stored in the lease database, and no DNS update
-              will be performed.. If configured, a DNS
-              update to remove the PTR record will be conducted when the lease
-              is removed due to expiration or being released by a client. If not
-              specified, the default value is false. The hostname parameter must be
-              specified if fqdn-fwd is set to true.</para>
-            </listitem>
-            <listitem>
-              <para><command>hostname</command> - specifies the hostname to be
-              associated with this lease. Its value must be non-empty if either
-              fqdn-fwd or fwdn-rev are set to true. If not specified, the
-              default value is an empty string.</para>
-            </listitem>
-            <listitem>
-              <para><command>hw-address</command> - optionally specifies a hardware (MAC) address
-              for an IPv6 lease. It is a mandatory parameter
-              for an IPv4 lease.</para>
-            </listitem>
-            <listitem>
-              <para><command>client-id</command> - optionally specifies a client identifier
-              for an IPv4 lease.</para>
-            </listitem>
-            <listitem>
-              <para><command>preferred-lft</command> - optionally specifies a preferred lifetime
-              for IPv6 leases. If not specified, the value
-              configured for the subnet corresponding to the specified subnet-id
-              is used. This parameter is not used when adding an IPv4 lease.</para>
-            </listitem>
-            <listitem>
-              <para><command>user-context</command> - specifies the user
-              context to be associated with this lease. It must be a
-              JSON map.</para>
-              </listitem>
-          </itemizedlist>
-        </para>
-
-        <para>Here is an example of a more complex lease addition:
-
-<screen>
-{
-    "command": "lease6-add",
-    "arguments": {
-        "subnet-id": 66,
-        "ip-address": "2001:db8::3",
-        "duid": "01:02:03:04:05:06:07:08",
-        "iaid": 1234,
-        "hw-address": "1a:1b:1c:1d:1e:1f",
-        "preferred-lft": 500,
-        "valid-lft": 1000,
-        "expire": 12345678,
-        "fqdn-fwd": true,
-        "fqdn-rev": true,
-        "hostname": "urania.example.org",
-        "user-context": { "version": 1 }
-    }
-}
-</screen>
-        </para>
-
-        <para>
-          The command returns a status that indicates either a success (result
-          0) or a failure (result 1). A failed command always includes a text
-          parameter that explains the cause of failure. For example:
-          <screen>{ "result": 0, "text": "Lease added." }</screen> Example failure:
-          <screen>{ "result": 1, "text": "missing parameter 'ip-address' (&lt;string&gt;:3:19)" }</screen>
-        </para>
-
-        <section id="command-lease6-bulk-apply">
-          <title>lease6-bulk-apply</title>
-          <para>The <command>lease6-bulk-apply</command> was implemented to address
-          the performance penalty in the High Availability when a single DHCPv6
-          transaction resulted in multiple lease updates sent to the partner if
-          multiple address and/or prefix leases were allocated. Consider the case
-          when a DHCPv6 client requests the assignment of two IPv6 addresses and two IPv6
-          prefixes. That may result in allocation of 4 leases. In addition, the
-          DHCPv6 may assign different address than requested by the client during
-          the renew or rebind and delete the leases previously used by this client.
-          The are 6 of lease changes sent between the HA partners is in this case.
-          Sending these updates in individual commands, e.g. <command>lease6-update</command>
-          is highly inefficient and produces unnecessary delays in communication
-          between the HA partners and in sending the response to the DHCPv6 client.
-          </para>
-
-          <para>The <command>lease6-bulk-apply</command> command deals with this
-          problem by aggregating all lease changes in a single command. Both
-          deleted leases and new/updated leases are conveyed in a single command.
-          The receiving server iterates over the deleted leases and deletes them
-          from its lease database. Next, it iterates over the new/updated leases
-          and adds them to the database or updates them if they already exist.
-          </para>
-
-          <para>Even though the High Avialability is the major application for
-          this command, it can be freely used in all cases when it is desired to
-          send multiple lease changes in a single command.</para>
-
-          <para>In the following example, we ask to delete two leases and to add
-          or update two other leases in the database:
-<screen>
-{
-    "command": "lease6-bulk-apply",
-    "arguments": {
-        "deleted-leases": [
-            {
-                "ip-address": "2001:db8:abcd::",
-                "type": "IA_PD",
-            },
-            {
-                "ip-address": "2001:db8:abcd::234",
-                "type": "IA_NA",
-            }
-        ],
-        "leases": [
-           {
-                "subnet-id": 66,
-                "ip-address": "2001:db8:cafe::",
-                "type": "IA_PD",
-                 ...
-           },
-           {
-                "subnet-id": 66,
-                "ip-address": "2001:db8:abcd::333",
-                "type": "IA_NA",
-                ...
-            }
-        ]
-    }
-}
-</screen>
-          </para>
-
-          <para>If any of the leases is malformed, no leases changes are applied
-          to the lease database. If the leases are well formed but there is a
-          failure to apply any of the lease changes to the database, the command
-          will continue to be processed for other leases. All the leases for which
-          the command was unable to apply the changes in the database will be
-          listed in the response.
-          </para>
-
-          <para>For example:
-<screen>
-{
-    "result": 0,
-    "text": "Bulk apply of 2 IPv6 leases completed".
-    "arguments": {
-        "failed-deleted-leases": [
-            {
-                "ip-address": "2001:db8:abcd::",
-                "type": "IA_PD",
-                "result": 3,
-                "error-message": "no lease found"
-            }
-        ],
-        "failed-leases": [
-            {
-                "ip-address": "2001:db8:cafe::",
-                "type": "IA_PD",
-                "result": 1,
-                "error-message": "unable to communicate with the lease database"
-            }
-        ]
-    }
-}
-</screen>
-          </para>
-          <para>The response above indicates that the hooks library was unable to
-          delete the lease for prefix "2001:db8:abcd::" and add or update the lease
-          for prefix "2001:db8:cafe::". However, there are two other lease changes
-          which have been applied as indicated by the text message. The
-          <command>result</command> is the status constant that indicates the type
-          of the error experienced for the particular lease. The meaning of the
-          returned codes are the same as the results returned for the commands.
-          In particular, the result of 1 indicates an error while processing the
-          lease, e.g. a communication error with the database. The result of 3
-          indicates that an attempt to delete the lease was unsuccessful because
-          such lease doesn't exist (empty result).
-          </para>
-        </section>
-
-        <section id="command-lease4-get">
-          <title>lease4-get, lease6-get Commands</title>
-          <para  id="command-lease6-get">
-            <command>lease4-get</command> or <command>lease6-get</command>
-          can be used to query the lease database and retrieve existing
-          leases. There are two types of parameters the
-          <command>lease4-get</command> command supports: (address) or (subnet-id,
-          identifier-type, identifier). There are also two types for
-          <command>lease6-get</command>: (address,type) or (subnet-id,
-          identifier-type, identifier, IAID, type). The first type of query is
-          used when the address (either IPv4 or IPv6) is known, but the details
-          of the lease are not; one common use case of this type of query is to
-          find out whether a given address is being used. The second
-          query uses identifiers; currently supported identifiers for leases are:
-          "hw-address" (IPv4 only), "client-id" (IPv4 only), and "duid" (IPv6 only).
-          </para>
-
-          <para>
-            An example <command>lease4-get</command> command for getting a lease
-            using an IPv4 address is:
-<screen>
-{
-    "command": "lease4-get",
-    "arguments": {
-        "ip-address": "192.0.2.1"
-    }
-}
-</screen>
-          </para>
-
-          <para>An example of the <command>lease6-get</command> query
-          is:
-<screen>
-{
-  "command": "lease6-get",
-  "arguments": {
-    "ip-address": "2001:db8:1234:ab::",
-    "type": "IA_PD"
-  }
-}</screen>
-          </para>
-
-          <para>An example query by "hw-address" for an IPv4 lease looks
-          as follows:
-<screen>
-{
-    "command": "lease4-get",
-    "arguments": {
-        "identifier-type": "hw-address",
-        "identifier": "08:08:08:08:08:08",
-        "subnet-id": 44
-    }
-}</screen>
-
-          </para>
-
-          <para>An example query by "client-id" for an IPv4 lease looks
-          as follows:
-<screen>
-{
-    "command": "lease4-get",
-    "arguments": {
-        "identifier-type": "client-id",
-        "identifier": "01:01:02:03:04:05:06",
-        "subnet-id": 44
-    }
-}</screen>
-
-          </para>
-
-          <para>An example query by (subnet-id, identifier-type,
-          identifier, iaid, type) for an IPv6 lease is:
-<screen>
-{
-    "command": "lease4-get",
-    "arguments": {
-        "identifier-type": "duid",
-        "identifier": "08:08:08:08:08:08",
-        "iaid": 1234567,
-        "type": "IA_NA",
-        "subnet-id": 44
-    }
-}</screen>
-The type is an optional parameter. Supported values are: IA_NA
-(non-temporary address) and IA_PD (IPv6 prefix).
-If not specified, IA_NA is assumed.
-          </para>
-
-          <para><command>leaseX-get</command> returns a result that indicates a
-          result of the operation and lease details, if found. It has one of the
-          following values: 0 (success), 1 (error), or 2 (empty). An empty
-          result means that a query has been completed properly, but the object
-          (a lease in this case) has not been found. The lease parameters, if
-          found, are returned as arguments.
-          </para>
-
-          <para>
-An example result returned when the host was found:
-<screen>{
-  "arguments": {
-    "client-id": "42:42:42:42:42:42:42:42",
-    "cltt": 12345678,
-    "fqdn-fwd": false,
-    "fqdn-rev": true,
-    "hostname": "myhost.example.com.",
-    "hw-address": "08:08:08:08:08:08",
-    "ip-address": "192.0.2.1",
-    "state": 0,
-    "subnet-id": 44,
-    "valid-lft": 3600
-  },
-  "result": 0,
-  "text": "IPv4 lease found."
-}</screen>
-</para>
-
-        </section>
-
-        <section id="command-lease4-get-all">
-          <title>lease4-get-all, lease6-get-all Commands</title>
-          <para id="command-lease6-get-all"><command>lease4-get-all</command> and
-          <command>lease6-get-all</command> are used to retrieve all
-          IPv4 or IPv6 leases, or all leases for the specified set of
-          subnets. All leases are returned when there are no arguments
-          specified with the command, as in the following example:
-<screen>
-{
-    "command": "lease4-get-all"
-}
-</screen>
-          </para>
-
-          <para>If the arguments are provided, it is expected that they contain the
-          "subnets" parameter, which is a list of subnet identifiers for which the
-          leases should be returned. For example, in order to retrieve all IPv6
-          leases belonging to the subnets with identifiers 1, 2, 3, and 4:
-<screen>
-{
-    "command": "lease6-get-all",
-    "arguments": {
-        "subnets": [ 1, 2, 3, 4 ]
-    }
-}
-</screen>
-          </para>
-
-          <para>
-            The returned response contains a detailed list of leases in the
-            following format:
-<screen>{
-    "arguments": {
-        "leases": [
-            {
-                "cltt": 12345678,
-                "duid": "42:42:42:42:42:42:42:42",
-                "fqdn-fwd": false,
-                "fqdn-rev": true,
-                "hostname": "myhost.example.com.",
-                "hw-address": "08:08:08:08:08:08",
-                "iaid": 1,
-                "ip-address": "2001:db8:2::1",
-                "preferred-lft": 500,
-                "state": 0,
-                "subnet-id": 44,
-                "type": "IA_NA",
-                "valid-lft": 3600
-            },
-            {
-                "cltt": 12345678,
-                "duid": "21:21:21:21:21:21:21:21",
-                "fqdn-fwd": false,
-                "fqdn-rev": true,
-                "hostname": "",
-                "iaid": 1,
-                "ip-address": "2001:db8:0:0:2::",
-                "preferred-lft": 500,
-                "prefix-len": 80,
-                "state": 0,
-                "subnet-id": 44,
-                "type": "IA_PD",
-                "valid-lft": 3600
-            }
-        ]
-    },
-    "result": 0,
-    "text": "2 IPv6 lease(s) found."
-}</screen>
-          </para>
-
-          <warning>
-            <para>The <command>lease4-get-all</command> and
-            <command>lease6-get-all</command> commands may result in very
-            large responses. This may have a negative impact on the DHCP server's
-            responsiveness while the response is generated and transmitted
-            over the control channel, as the server imposes no restriction
-            on the number of leases returned as a result of this command.
-            </para>
-          </warning>
-
-        </section>
-
-        <section xml:id="lease-get-page-cmds">
-          <title>lease4-get-page, lease6-get-page Commands</title>
-          <para>The <command>lease4-get-all</command> and
-          <command>lease6-get-all</command> commands may result in very
-          large responses; generating such a response may consume CPU bandwidth
-          as well as memory. It may even cause the server to become
-          unresponsive. In case of large lease databases it is usually better
-          to retrieve leases in chunks, using the paging mechanism.
-          <command>lease4-get-page</command> and <command>lease6-get-page</command>
-          implement a paging mechanism for DHCPv4 and DHCPv6 servers respectively.
-          The following command retrieves the first 1024 IPv4 leases:
-<screen>
-{
-    "command": "lease4-get-page",
-    "arguments": {
-        "from": "start",
-        "limit": 1024
-    }
-}
-</screen>
-          </para>
-
-          <para>The keyword <command>start</command> denotes that the first page
-          of leases should be retrieved. Alternatively, an IPv4 zero address
-          can be specified to retrieve the first page:
-<screen>
-{
-    "command": "lease4-get-page",
-    "arguments": {
-        "from": "0.0.0.0",
-        "limit": 1024
-    }
-}
-</screen>
-          </para>
-
-          <para>Similarly, the IPv6 zero address can be specified in the
-          <command>lease6-get-page</command> command:
-<screen>
-{
-    "command": "lease6-get-page",
-    "arguments": {
-        "from": "::",
-        "limit": 6
-    }
-}
-</screen>
-          </para>
-
-          <para>The response has the following structure:
-<screen>
-{
-    "arguments": {
-        "leases": [
-            {
-                "ip-address": "2001:db8:2::1",
-                ...
-            },
-            {
-                "ip-address": "2001:db8:2::9",
-                ...
-            },
-            {
-                "ip-address": "2001:db8:3::1",
-                ...
-            },
-            {
-                "ip-address": "2001:db8:5::3",
-                ...
-            }
-            {
-                "ip-address": "2001:db8:4::1",
-                ...
-            },
-            {
-                "ip-address": "2001:db8:2::7",
-                ...
-            }
-
-        ],
-        "count": 6
-    },
-    "result": 0,
-    "text": "6 IPv6 lease(s) found."
-}
-</screen>
-
-          </para>
-
-          <para>Note that the leases' details were excluded from the response above
-          for brevity.</para>
-
-          <para>Generally, the returned list is not sorted in any particular order.
-          Some lease database backends may sort leases in ascending order of addresses,
-          but the controlling client must not rely on this behavior. In cases of
-          highly distributed databases, such as Cassandra, ordering may be inefficient
-          or even impossible.</para>
-
-          <para>The <command>count</command> parameter contains the number of returned
-          leases on the page.
-          </para>
-
-          <para>To fetch the next page, the client must use the last address
-          of the current page as an input to the next
-          <command>lease4-get-page</command> or <command>lease6-get-page</command>
-          command call. In this example it is:
-<screen>
-{
-    "command": "lease6-get-page",
-    "arguments": {
-        "from": "2001:db8:2::7",
-        "count": 6
-    }
-}
-</screen>
-            because 2001:db8:2::7 is the last address on the current page.
-          </para>
-
-          <para>The client may assume that it has reached the last page when the
-          <command>count</command> value is lower than that specified in the command;
-          this includes the case when the <command>count</command> is equal to 0,
-          meaning that no leases were found.
-          </para>
-
-        </section>
-
-        <section id="command-lease4-del">
-          <title>lease4-del, lease6-del Commands</title>
-          <para id="command-lease6-del">
-            <command>leaseX-del</command> can be used to delete a lease from
-          the lease database. There are two types of parameters this command
-          supports, similar to leaseX-get commands: (address) for both v4 and
-          v6, (subnet-id, identifier-type, identifier) for v4, and (subnet-id,
-          identifier-type, identifier, type, IAID) for v6. The first type of
-          query is used when the address (either IPv4 or IPv6) is known, but the
-          details of the lease are not. One common use case is where an administrator
-          wants a specified address to no longer be used. The second form of the command uses
-          identifiers. For maximum flexibility, this interface uses identifiers
-          as a pair of values: type and the actual identifier. The currently
-          supported identifiers are "hw-address" (IPv4 only), "client-id"
-          (IPv4 only), and "duid" (IPv6 only). </para>
-
-          <para>
-            An example command for deleting a lease by address is:
-<screen>
-{
-    "command": "lease4-del",
-    "arguments": {
-        "ip-address": "192.0.2.202"
-    }
-}</screen>
-
-An example IPv4 lease deletion by "hw-address" is:
-
-<screen>{
-  "command": "lease4-del",
-  "arguments": {
-    "identifier": "08:08:08:08:08:08",
-    "identifier-type": "hw-address",
-    "subnet-id": 44
-  }
-}</screen>
-          </para>
-
-          <para><command>leaseX-del</command> returns a result that
-          indicates the outcome of the operation. It has one of the
-          following values: 0 (success), 1 (error), or 3 (empty). The
-          empty result means that a query has been completed properly,
-          but the object (a lease in this case) has not been found.
-          </para>
-        </section>
-
-        <section id="command-lease4-update">
-          <title>lease4-update, lease6-update Commands</title>
-          <para id="command-lease6-update">The <command>lease4-update</command> and
-          <command>lease6-update</command> commands can be used to update
-          existing leases. Since all lease database backends are indexed by IP
-          addresses, it is not possible to update an address, but all other fields
-          may be altered. If an address needs to be changed, please use
-          <command>leaseX-del</command> followed by
-          <command>leaseX-add</command>.</para>
-
-          <para>The subnet-id parameter
-          is optional. If not specified, or if the specified value is 0, Kea
-          will try to determine its value by running a subnet-selection
-          procedure. If specified, however, its value must match the existing
-          subnet.</para>
-
-          <para>The optional boolean parameter "force-create" specifies
-          whether the lease should be created if it doesn't exist in the database.
-          It defaults to false, which indicates that the lease is not created
-          if it doesn't exist. In such a case, an error is returned as a result
-          of trying to update a non-existing lease. If the "force-create" parameter
-          is set to true and the updated lease does not exist, the new lease is
-          created as a result of receiving the <command>leaseX-update</command>.
-          </para>
-
-          <para>
-            An example of a command to update an IPv4 lease is:
-<screen>{
-  "command": "lease4-update",
-  "arguments": {
-    "ip-address": "192.0.2.1",
-    "hostname": "newhostname.example.org",
-    "hw-address": "1a:1b:1c:1d:1e:1f",
-    "subnet-id": 44,
-    "force-create": true
-  }
-}</screen>
-          </para>
-
-          <para>
-            An example of a command to update an IPv6 lease is:
-<screen>{
-  "command": "lease6-update",
-  "arguments": {
-    "ip-address": "2001:db8::1",
-    "duid": "88:88:88:88:88:88:88:88",
-    "iaid": 7654321,
-    "hostname": "newhostname.example.org",
-    "subnet-id": 66,
-    "force-create": false
-  }
-}</screen>
-          </para>
-        </section>
-
-        <section id="command-lease4-wipe">
-          <title>lease4-wipe, lease6-wipe Commands</title>
-          <para id="command-lease6-wipe"><command>lease4-wipe</command> and
-          <command>lease6-wipe</command> are designed to remove all
-          leases associated with a given subnet. This administrative
-          task is expected to be used when an existing subnet is being
-          retired. Note that the leases are not properly expired:
-          no DNS updates are carried out, no log messages are created, and
-          hooks are not called for the leases being removed.</para>
-
-          <para>An example of <command>lease4-wipe</command> is:
-<screen>{
-  "command": "lease4-wipe",
-  "arguments": {
-    "subnet-id": 44
-  }
-}</screen>
-          </para>
-
-          <para>An example of <command>lease6-wipe</command> is:
-<screen>{
-  "command": "lease6-wipe",
-  "arguments": {
-    "subnet-id": 66
-  }
-}</screen>
-          </para>
-
-          <para>The commands return a text description of the
-          number of leases removed, plus the status code 0 (success) if any
-          leases were removed or 2 (empty) if there were no
-          leases. Status code 1 (error) may be returned if the
-          parameters are incorrect or some other exception is
-          encountered.</para>
-
-          <para>Subnet-id 0 has a special meaning; it tells Kea to
-          delete leases from all configured subnets. Also, the
-          subnet-id parameter may be omitted. If not specified, leases
-          from all subnets are wiped.</para>
-
-          <para>Note: not all backends support this command.</para>
-        </section>
-      </section>
-    </section>
diff --git a/doc/guide/hooks-radius.xml b/doc/guide/hooks-radius.xml
deleted file mode 100644 (file)
index 5aa8091..0000000
+++ /dev/null
@@ -1,620 +0,0 @@
-<!--
- - Copyright (C) 2018-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
- -
- - This license applies to the documentation itself, not the software.
--->
-
-<!-- need this include to make the &keaversion; macro work -->
-<!DOCTYPE book [
-<!ENTITY % keaversion SYSTEM "version.ent">
-%keaversion;
-]>
-
-<section xml:id="hooks-radius">
-  <title>radius: RADIUS Server Support</title>
-  <para>
-    The RADIUS hook library allows Kea to interact with two types of
-    RADIUS servers: access and accounting. Although the most common
-    DHCP and RADIUS integration is done on the DHCP relay-agent level
-    (DHCP clients send DHCP packets to DHCP relays; those relays contact
-    the RADIUS server and depending on the response either send the packet
-    to the DHCP server or drop it), it does require DHCP relay
-    hardware to support RADIUS communication. Also, even if the relay
-    has the necessary support, it is often not flexible enough to send and
-    receive additional RADIUS attributes. As such, the alternative
-    looks more appealing: to extend the DHCP server to talk to RADIUS
-    directly. That is the goal this library intends to fulfill.
-
-    <note>
-      <para>This library may only be loaded by the <command>kea-dhcp4</command>
-      or the <command>kea-dhcp6</command> process.
-      </para>
-    </note>
-  </para>
-  <para>
-    The major feature of the hook library is the ability to use RADIUS
-    authorization. When a DHCP packet is received, the Kea server
-    sends an Access-Request to the RADIUS server and waits for
-    a response. The server then sends back either an Access-Accept
-    with specific client attributes, or an Access-Reject. There are two
-    cases supported here: first, the Access-Accept includes a
-    Framed-IP-Address (for DHCPv4) or Framed-IPv6-Address (for
-    DHCPv6), which will be interpreted by Kea as an instruction to
-    assign that specified IPv4 or IPv6 address. This effectively
-    means RADIUS can act as an address-reservation database.
-  </para>
-  <para>
-    The second case supported is the ability to assign clients to
-    specific pools based on a RADIUS response. In this case, the RADIUS
-    server sends back an Access-Accept with Framed-Pool (IPv4) or
-    Framed-IPv6-Pool (IPv6). In both cases, Kea interprets those
-    attributes as client classes. With the addition of the
-    ability to limit access to pools to specific classes (see <xref
-    linkend="classification-pools"/>), RADIUS can be used to force the client
-    to be assigned a dynamic address from a specific pool. Furthermore,
-    the same mechanism can be used to control what kind of options the
-    client will get if there are DHCP options specified for a
-    particular class.
-  </para>
-
-  <section id="hooks-radius-install">
-    <title>Compilation and Installation of the RADIUS Hook</title>
-    <para>
-      The following section describes how to compile and install the
-      software on CentOS 7.0. Other systems may differ slightly.
-    </para>
-
-    <para>
-      STEP 1: Install dependencies
-    </para>
-    <para>
-      Several tools are needed to build dependencies and Kea
-      itself. The following commands should install them:
-<screen>
-$ sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
-$ sudo yum install gcc-g++ openssl-devel log4cplus-devel wget git
-</screen>
-    </para>
-
-    <para>
-      STEP 2: FreeRADIUS installation
-    </para>
-      <para>
-      The Kea RADIUS hook library uses the FreeRADIUS client library to
-      conduct RADIUS communication. Unfortunately, the standard
-      1.1.7 release available from the project website
-      <uri xmlns:xlink="http://www.w3.org/1999/xlink"
-           xlink:href="http://freeradius.org/sub_projects/">http://freeradius.org/sub_projects/</uri>
-      has several serious deficiencies; ISC engineers observed a segmentation
-      fault during testing. Also, the base version of the library does
-      not offer asynchronous transmissions, which are essential for
-      effective accounting implementation. Both of these issues
-      were addressed by ISC engineers, and the changes have been
-      reported to the FreeRADIUS client project. Acceptance of those
-      changes is outside of ISC's control, so until those
-      are processed, it is strongly recommended to use the FreeRADIUS
-      client with ISC's patches. To download and compile this version, please use
-      the following steps:
-<screen>
-$ git clone https://github.com/fxdupont/freeradius-client.git
-$ cd freeradius-client/
-$ git checkout iscdev
-$ ./configure
-$ make
-$ sudo make install
-</screen>
-
-      You may pass additional parameters to the configure script, if you need
-      to. Once installed, the FreeRADIUS client will be installed in
-      /usr/local. This is the default path where Kea will be looking for
-      it. You may install it in a different directory; if you choose to do
-      so, make sure you add that path to the configure script when compiling Kea.
-      </para>
-
-      <para>
-        STEP 3: Install recent BOOST version
-      </para>
-
-      <para>
-        Kea requires a reasonably recent Boost version. Unfortunately,
-        the version available in CentOS 7 is too old, so a
-        newer Boost version is necessary. Furthermore, CentOS 7 has an
-        old version of the g++ compiler that does not handle the latest Boost
-        versions. Fortunately, Boost 1.65 meets both requirements; it is both
-        recent enough for Kea and able to be compiled using
-        the g++ 4.8 version in CentOS.
-      </para>
-      <para>
-        To download and compile Boost 1.65, please use the following
-        commands:
-<screen>
-$ wget -nd https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz
-$ tar zxvf boost_1_65_1.tar.gz
-$ cd boost_1_65_1/
-$ ./bootstrap.sh
-$ ./b2 --without-python
-$ sudo ./b2 install
-</screen>
-        Note that the b2 script may optionally take extra parameters; one
-        of them specifies the destination path where the sources are to
-        be compiled.
-      </para>
-
-      <para>
-        STEP 4: Compile and install Kea
-      </para>
-
-      <para>
-        Obtain the Kea sources either by downloading them from the git repository or extracting the tarball:
-<screen>
-# Use one of those commands to obtain the Kea sources:
-
-# Choice 1: get from github
-$ git clone https://github.com/isc-projects/kea
-
-# Get a tarball and extract it
-$ tar zxvf kea-&keaversion;.tar.gz
-</screen>
-
-The next step is to extract the premium Kea package that contains the RADIUS repository
-into the Kea sources. After the tarball is extracted, the Kea sources should have
-a premium/ subdirectory.
-
-<screen>
-  $ cd kea
-  $ tar zxvf ../kea-premium-radius-&keaversion;.tar.gz
-</screen>
-
-Once this is done, verify that the Kea sources look similar to this:
-<screen>
-$ ls -l
-total 952
--rw-r--r--   1 thomson  staff    6192 Apr 25 17:38 AUTHORS
--rw-r--r--   1 thomson  staff   29227 Apr 25 17:38 COPYING
--rw-r--r--   1 thomson  staff  360298 Apr 25 20:00 ChangeLog
--rw-r--r--   1 thomson  staff     645 Apr 25 17:38 INSTALL
--rw-r--r--   1 thomson  staff    5015 Apr 25 17:38 Makefile.am
--rw-r--r--   1 thomson  staff     587 Apr 25 17:38 README
--rw-r--r--   1 thomson  staff   62323 Apr 25 17:38 configure.ac
-drwxr-xr-x  12 thomson  staff     408 Apr 26 19:04 doc
-drwxr-xr-x   7 thomson  staff     238 Apr 25 17:38 examples
-drwxr-xr-x   5 thomson  staff     170 Apr 26 19:04 ext
-drwxr-xr-x   8 thomson  staff     272 Apr 26 19:04 m4macros
-drwxr-xr-x  20 thomson  staff     680 Apr 26 11:22 <userinput>premium</userinput>
-drwxr-xr-x  10 thomson  staff     340 Apr 26 19:04 src
-drwxr-xr-x  14 thomson  staff     476 Apr 26 19:04 tools
-</screen>
-
-The makefiles must be regenerated using autoreconf.</para>
-
-<para>The next step is to configure Kea, and there are several essential steps necessary here.
-Running autoreconf -if is necessary to compile the premium package that contains
-RADIUS. Also, the --with-freeradius option is necessary to tell Kea where the FreeRADIUS
-client sources can be found. Also, since the non-standard Boost is used, the path
-to it must be specified.</para>
-
-<screen>
-$ autoreconf -i
-$ ./configure --with-freeradius=/path/to/freeradius --with-boost-include=/path/to/boost --with-boost-lib-dir=/path/to/boost/state/lib
-</screen>
-
-<para>
-For example, assuming the FreeRADIUS client was installed in the default directory (/usr/local)
-and the Boost 1.65 sources were compiled in /home/thomson/devel/boost1_65_1, the configure path
-should look as follows:</para>
-
-<screen>
-./configure --with-freeradius=/usr/local \
-            --with-boost-include=/home/thomson/devel/boost_1_65_1 \
-            --with-boost-lib-dir=/home/thomson/devel/boost_1_65_1/stage/lib
-</screen>
-
-<para>
-  After some checks, the configure script should print a report similar to the
-  following:
-
-<screen>
-
-       Kea source configure results:
-    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-
-Package:
-  Name:              kea
-  Version:           &keaversion;
-  Extended version:  &keaversion; (tarball)
-  OS Family:         Linux
-
-  Hooks directory:   /usr/local/lib/kea/hooks
-  Premium hooks:     yes
-  Included Hooks:    forensic_log flex_id host_cmds subnet_cmds radius host_cache
-
-C++ Compiler:
-  CXX:             g++ --std=c++11
-  CXX_VERSION:     g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)
-  CXX_STANDARD:    201103
-  DEFS:            -DHAVE_CONFIG_H
-  CPPFLAGS:         -DOS_LINUX  -DBOOST_ASIO_HEADER_ONLY
-  CXXFLAGS:        -g -O2
-  LDFLAGS:          -lpthread
-  KEA_CXXFLAGS:     -Wall -Wextra -Wnon-virtual-dtor -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -pthread -Wno-missing-field-initializers -fPIC
-
-Python:
-  PYTHON_VERSION:  not needed (because kea-shell is disabled)
-
-Boost:
-  BOOST_VERSION:   1.65.1
-  BOOST_INCLUDES:  -I/home/thomson/devel/boost_1_65_1
-  BOOST_LIBS:      -L/home/thomson/devel/boost_1_65_1/stage/lib  -lboost_system
-
-OpenSSL:
-  CRYPTO_VERSION:  OpenSSL 1.0.2k  26 Jan 2017
-  CRYPTO_CFLAGS:
-  CRYPTO_INCLUDES:
-  CRYPTO_LDFLAGS:
-  CRYPTO_LIBS:     -lcrypto
-
-Botan: no
-
-Log4cplus:
-  LOG4CPLUS_VERSION:  1.1.3
-  LOG4CPLUS_INCLUDES: -I/usr/include
-  LOG4CPLUS_LIBS:     -L/usr/lib -L/usr/lib64 -llog4cplus
-
-Flex/bison:
-  FLEX:  flex
-  BISON: bison -y
-
-MySQL:
-  no
-
-PostgreSQL:
-  no
-
-Cassandra CQL:
-  no
-Google Test:
-  no
-Google Benchmark:
-  no
-
-FreeRADIUS client:
-  FREERADIUS_INCLUDE:    -I/usr/local/include
-  FREERADIUS_LIB:        -L/usr/local/lib -lfreeradius-client
-  FREERADIUS_DICTIONARY: /usr/local/etc/radiusclient/dictionary
-
-Developer:
-  Enable Debugging:       no
-  Google Tests:           no
-  Valgrind:               not found
-  C++ Code Coverage:      no
-  Logger checks:          no
-  Generate Documentation: no
-  Parser Generation:      no
-  Kea-shell:              no
-  Perfdhcp:               no
-</screen>
-</para>
-
-<para>
-Please make sure that your compilation has the following:
-
-<itemizedlist>
-  <listitem>RADIUS listed in Included Hooks;</listitem>
-  <listitem>FreeRADIUS client directories printed and pointing to the right
-  directories;</listitem>
-  <listitem>Boost version at least 1.65.1. The versions available
-  in CentOS 7 (1.48 and and 1.53) are too old.</listitem>
-</itemizedlist>
-
-</para>
-
-<para>
-  Once your configuration is complete, compile Kea using make. If your system has
-  more than one core, it is recommended that you use the "-j N" option to speed up the build.
-  <screen>
-    $ make -j5
-    $ sudo make install</screen>
-
-      </para>
-  </section>
-
-
-  <section id="hooks-radius-config">
-    <title>RADIUS Hook Configuration</title>
-
-    <para>
-      The RADIUS hook is a library that has to be loaded by either DHCPv4 or
-      DHCPv6 Kea servers. Unlike some other available hook libraries, this one
-      takes many parameters. For example, this configuration
-      could be used:
-
-<screen>
-  "Dhcp4": {
-
-  // Your regular DHCPv4 configuration parameters here.
-
-  "hooks-libraries": [
-  {
-      // Note that RADIUS requires host-cache for proper operation,
-      // so that library is loaded as well.
-      "library": "/usr/local/lib/kea/hooks/libdhcp_host_cache.so"
-  },
-  {
-      "library": "/usr/local/lib/kea/hooks/libdhc_radius.so",
-      "parameters": {
-
-          // Specify where FreeRADIUS dictionary could be located
-          "dictionary": "/usr/local/etc/freeradius/dictionary",
-
-          // Specify which address to use to communicate with RADIUS servers
-          "bindaddr": "*",
-
-          // more RADIUS parameters here
-      }
-  } ]</screen>
-    </para>
-
-    <para>
-      RADIUS is a complicated environment. As such, it's not really possible
-      to provide a default configuration that would work out of the box.
-      However, we do have one example that showcases some of the more
-      common features. Please see doc/examples/kea4/hooks-radius.json in your
-      Kea sources.
-    </para>
-
-    <para>
-      The RADIUS hook library supports the following global configuration
-      flags, which correspond to FreeRADIUS client library options:
-
-      <itemizedlist>
-
-        <listitem><simpara><command>bindaddr</command> (default "*") specifies
-        the address to be used by the hook library in communication with RADIUS
-        servers. The "*" special value tells the kernel to choose
-        the address.</simpara></listitem>
-
-      <listitem><simpara><command>canonical-mac-address</command> (default
-      false) specifies whether MAC addresses in attributes follow the canonical
-      RADIUS format (lowercase pairs of hexadecimal digits separated by
-      '-').</simpara></listitem>
-
-      <listitem><simpara><command>client-id-pop0</command> (default false), used
-      with flex-id, removes the leading zero (or pair of zeroes in DHCPv6) type in
-      client-id (aka duid in DHCPv6). Implied by
-      client-id-printable.</simpara></listitem>
-
-      <listitem><simpara><command>client-id-printable</command> (default false)
-      checks whether the client-id/duid content is printable and uses it as is
-      instead of in hexadecimal. Implies client-id-pop0 and extract-duid as 0
-      and 255 are not printable.</simpara></listitem>
-
-      <listitem><simpara><command>deadtime</command> (default 0) is a mechanism
-      to try unresponsive servers after responsive servers. Its value
-      specifies the number of seconds after which a server is considered not to have answered,
-      so 0 disables the mechanism. As the asynchronous communication does not
-      use locks or atomics, it is recommended that you do not use this feature when running in this mode.</simpara></listitem>
-
-      <listitem><simpara><command>dictionary</command> (default set by configure
-      at build time) is the attribute and value dictionary. Note that it is a
-      critical parameter.</simpara></listitem>
-
-      <listitem><simpara><command>extract-duid</command> (default true) extracts
-      the embedded duid from an RFC 4361-compliant DHCPv4 client-id. Implied by
-      client-id-printable.</simpara></listitem>
-
-      <listitem><simpara><command>identifier-type4</command> (default client-id)
-      specifies the identifier type to build the User-Name attribute. It should
-      be the same as the host identifier, and when the flex-id hook library is
-      used the replace-client-id must be set to true; client-id will be used
-      with client-id-pop0. </simpara></listitem>
-
-      <listitem><simpara><command>identifier-type6</command> (default duid)
-      specifies the identifier type to build the User-Name attribute. It should
-      be the same as the host identifier, and when the flex-id hook library is
-      used the replace-client-id must be set to true; duid will be used with
-      client-id-pop0.</simpara></listitem>
-
-      <listitem><simpara><command>realm</command> (default "") is the default
-      realm.</simpara></listitem>
-
-      <listitem><simpara><command>reselect-subnet-address</command> (default
-      false) uses the Kea reserved address/RADIUS Framed-IP-Address or
-      Framed-IPv6-Address to reselect subnets where the address is not in
-      the subnet range.</simpara></listitem>
-
-      <listitem><simpara><command>reselect-subnet-pool</command> (default
-      false) uses the Kea client-class/RADIUS Frame-Pool to reselect
-      subnets where no available pool can be found.</simpara></listitem>
-
-      <listitem><simpara><command>retries</command> (default 3) is the number of
-      retries before trying the next server. Note that it is not supported for
-      asynchronous communication.</simpara></listitem>
-
-      <listitem><simpara><command>session-history</command> (default "") is the
-      name of the file providing persistent storage for accounting session
-      history.</simpara></listitem>
-
-      <listitem><simpara><command>timeout</command> (default 10) is the number
-      of seconds during which a response is awaited.</simpara></listitem>
-      </itemizedlist>
-
-    </para>
-
-    <para> When <command>reselect-subnet-pool</command> or
-    <command>reselect-subnet-address</command> is set to true at the
-    reception of RADIUS Access-Accept, the selected subnet is checked
-    against the client-class name or the reserved address; if it does
-    not match, another subnet is selected among matching subnets.
-    </para>
-
-    <para>
-      Two services are supported:
-      <itemizedlist>
-        <listitem><simpara><command>access</command> - the authentication service </simpara></listitem>
-        <listitem><simpara><command>accounting</command> - the accounting service</simpara></listitem>
-      </itemizedlist>
-    </para>
-
-    <para>
-      Configuration of services is divided into two parts:
-      <itemizedlist>
-        <listitem>
-          <simpara>servers that define RADIUS servers the library is expected to
-          contact. Each server may have the following items specified:</simpara>
-          <itemizedlist>
-
-            <listitem><simpara><command>name</command>, which specifies the IP
-            address of the server (it is possible to use a name which will be
-            resolved, but it is not recommended).</simpara></listitem>
-
-            <listitem><simpara><command>port</command> (default RADIUS
-            authentication or accounting service), which specifies the UDP port
-            of the server. Note that the FreeRADIUS client library by default
-            uses ports 1812 (authorization) and 1813 (accounting). Some server implementations
-            use 1645 (authorization) and 1646 (accounting). You may use the "port" parameter to
-            adjust as needed.</simpara></listitem>
-
-            <listitem><simpara><command>secret</command>, which authenticates
-            messages.</simpara></listitem>
-
-          </itemizedlist>
-          <simpara>There may be up to eight servers. Note that when no server is
-          specified, the service is disabled.</simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>attributes which define additional information that
-          the Kea server will send to a RADIUS server. The parameter
-          must be identified either by a name or type. Its value can
-          be specified in one of three possible ways: data (which
-          defines a plain text value), raw (which defines the value in
-          hex), or expr (which defines an expression, which will be
-          evaluated for each incoming packet independently).
-          </simpara>
-          <itemizedlist>
-            <listitem><simpara><command>name</command> of the
-            attribute.</simpara></listitem>
-
-            <listitem><simpara><command>type</command> of the attribute. Either the type
-            or the name must be provided, and the attribute must be defined in the dictionary.</simpara></listitem>
-
-            <listitem><simpara><command>data</command> is the first of three
-            ways to specify the attribute content. The data entry is parsed by
-            the FreeRADIUS library, so values defined in the dictionary of the
-            attribute may be used.</simpara></listitem>
-
-            <listitem><simpara><command>raw</command> is the second of three
-            ways to specify the attribute content; it specifies the content in
-            hexadecimal. Note that it does not work with integer-content attributes
-            (date, integer, and IPv4 address); a string-content attribute
-            (string, IPv6 address, and IPv6 prefix) is
-            required.</simpara></listitem>
-
-            <listitem><simpara><command>expr</command> is the last way to
-            specify the attribute content. It specifies an evaluation expression
-            which must return a not-empty string when evaluated with the DHCP
-            query packet. Currently this is restricted to the access
-            service. </simpara></listitem>
-          </itemizedlist>
-        </listitem>
-      </itemizedlist>
-    </para>
-<para>
-  For example, to specify a single access server available on localhost that
-  uses "xyz123" as a secret, and tell Kea to send three additional attributes
-  (Password, Connect-Info, and Configuration-Token), the following snippet could
-  be used:
-  <screen>
-"parameters": {
-
-    // Other RADIUS parameters here
-
-    "access": {
-
-        // This starts the list of access servers
-        "servers": [
-        {
-            // These are parameters for the first (and only) access server
-            "name": "127.0.0.1",
-            "port": 1812,
-            "secret": "xyz123"
-        }
-        // Additional access servers could be specified here
-        ],
-
-        // This defines a list of additional attributes Kea will send to each
-        // access server in Access-Request.
-        "attributes": [
-        {
-            // This attribute is identified by name (must be present in the
-            // dictionary) and has static value (i.e. the same value will be
-            // sent to every server for every packet)
-            "name": "Password",
-            "data": "mysecretpassword"
-        },
-        {
-            // It's also possible to specify an attribute using its type,
-            // rather than a name. 77 is Connect-Info. The value is specified
-            // using hex. Again, this is a static value. It will be sent the
-            // same for every packet and to every server.
-            "type": 77,
-            "raw": "65666a6a71"
-        },
-        {
-            // This example shows how an expression can be used to send dynamic
-            // value. The expression (see Section 13) may take any value from
-            // the incoming packet or even its metadata (e.g. the interface
-            // it was received over from)
-            "name": "Configuration-Token",
-            "expr": "hexstring(pkt4.mac,':')"
-        }
-        ] // End of attributes
-    } // End of access
-
-    // Accounting parameters.
-    "accounting": {
-        // This starts the list of accounting servers
-        "servers": [
-        {
-            // These are parameters for the first (and only) accounting server
-            "name": "127.0.0.1",
-            "port": 1813,
-            "secret": "sekret"
-        }
-        // Additional accounting servers could be specified here
-        ]
-    }
-
-}
-</screen>
-</para>
-
-<para>For the RADIUS hook library to operate properly in DHCPv4, it is necessary
-to also load the Host Cache hook library. The reason for this is somewhat
-complex. In a typical deployment, the DHCP clients send their packets via
-DHCP relay which inserts certain Relay Agent Information options, such as
-circuit-id or remote-id. The values of those options are then used by the
-Kea DHCP server to formulate the necessary attributes in the Access-Request message
-sent to the RADIUS server. However, once the DHCP client gets its address, it
-then renews by sending packets directly to the DHCP server. As a result, the
-relays are not able to insert their RAI options and the DHCP server can't send the
-Access-Request queries to the RADIUS server by using just the information from
-incoming packets. Kea needs to keep the information received during the initial
-Discover/Offer exchanges and use it again later when sending accounting
-messages.</para>
-
-<para>This mechanism is implemented based on user context in host reservations.
-(See <xref linkend="user-context"/> for details about user context). The host
-cache mechanism allows the information retrieved by RADIUS to be
-stored and later used for sending accounting and access queries to the RADIUS
-server. In other words, the host-cache mechanism is mandatory, unless you
-do not want RADIUS communication for messages other than
-Discover and the first Request from each client.</para>
-
-</section>
-
-</section>
diff --git a/doc/guide/hooks-stat-cmds.xml b/doc/guide/hooks-stat-cmds.xml
deleted file mode 100644 (file)
index 6cce835..0000000
+++ /dev/null
@@ -1,258 +0,0 @@
-<section xml:id="hooks-stat-cmds">
-  <title>stat_cmds: Supplemental Statistics Commands</title>
-  <para>
-    This library provides additional commands for
-    retrieving lease statistics from Kea DHCP servers. These commands
-    were added to address an issue with obtaining accurate lease
-    statistics in deployments running multiple Kea servers that use a
-    shared lease backend. The in-memory statistics kept by individual
-    servers only track lease changes made by that server; thus, in a
-    deployment with multiple servers (e.g. two kea-dhcp6 servers using the
-    same PostgreSQL database for lease storage), these statistics are incomplete.
-    The MySQL and PostgreSQL backends in Kea track
-    lease allocation changes as they occur via database triggers. Additionally,
-    all four lease backends were extended to support retrieving lease
-    statistics for all subnets, a single subnet, or a range of subnets.
-    Finally, this library was constructed to provide commands for retrieving
-    these statistics.
-
-    <note>
-      <para>This library may only be loaded by the <command>kea-dhcp4</command>
-      or the <command>kea-dhcp6</command> process.
-      </para>
-    </note>
-  </para>
-
-  <para>
-    The commands currently provided by this library are:
-  <itemizedlist>
-    <listitem>
-      <para><command>stat-lease4-get</command> - fetches DHCPv4 lease statistics</para>
-    </listitem>
-    <listitem>
-      <para><command>stat-lease6-get</command> - fetches DHCPv6 lease statistics</para>
-    </listitem>
-  </itemizedlist>
-  </para>
-
-  <para>
-    The Stat commands library is part of the open source code and is
-    available to every Kea user.
-  </para>
-
-  <para>
-    All commands use JSON syntax and can be issued directly to
-    the servers via either the control channel (see <xref linkend="ctrl-channel"/>)
-    or the Control Agent (see <xref linkend="kea-ctrl-agent"/>).
-  </para>
-
-  <para>
-    This library may be loaded by both kea-dhcp4 and kea-dhcp6 servers.
-    It is loaded in the same way as other libraries and currently has
-    no parameters:
-  </para>
-<para>
-<screen>
-"Dhcp6": { <userinput>
-    "hooks-libraries": [
-        {
-            "library": "/path/libdhcp_stat_cmds.so"
-        }
-        ...
-    ] </userinput>
-}
-</screen>
-</para>
-
-  <para>
-    In a deployment with multiple Kea DHCP servers sharing a common lease
-    storage, it may be loaded by any or all of the servers. However, one
-    thing to keep in mind is that a server's response to a stat-lease{4/6}-get
-    command will only contain data for subnets known to that server. In
-    other words, if a subnet does not appear in a server's configuration, Kea
-    will not retrieve statistics for it.
- </para>
-
-<section id="command-stat-lease4-get">
-  <title>stat-lease4-get, stat-lease6-get Commands</title>
-    <para id="command-stat-lease6-get">
-      The <command>stat-lease4-get</command> and <command>stat-lease6-get</command>
-      commands fetch lease statistics for a range of known subnets. The
-      range of subnets is determined through the use of optional command
-      input parameters:
-      <itemizedlist>
-          <listitem>
-            <para><command>subnet-id</command> - The ID of the subnet for which
-            lease statistics should be fetched. Use this to get statistics for
-            a single subnet. If the subnet does not exist, the command result
-            code is 3 (i.e. CONTROL_RESULT_EMPTY).
-            </para>
-          </listitem>
-          <listitem>
-            <para><command>subnet-range</command> - A pair of subnet IDs which
-            describe an inclusive range of subnets for which statistics should
-            be retrieved. The range may include one or more IDs that correspond
-            to no subnet: in this case, the command will only output lease
-            statistics for those that exist. However, if the range does not
-            include any known subnets, the command result code is 3
-            (i.e. CONTROL_RESULT_EMPTY).
-            <itemizedlist>
-              <listitem>
-                <para><command>first-subnet-id</command> - The ID of the first
-                subnet in the range.</para>
-              </listitem>
-              <listitem>
-                <para><command>last-subnet-id</command> - The ID of the last
-                subnet in the range.</para>
-              </listitem>
-            </itemizedlist>
-            </para>
-          </listitem>
-        </itemizedlist>
-        The use of subnet-id and subnet-range are mutually exclusive.
-        If no parameters are given, the result will contain data for all
-        known subnets. Note that in configurations with large numbers of
-        subnets, this can result in a large response.
-    </para>
-    <para>
-      The following command fetches lease statistics for all known subnets from a kea-dhcp4 server:
-<screen>
-{
-  "command": "stat-lease4-get"
-}
-</screen>
-    </para>
-    <para>
-        The following command fetches lease statistics for subnet ID 10 from a kea-dhcp6 server:
-<screen>
-{
-  "command": "stat-lease6-get",
-  "arguments": {
-    "subnet-id" : 10
-  }
-}
-</screen>
-    </para>
-    <para>
-        The following command fetches lease statistics for all subnets with IDs in the range 10 through 50 from a kea-dhcp4 server:
-<screen>
-{
-  "command": "stat-lease4-get",
-  "arguments": {
-    "subnet-range" {
-      "first-subnet-id": 10,
-      "last-subnet-id": 50,
-    }
-  }
-}
-</screen>
-    </para>
-
-    <para>
-      The response to either command will contain three elements:
-      <itemizedlist>
-        <listitem>
-          <para><command>result</command> - a numeric value indicating the outcome of the
-          command where:
-          <itemizedlist>
-            <listitem><simpara><command>0</command> - the command was successful;</simpara></listitem>
-            <listitem><simpara><command>1</command> - an error occurred, an explanation will
-            be the "text" element;</simpara></listitem>
-            <listitem><simpara><command>2</command> - the fetch found no matching data</simpara></listitem>
-          </itemizedlist>
-          </para>
-        </listitem>
-        <listitem>
-          <para><command>text</command> - an explanation of the command outcome. When the command
-      succeeds it will contain the command name along with the number of rows returned.</para>
-        </listitem>
-        <listitem>
-          <para><command>arguments</command> - a map containing the data returned by the
-          command as the element "result-set", which is patterned after SQL statement responses:
-          <itemizedlist>
-            <listitem><para><command>columns</command> - a list of text column labels
-            The columns returned for DHCPv4 are:
-            <itemizedlist>
-              <listitem><simpara><command>subnet-id</command> - ID of the subnet.</simpara></listitem>
-              <listitem><simpara><command>total-addresses</command> - total number of addresses
-              available for DHCPv4 management in the subnet. In other words, this is the sum of all
-              addresses in all the configured pools in the subnet.</simpara></listitem>
-              <listitem><simpara><command>assigned-addresses</command> - number of addresses
-              in the subnet that are currently assigned to a client.</simpara></listitem>
-              <listitem><simpara><command>declined-addresses</command> - number of addresses
-              in the subnet that are currently declined and are thus unavailable for assignment.
-              </simpara></listitem>
-            </itemizedlist></para>
-            </listitem>
-          <listitem><para>The columns returned for DHCPv6 are:
-            <itemizedlist>
-              <listitem><simpara><command>subnet-id</command> - ID of the subnet.</simpara></listitem>
-              <listitem><simpara><command>total-nas</command> - number of NA addresses available
-              for DHCPv6 management in the subnet. In other words, this is the sum of all
-              the NA addresses in the all configured NA pools in the subnet.</simpara></listitem>
-              <listitem><simpara><command>assigned-nas</command> - number of NA addresses in a
-              the subnet that are currently assigned to a client.</simpara></listitem>
-              <listitem><simpara><command>declined-nas</command> - number of NA addresses that
-              are currently declined and are thus unavailable for assignment.</simpara></listitem>
-              <listitem><simpara><command>total-pds</command> - total number of prefixes available
-              of DHCPv6 management in the subnet. In other words, this is the sum of all prefixes
-              in all the configured prefix pools in the subnet.</simpara></listitem>
-              <listitem><simpara><command>assigned-pds</command> - number of prefixes in the subnet
-              that are currently assigned to a client.</simpara></listitem>
-            </itemizedlist></para>
-            </listitem>
-            <listitem><para><command>rows</command> - a list of rows, one per subnet ID. Each row
-            contains a data value corresponding to and in the same order as each column
-            listed in "columns" for a given subnet.
-            </para></listitem>
-            <listitem><para><command>timestamp</command> - textual date and time the data was fetched,
-            expressed as GMT.</para></listitem>
-          </itemizedlist>
-        </para>
-      </listitem>
-    </itemizedlist>
-  </para>
-  <para>
-      The response to a DHCPv4 command might look as follows:
-<screen>
-  {
-    "result": 0,
-    "text": "stat-lease4-get: 2 rows found",
-    "arguments": {
-      "result-set": {
-        "columns": [ "subnet-id", "total-addresses", "assigned-addresses", "declined-addresses" ]
-        "rows": [
-          [ 10, 256, 111, 0 ],
-          [ 20, 4098, 2034, 4 ]
-        ],
-      "timestamp": "2018-05-04 15:03:37.000000"
-      }
-    }
-  }
-</screen>
-    </para>
-    <para>
-      The response to a DHCPv6 command might look as follows (subnet 10 has no
-      prefix pools, subnet 20 has no NA pools, and subnet 30 has both NA and PD
-      pools):
-<screen>
-  {
-    "result": 0,
-    "text": "stat-lease6-get: 2 rows found",
-    "arguments": {
-      "result-set": {
-        "columns": [ "subnet-id", "total-nas", "assigned-nas", "declined-nas", "total-pds", "assigned-pds" ]
-        "rows": [
-          [ 10, 4096, 2400, 3, 0, 0],
-          [ 20, 0, 0, 0, 1048, 233 ]
-          [ 30, 256, 60, 0, 1048, 15 ]
-        ],
-      "timestamp": "2018-05-04 15:03:37.000000"
-      }
-    }
-  }
-</screen>
-    </para>
-
-</section>
-</section>
diff --git a/doc/guide/hooks.xml b/doc/guide/hooks.xml
deleted file mode 100644 (file)
index 52e0261..0000000
+++ /dev/null
@@ -1,2965 +0,0 @@
-<!--
- - Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/.
--->
-
-<!-- need this include to make the &keaversion; macro work -->
-<!DOCTYPE book [
-<!ENTITY % keaversion SYSTEM "version.ent">
-%keaversion;
-]>
-
-<!-- Converted by db4-upgrade version 1.1 -->
-<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="hooks-libraries">
-
-    <title>Hooks Libraries</title>
-    <section xml:id="hooks-libraries-introduction">
-      <title>Introduction</title>
-      <para>
-      Although Kea offers a lot of flexibility, there may be cases where
-      its behavior needs customization.  To accommodate this possibility,
-      Kea includes the idea of "Hooks".  This feature lets Kea load one
-      or more dynamically-linked libraries (known as "hooks libraries")
-      and, at various points in its processing ("hook points"), call
-      functions in them.  Those functions perform whatever custom
-      processing is required.
-      </para>
-      <para>
-        The hooks concept also allows keeping the core Kea code reasonably small
-        by moving features that some, but not all users find useful to external
-        libraries. People who don't need specific functionality simply don't
-        load the libraries.
-      </para>
-      <para>
-      Hooks libraries are loaded by individual Kea processes, not to
-      Kea as a whole.  This means (for example) that it is possible
-      to associate one set of libraries with the DHCP4 server and a
-      different set to the DHCP6 server.
-      </para>
-      <para>
-      Another point to note is that it is possible for a process to
-      load multiple libraries.  When processing reaches a hook point,
-      Kea calls the hooks library functions attached to it.  If multiple
-      libraries have attached a function to a given hook point, Kea calls
-      all of them, in the order in which the libraries are specified in
-      the configuration file. The order may be important: consult the
-      documentation of the libraries to see if this is the case.
-      </para>
-      <para>
-      The next section describes how to configure hooks libraries. If you
-      are interested in writing your own hooks library, information can be
-      found in the <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://jenkins.isc.org/job/Kea_doc/doxygen">Kea
-      Developer's Guide</link>.
-      </para>
-
-      <para>
-        Note that some libraries are available under different licenses.
-      </para>
-      <para>
-        Note that some libraries may require additional dependencies and/or
-        compilation switches to be enabled, e.g. Radius library introduced in
-        Kea 1.4 requires FreeRadius-client library to be present. If
-        --with-free-radius option is not specified, the Radius library will not
-        be built.
-      </para>
-    </section> <!-- end Introduction -->
-
-    <section>
-      <title>Installing Hook packages</title>
-
-      <note>
-        <simpara>The installation procedure has changed in 1.4.0. Kea 1.3.0 and
-        earlier needed special switches passed to configure script to detect the
-        hook libraries. Please see this KB article: <uri
-        xmlns:xlink="http://www.w3.org/1999/xlink"
-        xlink:href="https://kb.isc.org/article/AA-01587">https://kb.isc.org/article/AA-01587</uri>
-        .</simpara>
-      </note>
-
-      <para>Some hook packages are included in the base Kea sources. There is no
-      need to do anything special to compile or install them, they are covered
-      by the usual building and installation procedure. ISC also provides several
-      additional hooks in form of various packages. All of those packages follow
-      the same installation procedure that is similar to base Kea, but has
-      several additional steps. For your convenience, the whole procedure is
-      described here. Please refer to <xref linkend="installation"/> for general
-      overview.</para>
-
-      <para>
-        1. Download the package. You will receive detailed instructions how to
-        get it separately. This will be a file with a name similar to
-        kea-premium-&keaversion;.tar.gz. Your name may differ depending on which
-        package you got.
-      </para>
-
-      <para>
-        2. If you have the sources for the corresponding version of the
-        open-source Kea package still on your system (from when you installed
-        Kea), skip this step.  Otherwise extract the Kea source from the
-        original tarball you downloaded.  For example, if you downloaded Kea
-        &keaversion;., you should have a tarball called kea-&keaversion;.tar.gz on your
-        system. Unpack this tarball:
-
-<screen>
-$ <userinput>tar zxvf kea-&keaversion;.tar.gz</userinput>
-</screen>
-
-        This will unpack the tarball into the kea-&keaversion; subdirectory of your
-        current working directory.
-      </para>
-
-      <para>
-        3. Unpack the Kea premium tarball into the directory into which Kea was
-        unpacked. For example, assuming that you followed step 2 and that Kea
-        &keaversion; has been unpacked into a kea-&keaversion; subdirectory and that
-        the Kea premium tarball is in your current directory, the following steps will
-        unpack the premium tarball into the correct location:
-<screen>
-  $ <userinput>cd kea-&keaversion;</userinput>
-  $ <userinput>tar xvf ../kea-premium-&keaversion;.tar.gz</userinput>
-</screen>
-        Note that unpacking the Kea premium package will put the files into a
-        directory named premium. Regardless of the name of your package, the
-        directory will always be called premium, just its content may vary.
-      </para>
-
-      <para>
-        4. Run autoreconf tools. This step is necessary to update Kea's build
-        script to include additional directory. If this tool is not already
-        available on your system, you need to install automake and autoconf
-        tools. To generate configure script, please use:
-<screen>
-  $ <userinput>autoreconf -i</userinput>
-</screen>
-      </para>
-      <para>
-        5. Rerun configure, using the same configure options as you used when
-        originally building Kea. You can check if configure has detected the
-        premium package by inspecting the summary printed when it exits.  The
-        first section of the output should look something like:
-<screen>
-Package:
-  Name:            kea
-  Version:         &keaversion;
-  Extended version:&keaversion; (tarball)
-  OS Family:       Linux
-  Using GNU sed:   yes
-  Premium package: yes
-  Included Hooks:  forensic_log flex_id host_cmds
-</screen>
-
-The last line indicates which specific hooks were detected. Note that some
-hooks may require its own dedicated switches, e.g. radius hook requires
-extra switches for FreeRADIUS. Please consult later sections of this
-chapter for details.
-      </para>
-
-      <para>
-        6. Rebuild Kea
-<screen>
-  $ <userinput>make</userinput>
-</screen>
-If your machine has multiple CPU cores, interesting option to consider here
-is -j X, where X is the number of available cores.
-      </para>
-
-      <para>
-        7. Install Kea sources together with hooks:
-<screen>
-$ <userinput>sudo make install</userinput>
-</screen>
-      Note that as part of the installation procedure, the install script will
-      eventually venture into premium/ directory and will install additional
-      hook libraries and associated files.
-      </para>
-      <para>
-      The installation location of the hooks libraries depends whether you
-      specified --prefix parameter to the configure script. If you did not,
-      the default location will be /usr/local/lib/kea/hooks. You can verify the
-      libraries are installed properly with this command:
-<screen>
-$ <userinput>ls -l /usr/local/lib/kea/hooks/*.so</userinput>
-/usr/local/lib/kea/hooks/libdhcp_class_cmds.so
-/usr/local/lib/kea/hooks/libdhcp_flex_id.so
-/usr/local/lib/kea/hooks/libdhcp_host_cmds.so
-/usr/local/lib/kea/hooks/libdhcp_lease_cmds.so
-/usr/local/lib/kea/hooks/libdhcp_legal_log.so
-/usr/local/lib/kea/hooks/libdhcp_subnet_cmds.so
-</screen>
-      The exact list you see will depend on the packages you have.
-      If you specified directory via --prefix, the hooks libraries
-      will be located in {prefix directory}/lib/kea/hooks.
-      </para>
-    </section>
-
-    <section>
-      <title>Configuring Hooks Libraries</title>
-      <para>
-      The hooks libraries for a given process are configured using the
-      <command>hooks-libraries</command> keyword in the
-      configuration for that process. (Note that
-      the word "hooks" is plural).  The value of the keyword
-      is an array of map structures, each structure corresponding to a hooks
-      library.  For example, to set up two hooks libraries for the DHCPv4
-      server, the configuration would be:
-<screen>
-<userinput>"Dhcp4": {
-    :
-    "hooks-libraries": [
-        {
-            "library": "/opt/charging.so"
-        },
-        {
-            "library": "/opt/local/notification.so",
-            "parameters": {
-                "mail": "spam@example.com",
-                "floor": 13,
-                "debug": false,
-                "users": [ "alice", "bob", "charlie" ],
-                "languages": {
-                    "french": "bonjour",
-                    "klingon": "yl'el"
-                }
-            }
-        }
-    ]
-    :
-}</userinput>
-</screen>
-      </para>
-
-      <note><para>
-        This is a change to the syntax used in Kea 0.9.2 and earlier, where
-        hooks-libraries was a list of strings, each string being the name of
-        a library.  The change was made in Kea 1.0 to facilitate the
-        specification of library-specific parameters, a capability
-        available in Kea 1.1.0 onwards. Libraries should allow a parameter
-        entry where to put comments as it is done for many configuration
-        scopes with comment and user context.
-      </para></note>
-
-        <note>
-          <para>
-          The library reloading behavior has changed in Kea 1.1.0. Libraries are
-          reloaded, even if their list hasn't changed. Kea does that, because
-          the parameters specified for the library (or the files those
-          parameters point to) may have changed.
-          </para>
-        </note>
-
-      <para>
-        Libraries may have additional parameters. Those are not mandatory in the
-        sense that there may be libraries that don't require them. However, for
-        specific library there is often specific requirement for specify certain
-        set of parameters. Please consult the documentation for your library
-        for details. In the example above, the first library has no parameters.
-        The second library has five parameters, specifying mail (string
-        parameter), floor (integer parameter), debug (boolean parameter) and
-        even lists (list of strings) and maps (containing strings). Nested
-        parameters could be used if the library supports it. This topic is
-        explained in detail in the Hooks Developer's Guide in the "Configuring
-        Hooks Libraries" section.
-      </para>
-
-      <para>
-      Notes:
-        <itemizedlist mark="bullet">
-          <listitem><para>
-          The full path to each library should be given.
-          </para></listitem>
-          <listitem><para>
-          As noted above, order may be important - consult the documentation for
-          each library.
-          </para></listitem>
-          <listitem><para>
-          An empty list has the same effect as omitting the
-          <command>hooks-libraries</command> configuration element all together.
-          </para>
-          <note><para>
-          There is one case where this is not true: if Kea
-          is running with a configuration that contains a
-          <command>hooks-libraries</command> item, and that item is
-          removed and the configuration reloaded, the removal will be
-          ignored and the libraries remain loaded.  As a workaround,
-          instead of removing the <command>hooks-libraries</command>
-          item, change it to an empty list.  This will be fixed in a
-          future version of Kea.
-          </para></note>
-          </listitem>
-        </itemizedlist>
-      </para>
-      <para>
-      At the present time, only the kea-dhcp4 and kea-dhcp6 processes support
-      hooks libraries.
-      </para>
-    </section>
-
-    <section>
-      <title>Available Hooks Libraries</title>
-      <para>
-      As described above, the hooks functionality provides a way to customize
-      a Kea server without modifying the core code.  ISC has chosen to take
-      advantage of this feature to provide functions that may only be useful
-      to a subset of Kea users.  To this end ISC has created some hooks
-      libraries; these discussed in the following sections.
-      </para>
-
-      <note><para>
-      Some of these libraries will be available with the base code while others
-      will be shared with organizations supporting development of Kea
-      , possibly as a 'benefit' or 'thank you' for helping to sustain
-      the larger Kea project. If you would like to get access to those
-      libraries, please consider taking out a support contract: this includes
-      professional support, advance security notifications, input into our
-      roadmap planning, and many other benefits, while helping
-      making Kea sustainable in the long term.
-      </para></note>
-
-      <para>The following table provides a list of libraries currently available
-      from ISC. It is important to pay attention to which libraries may be loaded
-      by which Kea processes. It is a common mistake to configure the <command>
-      kea-ctrl-agent</command> process to load libraries that should, in fact,
-      be loaded by the <command>kea-dhcp4 </command> or <command>kea-dhcp6</command>
-      processes.  If a library from ISC doesn't work as expected, please make sure
-      that it has been loaded by the correct process per the table below.
-
-      <warning>
-        <para>
-          While the Kea Control Agent includes the "hooks" functionality,
-          (i.e. hooks libraries can be loaded by this process), none of ISC's
-          current hooks libraries should be loaded by the Control Agent.
-        </para>
-      </warning>
-
-        <table frame="all" xml:id="hook-libs">
-          <title>List of available hooks libraries</title>
-          <tgroup cols="3">
-          <colspec colname="name"/>
-          <colspec colname="avail"/>
-          <colspec colname="module"/>
-          <colspec colname="description"/>
-          <thead>
-            <row>
-              <entry>Name</entry>
-              <entry>Availability</entry>
-              <entry>Since</entry>
-              <entry>Load by process</entry>
-              <entry>Description</entry>
-            </row>
-          </thead>
-
-          <tbody>
-            <row>
-              <entry>user_chk</entry>
-              <entry>Kea sources</entry>
-              <entry>Kea 0.8</entry>
-              <entry>
-                <simplelist>
-                  <member>kea-dhcp4</member>
-                  <member>kea-dhcp6</member>
-                </simplelist>
-              </entry>
-              <entry>Reads known users list from a file. Unknown users
-              will be assigned a
-              lease from the last subnet defined in the configuration file,
-              e.g. to redirect them a captive portal. This demonstrates how an
-              external source of information can be used to influence the Kea
-              allocation engine. This hook is part of the Kea source code and is
-              available in the src/hooks/dhcp/user_chk directory.</entry>
-            </row>
-            <row>
-              <entry>Forensic Logging</entry>
-              <entry>Support customers</entry>
-              <entry>Kea 1.1.0</entry>
-              <entry>
-                <simplelist>
-                  <member>kea-dhcp4</member>
-                  <member>kea-dhcp6</member>
-                </simplelist>
-              </entry>
-              <entry>This library provides hooks that record a detailed log of
-              lease assignments and renewals into a set of log files. In many
-              legal jurisdictions companies, especially ISPs, must record
-              information about the addresses they have leased to DHCP
-              clients. This library is designed to help with that
-              requirement. If the information that it records is sufficient it
-              may be used directly. If your jurisdiction requires that you save
-              a different set of information, you may use it as a template or
-              example and create your own custom logging hooks.</entry>
-            </row>
-            <row>
-              <entry>Flexible Identifier</entry>
-              <entry>Support customers</entry>
-              <entry>Kea 1.2.0</entry>
-              <entry>
-                <simplelist>
-                  <member>kea-dhcp4</member>
-                  <member>kea-dhcp6</member>
-                </simplelist>
-              </entry>
-              <entry>Kea software provides a way to handle host reservations
-              that include addresses, prefixes, options, client classes and
-              other features. The reservation can be based on hardware address,
-              DUID, circuit-id or client-id in DHCPv4 and using hardware address
-              or DUID in DHCPv6. However, there are sometimes scenarios where the
-              reservation is more complex, e.g. uses other options that
-              mentioned above, uses part of specific options or perhaps even a
-              combination of several options and fields to uniquely identify a
-              client. Those scenarios are addressed by the Flexible Identifiers
-              hook application. It allows defining an expression, similar to
-              the one used in client classification,
-              e.g. substring(relay6[0].option[37],0,6). Each incoming packet is
-              evaluated against that expression and its value is then searched
-              in the reservations database.
-              </entry>
-            </row>
-            <row>
-              <entry>Host Commands</entry>
-              <entry>Support customers</entry>
-              <entry>Kea 1.2.0</entry>
-              <entry>
-                <simplelist>
-                  <member>kea-dhcp4</member>
-                  <member>kea-dhcp6</member>
-                </simplelist>
-              </entry>
-              <entry>Kea provides a way to store host reservations in a
-              database. In many larger deployments it is useful to be able to
-              manage that information while the server is running. This library
-              provides management commands for adding, querying and deleting
-              host reservations in a safe way without restarting the server.
-              In particular, it validates the parameters, so an attempt to
-              insert incorrect data, e.g. add a host with conflicting identifier
-              in the same subnet will be rejected. Those commands are
-              exposed via command channel (JSON over unix sockets) and Control
-              Agent (JSON over RESTful interface). Additional commands and
-              capabilities related to host reservations will be added in the
-              future.</entry>
-            </row>
-            <row>
-              <entry>Subnet Commands</entry>
-              <entry>Support customers</entry>
-              <entry>Kea 1.3.0</entry>
-              <entry>
-                <simplelist>
-                  <member>kea-dhcp4</member>
-                  <member>kea-dhcp6</member>
-                </simplelist>
-              </entry>
-              <entry>In deployments in which subnet configuration needs to
-              be frequently updated, it is a hard requirement that such updates be
-              performed without the need for a full DHCP server reconfiguration
-              or restart. This hooks library allows for incremental changes
-              to the subnet configuration such as: adding a subnet, removing
-              a subnet. It also allows for listing all available subnets and
-              fetching detailed information about a selected subnet. The
-              commands exposed by this library do not affect other subnets
-              or configuration parameters currently used by the server.
-              </entry>
-            </row>
-
-            <row>
-              <entry>Lease Commands</entry>
-              <entry>Kea sources</entry>
-              <entry>Kea 1.3.0</entry>
-              <entry>
-                <simplelist>
-                  <member>kea-dhcp4</member>
-                  <member>kea-dhcp6</member>
-                </simplelist>
-              </entry>
-              <entry>The lease commands hook library offers a number of new
-              commands used to manage leases. Kea provides a way to store lease
-              information in various backends: memfile, MySQL, PostgreSQL and
-              Cassandra. This library provides a unified interface that can
-              manipulate leases in an unified, safe way. In particular, it
-              allows: manipulate leases in memfile while Kea is running, sanity
-              check changes, check lease existence and remove all leases
-              belonging to specific subnet. It can also catch more obscure
-              errors, like adding a lease with subnet-id that does not exist in
-              the configuration or configuring a lease to use an address that is
-              outside of the subnet to which it is supposed to belong.
-              It provides a way to manage user contexts associated with leases.
-              </entry>
-            </row>
-
-            <row>
-              <entry>High Availability</entry>
-              <entry>Kea sources</entry>
-              <entry>Kea 1.4.0</entry>
-              <entry>
-                <simplelist>
-                  <member>kea-dhcp4</member>
-                  <member>kea-dhcp6</member>
-                </simplelist>
-              </entry>
-              <entry>Minimizing a risk of DHCP service unavailability is
-              achieved by setting up a pair of the DHCP servers in a network.
-              Two modes of operation are supported. The first one is called load
-              balancing and is sometimes referred to as active-active. Each
-              server can handle selected group of clients in this network or all
-              clients, if it detects that its partner has became unavailable.
-              It is also possible
-              to designate one server to serve all DHCP clients, and leave
-              another server as "standby". This mode is called hot standby and
-              is sometimes referenced to as active-passive. This server will
-              activate its DHCP function when it detects that its partner is not
-              available.  Such cooperation between the DHCP servers requires
-              that these servers constantly communicate with each other to send
-              updates about allocated leases and to periodically test whether
-              their partners are still operational. The hook library also
-              provides an ability to send lease updates to external backup
-              server, making it much easier to have a replacement that is almost
-              up to date. The "libdhcp_ha" library provides such functionality
-              for Kea DHCP servers.
-              </entry>
-            </row>
-            <row>
-              <entry>Statistics Commands</entry>
-              <entry>Kea sources</entry>
-              <entry>Kea 1.4.0</entry>
-              <entry>
-                <simplelist>
-                  <member>kea-dhcp4</member>
-                  <member>kea-dhcp6</member>
-                </simplelist>
-              </entry>
-              <entry>
-                The Statistics Commands library provides additional commmands
-                for retrieving accurate DHCP lease statistics for Kea DHCP
-                servers that share the same lease database. This setup is
-                common in deployments where DHCP service redundancy is required
-                and a shared lease database is used to avoid lease data
-                replication between the DHCP servers. A feature was introduced
-                in Kea 1.4.0 that allows tracking lease allocations within the
-                lease database, thus making the statistics accessible to all
-                connected DHCP servers. The Statistics Commands hooks library
-                utilizes this feature and returns lease statistics for all
-                subnets respectively.
-              </entry>
-            </row>
-            <row>
-              <entry>Radius</entry>
-              <entry>Support customers</entry>
-              <entry>Kea 1.4.0</entry>
-              <entry>
-                <simplelist>
-                  <member>kea-dhcp4</member>
-                  <member>kea-dhcp6</member>
-                </simplelist>
-              </entry>
-              <entry>The RADIUS Hook library allows Kea to interact with the
-              RADIUS servers using access and accounting mechanisms. The access
-              mechanism may be used for access control, assigning specific IPv4
-              or IPv6 addresses reserved by RADIUS, dynamically assigning
-              addresses from designated pools chosen by RADIUS or rejecting
-              the client's messages altogether. The accounting mechanism allows
-              RADIUS server to keep track of device activity over time.
-              </entry>
-            </row>
-            <row>
-              <entry>Host Cache</entry>
-              <entry>Support customers</entry>
-              <entry>Kea 1.4.0</entry>
-              <entry>
-                <simplelist>
-                  <member>kea-dhcp4</member>
-                  <member>kea-dhcp6</member>
-                </simplelist>
-              </entry>
-              <entry>Some of the database backends, such as RADIUS, are
-              considered slow and may take a long time to respond. Since Kea in
-              general is synchronous, the backend performance directly affects
-              the DHCP performance. To minimize the impact and improve
-              performance, the Host Cache library provides a way to cache
-              responses from other hosts. This includes negative caching,
-              i.e. the ability to remember that there is no client information
-              in the database.
-              </entry>
-            </row>
-            <row>
-              <entry>Class Commands</entry>
-              <entry>Support customers</entry>
-              <entry>Kea 1.5.0</entry>
-              <entry>
-                <simplelist>
-                  <member>kea-dhcp4</member>
-                  <member>kea-dhcp6</member>
-                </simplelist>
-              </entry>
-              <entry>This Class Cmds hooks library allows for adding, updating
-              deleting and fetching configured DHCP client classes without the
-              need to restart the DHCP server.
-              </entry>
-            </row>
-            <row>
-              <entry>MySQL Configuration Backend</entry>
-              <entry>Kea sources</entry>
-              <entry>Kea 1.6.0</entry>
-              <entry>
-                <simplelist>
-                  <member>kea-dhcp4</member>
-                  <member>kea-dhcp6</member>
-                </simplelist>
-              </entry>
-              <entry>The MySQL CB hooks library is an implementation of the Kea
-              Configuration Backend for MySQL. It uses MySQL database as a
-              repository for the Kea configuration information. The Kea servers
-              use this library to fetch their configurations.
-              </entry>
-            </row>
-            <row>
-              <entry>Configuration Backend Commands</entry>
-              <entry>Support customers</entry>
-              <entry>Kea 1.6.0</entry>
-              <entry>
-                <simplelist>
-                  <member>kea-dhcp4</member>
-                  <member>kea-dhcp6</member>
-                </simplelist>
-              </entry>
-              <entry>The Configuration Backend Commands (CB Commands) hooks library
-              implements a collection of commands to manage the configuration
-              information of the Kea servers in the database. This library may
-              only be used in conjuction with one of the supported configuration
-              backend implementations.
-              </entry>
-            </row>
-          </tbody>
-          </tgroup>
-          </table>
-      </para>
-      <para>
-        ISC hopes to see more hooks libraries become available as time
-        progresses, both developed internally and externally. Since
-        this list may evolve dynamically, we decided to keep it on a
-        wiki page, available at this link: <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://gitlab.isc.org/isc-projects/kea/wikis/Hooks-available">https://gitlab.isc.org/isc-projects/kea/wikis/Hooks-available</link>.
-        If you are a developer or are aware of any hooks libraries not
-        listed there, please send a note to the kea-users or kea-dev
-        mailing lists and someone will update it.
-      </para>
-      <para>
-        The libraries developed by ISC are described in detail in the following sections.
-      </para>
-      <section>
-        <title>user_chk: Checking User Access</title>
-        <para>
-          The user_chk library is the first hooks library published by ISC. It
-          attempts to serve several purposes:
-
-          <itemizedlist>
-            <listitem>
-              <para>To assign "new" or "unregistered" users to a
-              restricted subnet, while "known" or "registered" users are assigned
-              to unrestricted subnets.</para>
-            </listitem>
-            <listitem>
-              <para>To allow DHCP response options or vendor option
-              values to be customized based upon user identity. </para>
-            </listitem>
-            <listitem>
-              <para>To provide a real time record of the user registration
-              activity which can be sampled by an external consumer.</para>
-            </listitem>
-            <listitem>
-              <para> To serve as a demonstration of various capabilities
-              possible using the hooks interface.</para>
-            </listitem>
-          </itemizedlist>
-        </para>
-        <para>
-          Once loaded, the library allows segregating incoming requests into
-          known and unknown clients. For known clients, the packets are
-          processed mostly as usual, except it is possible to override certain
-          options being sent. That can be done on a per host basis. Clients
-          that are not on the known hosts list will be treated as unknown and
-          will be assigned to the last subnet defined in the configuration file.
-        </para>
-
-        <para>
-          As an example of use, this behavior may be used to put unknown users into a
-          separate subnet that leads to a walled garden, where they can only
-          access a registration portal. Once they fill in necessary data, their
-          details are added to the known clients file and they get a proper
-          address after their device is restarted.
-        </para>
-
-        <note><para>This library was developed several years before the host
-        reservation mechanism has become available. Currently host reservation is
-        much more
-        powerful and flexible, but nevertheless the user_chk capability to consult
-        and external source of information about clients and alter Kea's
-        behavior is useful and remains of educational value.
-        </para></note>
-
-        <para>
-          The library reads the /tmp/user_chk_registry.txt file while being
-          loaded and each time an incoming packet is processed. The file is expected
-          to have each line contain a self-contained JSON snippet which must
-          have the following two entries:
-
-          <itemizedlist>
-            <listitem><para><command>type</command>, whose value
-            is "HW_ADDR" for IPv4 users or "DUID" for IPv6
-            users</para></listitem>
-            <listitem><para><command>id</command>, whose value is
-            either the hardware address or the DUID from the request
-            formatted as a string of hex digits, with or without
-            ":" delimiters.</para></listitem>
-          </itemizedlist>
-
-and may have the zero or more of the following entries:
-
-          <itemizedlist>
-            <listitem><para><command>bootfile</command> whose value
-            is the pathname of the desired file</para></listitem>
-            <listitem><para><command>tftp_server</command> whose
-            value is the hostname or IP address of the desired
-            server</para></listitem>
-          </itemizedlist>
-
-          A sample user registry file is shown below:
-
-<screen>{ "type" : "HW_ADDR", "id" : "0c:0e:0a:01:ff:04", "bootfile" : "/tmp/v4bootfile" }
-{ "type" : "HW_ADDR", "id" : "0c:0e:0a:01:ff:06", "tftp_server" : "tftp.v4.example.com" }
-{ "type" : "DUID", "id" : "00:01:00:01:19:ef:e6:3b:00:0c:01:02:03:04", "bootfile" : "/tmp/v6bootfile" }
-{ "type" : "DUID", "id" : "00:01:00:01:19:ef:e6:3b:00:0c:01:02:03:06", "tftp_server" : "tftp.v6.example.com" }</screen>
-
-        </para>
-
-        <para>As with any other hooks libraries provided by ISC, internals of the
-        user_chk code are well documented. You can take a look at the  <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://jenkins.isc.org/job/Kea_doc/doxygen/d8/db2/libdhcp_user_chk.html">Kea Developer's Guide section dedicated to the user_chk library</link>
-        that discusses how the code works internally. That, together with
-        our general entries in <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://jenkins.isc.org/job/Kea_doc/doxygen">Hooks
-        Framework section</link> should give you some pointers how to extend
-        this library and perhaps even write your own from scratch.</para>
-
-      </section>
-      <section>
-        <title>legal_log: Forensic Logging Hooks</title>
-        <para>
-        This section describes the forensic log hooks library. This library
-        provides hooks that record a detailed log of lease assignments
-        and renewals into a set of log files.  Currently this library
-        is only available to ISC customers with a support contract.
-
-        <note>
-          <para>This library may only be loaded by <command>kea-dhcp4</command>
-          or <command>kea-dhcp6</command> process.
-          </para>
-        </note>
-        </para>
-        <para>
-        In many legal jurisdictions companies, especially ISPs, must record
-        information about the addresses they have leased to DHCP clients.
-        This library is designed to help with that requirement.  If the
-        information that it records is sufficient it may be used directly.
-        If your jurisdiction requires that you save a different set of
-        information you may use it as a template or example and create your
-        own custom logging hooks.
-        </para>
-        <para>
-        This logging is done as a set of hooks to allow it to be customized
-        to any particular need.  Modifying a hooks library is easier and
-        safer than updating the core code.  In addition by using the hooks
-        features those users who don't need to log this information can
-        leave it out and avoid any performance penalties.
-        </para>
-        <section>
-        <title>Log File Naming</title>
-          <para>
-          The names for the log files have the following form:
-          </para>
-<screen>
-path/base-name.CCYYMMDD.txt
-</screen>
-          <para>
-          The "path" and "base-name" are supplied in the
-          configuration as described below see
-          <xref linkend="forensic-log-configuration"/>.  The next part of the name is
-          the date the log file was started, with four digits for year, two digits
-          for month and two digits for day.  The file is rotated on a daily basis.
-          </para>
-          <note><para>
-          When running Kea servers for both DHCPv4 and DHCPv6 the log names must
-          be distinct.  See the examples in <xref linkend="forensic-log-configuration"/>.
-          </para></note>
-        </section>
-        <section>
-        <title>DHCPv4 Log Entries</title>
-          <para>
-          For DHCPv4 the library creates entries based on DHCPREQUEST messages
-          and corresponding DHCPv4 leases intercepted by lease4_select
-          (for new leases) and lease4_renew (for renewed leases) hooks.
-          </para>
-          <para>
-          An entry is a single string with no embedded end-of-line markers,
-          a prepended timestamp and has the following sections:
-<screen>
-timestamp address duration device-id {client-info} {relay-info} {user-context}
-</screen>
-          </para>
-          <para>
-          Where:
-          <itemizedlist>
-            <listitem><para>
-            timestamp - the current date and time the log entry was written
-            in "%Y-%m-%d %H:%M:%S %Z" strftime format ("%Z" is the time zone
-            name).
-            </para></listitem>
-            <listitem><para>
-            address - the leased IPv4 address given out and whether it was
-            assigned or renewed.
-            </para></listitem>
-            <listitem><para>
-            duration - the lease lifetime expressed in days (if present),
-            hours, minutes and seconds.  A lease lifetime of 0xFFFFFFFF will be
-            denoted with the text "infinite duration".
-            </para></listitem>
-            <listitem><para>
-            device-id - the client's hardware address shown as numerical type
-            and hex digit string.
-            </para></listitem>
-            <listitem><para>
-            client-info - the DHCP client id option (61) if present, shown as
-            a hex string.
-            </para></listitem>
-            <listitem><para>
-            relay-info - for relayed packets the giaddr and the RAI circuit-id,
-            remote-id and subscriber-id options (option 82 sub
-            options: 1, 2 and 6) if present.
-            The circuit id and remote id are presented as hex strings
-            </para></listitem>
-            <listitem><para>
-            user-context - the optional user context associated to the lease.
-            </para></listitem>
-          </itemizedlist>
-          </para>
-          <para>
-          For instance (line breaks added for readability, they would not
-          be present in the log file).
-<screen>
-2018-01-06 01:02:03 CET Address: 192.2.1.100 has been renewed for 1 hrs 52 min 15 secs to a device with hardware address:
-hwtype=1 08:00:2b:02:3f:4e, client-id: 17:34:e2:ff:09:92:54 connected via relay at address: 192.2.16.33,
-identified by circuit-id: 68:6f:77:64:79 and remote-id: 87:f6:79:77:ef
-</screen>
-        </para>
-        <para>
-        In addition to logging lease activity driven by DHCPv4 client traffic, it also
-        logs entries for the following lease management control channel commands:
-        lease4-add, lease4-update, and lease4-del.  Each entry is a single string
-        with no embedded end-of-line markers and they will typically have the following
-        forms:
-        </para>
-        <para>
-        <command>lease4-add:</command>
-<screen>
-*timestamp* Administrator added a lease of address: *address* to a device with hardware address: *device-id*
-</screen>
-        Dependent on the arguments of the add command, it may also include the
-        client-id and duration.
-        </para>
-        <para>
-        Example:
-<screen>
-2018-01-06 01:02:03 CET Administrator added a lease of address: 192.0.2.202 to a device with hardware address:
-1a:1b:1c:1d:1e:1f for 1 days 0 hrs 0 mins 0 secs
-</screen>
-        </para>
-        <para>
-        <command>lease4-update:</command>
-<screen>
-*timestamp* Administrator updated information on the lease of address: *address* to a device with hardware address: *device-id*
-</screen>
-        Dependent on the arguments of the update command, it may also include the
-        client-id and lease duration.
-        </para>
-        <para>
-        Example:
-<screen>
-2018-01-06 01:02:03 CET Administrator updated information on the lease of address: 192.0.2.202 to a device
-with hardware address: 1a:1b:1c:1d:1e:1f, client-id: 1234567890
-</screen>
-        </para>
-        <para>
-        <command>lease4-del:</command>
-        Deletes have two forms, one by address and one by identifier and identifier type:
-<screen>
-*timestamp* Administrator deleted the lease for address: *address*
-</screen>
-        or
-<screen>
-*timestamp* Administrator deleted a lease for a device identified by: *identifier-type* of *identifier*
-</screen>
-        Currently only a type of @b hw-address (hardware address) is supported.
-        </para>
-        <para>
-        Examples:
-<screen>
-2018-01-06 01:02:03 CET Administrator deleted the lease for address: 192.0.2.202
-
-2018-01-06 01:02:12 CET Administrator deleted a lease for a device identified by: hw-address of 1a:1b:1c:1d:1e:1f
-</screen>
-        </para>
-        </section>
-
-        <section>
-        <title>DHCPv6 Log Entries</title>
-          <para>
-          For DHCPv6 the library creates entries based on lease management
-          actions intercepted by the lease6_select (for new leases), lease6_renew
-          (for renewed leases) and lease6_rebind (for rebound leases).
-          </para>
-          <para>
-          An entry is a single string with no embedded end-of-line markers,
-          a prepended timestamp and has the following sections:
-<screen>
-timestamp address duration device-id {relay-info}* {user-context}
-</screen>
-          </para>
-          <para>
-          Where:
-          <itemizedlist>
-            <listitem><para>
-            timestamp - the current date and time the log entry was written
-            in "%Y-%m-%d %H:%M:%S %Z" strftime format ("%Z" is the time zone
-            name).
-            </para></listitem>
-            <listitem><para>
-            address - the leased IPv6 address or prefix given out and whether
-            it was assigned or renewed.
-            </para></listitem>
-            <listitem><para>
-            duration - the lease lifetime expressed in days (if present),
-            hours, minutes and seconds.  A lease lifetime of 0xFFFFFFFF will be
-            denoted with the text "infinite duration".
-            </para></listitem>
-            <listitem><para>
-            device-id - the client's DUID and hardware address (if present).
-            </para></listitem>
-            <listitem><para>
-            relay-info - for relayed packets the content of relay agent
-            messages, remote-id (code 37), subscriber-id (code 38) and
-            interface-id (code 18) options if present. Note that
-            interface-id option, if present, identifies the whole interface the
-            relay agent received the message on. This typically translates to a
-            single link in your network, but it depends on your specific network
-            topology. Nevertheless, this is useful information to better scope
-            down the location of the device, so it is being recorded, if present.
-            </para></listitem>
-            <listitem><para>
-            user-context - the optional user context associated to the lease.
-            </para></listitem>
-          </itemizedlist>
-          </para>
-          <para>
-          For instance (line breaks added for readability, they would not
-          be present in the log file).
-<screen>
-2018-01-06 01:02:03 PST Address:2001:db8:1:: has been assigned for 0 hrs 11 mins 53 secs
-to a device with DUID: 17:34:e2:ff:09:92:54 and hardware address: hwtype=1 08:00:2b:02:3f:4e
-(from Raw Socket) connected via relay at address: fe80::abcd for client on link address: 3001::1,
-hop count: 1, identified by remote-id: 01:02:03:04:0a:0b:0c:0d:0e:0f and subscriber-id: 1a:2b:3c:4d:5e:6f
-</screen>
-        </para>
-        <para>
-        In addition to logging lease activity driven by DHCPv6 client traffic, it also
-        logs entries for the following lease management control channel commands:
-        lease6-add, lease6-update, and lease6-del.  Each entry is a single string
-        with no embedded end-of-line markers and they will typically have the following
-        forms:
-        </para>
-        <para>
-        <command>lease6-add:</command>
-<screen>
-*timestamp* Administrator added a lease of address: *address* to a device with DUID: *DUID*
-</screen>
-        Dependent on the arguments of the add command, it may also include the hardware address and duration.
-        </para>
-        <para>
-        Example:
-<screen>
-2018-01-06 01:02:03 PST Administrator added a lease of address: 2001:db8::3 to a device with DUID:
-1a:1b:1c:1d:1e:1f:20:21:22:23:24 for 1 days 0 hrs 0 mins 0 secs
-</screen>
-        </para>
-        <para>
-        <command>lease6-update:</command>
-<screen>
-*timestamp* Administrator updated information on the lease of address: *address* to a device with DUID: *DUID*
-</screen>
-        Dependent on the arguments of the update command, it may also include the hardware address and lease duration.
-        </para>
-        <para>
-        Example:
-<screen>
-2018-01-06 01:02:03 PST Administrator updated information on the lease of address: 2001:db8::3 to a device with
-DUID: 1a:1b:1c:1d:1e:1f:20:21:22:23:24, hardware address: 1a:1b:1c:1d:1e:1f
-</screen>
-        </para>
-        <para>
-        <command>lease6-del:</command>
-        Deletes have two forms, one by address and one by identifier and identifier type:
-<screen>
-*timestamp* Administrator deleted the lease for address: *address*
-</screen>
-        or
-<screen>
-*timestamp* Administrator deleted a lease for a device identified by: *identifier-type* of *identifier*
-</screen>
-        Currently only a type of DUID is supported.
-        </para>
-        <para>
-Examples:
-<screen>
-2018-01-06 01:02:03 PST Administrator deleted the lease for address: 2001:db8::3
-
-2018-01-06 01:02:11 PST Administrator deleted a lease for a device identified by: duid of 1a:1b:1c:1d:1e:1f:20:21:22:23:24
-</screen>
-        </para>
-        </section>
-        <section xml:id="forensic-log-configuration">
-        <title>Configuring the Forensic Log Hooks</title>
-          <para>
-          To use this functionality the hook library must be included in the
-          configuration of the desired DHCP server modules. The legal_log
-          library is installed alongside the Kea libraries in
-          <filename>[kea-install-dir]/var/lib/kea</filename> where
-          <filename>kea-install-dir</filename> is determined by the
-          "--prefix" option of the configure script.  It defaults to
-          <filename>/usr/local</filename>.  Assuming the
-          default value then, configuring kea-dhcp4 to load the legal_log
-          library could be done with the following Kea4 configuration:
-<screen>
-"Dhcp4": { <userinput>
-    "hooks-libraries": [
-        {
-            "library": "/usr/local/lib/kea/hooks/libdhcp_legal_log.so",
-            "parameters": {
-                "path": "/var/lib/kea/log",
-                "base-name": "kea-forensic4"
-            }
-        },
-        ...
-    ] </userinput>
-}
-</screen>
-          </para>
-          <para>
-          To configure it for kea-dhcp6, the commands are simply as shown below:
-<screen>
-"Dhcp6": { <userinput>
-    "hooks-libraries": [
-        {
-            "library": "/usr/local/lib/kea/hooks/libdhcp_legal_log.so",
-            "parameters": {
-                "path": "/var/lib/kea/log",
-                "base-name": "kea-forensic6"
-            }
-        },
-        ...
-    ] </userinput>
-}
-</screen>
-          </para>
-          <para>
-          Two Hook Library parameters are supported:
-          <itemizedlist>
-            <listitem><para>
-            path - the directory in which the forensic file(s) will be written.  The
-            default value is
-            <filename>[prefix]/var/lib/kea</filename>.  The directory must exist.
-            </para></listitem>
-            <listitem><para>
-            base-name - an arbitrary value which is used in conjunction with
-            the current system date to form the current forensic file name.  It defaults
-            to <filename>kea-legal</filename>.
-            </para></listitem>
-          </itemizedlist>
-          </para>
-
-          <para>
-            If it is desired to restrict forensic logging to certain subnets, the
-            "legal-logging" boolean parameter can be specified within a user context of
-            these subnets. For example:
-<screen>
-"Dhcpv4" {
-    "subnet4": [
-        {
-            "subnet": "192.0.2.0/24",
-            "pools": [
-                {
-                     "pool": "192.0.2.1 - 192.0.2.200"
-                }
-            ],
-            <userinput>"user-context": {
-                "legal-logging": false
-            }</userinput>
-        }
-    ]
-}
-</screen>
-              disables legal logging for the subnet "192.0.2.0/24". If this parameter
-              is not specified, it defaults to 'true', which enables legal logging for
-              the subnet.
-          </para>
-
-          <para>
-            The following example demonstrates how to selectively disable legal logging
-            for an IPv6 subnet.
-<screen>
-"Dhcpv6": {
-    "subnet6": [
-        {
-            "subnet": "2001:db8:1::/64",
-            "pools": [
-                 {
-                     "pool": "2001:db8:1::1-2001:db8:1::ffff"
-                 }
-            ],
-            <userinput>"user-context": {
-                "legal-logging": false
-            }</userinput>
-        }
-    ]
-}
-</screen>
-          </para>
-
-          <para>
-            See <xref linkend="dhcp4-user-contexts"/> and <xref linkend="dhcp6-user-contexts"/>
-            to learn more about user contexts in Kea configuration.
-          </para>
-        </section>
-
-        <section id="forensic-log-database">
-        <title>Database backend</title>
-          <para>
-          Log entries can be inserted into a database when Kea is configured
-          with database backend support: a table named 'logs' is used with a
-          timestamp (timeuuid for Cassandra CQL) generated by the database
-          software and a text log with the same format than for files
-          without the timestamp.
-          </para>
-          <para>
-          Please refer to <xref linkend="mysql-database"/> for MySQL,
-          to <xref linkend="pgsql-database"/> for PostgreSQL or
-          to <xref linkend="cql-database"/> for Cassandra CQL.
-          The logs table is part of the Kea database schemas.
-          </para>
-          <para>
-          Configuration parameters are extended by standard lease database
-          parameters as defined in <xref linkend="database-configuration4"/>.
-          The "type" parameter should be "mysql", "postgresql",  "cql" or
-          be "logfile". When it is absent or set to "logfile" files are
-          used.
-          </para>
-          <para>
-          This database feature is experimental and will be likely
-          improved, for instance to add an address / prefix index (currently
-          the only index is the timestamp). No specific tools is provided
-          to operate the database but standard tools are applicable,
-          for instance to dump the logs table from a CQL database:
-<screen>
-$ <userinput>echo 'SELECT dateOf(timeuuid), log FROM logs;' | cqlsh -k <replaceable>database-name</replaceable></userinput>
-
- system.dateof(timeuuid)         | log
----------------------------------+---------------------------------------
- 2018-01-06 01:02:03.227000+0000 | Address: 192.2.1.100 has been renewed ...
- ...
-(12 rows)
-$
-</screen>
-          </para>
-        </section>
-      </section>
-
-      <section xml:id="flex-id">
-        <title>flex_id: Flexible Identifiers for Host Reservations</title>
-        <para>
-          This section describes a hook application dedicated to generate
-          flexible identifiers for host reservation. Kea software provides a way
-          to handle host reservations that include addresses, prefixes, options,
-          client classes and other features. The reservation can be based on
-          hardware address, DUID, circuit-id or client-id in DHCPv4 and using
-          hardware address or DUID in DHCPv6. However, there are sometimes
-          scenarios where the reservation is more complex, e.g. uses other
-          options that mentioned above, uses part of specific options or perhaps
-          even a combination of several options and fields to uniquely identify
-          a client. Those scenarios are addressed by the Flexible Identifiers
-        hook application.</para>
-
-        <para>Currently this library is only available to ISC customers with a
-        support contract.
-
-        <note>
-          <para>This library may only be loaded by <command>kea-dhcp4</command>
-          or <command>kea-dhcp6</command> process.
-          </para>
-        </note>
-      </para>
-
-        <para>The library allows for defining an expression, using notation
-        initially used for client classification only. See <xref linkend="classification-using-expressions"/> for detailed description
-        of the syntax available. One notable difference is that for client
-        classification the expression currently has to evaluate to either true
-        or false, while the flexible identifier expression is expected to
-        evaluate to a string that will be used as identifier. It is a valid case
-        for the expression to evaluate to empty string (e.g. in cases where a
-        client does not sent specific options). This expression is then
-        evaluated for each incoming packet. This evaluation generates an
-        identifier that is used to identify the client. In particular, there may
-        be host reservations that are tied to specific values of the flexible
-        identifier.</para>
-
-        <para>
-          The library can be loaded in similar way as other hook libraries. It
-          takes a mandatory parameter identifier-expression and optional
-          boolean parameter replace-client-id:
-<screen>
-"Dhcp6": { <userinput>
-    "hooks-libraries": [
-        {
-            "library": "/path/libdhcp_flex_id.so",
-            "parameters": {
-                "identifier-expression": "<userinput>expression</userinput>",
-                "replace-client-id": <userinput>false</userinput>
-            }
-        },
-        ...
-    ] </userinput>
-}
-</screen>
-        </para>
-
-        <para>
-          The flexible identifier library supports both DHCPv4 and DHCPv6.
-        </para>
-
-        <para>
-          EXAMPLE: Let's consider a case of an IPv6 network that has an
-          independent interface for each of the connected customers. Customers
-          are able to plug in whatever device they want, so any type of
-          identifier (e.g. a client-id) is unreliable. Therefore the operator
-          may decide to use an option inserted by a relay agent to differentiate
-          between clients. In this particular deployment, the operator verified
-          that the interface-id is unique for each customer facing
-          interface. Therefore it is suitable for usage as reservation. However,
-          only the first 6 bytes of the interface-id are interesting, because
-          remaining bytes are either randomly changed or not unique between
-          devices. Therefore the customer decided to use first 6 bytes of the
-          interface-id option inserted by the relay agent. After adding "flex-id"
-          host-reservation-identifiers goal can be achieved by using the
-          following configuration:
-<screen>
-"Dhcp6": {
-    "subnet6": [{ ..., // subnet definition starts here
-    "reservations": [
-        <userinput>"flex-id": "'port1234'"</userinput>, // value of the first 8 bytes of the interface-id
-        "ip-addresses": [ "2001:db8::1" ]
-    ],
-    }], // end of subnet definitions
-    "host-reservation-identifiers": ["duid", "flex-id"], // add "flex-id" to reservation identifiers
-    "hooks-libraries": [
-        {
-            "library": "/path/libdhcp_flex_id.so",
-            "parameters": {
-                "identifier-expression": "<userinput>substring(relay6[0].option[18].hex,0,8)</userinput>"
-            }
-        },
-        ...
-    ]
-}
-</screen>
-        </para>
-
-        <para>
-          NOTE: Care should be taken when adjusting the expression. If the
-          expression changes, then all the flex-id values may change, possibly
-          rendering all reservations based on flex-id unusable until they're
-          manually updated. Therefore it is strongly recommended to start with
-          the expression and a handful reservations, adjust the expression as
-          needed and only after it was confirmed the expression does exactly
-          what is expected out of it go forward with host reservations on any
-          broader scale.
-        </para>
-
-        <para>
-          flex-id values in host reservations can be specified in two
-          ways. First, they can be expressed as hex string, e.g. bar string
-          can be represented as 626174. Alternatively, it can be expressed
-          as quoted value (using double and single quotes), e.g. "'bar'".
-          The former is more convenient for printable characters, while hex
-          string values are more convenient for non-printable characters
-          and does not require the use of the <command>hexstring</command>
-          operator.
-        </para>
-<screen>
-"Dhcp6": {
-    "subnet6": [{ ..., // subnet definition starts here
-    "reservations": [
-        <userinput>"flex-id": "01:02:03:04:05:06"</userinput>, // value of the first 8 bytes of the interface-id
-        "ip-addresses": [ "2001:db8::1" ]
-    ],
-    }], // end of subnet definitions
-    "host-reservation-identifiers": ["duid", "flex-id"], // add "flex-id" to reservation identifiers
-    "hooks-libraries": [
-        {
-            "library": "/path/libdhcp_flex_id.so",
-            "parameters": {
-                "identifier-expression": "<userinput>vendor[4491].option[1026].hex</userinput>"
-            }
-        },
-        ...
-    ]
-}
-</screen>
-
-        <para>
-          When "replace-client-id" is set to false (which is the default setting),
-          the flex-id hook library uses evaluated flexible identifier solely for
-          identifying host reservations, i.e. searching for reservations within a
-          database. This is a functional equivalent of other identifiers,
-          similar to hardware address or circuit-id. However,
-          this mode of operation has an implication that if a client device is
-          replaced, it may cause a conflict between an existing lease (allocated
-          for old device) and the new lease being allocated for the new device. The
-          conflict arises because the same flexible identifier is computed for the
-          replaced device and the server will try to allocate the same lease. The
-          mismatch between client identifiers sent by new device and old device causes
-          the server to refuse this new allocation until the old lease expires.
-          A manifestation of this problem is dependant on specific expression
-          used as flexible identifier and is likely to appear if you only use options
-          and other parameters that are identifying where the device is
-          connected (e.g. circuit-id), rather than the device identification
-          itself (e.g. MAC address).
-        </para>
-
-        <para>
-          The flex-id library offers a way to overcome the problem with lease conflicts
-          by dynamically replacing client identifier (or DUID in DHCPv6 case) with a
-          value derived from flexible identifier. The server processes the client's
-          query as if flexible identifier was sent in the client identifier (or DUID)
-          option. This guarantees that returning client (for which the same flexible
-          identifier is evaluated) will be assigned the same lease despite the client
-          identifier and/or MAC address change.
-        </para>
-
-        <para>
-          The following is a stub configuration that enables this behavior:
-<screen>
-"Dhcp4": { <userinput>
-    "hooks-libraries": [
-        {
-            "library": "/path/libdhcp_flex_id.so",
-            "parameters": {
-                "identifier-expression": "<userinput>expression</userinput>",
-                "replace-client-id": <userinput>true</userinput>
-            }
-        },
-        ...
-    ] </userinput>
-}
-</screen>
-        </para>
-
-        <para>
-          In the DHCPv4 case, the value derived from the flexible identifier is formed
-          by prepending 1 byte with a value of zero to flexible identifier. In the IPv6
-          case, it is formed by prepanding two zero bytes before the flexible identifier.
-        </para>
-
-        <para>
-          Note that for this mechanism to take effect, the DHCPv4 server must be configured
-          to respect the client identifier option value during lease allocation, i.e.
-          "match-client-id" must be set to true. See
-          <xref linkend="dhcp4-match-client-id"/> for details. No additional settings
-          are required for DHCPv6.
-        </para>
-        <para>
-          If "replace-client-id" option is set to true, the value of "echo-client-id"
-          parameter (that governs whether to send back a client-id option or
-          not) is ignored.
-        </para>
-
-        <para>
-          The <xref linkend="lease-cmds"/> section describes commands used to retrieve,
-          update and delete leases using various identifiers, e.g. "hw-address",
-          "client-id". The lease_cmds library doesn't natively support querying for
-          leases by flexible identifier. However, when "replace-client-id" is set to
-          true, it makes it possible to query for leases using a value derived from
-          the flexible identifier. In the DHCPv4 case, the query will look similar to this:
-<screen>
-{
-    "command": "lease4-get",
-    "arguments": {
-        "identifier-type": "client-id",
-        "identifier": "00:<userinput>54:64:45:66</userinput>",
-        "subnet-id": 44
-    }
-}
-</screen>
-
-            where hexadecimal value of "54:64:45:66" is a flexible identifier computed
-            for the client.
-        </para>
-
-        <para>
-          In the DHCPv6 case, the corresponding query will look similar to this:
-<screen>
-{
-    "command": "lease6-get",
-    "arguments": {
-        "identifier-type": "duid",
-        "identifier": "00:00:<userinput>54:64:45:66</userinput>",
-        "subnet-id": 10
-    }
-}</screen>
-
-        </para>
-      </section>
-
-      <section xml:id="host-cmds">
-        <title>host_cmds: Host Commands</title>
-        <para>
-          This section describes a hook application that offers a number of new
-          commands used to query and manipulate host reservations. Kea provides
-          a way to store host reservations in a database. In many larger
-          deployments it is useful to be able to manage that information while
-          the server is running. This library provides management commands for
-          adding, querying and deleting host reservations in a safe way without
-          restarting the server.  In particular, it validates the parameters, so
-          an attempt to insert incorrect data e.g. add a host with conflicting
-          identifier in the same subnet will be rejected. Those commands are
-          exposed via command channel (JSON over unix sockets) and Control Agent
-          (JSON over RESTful interface). Additional commands and capabilities
-          related to host reservations will be added in the future.
-        </para>
-
-        <para>Currently this library is only available to ISC customers with a
-        support contract.
-
-        <note>
-          <para>This library may only be loaded by <command>kea-dhcp4</command>
-          or <command>kea-dhcp6</command> process.
-          </para>
-        </note>
-        </para>
-
-        <para>
-          Currently five commands are supported: reservation-add (which adds
-          new host reservation), reservation-get (which returns existing
-          reservation if specified criteria are matched), reservation-get-all
-          (which returns all reservations in a specified subnet),
-          reservation-get-page (variant of reservation-get-all which returns
-          all reservations in a specified subnet by pages) and reservation-del
-          (which attempts to delete a reservation matching specified
-          criteria). To use commands that change the reservation information
-          (currently these are reservation-add and reservation-del, but this
-          rule applies to other commands that may be implemented in the future),
-          hosts database must be specified (see hosts-databases description in
-          <xref linkend="hosts-databases-configuration4"/> and
-          <xref linkend="hosts-databases-configuration6"/>) and it must not operate in
-          read-only mode. If the hosts-databases are not specified or are running
-          in read-only mode, the host_cmds library will load, but any attempts
-          to use reservation-add or reservation-del will fail.
-        </para>
-
-        <para>
-          Additional host reservation commands are planned in the future. For
-          a description of envisaged commands, see
-          <link xmlns:xlink="http://www.w3.org/1999/xlink"
-           xlink:href="https://gitlab.isc.org/isc-projects/kea/wikis/designs/commands">Control API
-          Requirements </link> document.
-        </para>
-
-        <para>
-          All commands are using JSON syntax. They can be issued either using
-          control channel (see <xref linkend="ctrl-channel"/>) or via Control
-          Agent (see <xref linkend="kea-ctrl-agent"/>).
-        </para>
-
-        <para>
-          The library can be loaded in similar way as other hook libraries. It
-          does not take any parameters. It supports both DHCPv4 and DHCPv6
-          servers.
-<screen>
-"Dhcp6": { <userinput>
-    "hooks-libraries": [
-        {
-            "library": "/path/libdhcp_host_cmds.so"
-        }
-        ...
-    ] </userinput>
-}
-</screen>
-        </para>
-
-        <section>
-          <title>The subnet-id parameter</title>
-        <para> Prior to diving into the individual commands, it is worth
-        discussing the parameter, <command>subnet-id</command>. Currently
-        it is mandatory for all of the commands supplied by this library.
-        Prior to Kea 1.5.0, reservations had to belong to specific subnet.
-        Beginning with Kea 1.5.0, reservations may now be specified globally.
-        In other words, they are not specific to any subnet.  When reservations
-        are supplied via the configuration file, the ID of the containing
-        subnet (or lack thereof) is implicit in the configuration structure.
-        However, when managing reservations using the host commands, it is
-        necessary to explicitly identify the scope to which the reservation
-        belongs.  This is done via the <command>subnet-id</command> parameter.
-        For global reservations, use a value of zero (0).  For reservations
-        scoped to a specific subnet, use that subnet's ID.
-        </para>
-        </section>
-
-        <section xml:id="command-reservation-add">
-          <title>reservation-add command</title>
-        <para>
-          <command>reservation-add</command> allows for the insertion of a new host.  It
-          takes a set of arguments that vary depending on the nature of the host
-          reservation. Any parameters allowed in the configuration file that
-          pertain to host reservation are permitted here. For details regarding
-          IPv4 reservations, see <xref linkend="host-reservation-v4"/> and
-          <xref linkend="host-reservation-v6"/>.
-          The <command>subnet-id</command> is manadatory. Use a value of zero (0) to
-          add a global reservation, or the id of the subnet to which the reservation
-          should be added.  An example command can be as simple as:
-<screen>{
-    "command": "reservation-add",
-    "arguments": {
-        <userinput>"reservation": {
-            "subnet-id": 1,
-            "hw-address": "1a:1b:1c:1d:1e:1f",
-            "ip-address": "192.0.2.202"
-        }</userinput>
-    }
-}</screen> but can also take many more parameters, for example:
-
-<screen>
-{
-    "command": "reservation-add",
-    "arguments": {
-        <userinput>"reservation":
-            {
-                "subnet-id":1,
-                "client-id": "01:0a:0b:0c:0d:0e:0f",
-                "ip-address": "192.0.2.205",
-                "next-server": "192.0.2.1",
-                "server-hostname": "hal9000",
-                "boot-file-name": "/dev/null",
-                "option-data": [
-                    {
-                        "name": "domain-name-servers",
-                        "data": "10.1.1.202,10.1.1.203"
-                    }
-                ],
-                "client-classes": [ "special_snowflake", "office" ]
-            }</userinput>
-    }
-}</screen>
-
-Here is an example of complex IPv6 reservation:
-<screen>
-{
-    "command": "reservation-add",
-    "arguments": {
-        <userinput>"reservation":
-            {
-                "subnet-id":1,
-                "duid": "01:02:03:04:05:06:07:08:09:0A",
-                "ip-addresses": [ "2001:db8:1:cafe::1" ],
-                "prefixes": [ "2001:db8:2:abcd::/64" ],
-                "hostname": "foo.example.com",
-                "option-data": [
-                    {
-                        "name": "vendor-opts",
-                        "data": "4491"
-                    },
-                    {
-                        "name": "tftp-servers",
-                        "space": "vendor-4491",
-                        "data": "3000:1::234"
-                    }
-                ]
-            }</userinput>
-    }
-}</screen>
-        </para>
-
-        <para>
-          The command returns a status that indicates either a success (result
-          0) or a failure (result 1). Failed command always includes text
-          parameter that explains the cause of failure. Example results:
-          <screen>{ "result": 0, "text": "Host added." }</screen> Example failure:
-          <screen>{ "result": 1, "text": "Mandatory 'subnet-id' parameter missing." }</screen>
-        </para>
-
-        <para>
-          As <command>reservation-add</command> is expected to store the host,
-          hosts-databases parameter must be specified in your configuration and
-          databases must not run in read-only mode. In the future versions
-          it will be possible to modify the reservations read from a
-          configuration file. Please contact ISC if you are interested in this
-          functionality.
-        </para>
-        </section>
-
-        <section xml:id="command-reservation-get">
-          <title>reservation-get command</title>
-          <para><command>reservation-get</command> can be used to query the host
-          database and retrieve existing reservations. There are two types of
-          parameters this command supports: (subnet-id, address) or (subnet-id,
-          identifier-type, identifier). The first type of query is used when the
-          address (either IPv4 or IPv6) is known, but the details of the
-          reservation aren't. One common use case of this type of query is to
-          find out whether a given address is reserved or not. The second query
-          uses identifiers. For maximum flexibility, Kea stores the host
-          identifying information as a pair of values: type and the actual
-          identifier. Currently supported identifiers are "hw-address", "duid",
-          "circuit-id", "client-id" and "flex-id", but additional types may be
-          added in the future. If any new identifier types are defined in the
-          future, reservation-get command will support them automatically.
-          The <command>subnet-id</command> is mandatory. Use a value of zero (0) to
-          fetch a global reservation, or the id of the subnet to which the reservation
-          belongs.
-          </para>
-
-          <para>
-            An example command for getting a host reservation by (subnet-id,
-            address) pair looks as follows:
-<screen>
-{
-    "command": "reservation-get",
-    "arguments": {
-        "subnet-id": 1,
-        "ip-address": "192.0.2.202"
-    }
-}</screen>
-
-An example query by (subnet-id, identifier-type, identifier) looks as follows:
-<screen>
-{
-    "command": "reservation-get",
-    "arguments": {
-        "subnet-id": 4,
-        "identifier-type": "hw-address",
-        "identifier": "01:02:03:04:05:06"
-    }
-}</screen>
-
-          </para>
-          <para><command>reservation-get</command> typically returns result 0
-          when the query was conducted properly. In particular, 0 is returned
-          when the host was not found. If the query was successful a number
-          of host parameters will be returned. An example of a query that
-          did not find the host looks as follows:
-<screen>{ "result": 0, "text": "Host not found." }</screen>
-
-An example result returned when the host was found:
-<screen>{
-  "arguments": {
-    "boot-file-name": "bootfile.efi",
-    "client-classes": [
-
-    ],
-    "hostname": "somehost.example.org",
-    "hw-address": "01:02:03:04:05:06",
-    "ip-address": "192.0.2.100",
-    "next-server": "192.0.0.2",
-    "option-data": [
-
-    ],
-    "server-hostname": "server-hostname.example.org"
-  },
-  "result": 0,
-  "text": "Host found."
-}</screen>
-
-An example result returned when the query was malformed:<screen>
-{ "result": 1, "text": "No 'ip-address' provided and 'identifier-type'
-                        is either missing or not a string." }</screen>
-</para>
-
-        </section>
-
-        <section xml:id="command-reservation-get-all">
-          <title>reservation-get-all command</title>
-          <para><command>reservation-get-all</command> can be used to
-          query the host database and retrieve all reservations in a
-          specified subnet. This command uses parameters providing the
-          mandatory subnet-id. Global host reservations can be
-          retrieved by using subnet-id value of zero (0).
-          </para>
-
-          <para>For instance for retrieving host reservations for the
-          subnet 1:
-<screen>
-{
-    "command": "reservation-get-all",
-    "arguments": {
-        <userinput>"subnet-id": 1</userinput>
-     }
-}
-</screen> returns found some IPv4 hosts:
-<screen>
-{
-    "arguments": {
-        "hosts": [
-            {
-                "boot-file-name": "bootfile.efi",
-                "client-classes": [ ],
-                "hostname": "somehost.example.org",
-                "hw-address": "01:02:03:04:05:06",
-                "ip-address": "192.0.2.100",
-                "next-server": "192.0.0.2",
-                "option-data": [ ],
-                "server-hostname": "server-hostname.example.org"
-            },
-            ...
-            {
-                "boot-file-name": "bootfile.efi",
-                "client-classes": [ ],
-                "hostname": "otherhost.example.org",
-                "hw-address": "01:02:03:04:05:ff",
-                "ip-address": "192.0.2.200",
-                "next-server": "192.0.0.2",
-                "option-data": [ ],
-                "server-hostname": "server-hostname.example.org"
-            }
-        ]
-    },
-    "result": 0,
-    "text": "72 IPv4 host(s) found."
-}
-</screen>
-         </para>
-
-          <para>The response returned by <command>reservation-get-all</command>
-          can be very long. The DHCP server does not handle DHCP
-          traffic when preparing a response to reservation-get-all.
-          If there are many reservations in a subnet, this may be disruptive. Use with caution.
-          For larger deployments, please consider using
-          <command>reservation-get-page</command> instead (see <xref
-          linkend="command-reservation-get-page"/>).
-          </para>
-
-          <para>
-          For a reference, see <xref linkend="ref-reservation-get-all"/>.
-          </para>
-        </section>
-
-        <section xml:id="command-reservation-get-page">
-          <title>reservation-get-page command</title>
-          <para><command>reservation-get-page</command> can be used to
-          query the host database and retrieve all reservations in a
-          specified subnet by pages. This command uses parameters providing the
-          mandatory subnet-id. Use a value of zero (0) to fetch global
-          reservations. The second mandatory parameter is the page size limit.
-          Optional source-index and from host id, both defaulting to 0, are
-          uses to chain page queries.
-          </para>
-
-          <para>
-            The usage of from and source-index parameters requires
-            additional explanation. For the first call those
-            parameters should not be specified (or specified as
-            zeros). For any follow up calls they should be set to the
-            values returned in previous calls in a next map holding
-            from and source-index values.  The subsequent calls should
-            be issued until all reservations are returned. The end is
-            reached once the returned list is empty, count is 0, no
-            next map is present and result status 3 (empty) is returned.
-          </para>
-
-          <note>
-            <simpara>The from and source-index parameters are
-            reflecting internal state of the search. There is no need
-            to understand what they represent, it's simply a value
-            that is supposed to be copied from one response to the
-            next query. However, if you are curious, from field
-            represents a 64 bits representation of host identifier
-            used by a host backend. The source-index represents
-            internal representation of multiple host backends: 0 is
-            used to represent hosts defined in a configuration file, 1
-            represents the first database backend. In some uncommon
-            cases there may be more than one database backend
-            configured, so potentially there may be 2. In any case,
-            Kea will iterate over all backends configured.
-            </simpara>
-          </note>
-
-          <para>For instance for retrieving host reservations for the
-          subnet 1 requesting the first page can be done by:
-<screen>
-{
-    "command": "reservation-get-page",
-    "arguments": {
-        <userinput>"subnet-id": 1,
-        "limit": 10</userinput>
-     }
-}
-</screen> Since this is the first call, source-index and from should
-not be specified. They will default to their zero default values.
-          </para>
-
-          <para>Some hosts are returned with informations to get the next page:
-<screen>
-{
-    "arguments": {
-        "count": 72,
-        "hosts": [
-            {
-                "boot-file-name": "bootfile.efi",
-                "client-classes": [ ],
-                "hostname": "somehost.example.org",
-                "hw-address": "01:02:03:04:05:06",
-                "ip-address": "192.0.2.100",
-                "next-server": "192.0.0.2",
-                "option-data": [ ],
-                "server-hostname": "server-hostname.example.org"
-            },
-            ...
-            {
-                "boot-file-name": "bootfile.efi",
-                "client-classes": [ ],
-                "hostname": "otherhost.example.org",
-                "hw-address": "01:02:03:04:05:ff",
-                "ip-address": "192.0.2.200",
-                "next-server": "192.0.0.2",
-                "option-data": [ ],
-                "server-hostname": "server-hostname.example.org"
-            }
-        ],
-        "next": {
-            "from": 1234567,
-            "source-index": 1
-        }
-    },
-    "result": 0,
-    "text": "72 IPv4 host(s) found."
-}
-</screen> Note that from and source-index fields were specified in the
-response in the next map. Those two must be copied to the next
-command, so Kea continues from the place where the last command
-finished. To get the next page the following command can be sent:
-<screen>
-{
-    "command": "reservation-get-page",
-    "arguments": {
-        <userinput>"subnet-id": 1,
-        "source-index": 1,
-        "from": 1234567,
-        "limit": 10</userinput>
-     }
-}
-</screen>. The response will contain a list of hosts with updated
-source-index and from fields. Continue calling the command until you
-get the last page. Its response will look like this:
-<screen>
-{
-    "arguments": {
-        "count": 0,
-        "hosts": [ ],
-    },
-    "result": 3,
-    "0 IPv4 host(s) found."
-}
-</screen></para>
-
-          <para>This command is more complex than
-          <command>reservation-get-all</command>, but lets users
-          retrieve larger host reservations lists by smaller
-          chunks. For small deployments with few reservations, is it
-          easier to use <command>reservation-get-all</command> (see
-          <xref linkend="command-reservation-get-all"/>.</para>
-
-          <para>
-          For a reference, see <xref linkend="ref-reservation-get-page"/>.
-          </para>
-
-          <note><simpara>
-              Currently <command>reservation-get-page</command> is not
-              supported by the Cassandra host backend.
-          </simpara></note>
-        </section>
-
-        <section xml:id="command-reservation-del">
-          <title>reservation-del command</title>
-          <para><command>reservation-del</command> can be used to delete a
-          reservation from the host database. There are two types of parameters
-          this command supports: (subnet-id, address) or (subnet-id,
-          identifier-type, identifier). The first type of query is used when the
-          address (either IPv4 or IPv6) is known, but the details of the
-          reservation aren't. One common use case of this type of query is to
-          remove a reservation (e.g. you want a specific address to no longer be
-          reserved). The second query uses identifiers. For maximum flexibility,
-          Kea stores the host identifying information as a pair of values: type
-          and the actual identifier. Currently supported identifiers are
-          "hw-address", "duid", "circuit-id", "client-id" and "flex-id", but
-          additional types may be added in the future. If any new identifier
-          types are defined in the future, reservation-get command will support
-          them automatically.
-          The <command>subnet-id</command> is manadatory. Use a value of zero (0) to
-          delete a global reservation, or the id of the subnet from which the reservation
-          should be deleted.
-          </para>
-
-          <para>
-            An example command for deleting a host reservation by (subnet-id,
-            address) pair looks as follows:
-<screen>
-{
-    "command": "reservation-del",
-    "arguments": {
-        "subnet-id": 1,
-        "ip-address": "192.0.2.202"
-    }
-}</screen>
-
-An example deletion by (subnet-id, identifier-type, identifier) looks as follows:
-<screen>
-{
-    "command": "reservation-del",
-    "arguments":
-        "subnet-id": 4,
-        "identifier-type": "hw-address",
-        "identifier": "01:02:03:04:05:06"
-    }
-}</screen>
-          </para>
-          <para>
-            <command>reservation-del</command> returns result 0 when the host
-            deletion was successful or 1 if it was not. A descriptive text is
-            provided in case of error. Example results look as follows:
-<screen>
-{
-    "result": 1,
-    "text": "Host not deleted (not found)."
-}</screen>
-
-<screen>
-{
-    "result": 0,
-    "text": "Host deleted."
-}</screen>
-
-<screen>
-{
-    "result": 1,
-    "text": "Unable to delete a host because there is no hosts-database
-             configured."
-}</screen>
-          </para>
-        </section>
-      </section>
-
-      <!-- ================================================================= -->
-      <!-- === lease_cmds ================================================== -->
-      <!-- ================================================================= -->
-
-      <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="hooks-lease-cmds.xml"/>
-
-      <section xml:id="subnet-cmds">
-        <title>subnet_cmds: Subnet Commands</title>
-        <para>
-          This section describes a hook application that offers a number of new
-          commands used to query and manipulate subnet and shared network
-          configurations in Kea.  This application is very useful in deployments
-          with a large number of subnets being managed by the DHCP servers and
-          when the subnets are frequently updated. The commands offer
-          lightweight approach for manipulating subnets without a need to fully
-          reconfigure the server and without affecting existing servers'
-          configurations. An ability to manage shared networks (listing,
-          retrieving details, adding new ones, removing existing ones, adding
-          subnets to and removing from shared networks) is also provided.
-        </para>
-
-        <para>Currently this library is only available to ISC customers with a
-        support contract.
-
-        <note>
-          <para>This library may only be loaded by <command>kea-dhcp4</command>
-          or <command>kea-dhcp6</command> process.
-          </para>
-        </note>
-        </para>
-
-        <para>The following commands are currently supported:
-        <itemizedlist mark="bullet">
-          <listitem>
-            <simpara><command>subnet4-list/subnet6-list</command>: lists all configured subnets
-            </simpara>
-          </listitem>
-          <listitem>
-          <simpara>
-            <command>subnet4-get/subnet6-get</command>: retrieves detailed information about a specified subnet
-          </simpara>
-          </listitem>
-          <listitem>
-          <simpara>
-            <command>subnet4-add/subnet6-add</command>: adds new subnet into server's configuration
-          </simpara>
-          </listitem>
-          <listitem>
-          <simpara> <command>subnet4-update/subnet6-update</command>: updates  subnet in server's configuration
-          </simpara>
-          </listitem>
-          <listitem>
-          <simpara>
-            <command>subnet4-del/subnet6-del</command>: removes a subnet from the server's configuration
-          </simpara>
-          </listitem>
-
-          <listitem>
-          <simpara>
-            <command>network4-list/network6-list</command>: lists all configured
-            shared networks
-          </simpara>
-          </listitem>
-          <listitem>
-          <simpara>
-            <command>network4-get/network6-get</command>: retrieves detailed
-            information about specified shared network
-          </simpara>
-          </listitem>
-          <listitem>
-          <simpara>
-            <command>network4-add/network6-add</command>: adds a new shared
-            network to the server's configuration
-          </simpara>
-          </listitem>
-          <listitem>
-          <simpara>
-            <command>network4-del/network6-del</command>: removes a shared
-            network from the server's configuration
-          </simpara>
-          </listitem>
-          <listitem>
-          <simpara>
-            <command>network4-subnet-add/network6-subnet-add</command>: adds
-            existing subnet to existing shared network
-          </simpara>
-          </listitem>
-          <listitem>
-          <simpara>
-            <command>network4-subnet-del/network6-subnet-del</command>: removes
-            a subnet from existing shared network and demotes it to a plain
-            subnet.
-          </simpara>
-          </listitem>
-
-        </itemizedlist>
-        </para>
-
-        <section id="command-subnet4-list">
-          <title>subnet4-list command</title>
-          <para>
-            This command is used to list all currently configured subnets. The
-            subnets are returned in a brief form, i.e. a subnet identifier
-            and subnet prefix is included for each subnet. In order to retrieve
-            the detailed information about the subnet the
-            <command>subnet4-get</command> should be used.
-          </para>
-          <para>
-            This command has the simple structure:
-<screen>
-{
-    "command": "subnet4-list"
-}
-</screen>
-          </para>
-          <para>
-            The list of subnets returned as a result of this command is returned
-            in the following format:
-<screen>
-{
-    "result": 0,
-    "text": "2 IPv4 subnets found",
-    "arguments": {
-    "subnets": [
-        {
-            "id": 10,
-            "subnet": "10.0.0.0/8"
-        },
-        {
-            "id": 100,
-            "subnet": "192.0.2.0/24"
-        }
-    ]
-}
-</screen>
-          </para>
-          <para>
-            If no IPv4 subnets are found, an error code is returned along with
-            the error description.
-          </para>
-        </section>
-
-        <section id="command-subnet6-list">
-          <title>subnet6-list command</title>
-          <para>
-            This command is used to list all currently configured subnets. The
-            subnets are returned in a brief form, i.e. a subnet identifier
-            and subnet prefix is included for each subnet. In order to retrieve
-            the detailed information about the subnet the
-            <command>subnet6-get</command> should be used.
-          </para>
-          <para>
-            This command has the simple structure:
-<screen>
-{
-    "command": "subnet6-list"
-}
-</screen>
-          </para>
-          <para>
-            The list of subnets returned as a result of this command is returned
-            in the following format:
-<screen>
-{
-    "result": 0,
-    "text": "2 IPv6 subnets found",
-    "arguments": {
-    "subnets": [
-        {
-            "id": 11,
-            "subnet": "2001:db8:1::/64"
-        },
-        {
-            "id": 233,
-            "subnet": "3000::/16"
-        }
-    ]
-}
-</screen>
-          </para>
-          <para>
-            If no IPv6 subnets are found, an error code is returned along with
-            the error description.
-          </para>
-        </section>
-
-      <section id="command-subnet4-get">
-        <title>subnet4-get command</title>
-        <para>This command is used to retrieve detailed information about the
-        specified subnet. This command usually follows the
-        <command>subnet4-list</command>, which is used to discover available
-        subnets with their respective subnet identifiers and prefixes. Any of
-        those parameters can be then used in <command>subnet4-get</command>
-        to fetch subnet information:
-<screen>
-{
-    "command": "subnet4-get",
-    "arguments": {
-        "id": 10
-    }
-}</screen>
-
-or
-
-<screen>
-{
-    "command": "subnet4-get",
-    "arguments": {
-        "subnet": "10.0.0.0/8"
-    }
-}
-</screen>
-        </para>
-
-        <para>
-          If the subnet exists the response will be similar to this:
-<screen>
-{
-    "result": 0,
-    "text": "Info about IPv4 subnet 10.0.0.0/8 (id 10) returned",
-    "arguments": {
-        "subnets": [
-            {
-                "subnet": "10.0.0.0/8",
-                "id": 1,
-                "option-data": [
-                    ....
-                ]
-                ...
-            }
-        ]
-    }
-}
-
-</screen>
-        </para>
-      </section>
-
-      <section id="command-subnet6-get">
-        <title>subnet6-get command</title>
-        <para>This command is used to retrieve detailed information about the
-        specified subnet. This command usually follows the
-        <command>subnet6-list</command>, which is used to discover available
-        subnets with their respective subnet identifiers and prefixes. Any of
-        those parameters can be then used in <command>subnet6-get</command>
-        to fetch subnet information:
-<screen>
-{
-    "command": "subnet6-get",
-    "arguments": {
-        "id": 11
-    }
-}
-</screen>
-
-or
-
-<screen>
-{
-    "command": "subnet6-get",
-    "arguments": {
-        "subnet": "2001:db8:1::/64"
-    }
-}</screen>
-
-If the subnet exists the response will be similar to this:
-<screen>
-{
-    "result": 0,
-    "text": "Info about IPv6 subnet 2001:db8:1::/64 (id 11) returned",
-    "arguments": {
-        "subnets": [
-            {
-                "subnet": "2001:db8:1::/64",
-                "id": 1,
-                "option-data": [
-                    ...
-                ]
-                ....
-            }
-        ]
-    }
-}
-</screen>
-        </para>
-      </section>
-
-      <section id="command-subnet4-add">
-        <title>subnet4-add</title>
-        <para>
-          This command is used to create and add new subnet to the existing
-          server configuration. This operation has no impact on other
-          subnets. The subnet identifier must be specified and must be
-          unique among all subnets. If the identifier or a subnet prefix is
-          not unique an error is reported and the subnet is not added.
-        </para>
-        <para>
-          The subnet information within this command has the same structure
-          as the subnet information in the server configuration file with the
-          exception that static host reservations must not be specified
-          within <command>subnet4-add</command>. The commands described in
-          <xref linkend="host-cmds"/> should be used to add, remove and
-          modify static reservations.
-<screen>
-{
-    "command": "subnet4-add",
-    "arguments": {
-        "subnet4": [ {
-            "id": 123,
-            "subnet": "10.20.30.0/24",
-            ...
-        } ]
-    }
-}
-</screen>
-        </para>
-
-        <para>
-          The response to this command has the following structure:
-<screen>
-{
-    "result": 0,
-    "text": "IPv4 subnet added",
-    "arguments": {
-        "subnet4": [
-            {
-                "id": 123,
-                "subnet": "10.20.30.0/24"
-            }
-        ]
-    }
-}
-</screen>
-        </para>
-      </section>
-
-      <section id="command-subnet6-add">
-        <title>subnet6-add</title>
-        <para>
-          This command is used to create and add new subnet to the existing
-          server configuration. This operation has no impact on other
-          subnets. The subnet identifier must be specified and must be
-          unique among all subnets. If the identifier or a subnet prefix is
-          not unique an error is reported and the subnet is not added.
-        </para>
-        <para>
-          The subnet information within this command has the same structure
-          as the subnet information in the server configuration file with the
-          exception that static host reservations must not be specified
-          within <command>subnet6-add</command>. The commands described in
-          <xref linkend="host-cmds"/> should be used to add, remove and
-          modify static reservations.
-<screen>
-{
-    "command": "subnet6-add",
-    "arguments": {
-        "subnet6": [ {
-            "id": 234,
-            "subnet": "2001:db8:1::/64",
-            ...
-        } ]
-    }
-}
-</screen>
-        </para>
-
-        <para>
-          The response to this command has the following structure:
-<screen>
-{
-    "result": 0,
-    "text": "IPv6 subnet added",
-    "arguments": {
-        "subnet6": [
-            {
-                "id": 234,
-                "subnet": "2001:db8:1::/64"
-            }
-        ]
-    }
-}
-</screen>
-        </para>
-
-        <para>
-          It is recommended, but not mandatory to specify subnet
-          id. If not specified, Kea will try to assign the next
-          subnet-id value. This automatic ID value generator is
-          simple. It returns a previously automatically assigned value
-          increased by 1. This works well, unless you manually create
-          a subnet with a value bigger than previously used. For
-          example, if you call subnet4-add five times, each without
-          id, Kea will assign IDs: 1,2,3,4 and 5 and it will work just
-          fine. However, if you try to call subnet4-add five times,
-          with the first subnet having subnet-id of value 3 and
-          remaining ones having no subnet-id, it will fail. The first
-          command (with explicit value) will use subnet-id 3, the
-          second command will create a subnet with id of 1, the third
-          will use value of 2 and finally the fourth will have the
-          subnet-id value auto-generated as 3. However, since there is
-          already a subnet with that id, it will fail.
-        </para>
-        <para>
-          The general recommendation is to either: never use explicit
-          values (so the auto-generated values will always work) or
-          always use explicit values (so the auto-generation is never
-          used). You can mix those two approaches only if you
-          understand how the internal automatic subnet-id generation works.
-        </para>
-        <note>
-          Subnet IDs must be greater than zero and less than 4294967295.
-        </note>
-
-      </section>
-
-      <section id="command-subnet4-update">
-        <title>subnet4-update</title>
-        <para>
-          This command is used to update a subnet in the existing
-          server configuration. This operation has no impact on other
-          subnets. The subnet identifier is used to identify the
-          subnet to replace, it must be specified and must be unique
-          among all subnets. The subnet prefix should not be updated.
-        </para>
-        <para>
-          The subnet information within this command has the same structure
-          as the subnet information in the server configuration file with the
-          exception that static host reservations must not be specified
-          within <command>subnet4-update</command>. The commands described in
-          <xref linkend="host-cmds"/> should be used to update, remove and
-          modify static reservations.
-<screen>
-{
-    "command": "subnet4-update",
-    "arguments": {
-        "subnet4": [ {
-            "id": 123,
-            "subnet": "10.20.30.0/24",
-            ...
-        } ]
-    }
-}
-</screen>
-        </para>
-
-        <para>
-          The response to this command has the following structure:
-<screen>
-{
-    "result": 0,
-    "text": "IPv4 subnet updated",
-    "arguments": {
-        "subnet4": [
-            {
-                "id": 123,
-                "subnet": "10.20.30.0/24"
-            }
-        ]
-    }
-}
-</screen>
-        </para>
-      </section>
-
-      <section id="command-subnet6-update">
-        <title>subnet6-update</title>
-        <para>
-          This command is used to update a subnet in the existing
-          server configuration. This operation has no impact on other
-          subnets. The subnet identifier is used to identify the
-          subnet to replace, it must be specified and must be unique
-          among all subnets. The subnet prefix should not be updated.
-        </para>
-        <para>
-          The subnet information within this command has the same structure
-          as the subnet information in the server configuration file with the
-          exception that static host reservations must not be specified
-          within <command>subnet6-update</command>. The commands described in
-          <xref linkend="host-cmds"/> should be used to update, remove and
-          modify static reservations.
-<screen>
-{
-    "command": "subnet6-update",
-    "arguments": {
-        "subnet6": [ {
-            "id": 234,
-            "subnet": "2001:db8:1::/64",
-            ...
-        } ]
-    }
-}
-</screen>
-        </para>
-
-        <para>
-          The response to this command has the following structure:
-<screen>
-{
-    "result": 0,
-    "text": "IPv6 subnet updated",
-    "arguments": {
-        "subnet6": [
-            {
-                "id": 234,
-                "subnet": "2001:db8:1::/64"
-            }
-        ]
-    }
-}
-</screen>
-        </para>
-
-      </section>
-
-      <section id="command-subnet4-del">
-        <title>subnet4-del command</title>
-        <para>
-          This command is used to remove a subnet from the server's configuration.
-          This command has no effect on other configured subnets but removing
-          a subnet has certain implications which the server's administrator
-          should be aware of.
-        </para>
-        <para>
-          In most cases the server has assigned some leases to the clients
-          belonging to the subnet. The server may also be configured with
-          static host reservations which are associated with this subnet.
-          The current implementation of the <command>subnet4-del</command>
-          removes neither the leases nor host reservations associated with
-          a subnet. This is the safest approach because the server doesn't
-          loose track of leases assigned to the clients from this subnet.
-          However, removal of the subnet may still cause configuration
-          errors and conflicts. For example: after removal of the subnet,
-          the server administrator may update a new subnet with the ID used
-          previously for the removed subnet. This means that the existing
-          leases and static reservations will be in conflict with this
-          new subnet. Thus, we recommend that this command is used with extreme
-          caution.
-        </para>
-        <para>
-          This command can also be used to completely delete an IPv4 subnet that
-          is part of a shared network. If you want to simply remove the subnet
-          from a shared network and keep the subnet configuration, use
-          <command>network4-subnet-del</command> command instead.
-        </para>
-
-        <para>The command has the following structure:
-<screen>
-{
-    "command": "subnet4-del",
-    "arguments": {
-        "id": 123
-    }
-}
-</screen>
-        </para>
-        <para>
-          The example successful response may look like this:
-<screen>
-{
-    "result": 0,
-    "text": "IPv4 subnet 192.0.2.0/24 (id 123) deleted",
-    "arguments": {
-        "subnets": [
-            {
-                "id": 123,
-                "subnet": "192.0.2.0/24"
-            }
-        ]
-    }
-}
-</screen>
-        </para>
-      </section>
-
-      <section id="command-subnet6-del">
-        <title>subnet6-del command</title>
-        <para>
-          This command is used to remove a subnet from the server's configuration.
-          This command has no effect on other configured subnets but removing
-          a subnet has certain implications which the server's administrator
-          should be aware of.
-        </para>
-        <para>
-          In most cases the server has assigned some leases to the clients
-          belonging to the subnet. The server may also be configured with
-          static host reservations which are associated with this subnet.
-          The current implementation of the <command>subnet6-del</command>
-          removes neither the leases nor host reservations associated with
-          a subnet. This is the safest approach because the server doesn't
-          loose track of leases assigned to the clients from this subnet.
-          However, removal of the subnet may still cause configuration
-          errors and conflicts. For example: after removal of the subnet,
-          the server administrator may add a new subnet with the ID used
-          previously for the removed subnet. This means that the existing
-          leases and static reservations will be in conflict with this
-          new subnet. Thus, we recommend that this command is used with extreme
-          caution.
-        </para>
-        <para>
-          This command can also be used to completely delete an IPv6 subnet that
-          is part of a shared network. If you want to simply remove the subnet
-          from a shared network and keep the subnet configuration, use
-          <command>network6-subnet-del</command> command instead.
-        </para>
-
-        <para>The command has the following structure:
-<screen>
-{
-    "command": "subnet6-del",
-    "arguments": {
-        "id": 234
-    }
-}
-</screen>
-        </para>
-        <para>
-          The example successful response may look like this:
-<screen>
-{
-    "result": 0,
-    "text": "IPv6 subnet 2001:db8:1::/64 (id 234) deleted",
-    "subnets": [
-        {
-            "id": 234,
-            "subnet": "2001:db8:1::/64"
-        }
-    ]
-}
-</screen>
-        </para>
-      </section>
-
-      <section id="command-network4-list">
-        <title>network4-list, network6-list commands</title>
-        <para id="command-network6-list">
-          These commands are used to retrieve full list of currently configured
-          shared networks. The list contains only very basic information about
-          each shared network. If more details are needed, please use
-          <command>network4-get</command> or <command>network6-get</command> to
-          retrieve all information available. This command does not require any
-          parameters and its invocation is very simple:
-<screen>
-{
-    "command": "network4-list"
-}
-</screen>
-An example response for <command>network4-list</command> looks as follows:
-<screen>
-{
-    "arguments": {
-        "shared-networks": [
-            { "name": "floor1" },
-            { "name": "office" }
-        ]
-    },
-    "result": 0,
-    "text": "2 IPv4 network(s) found"
-}</screen>
-<command>network6-list</command> follows exactly the same syntax for
-both the query and the response.
-        </para>
-    </section>
-
-    <section id="command-network4-get">
-        <title>network4-get, network6-get commands</title>
-        <para id="command-network6-get">
-          These commands are used to retrieve detailed information
-          about shared networks, including subnets currently
-          being part of a given network. Both commands take one
-          mandatory parameter <command>name</command>, which specify
-          the name of shared network. An example command to retrieve
-          details about IPv4 shared network with a name "floor13"
-          looks as follows:
-<screen>
-{
-    "command": "network4-get",
-    "arguments": {
-        "name": "floor13"
-    }
-}</screen>
-An example response could look as follows:
-<screen>
-{
-    "result": 0,
-    "text": "Info about IPv4 shared network 'floor13' returned",
-    "arguments": {
-        "shared-networks": [
-        {
-            "match-client-id": true,
-            "name": "floor13",
-            "option-data": [ ],
-            "rebind-timer": 90,
-            "relay": {
-                "ip-address": "0.0.0.0"
-            },
-            "renew-timer": 60,
-            "reservation-mode": "all",
-            "subnet4": [
-                {
-                    "subnet": "192.0.2.0/24",
-                    "id": 5,
-                    // many other subnet specific details here
-                },
-                {
-                    "id": 6,
-                    "subnet": "192.0.3.0/31",
-                    // many other subnet specific details here
-                }
-            ],
-            "valid-lifetime": 120
-        }
-        ]
-    }
-}
-</screen>
-Note that actual response contains many additional fields that are
-omitted here for clarity. The response format is exactly the same as
-used in <command>config-get</command>, just is limited to returning
-shared networks information.
-        </para>
-    </section>
-
-    <section id="command-network4-add">
-        <title>network4-add, network6-add commands</title>
-        <para id="command-network6-add">
-          These commands are used to add a new shared network. New
-          network has to have unique name. This command requires one parameter
-          <command>shared-networks</command>, which is a list and
-          should contain exactly one entry that defines the
-          network. The only mandatory element for a network is its
-          name. Although it does not make operational sense, it is
-          allowed to add an empty shared network that does not have
-          any subnets in it. That is allowed for testing purposes, but
-          having empty networks (or with only one subnet) is
-          discouraged in production environments. For details regarding
-          syntax, see <xref linkend="shared-network4"/> and <xref
-          linkend="shared-network6"/>.
-        </para>
-        <note><para>As opposed to parameter inheritance during full
-          new configuration processing, this command does not fully handle
-          parameter inheritance and any missing parameters will be
-          filled with default values, rather than inherited from
-          global scope.</para></note>
-        <para>
-          An example that showcases how to add a new IPv4 shared network looks
-          as follows:
-<screen>
-{
-    "command": "network4-add",
-    "arguments": {
-        "shared-networks": [ {
-            "name": "floor13",
-            "subnet4": [
-            {
-                "id": 100,
-                "pools": [ { "pool": "192.0.2.2-192.0.2.99" } ],
-                "subnet": "192.0.2.0/24",
-                "option-data": [
-                    {
-                        "name": "routers",
-                        "data": "192.0.2.1"
-                    }
-                ]
-            },
-            {
-                "id": 101,
-                "pools": [ { "pool": "192.0.3.2-192.0.3.99" } ],
-                "subnet": "192.0.3.0/24",
-                "option-data": [
-                    {
-                        "name": "routers",
-                        "data": "192.0.3.1"
-                    }
-                ]
-            } ]
-        } ]
-    }
-}
-</screen>
-Assuming there was no shared network with a name floor13 and no subnets with id
-100 and 101 previously configured, the command will be successful and will
-return the following response:
-<screen>
-{
-    "arguments": {
-        "shared-networks": [ { "name": "floor13" } ]
-    },
-    "result": 0,
-    "text": "A new IPv4 shared network 'floor13' added"
-}
-</screen>
-The <command>network6-add</command> uses the same syntax for both the query and
-the response. However, there are some parameters that are IPv4-only
-(e.g. match-client-id) and some are IPv6-only (e.g. interface-id). The same
-applies to subnets within the network.
-        </para>
-    </section>
-    <section id="command-network4-del">
-        <title>network4-del, network6-del commands</title>
-        <para id="command-network6-del">
-          These commands are used to delete existing shared
-          networks. Both commands take exactly one parameter 'name' that
-          specifies the name of the network to be removed. An example invocation
-          of <command>network4-del</command> command looks as follows:
-<screen>
-{
-    "command": "network4-del",
-    "arguments": {
-        "name": "floor13"
-    }
-}
-</screen>
-Assuming there was such a network configured, the response will look similar to
-the following:
-<screen>
-{
-    "arguments": {
-        "shared-networks": [
-            {
-                "name": "floor13"
-            }
-        ]
-    },
-    "result": 0,
-    "text": "IPv4 shared network 'floor13' deleted"
-}</screen>
-The <command>network6-del</command> command uses exactly the same syntax for
-both the command and the response.
-        </para>
-
-        <para>If there are any subnets belonging to the shared network
-        being deleted, they will be demoted to a plain subnet. There
-        is an optional parameter called
-        <command>subnets-action</command> that, if specified, takes
-        one of two possible values: <command>keep</command> (which is
-        the default) and <command>delete</command>. It controls
-        whether the subnets be demoted to plain subnets or removed. An
-        example usage in network6-del command that deletes the shared
-        network and all subnets in it could looks like as follows:
-<screen>
-{
-    "command": "network4-del",
-    "arguments": {
-        "name": "floor13",
-        "subnets-action": "delete"
-    }
-}
-</screen>
-        </para>
-
-        <para>Alternatively, if you want to completely remove the
-        subnets, you may use <command>subnet4-del</command> or
-        <command>subnet6-del</command> commands.</para>
-
-    </section>
-    <section id="command-network4-subnet-add">
-        <title>network4-subnet-add, network6-subnet-add commands</title>
-        <para id="command-network6-subnet-add">
-          These commands are used to add existing subnets to existing shared
-          networks. There are several ways to add new shared network. System
-          administrator can add the whole shared network at once, either by
-          editing a configuration file or by calling
-          <command>network4-add</command> or <command>network6-add</command>
-          commands with desired subnets in it. This approach works better for completely
-          new shared subnets. However, there may be cases when an existing
-          subnet is running out of addresses and needs to be extended with
-          additional address space. In other words another subnet has to be
-          added on top of it. For this scenario, a system administrator can use
-          <command>network4-add</command> or <command>network6-add</command> and
-          then add existing subnet to this newly created shared network  using
-          <command>network4-subnet-add</command> or
-          <command>network6-subnet-add</command>.
-        </para>
-        <para>
-          The <command>network4-subnet-add</command> and
-          <command>network6-subnet-add</command> commands take two parameters:
-          <command>id</command>, which is an integer and specifies subnet-id of existing subnet to
-          be added to a shared network; and <command>name</command>, which
-          specifies name of the shared network the subnet will be added to. The
-          subnet must not belong to any existing network. In case you want to
-          reassign a subnet from one shared network to another, please use
-          <command>network4-subnet-del</command> or
-          <command>network6-subnet-del</command> commands first.
-        </para>
-        <para>
-          An example invocation of <command>network4-subnet-add</command>
-          command looks as follows:
-<screen>
-{
-    "command": "network4-subnet-add",
-    "arguments": {
-        "name": "floor13",
-        "id": 5
-    }
-}</screen>
-Assuming there is a network named 'floor13', there is a subnet with subnet-id 5
-and it is not a part of existing network, the command will return a response
-similar to the following:
-<screen>
-{
-    "result": 0,
-    "text": "IPv4 subnet 10.0.0.0/8 (id 5) is now part of shared network 'floor1'"
-}</screen>
-        The <command>network6-subnet-add</command> command uses exactly the same syntax for
-both the command and the response.
-        </para>
-
-        <note><para>As opposed to parameter inheritance during full
-          new configuration processing or when adding a new shared network with
-          new subnets, this command does not fully handle
-          parameter inheritance and any missing parameters will be
-          filled with default values, rather than inherited from
-          global scope or from the shared network.</para></note>
-    </section>
-    <section id="command-network4-subnet-del">
-        <title>network4-subnet-del, network6-subnet-del commands</title>
-        <para id="command-network6-subnet-del">
-          These commands are used to remove a subnet that is part of existing shared
-          network and demote it to a plain, stand-alone subnet. If you want to
-          remove a subnet completely, use <command>subnet4-del</command> or
-          <command>subnet6-del</command> commands instead.
-          The <command>network4-subnet-del</command> and
-          <command>network6-subnet-del</command> commands take two parameters:
-          <command>id</command>, which is an integer and specifies subnet-id of
-          existing subnet to be removed from a shared network; and
-          <command>name</command>, which specifies name of the shared network
-          the subnet will be removed from.
-        </para>
-        <para>An example invocation of the
-        <command>network4-subnet-del</command> command looks as follows:
- <screen>
- {
-    "command": "network4-subnet-del",
-    "arguments": {
-        "name": "floor13",
-        "id": 5
-    }
- }</screen>
- Assuming there was a subnet with subnet-id equal to 5 that was part of a shared
- network named 'floor13', the response would look similar to the following:
-<screen>
-{
-    "result": 0,
-    "text": "IPv4 subnet 10.0.0.0/8 (id 5) is now removed from shared network 'floor13'"
-}</screen>
-The <command>network6-subnet-del</command> command uses exactly the same syntax for
-both the command and the response.
-        </para>
-    </section>
-
-    </section> <!-- end of subnet commands -->
-
-    <!-- section class-cmds-library -->
-    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="hooks-class-cmds.xml"/>
-
-    <!-- section cb-cmds-library -->
-    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="hooks-cb-cmds.xml"/>
-
-    <!-- section high-availability-library -->
-    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="hooks-ha.xml"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="hooks-stat-cmds.xml"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="hooks-radius.xml"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="hooks-host-cache.xml"/>
-
-  </section>
-
-    <section xml:id="user-context">
-      <title>User contexts</title>
-      <para>Hook libraries can have their own configuration parameters. That is
-      convenient if the parameter applies to the whole library. However,
-      sometimes it is very useful if certain configuration entities are extended
-      with additional configuration data. This is where the concept of user
-      contexts comes in. A sysadmin can define an arbitrary set of data and
-      attach it to Kea structures, as long as the data is specified as JSON map.
-      In particular, it is possible to define fields that are integers, strings,
-      boolean, lists and maps. It is possible to define nested structures of
-      arbitrary complexity. Kea does not use that data on its own, simply stores
-      and makes it available for the hook libraries.
-      </para>
-      <para>
-        Another use case for user contexts may be storing comments and other
-        information that will be retained by Kea. Regular comments are discarded
-        when configuration is loaded, but user contexts are retained. This is
-        useful if you want your comments to survive config-set, config-get
-        operations for example.
-      </para>
-      <para>
-        If user context is supported in a given context, the parser translates
-        "comment" entries into user context with a "comment" entry. The pretty
-        print of a configuration does the opposite operation and puts "comment"
-        entries at the beginning of maps as it seems to be the common usage.
-      </para>
-      <para>
-        As of Kea 1.3, the structures that allow user contexts are
-        pools of all types (addresses and prefixes) and subnets. Kea
-        1.4 extended user context support to the global scope, interfaces config,
-        shared networks, subnets, client classes, option datas and definitions,
-        host reservations, control socket, dhcp ddns, loggers and server id.
-        These are supported in both DHCPv4 and DHCPv6 at the exception
-        of server id which is DHCPv6 only.
-      </para>
-    </section>
-</chapter>
diff --git a/doc/guide/install.xml b/doc/guide/install.xml
deleted file mode 100644 (file)
index 0faa02a..0000000
+++ /dev/null
@@ -1,753 +0,0 @@
-<!--
- - Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-
-<!-- Converted by db4-upgrade version 1.1 -->
-<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="installation">
-    <title>Installation</title>
-
-    <section xml:id="packages">
-      <title>Packages</title>
-
-      <para>
-        Some operating systems or software package vendors may provide
-        ready-to-use, pre-built software packages for Kea. Installing a
-        pre-built package means you do not need to install the software
-        required only to build Kea and do not need to <emphasis>make</emphasis>
-        the software.
-      </para>
-
-    </section>
-
-    <section xml:id="install-hierarchy">
-      <title>Installation Hierarchy</title>
-      <para>
-        The following is the directory layout of the complete Kea installation.
-        (All directory paths are relative to the installation directory):
-        <itemizedlist>
-          <listitem>
-          <simpara>
-            <filename>etc/kea/</filename> â€”
-            configuration files.
-          </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <filename>include/</filename> â€”
-              C++ development header files.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <filename>lib/</filename> â€”
-              libraries.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <filename>lib/kea/hooks</filename> â€”
-              additional hooks libraries.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <filename>sbin/</filename> â€”
-              server software and commands used by the system administrator.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <filename>share/kea/</filename> â€”
-              configuration specifications and examples.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <filename>share/doc/kea/</filename> â€”
-              this guide, other supplementary documentation, and examples.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <filename>share/man/</filename> â€”
-              manual pages (online documentation).
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <filename>var/lib/kea/</filename> â€”
-              server identification, and lease databases files.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <filename>var/log/</filename> â€”
-              log files.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              <filename>var/run/kea/</filename> â€”
-              pid and logger lock files.
-            </simpara>
-          </listitem>
-        </itemizedlist>
-      </para>
-    </section>
-
-    <section xml:id="build-requirements">
-      <title>Building Requirements</title>
-
-        <para>
-          In addition to the run-time requirements (listed in <xref linkend="required-software"/>), building Kea from source code requires
-          various development include headers and program development tools.
-        </para>
-
-        <note>
-          <simpara>
-            Some operating systems have split their distribution packages into
-            a run-time and a development package. You will need to install
-            the development package versions, which include header files and
-            libraries, to build Kea from the source code.
-          </simpara>
-        </note>
-
-        <para>
-          Building from source code requires the following software installed
-          on the system:</para>
-          <itemizedlist>
-            <listitem>
-                <para>Boost C++ Libraries
-          (<uri xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.boost.org/">http://www.boost.org/</uri>).
-          The oldest Boost version used for testing is 1.57 (although it may also work with
-          older versions). The Boost system library must also be installed. Installing
-          a header-only version of Boost is no longer recommended.
-        </para>
-        </listitem>
-
-        <listitem>
-          <para>
-          OpenSSL (at least version 1.0.1) or Botan (at least version 1.9).
-          Note that OpenSSL version 1.0.2 or 1.1.0 or later and Botan version 2
-          or later are strongly recommended.
-          </para>
-        </listitem>
-
-        <listitem>
-          <para>
-            log4cplus (at least version 1.0.3)
-          development include headers.
-        </para>
-        </listitem>
-
-<!--
-TODO
-Debian and Ubuntu:
- libgmp3-dev and libbz2-dev required for botan too
--->
-
-        <listitem>
-        <para>
-          A C++ compiler (with C++11 support) and standard development
-          headers. Kea building was checked with GCC g++ 4.8.5 and some later
-          versions and Clang 800.0.38 and some later versions.
-        </para>
-        </listitem>
-
-        <listitem>
-        <para>
-          The development tools automake, libtool, pkg-config.
-        </para>
-        </listitem>
-
-        <listitem>
-        <para>
-          The MySQL client and the client development libraries, when using
-          the --with-mysql configuration flag to build the Kea MySQL
-          database backend. In this case, an instance of the MySQL server
-          running locally or on a machine reachable over a network
-          is required. Note that
-          running the unit tests requires a local MySQL server.
-        </para>
-        </listitem>
-
-        <listitem>
-        <para>
-          The PostgreSQL client and the client development libraries, when
-          using the --with-pgsql configuration flag to build the Kea
-          PostgreSQL database backend. In this case an instance of the
-          PostgreSQL server running locally or on some other machine,
-          reachable over the network from the machine running Kea, is
-          required. Note that running the unit tests requires a local
-          PostgreSQL server.
-        </para>
-        </listitem>
-
-        <listitem>
-        <para>
-          The cpp-driver from DataStax is needed when using the --with-cql
-          configuration flag to build Kea with the Cassandra database backend.
-          In this case, an instance of the Cassandra server running locally
-          or on some other machine, reachable over the network from the
-          machine running Kea, is required. Note that running the unit
-          tests requires a local Cassandra server.
-        </para>
-        </listitem>
-
-        <listitem>
-        <para>
-          The FreeRADIUS client library is required to connect to a RADIUS server.
-          (This is specified using the --with-freeradius configuration switch.)
-        </para>
-        </listitem>
-
-        <listitem>
-        <para>
-          Sysrepo (version 0.7.6 or later) and libyang (version 0.16-r2 or later)
-          are needed to connect to a Sysrepo database. (This is specified using
-          the --with-sysrepo switch when running "configure".)
-        </para>
-        </listitem>
-
-        <listitem>
-        <para>
-          googletest (version 1.8 or later), when using the --with-gtest configuration
-          option to build the unit tests.
-        </para>
-        </listitem>
-
-        <listitem>
-          <para>
-            The documentation generation tools elinks, docbook-xsl, libxslt, and Doxygen,
-            if using the --enable-generate-docs configuration option
-            to create the documentation.
-          </para>
-        </listitem>
-
-        </itemizedlist>
-
-        <para>
-          Visit ISC's Knowledgebase at
-          <uri xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://kb.isc.org/docs/installing-kea">https://kb.isc.org/docs/installing-kea</uri>
-          for system-specific installation tips.
-        </para>
-    </section>
-
-    <section xml:id="install">
-      <title>Installation from Source</title>
-      <para>
-        Although Kea may be available in pre-compiled, ready-to-use packages from operating system vendors, it is open source software written in C++. As such, it is freely available in
-        source code form from ISC as a downloadable tar file. The source code can also be obtained from the
-        Kea Gitlab repository at (<uri xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://gitlab.isc.org/isc-projects/kea">https://gitlab.isc.org/isc-projects/kea</uri>).
-        This section describes how to build Kea from the source code.
-      </para>
-
-      <section>
-
-        <title>Download Tar File</title>
-        <para>
-          The Kea release tarballs may be downloaded from:
-          <uri xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://ftp.isc.org/isc/kea/">http://ftp.isc.org/isc/kea/</uri> (using FTP or HTTP).
-        </para>
-      </section>
-
-      <section>
-        <title>Retrieve from Git</title>
-        <para>
-          Downloading this "bleeding edge" code is recommended only for
-          developers or advanced users. Using development code in a production
-          environment is not recommended.
-        </para>
-
-        <note>
-          <para>
-            When building from source code retrieved via Git, additional
-            software will be required: automake (v1.11 or later),
-            libtoolize, and autoconf (v2.69 or later).
-            These may need to be installed.
-          </para>
-        </note>
-
-        <para>
-          The latest development code is available on Gitlab (see
-          <uri xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://gitlab.isc.org/isc-projects/kea">https://gitlab.isc.org/isc-projects/kea</uri>). The Kea source
-          is public and development is done in the <quote>master</quote>
-          branch.
-        </para>
-        <para>
-          The code can be checked out from
-          <filename>https://gitlab.isc.org/isc-projects/kea.git</filename>:
-
-        <screen>$ <userinput>git clone https://gitlab.isc.org/isc-projects/kea.git</userinput></screen>
-        </para>
-
-        <para>
-          The code checked out from the git repository does not include the
-          generated configure script, Makefile.in files, nor their
-          related build files.
-          They can be created by running <command>autoreconf</command>
-          with the <option>--install</option> switch.
-          This will run <command>autoconf</command>,
-          <command>aclocal</command>,
-          <command>libtoolize</command>,
-          <command>autoheader</command>,
-          <command>automake</command>,
-          and related commands.
-        </para>
-
-        <para>
-          Write access to the Kea repository is only granted to ISC staff. If you
-          are a developer planning to contribute to Kea, please check our
-          <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://gitlab.isc.org/isc-projects/kea/wikis/contributor's-guide">Contributor's Guide</link>. The
-          <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://jenkins.isc.org/job/Kea_doc/doxygen/">Kea Developer's Guide</link> contains more information about the process, as
-          well as describes the requirements for contributed code to be accepted by ISC.
-        </para>
-
-      </section>
-
-
-      <section xml:id="configure">
-        <title>Configure Before the Build</title>
-        <para>
-          Kea uses the GNU Build System to discover build environment
-          details.
-          To generate the makefiles using the defaults, simply run:
-          <screen>$ <userinput>./configure</userinput></screen>
-        </para>
-        <para>
-          Run <command>./configure</command> with the <option>--help</option>
-          switch to view the different options. Some commonly-used options are:
-
-          <variablelist>
-
-          <varlistentry>
-            <term>--prefix</term>
-            <listitem>
-              <simpara>Define the installation location (the
-                default is <filename>/usr/local</filename>).
-              </simpara>
-            </listitem>
-          </varlistentry>
-
-          <varlistentry>
-            <term>--with-mysql</term>
-            <listitem>
-              <simpara>
-                Build Kea with code to allow it to store leases and
-                host reservations in a MySQL database.
-              </simpara>
-            </listitem>
-          </varlistentry>
-
-          <varlistentry>
-            <term>--with-pgsql</term>
-            <listitem>
-              <simpara>
-                Build Kea with code to allow it to store leases and
-                host reservations in a PostgreSQL database.
-              </simpara>
-            </listitem>
-          </varlistentry>
-
-          <varlistentry>
-            <term>--with-cql</term>
-            <listitem>
-              <simpara>
-                Build Kea with code to allow it to store leases and
-                host reservations in a Cassandra (CQL) database.
-              </simpara>
-            </listitem>
-          </varlistentry>
-
-          <varlistentry>
-            <term>--with-log4cplus</term>
-            <listitem>
-              <simpara>Define the path to find the Log4cplus headers
-                and libraries.  Normally this is not necessary.
-              </simpara>
-            </listitem>
-          </varlistentry>
-
-          <varlistentry>
-            <term>--with-boost-include</term>
-            <listitem>
-              <simpara>Define the path to find the Boost headers. Normally this is not necessary.
-              </simpara>
-            </listitem>
-          </varlistentry>
-
-          <varlistentry>
-            <term>--with-botan-config</term>
-            <listitem>
-              <simpara>Specify the path to the botan-config
-                script to build with Botan for cryptographic functions. It is prefered to use OpenSSL (see below).
-              </simpara>
-            </listitem>
-          </varlistentry>
-
-          <varlistentry>
-            <term>--with-openssl</term>
-            <listitem>
-              <simpara>Replace Botan by the OpenSSL the cryptographic library.
-                By default <command>configure</command> searches for a valid
-                Botan installation. If one is not found, it searches for OpenSSL.
-                Normally this is not necessary.
-              </simpara>
-            </listitem>
-          </varlistentry>
-
-          <varlistentry>
-            <term>--enable-shell</term>
-            <listitem>
-              <simpara>Build the optional <command>kea-shell</command> tool
-              (more in <xref linkend="kea-shell"/>). The default is to not
-              build it.
-              </simpara>
-            </listitem>
-          </varlistentry>
-
-          <varlistentry>
-            <term>--enable-perfdhcp</term>
-            <listitem>
-              <simpara>Build the optional <command>perfdhcp</command> DHCP
-              benchmarking tool. The default is to not build it.
-              </simpara>
-            </listitem>
-          </varlistentry>
-
-          </variablelist>
-          <note>
-            <para>
-              The <option>--runstatedir</option> in the installation
-              directories is particular: there are three cases:
-              <orderedlist>
-                 <listitem>
-                    <simpara>You use autoconf 2.70 or greater which supports
-                    this but this autoconf version has not been currently
-                    released.
-                    </simpara>
-                 </listitem>
-                 <listitem>
-                    <simpara>You use autoconf 2.69 patched to add support of
-                    this. In this case and the previous simply use when needed
-                    the <option>--runstatedir</option> configure parameter.
-                    </simpara>
-                 </listitem>
-                 <listitem>
-                    <simpara>There is no support (the configure parameter is
-                    not recognized and configure directly raises an error).
-                    For autoconf 2.69 the <option>runstatedir</option>
-                    environment variable is supported so simply remove the
-                    <command>--</command> before <option>runstatedir</option>
-                    in the configure script call.
-                    </simpara>
-                 </listitem>
-               </orderedlist>
-            </para>
-          </note>
-          <note>
-            <para>
-              For instructions concerning the installation and configuration
-              of database backends for Kea, see <xref linkend="dhcp-install-configure"/>.
-            </para>
-          </note>
-        </para>
-        <!-- TODO: lcov -->
-
-        <para>
-          There are also many additional options that are typically not used by
-          regular users. However, they may be useful for package maintainers,
-          developers or people who want to extend Kea code or send patches:
-          <variablelist>
-
-            <varlistentry>
-              <term>--with-gtest, --with-gtest-source</term>
-              <listitem>
-                <simpara>Enable the building of the C++ Unit Tests using the
-                Google Test framework. This option specifies the path to the
-                gtest source. (If the framework
-                is not installed on your system, it can be downloaded
-                from <ulink url="https://github.com/google/googletest"/>.)
-                </simpara>
-              </listitem>
-            </varlistentry>
-
-            <varlistentry>
-              <term>--enable-generate-docs</term>
-              <listitem>
-                <simpara>Enable the rebuilding Kea documentation. ISC publishes
-                Kea documentation for each release. However, in some cases you
-                may want to rebuild it. For example, if you want to change
-                something in the docs, or want to generate new one from git
-                sources that are not released yet.
-
-                The build procedure uses the xsltproc tool with the
-                nonet argument which disables fetching missing sources, e.g
-                docbook.xsl, from the Internet. If you want anyway to use
-                the Internet please set the XSLTPROC_NET environment variable
-                in configure to any non-empty value, e.g.
-                <screen>$ <replaceable>./configure XSLTPROC_NET=yes --enable-generate-docs</replaceable></screen>
-                </simpara>
-              </listitem>
-            </varlistentry>
-
-            <varlistentry>
-              <term>--enable-generate-parser</term>
-              <listitem>
-                <simpara>Many Kea components have parsers implemented using flex
-                (.ll files) and bison (.yy files). Kea sources have C++/h files
-                generated out from them. By default Kea does not use flex or
-                bison to avoid requiring installation of unnecessary
-                dependencies for users. However, if you change anything in the
-                parses (such as add new parameter), you will need to use flex
-                and bison to regenerate parsers. This option lets you do that.
-                </simpara>
-              </listitem>
-            </varlistentry>
-
-            <varlistentry>
-              <term>--enable-generate-messages</term>
-              <listitem>
-                <simpara>Enable the regeneration of messages files from
-                their messages source files, e.g. regenerate xxx_messages.h
-                and xxx_messages.cc from xxx_messages.mes using the Kea
-                message compiler. By default Kea is built using these .h
-                and .cc files from the distribution. However, if you change
-                anything in a .mes file (such as add new message), you will
-                need to build and use the Kea message compiler. This option
-                lets you do that.
-                </simpara>
-              </listitem>
-            </varlistentry>
-
-            <varlistentry>
-              <term>--with-benchmark, --with-benchmark-source</term>
-              <listitem>
-                <simpara>Enable the building of the database backend
-                benchmarks using the Google Benchmark framework. This
-                option specifies the path to the gtest source. (If the
-                framework is not installed on your system, it can be downloaded
-                from <ulink url="https://github.com/google/benchmark"/>.)
-                This support is experimental.
-                </simpara>
-              </listitem>
-            </varlistentry>
-
-          </variablelist>
-        </para>
-
-
-        <para>
-          For example, the following command configures Kea to find the
-          Boost headers in /usr/pkg/include, specifies that PostgreSQL
-          support should be enabled, and sets the installation location
-          to /opt/kea:
-
-          <screen>$ <userinput>./configure \
-      --with-boost-include=/usr/pkg/include \
-      --with-pgsql=/usr/local/bin/pg_config \
-      --prefix=/opt/kea</userinput></screen>
-        </para>
-
-        <para>
-          If you have any problems with building Kea using the header-only
-          Boost code, or you'd like to use the Boost system library
-          (assumed for the sake of this example to be located in /usr/pkg/lib):
-
-          <screen>$ <userinput>./configure \
-      --with-boost-libs=-lboost_system \
-      --with-boost-lib-dir=/usr/pkg/lib</userinput></screen>
-        </para>
-
-        <para>
-          If <command>configure</command> fails, it may be due to missing or old
-          dependencies.
-        </para>
-
-        <para>
-          If <command>configure</command> succeeds, it displays a report
-          with the parameters used to build the code. This report is saved into
-          the file <filename>config.report</filename> and is also embedded into
-          the executable binaries, e.g., <userinput>kea-dhcp4</userinput>.
-        </para>
-
-      </section>
-
-      <section>
-        <title>Build</title>
-        <para>
-          After the configure step is complete, build the executables
-          from the C++ code and prepare the Python scripts by running the command:
-          <screen>$ <userinput>make</userinput></screen>
-        </para>
-      </section>
-
-      <section>
-        <title>Install</title>
-        <para>
-          To install the Kea executables, support files,
-          and documentation, issue the command:
-          <screen>$ <userinput>make install</userinput></screen>
-        </para>
-        <para>
-          Do not use any form of parallel or job server options
-          (such as GNU make's <command>-j</command> option) when
-          performing this step; doing so may cause errors.
-        </para>
-        <note>
-          <para>The install step may require superuser privileges.</para>
-        </note>
-        <para>
-          If required, run <command>ldconfig</command> as root with
-          <filename>/usr/local/lib</filename> (or with <replaceable>prefix</replaceable>/lib if
-          configured with --prefix) in
-          <filename>/etc/ld.so.conf</filename> (or the relevant linker
-          cache configuration file for your OS):
-          <screen>$ <userinput>ldconfig</userinput></screen>
-        </para>
-        <note>
-          <para>
-            If you do not run <command>ldconfig</command> where it is
-            required, you may see errors like the following:
-            <screen>
-              program: error while loading shared libraries: libkea-something.so.1:
-              cannot open shared object file: No such file or directory
-            </screen>
-          </para>
-        </note>
-      </section>
-
-  <!-- @todo: tests -->
-
-    </section>
-
-    <section xml:id="dhcp-install-configure">
-      <title>DHCP Database Installation and Configuration</title>
-      <para>
-        Kea stores its leases in a lease database. The software has been
-        written in a way that makes it possible to choose which database product
-        should be used to store the lease information. At present, Kea supports
-        four database backends: MySQL, PostgreSQL, Cassandra, and Memfile. To
-        limit external dependencies, MySQL, PostgreSQL, and Cassandra support are
-        disabled by default and only Memfile is available. Support for the
-        optional external database backend must be explicitly included when Kea
-        is built. This section covers the building of Kea with one of the
-        optional backends and the creation of the lease database.
-      </para>
-
-      <note>
-        <simpara>
-          When unit tests are built with Kea (the --with-gtest configuration option is specified),
-          the databases must be manually pre-configured for the unit tests to run.
-          The details of this configuration can be found in the
-          <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://jenkins.isc.org/job/Kea_doc/doxygen/">Kea Developer's Guide</link>.
-        </simpara>
-      </note>
-
-      <section>
-        <title>Building with MySQL Support</title>
-        <para>
-          Install MySQL according to the instructions for your system. The client development
-          libraries must be installed.
-        </para>
-        <para>
-          Build and install Kea as described in <xref linkend="installation"/>, with
-          the following modification. To enable the MySQL database code, at the
-          "configure" step (see <xref linkend="configure"/>), the --with-mysql switch
-          should be specified:
-          <screen><userinput>./configure [other-options] --with-mysql</userinput></screen>
-              If MySQL was not installed in the default location, the location of the MySQL
-          configuration program "mysql_config" should be included with the switch, i.e.
-          <screen><userinput>./configure [other-options] --with-mysql=<replaceable>path-to-mysql_config</replaceable></userinput></screen>
-        </para>
-        <para>
-          See <xref linkend="mysql-database-create"/> for details regarding
-          MySQL database configuration.
-        </para>
-      </section>
-
-      <section>
-        <title>Building with PostgreSQL support</title>
-        <para>
-          Install PostgreSQL according to the instructions for your system. The client development
-          libraries must be installed. Client development libraries are often packaged as "libpq".
-        </para>
-        <para>
-          Build and install Kea as described in <xref linkend="installation"/>, with
-          the following modification. To enable the PostgreSQL database code, at the
-          "configure" step (see <xref linkend="configure"/>), the --with-pgsql switch
-          should be specified:
-          <screen><userinput>./configure [other-options] --with-pgsql</userinput></screen>
-              If PostgreSQL was not installed in the default location, the location of the PostgreSQL
-          configuration program "pg_config" should be included with the switch, i.e.
-          <screen><userinput>./configure [other-options] --with-pgsql=<replaceable>path-to-pg_config</replaceable></userinput></screen>
-        </para>
-        <para>
-          See <xref linkend="pgsql-database-create"/> for details regarding
-          PostgreSQL database configuration.
-        </para>
-      </section>
-
-      <section>
-        <title>Building with CQL (Cassandra) Support</title>
-        <para>
-          Install Cassandra according to the instructions for your system. The
-          Cassandra project website contains useful pointers: <uri xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://cassandra.apache.org">http://cassandra.apache.org</uri>.
-        </para>
-        <para>
-          If you have a cpp-driver package available as binary or as source,
-          simply install or build and install the package. Then build
-          and install Kea as described in <xref linkend="installation"/>.
-          To enable the Cassandra (CQL) database code, at the "configure"
-          step (see <xref linkend="configure"/>), do:
-          <screen><userinput>./configure [other-options] --with-cql=<replaceable>path-to-pkg-config</replaceable></userinput></screen>
-          Note if <command>pkg-config</command> is at its standard location
-          (and thus in the shell path) you do not need to supply its path.
-          If it does not work (e.g. no pkg-config, package not available in
-          pkg-config with the cassandra name), you can still use
-          the <command>cql_config</command> script in tools/ as described below.
-        </para>
-        <para>
-          Download and compile cpp-driver from DataStax. For details regarding
-          dependencies for building cpp-driver, see the project homepage
-          <uri xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://github.com/datastax/cpp-driver">https://github.com/datastax/cpp-driver</uri>. In June
-          2016, the following commands were used:
-          <screen>
-$ <userinput>git clone https://github.com/datastax/cpp-driver</userinput>
-$ <userinput>cd cpp-driver</userinput>
-$ <userinput>mkdir build</userinput>
-$ <userinput>cd build</userinput>
-$ <userinput>cmake ..</userinput>
-$ <userinput>make</userinput>
-</screen>
-        </para>
-        <para>
-          As of January 2019, cpp-driver does not include cql_config script.
-          Work is in progress to contribute such a script to the cpp-driver
-          project but, until that is complete, intermediate steps need to
-          be conducted. A cql_config script is present in the tools/ directory
-          of the Kea sources. Before using it, please create a
-          cql_config_defines.sh in the same directory (there is an example in
-          cql_config_define.sh.sample available; you may copy it over to
-          cql_config_defines.sh and edit the path specified in it) and change the
-          environment variable CPP_DRIVER_PATH to point to the directory where the
-          cpp-driver sources are located. Make sure that appropriate access
-          rights are set on this file. It should be executable by the system
-          user building Kea.
-        </para>
-        <para>
-          Build and install Kea as described in <xref linkend="installation"/>, with
-          the following modification. To enable the Cassandra (CQL) database code, at the
-          "configure" step (see <xref linkend="configure"/>), do:
-          <screen><userinput>./configure [other-options] --with-cql=<replaceable>path-to-cql_config</replaceable></userinput></screen>
-        </para>
-      </section>
-    </section>
-
-    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="hammer.xml"/>
-
-  </chapter>
diff --git a/doc/guide/intro.xml b/doc/guide/intro.xml
deleted file mode 100644 (file)
index ef4be8d..0000000
+++ /dev/null
@@ -1,242 +0,0 @@
-<!--
- - Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-
-<!-- need this include to make the &keaversion; macro work -->
-<!DOCTYPE book [
-<!ENTITY % keaversion SYSTEM "version.ent">
-%keaversion;
-]>
-
-<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="intro">
-    <title>Introduction</title>
-    <para>
-      Kea is the next generation of DHCP software developed by ISC.
-      It supports both DHCPv4 and DHCPv6 protocols along with their
-      extensions, e.g. prefix delegation and dynamic updates to DNS.
-    </para>
-
-    <para>
-      This guide covers Kea version &keaversion;.
-    </para>
-
-    <section>
-      <title>Supported Platforms</title>
-      <para>
-        Kea is officially supported on CentOS, Fedora, Ubuntu, Debian, and FreeBSD systems.
-        It is also likely to work on many other platforms. Kea-&keaversion; builds have been tested on:
-        <itemizedlist>
-          <listitem>CentOS Linux â€” 7.1804 (aka 7.5)</listitem>
-          <listitem>Fedora â€” 28, 29</listitem>
-          <listitem>Ubuntu â€” 16.04, 18.04</listitem>
-          <listitem>Debian GNU/Linux â€” 8, 9</listitem>
-          <listitem>FreeBSD â€” 11.0</listitem>
-          <listitem>macOS â€” 10.13, 10.14</listitem>
-        </itemizedlist>
-      </para>
-      <para>There are currently no plans to port Kea to Windows platforms.</para>
-    </section>
-
-    <section xml:id="required-software">
-      <title>Required Software at Run-time</title>
-
-      <para>
-        Running Kea uses various extra software packages which may
-        not be provided in the default installation of some operating systems,
-        nor in the standard package collections. You may
-        need to install this required software separately.
-        (For the build requirements, also see
-        <xref linkend="build-requirements"/>.)
-      </para>
-
-      <itemizedlist>
-
-        <listitem>
-            <simpara>
-        Kea supports two cryptographic libraries: Botan and OpenSSL. Only one of them
-        is required to be installed during compilation. Kea uses the Botan
-        library for C++ (<uri xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://botan.randombit.net/">http://botan.randombit.net/</uri>),
-        version 1.9 or later. Note that support for Botan versions earlier than 2.0 will be removed in Kea 1.6.0 and later. As an alternative to Botan, Kea can use the
-        OpenSSL cryptographic library (<uri xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.openssl.org/">http://www.openssl.org/</uri>),
-        version 1.0.2 or later.
-            </simpara>
-        </listitem>
-
-        <listitem>
-            <simpara>
-        Kea uses the log4cplus C++ logging library
-        (<uri xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://log4cplus.sourceforge.net/">http://log4cplus.sourceforge.net/</uri>).
-        It requires log4cplus version 1.0.3 or later.
-            </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            Kea requires the Boost system library (<uri xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.boost.org/">http://www.boost.org/</uri>). Building with the header-only version of Boost is no longer recommended.
-          </simpara>
-        </listitem>
-
-        <listitem>
-            <simpara>
-       In order to store lease information in a MySQL database, Kea requires MySQL
-    headers and libraries. This is an optional dependency in that Kea can be
-    built without MySQL support.
-            </simpara>
-        </listitem>
-
-        <listitem>
-            <simpara>
-       In order to store lease information in a PostgreSQL database, Kea requires PostgreSQL
-    headers and libraries. This is an optional dependency in that Kea can be
-    built without PostgreSQL support.
-            </simpara>
-        </listitem>
-
-        <listitem>
-            <simpara>
-       In order to store lease information in a Cassandra database (CQL), Kea
-    requires Cassandra headers and libraries. This is an optional dependency
-    in that Kea can be built without Cassandra support.
-            </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-    Integration with RADIUS is provided in Kea via the hooks
-    library available to our paid support customers. Use of this library requires
-    the FreeRadius-client library to be present on the system where Kea is running.
-    This is an optional dependency in that Kea can be built without RADIUS support.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-    As of the 1.5.0 release, Kea provides a NETCONF interface with the kea-netconf agent.
-    This Kea module is built optionally and requires Sysrepo software when used.
-    Building Kea with NETCONF support requires many dependencies to be installed,
-    which are described in more detail in <xref linkend="netconf-install"/>.
-          </simpara>
-        </listitem>
-      </itemizedlist>
-    </section>
-
-    <section xml:id="kea_software">
-      <title>Kea Software</title>
-      <para>
-        Kea is modular. Part of this modularity is
-        accomplished using multiple cooperating processes which, together,
-        provide the server functionality.
-        The following software is included with Kea:
-      </para>
-
-      <para>
-
-        <itemizedlist>
-
-          <listitem>
-            <simpara>
-              <command>keactrl</command> â€”
-              Tool to start, stop, reconfigure, and report status
-              for the Kea servers.
-            </simpara>
-          </listitem>
-
-          <listitem>
-            <simpara>
-              <command>kea-dhcp4</command> â€”
-              The DHCPv4 server process.
-              This process responds to DHCPv4 queries from clients.
-            </simpara>
-          </listitem>
-
-          <listitem>
-            <simpara>
-              <command>kea-dhcp6</command> â€”
-              The DHCPv6 server process.
-              This process responds to DHCPv6 queries from clients.
-            </simpara>
-          </listitem>
-
-          <listitem>
-            <simpara>
-              <command>kea-dhcp-ddns</command> â€”
-              The DHCP Dynamic DNS process.
-              This process acts as an intermediary between the DHCP servers
-              and DNS servers. It receives name update requests from the DHCP
-              servers and sends DNS update messages to the DNS servers.
-            </simpara>
-          </listitem>
-
-          <listitem>
-            <simpara>
-              <command>kea-admin</command> â€”
-              A useful tool for database backend maintenance (creating a new
-              database, checking versions, upgrading, etc.)
-            </simpara>
-          </listitem>
-
-          <listitem>
-            <simpara>
-              <command>kea-lfc</command> â€”
-              This process removes redundant information from the files used
-              to provide persistent storage for the memfile database backend.
-              While it can be run standalone, it is normally run as and when
-              required by the Kea DHCP servers.
-            </simpara>
-          </listitem>
-
-          <listitem>
-            <simpara>
-              <command>kea-ctrl-agent</command> â€”
-              Kea Control Agent (CA) is a daemon that exposes a RESTful control
-              interface for managing Kea servers.
-            </simpara>
-          </listitem>
-
-          <listitem>
-            <simpara>
-              <command>kea-netconf</command> -
-              Kea netconf is an agent that provides a YANG/NETCONF interface
-              for the Kea environment.
-            </simpara>
-          </listitem>
-
-          <listitem>
-            <simpara>
-              <command>kea-shell</command> â€”
-              This simple text client uses the REST interface to connect to the Kea
-              Control Agent.
-            </simpara>
-          </listitem>
-
-          <listitem>
-            <simpara>
-              <command>perfdhcp</command> â€”
-              A DHCP benchmarking tool which simulates multiple clients to
-              test both DHCPv4 and DHCPv6 server performance.
-            </simpara>
-          </listitem>
-
-        </itemizedlist>
-      </para>
-
-    </section>
-
-    <para>
-      The tools and modules are covered in full detail in this guide.
-<!-- TODO point to these -->
-      In addition, manual pages are also provided in the default installation.
-    </para>
-
-    <para>
-      Kea also provides C++ libraries and programmer interfaces for
-      DHCP. These include detailed developer documentation and
-      code examples.
-<!-- TODO point to this -->
-    </para>
-
-  </chapter>
diff --git a/doc/guide/kea-guide.css b/doc/guide/kea-guide.css
deleted file mode 100644 (file)
index a8e34e7..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-body {
-       background-color: #ffffff;
-       color: #333333;
-       font-family: "ArialMT", "Verdana", "Arial", "Helvetica", sans-serif;
-       font-size: 14px;
-       line-height: 18px;
-       margin: 2em;
-}
-
-.command {
-       font-family: "Courier New", "Courier", monospace;
-       font-weight: normal;
-}
-
-.note {
-       background-color: #ddeedd;
-       border: 1px solid #aaccaa;
-       margin: 1em 0 1em 0;
-       padding: 0.5em 1em 0.5em 1em;
-       -moz-border-radius: 10px;
-       -webkit-border-radius: 10px;
-}
-
-.screen {
-       background-color: #ffffee;
-       border: 1px solid #ddddaa;
-       padding: 0.25em 1em 0.25em 1em;
-       margin: 1em 0 1em 0;
-       -moz-border-radius: 10px;
-       -webkit-border-radius: 10px;
-}
-
-.warning {
-       background-color: #eedddd;
-       border: 1px solid #ccaaaa;
-       margin: 1em 0 1em 0;
-       padding: 0.5em 1em 0.5em 1em;
-       -moz-border-radius: 10px;
-       -webkit-border-radius: 10px;
-}
-
-h3 {
-       text-decoration: underline;
-}
-
-h4 {
-       text-decoration: underline;
-       font-weight: normal;
-}
\ No newline at end of file
diff --git a/doc/guide/kea-guide.xml b/doc/guide/kea-guide.xml
deleted file mode 100644 (file)
index d43e07c..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-<?xml version="1.0"?>
-<!--
- - Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-
-<!-- need this include to make the &keaversion; macro work -->
-<!DOCTYPE book [
-<!ENTITY % keaversion SYSTEM "version.ent">
-%keaversion;
-]>
-
-<!-- Converted by db4-upgrade version 1.1 -->
-<book xmlns="http://docbook.org/ns/docbook" version="5.0">
-  <?xml-stylesheet href="kea-guide.css" type="text/css"?>
-
-  <info>
-
-    <title>
-    <inlinemediaobject>
-        <imageobject>
-            <imagedata fileref="kea-logo-100x70.png" align="left"/>
-        </imageobject>
-    </inlinemediaobject>
-    Kea Administrator Reference Manual
-    </title>
-
-    <releaseinfo>This is the reference guide for Kea version &keaversion;.</releaseinfo>
-
-    <copyright>
-      <year>2010-2019</year>
-      <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
-    </copyright>
-
-    <abstract>
-
-      <para>
-        Kea is an open source implementation of the Dynamic Host Configuration
-        Protocol (DHCP) servers, developed and maintained by Internet Systems
-        Consortium (ISC).
-      </para>
-
-      <para>
-        This is the reference guide for Kea version &keaversion;.
-        Links to the most up-to-date version of this document (in PDF, HTML,
-        and plain text formats), along with other documents for
-        Kea, can be found in ISC's <uri xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://kb.isc.org/docs/kea-administrator-reference-manual">Knowledgebase</uri>.
-        </para> </abstract>
-
-  </info>
-
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="intro.xml"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="quickstart.xml"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="install.xml"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="admin.xml"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="config.xml"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="keactrl.xml"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="agent.xml"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dhcp4-srv.xml"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dhcp6-srv.xml"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="lease-expiration.xml"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="congestion-handling.xml"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ddns.xml"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="lfc.xml"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="classify.xml"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="hooks.xml"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="stats.xml"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ctrl-channel.xml"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="logging.xml"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="shell.xml"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="netconf.xml"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="api.xml"/>
-
-  <appendix xml:id="acknowledgments">
-      <title>Acknowledgments</title>
-
-      <para>Kea is an open source project designed, developed, and maintained by Internet Systems
-      Consortium, Inc, a 501(c)3 non-profit organization. ISC is primarily funded by revenues from
-      support subscriptions for our open source, and we encourage all professional users to consider
-      this option. To learn more, see â€‹<ulink
-      url="https://www.isc.org/support/">https://www.isc.org/support/</ulink>.</para>
-
-      <para>If you would like to contribute to ISC to assist us in continuing to make quality open
-      source software, please visit our donations page at â€‹<ulink
-      url="https://www.isc.org/donate/">https://www.isc.org/donate/</ulink>.</para>
-
-      <para>We thank all the organizations and individuals who have helped to make Kea
-      possible. <link xmlns:xlink="http://www.w3.org/1999/xlink"
-      xlink:href="http://www.comcast.com/">Comcast</link>
-       and the Comcast Innovation Fund provided major support for the development
-      of Kea's DHCPv4, DHCPv6, and DDNS modules. Mozilla funded initial work on the REST API via a
-      MOSS award.</para>
-
-      <para>Kea was initially implemented as a collection of applications
-      within the BIND 10 framework. We thank the founding sponsors of the BIND 10 project:
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.afilias.info/">Afilias</link>,
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.iis.se/">IIS.SE</link>,
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.nominet.org.uk/">Nominet</link>,
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.sidn.nl/">SIDN</link>,
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://jprs.co.jp/">JPRS</link>,
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://cira.ca/">CIRA</link>; and additional sponsors
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.afnic.fr/">AFNIC</link>,
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.cnnic.net.cn/">CNNIC</link>,
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.nic.cz/">CZ.NIC</link>,
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.denic.de/">DENIC eG</link>,
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.google.com/">Google</link>,
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.ripe.net/">RIPE NCC</link>,
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://registro.br/">Registro.br</link>,
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://nzrs.net.nz/">.nz Registry Services</link>, and
-      <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.tcinet.ru/">Technical Center of Internet</link>
-      .</para>
-
-    </appendix>
-
-<!-- TODO: Add bibliography section (mostly RFCs, probably) -->
-
-
-<!-- TODO: how to help: run unit tests, join lists, review trac tickets -->
-
-  <!-- <index>    <title>Index</title> </index> -->
-
-</book>
diff --git a/doc/guide/keactrl.xml b/doc/guide/keactrl.xml
deleted file mode 100644 (file)
index 2bce940..0000000
+++ /dev/null
@@ -1,381 +0,0 @@
-<!--
- - Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-
-<!-- Converted by db4-upgrade version 1.1 -->
-<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="keactrl">
-    <title>Managing Kea with keactrl</title>
-
-    <section xml:id="keactrl-overview">
-      <title>Overview</title>
-      <para>keactrl is a shell script which controls the startup, shutdown,
-      and reconfiguration of the Kea servers (<command>kea-dhcp4</command>,
-      <command>kea-dhcp6</command>, <command>kea-dhcp-ddns</command>,
-      <command>kea-ctrl-agent</command>, and
-      <command>kea-netconf</command>). It also provides the means for
-      checking the current status of the servers and determining the
-      configuration files in use.
-      </para>
-    </section>
-
-    <section xml:id="keactrl-usage">
-      <title>Command Line Options</title>
-      <para><command>keactrl</command> is run as follows:
-<screen>
-keactrl &lt;command&gt; [-c keactrl-config-file] [-s server[,server,...]]
-</screen>
-      </para>
-
-      <para>
-        <command>&lt;command&gt;</command> is the one of the commands
-        described in <xref linkend="keactrl-commands"/>.
-      </para>
-
-      <para>
-        The optional <command>-c keactrl-config-file</command> switch
-        allows specification of an alternate <command>keactrl</command>
-        configuration file. (<command>--ctrl-config</command> is a synonym for
-        <command>-c</command>.) In the absence of <command>-c</command>,
-        <command>keactrl</command> will use the default configuration
-        file <filename>[kea-install-dir]/etc/kea/keactrl.conf</filename>.
-      </para>
-
-      <para>
-        The optional <command>-s server[,server,...]</command> switch selects
-        the servers to which the command is issued.
-        (<command>--server</command> is a synonym for <command>-s</command>.)
-        If absent, the command is sent to all servers enabled in the keactrl
-        configuration file.
-        If multiple servers are specified, they
-        should be separated by commas with no intervening spaces.
-      </para>
-    </section>
-
-    <section xml:id="keactrl-config-file">
-      <title>The keactrl Configuration File</title>
-      <para>
-        Depending on requirements, not all of the available servers need
-        to be run. The keactrl configuration file sets which servers are
-        enabled and which are disabled. The default configuration
-        file is <filename>[kea-install-dir]/etc/kea/keactrl.conf</filename>,
-        but this can be overridden on a per-command basis using the
-        <command>-c</command> switch.
-      </para>
-
-      <para>
-        The contents of <filename>keactrl.conf</filename> are:
-<screen>
-# This is a configuration file for keactrl script which controls
-# the startup, shutdown, reconfiguration and gathering the status
-# of the Kea's processes.
-
-# prefix holds the location where the Kea is installed.
-prefix=@prefix@
-
-# Location of Kea configuration file.
-kea_dhcp4_config_file=@sysconfdir@/@PACKAGE@/kea-dhcp4.conf
-kea_dhcp6_config_file=@sysconfdir@/@PACKAGE@/kea-dhcp6.conf
-kea_dhcp_ddns_config_file=@sysconfdir@/@PACKAGE@/kea-dhcp-ddns.conf
-kea_ctrl_agent_config_file=@sysconfdir@/@PACKAGE@/kea-ctrl-agent.conf
-kea_netconf_config_file=@sysconfdir@/@PACKAGE@/kea-netconf.conf
-
-
-# Location of Kea binaries.
-exec_prefix=@exec_prefix@
-dhcp4_srv=@sbindir@/kea-dhcp4
-dhcp6_srv=@sbindir@/kea-dhcp6
-dhcp_ddns_srv=@sbindir@/kea-dhcp-ddns
-ctrl_agent_srv=@sbindir@/kea-ctrl-agent
-netconf_srv=@sbindir@/kea-netconf
-
-# Start DHCPv4 server?
-dhcp4=yes
-
-# Start DHCPv6 server?
-dhcp6=yes
-
-# Start DHCP DDNS server?
-dhcp_ddns=no
-
-# Start Control Agent?
-ctrl_agent=yes
-
-# Start Netconf?
-netconf=no
-
-# Be verbose?
-kea_verbose=no
-</screen>
-      </para>
-
-<note>
-   <para>
-      In the example above, strings of the form @something@ are replaced by the
-      appropriate values when Kea is installed.
-   </para>
-</note>
-
-      <para>
-        The <parameter>dhcp4</parameter>, <parameter>dhcp6</parameter>,
-        <parameter>dhcp_ddns</parameter>, <parameter>ctrl_agent</parameter>,
-        and <parameter>netconf</parameter>
-        parameters set to "yes" will configure <command>keactrl</command> to manage
-        (start, reconfigure) all servers, i.e. <command>kea-dhcp4</command>,
-        <command>kea-dhcp6</command>, <command>kea-dhcp-ddns</command>,
-        <command>kea-ctrl-agent</command>, and <command>kea-netconf</command>.
-        When any of these parameters is set
-        to "no," the <command>keactrl</command> will ignore
-        the corresponding server when starting or reconfiguring Kea. Some
-        daemons (ddns and netconf) are disabled by default.
-      </para>
-
-      <para>
-        By default, Kea servers managed by <command>keactrl</command> are
-        located in <filename>[kea-install-dir]/sbin</filename>. This
-        should work for most installations. If the default
-        location needs to be altered for any reason, the paths
-        specified with the <parameter>dhcp4_srv</parameter>,
-        <parameter>dhcp6_srv</parameter>, <parameter>dhcp_ddns_srv</parameter>
-        <parameter>ctrl_agent_srv</parameter>, and <parameter>netconf_srv</parameter>
-        parameters should be modified.
-      </para>
-
-      <para>
-        The <parameter>kea_verbose</parameter> parameter specifies the verbosity
-        of the servers being started. When <parameter>kea_verbose</parameter>
-        is set to "yes" the logging level of the server is set to DEBUG.
-        Modification of the logging severity in a configuration file, as
-        described in <xref linkend="logging"/>, will have no effect as long
-        as the <parameter>kea_verbose</parameter> is set to "yes." Setting
-        it to "no" will cause the server to use the logging levels specified
-        in the Kea configuration file. If no
-        logging configuration is specified, the default settings will be
-        used.
-      </para>
-
-      <note>
-        <para>
-          The verbosity for the server is set when it is started. Once
-          started, the verbosity can be only changed by stopping the server and
-          starting it again with the new value of the
-          <parameter>kea_verbose</parameter> parameter.
-        </para>
-      </note>
-    </section>
-
-    <section xml:id="keactrl-commands">
-      <title>Commands</title>
-      <para>The following commands are supported by <command>keactrl</command>:
-      <itemizedlist>
-        <listitem><simpara>
-          <command>start</command> - starts selected servers.
-        </simpara></listitem>
-        <listitem><simpara>
-          <command>stop</command> - stops all running servers.
-        </simpara></listitem>
-        <listitem><simpara>
-          <command>reload</command> - triggers reconfiguration of the
-          selected servers by sending the SIGHUP signal to them.
-        </simpara></listitem>
-        <listitem><simpara>
-          <command>status</command> - returns the status of the servers (active
-          or inactive) and the names of the configuration files in use.
-        </simpara></listitem>
-        <listitem><simpara>
-          <command>version</command> - prints out the version of the
-          keactrl tool itself, together with the versions of the Kea daemons.
-        </simpara></listitem>
-      </itemizedlist>
-      </para>
-
-      <para>Typical output from <command>keactrl</command> when starting
-      the servers looks similar to the following:
-<screen>
-<userinput>$ keactrl start</userinput>
-INFO/keactrl: Starting kea-dhcp4 -c /usr/local/etc/kea/kea-dhcp4.conf -d
-INFO/keactrl: Starting kea-dhcp6 -c /usr/local/etc/kea/kea-dhcp6.conf -d
-INFO/keactrl: Starting kea-dhcp-ddns -c /usr/local/etc/kea/kea-dhcp-ddns.conf -d
-INFO/keactrl: Starting kea-ctrl-agent -c /usr/local/etc/kea/kea-ctrl-agent.conf -d
-INFO/keactrl: Starting kea-netconf -c /usr/local/etc/kea/kea-netconf.conf -d
-</screen>
-      </para>
-
-      <para>Kea's servers create PID files upon startup. These files are used
-      by keactrl to determine whether a given server is running. If
-      one or more servers are running when the start command is issued, the
-      output will look similar to the following:
-<screen>
-<userinput>$ keactrl start</userinput>
-INFO/keactrl: kea-dhcp4 appears to be running, see: PID 10918, PID file: /usr/local/var/run/kea/kea.kea-dhcp4.pid.
-INFO/keactrl: kea-dhcp6 appears to be running, see: PID 10924, PID file: /usr/local/var/run/kea/kea.kea-dhcp6.pid.
-INFO/keactrl: kea-dhcp-ddns appears to be running, see: PID 10930, PID file: /usr/local/var/run/kea/kea.kea-dhcp-ddns.pid.
-INFO/keactrl: kea-ctrl-agent appears to be running, see: PID 10931, PID file: /usr/local/var/run/kea/kea.kea-ctrl-agent.pid.
-INFO/keactrl: kea-netconf appears to be running, see: PID 10123, PID file: /usr/local/var/run/kea/kea.kea-netconf.pid.
-</screen>
-      During normal shutdowns these PID files are deleted. They may, however,
-      be left over as remnants following a system crash. It is possible,
-      though highly unlikely, that upon system restart the PIDs they contain may
-      actually refer to processes unrelated to Kea. This condition will cause
-      keactrl to decide that the servers are running, when in fact they are
-      not. In such a case the PID files as listed in the keactrl output
-      must be manually deleted.
-      </para>
-
-      <para>The following command stops all servers:
-<screen>
-<userinput>$ keactrl stop</userinput>
-INFO/keactrl: Stopping kea-dhcp4...
-INFO/keactrl: Stopping kea-dhcp6...
-INFO/keactrl: Stopping kea-dhcp-ddns...
-INFO/keactrl: Stopping kea-ctrl-agent...
-INFO/keactrl: Stopping kea-netconf...
-</screen>
-      Note that the <command>stop</command> command will attempt to stop all servers
-      regardless of whether they are "enabled" in the <filename>keactrl.conf</filename>.
-      If any of the servers are not running, an informational message
-      is displayed as in the <command>stop</command> command output below.
-<screen>
-<userinput>$ keactrl stop</userinput>
-INFO/keactrl: kea-dhcp4 isn't running.
-INFO/keactrl: kea-dhcp6 isn't running.
-INFO/keactrl: kea-dhcp-ddns isn't running.
-INFO/keactrl: kea-ctrl-agent isn't running.
-INFO/keactrl: kea-netconf isn't running.
-</screen>
-      </para>
-
-      <para>
-        As already mentioned, the reconfiguration of each Kea server is
-        triggered by the SIGHUP signal. The <command>reload</command>
-        command sends the SIGHUP signal to the servers that are enabled in
-        the <command>keactrl</command> configuration file and are
-        currently running. When a server receives the SIGHUP signal it
-        re-reads its configuration file and, if the new configuration is
-        valid, uses the new configuration. A reload is executed as follows:
-<screen>
-<userinput>$ keactrl reload</userinput>
-INFO/keactrl: Reloading kea-dhcp4...
-INFO/keactrl: Reloading kea-dhcp6...
-INFO/keactrl: Reloading kea-dhcp-ddns...
-INFO/keactrl: Reloading kea-ctrl-agent...
-</screen>
-      If any of the servers are not running, an informational message
-      is displayed as in the <command>reload</command> command output below.
-      Note that as of version 1.5.0, kea-netconf does not support the SIGHUP
-      signal. If its configuration has changed, please stop and restart it for
-      the change to take effect. This limitation will be removed in a future release.
-<screen>
-<userinput>$ keactrl stop</userinput>
-INFO/keactrl: kea-dhcp4 isn't running.
-INFO/keactrl: kea-dhcp6 isn't running.
-INFO/keactrl: kea-dhcp-ddns isn't running.
-INFO/keactrl: kea-ctrl-agent isn't running.
-INFO/keactrl: kea-netconf isn't running.
-</screen>
-      </para>
-
-      <note>
-        NETCONF is an optional feature that is disabled by default and can be
-        enabled during compilation. If Kea was compiled without NETCONF support,
-        keactrl will do its best to not bother the user with information about
-        it. The netconf entries will still be present in the keactrl.conf file,
-        but netconf status will not be shown and other commands will ignore it.
-      </note>
-
-      <note>
-        <para>
-          Currently <command>keactrl</command> does not report configuration
-          failures when the server is started or reconfigured. To check if
-          the server's configuration succeeded, the Kea log must be examined
-          for errors. By default, this is written to the syslog file.
-        </para>
-      </note>
-
-      <para>
-        Sometimes it is useful to check which servers are running. The
-        <command>status</command> reports this, with typical output that looks like:
-<screen>
-<userinput>$ keactrl status</userinput>
-DHCPv4 server: active
-DHCPv6 server: inactive
-DHCP DDNS: active
-Control Agent: active
-Netconf agent: inactive
-Kea configuration file: /usr/local/etc/kea/kea.conf
-Kea DHCPv4 configuration file: /usr/local/etc/kea/kea-dhcp4.conf
-Kea DHCPv6 configuration file: /usr/local/etc/kea/kea-dhcp6.conf
-Kea DHCP DDNS configuration file: /usr/local/etc/kea/kea-dhcp-ddns.conf
-Kea Control Agent configuration file: /usr/local/etc/kea/kea-ctrl-agent.conf
-Kea Netconf configuration file: /usr/local/etc/kea/kea-netconf.conf
-keactrl configuration file: /usr/local/etc/kea/keactrl.conf
-</screen>
-      </para>
-    </section>
-
-    <section xml:id="keactrl-overriding-servers">
-      <title>Overriding the Server Selection</title>
-      <para>
-        The optional <command>-s</command> switch allows
-        the selection of the servers to which the <command>keactrl</command>
-        command is issued. For example, the following
-        instructs <command>keactrl</command> to stop the
-        <command>kea-dhcp4</command> and <command>kea-dhcp6</command> servers
-        and leave the <command>kea-dhcp-ddns</command> and
-        <command>kea-ctrl-agent</command> running:
-<screen>
-<userinput>$ keactrl stop -s dhcp4,dhcp6</userinput>
-</screen>
-      </para>
-
-      <para>
-        Similarly, the following
-        will start only the <command>kea-dhcp4</command> and
-        <command>kea-dhcp-ddns</command> servers, but not
-        <command>kea-dhcp6</command> or <command>kea-ctrl-agent</command>.
-<screen>
-<userinput>$ keactrl start -s dhcp4,dhcp_ddns</userinput>
-</screen>
-      </para>
-      <para>
-        Note that the behavior of the <command>-s</command> switch
-        with the <command>start</command> and <command>reload</command> commands
-        is different to its behavior with the <command>stop</command> command.
-        On <command>start</command> and <command>reload</command>,
-        <command>keactrl</command> will check if the servers given as
-        parameters to the <command>-s</command> switch are
-        enabled in the <command>keactrl</command> configuration file;
-        if not, the server will be ignored. For <command>stop</command>, however,
-        this check is not made; the command is applied to all listed servers,
-        regardless of whether they have been enabled in the file.
-      </para>
-
-      <para>
-        The following keywords can be used with the <command>-s</command>
-        command line option:
-        <itemizedlist>
-          <listitem><simpara>
-            <command>dhcp4</command> for <command>kea-dhcp4</command>.
-          </simpara></listitem>
-          <listitem><simpara>
-            <command>dhcp6</command> for <command>kea-dhcp6</command>.
-          </simpara></listitem>
-          <listitem><simpara>
-            <command>dhcp_ddns</command> for <command>kea-dhcp-ddns</command>.
-          </simpara></listitem>
-          <listitem><simpara>
-            <command>ctrl_agent</command> for <command>kea-ctrl-agent</command>.
-          </simpara></listitem>
-          <listitem><simpara>
-            <command>netconf</command> for <command>kea-netconf</command>.
-          </simpara></listitem>
-          <listitem><simpara>
-            <command>all</command> for all servers (default).
-          </simpara></listitem>
-        </itemizedlist>
-      </para>
-    </section>
-  </chapter>
diff --git a/doc/guide/lease-expiration.xml b/doc/guide/lease-expiration.xml
deleted file mode 100644 (file)
index a970ef6..0000000
+++ /dev/null
@@ -1,377 +0,0 @@
-<!--
- - Copyright (C) 2015-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-
-<!-- Converted by db4-upgrade version 1.1 -->
-<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="lease-expiration">
-  <title>Lease Expiration in DHCPv4 and DHCPv6</title>
-
-  <para>The primary role of the DHCP server is to assign addresses and/or
-  delegate prefixes to DHCP clients. These addresses and prefixes are
-  often referred to as "leases." Leases are typically assigned to clients
-  for a finite amount of time, known as the "valid lifetime." DHCP clients who
-  wish to continue using their assigned leases will periodically renew them
-  by sending the appropriate message to the DHCP server. The DHCP server records
-  the time when these leases are renewed and calculates new expiration times
-  for them.
-  </para>
-
-  <para>If the client does not renew a lease before its valid lifetime
-  elapses, the lease is considered expired. There are many situations
-  when the client may cease lease renewals; a common scenario is when
-  the machine running the client shuts down for an extended period of
-  time.</para>
-
-  <para> The process through which the DHCP server makes expired leases
-  available for reassignment is referred to as "lease reclamation" and expired
-  leases returned to availability through this process are referred to as
-  "reclaimed."
-  The DHCP server attempts to reclaim an expired lease as soon as it detects
-  that it has expired. The server has several possible ways to detect expiration:
-  it may attempt to allocate a lease to a client but find this
-  lease already present in the database and expired; or it can
-  periodically query the lease
-  database for expired leases. Regardless of how an expired lease is detected, it must be
-  reclaimed before it can be assigned to a client.
-  </para>
-  <para>
-  This chapter explains how to configure the server to periodically query
-  for the expired leases, and how to minimize the impact of the periodic lease
-  reclamation process on the server's responsiveness. Finally, it explains
-  "lease affinity," which provides the means to assign the same lease to a
-  returning client after its lease has expired.
-  </para>
-
-  <para>Although all configuration examples in this section are provided
-  for the DHCPv4 server, the same parameters may be used for
-  DHCPv6 server configuration.
-  </para>
-
-  <section xml:id="lease-reclamation">
-    <title>Lease Reclamation</title>
-    <para>Lease reclamation is the process through which an expired lease
-    becomes available for assignment to the same or a different client.
-    This process involves the following steps for each reclaimed lease:
-    </para>
-
-    <itemizedlist>
-      <listitem>
-        <simpara>Invoke callouts for the <command>lease4_expire</command> or
-        <command>lease6_expire</command> hook points, if hook libraries
-        supporting those callouts are currently loaded.</simpara>
-      </listitem>
-      <listitem>
-        <simpara>Update the DNS, i.e. remove any DNS entries associated with
-        the expired lease.</simpara>
-      </listitem>
-      <listitem>
-        <simpara>Update lease information in the lease database to
-        indicate that the lease is now available for re-assignment.</simpara>
-      </listitem>
-      <listitem>
-        <simpara>Update counters on the server, a process that includes
-        increasing the number of reclaimed leases and decreasing the
-        number of assigned addresses or delegated prefixes.</simpara>
-      </listitem>
-    </itemizedlist>
-
-    <para>Please refer to <xref linkend="dhcp-ddns-server"/> to see
-    how to configure DNS updates in Kea, and to
-    <xref linkend="hooks-libraries"/> for information about using
-    hooks libraries.</para>
-  </section>
-
-  <section xml:id="lease-reclamation-defaults">
-    <title>Lease Reclamation Configuration Parameters</title>
-    <para>The following list presents all configuration parameters
-    pertaining to processing expired leases with their default values:</para>
-
-    <itemizedlist>
-      <listitem>
-        <simpara><command>reclaim-timer-wait-time</command> - This parameter
-        governs intervals between completion of previous reclaimation cycle
-        and a start of the next one. Specified in seconds. The default value
-        is 10 [seconds].</simpara>
-      </listitem>
-      <listitem>
-        <simpara><command>flush-reclaimed-timer-wait-time</command> - This
-        parameter controls how often the server initiates lease reclaimation
-        procedure. Expressed in seconds. The default value is 25 [seconds].</simpara>
-      </listitem>
-      <listitem>
-        <simpara><command>hold-reclaimed-time</command> - This parameter governs
-        how long the lease should be kept after it was reclaimed. This enables
-        lease affinity when set to a non-zero value. Expressed in seconds. The
-        default value is 3600 [seconds].</simpara>
-      </listitem>
-      <listitem>
-        <simpara><command>max-reclaim-leases</command> - This parameter
-        specifies the maximum number of reclaimed leases that can be processed
-        in one go. Zero means unlimited (i.e. process all reclaimed leases). The
-        default value is 100.</simpara>
-      </listitem>
-      <listitem>
-        <simpara><command>max-reclaim-time</command> - This parameter specifies
-        an upper bound of how long a lease reclaimation procedure can
-        take. Zero means no time limit. Expressed in milliseconds. The default
-        value is 250 [milliseconds].</simpara>
-      </listitem>
-      <listitem>
-        <simpara><command>unwarned-reclaim-cycles</command> - If lease
-        reclaimation limits are specifed (<command>max-reclaim-leases</command>
-        and/oor <command>max-reclaim-time</command>), then under certain
-        circumstances the server may not be able to deal with leases to be
-        reclaimed fast enough. This parameter specifies how many consecutive
-        clean up cycles must end with remaining leases to be processed before a
-        warning is printed. The default is 5 [cycles].
-        </simpara>
-      </listitem>
-    </itemizedlist>
-
-    <para>
-      The parameters are explained in more detail in the rest of this chapter.
-    </para>
-
-    <para>The default value for any parameter is used when this parameter is not
-    explicitly specified in the configuration. Also, the
-    <command>expired-leases-processing</command> map may be omitted entirely
-    in the configuration, in which case the default values are used for all
-    parameters listed above.</para>
-
-  </section>
-
-  <section xml:id="lease-reclaim-config">
-    <title>Configuring Lease Reclamation</title>
-    <para>Kea can be configured to periodically detect and reclaim expired
-    leases. During this process the lease entries in the database are
-    modified or removed. While this is happening, the server will not process incoming DHCP
-    messages to avoid issues with concurrent access to database information.
-    As a result, the server will be unresponsive while lease reclamation
-    is performed and DHCP queries will accumulate; responses will be
-    sent once the lease-reclamation cycle is complete.</para>
-
-    <para>In deployments where response time is critical, administrators may
-    wish to minimize the interruptions in service caused by lease reclamation.
-    Toward this end, Kea provides configuration parameters to control the
-    frequency of lease reclamation cycles, the maximum number of leases
-    processed in a single reclamation cycle, and the maximum amount of time a
-    single reclamation cycle is allowed to run before being interrupted. The
-    following examples demonstrate how these parameters can be used:
-
-<screen>
-"Dhcp4": {
-    ...
-
-    "expired-leases-processing": {
-        "reclaim-timer-wait-time": 5,
-        "max-reclaim-leases": 0,
-        "max-reclaim-time": 0,
-    },
-
-    ...
-}
-</screen>
-    </para>
-
-    <para>The first parameter is expressed in seconds and specifies an
-    interval between the two consecutive lease reclamation cycles. This
-    is explained by the following diagram:
-
-<screen>
-
-|  c1  |            | c2 |            |c3|            | c4 |
-|&lt;----&gt;|&lt;----------&gt;|&lt;--&gt;|&lt;----------&gt;|&lt;&gt;|&lt;----------&gt;|&lt;--&gt;|
-----------------------------------------------------------------&gt;
-|      |     5s     |    |     5s     |  |     5s     |    | time
-
-</screen>
-
-    </para>
-    <para>This diagram shows four lease-reclamation cycles (c1 through c4) of variable duration.
-    Note that the duration of the reclamation cycle depends on the number
-    of expired leases detected and processed in the particular cycle. This
-    duration is usually significantly shorter than the interval between
-    the cycles.
-    </para>
-
-    <para>According to the <command>reclaim-timer-wait-time</command>, the
-    server keeps fixed intervals of five seconds between the end of one cycle
-    and the start of the next cycle. This guarantees the presence of
-    5s-long periods during which the server remains responsive to DHCP
-    queries and does not perform lease reclamation. The
-    <command>max-reclaim-leases</command> and
-    <command>max-reclaim-time</command> are set to 0, which sets
-    no restriction on the maximum number of leases reclaimed
-    in the particular cycle, or on the maximum duration of each cycle.
-    </para>
-
-    <para>In deployments with high lease-pool utilization, relatively
-    short valid lifetimes, and frequently disconnecting clients which
-    allow leases to expire, the number of expired leases requiring reclamation
-    at any given time may rise significantly. In this case, it is often
-    desirable to apply restrictions to the maximum duration of a reclamation
-    cycle or the maximum number of leases reclaimed in a cycle. The following
-    configuration demonstrates how this can be done:
-
-<screen>
-"Dhcp4": {
-    ...
-
-    "expired-leases-processing": {
-        "reclaim-timer-wait-time": 3,
-        "max-reclaim-leases": 100,
-        "max-reclaim-time": 50,
-        "unwarned-reclaim-cycles": 10,
-    },
-
-    ...
-}</screen>
-
-    </para>
-
-    <para>The <command>max-reclaim-leases</command> parameter limits the number
-    of leases reclaimed in a single cycle to 100. The
-    <command>max-reclaim-time</command> limits the maximum duration of each
-    cycle to 50ms. The lease-reclamation cycle will be interrupted if either
-    of these limitations is reached. The reclamation of any unreclaimed
-    leases will be attempted in subsequent cycles.</para>
-
-    <para>The following diagram illustrates the behavior of the system in the
-    presence of many expired leases, when the limits are applied for the
-    reclamation cycles:
-
-<screen>
-
-| c1 |                | c2 |                | c3 |                | c4 |
-|&lt;--&gt;|&lt;--------------&gt;|&lt;--&gt;|&lt;--------------&gt;|&lt;--&gt;|&lt;--------------&gt;|&lt;--&gt;|&lt;--
-------------------------------------------------------------------------------&gt;
-|50ms|       3s       |50ms|       3s       |50ms|       3s       |50ms|  time
-
-</screen>
-
-    </para>
-
-    <para>This diagram demonstrates the case when each reclamation cycle takes
-    more than 50ms, and thus is interrupted according to the value of the
-    <command>max-reclaim-time</command>. This results in equal durations of
-    all reclamation cycles over time. Note that in this example the limitation
-    of the maximum 100 leases is not reached. This may be the case when database
-    transactions are slow or callouts in the hook libraries attached to
-    the server are slow. Regardless, the chosen values for either the
-    maximum number of leases or a maximum cycle time strongly depend on the
-    particular deployment, the lease database backend being used, and any hooks
-    libraries, etc. Administrators may need to experiment to tune the system
-    to suit the dynamics of their deployment.</para>
-
-    <para>It is important to realize that with the use of these limits, there
-    is a risk that expired leases will accumulate faster than the server can
-    reclaim them. This should not be a problem if the server is dealing
-    with a temporary burst of expirations, because it should be able to
-    eventually deal with them over time. However, if leases expire at a high
-    rate for a longer period of time, the unreclaimed leases will pile up in
-    the database. To notify the administrator that the current
-    configuration does not satisfy the needs for reclamation of expired
-    leases, the server issues a warning message in the log if it is unable
-    to reclaim all leases within several reclamation cycles. The
-    number of cycles after which such a warning is issued is specified with the
-    <command>unwarned-reclaim-cycles</command> configuration parameter.
-    </para>
-
-    <para>Setting the <command>reclaim-timer-wait-time</command> to 0 disables
-    periodic reclamation of the expired leases.</para>
-  </section>
-
-  <section xml:id="lease-affinity">
-    <title>Configuring Lease Affinity</title>
-    <para>Suppose that a laptop goes into sleep mode after a period of user
-    inactivity. While the laptop is in sleep mode, its DHCP client will not
-    renew leases obtained from the server and these leases will eventually
-    expire. When the laptop wakes up, it is often desirable for it to continue
-    using its previous assigned IP addresses. To facilitate this,
-    the server needs to correlate returning clients with their expired leases.
-    When the client returns, the server will first check for those leases and
-    re-assign them if they have not been assigned to another client. The ability
-    of the server to re-assign the same lease to a returning client is
-    referred to as "lease affinity."
-    </para>
-
-    <para>When lease affinity is enabled (i.e. when
-    <command>hold-reclaimed-time</command> is configured to a value
-    greater than zero), the server will still
-    reclaim leases according to the parameters described in
-    <xref linkend="lease-reclaim-config"/>, but the reclaimed leases
-    will be held in the database (rather than removed) for a specified
-    amount of time. When the client returns, the server will first verify
-    whether there are any reclaimed leases associated with this client and will
-    re-assign them if possible. However, it is important to note that
-    any reclaimed lease may be assigned to another client if that client
-    specifically asks for it. Therefore, lease affinity does not
-    guarantee that the reclaimed lease will be available for the client
-    who used it before; it merely increases the chances for the client to
-    be assigned the same lease. If the lease pool is small (this mostly applies
-    to DHCPv4 for which address space is small), there is an increased
-    likelihood that the expired lease will be assigned to another client.
-    </para>
-
-    <para>Consider the following configuration:
-
-<screen>
-"Dhcp4": {
-    ...
-
-    "expired-leases-processing": {
-        "reclaim-timer-wait-time": 3,
-        "hold-reclaimed-time": 1800,
-        "flush-reclaimed-timer-wait-time": 5
-    },
-
-    ...
-}
-</screen>
-
-    </para>
-
-    <para>The <command>hold-reclaim-time</command> specifies how many seconds
-    after an expiration a reclaimed lease should be held in the database
-    for re-assignment to the same client. In the example given above,
-    reclaimed leases will be held for 30 minutes (1800s) after their
-    expiration. During this time, the server will likely be able to
-    re-assign the same lease to the returning client, unless another client
-    requests this lease and the server assigns it.</para>
-
-    <para>The server must periodically remove reclaimed leases for which the
-    time indicated by <command>hold-reclaim-time</command> has elapsed. The
-    <command>flush-reclaimed-timer-wait-time</command> parameter controls how
-    often the server removes such leases. In the example provided
-    above, the server will initiate removal of such leases 5 seconds after
-    the previous removal attempt was completed. Setting this value to 0
-    disables lease affinity, in which case leases will be removed from the
-    lease database when they are reclaimed. If lease affinity is enabled, it
-    is recommended that <command>hold-reclaim-time</command> be set to a value significantly
-    higher than the <command>reclaim-timer-wait-time</command>, as timely
-    removal of expired-reclaimed leases is less critical than the removal
-    process, which may impact server responsiveness.</para>
-
-    <para>There is no guarantee that lease affinity will work every
-    time. If a server is running out of addresses, it will reassign
-    expired addresses to new clients. Also, clients can request
-    specific addresses and the server will try to honor such a request
-    if possible. If you want to ensure a client keeps its address,
-    even after periods of inactivity, consider using host reservations
-    or leases with very long lifetimes.</para>
-    
-  </section>
-
-  <section xml:id="leases-reclamation-using-command">
-    <title>Reclaiming Expired Leases with Command</title>
-    <para>The <emphasis>leases-reclaim</emphasis> command can be used to trigger
-    lease reclamation at any time. Please consult the
-    <xref linkend="command-leases-reclaim"/> section for details about using this
-    command.</para>
-  </section>
-
-</chapter>
diff --git a/doc/guide/lfc.xml b/doc/guide/lfc.xml
deleted file mode 100644 (file)
index 47aca8a..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-<!--
- - Copyright (C) 2015-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-
-<!-- Converted by db4-upgrade version 1.1 -->
-<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="kea-lfc">
-    <title>The LFC Process</title>
-
-    <section xml:id="kea-lfc-overview">
-      <title>Overview</title>
-      <para><command>kea-lfc</command> is a service process that removes
-      redundant information from the files used to provide persistent storage
-      for the memfile database backend. This service is written to run as a
-      standalone process.  
-      </para>
-      <para>While <command>kea-lfc</command> can be started externally, there is
-      usually no need to do this. <command>kea-lfc</command> is run on a periodic
-      basis by the Kea DHCP servers.
-      </para>
-      <para>The process operates on a set of files, using them to receive input and output
-      of the lease entries and to indicate what stage the process is in, in the event of an
-      interruption. Currently the caller must supply names for all of the files.
-      </para>
-    </section>
-
-    <section xml:id="kea-lfc-usage">
-      <title>Command-Line Options</title>
-      <para><command>kea-lfc</command> is run as follows:
-<screen>
-kea-lfc [-4 | -6] -c config-file -p pid-file -x previous-file -i copy-file -o output-file -f finish-file
-</screen>
-      </para>
-
-      <para>The argument <command>-4</command> or <command>-6</command> selects the protocol
-      version of the lease files.
-      </para>
-
-      <para>The <command>-c</command> argument specifies the configuration file. This is
-      required, but is not currently used by the process.
-      </para>
-
-      <para>The <command>-p</command> argument specifies the PID file. When the
-      <command>kea-lfc</command> process starts, it attempts to determine whether another
-      instance of the process is already running by examining the pid file. If one
-      is already running, the new process is terminated; if one is not running, Kea writes
-      its pid into the pid file.
-      </para>
-
-      <para>The other filenames specify where the <command>kea-lfc</command> process
-      should look for input, write its output, and perform its bookkeeping:
-
-        <itemizedlist>
-          <listitem><simpara>
-            <command>previous</command> â€”
-            When <command>kea-lfc</command> starts, this
-            is the result of any previous run of <command>kea-lfc</command>.
-            When <command>kea-lfc</command> finishes, it is the result of this run.
-            If <command>kea-lfc</command> is interrupted before completing,
-            this file may not exist.
-          </simpara></listitem>
-
-          <listitem><simpara>
-            <command>input</command> â€”
-            Before the DHCP server invokes <command>kea-lfc</command>, it will
-            move the current lease file here and then call <command>kea-lfc</command>
-            with this file.
-          </simpara></listitem>
-
-          <listitem><simpara>
-            <command>output</command> â€”
-            This is the temporary file where <command>kea-lfc</command> writes the leases.
-            Upon completion of writing this file, it will be moved to the finish file
-           (see below).
-          </simpara></listitem>
-
-          <listitem><simpara>
-            <command>finish</command> â€”
-            This is another temporary file <command>kea-lfc</command> uses for bookkeeping. When
-            <command>kea-lfc</command> completes writing the outputfile, it moves it to this
-            file name. After <command>kea-lfc</command> finishes deleting the other files
-            (previous and input), it moves this file to the previous lease file. By moving the
-            files in this fashion, the <command>kea-lfc</command> and the DHCP server
-            processes can determine the correct file to use even if one of the
-            processes was interrupted before completing its task.
-          </simpara></listitem>
-
-        </itemizedlist>
-      </para>
-
-      <para>There are several additional arguments, mostly for debugging purposes.
-      <command>-d</command> sets the logging level to debug. <command>-v</command> and
-      <command>-V</command> print out version stamps, with <command>-V</command> providing
-      a longer form. <command>-h</command> prints out the usage string.
-      </para>
-
-    </section>
-  </chapter>
diff --git a/doc/guide/logging.xml b/doc/guide/logging.xml
deleted file mode 100644 (file)
index f6e2f92..0000000
+++ /dev/null
@@ -1,612 +0,0 @@
-<!--
- - Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-
-<!-- Converted by db4-upgrade version 1.1 -->
-<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="logging">
-  <title>Logging</title>
-
-  <section>
-    <title>Logging Configuration</title>
-    <para>
-      During its operation Kea may produce many messages. They differ in
-      severity (some are more important than others) and source (different components
-      (e.g. hooks) produce different messages). It is useful to understand
-      which log messages are critical and which are not, and configure your
-      logging appropriately. For example, debug-level messages can be safely
-      ignored in a typical deployment. They are, however, very useful when
-      debugging a problem.
-    </para>
-
-    <para>
-      The logging system in Kea is configured through the loggers entry
-      in the server section of your configuration file. In previous
-      Kea releases this entry was in an independent Logging section,
-      this is still supported for backward compatibility.
-    </para>
-
-    <section>
-      <title>Loggers</title>
-      <para>
-        Within Kea, a message is logged through an entity called a
-        "logger." Different components log messages through different
-        loggers, and each logger can be configured independently of
-        the others. Some components, in particular the DHCP server
-        processes, may use multiple loggers to log messages pertaining
-        to different logical functions of the component. For example,
-        the DHCPv4 server uses one logger for messages
-        about packet reception and transmission, another
-        logger for messages related to lease allocation, and so on.
-        Some of the libraries used by the Kea server, e.g. libdhcpsrv,
-        use their own loggers.
-      </para>
-
-      <para>
-        Users implementing hooks libraries (code attached to the server at
-        runtime) are responsible for creating the loggers used by those
-        libraries. Such loggers should have unique names, different
-        from the logger names used by Kea. In this way the
-        messages produced by the hooks library can be distinguished from
-        messages issued by the core Kea code. Unique names also allow
-        the loggers to be configured independently of loggers used
-        by Kea. Whenever it makes sense, a hooks library can use multiple
-        loggers to log messages pertaining to different logical parts
-        of the library.
-      </para>
-
-      <para>
-        In the server section of a configuration file you can specify the
-        configuration for zero or more loggers (including loggers used by the
-        proprietary hooks libraries). If there are no loggers specified, the
-        code will use default values; these cause Kea to log messages of INFO
-        severity or greater to standard output. There is a small
-        time window after Kea has been started but before it has read its
-        configuration; logging in this short period can be controlled
-        using environment variables. For details, see <xref linkend="logging-during-startup"/>.
-      </para>
-
-      <para>
-        The three main elements of a logger configuration are:
-        <command>name</command> (the component that is generating the messages),
-        <command>severity</command> (what to log), and
-        <command>output_commands</command> (where to log). There is also a
-        <command>debuglevel</command> element, which is only relevant if
-        debug-level logging has been selected.
-      </para>
-
-      <section>
-        <title>name (string)</title>
-        <para>
-          Each logger in the system has a name: that of the
-          component binary file using it to log messages. For instance, if you
-          want to configure logging for the DHCPv4 server, you add an entry
-          for a logger named <quote>kea-dhcp4</quote>. This configuration will
-          then be used by the loggers in the DHCPv4 server, and all the
-          libraries used by it (unless a library defines its own logger and
-          there is a specific logger configuration that applies to that logger).
-        </para>
-
-        <para>
-          When tracking down an issue with the server's operation, use of
-          DEBUG logging is required to obtain the verbose output needed for
-          problem diagnosis. However, the high verbosity is likely to
-          overwhelm the logging system in cases where the server
-          is processing high-volume traffic. To mitigate this problem,
-          Kea can use multiple loggers, for different
-          functional parts of the server, that can each be configured independently.
-          If the user is reasonably confident that a problem originates
-          in a specific function of the server, or that the problem is related
-          to a specific type of operation, they may enable high verbosity
-          only for the relevant logger, thereby limiting the debug messages
-          to the required minimum.
-        </para>
-
-        <para>
-          The loggers are associated with a particular library or binary
-          of Kea. However, each library or binary may (and usually does)
-          include multiple loggers. For example, the DHCPv4 server binary
-          contains separate loggers for packet parsing, for dropped packets,
-          for callouts, etc.
-        </para>
-
-        <para>
-          The loggers form a hierarchy. For each program in Kea, there is
-          a "root" logger, named after the program (e.g. the root logger for
-          kea-dhcp (the DHCPv4 server) is named kea-dhcp4. All other loggers
-          are children of this logger and are named accordingly, e.g. the
-          allocation engine in the DHCPv4 server logs messages using
-          a logger called kea-dhcp4.alloc-engine.
-        </para>
-
-        <para>
-          This relationship is important, as each child logger derives its
-          default configuration from its parent root logger.
-          In the typical case, the root logger configuration
-          is the only logging configuration specified in the configuration
-          file and so applies to all loggers. If an entry is made for
-          a given logger, any attributes specified override those of
-          the root logger, whereas any not specified are inherited from it.
-        </para>
-
-        <para>
-          To illustrate this, suppose you are using the DHCPv4 server
-          with the root logger <quote>kea-dhcp4</quote> logging at the
-          INFO level. In order to enable DEBUG verbosity for DHCPv4
-          packet drops, you must create a configuration entry for the
-          logger called <quote>kea-dhcp4.bad-packets</quote> and specify
-          severity DEBUG for this logger. All other configuration
-          parameters may be omitted for this logger if the logger should
-          use the default values specified in the root logger's
-          configuration.
-        </para>
-
-        <para>
-          If there are multiple logger specifications in the configuration
-          that might match a particular logger, the specification with the
-          more specific logger name takes precedence. For example, if there
-          are entries for both <quote>kea-dhcp4</quote> and
-          <quote>kea-dhcp4.dhcpsrv</quote>, the main DHCPv4 server program â€” and all
-          libraries it uses other than the dhcpsrv library (libdhcpsrv) â€” will log messages
-          according to the configuration in the first entry
-          (<quote>kea-dhcp4</quote>). Messages generated by the dhcpsrv library
-          will be logged according to the configuration set by the second entry.
-        </para>
-
-        <para>
-          Currently defined loggers are defined in the following table. The
-          "Software Package" column of this table specifies whether the particular
-          loggers belong to the core Kea code (open source Kea binaries and
-          libraries), or hook libraries (open source or premium).
-        </para>
-
-        <para>
-          <table frame="all" xml:id="supported-loggers-list">
-            <title>List of loggers supported by Kea servers and hooks libraries
-            shipped with Kea and premium packages</title>
-            <tgroup cols='3'>
-              <colspec colname="logger-name" align="left"/>
-              <colspec colname="software-package" align="center"/>
-              <colspec colname="description" align="left"/>
-              <thead>
-                <row>
-                  <entry>Logger Name</entry>
-                  <entry>Software Package</entry>
-                  <entry>Description</entry>
-                </row>
-              </thead>
-              <tbody>
-                <row><entry><command>kea-ctrl-agent</command></entry><entry>core</entry><entry>The root logger for the Control Agent exposing the RESTful control API. All components used by the Control Agent inherit the settings from this logger.</entry></row>
-                <row><entry><command>kea-ctrl-agent.http</command></entry><entry>core</entry><entry>A logger which outputs log messages related to receiving, parsing, and sending HTTP messages.</entry></row>
-                <row><entry><command>kea-dhcp4</command></entry><entry>core</entry><entry>The root logger for the DHCPv4 server. All components used by the DHCPv4 server inherit the settings from this logger.</entry></row>
-                <row><entry><command>kea-dhcp6</command></entry><entry>core</entry><entry>The root logger for the DHCPv6 server. All components used by the DHCPv6 server inherit the settings from this logger.</entry></row>
-                <row><entry><simplelist type="horiz"><member><command>kea-dhcp4.alloc-engine</command></member><member><command>kea-dhcp6.alloc-engine</command></member></simplelist></entry><entry>core</entry><entry>Used by the lease allocation engine, which is responsible for managing leases in the lease database, i.e. creating, modifying, and removing DHCP leases as a result of processing messages from the clients.</entry></row>
-                <row><entry><simplelist type="horiz"><member><command>kea-dhcp4.bad-packets</command></member><member><command>kea-dhcp6.bad-packets</command></member></simplelist></entry><entry>core</entry><entry>Used by the DHCP servers for logging inbound client packets that were dropped or to which the server responded with a DHCPNAK. It allows administrators to configure a separate log output that contains only packet drop and reject entries.</entry></row>
-                <row><entry><simplelist type="horiz"><member><command>kea-dhcp4.callouts</command></member><member><command>kea-dhcp6.callouts</command></member></simplelist></entry><entry>core</entry><entry>Used to log messages pertaining to the callouts registration and execution for the particular hook point.</entry></row>
-                <row><entry><simplelist type="horiz"><member><command>kea-dhcp4.commands</command></member><member><command>kea-dhcp6.commands</command></member></simplelist></entry><entry>core</entry><entry>Used to log messages relating to the handling of commands received by the DHCP server over the command channel.</entry></row>
-                <row><entry><simplelist type="horiz"><member><command>kea-dhcp4.database</command></member><member><command>kea-dhcp6.database</command></member></simplelist></entry><entry>core</entry><entry>Used to log messages relating to general operations on the relational databases and Cassandra.</entry></row>
-                <row><entry><simplelist type="horiz"><member><command>kea-dhcp4.ddns</command></member><member><command>kea-dhcp6.ddns</command></member></simplelist></entry><entry>core</entry><entry>Used by the DHCP server to log messages related to the Client FQDN and Hostname option processing. It also includes log messages related to the relevant DNS updates.</entry></row>
-                <row><entry><command>kea-dhcp4.dhcp4</command></entry><entry>core</entry><entry>Used by the DHCPv4 server daemon to log basic operations.</entry></row>
-                <row><entry><simplelist type="horiz"><member><command>kea-dhcp4.dhcpsrv</command></member><member><command>kea-dhcp6.dhcpsrv</command></member></simplelist></entry><entry>core</entry><entry>The base loggers for the libkea-dhcpsrv library.</entry></row>
-                <row><entry><simplelist type="horiz"><member><command>kea-dhcp4.eval</command></member><member><command>kea-dhcp6.eval</command></member></simplelist></entry><entry>core</entry><entry>Used to log messages relating to the client classification expression evaluation code.</entry></row>
-                <row><entry><simplelist type="horiz"><member><command>kea-dhcp4.host-cache-hooks</command></member><member><command>kea-dhcp6.host-cache-hooks</command></member></simplelist></entry><entry>libdhcp_host_cache premium hook library</entry><entry>This logger is used to log messages related to the operation of the Host Cache Hook Library.</entry></row>
-                <row><entry><simplelist type="horiz"><member><command>kea-dhcp4.flex-id-hooks</command></member><member><command>kea-dhcp6.flex-id-hooks</command></member></simplelist></entry><entry>libdhcp_flex_id premium hook library</entry><entry>This logger is used to log messages related to the operation of the Flexible Identifiers Hook Library.</entry></row>
-                <row><entry><simplelist type="horiz"><member><command>kea-dhcp4.ha-hooks</command></member><member><command>kea-dhcp6.ha-hooks</command></member></simplelist></entry><entry>libdhcp_ha hook library</entry><entry>This logger is used to log messages related to the operation of the High Availability Hook Library.</entry></row>
-                <row><entry><simplelist type="horiz"><member><command>kea-dhcp4.hooks</command></member><member><command>kea-dhcp6.hooks</command></member></simplelist></entry><entry>core</entry><entry>Used to log messages related to the management of hooks libraries, e.g. registration and deregistration of the libraries, and to the initialization of the callouts execution for various hook points within the DHCP server.</entry></row>
-                <row><entry><simplelist type="horiz"><member><command>kea-dhcp4.host-cmds-hooks</command></member><member><command>kea-dhcp6.host-cmds-hooks</command></member></simplelist></entry><entry>libdhcp_host_cmds premium hook library</entry><entry>This logger is used to log messages related to the operation of the Host Cmds hooks library. In general, these will pertain to the loading and unloading of the library and the execution of commands by the library.</entry></row>
-                <row><entry><simplelist type="horiz"><member><command>kea-dhcp4.hosts</command></member><member><command>kea-dhcp6.hosts</command></member></simplelist></entry><entry>core</entry><entry>Used within the libdhcpsrv, it logs messages related to the management of the DHCP host reservations, i.e. retrieval of the reservations and adding new reservations.</entry></row>
-                <row><entry><simplelist type="horiz"><member><command>kea-dhcp4.lease-cmds-hooks</command></member><member><command>kea-dhcp6.lease-cmds-hooks</command></member></simplelist></entry><entry>libdhcp_lease_cmds hook library</entry><entry>This logger is used to log messages related to the operation of the Lease Cmds hooks library. In general, these will pertain to the loading and unloading of the library and the execution of commands by the library.</entry></row>
-                <row><entry><simplelist type="horiz"><member><command>kea-dhcp4.leases</command></member><member><command>kea-dhcp6.leases</command></member></simplelist></entry><entry>core</entry><entry>Used by the DHCP server to log messages related to lease allocation. The messages include detailed information about the allocated or offered leases, errors during the lease allocation, etc.</entry></row>
-                <row><entry><simplelist type="horiz"><member><command>kea-dhcp4.legal-log-hooks</command></member><member><command>kea-dhcp6.legal-log-hooks</command></member></simplelist></entry><entry>libdhcp_legal_log premium hook library</entry><entry>This logger is used to log messages related to the operation of the Forensic Logging Hooks Library.</entry></row>
-                <row><entry><simplelist type="horiz"><member><command>kea-dhcp4.options</command></member><member><command>kea-dhcp4.options</command></member></simplelist></entry><entry>core</entry><entry>Used by the DHCP server to log messages related to the processing of options in the DHCP messages, i.e. parsing options, encoding options into on-wire format, and packet classification using options contained in the received packets.</entry></row>
-                <row><entry><simplelist type="horiz"><member><command>kea-dhcp4.packets</command></member><member><command>kea-dhcp6.packets</command></member></simplelist></entry><entry>core</entry><entry>This logger is mostly used to log messages related to transmission of the DHCP packets, i.e. packet reception and the sending of a response. Such messages include information about the source and destination IP addresses and interfaces used to transmit packets. The logger is also used to log messages related to subnet selection, as this selection is usually based on the IP addresses, relay addresses, and/or interface names, which can be retrieved from the received packet even before the DHCP message carried in the packet is parsed.</entry></row>
-                <row><entry><simplelist type="horiz"><member><command>kea-dhcp4.radius-hooks</command></member><member><command>kea-dhcp6.radius-hooks</command></member></simplelist></entry><entry>libdhcp_radius premium hook library</entry><entry>This logger is used to log messages related to the operation of the Radius Hook Library.</entry></row>
-                <row><entry><simplelist type="horiz"><member><command>kea-dhcp4.stat-cmds-hooks</command></member><member><command>kea-dhcp6.stat-cmds-hooks</command></member></simplelist></entry><entry>libdhcp_stat_cmds hook library</entry><entry>This logger is used to log messages related to the operation of the Statistics Commands hooks library. In general, these will pertain to loading and unloading the library and the execution of commands by the library.</entry></row>
-                <row><entry><simplelist type="horiz"><member><command>kea-dhcp4.subnet-cmds-hooks</command></member><member><command>kea-dhcp6.subnet-cmds-hooks</command></member></simplelist></entry><entry>libdhcp_subnet_cmds hook library</entry><entry>This logger is used to log messages related to the operation of the Subnet Commands hooks library. In general, these will pertain to loading and unloading the library and the execution of commands by the library.</entry></row>
-                <row><entry><simplelist type="horiz"><member><command>kea-dhcp4.mysql-cb-hooks</command></member><member><command>kea-dhcp6.mysql-cb-hooks</command></member></simplelist></entry><entry>libdhcp_mysql_cb_hooks hook library</entry><entry>This logger is used to log messages related to the operation of the MySQL Configuration Backend hooks library.</entry></row>
-                <row><entry><command>kea-dhcp-ddns</command></entry><entry>core</entry><entry>The root logger for the kea-dhcp-ddns daemon. All components used by this daemon inherit the settings from this logger unless there are configurations for more specialized loggers..</entry></row>
-                <row><entry><command>kea-dhcp-ddns.dctl</command></entry><entry>core</entry><entry>The logger used by the kea-dhcp-ddns daemon for logging basic information about the process, received signals, and triggered reconfigurations.</entry></row>
-                <row><entry><command>kea-dhcp-ddns.dhcpddns</command></entry><entry>core</entry><entry>The logger used by the kea-dhcp-ddns daemon for logging events related to DDNS operations.</entry></row>
-                <row><entry><command>kea-dhcp-ddns.dhcp-to-d2</command></entry><entry>core</entry><entry>Used by the kea-dhcp-ddns daemon for logging information about events dealing with receiving messages from the DHCP servers and adding them to the queue for processing.</entry></row>
-                <row><entry><command>kea-dhcp-ddns.d2-to-dns</command></entry><entry>core</entry><entry>Used by the kea-dhcp-ddns daemon for logging information about events dealing with sending and receiving messages with the DNS servers.</entry></row>
-                <row><entry><command>kea-netconf</command></entry><entry>core</entry><entry>The root logger for the Netconf agent. All components used by Netconf inherit the settings from this logger if there is no specialized logger provided.</entry></row>
-              </tbody>
-            </tgroup>
-          </table>
-        </para>
-
-        <para>
-          Note that user-defined hook libraries should not use any of the loggers
-          mentioned above, but should instead define new loggers with names that correspond to
-          the libraries using them. Suppose that the user created the library
-          called <quote>libdhcp-packet-capture</quote> to dump packets received and
-          transmitted by the server to the file. An appropriate name for the
-          logger could be <command>kea-dhcp4.packet-capture-hooks</command>. (Note
-          that the hook library implementer only specifies the second part of
-          this name, i.e. <quote>packet-capture</quote>. The first part is a
-          root-logger name and is prepended by the Kea logging system.) It is
-          also important to note that since this new logger is a child of a root
-          logger, it inherits the configuration from the root logger, something
-          that can be overridden by an entry in the configuration file.
-        </para>
-
-        <para>
-          The easiest way to find a logger name is to configure all logging to
-          go to a single destination and look for specific logger names. See
-          <xref linkend="logging-message-format"/> for details.
-        </para>
-      </section>
-
-      <section>
-        <title>severity (string)</title>
-        <para>
-          This specifies the category of messages logged. Each message is
-          logged with an associated severity, which may be one of the following
-          (in descending order of severity):
-        </para>
-
-        <itemizedlist>
-          <listitem>
-            <simpara>
-              FATAL - associated with messages generated by a condition that is
-              so serious that the server cannot continue executing.
-            </simpara>
-          </listitem>
-
-          <listitem>
-            <simpara>
-              ERROR - associated with messages generated by an error condition.
-              The server will continue executing, but the results may not be as
-              expected.
-            </simpara>
-          </listitem>
-
-          <listitem>
-            <simpara>
-              WARN - indicates an out-of-the-ordinary condition. However, the
-              server will continue executing normally.
-            </simpara>
-          </listitem>
-
-          <listitem>
-            <simpara>
-              INFO - an informational message marking some event.
-            </simpara>
-          </listitem>
-
-          <listitem>
-            <simpara>
-              DEBUG - messages produced for debugging purposes.
-            </simpara>
-          </listitem>
-        </itemizedlist>
-
-        <para>
-          When the severity of a logger is set to one of these values, it will
-          only log messages of that severity and above (e.g. setting the logging
-          severity to INFO will log INFO, WARN, ERROR, and FATAL messages). The
-          severity may also be set to NONE, in which case all messages from that
-          logger are inhibited.
-        </para>
-
-        <note>
-          <para>
-            The keactrl tool, described in <xref linkend="keactrl"/>, can be
-            configured to start the servers in verbose mode. If this is the
-            case, the settings of the logging severity in the configuration file
-            will have no effect, i.e. the servers will use a logging severity of
-            DEBUG regardless of the logging settings specified in the
-            configuration file. If you need to control severity via the
-            configuration file, please make sure that the
-            <parameter>kea_verbose</parameter> value is set to "no" within the
-            keactrl configuration.
-          </para>
-        </note>
-      </section>
-
-      <section>
-        <title>debuglevel (integer)</title>
-        <para>
-          When a logger's severity is set to DEBUG, this value specifies what
-          level of debug messages should be printed. It ranges from 0 (least
-          verbose) to 99 (most verbose). If severity for the logger is not
-          DEBUG, this value is ignored.
-        </para>
-      </section>
-
-      <section>
-        <title>output_options (list)</title>
-        <para>
-          Each logger can have zero or more <option>output_options</option>.
-          These specify where log messages are sent and are explained in
-          detail below.
-        </para>
-
-        <section>
-          <title>output (string)</title>
-          <para>
-            This value determines the type of output. There are several special
-            values allowed here: <command>stdout</command> (messages are printed
-            on standard output), <command>stderr</command> (messages are printed
-            on stderr), <command>syslog</command> (messages are logged to syslog
-            using default name), <command>syslog:name</command> (messages are
-            logged to syslog using specified name). Any other value is
-            interpreted as a filename to which messages should be written.
-          </para>
-        </section>
-
-        <section>
-          <title>flush (true of false)</title>
-          <para>
-            Flush buffers after each log message. Doing this will reduce
-            performance but will ensure that if the program terminates
-            abnormally, all messages up to the point of termination are output.
-            The default is "true".
-          </para>
-        </section>
-
-        <section>
-          <title>maxsize (integer)</title>
-          <para>
-            Only relevant when the destination is a file. This is the maximum size
-            in bytes that a log file may reach. When the maximum size is
-            reached, the file is renamed and a new file opened. For example,
-            a ".1" is appended to the name â€” if a ".1" file exists, it
-            is renamed ".2", etc. This is referred to as rotation.
-          </para>
-          <para>
-            The default value is 10240000 (10MB). The smallest value that may
-            be specified without disabling rotation is 204800. Any value less than
-            this, including 0, disables rotation.
-          </para>
-          <note>
-            <simpara>
-              Due to a limitation of the underlying logging library (log4cplus),
-              rolling over the log files (from ".1" to ".2", etc) may show odd
-              results; there can be multiple small files at the timing of roll
-              over. This can happen when multiple processes try to roll over
-              the files simultaneously. Version 1.1.0 of log4cplus solved this
-              problem, so if this version or later of log4cplus is used to
-              build Kea, the issue should not occur. Even for older versions, it is
-              normally expected to happen rarely unless the log messages are
-              produced very frequently by multiple different processes.
-            </simpara>
-          </note>
-        </section>
-
-        <section>
-          <title>maxver (integer)</title>
-          <para>
-            Only relevant when the destination is a file and rotation is enabled
-            (i.e. maxsize is large enough). This is the maximum number of rotated
-            versions that will be kept. Once that number of files has been
-            reached, the oldest file, "log-name.maxver", will be discarded
-            each time the log rotates. In other words, at most there will be
-            the active log file plus maxver rotated files. The minimum and
-            default value is 1.
-          </para>
-        </section>
-      </section>
-
-      <section>
-        <title>Example Logger Configurations</title>
-        <para>
-          In this example we want to set the Server logging to write to the
-          console using standard output.
-        </para>
-
-<screen><userinput>"Server": {
-    "loggers": [
-        {
-            "name": "kea-dhcp4",
-            "output_options": [
-                {
-                    "output": "stdout"
-                }
-            ],
-            "severity": "WARN"
-        }
-    ]
-}</userinput> </screen>
-
-        <para>
-          In this second example, we want to store debug log messages in a file
-          that is at most 2MB and keep up to 8 copies of old logfiles. Once the
-          logfile grows to 2MB, it will be renamed and a new file will be
-          created.
-        </para>
-
-<screen><userinput>"Server": {
-    "loggers": [
-        {
-            "name": "kea-dhcp6",
-            "output_options": [
-                {
-                    "output": "/var/log/kea-debug.log",
-                    "maxver": 8,
-                    "maxsize": 204800,
-                    "flush": true
-                }
-            ],
-            "severity": "DEBUG",
-            "debuglevel": 99
-        }
-   ]
-}</userinput></screen>
-      </section>
-
-    </section>
-
-    <section xml:id="logging-message-format">
-      <title>Logging Message Format</title>
-      <para>
-        Each message written to the configured logging destinations comprises a
-        number of components that identify the origin of the message and, if the
-        message indicates a problem, information about the problem that may be
-        useful in fixing it.
-      </para>
-
-      <para>
-        Consider the message below logged to a file:
-
-<screen>2014-04-11 12:58:01.005 INFO  [kea-dhcp4.dhcpsrv/27456]
-    DHCPSRV_MEMFILE_DB opening memory file lease database: type=memfile universe=4</screen>
-      </para>
-
-      <para>
-        Note: the layout of messages written to the system logging file (syslog)
-        may be slightly different. This message has been split across two lines
-        here for display reasons; in the logging file, it will appear on one
-        line.
-      </para>
-
-      <para>
-        The log message comprises a number of components:
-
-       <variablelist>
-         <varlistentry>
-           <term>2014-04-11 12:58:01.005</term>
-<!-- TODO: timestamp repeated even if using syslog? -->
-           <listitem>
-             <para>
-               The date and time at which the message was generated.
-              </para>
-            </listitem>
-          </varlistentry>
-
-          <varlistentry>
-            <term>INFO</term>
-            <listitem>
-              <para>
-                The severity of the message.
-              </para>
-            </listitem>
-          </varlistentry>
-
-          <varlistentry>
-            <term>[kea-dhcp4.dhcpsrv/27456]</term>
-            <listitem>
-              <para>
-                The source of the message. This includes two elements: the Kea
-                process generating the message (in this case,
-                <command>kea-dhcp4</command>) and the component within the
-                program from which the message originated
-                (<command>dhcpsrv</command>, which is the name of the common
-                library used by DHCP server implementations). The number after
-                the slash is a process id (pid).
-              </para>
-            </listitem>
-          </varlistentry>
-
-          <varlistentry>
-            <term>DHCPSRV_MEMFILE_DB</term>
-            <listitem>
-              <para>
-                The message identification. Every message in Kea has a unique
-                identification, which can be used as an index into the
-                <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="kea-messages.html"><citetitle>Kea Messages
-                Manual</citetitle></link>
-                (<uri xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://jenkins.isc.org/job/Kea_doc/messages/kea-messages.html">https://jenkins.isc.org/job/Kea_doc/messages/kea-messages.html</uri>)
-                from which more information can be obtained.
-              </para>
-            </listitem>
-          </varlistentry>
-
-          <varlistentry>
-            <term>opening memory file lease database: type=memfile universe=4</term>
-            <listitem>
-              <para>
-                A brief description. Within this text, information relating to
-                the condition that caused the message to be logged will be
-                included. In this example, the information is logged that the
-                in-memory lease database backend will be used to store DHCP
-                leases.
-              </para>
-            </listitem>
-          </varlistentry>
-        </variablelist>
-      </para>
-    </section>
-
-    <section xml:id="logging-during-startup">
-      <title>Logging During Kea Startup</title>
-      <para>
-        The logging configuration is specified in the configuration file.
-        However, when Kea starts, the file is not read until partway into the
-        initialization process. Prior to that, the logging settings are set to
-        default values, although it is possible to modify some aspects of the
-        settings by means of environment variables. Note that in the absence of
-        any logging configuration in the configuration file, the settings of the
-        (possibly modified) default configuration will persist while the program
-        is running.
-      </para>
-      <para>
-        The following environment variables can be used to control the behavior
-        of logging during startup:
-      </para>
-
-      <variablelist>
-        <varlistentry>
-          <term>KEA_LOCKFILE_DIR</term>
-          <listitem>
-            <para>
-              Specifies a directory where the logging system should create its
-              lock file. If not specified, it is
-              <replaceable>prefix</replaceable>/var/run/kea, where
-              <replaceable>prefix</replaceable> defaults to /usr/local. This
-              variable must not end with a slash. There is one special value:
-              "none", which instructs Kea to not create a lock file at all. This
-              may cause issues if several processes log to the same file.
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term>KEA_LOGGER_DESTINATION</term>
-          <listitem>
-            <para>
-              Specifies logging output. There are several special values.
-              <variablelist>
-                <varlistentry>
-                  <term>stdout</term>
-                  <listitem>
-                    <para>
-                      Log to standard output.
-                    </para>
-                  </listitem>
-                </varlistentry>
-
-                <varlistentry>
-                  <term>stderr</term>
-                  <listitem>
-                    <para>
-                      Log to standard error.
-                    </para>
-                  </listitem>
-                </varlistentry>
-
-                <varlistentry>
-                  <term>syslog<optional>:<replaceable>fac</replaceable></optional></term>
-                  <listitem>
-                    <para>
-                      Log via syslog. The optional
-                      <replaceable>fac</replaceable> (which is separated from
-                      the word "syslog" by a colon) specifies the facility to be
-                      used for the log messages. Unless specified, messages will
-                      be logged using the facility "local0".
-                    </para>
-                  </listitem>
-                </varlistentry>
-              </variablelist>
-              Any other value is treated as a name of the output file. If not
-              specified otherwise, Kea will log to standard output.
-            </para>
-          </listitem>
-        </varlistentry>
-      </variablelist>
-    </section>
-  </section>
-</chapter>
diff --git a/doc/guide/netconf.xml b/doc/guide/netconf.xml
deleted file mode 100644 (file)
index 0bd63a5..0000000
+++ /dev/null
@@ -1,1162 +0,0 @@
-<!--
- - Copyright (C) 2018-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-<!-- Converted by db4-upgrade version 1.1 -->
-<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="netconf">
-  <title>YANG/NETCONF Support</title>
-
-  <section xml:id="netconf-overview">
-    <title>Overview</title>
-    <para>Kea 1.5.0 introduced optional support for a YANG/NETCONF
-    interface with the new <command>kea-netconf</command>
-    NETCONF agent.</para>
-
-    <para>This bare-bones documentation is a work in progress. Its
-    current purpose is to let engineers joining the project or perhaps
-    advanced early adopters to get up to speed quickly.</para>
-  </section>
-
-  <section xml:id="netconf-install">
-    <title>Installing NETCONF</title>
-
-    <para>Note that to get its NETCONF capabilities, Kea uses Sysrepo,
-    which has many dependencies. Unfortunately, some of them
-    are not available as packages and need to be compiled
-    manually.</para>
-
-    <para>Please note that building libyang requires a minimum gcc version of at
-    least 4.9, so on some environments - like CentOS 7.5 - the system
-    compiler cannot be used.</para>
-
-    <para>The following sections provide installation instructions for Ubuntu
-    18.04 and CentOS 7.5. Due to a more modern compiler and many available
-    packages, the installation procedure is much simpler on Ubuntu.</para>
-
-    <section xml:id="netconf-ubuntu-install">
-      <title>Installing NETCONF on Ubuntu 18.04</title>
-
-      <para>For detailed installation instructions see the
-      <uri xmlns:xlink="http://www.w3.org/1999/xlink"
-           xlink:href="https://gitlab.isc.org/isc-projects/kea/wikis/docs/ubuntu-installation-notes">
-        Ubuntu installation notes page</uri>.</para>
-    </section>
-
-    <section xml:id="netconf-centos-install">
-      <title>Installing NETCONF on CentOS 7.5</title>
-
-      <para>For detailed installation instructions see the
-      <uri xmlns:xlink="http://www.w3.org/1999/xlink"
-           xlink:href="https://gitlab.isc.org/isc-projects/kea/wikis/docs/centos-installation-notes">
-        CentOS installation notes page</uri>.</para>
-      
-      <para>CentOS 7.5's gcc compiler (version 4.8.5) is very old. Some
-      sysrepo dependencies require at least version 4.9, which unfortunately
-      means that a new compiler has to be installed. Also, many of the
-      Sysrepo dependencies are not avalable in CentOS as packages, so
-      for the time being they must be installed from sources.</para>
-
-    </section>
-  </section> <!-- end of installation notes -->
-
-  <section>
-    <title>Quick Sysrepo Overview</title>
-    <para>
-    This section offers a rather brief overview of a subset of available
-    functions in Sysrepo. For more complete information, see the Sysrepo homepage.
-    You may also want to take a look at the
-    <uri xmlns:xlink="http://www.w3.org/1999/xlink"
-         xlink:href="https://github.com/isc-projects/kea-yang">
-    notes made during a series of IETF Hackathons</uri>.
-    </para>
-
-    <para>
-    In YANG, configurations and state data are described in the YANG syntax
-    in module files named:
-<userinput>"module-name"</userinput><option>[@<userinput>"revision"</userinput>]</option>.yang
-    </para>
-
-    <para>
-    The revision part is optional and has YYYY-MM-DD format. An alternate
-    XML syntax YIN is defined but less user-friendly. Top-level modules
-    are named in Kea models (a short version of schema models).
-    </para>
-
-    <para>
-      List currently installed YANG modules:
-<screen>
-  $ sysrepoctl -l
-</screen>
-
-After installation the result should be similar to this:
-<screen>
-Sysrepo schema directory: /home/thomson/devel/sysrepo-0.7.6/build/repository/yang/
-Sysrepo data directory:   /home/thomson/devel/sysrepo-0.7.6/build/repository/data/
-(Do not alter contents of these directories manually)
-
-Module Name                | Revision   | Conformance | Data Owner          | Permissions | Submodules                    | Enabled Features
------------------------------------------------------------------------------------------------------------------------------------------------
-ietf-netconf-notifications | 2012-02-06 | Installed   | root:root           | 666         |                               |
-ietf-netconf               | 2011-06-01 | Imported    |                     |             |                               |
-ietf-netconf-acm           | 2012-02-22 | Imported    |                     |             |                               |
-nc-notifications           | 2008-07-14 | Installed   | root:root           | 666         |                               |
-notifications              | 2008-07-14 | Installed   | root:root           | 666         |                               |
-turing-machine             | 2013-12-27 | Installed   | root:root           | 666         |                               |
-iana-if-type               | 2014-05-08 | Installed   |                     |             |                               |
-ietf-interfaces            | 2014-05-08 | Installed   | root:root           | 666         |                               |
-ietf-ip                    | 2014-06-16 | Installed   |                     |             |                               |
-</screen>
-    </para>
-
-<title>Installing Kea YANG modules</title>
-<para>There are two major modules that Kea is
-able to support: kea-dhcp4-server and kea-dhcp6-server. Note that
-while there is an active effort in the DHC working group at IETF to
-develop a DHCPv6 YANG model, a similar initiative in the past for DHCPv4 failed.
-Therefore, Kea uses its own dedicated models for DHCPv4 and
-DHCPv6 but partially supports the IETF model for DHCPv6. Those three
-models have extra modules as dependencies. The dependency modules are
-also provided in <filename>src/share/yang/modules</filename> in sources
-and <filename>share/kea/yang/modules</filename> after installation.
-    </para>
-
-    <para>
-To install modules from sources, do the following:
-
-<screen>
-cd src/share/yang/modules
-sudo sysrepoctl -i -s /home/thomson/devel/sysrepo-0.7.6/build/repository/yang -s . -g ietf-dhcpv6-server*.yang
-sudo sysrepoctl -i -s /home/thomson/devel/sysrepo-0.7.6/build/repository/yang -s . -g kea-dhcp4-server*.yang
-sudo sysrepoctl -i -s /home/thomson/devel/sysrepo-0.7.6/build/repository/yang -s . -g kea-dhcp6-server*.yang
-...
-</screen>
-
-Note that the first -s parameter specifies the location of the YANG schema
-repository; you can check it with sysrepoctl -l. This is a parameter that is
-configured during Sysrepo compilation and is detected by the Kea configuration
-under the SYSREPO_REPO name.
-    </para>
-
-    <para>
-The installation should look similar to the following:
-<screen>
-$ sudo sysrepoctl -i -s /home/thomson/devel/sysrepo-0.7.6/build/repository/yang -s . -g ietf-dhcpv6-server*.yang
-Installing a new module from file 'ietf-dhcpv6-server@2018-11-20.yang'...
-Installing the YANG file to '/home/thomson/devel/sysrepo-0.7.6/build/repository/yang/ietf-dhcpv6-server@2018-07-14.yang'...
-Resolving dependency: 'ietf-dhcpv6-server' imports 'ietf-dhcpv6-options'...
-Installing the YANG file to '/home/thomson/devel/sysrepo-0.7.6/build/repository/yang/ietf-dhcpv6-options@2018-07-14.yang'...
-Resolving dependency: 'ietf-dhcpv6-options' imports 'ietf-dhcpv6-types'...
-Installing the YANG file to '/home/thomson/devel/sysrepo-0.7.6/build/repository/yang/ietf-dhcpv6-types@2018-07-14.yang'...
-Resolving dependency: 'ietf-dhcpv6-server' imports 'ietf-dhcpv6-types'...
-Installing the YANG file to '/home/thomson/devel/sysrepo-0.7.6/build/repository/yang/ietf-dhcpv6-types@2018-07-14.yang'...
-Resolving dependency: 'ietf-dhcpv6-server' imports 'ietf-interfaces'...
-Schema of the module ietf-interfaces is already installed, skipping...
-Installing data files for module 'ietf-dhcpv6-server'...
-Resolving dependency: 'ietf-dhcpv6-server' imports 'ietf-dhcpv6-options'...
-Skipping installation of data files for module 'ietf-dhcpv6-options'...
-Resolving dependency: 'ietf-dhcpv6-options' imports 'ietf-dhcpv6-types'...
-Skipping installation of data files for module 'ietf-dhcpv6-types'...
-Resolving dependency: 'ietf-dhcpv6-server' imports 'ietf-dhcpv6-types'...
-Skipping installation of data files for module 'ietf-dhcpv6-types'...
-Resolving dependency: 'ietf-dhcpv6-server' imports 'ietf-interfaces'...
-Installing data files for module 'ietf-interfaces'...
-Notifying sysrepo about the change...
-Install operation completed successfully.
-</screen>
-
-You can confirm whether the models are imported correctly by using sysrepoctl -l
-
-<screen>
-$ sysrepoctl -l
-Sysrepo schema directory: /home/thomson/devel/sysrepo-0.7.6/build/repository/yang/
-Sysrepo data directory:   /home/thomson/devel/sysrepo-0.7.6/build/repository/data/
-(Do not alter contents of these directories manually)
-
-Module Name                | Revision   | Conformance | Data Owner          | Permissions | Submodules                    | Enabled Features
------------------------------------------------------------------------------------------------------------------------------------------------
-ietf-netconf-notifications | 2012-02-06 | Installed   | root:root           | 666         |                               |
-ietf-netconf               | 2011-06-01 | Imported    |                     |             |                               |
-ietf-netconf-acm           | 2012-02-22 | Imported    |                     |             |                               |
-nc-notifications           | 2008-07-14 | Installed   | root:root           | 666         |                               |
-notifications              | 2008-07-14 | Installed   | root:root           | 666         |                               |
-turing-machine             | 2013-12-27 | Installed   | root:root           | 666         |                               |
-iana-if-type               | 2014-05-08 | Installed   |                     |             |                               |
-ietf-interfaces            | 2014-05-08 | Installed   | root:root           | 666         |                               |
-ietf-ip                    | 2014-06-16 | Installed   |                     |             |                               |
-kea-dhcp4-server           | 2018-11-20 | Installed   | root:root           | 666         |                               |
-kea-dhcp6-server           | 2018-11-20 | Installed   | root:root           | 666         |                               |
-ietf-dhcpv6-server         | 2018-09-04 | Installed   | root:root           | 666         |                               |
-ietf-dhcpv6-options        | 2018-09-04 | Imported    |                     |             |                               |
-ietf-dhcpv6-types          | 2018-01-30 | Imported    |                     |             |                               |
-</screen>
-    </para>
-
-    <para>
-To install a new revision of a module it must first be uninstalled, e.g. by:
-<screen>
-sudo sysrepoctl -u -m kea-dhcp4-server
-</screen>
-If the module is used (i.e. imported) by other modules, it can be uninstalled
-only after those modules have finished using it. Installation and uninstallation must be
-done in dependency order and reverse dependency order accordingly.
-    </para>
-
-  </section>
-
-  <section xml:id="netconf-models">
-    <title>Supported YANG Models</title>
-
-    <para>
-      The only currently supported models are
-      <command>kea-dhcp4-server</command> and
-      <command>kea-dhcp6-server</command>.
-      There is partial support for <command>ietf-dhcpv6-server</command>,
-      but the primary focus of testing was on Kea DHCP servers.
-      Several other models
-      (<command>kea-dhcp-ddns</command> and
-      <command>kea-ctrl-agent</command>) are currently not supported.
-    </para>
-
-  </section>
-
-  <section xml:id="using-netconf">
-    <title>Using the NETCONF Agent</title>
-
-    <para>
-      The NETCONF agent follows this algorithm:
-      <itemizedlist>
-        <listitem>
-          <simpara>
-            For each managed server, get the initial configuration from
-            the server through the control socket.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            Open a connection with the Sysrepo environment and establish
-            two sessions with the startup and running datastores.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            Check that used (not essential) and required (essential)
-            modules are installed in the sysrepo repository at the
-            right revision.
-            If an essential module, i.e. a module where the configuration
-            schema for a managed server is defined, is not installed,
-            raise a fatal error.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            For each managed server, get the YANG configuration from the
-            startup datastore, translate it to JSON, and load it onto
-            the server being configured.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            For each managed server, subscribe a module change callback
-            using its model name.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            When a running configuration is changed, try
-            to validate or load the updated configuration via the callback to the managed
-            server.
-          </simpara>
-        </listitem>
-      </itemizedlist>
-    </para>
-  </section>
-
-  <section xml:id="netconf-configuration">
-    <title>Configuration</title>
-
-    <para>
-      The behavior described in <xref linkend="using-netconf"/> is
-      controlled by a few configuration flags, which can be set in
-      the global scope or in a specific managed-server scope.
-      In the second case, the value defined in the managed-server scope
-      takes precedence.
-      These flags are:
-      <itemizedlist>
-        <listitem>
-          <simpara>
-            The <command>boot-update</command> controls the initial
-            configuration phase; when true (the default), the initial
-            configuration retrieved from the classic Kea server JSON
-            configuration file is loaded first, and then the startup YANG
-            model is loaded. This setting lets administrators define a control socket in
-            the local JSON file and then download the configuration from YANG.
-            When set to false, this phase is skipped.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            The <command>subscribe-changes</command> command controls the
-            module change subscription; when true (the default),
-            a module change callback is subscribed, but when false
-            the phase is skipped and running configuration updates
-            are disabled. When set to true, the running datastore is
-            used to subscribe for changes.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            The <command>validate-changes</command> command controls how Kea monitors
-            changes in the Sysrepo configuration. Sysrepo offers two
-            stages where Kea could interact: validation and
-            application. At the validation (or
-            SR_EV_VERIFY event, in the Sysrepo naming convention) stage,
-            Kea retrieves the newly committed configuration
-            and verifies it. If the configuration is incorrect for
-            any reason, the Kea servers reject it and the error
-            is propagated back to the Sysrepo, which then
-            returns an error. This step only takes place if validate-changes is
-            set to true. In the
-            application (or SR_EV_APPLY event in the Sysrepo naming
-            convention) stage, the actual configuration is
-            applied. At this stage Kea can receive the configuration,
-            but it is too late to signal back any errors as the
-            configuration has already been committed.
-          </simpara>
-        </listitem>
-      </itemizedlist>
-     </para>
-
-    <para>
-      The idea behind the initial configuration phase is to boot Kea servers
-      with a minimal configuration which includes only a control socket, making
-      them manageable. For instance, for the DHCPv4 server:
-<screen>
-{
-    "Dhcp4": {
-        "control-socket": {
-            "socket-type": "unix",
-            "socket-name": "/tmp/kea4-sock"
-        }
-    }
-}
-</screen>
-      Note the alternative to boot with full configurations does not
-      allow easy tracking of changes or synchronization between the JSON
-      and YANG configuration sources; therefore, that setup is not really compatible with
-      the YANG / NETCONF configuration management paradigm, where
-      everything should be performed in YANG.
-    </para>
-
-    <para>
-      With module change subscriptions enabled, the kea-netconf daemon will
-      monitor any configuration changes as they appear in the Sysrepo. Such
-      changes can be done using the <command>sysrepocfg</command> tool or remotely
-      using any NETCONF client. For details, please see the Sysrepo
-      documentation or <xref linkend="operation-example"/>.
-      Those tools can be used to modify YANG configurations in
-      the running datastore. Note that committed configurations are only updated in
-      the running datastore; to keep them between server reboots they must be
-      copied to the startup datastore.
-    </para>
-
-    <para>
-      When module changes are tracked (using
-      <command>subscribe-changes</command> set to true) and the
-      running configuration has changed
-      (e.g. using <command>sysrepocfg</command> or any NETCONF client),
-      the callback validates the modified configuration
-      (if <command>validate-changes</command> was not set to false)
-      and runs a second time to apply the new configuration. If the validation fails, the
-      callback is still called again but with an ABORT (vs APPLY)
-      event with rollback changes.
-    </para>
-
-    <para>
-      The returned code of the callback on an APPLY event is ignored,
-      as it is too late to refuse a bad configuration.
-    </para>
-
-    <para>
-      There are four ways in which a modified YANG configuration could
-      possibly be incorrect:
-      <orderedlist>
-        <listitem>
-          <simpara>
-            It can be non-compliant with the schema, e.g. unknown entry,
-            missing mandatory entry, value with a bad type, or
-            not matching a constraint.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            It can fail to be translated from YANG to JSON, e.g.
-            invalid user context.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            It can fail Kea server sanity checks, e.g. out-of-subnet-pool
-            range or unsupported database type.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            The syntax is correct and passes server sanity checks but
-            the configuration fails to run, e.g. the configuration
-            specifies database credentials, but the database refuses
-            connection.
-          </simpara>
-        </listitem>
-      </orderedlist>
-      The first case is handled by Sysrepo. The second and third cases
-      are handled by kea-netconf in the validation phase (if not disabled
-      by setting <command>validate-changes</command> to true). The last
-      case causes the application phase to fail without a sensible report
-      to Sysrepo.
-    </para>
-
-    <para>
-      The managed Kea servers or agents are described in the
-      <command>managed-servers</command> section. Each sub-section
-      begins by the service name: <command>dhcp4</command>,
-      <command>dhcp6</command>, <command>d2</command>
-      (the DHCP-DDNS server does not support the control channel
-      feature yet), and <command>ca</command> (the control agent).
-    </para>
-
-    <para>
-      Each managed server entry contains optionally:
-      <itemizedlist>
-        <listitem>
-          <simpara>
-            <command>boot-update</command>,
-            <command>subscribe-changes</command>, and
-            <command>validate-changes</command> control flags.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            <command>model</command> specifies the YANG model / module name.
-            For each service, the default is the corresponding Kea YANG model,
-            e.g. for <userinput>"dhcp4"</userinput> it is
-            <userinput>"kea-dhcp4-server"</userinput>.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            <command>control-socket</command> specifies the control
-            socket for managing the service configuration.
-          </simpara>
-        </listitem>
-      </itemizedlist>
-    </para>
-
-    <para>
-      A control socket is specified by:
-      <itemizedlist>
-        <listitem>
-          <simpara>
-            <command>socket-type</command>: the socket type is either
-            <command>stdout</command> (the default; it is not really a socket,
-            but it allows <command>kea-netconf</command> to run in debugging
-            mode where everything is printed on stdout. Can be also useful to
-            redirect commands easily.), <command>unix</command> (standard
-            direct server control channel, which uses UNIX sockets), and
-            <command>http</command> (using a control agent, which accepts HTTP
-            connections).
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            <command>socket-name</command>: the local socket name for
-            the <command>unix</command> socket type (default empty string).
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <simpara>
-            <command>socket-url</command>: the HTTP URL for the
-            <command>http</command> socket type (default
-            <userinput>http://127.0.0.1:8000/</userinput>).
-          </simpara>
-        </listitem>
-      </itemizedlist>
-    </para>
-
-    <para>
-      User contexts can store arbitrary data as long as they are in valid JSON
-      syntax and their top-level element is a map (i.e. the data must be
-      enclosed in curly brackets). They are accepted at the NETCONF entry,
-      i.e. below the top-level, managed-service entry, and control-socket
-      entry scopes.
-    </para>
-
-    <para>
-      Hooks libraries can be loaded by the NETCONF agent just as with
-      other servers or agents; however, currently no hook points are defined.
-      The <command>hooks-libraries</command> list
-      contains the list of hooks libraries that should be loaded by kea-netconf,
-      along with their configuration information specified with
-      <command>parameters</command>.
-    </para>
-
-    <para>
-      Please consult <xref linkend="logging"/> for the details on how to
-      configure logging. The NETCONF agent's root logger's name is
-      <command>kea-netconf</command>, as given in the example above.
-    </para>
-  </section>
-
-  <section xml:id="netconf-example">
-    <title>kea-netconf Configuration Example</title>
-    <para>
-      The following example demonstrates the basic NETCONF configuration.
-      More examples are available in the <command>doc/examples/netconf</command>
-      directory in the Kea sources.
-    </para>
-    <para>
-<screen>
-// This is a simple example of a configuration for the NETCONF agent.
-// This server provides a YANG interface for all Kea servers and the agent.
-{
-    "Netconf":
-    {
-        // Control flags can be defined in the global scope or
-        // in a managed server scope. Precedence are:
-        // - use the default value (true)
-        // - use the global value
-        // - use the local value.
-        // So this overwrites the default value:
-        "boot-update": false,
-
-        // This map specifies how each server is managed. For each server there
-        // is a name of the YANG model to be used and the control channel.
-        //
-        // Currently three control channel types are supported:
-        // "stdout" which outputs the configuration on the standard output,
-        // "unix" which uses the local control channel supported by the
-        // "dhcp4" and "dhcp6" servers ("d2" support is not yet available),
-        // and "http" which uses the Control agent "ca" to manage itself or
-        // to forward commands to "dhcp4" or "dhcp6".
-        "managed-servers":
-        {
-            // This is how kea-netconf can communicate with the DHCPv4 server.
-            "dhcp4":
-            {
-                "comment": "DHCP4 server",
-                "model": "kea-dhcp4-server",
-                "control-socket":
-                {
-                    "socket-type": "unix",
-                    "socket-name": "/tmp/kea4-ctrl-socket"
-                }
-            },
-
-            // DHCPv6 parameters.
-            "dhcp6":
-            {
-                "model": "kea-dhcp6-server",
-                "control-socket":
-                {
-                    "socket-type": "unix",
-                    "socket-name": "/tmp/kea6-ctrl-socket"
-                }
-            },
-
-            // Currently the DHCP-DDNS (nicknamed D2) server does not support
-            // a command channel.
-            "d2":
-            {
-                "model": "kea-dhcp-ddns",
-                "control-socket":
-                {
-                    "socket-type": "stdout",
-                    "user-context": { "in-use": false }
-                }
-            },
-
-            // Of course the Control Agent (nicknamed CA) supports HTTP.
-            "ca":
-            {
-                "model": "kea-ctrl-agent",
-                "control-socket":
-                {
-                    "socket-type": "http",
-                    "socket-url": "http://127.0.0.1:8000/"
-                }
-            }
-        },
-
-        // kea-netconf is able to load hooks libraries that augment its operation.
-        // Currently there are no hook points defined in kea-netconf
-        // processing.
-        "hooks-libraries": [
-            // The hooks libraries list may contain more than one library.
-            {
-                // The only necessary parameter is the library filename.
-                "library": "/opt/local/netconf-commands.so",
-
-                // Some libraries may support parameters. Make sure you
-                // type this section carefully, as kea-netconf does not
-                // validate it (because the format is library-specific).
-                "parameters": {
-                    "param1": "foo"
-                }
-            }
-        ],
-
-        // Similar to other Kea components, Netconf also uses logging.
-        "loggers": [
-            {
-                "name": "kea-netconf",
-                "output_options": [
-                    {
-                        "output": "/var/log/kea-netconf.log",
-                        // Several additional parameters are possible in
-                        // addition to the typical output.
-                        // Flush determines whether logger flushes output
-                        //  to a file.
-                        // Maxsize determines maximum filesize before
-                        // the file is being rotated.
-                        // Maxver specifies the maximum number of
-                        //  rotated files being kept.
-                        "flush": true,
-                        "maxsize": 204800,
-                        "maxver": 4
-                    }
-                ],
-                "severity": "INFO",
-                "debuglevel": 0
-            }
-        ]
-    }
-}
-</screen>
-    </para>
-  </section>
-
-  <section xml:id="netconf-start-stop">
-    <title>Starting and Stopping the NETCONF Agent</title>
-    <para>
-<!-- no keactrl yet -->
-      kea-netconf accepts the following command-line switches:
-    </para>
-    <itemizedlist>
-      <listitem>
-        <simpara>
-          <command>-c <replaceable>file</replaceable></command> -
-          specifies the configuration file.
-        </simpara>
-      </listitem>
-
-      <listitem>
-        <simpara>
-          <command>-d</command> - specifies whether the agent logging
-          should be switched to debug/verbose mode. In verbose mode,
-          the logging severity and debuglevel specified in the
-          configuration file are ignored and "debug" severity and the
-          maximum debuglevel (99) are assumed. The flag is convenient
-          for temporarily switching the server into maximum verbosity,
-          e.g. when debugging.
-        </simpara>
-      </listitem>
-
-      <listitem>
-        <simpara>
-          <command>-t <replaceable>file</replaceable></command> -
-          specifies the configuration file to be tested. Kea-netconf
-          attempts to load it and conducts sanity
-          checks; note that certain checks are possible only while
-          running the actual server. The actual status is reported
-          with exit code (0 = configuration looks ok, 1 = error
-          encountered). Kea will print out log messages to standard
-          output and error to standard error when testing
-          configuration.
-        </simpara>
-      </listitem>
-
-      <listitem>
-        <simpara>
-          <command>-v</command> - displays the version of kea-netconf and exits.
-        </simpara>
-      </listitem>
-
-      <listitem>
-        <simpara>
-          <command>-V</command> - displays the extended version information for
-          kea-netconf and exits. The listing includes
-          the versions of the libraries dynamically linked to Kea.
-        </simpara>
-      </listitem>
-
-      <listitem>
-        <simpara>
-          <command>-W</command> - displays the Kea configuration
-          report and exits. The report is a copy of the
-          <filename>config.report</filename> file produced by
-          <userinput>./configure</userinput>; it is embedded in the
-          executable binary.
-        </simpara>
-      </listitem>
-    </itemizedlist>
-  </section>
-
-  <section xml:id="operation-example">
-    <title>Step-by-Step NETCONF Agent Operation Example</title>
-    <note><para>Copies of example configurations presented within this section
-    can be found in the Kea source code, under
-    <filename>doc/examples/netconf/kea-dhcp6-operations</filename>.
-    </para></note>
-
-   <section xml:id="operation-example-setup">
-      <title>Setup of NETCONF Agent Operation Example</title>
-      <para>
-        The test box has an Ethernet interface named eth1.
-        On some systems it is possible to rename interfaces,
-        for instance on a Linux with an ens38 interface:
-<screen>
- # ip link set down dev <userinput>ens38</userinput>
- # ip link set name eth1 dev <userinput>ens38</userinput>
- # ip link set up dev eth1
-</screen>
-        The interface must have an address in the test prefix:
-<screen>
- # ip -6 addr add 2001:db8::1/64 dev eth1
-</screen>
-      </para>
-
-      <para>
-        The Kea DHCPv6 server must be launched with the configuration
-        specifying a control socket used to receive control commands.
-        The <command>kea-netconf</command> process uses this socket
-        to communicate with the DHCPv6 server, i.e. it pushes
-        translated configurations to that server using control commands.
-        The following is the example control socket specification for the
-        Kea DHCPv6 server:
-<screen>
-{
-    "Dhcp6": {
-        "control-socket": {
-            "socket-type": "unix",
-            "socket-name": "/tmp/kea6-sock"
-        }
-    }
-}
-</screen>
-        In order to launch the Kea DHCPv6 server using the configuration
-        contained within the <filename>boot.json</filename> file, run:
-<screen>
- # kea-dhcp6 -d -c <userinput>boot.json</userinput>
-</screen>
-        The current configuration of the server can be fetched via
-        control socket by running:
-<screen>
- # echo '{ "command": "config-get" }' | socat UNIX:/tmp/kea6-sock '-,ignoreeof'
-</screen>
-      </para>
-
-      <para>
-        The following is the example <filename>netconf.json</filename>
-        configuration for <command>kea-netconf</command>, to manage the Kea
-        DHCPv6 server:
-<screen>
-{
-    "Netconf":
-    {
-        "managed-servers":
-        {
-            "dhcp6":
-            {
-                "control-socket":
-                {
-                    "socket-type": "unix",
-                    "socket-name": "/tmp/kea6-sock"
-                }
-            }
-        },
-
-        "loggers":
-        [
-            {
-                "name": "kea-netconf",
-                "output_options":
-                [
-                    {
-                        "output": "stderr"
-                    }
-                ],
-                "severity": "DEBUG",
-                "debuglevel": 99
-            }
-        ]
-    }
-}
-</screen>
-        Note that in production you should not need to log at the DEBUG level.
-      </para>
-      <para>
-        The Kea NETCONF agent is launched by:
-<screen>
- # kea-netconf -d -c <userinput>netconf.json</userinput>
-</screen>
-      </para>
-
-      <para>
-        Now that both <command>kea-netconf</command> and
-        <command>kea-dhcp6</command> are running, it is possible to populate
-        updates to the configuration to the DHCPv6 server. The following is
-        the configuration extracted from <filename>startup.xml</filename>:
-<screen>
-&lt;config xmlns="urn:ietf:params:xml:ns:yang:kea-dhcp6-server"&gt;
-  &lt;subnet6&gt;
-    &lt;id&gt;1&lt;/id&gt;
-    &lt;pool&gt;
-      &lt;start-address&gt;2001:db8::1:0&lt;/start-address&gt;
-      &lt;end-address&gt;2001:db8::1:ffff&lt;/end-address&gt;
-      &lt;prefix&gt;2001:db8::1:0/112&lt;/prefix&gt;
-    &lt;/pool&gt;
-    &lt;subnet&gt;2001:db8::/64&lt;/subnet&gt;
-  &lt;/subnet6&gt;
-  &lt;interfaces-config&gt;
-    &lt;interfaces&gt;eth1&lt;/interfaces&gt;
-  &lt;/interfaces-config&gt;
-  &lt;control-socket&gt;
-    &lt;socket-name&gt;/tmp/kea6-sock&lt;/socket-name&gt;
-    &lt;socket-type&gt;unix&lt;/socket-type&gt;
-  &lt;/control-socket&gt;
-&lt;/config&gt;
-</screen>
-        To populate this new configuration:
-<screen>
- # sysrepocfg -d startup -f xml -i <userinput>startup.xml</userinput> kea-dhcp6-server
-</screen>
-      </para>
-
-      <para>
-        <command>kea-netconf</command> pushes the configuration
-        found in the Sysrepo startup datastore to all Kea servers during
-        its initialization phase, after it subscribes to module changes
-        in the Sysrepo running datastore. This action copies the
-        configuration from the startup datastore to the running datastore
-        and enables the running datastore, making it available.
-      </para>
-
-      <para>
-        Changes to the running datastore are applied after validation
-        to the Kea servers. Note that they are not by default copied back to the
-        startup datastore, i.e. changes are not permanent.
-      </para>
-
-    </section>
-
-    <section xml:id="operation-example-errors">
-      <title>Error Handling in NETCONF Operation Example</title>
-      <para>
-        There are four classes of issues with the configurations applied via
-        NETCONF:
-
-        <orderedlist>
-          <listitem>
-            <simpara>
-              The configuration does not comply with the YANG schema.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              The configuration cannot be translated from YANG to
-              the Kea JSON.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              The configuration is rejected by the Kea server.
-            </simpara>
-          </listitem>
-          <listitem>
-            <simpara>
-              The configuration was validated by the Kea server but
-              cannot be applied.
-            </simpara>
-          </listitem>
-        </orderedlist>
-      </para>
-
-      <para>
-        In the first case, consider the following <filename>BAD-schema.xml</filename>
-        configuration file:
-<screen>
-&lt;config xmlns="urn:ietf:params:xml:ns:yang:kea-dhcp6-server"&gt;
-  &lt;subnet4&gt;
-    &lt;id&gt;1&lt;/id&gt;
-    &lt;pool&gt;
-      &lt;start-address&gt;2001:db8::1:0&lt;/start-address&gt;
-      &lt;end-address&gt;2001:db8::1:ffff&lt;/end-address&gt;
-      &lt;prefix&gt;2001:db8::1:0/112&lt;/prefix&gt;
-    &lt;/pool&gt;
-    &lt;subnet&gt;2001:db8::/64&lt;/subnet&gt;
-  &lt;/subnet6&gt;
-  &lt;interfaces-config&gt;
-    &lt;interfaces&gt;eth1&lt;/interfaces&gt;
-  &lt;/interfaces-config&gt;
-  &lt;control-socket&gt;
-    &lt;socket-name&gt;/tmp/kea6-sock&lt;/socket-name&gt;
-    &lt;socket-type&gt;unix&lt;/socket-type&gt;
-  &lt;/control-socket&gt;
-&lt;/config&gt;
-</screen>
-        is directly rejected by <command>sysrepocfg</command>:
-<screen>
- # sysrepocfg -d running -f xml -i <userinput>BAD-schema.xml</userinput> kea-dhcp6-server
-</screen>
-      </para>
-
-      <para>
-        In the second case, the configuration is rejected by
-        <command>kea-netconf</command>. For example, consider this
-        <filename>BAD-translator.xml</filename> file:
-<screen>
-&lt;config xmlns="urn:ietf:params:xml:ns:yang:kea-dhcp6-server"&gt;
-  &lt;subnet6&gt;
-    &lt;id&gt;1&lt;/id&gt;
-    &lt;pool&gt;
-      &lt;start-address&gt;2001:db8::1:0&lt;/start-address&gt;
-      &lt;end-address&gt;2001:db8::1:ffff&lt;/end-address&gt;
-      &lt;prefix&gt;2001:db8::1:0/112&lt;/prefix&gt;
-    &lt;/pool&gt;
-    &lt;subnet&gt;2001:db8::/64&lt;/subnet&gt;
-  &lt;/subnet6&gt;
-  &lt;interfaces-config&gt;
-    &lt;interfaces&gt;eth1&lt;/interfaces&gt;
-  &lt;/interfaces-config&gt;
-  &lt;control-socket&gt;
-    &lt;socket-name&gt;/tmp/kea6-sock&lt;/socket-name&gt;
-    &lt;socket-type&gt;unix&lt;/socket-type&gt;
-  &lt;/control-socket&gt;
-  &lt;user-context&gt;bad&lt;/user-context&gt;
-&lt;/config&gt;
-</screen>
-      </para>
-
-      <para>
-        In the third case, the configuration is presented to the
-        Kea DHCPv6 server and fails to validate as in this
-        <filename>BAD-config.xml</filename> file:
-<screen>
-&lt;config xmlns="urn:ietf:params:xml:ns:yang:kea-dhcp6-server"&gt;
-  &lt;subnet6&gt;
-    &lt;id&gt;1&lt;/id&gt;
-    &lt;pool&gt;
-      &lt;start-address&gt;2001:db8:1::0&lt;/start-address&gt;
-      &lt;end-address&gt;2001:db8:1::ffff&lt;/end-address&gt;
-      &lt;prefix&gt;2001:db8:1::0/112&lt;/prefix&gt;
-    &lt;/pool&gt;
-    &lt;subnet&gt;2001:db8::/64&lt;/subnet&gt;
-  &lt;/subnet6&gt;
-  &lt;interfaces-config&gt;
-    &lt;interfaces&gt;eth1&lt;/interfaces&gt;
-  &lt;/interfaces-config&gt;
-  &lt;control-socket&gt;
-    &lt;socket-name&gt;/tmp/kea6-sock&lt;/socket-name&gt;
-    &lt;socket-type&gt;unix&lt;/socket-type&gt;
-  &lt;/control-socket&gt;
-&lt;/config&gt;
-</screen>
-      </para>
-
-      <para>
-        In the last case, the misconfiguration is detected too late and
-        the change must be reverted in Sysrepo, e.g. using the startup
-        datastore as a backup. For this reason, please use the
-        <command>sysrepocfg</command> <option>--permanent</option> /
-        <option>-p</option> option (or a similar feature of NETCONF clients)
-        with care.
-      </para>
-    </section>
-
-    <section xml:id="operation-example-2pools">
-      <title>NETCONF Operation Example with Two Pools</title>
-      <para>
-        This example adds a second pool to the initial (i.e. startup)
-        configuration in the <filename>twopools.xml</filename> file:
-<screen>
-&lt;config xmlns="urn:ietf:params:xml:ns:yang:kea-dhcp6-server"&gt;
-  &lt;subnet6&gt;
-    &lt;id&gt;1&lt;/id&gt;
-    &lt;pool&gt;
-      &lt;start-address&gt;2001:db8::1:0&lt;/start-address&gt;
-      &lt;end-address&gt;2001:db8::1:ffff&lt;/end-address&gt;
-      &lt;prefix&gt;2001:db8::1:0/112&lt;/prefix&gt;
-    &lt;/pool&gt;
-    &lt;pool&gt;
-      &lt;start-address&gt;2001:db8::2:0&lt;/start-address&gt;
-      &lt;end-address&gt;2001:db8::2:ffff&lt;/end-address&gt;
-      &lt;prefix&gt;2001:db8::2:0/112&lt;/prefix&gt;
-    &lt;/pool&gt;
-    &lt;subnet&gt;2001:db8::/64&lt;/subnet&gt;
-  &lt;/subnet6&gt;
-  &lt;interfaces-config&gt;
-    &lt;interfaces&gt;eth1&lt;/interfaces&gt;
-  &lt;/interfaces-config&gt;
-  &lt;control-socket&gt;
-    &lt;socket-name&gt;/tmp/kea6-sock&lt;/socket-name&gt;
-    &lt;socket-type&gt;unix&lt;/socket-type&gt;
-  &lt;/control-socket&gt;
-&lt;/config&gt;
-</screen>
-        This configuration is installed by:
-<screen>
- # sysrepocfg -d running -f xml -i <userinput>twopools.xml</userinput> kea-dhcp6-server
-</screen>
-      </para>
-    </section>
-
-    <section xml:id="operation-example-2subnets">
-      <title>NETCONF Operation Example with Two Subnets</title>
-      <para>
-        This example specifies two subnets in the
-         <filename>twosubnets.xml</filename> file:
-<screen>
-&lt;config xmlns="urn:ietf:params:xml:ns:yang:kea-dhcp6-server"&gt;
-  &lt;subnet6&gt;
-    &lt;id&gt;1&lt;/id&gt;
-    &lt;pool&gt;
-      &lt;start-address&gt;2001:db8:1::&lt;/start-address&gt;
-      &lt;end-address&gt;2001:db8:1::ffff&lt;/end-address&gt;
-      &lt;prefix&gt;2001:db8:1::/112&lt;/prefix&gt;
-    &lt;/pool&gt;
-    &lt;subnet&gt;2001:db8:1::/64&lt;/subnet&gt;
-  &lt;/subnet6&gt;
-  &lt;subnet6&gt;
-    &lt;id&gt;2&lt;/id&gt;
-    &lt;pool&gt;
-      &lt;start-address&gt;2001:db8:2::&lt;/start-address&gt;
-      &lt;end-address&gt;2001:db8:2::ffff&lt;/end-address&gt;
-      &lt;prefix&gt;2001:db8:2::/112&lt;/prefix&gt;
-    &lt;/pool&gt;
-    &lt;subnet&gt;2001:db8:2::/64&lt;/subnet&gt;
-  &lt;/subnet6&gt;
-  &lt;interfaces-config&gt;
-    &lt;interfaces&gt;eth1&lt;/interfaces&gt;
-  &lt;/interfaces-config&gt;
-  &lt;control-socket&gt;
-    &lt;socket-name&gt;/tmp/kea6-sock&lt;/socket-name&gt;
-    &lt;socket-type&gt;unix&lt;/socket-type&gt;
-  &lt;/control-socket&gt;
-&lt;/config&gt;
-</screen>
-        This configuration is installed by:
-<screen>
- # sysrepocfg -d running -f xml -i <userinput>twosubnets.xml</userinput> kea-dhcp6-server
-</screen>
-      </para>
-    </section>
-
-    <section xml:id="operation-example-logging">
-      <title>NETCONF Operation Example with Logging</title>
-      <para>
-        This example adds a logger entry to the initial (i.e. startup)
-        configuration in the <filename>logging.xml</filename> file:
-<screen>
-&lt;config xmlns="urn:ietf:params:xml:ns:yang:kea-dhcp6-server"&gt;
-  &lt;interfaces-config&gt;
-    &lt;interfaces&gt;eth1&lt;/interfaces&gt;
-  &lt;/interfaces-config&gt;
-  &lt;subnet6&gt;
-    &lt;id&gt;1&lt;/id&gt;
-    &lt;pool&gt;
-      &lt;start-address&gt;2001:db8::1:0&lt;/start-address&gt;
-      &lt;end-address&gt;2001:db8::1:ffff&lt;/end-address&gt;
-      &lt;prefix&gt;2001:db8::1:0/112&lt;/prefix&gt;
-    &lt;/pool&gt;
-    &lt;subnet&gt;2001:db8::/64&lt;/subnet&gt;
-  &lt;/subnet6&gt;
-  &lt;control-socket&gt;
-    &lt;socket-name&gt;/tmp/kea6-sock&lt;/socket-name&gt;
-    &lt;socket-type&gt;unix&lt;/socket-type&gt;
-  &lt;/control-socket&gt;
-  &lt;logger&gt;
-    &lt;name&gt;kea-dhcp6&lt;/name&gt;
-    &lt;output-option&gt;
-      &lt;output&gt;stderr&lt;/output&gt;
-    &lt;/output-option&gt;
-    &lt;debuglevel&gt;99&lt;/debuglevel&gt;
-    &lt;severity&gt;DEBUG&lt;/severity&gt;
-  &lt;/logger&gt;
-&lt;/config&gt;
-</screen>
-      </para>
-
-      <para>
-        The corresponding Kea configuration in JSON is:
-<screen>
-{
-  "Dhcp6": {
-    "control-socket": {
-      "socket-name": "/tmp/kea6-sock",
-      "socket-type": "unix"
-    },
-    "interfaces-config": {
-      "interfaces": [ "eth1" ]
-    },
-    "subnet6": [
-      {
-        "id": 1,
-        "pools": [
-          {
-            "pool": "2001:db8::1:0/112"
-          }
-        ],
-        "subnet": "2001:db8::/64"
-      }
-    ],
-    "loggers": [
-      {
-        "name": "kea-dhcp6",
-        "output_options": [
-          {
-            "output": "stderr"
-          }
-        ],
-        "severity": "DEBUG",
-        "debuglevel": 99
-      }
-   ]
- }
-}
-</screen>
-      </para>
-
-      <para>
-        Finally, any of the previous examples can be replayed using
-        <command>sysrepocfg</command> in edit mode as follows:
-<screen>
- # sysrepocfg -d running -f xml -e <userinput>vi</userinput> kea-dhcp6-server
-</screen>
-        or, of course, using a NETCONF client like
-        <command>netopeer2-cli</command> from the
-        <uri xmlns:xlink="http://www.w3.org/1999/xlink"
-              xlink:href="https://github.com/CESNET/Netopeer2">
-        Netopeer2</uri> NETCONF Toolset.
-      </para>
-
-    </section>
-  </section>
-
-</chapter>
diff --git a/doc/guide/quickstart.xml b/doc/guide/quickstart.xml
deleted file mode 100644 (file)
index e4523c5..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-<!--
- - Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-
-<!-- need this include to make the &keaversion; macro work -->
-<!DOCTYPE book [
-<!ENTITY % keaversion SYSTEM "version.ent">
-%keaversion;
-]>
-
-<!-- Converted by db4-upgrade version 1.1 -->
-<chapter xmlns="http://docbook.org/ns/docbook" version="5.0"
-         xml:id="quickstart">
-
-
-    <title>Quick Start</title>
-
-    <para>
-        This section describes the basic steps needed to get Kea up and running.
-        For further details, full customizations, and troubleshooting, see the
-        respective chapters in the Kea Administrator Reference Manual (ARM).
-    </para>
-
-    <section xml:id="quick-start">
-      <title>Quick Start Guide for DHCPv4 and DHCPv6 Services</title>
-
-      <orderedlist>
-
-        <listitem>
-          <simpara>
-            Install required run-time and build dependencies. See <xref linkend="build-requirements"/> for details.
-          </simpara>
-        </listitem>
-
-        <listitem>
-          <para>
-            Download the Kea source tarball from the <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.isc.org/downloads/">ISC.org downloads page</link> or the <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://ftp.isc.org/isc/kea/">ISC FTP server</link>.
-          </para>
-        </listitem>
-
-        <listitem>
-          <para>
-            Extract the tarball. For example:
-            <screen>$ <userinput>tar xvzf kea-&keaversion;.tar.gz</userinput></screen>
-          </para>
-        </listitem>
-
-        <listitem>
-          <para>Go into the source directory and run the configure script:
-            <screen>$ <userinput>cd kea-&keaversion;</userinput>
-$ <userinput>./configure [your extra parameters]</userinput></screen>
-          </para>
-        </listitem>
-
-        <listitem>
-          <para>Build it:
-            <screen>$ <userinput>make</userinput></screen>
-          </para>
-        </listitem>
-
-        <listitem>
-          <para>Install it (by default it will be placed in
-          <filename>/usr/local/</filename>,
-          so it is likely that you will need root privileges for this step):
-            <screen># <userinput>make install</userinput></screen>
-          </para>
-        </listitem>
-
-        <listitem>
-          <para>Edit the Kea configuration files which by default are installed in
-          the <filename>[kea-install-dir]/etc/kea/</filename> directory. These are:
-          <filename>kea-dhcp4.conf</filename>, <filename>kea-dhcp6.conf</filename>,
-          <filename>kea-dhcp-ddns.conf</filename> and
-          <filename>kea-ctrl-agent.conf</filename>, for DHCPv4 server, DHCPv6 server,
-          D2, and Control Agent, respectively.
-          </para>
-        </listitem>
-
-        <listitem>
-          <para>In order to start the DHCPv4 server in the background, run the
-          following command (as root):
-          <screen># <userinput>keactrl start -s dhcp4</userinput></screen>
-          Or run the following command to start the DHCPv6 server instead:
-          <screen># <userinput>keactrl start -s dhcp6</userinput></screen>
-          Note that it is also possible to start all servers simultaneously:
-          <screen>$ <userinput>keactrl start</userinput></screen>
-          </para>
-        </listitem>
-
-        <listitem>
-          <para>Verify that the Kea server(s) is/are running:
-          <screen># <userinput>keactrl status</userinput></screen>
-          A server status of "inactive" may indicate a configuration
-          error. Please check the log file (by default named
-          <filename>[kea-install-dir]/var/log/kea-dhcp4.log</filename>,
-          <filename>[kea-install-dir]/var/log/kea-dhcp6.log</filename>,
-          <filename>[kea-install-dir]/var/log/kea-ddns.log</filename> or
-          <filename>[kea-install-dir]/var/log/kea-ctrl-agent.log</filename>) 
-          for the details of the error.
-          </para>
-        </listitem>
-
-        <listitem>
-          <para>
-            If the server has been started successfully, test that it is
-            responding to DHCP queries and that the client
-            receives a configuration from the server; for example, use
-            the <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.isc.org/downloads/DHCP/">ISC DHCP client</link>.
-          </para>
-        </listitem>
-
-        <listitem>
-          <para>
-            Stop running the server(s):
-            <screen># <userinput>keactrl stop</userinput></screen>
-          </para>
-        </listitem>
-      </orderedlist>
-      <para>
-        For instructions specific to your system, please read the
-        <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://kb.isc.org/docs/installing-kea">system-specific notes</link>,
-        available in the <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://kb.isc.org/docs">Kea section of ISC's Knowledgebase</link>.
-      </para>
-
-      <para>The details of <command>keactrl</command> script usage can be found
-      in <xref linkend="keactrl"/>.</para>
-    </section>
-
-    <section xml:id="quick-start-direct-run">
-      <title>Running the Kea Servers Directly</title>
-      <para>The Kea servers can be started directly, without the need to use the
-      <command>keactrl</command>. To start the DHCPv4 server run the following
-      command:
-      <screen># <userinput>kea-dhcp4 -c /path/to/your/kea4/config/file.json</userinput></screen>
-      Similarly, to start the DHCPv6 server run the following command:
-      <screen># <userinput>kea-dhcp6 -c /path/to/your/kea6/config/file.json</userinput></screen>
-    </para>
-    </section>
-
-  </chapter>
diff --git a/doc/guide/shell.xml b/doc/guide/shell.xml
deleted file mode 100644 (file)
index 45e76e1..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-<!--
- - Copyright (C) 2017-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-<!-- Converted by db4-upgrade version 1.1 -->
-<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="kea-shell">
-  <title>The Kea Shell</title>
-
-  <section xml:id="shell-overview">
-    <title>Overview</title>
-    <para>Kea 1.2.0 introduced the Control Agent (CA, see <xref linkend="kea-ctrl-agent"/>), which
-    provides a RESTful control interface over HTTP. That API is typically expected to be used by
-    various IPAMs and similar management systems. Nevertheless, there may be cases when an administrator wants
-    to send a command to the CA directly. The Kea shell provides a way to do this. It is a simple
-    command-line, scripting-friendly, text client that is able to connect to the CA, send it commands
-    with parameters, retrieve the responses, and display them.</para>
-
-    <para>As the primary purpose of the Kea shell is as a tool in a scripting environment,
-    it is not interactive. However, with simple tricks it can be run manually.
-    </para>
-  </section>
-
-  <section xml:id="shell-usage">
-    <title>Shell Usage</title>
-    <para><command>kea-shell</command> is run as follows:
-<screen>
-kea-shell [--host hostname] [--port number] [--path path] [--timeout seconds] [--service service-name] [command]
-</screen>
-    where:
-    </para>
-    <itemizedlist>
-      <listitem>
-        <simpara>
-          <command>--host <replaceable>hostname</replaceable></command> specifies the hostname
-          of the CA. If not specified, "localhost" is used.
-        </simpara>
-      </listitem>
-
-      <listitem>
-        <simpara>
-          <command>--port <replaceable>number</replaceable></command> specifies the TCP port
-          on which the CA listens. If not specified, 8000 is used.
-        </simpara>
-      </listitem>
-
-      <listitem>
-        <simpara>
-          <command>--path <replaceable>path</replaceable></command> specifies
-          the path in the URL to connect to. If not specified, an
-          empty path is used. As the CA listens at the empty path,
-          this parameter is useful only with a reverse proxy.
-        </simpara>
-      </listitem>
-
-      <listitem>
-        <simpara>
-          <command>--timeout <replaceable>seconds</replaceable></command> specifies the
-          timeout (in seconds) for the connection. If not given, 10 seconds is used.
-        </simpara>
-      </listitem>
-
-      <listitem>
-        <simpara>
-          <command>--service <replaceable>service-name</replaceable></command> specifies the
-          target of a command. If not given, the CA will be used as the target. May be used more
-          than once to specify multiple targets.
-        </simpara>
-      </listitem>
-
-
-      <listitem>
-        <simpara>
-          <command>command</command> specifies the command to be sent. If not specified,
-          the <command>list-commands</command> command is used.
-        </simpara>
-      </listitem>
-    </itemizedlist>
-
-    <para>Other switches are:</para>
-    <itemizedlist>
-      <listitem>
-        <simpara>
-          <command>-h</command> prints a help message.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara>
-          <command>-v</command> prints the software version.
-        </simpara>
-      </listitem>
-    </itemizedlist>
-
-    <para>
-      Once started, the shell reads parameters for the command from standard input, which are
-      expected to be in JSON format. When all have been read, the shell establishes a connection
-      with the CA using HTTP, sends the command, and awaits a response. Once that is received,
-      it is displayed on standard output.
-    </para>
-
-    <para>
-      For a list of available commands, see <xref linkend="ctrl-channel"/>; additional commands
-      may be provided by hook libraries. If you are unsure which commands are supported, use the
-      <command>list-commands</command> command. It will instruct the CA to return a list of
-      all supported commands.
-    </para>
-
-    <para>The following shows a simple example of usage:
-<screen>
-$ <userinput>kea-shell --host 192.0.2.1 --port 8001 --service dhcp4 list-commands</userinput>
-^D
-</screen>
-    After the command line is entered, the program waits for command parameters to be entered.
-    Since <command>list-commands</command> does not take any
-    arguments, CTRL-D (represented in the above example by "^D") is pressed to indicate
-    end-of-file and terminate the parameter input. The shell then contacts
-    the CA and prints out the list of available commands returned for the service named <command>dhcp4</command>.
-    </para>
-
-    <para>It is envisaged that the Kea shell will be most frequently used in scripts; the next example
-    shows a simple scripted execution. It sends the command "config-write" to the CA
-    (the <command> --service </command> parameter hasn't been used), along
-    with the parameters specified in param.json. The result will be stored in result.json.
-<screen>
-$ cat param.json
-"filename": "my-config-file.json"
-$ <userinput>cat param.json | kea-shell --host 192.0.2.1 config-write &gt; result.json</userinput>
-</screen>
-    </para>
-
-    <para>When a reverse proxy is used to de-multiplex requests to different
-    servers, the default empty path in the URL is not enough, so the
-    <command> --path </command> parameter should be used. For instance,
-    if requests to the "/kea" path are forwarded to the CA this can be used:
-<screen>
-$ <userinput>kea-shell --host 192.0.2.1 --port 8001 --path kea ...</userinput>
-</screen>
-    </para>
-
-    <para>Kea shell requires Python to to be installed on the system. It has been tested with
-    Python 2.7 and various versions
-    of Python 3, up to 3.5. Since not every Kea deployment uses this feature and there are
-    deployments that do not have Python, the Kea shell is not enabled by default. To use it,
-    specify <command>--enable-shell</command> when running "configure" during the
-    installation of Kea.</para>
-
-    <para>The Kea shell is intended to serve more as a demonstration of the RESTful interface's
-    capabilities (and, perhaps, an illustration for people interested in integrating their
-    management environments with Kea) than as a serious management client. Do not expect it
-    to be significantly expanded in the future. It is, and will remain, a simple tool.</para>
-    </section>
-</chapter>
diff --git a/doc/guide/stats.xml b/doc/guide/stats.xml
deleted file mode 100644 (file)
index c500423..0000000
+++ /dev/null
@@ -1,268 +0,0 @@
-<!--
- - Copyright (C) 2015-2019 Internet Systems Consortium, Inc. ("ISC")
- -
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, you can obtain one at http://mozilla.org/MPL/2.0/.
--->
-<!-- Converted by db4-upgrade version 1.1 -->
-<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="stats">
-  <title>Statistics</title>
-
-  <section>
-    <title>Statistics Overview</title>
-
-    <para>Both Kea DHCP servers support statistics gathering.
-    A working DHCP server encounters various events
-    that can cause certain statistics to be collected. For
-    example, a DHCPv4 server may receive a packet (pkt4-received
-    statistic increases by one) that after parsing is identified as a
-    DHCPDISCOVER (pkt4-discover-received). The server processes it and
-    decides to send a DHCPOFFER representing its answer (pkt4-offer-sent
-    and pkt4-sent statistics increase by one). Such events happen
-    frequently, so it is not uncommon for the statistics to have
-    values in the high thousands. They can serve as an easy and powerful
-    tool for observing a server's and a network's health. For example,
-    if the pkt4-received statistic stops growing, it means that the
-    clients' packets are not reaching the server.</para>
-
-    <para>There are four types of statistics:
-    <itemizedlist>
-      <listitem>
-        <simpara><emphasis>integer</emphasis> - this is the most common type. It
-        is implemented as a 64-bit integer (int64_t in C++), so it can hold any
-        value between -2^63 to 2^63 -1.</simpara>
-      </listitem>
-      <listitem>
-        <simpara><emphasis>floating point</emphasis> - this type is intended to
-        store floating-point precision. It is implemented as a C++ double type.
-        </simpara>
-      </listitem>
-      <listitem>
-        <simpara><emphasis>duration</emphasis> - this type is intended for
-        recording time periods. It uses the `boost::posix_time::time_duration type,
-        which stores hours, minutes, seconds, and microseconds.</simpara>
-      </listitem>
-      <listitem>
-        <simpara><emphasis>string</emphasis> - this type is intended for
-        recording statistics in textual form. It uses the C++ std::string type.
-        </simpara>
-      </listitem>
-    </itemizedlist>
-    </para>
-
-    <para>
-      During normal operation, the DHCPv4 and DHCPv6 servers gather statistics.
-      For a list of DHCPv4 and DHCPv6 statistics, see <xref linkend="dhcp4-stats"/> and <xref linkend="dhcp6-stats"/>, respectively.
-    </para>
-
-    <para>
-      To extract data from the statistics module, the control channel can be
-      used. See <xref linkend="ctrl-channel"/> for details. It is possible to
-      retrieve a single statistic or all statistics, reset statistics (i.e. set to neutral
-      value, typically zero), or even remove completely a single statistic or all
-      statistics. See section <xref linkend="command-stats"/> for a list of
-      statistics-oriented commands.
-    </para>
-  </section>
-
-  <section xml:id="stats-lifecycle">
-    <title>Statistics Lifecycle</title>
-    <para>
-      It is useful to understand how the Statistics Manager module works. When
-      the server starts operation, the manager is empty and contains no
-      statistics. When <command>statistic-get-all</command> is executed, an
-      empty list is returned. Once the server performs an operation that causes
-      a statistic to change, the related statistic will be created. In general,
-      once a statistic is recorded even once, it is kept in the manager until
-      explicitly removed, by <command>statistic-remove</command> or
-      <command>statistic-remove-all</command> being called, or when the server is shut
-      down. Per-subnet statistics are explicitly removed when reconfiguration
-      takes place.
-    </para>
-    <para>
-      Statistics are considered runtime properties, so they are not retained
-      after server restart.
-    </para>
-    <para>
-      Removing a statistic that is updated frequently makes little sense, as it
-      will be re-added when the server code next records that statistic.
-      The <command>statistic-remove</command> and
-      <command>statistic-remove-all</command> commands are intended to remove
-      statistics that are not expected to be observed in the near future. For
-      example, a misconfigured device in a network may cause clients to report
-      duplicate addresses, so the server will report increasing values of
-      pkt4-decline-received. Once the problem is found and the device is
-      removed, the system administrator may want to remove the
-      pkt4-decline-received statistic, so it won't be reported anymore. If a
-      duplicate address is detected ever again, the server will add this
-      statistic back.
-    </para>
-  </section>
-
-  <section xml:id="command-stats">
-    <title>Commands for Manipulating Statistics</title>
-    <para>
-      There are several commands defined that can be used for accessing (-get),
-      resetting to zero or neutral value (-reset), or even removing a statistic
-      completely (-remove). The difference between reset and remove is somewhat
-      subtle. The reset command sets the value of the statistic to zero or a neutral
-      value, so after this operation, the statistic will have a value of 0 (integer),
-      0.0 (float), 0h0m0s0us (duration), or "" (string). When requested, a statistic
-      with the values mentioned will be returned. <command>Remove</command> removes
-      a statistic completely, so the statistic will not be reported anymore. Please
-      note that the server code may add it back if there is a reason to record
-      it.
-    </para>
-
-    <note><para>
-    The following sections describe commands that can be sent to the server; the
-    examples are not fragments of a configuration file. For more information on
-    sending commands to Kea, see <xref linkend="ctrl-channel"/>.
-    </para></note>
-
-    <section xml:id="command-statistic-get">
-      <title>statistic-get Command</title>
-
-      <para>
-        The <emphasis>statistic-get</emphasis> command retrieves a single
-        statistic. It takes a single-string parameter called
-        <command>name</command>, which specifies the statistic name. An example
-        command may look like this:
-<screen>
-{
-    "command": "statistic-get",
-    "arguments": {
-        "name": "<userinput>pkt4-received</userinput>"
-    }
-}
-</screen>
-      </para>
-      <para>
-        The server returns details of the requested statistic, with a result
-        of 0 indicating success and the specified statistic as the value of the
-        "arguments" parameter. If the requested statistic is not found, the response
-        will contain an empty map, i.e. only { } as an argument, but the status
-        code will still indicate success (0).
-      </para>
-    </section> <!-- end of command-statistic-get -->
-
-    <section xml:id="command-statistic-reset">
-      <title>statistic-reset Command</title>
-
-      <para>
-        The <emphasis>statistic-reset</emphasis> command sets the specified statistic
-        to its neutral value: 0 for integer, 0.0 for float, 0h0m0s0us for time
-        duration, and "" for string type. It takes a single-string parameter
-        called <command>name</command>, which specifies the statistic name. An
-        example command may look like this:
-<screen>
-{
-    "command": "statistic-reset",
-    "arguments": {
-        "name": "<userinput>pkt4-received</userinput>"
-    }
-}
-</screen>
-      </para>
-      <para>
-        If the specific statistic is found and the reset is successful, the
-        server responds with a status of 0, indicating success, and an empty
-        parameters field. If an error is encountered (e.g. the requested statistic
-        was not found), the server returns a status code of 1 (error)
-        and the text field contains the error description.
-      </para>
-    </section> <!-- end of command-statistic-reset -->
-
-    <section xml:id="command-statistic-remove">
-      <title>statistic-remove Command</title>
-
-      <para>
-        The <emphasis>statistic-remove</emphasis> command attempts to delete a single
-        statistic. It takes a single-string parameter called
-        <command>name</command>, which specifies the statistic name. An example
-        command may look like this:
-<screen>
-{
-    "command": "statistic-remove",
-    "arguments": {
-        "name": "<userinput>pkt4-received</userinput>"
-    }
-}
-</screen>
-      </para>
-      <para>
-        If the specific statistic is found and its removal is successful, the
-        server responds with a status of 0, indicating success, and an empty
-        parameters field. If an error is encountered (e.g. the requested statistic
-        was not found), the server returns a status code of 1 (error)
-        and the text field contains the error description.
-      </para>
-    </section> <!-- end of command-statistic-reset -->
-
-    <section xml:id="command-statistic-get-all">
-      <title>statistic-get-all Command</title>
-
-      <para>
-        The <emphasis>statistic-get-all</emphasis> command retrieves all statistics
-        recorded. An example command may look like this:
-<screen>
-{
-    "command": "statistic-get-all",
-    "arguments": { }
-}
-</screen>
-      </para>
-      <para>
-        The server responds with details of all recorded statistics, with a result
-        set to 0 to indicate that it iterated over all statistics (even when
-        the total number of statistics is zero).
-      </para>
-    </section> <!-- end of command-statistic-get-all -->
-
-    <section xml:id="command-statistic-reset-all">
-      <title>statistic-reset-all Command</title>
-
-      <para>
-        The <emphasis>statistic-reset</emphasis> command sets all statistics to
-        their neutral values: 0 for integer, 0.0 for float, 0h0m0s0us for time
-        duration, and "" for string type. An example command may look like this:
-<screen>
-{
-    "command": "statistic-reset-all",
-    "arguments": { }
-}
-</screen>
-      </para>
-      <para>
-        If the operation is successful, the server responds with a status of
-        0, indicating success, and an empty parameters field. If an error is
-        encountered, the server returns a status code of 1 (error) and the text
-        field contains the error description.
-      </para>
-    </section> <!-- end of command-statistic-reset-all -->
-
-    <section xml:id="command-statistic-remove-all">
-      <title>statistic-remove-all Command</title>
-
-      <para>
-        The <emphasis>statistic-remove-all</emphasis> command attempts to delete all
-        statistics. An example command may look like this:
-<screen>
-{
-    "command": "statistic-remove-all",
-    "arguments": { }
-}
-</screen>
-      </para>
-      <para>
-        If the removal of all statistics is successful, the server responds
-        with a status of 0, indicating success, and an empty parameters field. If
-        an error is encountered, the server returns a status code of 1 (error)
-        and the text field will contain the error description.
-      </para>
-    </section> <!-- end of command-statistic-remove-all -->
-
-  </section>
-
-</chapter>
diff --git a/doc/images/.gitignore b/doc/images/.gitignore
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/doc/sphinx/Makefile.am b/doc/sphinx/Makefile.am
new file mode 100644 (file)
index 0000000..cf7fb56
--- /dev/null
@@ -0,0 +1,280 @@
+EXTRA_DIST=
+
+if GENERATE_DOCS
+
+sphinxbuilddir=$(builddir)/_build
+
+sphinxopts=
+sphinxopts+=-v
+sphinxopts+=-E
+sphinxopts+=-a
+sphinxopts+=-j auto
+sphinxopts+=-c "${abs_srcdir}"
+sphinxopts+=-D release="@PACKAGE_VERSION@"
+sphinxopts+=-D version="@PACKAGE_VERSION@"
+
+
+# TODO
+#HTMLDOCS = kea-guide.html kea-messages.html
+#DOCS = kea-guide.txt
+
+#dist_doc_DATA = $(DOCS)
+#dist_html_DATA = $(HTMLDOCS) kea-guide.css kea-logo-100x70.png
+#dist_html_DATA = $(HTMLDOCS) _static/kea-logo-100x70.png
+
+#doc_DATA = _build/singlehtml/kea-guide.html _build/singlehtml/_static/kea-logo-100x70.png
+
+static_sources=
+static_sources+=static/kea-imageonly-100bw.png
+static_sources+=static/kea-logo-200.png
+static_sources+=static/kea.css
+
+# ARM
+rst_arm_sources=
+rst_arm_sources+=arm/admin.rst
+rst_arm_sources+=arm/agent.rst
+rst_arm_sources+=arm/api.rst
+rst_arm_sources+=arm/classify.rst
+rst_arm_sources+=arm/config-backend.rst
+rst_arm_sources+=arm/config.rst
+rst_arm_sources+=arm/congestion-handling.rst
+rst_arm_sources+=arm/ctrl-channel.rst
+rst_arm_sources+=arm/ddns.rst
+rst_arm_sources+=arm/dhcp4-srv.rst
+rst_arm_sources+=arm/dhcp6-srv.rst
+rst_arm_sources+=arm/hammer.rst
+rst_arm_sources+=arm/hooks-cb-cmds.rst
+rst_arm_sources+=arm/hooks-class-cmds.rst
+rst_arm_sources+=arm/hooks-ha.rst
+rst_arm_sources+=arm/hooks-host-cache.rst
+rst_arm_sources+=arm/hooks-lease-cmds.rst
+rst_arm_sources+=arm/hooks-radius.rst
+rst_arm_sources+=arm/hooks.rst
+rst_arm_sources+=arm/hooks-stat-cmds.rst
+rst_arm_sources+=arm/install.rst
+rst_arm_sources+=arm/index.rst
+rst_arm_sources+=arm/intro.rst
+rst_arm_sources+=arm/keactrl.rst
+rst_arm_sources+=arm/lease-expiration.rst
+rst_arm_sources+=arm/lfc.rst
+rst_arm_sources+=arm/logging.rst
+rst_arm_sources+=arm/netconf.rst
+rst_arm_sources+=arm/quickstart.rst
+rst_arm_sources+=arm/shell.rst
+rst_arm_sources+=arm/stats.rst
+
+main_sources=$(rst_arm_sources) kea-messages.rst conf.py $(static_sources)
+
+# mans  # TODO perfdhcp and netconf should be conditional
+rst_man_sources=
+rst_man_sources+=man/kea-admin.8.rst
+rst_man_sources+=man/kea-ctrl-agent.8.rst
+rst_man_sources+=man/kea-dhcp4.8.rst
+rst_man_sources+=man/kea-dhcp6.8.rst
+rst_man_sources+=man/kea-dhcp-ddns.8.rst
+rst_man_sources+=man/kea-lfc.8.rst
+rst_man_sources+=man/kea-netconf.8.rst
+rst_man_sources+=man/kea-shell.8.rst
+rst_man_sources+=man/keactrl.8.rst
+rst_man_sources+=man/perfdhcp.8.rst
+man_sources=$(rst_man_sources) conf.py
+man8s=$(foreach rst,$(rst_man_sources), $(sphinxbuilddir)/$(basename $(rst)))
+
+EXTRA_DIST += $(main_sources) $(man_sources) system_messages.py
+
+#DISTCLEANFILES = $(HTMLDOCS) $(DOCS) kea-messages.xml
+
+#CLEANFILES = kea-guide.pdf kea-messages.pdf
+
+mes_files=
+mes_files+=$(top_srcdir)/src/hooks/dhcp/mysql_cb/mysql_cb_messages.mes
+mes_files+=$(top_srcdir)/src/hooks/dhcp/lease_cmds/lease_cmds_messages.mes
+mes_files+=$(top_srcdir)/src/hooks/dhcp/high_availability/ha_messages.mes
+mes_files+=$(top_srcdir)/src/hooks/dhcp/stat_cmds/stat_cmds_messages.mes
+mes_files+=$(top_srcdir)/src/hooks/dhcp/user_chk/user_chk_messages.mes
+mes_files+=$(top_srcdir)/src/lib/config/config_messages.mes
+mes_files+=$(top_srcdir)/src/lib/hooks/hooks_messages.mes
+mes_files+=$(top_srcdir)/src/lib/dhcpsrv/dhcpsrv_messages.mes
+mes_files+=$(top_srcdir)/src/lib/dhcpsrv/alloc_engine_messages.mes
+mes_files+=$(top_srcdir)/src/lib/dhcpsrv/hosts_messages.mes
+mes_files+=$(top_srcdir)/src/lib/http/http_messages.mes
+mes_files+=$(top_srcdir)/src/lib/dhcp_ddns/dhcp_ddns_messages.mes
+mes_files+=$(top_srcdir)/src/lib/database/db_messages.mes
+mes_files+=$(top_srcdir)/src/lib/log/log_messages.mes
+mes_files+=$(top_srcdir)/src/lib/log/logimpl_messages.mes
+mes_files+=$(top_srcdir)/src/lib/log/tests/log_test_messages.mes
+mes_files+=$(top_srcdir)/src/lib/process/process_messages.mes
+mes_files+=$(top_srcdir)/src/lib/asiodns/asiodns_messages.mes
+mes_files+=$(top_srcdir)/src/lib/eval/eval_messages.mes
+mes_files+=$(top_srcdir)/src/bin/dhcp4/dhcp4_messages.mes
+mes_files+=$(top_srcdir)/src/bin/agent/ca_messages.mes
+mes_files+=$(top_srcdir)/src/bin/d2/d2_messages.mes
+mes_files+=$(top_srcdir)/src/bin/dhcp6/dhcp6_messages.mes
+mes_files+=$(top_srcdir)/src/bin/lfc/lfc_messages.mes
+mes_files+=$(top_srcdir)/src/bin/netconf/netconf_messages.mes
+
+
+all: pdf html mans
+
+kea-messages.rst: $(mes_files) system_messages.py
+       ./system_messages.py -o $@ $(mes_files)
+
+
+pdf: $(main_sources)
+       $(SPHINXBUILD) -M latexpdf $(srcdir) $(sphinxbuilddir) $(sphinxopts)
+
+html: $(main_sources)
+       $(SPHINXBUILD) -M html $(srcdir) $(sphinxbuilddir) $(sphinxopts)
+
+$(man8s): mans
+
+mans: $(man_sources)
+       $(SPHINXBUILD) -M man $(srcdir) $(sphinxbuilddir) $(sphinxopts)
+
+install-data-local:
+       mkdir -p $(DESTDIR)$(docdir)
+       cp -r $(sphinxbuilddir)/html $(DESTDIR)$(docdir)
+       ${INSTALL_DATA} $(sphinxbuilddir)/latex/kea-arm.pdf $(DESTDIR)$(docdir)
+       ${INSTALL_DATA} $(sphinxbuilddir)/latex/kea-messages.pdf $(DESTDIR)$(docdir)
+       ${MKDIR_P} ${DESTDIR}${mandir}/man8
+       ${INSTALL_DATA} $(man8s) ${DESTDIR}${mandir}/man8/
+
+uninstall-local:
+       rm -rf $(DESTDIR)$(docdir)
+
+clean::
+       -rm -rf $(sphinxbuilddir)
+
+
+.PHONY: all pdf html mans
+
+
+endif
+
+# There are several steps needed to document new API command:
+#
+# 1. edit docgen/cmds-list and add the new command
+# 2. ./configure --enable-generate-docs
+# 3. make - you need to build the sources first, am afraid. The reason why you
+#    need to do this is that the tool kea-docgen depends on libkea-cc as it
+#    loads JSON files. This means that the libs need to be built first.
+# 4. (optional) run: make templates
+#    This will go through the list of commands listed in cmds-list
+#    and will check if there are corresponding JSON files in api/name.json
+#    If the file is missing, a new JSON will be created using template.
+#    If you dislike this generator, you can always use api/_template.json
+#    and copy it over under the name of a new command.
+# 5. Edit api/command-name.json. If the command is provided by the daemon
+#    out of its own (and not via hook), simply delete the hook entry.
+#    If you don't want to provide command syntax (cmd-syntax key),
+#    any comments about the syntax (cmd-comment key) or response syntax
+#    (resp-syntax) or any comment about response (resp-comment), simply
+#    remove those unused keys. The generator will attempt to generate
+#    boilerplates for it.
+# 6. Generate api.xml: make api
+# 7. Rebuild User's Guide as usual: make guide
+
+# This target will generate templates. There's no need to run it, unless
+# new commands have been added or there are existing commands that are
+# still not documented.
+templates: docgen
+       docgen/generate-templates docgen/cmds-list
+
+# This will generate the api.xml file using docgen generator. It will
+# read the JSON files from api/ directory. Make sure they're up to date.
+api: docgen
+       docgen/kea-docgen api/*.json
+
+# This convenience target makes sure the docgen tool is built properly
+docgen:
+       $(MAKE) -C docgen
+
+
+# These are files that document our APIs. They're not really needed as the
+# content is included in the api.xml, but may be useful for people who
+# want to document the API.
+EXTRA_DIST += api/build-report.json
+EXTRA_DIST += api/cache-clear.json api/cache-get.json
+EXTRA_DIST += api/cache-get-by-id.json api/cache-insert.json
+EXTRA_DIST += api/cache-load.json api/cache-remove.json
+EXTRA_DIST += api/cache-size.json  api/cache-write.json
+EXTRA_DIST += api/class-add.json api/class-del.json
+EXTRA_DIST += api/class-get.json api/class-list.json
+EXTRA_DIST += api/class-update.json
+EXTRA_DIST += api/config-get.json api/config-reload.json
+EXTRA_DIST += api/config-set.json api/config-test.json
+EXTRA_DIST += api/config-write.json api/dhcp-disable.json
+EXTRA_DIST += api/dhcp-enable.json api/ha-continue.json
+EXTRA_DIST += api/ha-heartbeat.json api/ha-scopes.json
+EXTRA_DIST += api/ha-sync.json api/lease4-add.json
+EXTRA_DIST += api/lease4-del.json api/lease4-get-all.json
+EXTRA_DIST += api/lease4-get.json api/lease4-update.json
+EXTRA_DIST += api/lease4-wipe.json api/lease6-add.json
+EXTRA_DIST += api/lease6-del.json api/lease6-get-all.json
+EXTRA_DIST += api/lease6-get.json api/lease6-update.json
+EXTRA_DIST += api/lease6-wipe.json api/leases-reclaim.json
+EXTRA_DIST += api/libreload.json api/list-commands.json
+EXTRA_DIST += api/network4-add.json api/network4-del.json
+EXTRA_DIST += api/network4-get.json api/network4-list.json
+EXTRA_DIST += api/network4-subnet-add.json api/network4-subnet-del.json
+EXTRA_DIST += api/network6-add.json api/network6-del.json
+EXTRA_DIST += api/network6-get.json api/network6-list.json
+EXTRA_DIST += api/network6-subnet-add.json api/network6-subnet-del.json
+EXTRA_DIST += api/remote-global-parameter4-del.json
+EXTRA_DIST += api/remote-global-parameter4-get-all.json
+EXTRA_DIST += api/remote-global-parameter4-get.json
+EXTRA_DIST += api/remote-global-parameter4-set.json
+EXTRA_DIST += api/remote-global-parameter6-del.json
+EXTRA_DIST += api/remote-global-parameter6-get-all.json
+EXTRA_DIST += api/remote-global-parameter6-get.json
+EXTRA_DIST += api/remote-global-parameter6-set.json
+EXTRA_DIST += api/remote-network4-del.json
+EXTRA_DIST += api/remote-network4-get.json
+EXTRA_DIST += api/remote-network4-list.json
+EXTRA_DIST += api/remote-network4-set.json
+EXTRA_DIST += api/remote-network6-del.json
+EXTRA_DIST += api/remote-network6-get.json
+EXTRA_DIST += api/remote-network6-list.json
+EXTRA_DIST += api/remote-network6-set.json
+EXTRA_DIST += api/remote-option-def4-del.json
+EXTRA_DIST += api/remote-option-def4-get-all.json
+EXTRA_DIST += api/remote-option-def4-get.json
+EXTRA_DIST += api/remote-option-def4-set.json
+EXTRA_DIST += api/remote-option-def6-del.json
+EXTRA_DIST += api/remote-option-def6-get-all.json
+EXTRA_DIST += api/remote-option-def6-get.json
+EXTRA_DIST += api/remote-option-def6-set.json
+EXTRA_DIST += api/remote-option4-global-del.json
+EXTRA_DIST += api/remote-option4-global-get-all.json
+EXTRA_DIST += api/remote-option4-global-get.json
+EXTRA_DIST += api/remote-option4-global-set.json
+EXTRA_DIST += api/remote-option6-global-del.json
+EXTRA_DIST += api/remote-option6-global-get-all.json
+EXTRA_DIST += api/remote-option6-global-get.json
+EXTRA_DIST += api/remote-option6-global-set.json
+EXTRA_DIST += api/remote-subnet4-del-by-id.json
+EXTRA_DIST += api/remote-subnet4-del-by-prefix.json
+EXTRA_DIST += api/remote-subnet4-get-by-id.json
+EXTRA_DIST += api/remote-subnet4-get-by-prefix.json
+EXTRA_DIST += api/remote-subnet4-list.json
+EXTRA_DIST += api/remote-subnet4-set.json
+EXTRA_DIST += api/remote-subnet6-del-by-id.json
+EXTRA_DIST += api/remote-subnet6-del-by-prefix.json
+EXTRA_DIST += api/remote-subnet6-get-by-id.json
+EXTRA_DIST += api/remote-subnet6-get-by-prefix.json
+EXTRA_DIST += api/remote-subnet6-list.json
+EXTRA_DIST += api/remote-subnet6-set.json
+EXTRA_DIST += api/reservation-add.json api/reservation-del.json
+EXTRA_DIST += api/reservation-get.json api/reservation-get-all.json
+EXTRA_DIST += api/reservation-get-page.json api/shutdown.json
+EXTRA_DIST += api/statistic-get-all.json api/statistic-get.json
+EXTRA_DIST += api/statistic-remove-all.json api/statistic-remove.json
+EXTRA_DIST += api/statistic-reset-all.json api/statistic-reset.json
+EXTRA_DIST += api/stat-lease4-get.json api/stat-lease6-get.json
+EXTRA_DIST += api/subnet4-add.json api/subnet4-del.json
+EXTRA_DIST += api/subnet4-get.json api/subnet4-list.json
+EXTRA_DIST += api/subnet4-update.json
+EXTRA_DIST += api/subnet6-add.json api/subnet6-del.json
+EXTRA_DIST += api/subnet6-get.json api/subnet6-list.json
+EXTRA_DIST += api/subnet6-update.json
+EXTRA_DIST += api/_template.json api/version-get.json
similarity index 100%
rename from doc/guide/admin.rst
rename to doc/sphinx/arm/admin.rst
similarity index 100%
rename from doc/guide/agent.rst
rename to doc/sphinx/arm/agent.rst
similarity index 100%
rename from doc/guide/api.rst
rename to doc/sphinx/arm/api.rst
similarity index 97%
rename from doc/guide/congestion-handling.rst
rename to doc/sphinx/arm/congestion-handling.rst
index 5f7e85b317ac498d9ba4bc09056c3eac83e860bc..b1835d1531d37b022aa1d6d4455cb1504ba1a892 100644 (file)
@@ -1,8 +1,8 @@
 .. _congestion-handling:
 
-****************************************
-Congestion Handling in DHCPv4 and DHCPv6
-****************************************
+*******************
+Congestion Handling
+*******************
 
 .. _congestion-handling-background:
 
similarity index 100%
rename from doc/guide/ddns.rst
rename to doc/sphinx/arm/ddns.rst
similarity index 100%
rename from doc/guide/hooks.rst
rename to doc/sphinx/arm/hooks.rst
similarity index 98%
rename from doc/guide/index.rst
rename to doc/sphinx/arm/index.rst
index 8ddb006d9f024bbe41f28ca3d3e9da718ddf99f9..b974123f6ff33ddb3ead4d9292c8a70aeb18b4ba 100644 (file)
@@ -1,4 +1,4 @@
-.. figure:: _static/kea-logo-200.png
+.. figure:: ../static/kea-logo-200.png
    :align: right
 
 ##################################
similarity index 100%
rename from doc/guide/intro.rst
rename to doc/sphinx/arm/intro.rst
similarity index 99%
rename from doc/guide/lease-expiration.rst
rename to doc/sphinx/arm/lease-expiration.rst
index ae3e32c5dbb54637bb304565343cc94d79f0a4cb..0ae7bdafffb3b878e473008ae2b1f41b97295c98 100644 (file)
@@ -1,8 +1,8 @@
 .. _lease-expiration:
 
-*************************************
-Lease Expiration in DHCPv4 and DHCPv6
-*************************************
+****************
+Lease Expiration
+****************
 
 The primary role of the DHCP server is to assign addresses and/or
 delegate prefixes to DHCP clients. These addresses and prefixes are
similarity index 100%
rename from doc/guide/lfc.rst
rename to doc/sphinx/arm/lfc.rst
similarity index 100%
rename from doc/guide/shell.rst
rename to doc/sphinx/arm/shell.rst
similarity index 100%
rename from doc/guide/stats.rst
rename to doc/sphinx/arm/stats.rst
similarity index 77%
rename from doc/guide/conf.py
rename to doc/sphinx/conf.py
index cf7559a6e901ab87ab8f69cd69c3241c1914fcdd..35b739f867587eef1817a483b9db22d3ba1bd62a 100644 (file)
@@ -36,9 +36,6 @@ extensions = [
     'sphinx.ext.todo',
 ]
 
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
-
 # The suffix(es) of source filenames.
 # You can specify multiple suffix as a list of string:
 #
@@ -46,7 +43,7 @@ templates_path = ['_templates']
 source_suffix = '.rst'
 
 # The master toctree document.
-master_doc = 'index'
+master_doc = 'arm/index'
 
 # Additional docs
 messages_doc = 'kea-messages'
@@ -75,7 +72,7 @@ pygments_style = None
 #html_theme = 'alabaster'
 html_theme = 'sphinx_rtd_theme'
 #html_logo = '_static/kea-logo-100x70.png'
-html_logo = '_static/kea-imageonly-100bw.png'
+html_logo = 'static/kea-imageonly-100bw.png'
 
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the
@@ -88,7 +85,7 @@ html_logo = '_static/kea-imageonly-100bw.png'
 # Add any paths that contain custom static files (such as style sheets) here,
 # relative to this directory. They are copied after the builtin static files,
 # so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
+html_static_path = ['static']
 
 # Custom sidebar templates, must be a dictionary that maps document names
 # to template names.
@@ -104,7 +101,7 @@ html_static_path = ['_static']
 # -- Options for HTMLHelp output ---------------------------------------------
 
 # Output file base name for HTML help builder.
-htmlhelp_basename = 'KeaAdministratorReferenceManualdoc'
+#htmlhelp_basename = 'KeaAdministratorReferenceManualdoc'
 
 
 # -- Options for LaTeX output ------------------------------------------------
@@ -131,8 +128,8 @@ latex_elements = {
 # (source start file, target name, title,
 #  author, documentclass [howto, manual, or own class]).
 latex_documents = [
-    (master_doc, 'KeaAdministratorReferenceManual.tex', 'Kea Administrator Reference Manual Documentation', author, 'manual'),
-    (messages_doc, 'KeaMessages.tex', 'Kea Messages Manual', author, 'manual'),
+    (master_doc, 'kea-arm.tex', 'Kea Administrator Reference Manual Documentation', author, 'manual'),
+    (messages_doc, 'kea-messages.tex', 'Kea Messages Manual', author, 'manual'),
 ]
 
 
@@ -141,8 +138,17 @@ latex_documents = [
 # One entry per manual page. List of tuples
 # (source start file, name, description, authors, manual section).
 man_pages = [
-    (master_doc, 'keaadministratorreferencemanual', 'Kea Administrator Reference Manual Documentation',
-     [author], 1)
+    (master_doc, 'kea-arm', 'Kea Administrator Reference Manual Documentation', [author], 1),
+    ('man/kea-admin.8', 'kea-admin', 'Shell script for managing Kea databases', author, 8),
+    ('man/keactrl.8', 'keactrl', 'Shell script for managing Kea', author, 8),
+    ('man/kea-ctrl-agent.8', 'kea-ctrl-agent', 'Control Agent process in Kea', author, 8),
+    ('man/kea-dhcp4.8', 'kea-dhcp4', 'DHCPv4 server in Kea', author, 8),
+    ('man/kea-dhcp6.8', 'kea-dhcp6', 'DHCPv6 server in Kea', author, 8),
+    ('man/kea-dhcp-ddns.8', 'kea-dhcp-ddns', 'DHCP-DDNS process in Kea', author, 8),
+    ('man/kea-lfc.8', 'kea-lfc', 'Lease File Cleanup process in Kea', author, 8),
+    ('man/kea-netconf.8', 'kea-netconf', 'NETCONF agent for Kea environment', author, 8),
+    ('man/kea-shell.8', 'kea-shell', 'Text client for Control Agent process', author, 8),
+    ('man/perfdhcp.8', 'perfdhcp', 'DHCP benchmarking tool', author, 8),
 ]
 
 
diff --git a/doc/sphinx/man/kea-admin.8.rst b/doc/sphinx/man/kea-admin.8.rst
new file mode 100644 (file)
index 0000000..31e4fb6
--- /dev/null
@@ -0,0 +1,99 @@
+:orphan:
+
+kea-admin
+8
+Kea
+kea-admin
+Shell script for managing Kea databases
+2014-2018
+Internet Systems Consortium, Inc. ("ISC")
+kea-admin
+command
+backend
+-u
+database username
+-p
+database password
+-n
+database name
+-d
+scripts directory
+-4 \| -6
+-o
+output file
+-v
+DESCRIPTION
+===========
+
+kea-admin is a shell script which offers database maintenance. In
+particular, it features database initialization, database version
+checking and database schema upgrade.
+
+OPTIONS
+=======
+
+``command``
+   Command to be issued to the servers. It can be one of the following:
+
+   lease-init
+      Initializes a new lease database. Useful during first Kea
+      installation. The database is initialized to the latest version
+      supported by the version of the software.
+
+   lease-version
+      Reports lease database version. This is not necessarily equal to
+      Kea version as each backend has its own versioning scheme.
+
+   lease-upgrade
+      Conducts lease database upgrade. This is useful when migrating
+      between old and new Kea versions.
+
+   lease-dump
+      Dumps the contents of the lease database (MySQL and PostgreSQL
+      backends) to text file. The content of the file consists of
+      comma-separated-values (CSV) where each line in the file contains
+      all of the values for a single lease. The first line of file is a
+      header line containing the column names.
+
+``backend``
+   Specifies backend type. Currently allowed backends are: memfile,
+   mysql and pgsql.
+
+``-u|--user username``
+   Specify the username when connecting to a database. If not specified,
+   the default value of keatest is used.
+
+``-p|--password password``
+   Specifies the password when connecting to a database. If not
+   specified, the default value of keatest is used.
+
+``-n|--name database-name``
+   Specifies the database name to connect to. If not specified, the
+   default value of keatest is used.
+
+``-d|--directory script-directory``
+   Used for override scripts directory. That script is used during
+   upgrades, database initialization and possibly other operations. If
+   not specified, the default value of (prefix)/share/kea/scripts/ is
+   used.
+
+``-o|--output output_file``
+   Required for lease-dump, Specifies the file to which the lease data
+   will be dumped.
+
+``-v|--version``
+   Prints kea-admin version and quits.
+
+``-4``
+   Directs kea-admin to lease-dump the DHCPv4 leases. Incompatible with
+   the -6 option.
+
+``-6``
+   Directs kea-admin to lease-dump the DHCPv6 leases. Incompatible with
+   the -4 option.
+
+SEE ALSO
+========
+
+keactrl 8, kea-dhcp4 8, kea-dhcp6 8, kea-dhcp-ddns 8, kea-ctrl-agent 8,
+kea-netconf 8, keactrl 8, perfdhcp 8, Kea Administrator Guide.
diff --git a/doc/sphinx/man/kea-ctrl-agent.8.rst b/doc/sphinx/man/kea-ctrl-agent.8.rst
new file mode 100644 (file)
index 0000000..4974576
--- /dev/null
@@ -0,0 +1,99 @@
+:orphan:
+
+kea-ctrl-agent
+8
+Kea
+kea-ctrl-agent
+Control Agent process in Kea
+2016-2018
+Internet Systems Consortium, Inc. ("ISC")
+kea-ctrl-agent
+-v
+-V
+-W
+-d
+-c
+config-file
+-t
+config-file
+DESCRIPTION
+===========
+
+The ``kea-ctrl-agent`` provides a REST service for controlling Kea
+services. The received HTTP requests are decapsulated and forwarded to
+the respective Kea services in JSON format. Received JSON responses are
+encapsulated within HTTP responses and returned to the controlling
+entity. Some commands may be handled by the Control Agent directly, and
+not forwarded to any Kea service.
+
+ARGUMENTS
+=========
+
+The arguments are as follows:
+
+``-v``
+   Display the version.
+
+``-V``
+   Display the extended version.
+
+``-W``
+   Display the configuration report.
+
+``-d``
+   Verbose mode sets the logging level to debug. This is primarily for
+   development purposes in stand-alone mode.
+
+``-c``
+   Configuration file including the configuration for the Control Agent
+   server. It may also contain configuration entries for other Kea
+   services.
+
+``-t``
+   Check the syntax of the configuration file and report the first error
+   if any. Note that not all parameters are completely checked, in
+   particular, service and client sockets are not opened, and hook
+   libraries are not loaded.
+
+DOCUMENTATION
+=============
+
+Kea comes with an extensive Kea User's Guide documentation that covers
+all aspects of running the Kea software - compilation, installation,
+configuration, configuration examples and many more. Kea also features a
+Kea Messages Manual, which lists all possible messages Kea can print
+with a brief description for each of them. Both documents are typically
+available in various formats (txt, html, pdf) with your Kea
+distribution. The Kea documentation is available at
+https://kb.isc.org/docs/kea-administrator-reference-manual .
+
+Kea source code is documented in the Kea Developer's Guide. Its on-line
+version is available at https://jenkins.isc.org/job/Kea_doc/doxygen/.
+
+Kea project website is available at:
+https://gitlab.isc.org/isc-projects/kea.
+
+MAILING LISTS AND SUPPORT
+=========================
+
+There are two mailing lists available for Kea project. kea-users
+(kea-users at lists.isc.org) is intended for Kea users, while kea-dev
+(kea-dev at lists.isc.org) is intended for Kea developers, prospective
+contributors and other advanced users. Both lists are available at
+http://lists.isc.org. The community provides best effort type of support
+on both of those lists.
+
+ISC provides professional support for Kea services. See
+https://www.isc.org/kea/ for details.
+
+HISTORY
+=======
+
+The ``kea-ctrl-agent`` was first coded in December 2016 by Marcin
+Siodelski.
+
+SEE ALSO
+========
+
+kea-dhcp4 8, kea-dhcp6 8, kea-dhcp-ddns 8, kea-admin 8, keactrl 8,
+perfdhcp 8, kea-lfc 8, Kea Administrator's Guide.
diff --git a/doc/sphinx/man/kea-dhcp-ddns.8.rst b/doc/sphinx/man/kea-dhcp-ddns.8.rst
new file mode 100644 (file)
index 0000000..7daf8d9
--- /dev/null
@@ -0,0 +1,97 @@
+:orphan:
+
+kea-dhcp-ddns
+8
+Kea
+kea-dhcp-ddns
+DHCP-DDNS process in Kea
+2013-2018
+Internet Systems Consortium, Inc. ("ISC")
+kea-dhcp-ddns
+-v
+-V
+-W
+-d
+-c
+config-file
+-t
+config-file
+DESCRIPTION
+===========
+
+The ``kea-dhcp-ddns`` service process requests to update DNS mapping
+based on DHCP lease change events. It runs as a separate process that
+expects to receive Name Change Requests from Kea DHCP servers.
+
+ARGUMENTS
+=========
+
+The arguments are as follows:
+
+``-v``
+   Display the version.
+
+``-V``
+   Display the extended version.
+
+``-W``
+   Display the configuration report.
+
+``-d``
+   Verbose mode sets the logging level to debug. This is primarily for
+   development purposes in stand-alone mode.
+
+``-c``
+   Configuration file including the configuration for DHCP-DDNS server.
+   It may also contain configuration entries for other Kea services.
+
+``-t``
+   Check the syntax of the configuration file and report the first error
+   if any. Note that not all parameters are completely checked, in
+   particular, service socket is not opened.
+
+DOCUMENTATION
+=============
+
+Kea comes with an extensive Kea User's Guide documentation that covers
+all aspects of running the Kea software - compilation, installation,
+configuration, configuration examples and many more. Kea also features a
+Kea Messages Manual, which lists all possible messages Kea can print
+with a brief description for each of them. Both documents are typically
+available in various formats (txt, html, pdf) with your Kea
+distribution. The Kea documentation is available at
+https://kb.isc.org/docs/kea-administrator-reference-manual .
+
+Kea source code is documented in the Kea Developer's Guide. Its on-line
+version is available at https://jenkins.isc.org/job/Kea_doc/doxygen/.
+
+Kea project website is available at: https://kea.isc.org.
+
+MAILING LISTS AND SUPPORT
+=========================
+
+There are two mailing lists available for Kea project. kea-users
+(kea-users at lists.isc.org) is intended for Kea users, while kea-dev
+(kea-dev at lists.isc.org) is intended for Kea developers, prospective
+contributors and other advanced users. Both lists are available at
+http://lists.isc.org. The community provides best effort type of support
+on both of those lists.
+
+ISC provides professional support for Kea services. See
+https://www.isc.org/kea/ for details.
+
+HISTORY
+=======
+
+The ``b10-dhcp-ddns`` process was first coded in May 2013 by Thomas
+Markwalder.
+
+Kea became a standalone server and the BIND10 framework was removed. The
+DHCP-DDNS server binary was renamed to kea-dhcp-ddns in July 2014. Kea
+1.0.0 was released in December 2015.
+
+SEE ALSO
+========
+
+kea-dhcp4 8, kea-dhcp6 8, kea-ctrl-agent 8, kea-admin 8, keactrl 8,
+kea-netconf 8, perfdhcp 8, kea-lfc 8, Kea Administrator's Guide.
diff --git a/doc/sphinx/man/kea-dhcp4.8.rst b/doc/sphinx/man/kea-dhcp4.8.rst
new file mode 100644 (file)
index 0000000..4e6ceeb
--- /dev/null
@@ -0,0 +1,107 @@
+:orphan:
+
+kea-dhcp4
+8
+Kea
+kea-dhcp4
+DHCPv4 server in Kea
+2011-2018
+Internet Systems Consortium, Inc. ("ISC")
+kea-dhcp4
+-v
+-V
+-W
+-d
+-c
+config-file
+-t
+config-file
+-p
+server-port-number
+-P
+client-port-number
+DESCRIPTION
+===========
+
+The ``kea-dhcp4`` daemon provides the DHCPv4 server implementation.
+
+ARGUMENTS
+=========
+
+The arguments are as follows:
+
+``-v``
+   Display the version.
+
+``-V``
+   Display the extended version.
+
+``-W``
+   Display the configuration report.
+
+``-d``
+   Enable the debug mode with extra verbosity.
+
+``-c``
+   Configuration file including the configuration for DHCPv4 server. It
+   may also contain configuration entries for other Kea services.
+
+``-t``
+   Check the configuration file and report the first error if any. Note
+   that not all parameters are completely checked, in particular,
+   service and control channel sockets are not opened, and hook
+   libraries are not loaded.
+
+``-p``
+   Server port number (1-65535) on which the server listens. This is
+   useful for testing purposes only.
+
+``-P``
+   Client port number (1-65535) to which the server responds. This is
+   useful for testing purposes only.
+
+DOCUMENTATION
+=============
+
+Kea comes with an extensive Kea User's Guide documentation that covers
+all aspects of running the Kea software - compilation, installation,
+configuration, configuration examples and many more. Kea also features a
+Kea Messages Manual, which lists all possible messages Kea can print
+with a brief description for each of them. Both documents are typically
+available in various formats (txt, html, pdf) with your Kea
+distribution. The Kea documentation is available at
+https://kb.isc.org/docs/kea-administrator-reference-manual .
+
+Kea source code is documented in the Kea Developer's Guide. Its on-line
+version is available at https://jenkins.isc.org/job/Kea_doc/doxygen/.
+
+Kea project website is available at: https://kea.isc.org.
+
+MAILING LISTS AND SUPPORT
+=========================
+
+There are two mailing lists available for Kea project. kea-users
+(kea-users at lists.isc.org) is intended for Kea users, while kea-dev
+(kea-dev at lists.isc.org) is intended for Kea developers, prospective
+contributors and other advanced users. Both lists are available at
+http://lists.isc.org. The community provides best effort type of support
+on both of those lists.
+
+ISC provides professional support for Kea services. See
+https://www.isc.org/kea/ for details.
+
+HISTORY
+=======
+
+The ``b10-dhcp4`` daemon was first coded in November 2011 by Tomek
+Mrugalski.
+
+In the mid 2014 Kea was decoupled from the BIND10 framework and became a
+standalone DHCP server. The DHCPv4 server binary was renamed to
+kea-dhcp4. Kea 1.0.0 was released in December 2015.
+
+SEE ALSO
+========
+
+kea-dhcp6 8, kea-dhcp-ddns 8, kea-ctrl-agent 8, kea-admin 8, keactrl 8,
+kea-netconf 8, perfdhcp 8, kea-lfc 8, Kea Administrator's Guide.
diff --git a/doc/sphinx/man/kea-dhcp6.8.rst b/doc/sphinx/man/kea-dhcp6.8.rst
new file mode 100644 (file)
index 0000000..88e2022
--- /dev/null
@@ -0,0 +1,100 @@
+:orphan:
+
+kea-dhcp6
+8
+Kea
+kea-dhcp6
+DHCPv6 server in Kea
+2011-2018
+Internet Systems Consortium, Inc. ("ISC")
+kea-dhcp6
+-v
+-V
+-W
+-d
+-c
+config-file
+-t
+config-file
+-p
+server-port-number
+DESCRIPTION
+===========
+
+The ``kea-dhcp6`` daemon provides the DHCPv6 server implementation.
+
+ARGUMENTS
+=========
+
+The arguments are as follows:
+
+``-v``
+   Display the version.
+
+``-V``
+   Display the extended version.
+
+``-W``
+   Display the configuration report.
+
+``-d``
+   Enable the debug mode with extra verbosity.
+
+``-c``
+   Configuration file including the configuration for DHCPv6 server. It
+   may also contain configuration entries for other Kea services.
+
+``-t``
+   Check the configuration file and report the first error if any. Note
+   that not all parameters are completely checked, in particular,
+   service and control channel sockets are not opened, and hook
+   libraries are not loaded.
+
+``-p``
+   Server port number (1-65535) on which the server listens. This is
+   useful for testing purposes only.
+
+DOCUMENTATION
+=============
+
+Kea comes with an extensive Kea User's Guide documentation that covers
+all aspects of running the Kea software - compilation, installation,
+configuration, configuration examples and many more. Kea also features a
+Kea Messages Manual, which lists all possible messages Kea can print
+with a brief description for each of them. Both documents are typically
+available in various formats (txt, html, pdf) with your Kea
+distribution. Kea user documentation is availalable on-line at
+https://kb.isc.org/docs/kea-administrator-reference-manual .
+
+Kea source code is documented in the Kea Developer's Guide. Its on-line
+version is available at https://jenkins.isc.org/job/Kea_doc/doxygen/.
+
+Kea project website is available at: https://kea.isc.org.
+
+MAILING LISTS AND SUPPORT
+=========================
+
+There are two mailing lists available for Kea project. kea-users
+(kea-users at lists.isc.org) is intended for Kea users, while kea-dev
+(kea-dev at lists.isc.org) is intended for Kea developers, prospective
+contributors and other advanced users. Both lists are available at
+http://lists.isc.org. The community provides best effort type of support
+on both of those lists.
+
+ISC provides professional support for Kea services. See
+https://www.isc.org/kea/ for details.
+
+HISTORY
+=======
+
+The ``b10-dhcp6`` daemon was first coded in June 2011 by Tomek
+Mrugalski.
+
+Kea became a standalone server and the BIND10 framework was removed. The
+DHCPv6 server binary was renamed to kea-dhcp6 in July 2014.
+
+SEE ALSO
+========
+
+kea-dhcp4 8, kea-dhcp-ddns 8, kea-ctrl-agent 8, kea-admin 8, keactrl 8,
+kea-netconf 8, perfdhcp 8, kea-lfc 8, Kea Administrator's Guide.
diff --git a/doc/sphinx/man/kea-lfc.8.rst b/doc/sphinx/man/kea-lfc.8.rst
new file mode 100644 (file)
index 0000000..2c09f4b
--- /dev/null
@@ -0,0 +1,140 @@
+:orphan:
+
+kea-lfc
+8
+Kea
+kea-lfc
+Lease File Cleanup process in Kea
+2015-2018
+Internet Systems Consortium, Inc. ("ISC")
+kea-lfc
+-4|-6
+-c
+config-file
+-p
+pid-file
+-x
+previous-file
+-i
+copy-file
+-o
+output-file
+-f
+finish-file
+-v
+-V
+-W
+-d
+-h
+DESCRIPTION
+===========
+
+The ``kea-lfc`` service process removes redundant information from the
+files used to provide persistent storage for the memfile data base
+backend. The service is written to run as a stand alone process. While
+it can be started externally, there is usually no need to do this. It
+will be run on a periodic basis by the Kea DHCP servers.
+
+ARGUMENTS
+=========
+
+The arguments are as follows:
+
+``-d``
+   Verbose mode sets the logging level to debug. This is primarily for
+   development purposes in stand-alone mode.
+
+``-v``
+   version causes the version stamp to be printed.
+
+``-V``
+   Version causes a longer form of the version stamp to be printed.
+
+``-W``
+   Display the configuration report.
+
+``-h``
+   Help causes the usage string to be printed.
+
+``-4 | -6``
+   The protocol version of the lease files, must be one of 4 or 6.
+
+``-c``
+   Configuration file including the configuration for ``kea-lfc``
+   process. It may also contain configuration entries for other Kea
+   services. Currently ``kea-lfc`` gets all of its arguments from the
+   command line, in the future it will be extended to get some arguments
+   from the config file.
+
+``-p``
+   PID file - When the ``kea-lfc`` process starts it attempts to
+   determine if another instance of the process is already running by
+   examining the pid file. If one is already running the new process is
+   terminated. If one isn't running it writes its pid into the pid file.
+
+``-x``
+   Previous or ex lease file - When ``kea-lfc`` starts this is the
+   result of any previous run of ``kea-lfc``. When ``kea-lfc`` finishes
+   it is the result of this run. If ``kea-lfc`` is interrupted before
+   completing, this file may not exist.
+
+``-i``
+   Input or copy of lease file - Before the DHCP server invokes
+   ``kea-lfc`` it will move the current lease file here and then call
+   ``kea-lfc`` with this file.
+
+``-o``
+   Output lease file - The temporary file ``kea-lfc`` should use to
+   write the leases. Upon completion of writing this this file it will
+   be moved to the finish file (see below).
+
+``-f``
+   Finish or completion file - Another temporary file ``kea-lfc`` uses
+   for bookkeeping. When ``kea-lfc`` completes writing the output file
+   it moves it to this file name. After ``kea-lfc`` finishes deleting
+   the other files (previous and input) it moves this file to previous
+   lease file. By moving the files in this fashion the ``kea-lfc`` and
+   the DHCP server processes can determine the correct file to use even
+   if one of the processes was interrupted before completing its task.
+
+DOCUMENTATION
+=============
+
+Kea comes with an extensive Kea User's Guide documentation that covers
+all aspects of running the Kea software - compilation, installation,
+configuration, configuration examples and many more. Kea also features a
+Kea Messages Manual, which lists all possible messages Kea can print
+with a brief description for each of them. Both documents are typically
+available in various formats (txt, html, pdf) with your Kea
+distribution. The Kea documentation is available at
+https://kb.isc.org/docs/kea-administrator-reference-manual .
+
+Kea source code is documented in the Kea Developer's Guide. Its on-line
+version is available at https://jenkins.isc.org/job/Kea_doc/doxygen/.
+
+Kea project website is available at: https://kea.isc.org.
+
+MAILING LISTS AND SUPPORT
+=========================
+
+There are two mailing lists available for Kea project. kea-users
+(kea-users at lists.isc.org) is intended for Kea users, while kea-dev
+(kea-dev at lists.isc.org) is intended for Kea developers, prospective
+contributors and other advanced users. Both lists are available at
+http://lists.isc.org. The community provides best effort type of support
+on both of those lists.
+
+ISC provides professional support for Kea services. See
+https://www.isc.org/kea/ for details.
+
+HISTORY
+=======
+
+The ``kea-lfc`` process was first coded in January 2015 by the ISC
+Kea/DHCP team.
+
+SEE ALSO
+========
+
+kea-dhcp4 8, kea-dhcp6 8, kea-dhcp-ddns 8, kea-ctrl-agent 8, kea-admin
+8, kea-netconf 8, keactrl 8, perfdhcp 8, Kea Administrator's Guide.
diff --git a/doc/sphinx/man/kea-netconf.8.rst b/doc/sphinx/man/kea-netconf.8.rst
new file mode 100644 (file)
index 0000000..928f7cb
--- /dev/null
@@ -0,0 +1,94 @@
+:orphan:
+
+kea-netconf
+8
+Kea
+kea-netconf
+NETCONF agent for Kea environment
+2018
+Internet Systems Consortium, Inc. ("ISC")
+kea-netconf
+-v
+-V
+-W
+-d
+-c
+config-file
+-t
+config-file
+DESCRIPTION
+===========
+
+The ``kea-netconf`` agent provides a YANG/NETCONF interface for the Kea
+environment.
+
+ARGUMENTS
+=========
+
+The arguments are as follows:
+
+``-v``
+   Display the version.
+
+``-V``
+   Display the extended version.
+
+``-W``
+   Display the configuration report.
+
+``-d``
+   Enable the debug mode with extra verbosity.
+
+``-c``
+   Configuration file including the configuration for NETCONF agent.
+
+``-t``
+   Check the syntax of the configuration file and report the first error
+   if any. Note that not all parameters are completely checked, in
+   particular, service and client sockets are not opened, and hook
+   libraries are not loaded.
+
+DOCUMENTATION
+=============
+
+Kea comes with an extensive Kea User's Guide documentation that covers
+all aspects of running the Kea software - compilation, installation,
+configuration, configuration examples and many more. Kea also features a
+Kea Messages Manual, which lists all possible messages Kea can print
+with a brief description for each of them. Both documents are typically
+available in various formats (txt, html, pdf) with your Kea
+distribution. The Kea documentation is available at
+https://kb.isc.org/docs/kea-administrator-reference-manual .
+
+Kea source code is documented in the Kea Developer's Guide. Its on-line
+version is available at https://jenkins.isc.org/job/Kea_doc/doxygen/.
+
+Kea project website is available at:
+https://gitlab.isc.org/isc-projects/kea.
+
+MAILING LISTS AND SUPPORT
+=========================
+
+There are two mailing lists available for Kea project. kea-users
+(kea-users at lists.isc.org) is intended for Kea users, while kea-dev
+(kea-dev at lists.isc.org) is intended for Kea developers, prospective
+contributors and other advanced users. Both lists are available at
+http://lists.isc.org. The community provides best effort type of support
+on both of those lists.
+
+ISC provides professional support for Kea services. See
+https://www.isc.org/kea/ for details.
+
+HISTORY
+=======
+
+Early prototypes of kea-netconf implementation were written during IETF
+Hackathons in Berlin, London and Montreal. An actual production ready
+implementation was started in August 2018 by Tomek Mrugalski and Francis
+Dupont.
+
+SEE ALSO
+========
+
+kea-dhcp4 8, kea-dhcp6 8, kea-dhcp-ddns 8, kea-ctrl-agent 8, kea-admin
+8, keactrl 8, perfdhcp 8, kea-lfc 8, Kea Administrator's Guide.
diff --git a/doc/sphinx/man/kea-shell.8.rst b/doc/sphinx/man/kea-shell.8.rst
new file mode 100644 (file)
index 0000000..98b65de
--- /dev/null
@@ -0,0 +1,105 @@
+:orphan:
+
+kea-shell
+8
+Kea
+kea-shell
+Text client for Control Agent process
+2017-2018
+Internet Systems Consortium, Inc. ("ISC")
+kea-shell
+-h
+-v
+--host
+--port
+--path
+--timeout
+--service
+command
+DESCRIPTION
+===========
+
+The ``kea-shell`` provides a REST client for the Kea Control Agent (CA).
+It takes command as a command-line parameter that is being sent to CA
+with proper JSON encapsulation. Optional arguments may be specified on
+the standard input. The request it sent of HTTP and a response is
+retrieved. That response is displayed out on the standard output.
+
+ARGUMENTS
+=========
+
+The arguments are as follows:
+
+``-h``
+   Displays help regarding command line parameters.
+
+``-v``
+   Display the version.
+
+``--host``
+   Specifies the host to connect to. Control Agent must be running at
+   specified host. If not specified, 127.0.0.1 is used.
+
+``--port``
+   Specifies the TCP port to connect to. Control Agent must be listening
+   at specified port. If not specified, 8000 is used.
+
+``--path``
+   Specifies the path in the URL to connect to. If not specified, empty
+   path is used. As Control Agent listens at the empty path this
+   parameter is useful only with a reverse proxy.
+
+``--timeout``
+   Specifies the connection timeout in seconds. If not specified, 10
+   (seconds) is used.
+
+``--service``
+   Specifies the service that is the target of a command. If not
+   specified, Control Agent will be targeted. May be used more than once
+   to specify multiple targets.
+
+``command``
+   Specifies the command to be sent to CA. If not specified,
+   "list-commands" is used.
+
+DOCUMENTATION
+=============
+
+Kea comes with an extensive Kea User's Guide documentation that covers
+all aspects of running the Kea software - compilation, installation,
+configuration, configuration examples and many more. Kea also features a
+Kea Messages Manual, which lists all possible messages Kea can print
+with a brief description for each of them. Both documents are typically
+available in various formats (txt, html, pdf) with your Kea
+distribution. The Kea documentation is available at
+https://kb.isc.org/docs/kea-administrator-reference-manual .
+
+Kea source code is documented in the Kea Developer's Guide. Its on-line
+version is available at https://jenkins.isc.org/job/Kea_doc/doxygen/.
+
+Kea project website is available at:
+https://gitlab.isc.org/isc-projects/kea.
+
+MAILING LISTS AND SUPPORT
+=========================
+
+There are two mailing lists available for Kea project. kea-users
+(kea-users at lists.isc.org) is intended for Kea users, while kea-dev
+(kea-dev at lists.isc.org) is intended for Kea developers, prospective
+contributors and other advanced users. Both lists are available at
+http://lists.isc.org. The community provides best effort type of support
+on both of those lists.
+
+ISC provides professional support for Kea services. See
+https://www.isc.org/kea/ for details.
+
+HISTORY
+=======
+
+The ``kea-shell`` was first coded in March 2017 by Tomek Mrugalski.
+
+SEE ALSO
+========
+
+kea-ctrl-agent 8, kea-dhcp4 8, kea-dhcp6 8, kea-dhcp-ddns 8, kea-admin
+8, keactrl 8, perfdhcp 8, kea-lfc 8, Kea Administrator's Guide.
diff --git a/doc/sphinx/man/keactrl.8.rst b/doc/sphinx/man/keactrl.8.rst
new file mode 100644 (file)
index 0000000..f6254a9
--- /dev/null
@@ -0,0 +1,123 @@
+:orphan:
+
+keactrl
+8
+Kea
+keactrl
+Shell script for managing Kea
+2014-2018
+Internet Systems Consortium, Inc. ("ISC")
+keactrl
+command
+-c
+keactrl-config-file
+-s
+server[,server,...]
+-v
+DESCRIPTION
+===========
+
+keactrl is a shell script which controls the startup, shutdown and
+reconfiguration of the Kea servers (``kea-dhcp4``, ``kea-dhcp6``,
+``kea-dhcp-ddns``, ``kea-ctrl-agent`` and ``kea-netconf``). It also
+provides the means for checking the current status of the servers and
+determining the configuration files in use.
+
+CONFIGURATION FILE
+==================
+
+Depending on requirements, not all of the available servers need be run.
+The keactrl configuration file sets which servers are enabled and which
+are disabled. By default the configuration file is
+``[kea-install-dir]/etc/kea/keactrl.conf``.
+
+See the Kea Administrator's Guide for the documentation of the
+parameters in the ``keactrl`` configuration file.
+
+OPTIONS
+=======
+
+``command``
+   Command to be issued to the servers. It can be one of the following:
+
+   start
+      Start the servers.
+
+   stop
+      Stop the servers.
+
+   reload
+      Instructs the servers to re-read the kea configuration file. This
+      command is not supported by the Netconf agent.
+
+   status
+      Print the status of the servers.
+
+``-c|--ctrl-config keactrl-config-file``
+   Specify the ``keactrl`` configuration file. Without this switch, the
+   ``keactrl`` will attempt to use the file
+   ``[kea-install-dir]/etc/kea/keactrl.conf``.
+
+``-s|--server server[,server,...]``
+   Specifies a subset of the enabled servers to which the command should
+   be issued. The list of servers should be separated by commas with no
+   intervening spaces. Acceptable values are:
+
+   dhcp4
+      DHCPv4 server (``kea-dhcp4``).
+
+   dhcp6
+      DHCPv6 server (``kea-dhcp6``).
+
+   dhcp_ddns
+      DHCP DDNS server (``kea-dhcp-ddns``).
+
+   ctrl_agent
+      Control Agent (``kea-ctrl-agent``).
+
+   netconf
+      Netconf agent (``kea-netconf``).
+
+   all
+      All servers (default) including Netconf if it was configured to be
+      built.
+
+``-v|--version``
+   Prints keactrl version and quits.
+
+DOCUMENTATION
+=============
+
+Kea comes with an extensive Kea User's Guide documentation that covers
+all aspects of running the Kea software - compilation, installation,
+configuration, configuration examples and many more. Kea also features a
+Kea Messages Manual, which lists all possible messages Kea can print
+with a brief description for each of them. Both documents are typically
+available in various formats (txt, html, pdf) with your Kea
+distribution. The Kea documentation is available at
+https://kb.isc.org/docs/kea-administrator-reference-manual .
+
+Kea source code is documented in the Kea Developer's Guide. Its on-line
+version is available at https://jenkins.isc.org/job/Kea_doc/doxygen/.
+
+The Kea project website is available at: https://kea.isc.org.
+
+MAILING LISTS AND SUPPORT
+=========================
+
+There are two mailing lists available for Kea project. kea-users
+(kea-users at lists.isc.org) is intended for Kea users, while kea-dev
+(kea-dev at lists.isc.org) is intended for Kea developers, prospective
+contributors and other advanced users. Both lists are available at
+http://lists.isc.org. The community provides best effort type of support
+on both of those lists.
+
+ISC provides professional support for Kea services. See
+https://www.isc.org/kea/ for details.
+
+SEE ALSO
+========
+
+kea-dhcp4 8, kea-dhcp6 8, kea-dhcp-ddns 8, kea-ctrl-agent 8, kea-netconf
+8, kea-admin 8, kea-netconf 8, perfdhcp 8, kea-lfc 8, Kea
+Administrator's Guide.
diff --git a/doc/sphinx/man/perfdhcp.8.rst b/doc/sphinx/man/perfdhcp.8.rst
new file mode 100644 (file)
index 0000000..ad84ccb
--- /dev/null
@@ -0,0 +1,501 @@
+:orphan:
+
+perfdhcp
+8
+Kea
+perfdhcp
+DHCP benchmarking tool
+2016-2018
+Internet Systems Consortium, Inc. ("ISC")
+perfdhcp
+-1
+-4|-6
+-A
+encapsulation-level
+-b
+base
+-B
+-c
+-d
+drop-time
+-D
+max-drop
+-e
+lease-type
+-E
+time-offset
+-f
+renew-rate
+-F
+release-rate
+-g
+thread-mode
+-h
+-i
+-I
+ip-offset
+-l
+local-address|interface
+-L
+local-port
+-M
+mac-list-file
+-n
+num-request
+-N
+remote-port
+-O
+random-offset
+-o
+code,hexstring
+-p
+test-period
+-P
+preload
+-r
+rate
+-R
+num-clients
+-s
+seed
+-S
+srvid-offset
+-t
+report
+-T
+template-file
+-v
+-W
+exit-wait-time
+-w
+wrapped
+-x
+diagnostic-selector
+-X
+xid-offset
+server
+DESCRIPTION
+===========
+
+``perfdhcp`` is a DHCP benchmarking tool. It provides a way of measuring
+the performance of DHCP servers by generating large amounts of traffic
+from simulated multiple clients. It is able to test both IPv4 and IPv6
+servers, and provides statistics concerning response times and the
+number of requests that are dropped.
+
+By default, tests are run using the full four-packet exchange sequence
+(DORA for DHCPv4, SARR for DHCPv6). An option is provided to run tests
+using the initial two-packet exchange (DO and SA) instead. It is also
+possible to configure perfdhcp to send DHCPv6 RENEW and RELEASE messages
+at a specified rate in parallel with the DHCPv6 four-way exchanges.
+
+When running a performance test, ``perfdhcp`` will exchange packets with
+the server under test as fast as possible unless the ``-r`` is given to
+limit the request rate. The length of the test can be limited by setting
+a threshold on any or all of the number of requests made by
+``perfdhcp``, the elapsed time, or the number of requests dropped by the
+server.
+
+TEMPLATES
+=========
+
+To allow the contents of packets sent to the server to be customized,
+``perfdhcp`` allows the specification of template files that determine
+the contents of the packets. For example, the customized packet may
+contain a DHCPv6 ORO to request a set of options to be returned by the
+server, or it may contain the Client FQDN option to request that server
+performs DNS updates. This may be used to discover performance
+bottlenecks for different server configurations (e.g. DDNS enabled or
+disabled).
+
+Up to two template files can be specified on the command line, each file
+representing the contents of a particular type of packet, the type being
+determined by the test being carried out. For example, if testing
+DHCPv6:
+
+-  With no template files specified on the command line, ``perfdhcp``
+   will generate both SOLICIT and REQUEST packets.
+
+-  With one template file specified, that file will be used as the
+   pattern for SOLICIT packets: ``perfdhcp`` will generate the REQUEST
+   packets.
+
+-  With two template files given on the command line, the first will be
+   used as the pattern for SOLICIT packets, the second as the pattern
+   for REQUEST packets.
+
+(Similar determination applies to DHCPv4's DISCOVER and REQUEST
+packets.)
+
+The template file holds the DHCP packet represented as a stream of ASCII
+hexadecimal digits and it excludes any IP/UDP stack headers. The
+template file must not contain any characters other than hexadecimal
+digits and spaces. Spaces are discarded when the template file is parsed
+(so in the file, '12B4' is the same as '12 B4' which is the same as '1 2
+B 4')
+
+The template files should be used in conjunction with the command line
+parameters which specify offsets of the data fields being modified in
+outbound packets. For example, the ``-E time-offset`` switch specifies
+the offset of the DHCPv6 Elapsed Time option in the packet template.
+If the offset is specified, perfdhcp will inject the current elapsed
+time value into this field before sending the packet to the server.
+
+In many scenarios, ``perfdhcp`` needs to simulate multiple clients
+(having unique client identifier). Since packets for each client are
+generated from the same template file, it is necessary to randomize the
+client identifier (or HW address in DHCPv4) in the packet created from
+it. The ``-O random-offset`` option allows specification of the offset in
+the template where randomization should be performed. It is important to
+note that this offset points to the end (not the beginning) of the
+client identifier (or HW address field). The number of bytes being
+randomized depends on the number of simulated clients. If the number of
+simulated clients is between 1 and 255, only one byte (to which
+randomization offset points) will be randomized. If the number of
+simulated clients is between 256 and 65535, two bytes will be
+randomized. Note, that two last bytes of the client identifier will be
+randomized in this case: the byte which randomization offset parameter
+points to, and the one which precedes it (random-offset - 1). If the
+number of simulated clients exceeds 65535, three bytes will be
+randomized; and so on.
+
+Templates may be currently used to generate packets being sent to the
+server in 4-way exchanges, i.e. SOLICIT, REQUEST (DHCPv6) and DISCOVER,
+REQUEST (DHCPv4). They cannot be used when RENEW or RELEASE packets are
+being sent.
+
+OPTIONS
+=======
+
+``-1``
+   Take the server-ID option from the first received message.
+
+``-4``
+   DHCPv4 operation; this is the default. It is incompatible with the
+   ``-6`` option.
+
+``-6``
+   DHCPv6 operation. This is incompatible with the ``-4`` option.
+
+``-b basetype=value``
+   The base MAC or DUID used to simulate different clients. The basetype
+   may be "mac" or "duid". (The keyword "ether" may alternatively used
+   for MAC.) The ``-b`` option can be specified multiple times. The MAC
+   address must consist of six octets separated by single (:) or double
+   (::) colons, for example: mac=00:0c:01:02:03:04. The DUID value is a
+   hexadecimal string: it must be at least six octets long and must not
+   be longer than 64 bytes and the length must be less than 128
+   hexadecimal digits, for example: duid=0101010101010101010110111F14.
+
+``-d drop-time``
+   Specify the time after which a request is treated as having been
+   lost. The value is given in seconds and may contain a fractional
+   component. The default is 1 second.
+
+``-e lease-type``
+   Specifies the type of lease being requested from the server. It may
+   be one of the following:
+
+   address-only
+      Only regular addresses (v4 or v6) will be requested.
+
+   prefix-only
+      Only IPv6 prefixes will be requested.
+
+   address-and-prefix
+      Both IPv6 addresses and prefixes will be requested.
+
+   The ``-e prefix-only`` and ``-e address-and-prefix`` forms may not be used
+   with the ``-4`` option.
+
+``-f renew-rate``
+   Rate at which DHCPv4 or DHCPv6 renew requests are sent to a server.
+   This value is only valid when used in conjunction with the exchange
+   rate (given by ``-r rate``). Furthermore the sum of this value and
+   the release-rate (given by ``-F rate``) must be equal to or less than the
+   exchange rate.
+
+``-g thread-mode``
+   thread-mode can be either 'single' or 'multi'. In multi-thread mode
+   packets are received in separate thread. This allows better
+   utilisation of CPUs. In single CPU system it is better to run in 1
+   thread to avoid blocking of threads each other. If more than 1 CPU is
+   present in the system then multi-thread mode is default otherwise
+   single-thread is default.
+
+``-h``
+   Print help and exit.
+
+``-i``
+   Do only the initial part of the exchange: DISCOVER-OFFER if ``-4`` is
+   selected, SOLICIT-ADVERTISE if ``-6`` is chosen.
+
+   ``-i`` is incompatible with the following options: ``-1``, ``-d``,
+   ``-D``, ``-E``, ``-S``, ``-I`` and ``-F``. In addition, it cannot be
+   used with multiple instances of ``-O``, ``-T`` and ``-X``.
+
+``-l local-addr|interface``
+   For DHCPv4 operation, specify the local hostname/address to use when
+   communicating with the server. By default, the interface address
+   through which traffic would normally be routed to the server is used.
+   For DHCPv6 operation, specify the name of the network interface
+   through which exchanges are initiated.
+
+``-L local-port``
+   Specify the local port to use. This must be zero or a positive
+   integer up to 65535. A value of 0 (the default) allows ``perfdhcp``
+   to choose its own port.
+
+``-M mac-list-file``
+   A text file containing a list of MAC addresses, one per line. If
+   provided, a MAC address will be chosen randomly from this list for
+   every new exchange. In the DHCPv6 case, MAC addresses are used to
+   generate DUID-LLs. This parameter must not be used in conjunction
+   with the -b parameter.
+
+``-N remote-port``
+   Specify the remote port to use. This must be zero or a positive
+   integer up to 65535. A value of 0 (the default) allows ``perfdhcp``
+   to choose the standard service port.
+
+``-o code,hexstring``
+   This forces perfdhcp to insert specified extra option (or options if
+   used several times) into packets being transmitted. The code
+   specifies option code and the hexstring is a hexadecimal string that
+   defines the content of the option. Care should be taken as perfdhcp
+   does not offer any kind of logic behind those options. They're simply
+   inserted into packets being sent as is. Be careful not to insert
+   options that are already inserted. For example, to insert client
+   class identifier (option code 60) with a string 'docsis', you can use
+   -o 60,646f63736973. The ``-o`` may be used multiple times. It is
+   necessary to specify protocol family (either ``-4`` or ``-6``) before
+   using ``-o``.
+
+``-P preload``
+   Initiate preload exchanges back to back at startup. preload must be 0
+   (the default) or a positive integer.
+
+``-r rate``
+   Initiate rate DORA/SARR (or if ``-i`` is given, DO/SA) exchanges per
+   second. A periodic report is generated showing the number of
+   exchanges which were not completed, as well as the average response
+   latency. The program continues until interrupted, at which point a
+   final report is generated.
+
+``-R num-clients``
+   Specify how many different clients are used. With a value of 1 (the
+   default), all requests seem to come from the same client. num-clients
+   must be a positive number.
+
+``-s seed``
+   Specify the seed for randomization, making runs of ``perfdhcp``
+   repeatable. seed is 0 or a positive integer. The value 0 means that a
+   seed is not used; this is the default.
+
+``-T template-file``
+   The name of a file containing the template to use as a stream of
+   hexadecimal digits. This may be specified up to two times and
+   controls the contents of the packets sent (see the "TEMPLATES"
+   section above).
+
+``-v``
+   Print the version of this program.
+
+``-W exit-wait-time``
+   Specifies exit-wait-time parameter, that makes perfdhcp wait for
+   exit-wait-time us after an exit condition has been met to receive all
+   packets without sending any new packets. Expressed in microseconds.
+   If not specified, 0 is used (i.e. exit immediately after exit
+   conditions are met).
+
+``-w wrapped``
+   Command to call with a single parameter of "start" or "stop" at the
+   beginning/end of the program.
+
+``-x diagnostic-selector``
+   Include extended diagnostics in the output. diagnostic-selector is a
+   string of single-keywords specifying the operations for which verbose
+   output is desired. The selector key letters are:
+
+   a
+      Print the decoded command line arguments.
+
+   e
+      Print the exit reason.
+
+   i
+      Print rate processing details.
+
+   s
+      Print the first server-ID.
+
+   t
+      When finished, print timers of all successful exchanges.
+
+   T
+      When finished, print templates
+
+DHCPv4-Only Options
+-------------------
+
+The following options only apply for DHCPv4 (i.e. when ``-4`` is given).
+
+``-B``
+   Force broadcast handling.
+
+DHCPv6-Only Options
+-------------------
+
+The following options only apply for DHCPv6 (i.e. when ``-6`` is given).
+
+``-c``
+   Add a rapid commit option (exchanges will be SOLICIT-ADVERTISE).
+
+``-F release-rate``
+   Rate at which IPv6 RELEASE requests are sent to a server. This value
+   is only valid when used in conjunction with the exchange rate (given
+   by ``-r rate``). Furthermore the sum of this value and the renew-rate
+   (given by ``-f rate``) must be equal to or less than the exchange
+   rate.
+
+``-A encapsulation-level``
+   Specifies that relayed traffic must be generated. The argument
+   specifies the level of encapsulation, i.e. how many relay agents are
+   simulated. Currently the only supported encapsulation-level value is
+   1, which means that the generated traffic is an equivalent of the
+   traffic passing through a single relay agent.
+
+Template-Related Options
+------------------------
+
+The following options may only be used in conjunction with ``-T`` and
+control how ``perfdhcp`` modifies the template. The options may be
+specified multiple times on the command line; each occurrence affects
+the corresponding template file (see "TEMPLATES" above).
+
+-E
+time-offset
+Offset of the (DHCPv4) secs field or (DHCPv6) elapsed-time option in the
+(second i.e. REQUEST) template and must be 0 or a positive integer: a
+value of 0 disables this.
+
+-I
+ip-offset
+Offset of the (DHCPv4) IP address in the requested-IP option / (DHCPv6)
+IA_NA option in the (second/request) template.
+
+-O
+random-offset
+Offset of the last octet to randomize in the template. random-offset
+must be an integer greater than 3. The ``-T`` switch must be given to
+use this option.
+
+-S
+srvid-offset
+Offset of the server-ID option in the (second/request) template.
+srvid-offset must be a positive integer, and the switch can only be used
+when the template option (``-T``) is also given.
+
+-X
+xid-offset
+Offset of the transaction ID (xid) in the template. xid-offset must be a
+positive integer, and the switch can only be used when the template
+option (``-T``) is also given.
+
+Options Controlling a Test
+--------------------------
+
+``-D max-drop``
+   Abort the test immediately if max-drop requests have been dropped.
+   Use ``-D 0`` to abort if even a single request has
+   been dropped. max-drop must be a positive integer. If max-drop
+   includes the suffix '%', it specifies a maximum percentage of
+   requests that may be dropped before abort. In this case, testing of
+   the threshold begins after 10 requests have been expected to be
+   received.
+
+``-n num-requests``
+   Initiate num-request transactions. No report is generated until all
+   transactions have been initiated/waited-for, after which a report is
+   generated and the program terminates.
+
+``-p test-period``
+   Send requests for test-period, which is specified in the same manner
+   as ``-d``. This can be used as an alternative to ``-n``, or both
+   options can be given, in which case the testing is completed when
+   either limit is reached.
+
+``-t interval``
+   Sets the delay (in seconds) between two successive reports.
+
+Arguments
+---------
+
+server
+   Server to test, specified as an IP address. In the DHCPv6 case, the
+   special name 'all' can be used to refer to
+   All_DHCP_Relay_Agents_and_Servers (the multicast address FF02::1:2),
+   or the special name 'servers' to refer to All_DHCP_Servers (the
+   multicast address FF05::1:3). The server is mandatory except where
+   the ``-l`` option is given to specify an interface, in which case it
+   defaults to 'all'.
+
+ERRORS
+======
+
+``perfdhcp`` can report the following errors in the packet exchange:
+
+tooshort
+   A message was received that was too short.
+
+orphans
+   Received a message which doesn't match one sent to the server (i.e.
+   it is a duplicate message, a message that has arrived after an
+   excessive delay, or one that is just not recognized).
+
+locallimit
+   Reached local system limits when sending a message.
+
+EXIT STATUS
+===========
+
+``perfdhcp`` can exit with one of the following status codes:
+
+0
+   Success.
+
+1
+   General error.
+
+2
+   Error in command-line arguments.
+
+3
+   No general failures in operation, but one or more exchanges were
+   unsuccessful.
+
+MAILING LISTS AND SUPPORT
+=========================
+
+There are two mailing lists available for Kea project. kea-users
+(kea-users at lists.isc.org) is intended for Kea users, while kea-dev
+(kea-dev at lists.isc.org) is intended for Kea developers, prospective
+contributors and other advanced users. Both lists are available at
+http://lists.isc.org. The community provides best effort type of support
+on both of those lists.
+
+ISC provides professional support for Kea services. See
+https://www.isc.org/kea/ for details.
+
+HISTORY
+=======
+
+The ``perfdhcp`` tool was initially coded in October 2011 by John
+DuBois, Francis Dupont and Marcin Siodelski of ISC. Kea 1.0.0 that
+included perfdhcp was released in December 2015.
+
+SEE ALSO
+========
+
+kea-dhcp4 8, kea-dhcp6 8, kea-dhcp-ddns 8, kea-ctrl-agent 8, kea-admin
+8, kea-netconf 8, keactrl 8, kea-lfc 8, Kea Administrator's Guide.
diff --git a/doc/sphinx/static/kea-logo-100x70.png b/doc/sphinx/static/kea-logo-100x70.png
new file mode 120000 (symlink)
index 0000000..ad966c4
--- /dev/null
@@ -0,0 +1 @@
+../../images/kea-logo-100x70.png
\ No newline at end of file
similarity index 99%
rename from tools/system_messages.py
rename to doc/sphinx/system_messages.py
index 6dee59f95c7e701674d1d148405498b362185a37..402f86cbbc091ecb4fc3205cfb069106eb2249da 100755 (executable)
@@ -69,6 +69,8 @@ def read_input_files(files):
 
 def generate_rst(messages):
     rst = '''
+:orphan:
+
 ###################
 Kea Messages Manual
 ###################
diff --git a/src/bin/admin/kea-admin.rst b/src/bin/admin/kea-admin.rst
new file mode 100644 (file)
index 0000000..a3cad7b
--- /dev/null
@@ -0,0 +1,97 @@
+kea-admin
+8
+Kea
+kea-admin
+Shell script for managing Kea databases
+2014-2018
+Internet Systems Consortium, Inc. ("ISC")
+kea-admin
+command
+backend
+-u
+database username
+-p
+database password
+-n
+database name
+-d
+scripts directory
+-4 \| -6
+-o
+output file
+-v
+DESCRIPTION
+===========
+
+kea-admin is a shell script which offers database maintenance. In
+particular, it features database initialization, database version
+checking and database schema upgrade.
+
+OPTIONS
+=======
+
+``command``
+   Command to be issued to the servers. It can be one of the following:
+
+   lease-init
+      Initializes a new lease database. Useful during first Kea
+      installation. The database is initialized to the latest version
+      supported by the version of the software.
+
+   lease-version
+      Reports lease database version. This is not necessarily equal to
+      Kea version as each backend has its own versioning scheme.
+
+   lease-upgrade
+      Conducts lease database upgrade. This is useful when migrating
+      between old and new Kea versions.
+
+   lease-dump
+      Dumps the contents of the lease database (MySQL and PostgreSQL
+      backends) to text file. The content of the file consists of
+      comma-separated-values (CSV) where each line in the file contains
+      all of the values for a single lease. The first line of file is a
+      header line containing the column names.
+
+``backend``
+   Specifies backend type. Currently allowed backends are: memfile,
+   mysql and pgsql.
+
+``-u|--user username``
+   Specify the username when connecting to a database. If not specified,
+   the default value of keatest is used.
+
+``-p|--password password``
+   Specifies the password when connecting to a database. If not
+   specified, the default value of keatest is used.
+
+``-n|--name database-name``
+   Specifies the database name to connect to. If not specified, the
+   default value of keatest is used.
+
+``-d|--directory script-directory``
+   Used for override scripts directory. That script is used during
+   upgrades, database initialization and possibly other operations. If
+   not specified, the default value of (prefix)/share/kea/scripts/ is
+   used.
+
+``-o|--output output_file``
+   Required for lease-dump, Specifies the file to which the lease data
+   will be dumped.
+
+``-v|--version``
+   Prints kea-admin version and quits.
+
+``-4``
+   Directs kea-admin to lease-dump the DHCPv4 leases. Incompatible with
+   the -6 option.
+
+``-6``
+   Directs kea-admin to lease-dump the DHCPv6 leases. Incompatible with
+   the -4 option.
+
+SEE ALSO
+========
+
+keactrl 8, kea-dhcp4 8, kea-dhcp6 8, kea-dhcp-ddns 8, kea-ctrl-agent 8,
+kea-netconf 8, keactrl 8, perfdhcp 8, Kea Administrator Guide.
diff --git a/src/bin/agent/kea-ctrl-agent.rst b/src/bin/agent/kea-ctrl-agent.rst
new file mode 100644 (file)
index 0000000..85dd729
--- /dev/null
@@ -0,0 +1,97 @@
+kea-ctrl-agent
+8
+Kea
+kea-ctrl-agent
+Control Agent process in Kea
+2016-2018
+Internet Systems Consortium, Inc. ("ISC")
+kea-ctrl-agent
+-v
+-V
+-W
+-d
+-c
+config-file
+-t
+config-file
+DESCRIPTION
+===========
+
+The ``kea-ctrl-agent`` provides a REST service for controlling Kea
+services. The received HTTP requests are decapsulated and forwarded to
+the respective Kea services in JSON format. Received JSON responses are
+encapsulated within HTTP responses and returned to the controlling
+entity. Some commands may be handled by the Control Agent directly, and
+not forwarded to any Kea service.
+
+ARGUMENTS
+=========
+
+The arguments are as follows:
+
+``-v``
+   Display the version.
+
+``-V``
+   Display the extended version.
+
+``-W``
+   Display the configuration report.
+
+``-d``
+   Verbose mode sets the logging level to debug. This is primarily for
+   development purposes in stand-alone mode.
+
+``-c``
+   Configuration file including the configuration for the Control Agent
+   server. It may also contain configuration entries for other Kea
+   services.
+
+``-t``
+   Check the syntax of the configuration file and report the first error
+   if any. Note that not all parameters are completely checked, in
+   particular, service and client sockets are not opened, and hook
+   libraries are not loaded.
+
+DOCUMENTATION
+=============
+
+Kea comes with an extensive Kea User's Guide documentation that covers
+all aspects of running the Kea software - compilation, installation,
+configuration, configuration examples and many more. Kea also features a
+Kea Messages Manual, which lists all possible messages Kea can print
+with a brief description for each of them. Both documents are typically
+available in various formats (txt, html, pdf) with your Kea
+distribution. The Kea documentation is available at
+https://kb.isc.org/docs/kea-administrator-reference-manual .
+
+Kea source code is documented in the Kea Developer's Guide. Its on-line
+version is available at https://jenkins.isc.org/job/Kea_doc/doxygen/.
+
+Kea project website is available at:
+https://gitlab.isc.org/isc-projects/kea.
+
+MAILING LISTS AND SUPPORT
+=========================
+
+There are two mailing lists available for Kea project. kea-users
+(kea-users at lists.isc.org) is intended for Kea users, while kea-dev
+(kea-dev at lists.isc.org) is intended for Kea developers, prospective
+contributors and other advanced users. Both lists are available at
+http://lists.isc.org. The community provides best effort type of support
+on both of those lists.
+
+ISC provides professional support for Kea services. See
+https://www.isc.org/kea/ for details.
+
+HISTORY
+=======
+
+The ``kea-ctrl-agent`` was first coded in December 2016 by Marcin
+Siodelski.
+
+SEE ALSO
+========
+
+kea-dhcp4 8, kea-dhcp6 8, kea-dhcp-ddns 8, kea-admin 8, keactrl 8,
+perfdhcp 8, kea-lfc 8, Kea Administrator's Guide.
diff --git a/src/bin/d2/kea-dhcp-ddns.rst b/src/bin/d2/kea-dhcp-ddns.rst
new file mode 100644 (file)
index 0000000..240e1fb
--- /dev/null
@@ -0,0 +1,95 @@
+kea-dhcp-ddns
+8
+Kea
+kea-dhcp-ddns
+DHCP-DDNS process in Kea
+2013-2018
+Internet Systems Consortium, Inc. ("ISC")
+kea-dhcp-ddns
+-v
+-V
+-W
+-d
+-c
+config-file
+-t
+config-file
+DESCRIPTION
+===========
+
+The ``kea-dhcp-ddns`` service process requests to update DNS mapping
+based on DHCP lease change events. It runs as a separate process that
+expects to receive Name Change Requests from Kea DHCP servers.
+
+ARGUMENTS
+=========
+
+The arguments are as follows:
+
+``-v``
+   Display the version.
+
+``-V``
+   Display the extended version.
+
+``-W``
+   Display the configuration report.
+
+``-d``
+   Verbose mode sets the logging level to debug. This is primarily for
+   development purposes in stand-alone mode.
+
+``-c``
+   Configuration file including the configuration for DHCP-DDNS server.
+   It may also contain configuration entries for other Kea services.
+
+``-t``
+   Check the syntax of the configuration file and report the first error
+   if any. Note that not all parameters are completely checked, in
+   particular, service socket is not opened.
+
+DOCUMENTATION
+=============
+
+Kea comes with an extensive Kea User's Guide documentation that covers
+all aspects of running the Kea software - compilation, installation,
+configuration, configuration examples and many more. Kea also features a
+Kea Messages Manual, which lists all possible messages Kea can print
+with a brief description for each of them. Both documents are typically
+available in various formats (txt, html, pdf) with your Kea
+distribution. The Kea documentation is available at
+https://kb.isc.org/docs/kea-administrator-reference-manual .
+
+Kea source code is documented in the Kea Developer's Guide. Its on-line
+version is available at https://jenkins.isc.org/job/Kea_doc/doxygen/.
+
+Kea project website is available at: https://kea.isc.org.
+
+MAILING LISTS AND SUPPORT
+=========================
+
+There are two mailing lists available for Kea project. kea-users
+(kea-users at lists.isc.org) is intended for Kea users, while kea-dev
+(kea-dev at lists.isc.org) is intended for Kea developers, prospective
+contributors and other advanced users. Both lists are available at
+http://lists.isc.org. The community provides best effort type of support
+on both of those lists.
+
+ISC provides professional support for Kea services. See
+https://www.isc.org/kea/ for details.
+
+HISTORY
+=======
+
+The ``b10-dhcp-ddns`` process was first coded in May 2013 by Thomas
+Markwalder.
+
+Kea became a standalone server and the BIND10 framework was removed. The
+DHCP-DDNS server binary was renamed to kea-dhcp-ddns in July 2014. Kea
+1.0.0 was released in December 2015.
+
+SEE ALSO
+========
+
+kea-dhcp4 8, kea-dhcp6 8, kea-ctrl-agent 8, kea-admin 8, keactrl 8,
+kea-netconf 8, perfdhcp 8, kea-lfc 8, Kea Administrator's Guide.
diff --git a/src/bin/dhcp4/kea-dhcp4.rst b/src/bin/dhcp4/kea-dhcp4.rst
new file mode 100644 (file)
index 0000000..53f35e3
--- /dev/null
@@ -0,0 +1,105 @@
+kea-dhcp4
+8
+Kea
+kea-dhcp4
+DHCPv4 server in Kea
+2011-2018
+Internet Systems Consortium, Inc. ("ISC")
+kea-dhcp4
+-v
+-V
+-W
+-d
+-c
+config-file
+-t
+config-file
+-p
+server-port-number
+-P
+client-port-number
+DESCRIPTION
+===========
+
+The ``kea-dhcp4`` daemon provides the DHCPv4 server implementation.
+
+ARGUMENTS
+=========
+
+The arguments are as follows:
+
+``-v``
+   Display the version.
+
+``-V``
+   Display the extended version.
+
+``-W``
+   Display the configuration report.
+
+``-d``
+   Enable the debug mode with extra verbosity.
+
+``-c``
+   Configuration file including the configuration for DHCPv4 server. It
+   may also contain configuration entries for other Kea services.
+
+``-t``
+   Check the configuration file and report the first error if any. Note
+   that not all parameters are completely checked, in particular,
+   service and control channel sockets are not opened, and hook
+   libraries are not loaded.
+
+``-p``
+   Server port number (1-65535) on which the server listens. This is
+   useful for testing purposes only.
+
+``-P``
+   Client port number (1-65535) to which the server responds. This is
+   useful for testing purposes only.
+
+DOCUMENTATION
+=============
+
+Kea comes with an extensive Kea User's Guide documentation that covers
+all aspects of running the Kea software - compilation, installation,
+configuration, configuration examples and many more. Kea also features a
+Kea Messages Manual, which lists all possible messages Kea can print
+with a brief description for each of them. Both documents are typically
+available in various formats (txt, html, pdf) with your Kea
+distribution. The Kea documentation is available at
+https://kb.isc.org/docs/kea-administrator-reference-manual .
+
+Kea source code is documented in the Kea Developer's Guide. Its on-line
+version is available at https://jenkins.isc.org/job/Kea_doc/doxygen/.
+
+Kea project website is available at: https://kea.isc.org.
+
+MAILING LISTS AND SUPPORT
+=========================
+
+There are two mailing lists available for Kea project. kea-users
+(kea-users at lists.isc.org) is intended for Kea users, while kea-dev
+(kea-dev at lists.isc.org) is intended for Kea developers, prospective
+contributors and other advanced users. Both lists are available at
+http://lists.isc.org. The community provides best effort type of support
+on both of those lists.
+
+ISC provides professional support for Kea services. See
+https://www.isc.org/kea/ for details.
+
+HISTORY
+=======
+
+The ``b10-dhcp4`` daemon was first coded in November 2011 by Tomek
+Mrugalski.
+
+In the mid 2014 Kea was decoupled from the BIND10 framework and became a
+standalone DHCP server. The DHCPv4 server binary was renamed to
+kea-dhcp4. Kea 1.0.0 was released in December 2015.
+
+SEE ALSO
+========
+
+kea-dhcp6 8, kea-dhcp-ddns 8, kea-ctrl-agent 8, kea-admin 8, keactrl 8,
+kea-netconf 8, perfdhcp 8, kea-lfc 8, Kea Administrator's Guide.
diff --git a/src/bin/dhcp6/kea-dhcp6.rst b/src/bin/dhcp6/kea-dhcp6.rst
new file mode 100644 (file)
index 0000000..f8d1430
--- /dev/null
@@ -0,0 +1,98 @@
+kea-dhcp6
+8
+Kea
+kea-dhcp6
+DHCPv6 server in Kea
+2011-2018
+Internet Systems Consortium, Inc. ("ISC")
+kea-dhcp6
+-v
+-V
+-W
+-d
+-c
+config-file
+-t
+config-file
+-p
+server-port-number
+DESCRIPTION
+===========
+
+The ``kea-dhcp6`` daemon provides the DHCPv6 server implementation.
+
+ARGUMENTS
+=========
+
+The arguments are as follows:
+
+``-v``
+   Display the version.
+
+``-V``
+   Display the extended version.
+
+``-W``
+   Display the configuration report.
+
+``-d``
+   Enable the debug mode with extra verbosity.
+
+``-c``
+   Configuration file including the configuration for DHCPv6 server. It
+   may also contain configuration entries for other Kea services.
+
+``-t``
+   Check the configuration file and report the first error if any. Note
+   that not all parameters are completely checked, in particular,
+   service and control channel sockets are not opened, and hook
+   libraries are not loaded.
+
+``-p``
+   Server port number (1-65535) on which the server listens. This is
+   useful for testing purposes only.
+
+DOCUMENTATION
+=============
+
+Kea comes with an extensive Kea User's Guide documentation that covers
+all aspects of running the Kea software - compilation, installation,
+configuration, configuration examples and many more. Kea also features a
+Kea Messages Manual, which lists all possible messages Kea can print
+with a brief description for each of them. Both documents are typically
+available in various formats (txt, html, pdf) with your Kea
+distribution. Kea user documentation is availalable on-line at
+https://kb.isc.org/docs/kea-administrator-reference-manual .
+
+Kea source code is documented in the Kea Developer's Guide. Its on-line
+version is available at https://jenkins.isc.org/job/Kea_doc/doxygen/.
+
+Kea project website is available at: https://kea.isc.org.
+
+MAILING LISTS AND SUPPORT
+=========================
+
+There are two mailing lists available for Kea project. kea-users
+(kea-users at lists.isc.org) is intended for Kea users, while kea-dev
+(kea-dev at lists.isc.org) is intended for Kea developers, prospective
+contributors and other advanced users. Both lists are available at
+http://lists.isc.org. The community provides best effort type of support
+on both of those lists.
+
+ISC provides professional support for Kea services. See
+https://www.isc.org/kea/ for details.
+
+HISTORY
+=======
+
+The ``b10-dhcp6`` daemon was first coded in June 2011 by Tomek
+Mrugalski.
+
+Kea became a standalone server and the BIND10 framework was removed. The
+DHCPv6 server binary was renamed to kea-dhcp6 in July 2014.
+
+SEE ALSO
+========
+
+kea-dhcp4 8, kea-dhcp-ddns 8, kea-ctrl-agent 8, kea-admin 8, keactrl 8,
+kea-netconf 8, perfdhcp 8, kea-lfc 8, Kea Administrator's Guide.
diff --git a/src/bin/keactrl/keactrl.rst b/src/bin/keactrl/keactrl.rst
new file mode 100644 (file)
index 0000000..fb5b8d0
--- /dev/null
@@ -0,0 +1,121 @@
+keactrl
+8
+Kea
+keactrl
+Shell script for managing Kea
+2014-2018
+Internet Systems Consortium, Inc. ("ISC")
+keactrl
+command
+-c
+keactrl-config-file
+-s
+server[,server,...]
+-v
+DESCRIPTION
+===========
+
+keactrl is a shell script which controls the startup, shutdown and
+reconfiguration of the Kea servers (``kea-dhcp4``, ``kea-dhcp6``,
+``kea-dhcp-ddns``, ``kea-ctrl-agent`` and ``kea-netconf``). It also
+provides the means for checking the current status of the servers and
+determining the configuration files in use.
+
+CONFIGURATION FILE
+==================
+
+Depending on requirements, not all of the available servers need be run.
+The keactrl configuration file sets which servers are enabled and which
+are disabled. By default the configuration file is
+``[kea-install-dir]/etc/kea/keactrl.conf``.
+
+See the Kea Administrator's Guide for the documentation of the
+parameters in the ``keactrl`` configuration file.
+
+OPTIONS
+=======
+
+``command``
+   Command to be issued to the servers. It can be one of the following:
+
+   start
+      Start the servers.
+
+   stop
+      Stop the servers.
+
+   reload
+      Instructs the servers to re-read the kea configuration file. This
+      command is not supported by the Netconf agent.
+
+   status
+      Print the status of the servers.
+
+``-c|--ctrl-config keactrl-config-file``
+   Specify the ``keactrl`` configuration file. Without this switch, the
+   ``keactrl`` will attempt to use the file
+   ``[kea-install-dir]/etc/kea/keactrl.conf``.
+
+``-s|--server server[,server,...]``
+   Specifies a subset of the enabled servers to which the command should
+   be issued. The list of servers should be separated by commas with no
+   intervening spaces. Acceptable values are:
+
+   dhcp4
+      DHCPv4 server (``kea-dhcp4``).
+
+   dhcp6
+      DHCPv6 server (``kea-dhcp6``).
+
+   dhcp_ddns
+      DHCP DDNS server (``kea-dhcp-ddns``).
+
+   ctrl_agent
+      Control Agent (``kea-ctrl-agent``).
+
+   netconf
+      Netconf agent (``kea-netconf``).
+
+   all
+      All servers (default) including Netconf if it was configured to be
+      built.
+
+``-v|--version``
+   Prints keactrl version and quits.
+
+DOCUMENTATION
+=============
+
+Kea comes with an extensive Kea User's Guide documentation that covers
+all aspects of running the Kea software - compilation, installation,
+configuration, configuration examples and many more. Kea also features a
+Kea Messages Manual, which lists all possible messages Kea can print
+with a brief description for each of them. Both documents are typically
+available in various formats (txt, html, pdf) with your Kea
+distribution. The Kea documentation is available at
+https://kb.isc.org/docs/kea-administrator-reference-manual .
+
+Kea source code is documented in the Kea Developer's Guide. Its on-line
+version is available at https://jenkins.isc.org/job/Kea_doc/doxygen/.
+
+The Kea project website is available at: https://kea.isc.org.
+
+MAILING LISTS AND SUPPORT
+=========================
+
+There are two mailing lists available for Kea project. kea-users
+(kea-users at lists.isc.org) is intended for Kea users, while kea-dev
+(kea-dev at lists.isc.org) is intended for Kea developers, prospective
+contributors and other advanced users. Both lists are available at
+http://lists.isc.org. The community provides best effort type of support
+on both of those lists.
+
+ISC provides professional support for Kea services. See
+https://www.isc.org/kea/ for details.
+
+SEE ALSO
+========
+
+kea-dhcp4 8, kea-dhcp6 8, kea-dhcp-ddns 8, kea-ctrl-agent 8, kea-netconf
+8, kea-admin 8, kea-netconf 8, perfdhcp 8, kea-lfc 8, Kea
+Administrator's Guide.
diff --git a/src/bin/lfc/kea-lfc.rst b/src/bin/lfc/kea-lfc.rst
new file mode 100644 (file)
index 0000000..1a99c24
--- /dev/null
@@ -0,0 +1,138 @@
+kea-lfc
+8
+Kea
+kea-lfc
+Lease File Cleanup process in Kea
+2015-2018
+Internet Systems Consortium, Inc. ("ISC")
+kea-lfc
+-4|-6
+-c
+config-file
+-p
+pid-file
+-x
+previous-file
+-i
+copy-file
+-o
+output-file
+-f
+finish-file
+-v
+-V
+-W
+-d
+-h
+DESCRIPTION
+===========
+
+The ``kea-lfc`` service process removes redundant information from the
+files used to provide persistent storage for the memfile data base
+backend. The service is written to run as a stand alone process. While
+it can be started externally, there is usually no need to do this. It
+will be run on a periodic basis by the Kea DHCP servers.
+
+ARGUMENTS
+=========
+
+The arguments are as follows:
+
+``-d``
+   Verbose mode sets the logging level to debug. This is primarily for
+   development purposes in stand-alone mode.
+
+``-v``
+   version causes the version stamp to be printed.
+
+``-V``
+   Version causes a longer form of the version stamp to be printed.
+
+``-W``
+   Display the configuration report.
+
+``-h``
+   Help causes the usage string to be printed.
+
+``-4 | -6``
+   The protocol version of the lease files, must be one of 4 or 6.
+
+``-c``
+   Configuration file including the configuration for ``kea-lfc``
+   process. It may also contain configuration entries for other Kea
+   services. Currently ``kea-lfc`` gets all of its arguments from the
+   command line, in the future it will be extended to get some arguments
+   from the config file.
+
+``-p``
+   PID file - When the ``kea-lfc`` process starts it attempts to
+   determine if another instance of the process is already running by
+   examining the pid file. If one is already running the new process is
+   terminated. If one isn't running it writes its pid into the pid file.
+
+``-x``
+   Previous or ex lease file - When ``kea-lfc`` starts this is the
+   result of any previous run of ``kea-lfc``. When ``kea-lfc`` finishes
+   it is the result of this run. If ``kea-lfc`` is interrupted before
+   completing, this file may not exist.
+
+``-i``
+   Input or copy of lease file - Before the DHCP server invokes
+   ``kea-lfc`` it will move the current lease file here and then call
+   ``kea-lfc`` with this file.
+
+``-o``
+   Output lease file - The temporary file ``kea-lfc`` should use to
+   write the leases. Upon completion of writing this this file it will
+   be moved to the finish file (see below).
+
+``-f``
+   Finish or completion file - Another temporary file ``kea-lfc`` uses
+   for bookkeeping. When ``kea-lfc`` completes writing the output file
+   it moves it to this file name. After ``kea-lfc`` finishes deleting
+   the other files (previous and input) it moves this file to previous
+   lease file. By moving the files in this fashion the ``kea-lfc`` and
+   the DHCP server processes can determine the correct file to use even
+   if one of the processes was interrupted before completing its task.
+
+DOCUMENTATION
+=============
+
+Kea comes with an extensive Kea User's Guide documentation that covers
+all aspects of running the Kea software - compilation, installation,
+configuration, configuration examples and many more. Kea also features a
+Kea Messages Manual, which lists all possible messages Kea can print
+with a brief description for each of them. Both documents are typically
+available in various formats (txt, html, pdf) with your Kea
+distribution. The Kea documentation is available at
+https://kb.isc.org/docs/kea-administrator-reference-manual .
+
+Kea source code is documented in the Kea Developer's Guide. Its on-line
+version is available at https://jenkins.isc.org/job/Kea_doc/doxygen/.
+
+Kea project website is available at: https://kea.isc.org.
+
+MAILING LISTS AND SUPPORT
+=========================
+
+There are two mailing lists available for Kea project. kea-users
+(kea-users at lists.isc.org) is intended for Kea users, while kea-dev
+(kea-dev at lists.isc.org) is intended for Kea developers, prospective
+contributors and other advanced users. Both lists are available at
+http://lists.isc.org. The community provides best effort type of support
+on both of those lists.
+
+ISC provides professional support for Kea services. See
+https://www.isc.org/kea/ for details.
+
+HISTORY
+=======
+
+The ``kea-lfc`` process was first coded in January 2015 by the ISC
+Kea/DHCP team.
+
+SEE ALSO
+========
+
+kea-dhcp4 8, kea-dhcp6 8, kea-dhcp-ddns 8, kea-ctrl-agent 8, kea-admin
+8, kea-netconf 8, keactrl 8, perfdhcp 8, Kea Administrator's Guide.
diff --git a/src/bin/netconf/kea-netconf.rst b/src/bin/netconf/kea-netconf.rst
new file mode 100644 (file)
index 0000000..9ab690c
--- /dev/null
@@ -0,0 +1,92 @@
+kea-netconf
+8
+Kea
+kea-netconf
+NETCONF agent for Kea environment
+2018
+Internet Systems Consortium, Inc. ("ISC")
+kea-netconf
+-v
+-V
+-W
+-d
+-c
+config-file
+-t
+config-file
+DESCRIPTION
+===========
+
+The ``kea-netconf`` agent provides a YANG/NETCONF interface for the Kea
+environment.
+
+ARGUMENTS
+=========
+
+The arguments are as follows:
+
+``-v``
+   Display the version.
+
+``-V``
+   Display the extended version.
+
+``-W``
+   Display the configuration report.
+
+``-d``
+   Enable the debug mode with extra verbosity.
+
+``-c``
+   Configuration file including the configuration for NETCONF agent.
+
+``-t``
+   Check the syntax of the configuration file and report the first error
+   if any. Note that not all parameters are completely checked, in
+   particular, service and client sockets are not opened, and hook
+   libraries are not loaded.
+
+DOCUMENTATION
+=============
+
+Kea comes with an extensive Kea User's Guide documentation that covers
+all aspects of running the Kea software - compilation, installation,
+configuration, configuration examples and many more. Kea also features a
+Kea Messages Manual, which lists all possible messages Kea can print
+with a brief description for each of them. Both documents are typically
+available in various formats (txt, html, pdf) with your Kea
+distribution. The Kea documentation is available at
+https://kb.isc.org/docs/kea-administrator-reference-manual .
+
+Kea source code is documented in the Kea Developer's Guide. Its on-line
+version is available at https://jenkins.isc.org/job/Kea_doc/doxygen/.
+
+Kea project website is available at:
+https://gitlab.isc.org/isc-projects/kea.
+
+MAILING LISTS AND SUPPORT
+=========================
+
+There are two mailing lists available for Kea project. kea-users
+(kea-users at lists.isc.org) is intended for Kea users, while kea-dev
+(kea-dev at lists.isc.org) is intended for Kea developers, prospective
+contributors and other advanced users. Both lists are available at
+http://lists.isc.org. The community provides best effort type of support
+on both of those lists.
+
+ISC provides professional support for Kea services. See
+https://www.isc.org/kea/ for details.
+
+HISTORY
+=======
+
+Early prototypes of kea-netconf implementation were written during IETF
+Hackathons in Berlin, London and Montreal. An actual production ready
+implementation was started in August 2018 by Tomek Mrugalski and Francis
+Dupont.
+
+SEE ALSO
+========
+
+kea-dhcp4 8, kea-dhcp6 8, kea-dhcp-ddns 8, kea-ctrl-agent 8, kea-admin
+8, keactrl 8, perfdhcp 8, kea-lfc 8, Kea Administrator's Guide.
diff --git a/src/bin/perfdhcp/perfdhcp.rst b/src/bin/perfdhcp/perfdhcp.rst
new file mode 100644 (file)
index 0000000..90150b3
--- /dev/null
@@ -0,0 +1,504 @@
+perfdhcp
+8
+Kea
+perfdhcp
+DHCP benchmarking tool
+2016-2018
+Internet Systems Consortium, Inc. ("ISC")
+perfdhcp
+-1
+-4|-6
+-A
+encapsulation-level
+-b
+base
+-B
+-c
+-d
+drop-time
+-D
+max-drop
+-e
+lease-type
+-E
+time-offset
+-f
+renew-rate
+-F
+release-rate
+-g
+thread-mode
+-h
+-i
+-I
+ip-offset
+-l
+local-address|interface
+-L
+local-port
+-M
+mac-list-file
+-n
+num-request
+-N
+remote-port
+-O
+random-offset
+-o
+code,hexstring
+-p
+test-period
+-P
+preload
+-r
+rate
+-R
+num-clients
+-s
+seed
+-S
+srvid-offset
+-t
+report
+-T
+template-file
+-v
+-W
+exit-wait-time
+-w
+wrapped
+-x
+diagnostic-selector
+-X
+xid-offset
+server
+DESCRIPTION
+===========
+
+``perfdhcp`` is a DHCP benchmarking tool. It provides a way of measuring
+the performance of DHCP servers by generating large amounts of traffic
+from simulated multiple clients. It is able to test both IPv4 and IPv6
+servers, and provides statistics concerning response times and the
+number of requests that are dropped.
+
+By default, tests are run using the full four-packet exchange sequence
+(DORA for DHCPv4, SARR for DHCPv6). An option is provided to run tests
+using the initial two-packet exchange (DO and SA) instead. It is also
+possible to configure perfdhcp to send DHCPv6 RENEW and RELEASE messages
+at a specified rate in parallel with the DHCPv6 four-way exchanges.
+
+When running a performance test, ``perfdhcp`` will exchange packets with
+the server under test as fast as possible unless the ``-r`` is given to
+limit the request rate. The length of the test can be limited by setting
+a threshold on any or all of the number of requests made by
+``perfdhcp``, the elapsed time, or the number of requests dropped by the
+server.
+
+TEMPLATES
+=========
+
+To allow the contents of packets sent to the server to be customized,
+``perfdhcp`` allows the specification of template files that determine
+the contents of the packets. For example, the customized packet may
+contain a DHCPv6 ORO to request a set of options to be returned by the
+server, or it may contain the Client FQDN option to request that server
+performs DNS updates. This may be used to discover performance
+bottlenecks for different server configurations (e.g. DDNS enabled or
+disabled).
+
+Up to two template files can be specified on the command line, each file
+representing the contents of a particular type of packet, the type being
+determined by the test being carried out. For example, if testing
+DHCPv6:
+
+-  With no template files specified on the command line, ``perfdhcp``
+   will generate both SOLICIT and REQUEST packets.
+
+-  With one template file specified, that file will be used as the
+   pattern for SOLICIT packets: ``perfdhcp`` will generate the REQUEST
+   packets.
+
+-  With two template files given on the command line, the first will be
+   used as the pattern for SOLICIT packets, the second as the pattern
+   for REQUEST packets.
+
+(Similar determination applies to DHCPv4's DISCOVER and REQUEST
+packets.)
+
+The template file holds the DHCP packet represented as a stream of ASCII
+hexadecimal digits and it excludes any IP/UDP stack headers. The
+template file must not contain any characters other than hexadecimal
+digits and spaces. Spaces are discarded when the template file is parsed
+(so in the file, '12B4' is the same as '12 B4' which is the same as '1 2
+B 4')
+
+The template files should be used in conjunction with the command line
+parameters which specify offsets of the data fields being modified in
+outbound packets. For example, the ``-E
+            time-offset`` switch specifies the offset of the DHCPv6
+Elapsed Time option in the packet template. If the offset is specified,
+perfdhcp will inject the current elapsed time value into this field
+before sending the packet to the server.
+
+In many scenarios, ``perfdhcp`` needs to simulate multiple clients
+(having unique client identifier). Since packets for each client are
+generated from the same template file, it is necessary to randomize the
+client identifier (or HW address in DHCPv4) in the packet created from
+it. The ``-O
+            random-offset`` option allows specification of the offset in
+the template where randomization should be performed. It is important to
+note that this offset points to the end (not the beginning) of the
+client identifier (or HW address field). The number of bytes being
+randomized depends on the number of simulated clients. If the number of
+simulated clients is between 1 and 255, only one byte (to which
+randomization offset points) will be randomized. If the number of
+simulated clients is between 256 and 65535, two bytes will be
+randomized. Note, that two last bytes of the client identifier will be
+randomized in this case: the byte which randomization offset parameter
+points to, and the one which precedes it (random-offset - 1). If the
+number of simulated clients exceeds 65535, three bytes will be
+randomized; and so on.
+
+Templates may be currently used to generate packets being sent to the
+server in 4-way exchanges, i.e. SOLICIT, REQUEST (DHCPv6) and DISCOVER,
+REQUEST (DHCPv4). They cannot be used when RENEW or RELEASE packets are
+being sent.
+
+OPTIONS
+=======
+
+``-1``
+   Take the server-ID option from the first received message.
+
+``-4``
+   DHCPv4 operation; this is the default. It is incompatible with the
+   ``-6`` option.
+
+``-6``
+   DHCPv6 operation. This is incompatible with the ``-4`` option.
+
+``-b basetype=value``
+   The base MAC or DUID used to simulate different clients. The basetype
+   may be "mac" or "duid". (The keyword "ether" may alternatively used
+   for MAC.) The ``-b`` option can be specified multiple times. The MAC
+   address must consist of six octets separated by single (:) or double
+   (::) colons, for example: mac=00:0c:01:02:03:04. The DUID value is a
+   hexadecimal string: it must be at least six octets long and must not
+   be longer than 64 bytes and the length must be less than 128
+   hexadecimal digits, for example: duid=0101010101010101010110111F14.
+
+``-d drop-time``
+   Specify the time after which a request is treated as having been
+   lost. The value is given in seconds and may contain a fractional
+   component. The default is 1 second.
+
+``-e lease-type``
+   Specifies the type of lease being requested from the server. It may
+   be one of the following:
+
+   address-only
+      Only regular addresses (v4 or v6) will be requested.
+
+   prefix-only
+      Only IPv6 prefixes will be requested.
+
+   address-and-prefix
+      Both IPv6 addresses and prefixes will be requested.
+
+   The ``-e prefix-only`` and ``-e
+                           address-and-prefix`` forms may not be used
+   with the ``-4`` option.
+
+``-f renew-rate``
+   Rate at which DHCPv4 or DHCPv6 renew requests are sent to a server.
+   This value is only valid when used in conjunction with the exchange
+   rate (given by ``-r rate``). Furthermore the sum of this value and
+   the release-rate (given by ``-F 
+                       rate``) must be equal to or less than the
+   exchange rate.
+
+``-g thread-mode``
+   thread-mode can be either 'single' or 'multi'. In multi-thread mode
+   packets are received in separate thread. This allows better
+   utilisation of CPUs. In single CPU system it is better to run in 1
+   thread to avoid blocking of threads each other. If more than 1 CPU is
+   present in the system then multi-thread mode is default otherwise
+   single-thread is default.
+
+``-h``
+   Print help and exit.
+
+``-i``
+   Do only the initial part of the exchange: DISCOVER-OFFER if ``-4`` is
+   selected, SOLICIT-ADVERTISE if ``-6`` is chosen.
+
+   ``-i`` is incompatible with the following options: ``-1``, ``-d``,
+   ``-D``, ``-E``, ``-S``, ``-I`` and ``-F``. In addition, it cannot be
+   used with multiple instances of ``-O``, ``-T`` and ``-X``.
+
+``-l local-addr|interface``
+   For DHCPv4 operation, specify the local hostname/address to use when
+   communicating with the server. By default, the interface address
+   through which traffic would normally be routed to the server is used.
+   For DHCPv6 operation, specify the name of the network interface
+   through which exchanges are initiated.
+
+``-L local-port``
+   Specify the local port to use. This must be zero or a positive
+   integer up to 65535. A value of 0 (the default) allows ``perfdhcp``
+   to choose its own port.
+
+``-M mac-list-file``
+   A text file containing a list of MAC addresses, one per line. If
+   provided, a MAC address will be chosen randomly from this list for
+   every new exchange. In the DHCPv6 case, MAC addresses are used to
+   generate DUID-LLs. This parameter must not be used in conjunction
+   with the -b parameter.
+
+``-N remote-port``
+   Specify the remote port to use. This must be zero or a positive
+   integer up to 65535. A value of 0 (the default) allows ``perfdhcp``
+   to choose the standard service port.
+
+``-o code,hexstring``
+   This forces perfdhcp to insert specified extra option (or options if
+   used several times) into packets being transmitted. The code
+   specifies option code and the hexstring is a hexadecimal string that
+   defines the content of the option. Care should be taken as perfdhcp
+   does not offer any kind of logic behind those options. They're simply
+   inserted into packets being sent as is. Be careful not to insert
+   options that are already inserted. For example, to insert client
+   class identifier (option code 60) with a string 'docsis', you can use
+   -o 60,646f63736973. The ``-o`` may be used multiple times. It is
+   necessary to specify protocol family (either ``-4`` or ``-6``) before
+   using ``-o``.
+
+``-P preload``
+   Initiate preload exchanges back to back at startup. preload must be 0
+   (the default) or a positive integer.
+
+``-r rate``
+   Initiate rate DORA/SARR (or if ``-i`` is given, DO/SA) exchanges per
+   second. A periodic report is generated showing the number of
+   exchanges which were not completed, as well as the average response
+   latency. The program continues until interrupted, at which point a
+   final report is generated.
+
+``-R num-clients``
+   Specify how many different clients are used. With a value of 1 (the
+   default), all requests seem to come from the same client. num-clients
+   must be a positive number.
+
+``-s seed``
+   Specify the seed for randomization, making runs of ``perfdhcp``
+   repeatable. seed is 0 or a positive integer. The value 0 means that a
+   seed is not used; this is the default.
+
+``-T template-file``
+   The name of a file containing the template to use as a stream of
+   hexadecimal digits. This may be specified up to two times and
+   controls the contents of the packets sent (see the "TEMPLATES"
+   section above).
+
+``-v``
+   Print the version of this program.
+
+``-W exit-wait-time``
+   Specifies exit-wait-time parameter, that makes perfdhcp wait for
+   exit-wait-time us after an exit condition has been met to receive all
+   packets without sending any new packets. Expressed in microseconds.
+   If not specified, 0 is used (i.e. exit immediately after exit
+   conditions are met).
+
+``-w wrapped``
+   Command to call with a single parameter of "start" or "stop" at the
+   beginning/end of the program.
+
+``-x diagnostic-selector``
+   Include extended diagnostics in the output. diagnostic-selector is a
+   string of single-keywords specifying the operations for which verbose
+   output is desired. The selector key letters are:
+
+   a
+      Print the decoded command line arguments.
+
+   e
+      Print the exit reason.
+
+   i
+      Print rate processing details.
+
+   s
+      Print the first server-ID.
+
+   t
+      When finished, print timers of all successful exchanges.
+
+   T
+      When finished, print templates
+
+DHCPv4-Only Options
+-------------------
+
+The following options only apply for DHCPv4 (i.e. when ``-4`` is given).
+
+``-B``
+   Force broadcast handling.
+
+DHCPv6-Only Options
+-------------------
+
+The following options only apply for DHCPv6 (i.e. when ``-6`` is given).
+
+``-c``
+   Add a rapid commit option (exchanges will be SOLICIT-ADVERTISE).
+
+``-F release-rate``
+   Rate at which IPv6 RELEASE requests are sent to a server. This value
+   is only valid when used in conjunction with the exchange rate (given
+   by ``-r rate``). Furthermore the sum of this value and the renew-rate
+   (given by ``-f rate``) must be equal to or less than the exchange
+   rate.
+
+``-A encapsulation-level``
+   Specifies that relayed traffic must be generated. The argument
+   specifies the level of encapsulation, i.e. how many relay agents are
+   simulated. Currently the only supported encapsulation-level value is
+   1, which means that the generated traffic is an equivalent of the
+   traffic passing through a single relay agent.
+
+Template-Related Options
+------------------------
+
+The following options may only be used in conjunction with ``-T`` and
+control how ``perfdhcp`` modifies the template. The options may be
+specified multiple times on the command line; each occurrence affects
+the corresponding template file (see "TEMPLATES" above).
+
+-E
+time-offset
+Offset of the (DHCPv4) secs field or (DHCPv6) elapsed-time option in the
+(second i.e. REQUEST) template and must be 0 or a positive integer: a
+value of 0 disables this.
+
+-I
+ip-offset
+Offset of the (DHCPv4) IP address in the requested-IP option / (DHCPv6)
+IA_NA option in the (second/request) template.
+
+-O
+random-offset
+Offset of the last octet to randomize in the template. random-offset
+must be an integer greater than 3. The ``-T`` switch must be given to
+use this option.
+
+-S
+srvid-offset
+Offset of the server-ID option in the (second/request) template.
+srvid-offset must be a positive integer, and the switch can only be used
+when the template option (``-T``) is also given.
+
+-X
+xid-offset
+Offset of the transaction ID (xid) in the template. xid-offset must be a
+positive integer, and the switch can only be used when the template
+option (``-T``) is also given.
+
+Options Controlling a Test
+--------------------------
+
+``-D max-drop``
+   Abort the test immediately if max-drop requests have been dropped.
+   Use ``-D
+                               0`` to abort if even a single request has
+   been dropped. max-drop must be a positive integer. If max-drop
+   includes the suffix '%', it specifies a maximum percentage of
+   requests that may be dropped before abort. In this case, testing of
+   the threshold begins after 10 requests have been expected to be
+   received.
+
+``-n num-requests``
+   Initiate num-request transactions. No report is generated until all
+   transactions have been initiated/waited-for, after which a report is
+   generated and the program terminates.
+
+``-p test-period``
+   Send requests for test-period, which is specified in the same manner
+   as ``-d``. This can be used as an alternative to ``-n``, or both
+   options can be given, in which case the testing is completed when
+   either limit is reached.
+
+``-t interval``
+   Sets the delay (in seconds) between two successive reports.
+
+Arguments
+---------
+
+server
+   Server to test, specified as an IP address. In the DHCPv6 case, the
+   special name 'all' can be used to refer to
+   All_DHCP_Relay_Agents_and_Servers (the multicast address FF02::1:2),
+   or the special name 'servers' to refer to All_DHCP_Servers (the
+   multicast address FF05::1:3). The server is mandatory except where
+   the ``-l`` option is given to specify an interface, in which case it
+   defaults to 'all'.
+
+ERRORS
+======
+
+``perfdhcp`` can report the following errors in the packet exchange:
+
+tooshort
+   A message was received that was too short.
+
+orphans
+   Received a message which doesn't match one sent to the server (i.e.
+   it is a duplicate message, a message that has arrived after an
+   excessive delay, or one that is just not recognized).
+
+locallimit
+   Reached local system limits when sending a message.
+
+EXIT STATUS
+===========
+
+``perfdhcp`` can exit with one of the following status codes:
+
+0
+   Success.
+
+1
+   General error.
+
+2
+   Error in command-line arguments.
+
+3
+   No general failures in operation, but one or more exchanges were
+   unsuccessful.
+
+MAILING LISTS AND SUPPORT
+=========================
+
+There are two mailing lists available for Kea project. kea-users
+(kea-users at lists.isc.org) is intended for Kea users, while kea-dev
+(kea-dev at lists.isc.org) is intended for Kea developers, prospective
+contributors and other advanced users. Both lists are available at
+http://lists.isc.org. The community provides best effort type of support
+on both of those lists.
+
+ISC provides professional support for Kea services. See
+https://www.isc.org/kea/ for details.
+
+HISTORY
+=======
+
+The ``perfdhcp`` tool was initially coded in October 2011 by John
+DuBois, Francis Dupont and Marcin Siodelski of ISC. Kea 1.0.0 that
+included perfdhcp was released in December 2015.
+
+SEE ALSO
+========
+
+kea-dhcp4 8, kea-dhcp6 8, kea-dhcp-ddns 8, kea-ctrl-agent 8, kea-admin
+8, kea-netconf 8, keactrl 8, kea-lfc 8, Kea Administrator's Guide.
diff --git a/src/bin/shell/kea-shell.rst b/src/bin/shell/kea-shell.rst
new file mode 100644 (file)
index 0000000..51c9f2c
--- /dev/null
@@ -0,0 +1,103 @@
+kea-shell
+8
+Kea
+kea-shell
+Text client for Control Agent process
+2017-2018
+Internet Systems Consortium, Inc. ("ISC")
+kea-shell
+-h
+-v
+--host
+--port
+--path
+--timeout
+--service
+command
+DESCRIPTION
+===========
+
+The ``kea-shell`` provides a REST client for the Kea Control Agent (CA).
+It takes command as a command-line parameter that is being sent to CA
+with proper JSON encapsulation. Optional arguments may be specified on
+the standard input. The request it sent of HTTP and a response is
+retrieved. That response is displayed out on the standard output.
+
+ARGUMENTS
+=========
+
+The arguments are as follows:
+
+``-h``
+   Displays help regarding command line parameters.
+
+``-v``
+   Display the version.
+
+``--host``
+   Specifies the host to connect to. Control Agent must be running at
+   specified host. If not specified, 127.0.0.1 is used.
+
+``--port``
+   Specifies the TCP port to connect to. Control Agent must be listening
+   at specified port. If not specified, 8000 is used.
+
+``--path``
+   Specifies the path in the URL to connect to. If not specified, empty
+   path is used. As Control Agent listens at the empty path this
+   parameter is useful only with a reverse proxy.
+
+``--timeout``
+   Specifies the connection timeout in seconds. If not specified, 10
+   (seconds) is used.
+
+``--service``
+   Specifies the service that is the target of a command. If not
+   specified, Control Agent will be targeted. May be used more than once
+   to specify multiple targets.
+
+``command``
+   Specifies the command to be sent to CA. If not specified,
+   "list-commands" is used.
+
+DOCUMENTATION
+=============
+
+Kea comes with an extensive Kea User's Guide documentation that covers
+all aspects of running the Kea software - compilation, installation,
+configuration, configuration examples and many more. Kea also features a
+Kea Messages Manual, which lists all possible messages Kea can print
+with a brief description for each of them. Both documents are typically
+available in various formats (txt, html, pdf) with your Kea
+distribution. The Kea documentation is available at
+https://kb.isc.org/docs/kea-administrator-reference-manual .
+
+Kea source code is documented in the Kea Developer's Guide. Its on-line
+version is available at https://jenkins.isc.org/job/Kea_doc/doxygen/.
+
+Kea project website is available at:
+https://gitlab.isc.org/isc-projects/kea.
+
+MAILING LISTS AND SUPPORT
+=========================
+
+There are two mailing lists available for Kea project. kea-users
+(kea-users at lists.isc.org) is intended for Kea users, while kea-dev
+(kea-dev at lists.isc.org) is intended for Kea developers, prospective
+contributors and other advanced users. Both lists are available at
+http://lists.isc.org. The community provides best effort type of support
+on both of those lists.
+
+ISC provides professional support for Kea services. See
+https://www.isc.org/kea/ for details.
+
+HISTORY
+=======
+
+The ``kea-shell`` was first coded in March 2017 by Tomek Mrugalski.
+
+SEE ALSO
+========
+
+kea-ctrl-agent 8, kea-dhcp4 8, kea-dhcp6 8, kea-dhcp-ddns 8, kea-admin
+8, keactrl 8, perfdhcp 8, kea-lfc 8, Kea Administrator's Guide.