]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3232] Reference the new anchors wherever possible
authorAndrei Pavel <andrei@isc.org>
Fri, 12 Jun 2026 08:35:47 +0000 (11:35 +0300)
committerAndrei Pavel <andrei@isc.org>
Wed, 17 Jun 2026 10:09:30 +0000 (13:09 +0300)
doc/sphinx/arm/dhcp4-srv.rst
doc/sphinx/arm/dhcp6-srv.rst
doc/sphinx/arm/ext-netconf.rst
doc/sphinx/arm/ext-radius.rst
doc/sphinx/arm/hooks-rbac.rst

index 6e355c13d846204fbace34ab5ca2ff1fe01c3af2..60db306c2e48ad5fc407bccdff17dfeecb17ae8f 100644 (file)
@@ -2105,6 +2105,8 @@ types are given in :ref:`dhcp-types`.
    | v4-access-domain                       | 213  | fqdn                      | false       | false       |
    +----------------------------------------+------+---------------------------+-------------+-------------+
 
+You can see example of how these options are configured at :ref:`config-example-kea4-all-options-json`.
+
 .. note::
 
   The ``default-url`` option was replaced with ``v4-captive-portal`` in Kea 2.1.2, as introduced by
@@ -2953,8 +2955,8 @@ for the suboptions that will be included in the ``vivso-suboptions`` option (cod
 Another possibility is to redefine the option; see :ref:`dhcp4-private-opts`.
 
 Kea comes with several example configuration files. Some of them showcase
-how to configure options 60 and 43. See ``doc/examples/kea4/vendor-specific.json``
-and ``doc/examples/kea4/vivso.json`` in the Kea sources.
+how to configure options 60 and 43. See :ref:`config-example-kea4-vendor-specific-json`
+and :ref:`config-example-kea4-vivso-json`.
 
 .. note::
 
@@ -5011,8 +5013,8 @@ Example usage:
    protocol, to separate them. The "pipe" (``0x7C``) character can be used in the ``dohpath`` service parameter,
    as it is allowed in a URI.
 
-Examples for DNR DHCPv4 options are provided in the Kea sources, in
-`all-options.json` in the `doc/examples/kea4` directory.
+Examples for DNR DHCPv4 options are provided in the Kea sources can be found
+at :ref:`config-example-kea4-all-options-json`.
 
 
 .. _host-reservation-v4:
index b2fa5c07b4be18c94fb87a523c7db85ad1b5869f..39476f6bb7eaf6afdcf0e13a56e5dc052bf5fcc4 100644 (file)
@@ -1906,6 +1906,8 @@ types are given in :ref:`dhcp-types`.
    | addr-reg-enable          | 148             | empty           | false           |
    +--------------------------+-----------------+-----------------+-----------------+
 
+You can see example of how these options can be configured at :ref:`config-example-kea6-all-options-json`.
+
 The unicast option was deprecated by the `RFC 9915
 <https://datatracker.ietf.org/doc/html/rfc9915>`__, it is still
 supported but not be used and will be removed in a further Kea release.
@@ -2292,9 +2294,8 @@ Kea currently supports the following service parameters:
 The other currently defined service parameters mandatory (0), no-default-alpn (2), ipv4hint (4), ech (5),
 ipv6hint (6), and ohttp (8) are not usable in the DNR option.
 
-Further examples are provided in Kea sources in the ``all-options.json`` file
-in the ``doc/examples/kea6`` directory. The DHCPv4 option is nearly identical, and is described
-in :ref:`dnr4-options`.
+Further examples can be found at :ref:`config-example-kea6-all-options-json`.
+The DHCPv4 option is nearly identical, and is described in :ref:`dnr4-options`.
 
 .. _ntp-server-suboptions:
 
index 46879a97a379a6ff0edd45ff1efd4f6f1b176a82..7e95c119826a3c590b753cb11269744e2c1cf707 100644 (file)
@@ -714,7 +714,7 @@ DHCPv6 server:
     }
 
 In order to launch the Kea DHCPv6 server using the configuration
-contained within the ``boot.json`` file, run:
+contained within the :ref:`config-example-netconf-kea-dhcp6-operations-boot-json` file, run:
 
 .. code-block:: console
 
@@ -727,7 +727,7 @@ socket by running:
 
     # echo '{ "command": "config-get" }' | socat UNIX:/opt/kea/var/run/kea/kea-dhcp6-ctrl.sock '-,ignoreeof'
 
-The following is the example ``netconf.json`` configuration for
+The following is the example :ref:`config-example-netconf-kea-dhcp6-operations-netconf-json` configuration for:
 :iscman:`kea-netconf`, to manage the Kea DHCPv6 server:
 
 .. code-block:: json
index eb840485d45d5533f75edc2274356f1fb5a4cc8c..e4288c6b015fd4c217717338753f2fd5d2a6e437 100644 (file)
@@ -123,8 +123,7 @@ takes many parameters. For example, this configuration can be used:
 RADIUS is a complicated environment. As such, it is not feasible
 to provide a default configuration that works for everyone.
 However, we do have an example that showcases some of the more common
-features; please see ``doc/examples/kea4/hooks-radius.json`` in the Kea
-sources.
+features; please see :ref:`config-example-kea4-hooks-radius-json`.
 
 The RADIUS hook library supports the following global configuration
 flags:
index c1ad976a7d2430d12cba079284011f2496e851b5..5e1b08b210001de4402e9f2d347aacdb4d42ba0d 100644 (file)
@@ -228,118 +228,11 @@ The global parameters are:
 -  ``unknown-role``: the configuration of the unknown role
    (used when the not-empty assigned role has no configuration).
 
-Sample Configuration
-~~~~~~~~~~~~~~~~~~~~
+Sample Configurations
+~~~~~~~~~~~~~~~~~~~~~
 
-A sample configuration is available in ``doc/examples/kea4/hooks-rbac.json``
-in the Kea source and is copied below.
-
-.. code-block:: javascript
-   :linenos:
-   :emphasize-lines: 41-95
-
-    {"Dhcp4":
-
-    {
-    // Kea is told to listen on the eth0 interface only.
-      "interfaces-config": {
-        "interfaces": [ "eth0" ]
-      },
-
-    // Set up the storage for leases.
-      "lease-database": {
-        "type": "memfile"
-      },
-
-      "valid-lifetime": 1800,
-
-    // Define a single subnet.
-      "subnet4": [
-        {
-          "pools": [ { "pool": "192.0.2.1 - 192.0.2.200" } ],
-          "id": 1,
-          "subnet": "192.0.2.0/24",
-          "interface": "eth0"
-        }
-      ],
-
-    // Control sockets.
-      "control-sockets": [
-        {
-          "socket-type": "https",
-          "socket-address": "127.0.0.1",
-          "socket-port": 8000,
-          "trust-anchor": "my-ca",
-          "cert-file": "my-cert",
-          "key-file": "my-key",
-          "cert-required": true
-        }
-      ],
-
-    // Add hooks here.
-      "hooks-libraries": [
-        {
-          "library": "libdhcp_rbac.so",
-          "parameters": {
-              // This section configures the RBAC hook library.
-              // Mandatory parameters.
-              "assign-role-method": "cert-subject",
-              "api-files": "/opt/share/kea/api",
-              // Optional parameters.
-              "require-tls": true,
-              "commands": [
-              {
-                  "name": "my-command",
-                  "access": "read",
-                  "hook": "my-hook"
-              } ],
-              "access-control-lists": [
-              {
-                  "my-none": { "not": "ALL" }
-              },{
-                  "another-none": { "and": [ "ALL", "NONE" ] }
-              },{
-                  "my-read": { "access": "read" }
-              } ],
-              "roles": [
-              {
-                  "name": "kea-client",
-                  "accept-commands":
-                  {
-                      "commands": [ "list-commands", "status-get" ]
-                  },
-                  "reject-commands": "NONE",
-                  "other-commands": "reject",
-                  "list-match-first": "accept",
-                  "response-filters": [ "list-commands" ]
-              },{
-                  "name": "admin",
-                  "accept-commands": "ALL",
-                  "reject-commands":
-                  {
-                      "hook": "cb_cmds"
-                  },
-                  "list-match-first": "reject"
-              } ],
-              "default-role":
-              {
-                  "accept-commands": "NONE",
-                  "reject-commands": "ALL"
-              },
-              "unknown-role":
-              {
-                  "accept-commands": "READ",
-                  "reject-commands": "WRITE"
-              }
-          }
-        }
-      ]
-
-      // Additional parameters, such as logging and others
-      // omitted for clarity.
-
-    }
-    }
+Sample configurations are available at :ref:`config-example-kea4-hooks-rbac-json`
+and :ref:`config-example-kea6-hooks-rbac-json`.
 
 
 Accept/Reject Algorithm