]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3141] json examples update
authorPiotrek Zadroga <piotrek@isc.org>
Tue, 20 Feb 2024 11:08:35 +0000 (12:08 +0100)
committerPiotrek Zadroga <piotrek@isc.org>
Fri, 23 Feb 2024 16:14:06 +0000 (17:14 +0100)
doc/examples/kea4/all-options.json
doc/examples/kea6/all-options.json

index 19694023d8f99e2b03c7e608582c4880deaaada1..00cbbdbfdfbd87cc8a8b2fa0d75691a518006d95 100644 (file)
       Note that "Addr Length", "IPv4 Address(es)", and "Service Parameters
       (SvcParams)" fields are not present if the ADN-only mode is used.
       */
-      // Type: uint16, uint16, uint8, FQDN, binary
+      // Type: internal
       {
-        // Only one DNR instance ADN only mode - IP address(es) and SvcParams are missing on purpose.
-        // For more detailed example with IP addresses and SvcParams included, please check dnr.json example.
+        // DNR option may be configured using convenient notation. DNR Instances must be delimited with pipe "|" char.
+        // For each DNR Instance comma delimited fields must be provided:
+        // - service priority (mandatory),
+        // - ADN (mandatory),
+        // - IP address/es (optional - if more than one - they must be space-separated)
+        // - SvcParams (optional - if more than one - they must be space-separated;
+        //   to provide more than one alpn-id separate them with double-backslash escaped comma like in the
+        //   example below).
+        // Note: whenever pipe "|" char needs to be used not as the delimiter, it must be escaped with
+        //       double backslash, like in case of escaped commas in alpn-ids list.
+        // Basing on the config, Kea will encode the option according to RFC9463.
         "code": 162,
         "name": "v4-dnr",
-        "data": "26, 1234, 23, example.some.host.org., " // please notice comma and space at the end put on purpose
-                                                         // this means empty last type of the record - binary type
+        "data": "1, resolver.example., 10.2.3.4 10.0.4.5, alpn=dot\\,doq\\,h2\\,h3 dohpath=/q{?dns} | 2, resolver.example., 10.0.5.6, alpn=dot port=8530 | 3, fooexp.resolver.example."
       },
 
       // Option codes 163-209 are unassigned.
index 01f7098848d4991e4a4d0a2a638af99f56f93381..57857dc47cc594c615dfb1f54b339311f4f4c57d 100644 (file)
          service parameters that are encoded following the rules in
          Section 2.2 of [RFC9460].
       */
-      // Type: uint16, uint16, FQDN, binary
-      {
-        // DNR ADN only mode - IP address(es) and SvcParams are missing on purpose.
-        // For more detailed example with IP addresses and SvcParams included, please check dnr.json example.
+      // Type: internal
+      {
+        // DNR option may be configured using convenient notation. Comma separated fields must be provided:
+        // - service priority (mandatory),
+        // - ADN (mandatory),
+        // - IP address/es (optional - if more than one - they must be space-separated)
+        // - SvcParams (optional - if more than one - they must be space-separated;
+        //   to provide more than one alpn-id separate them with double-backslash escaped comma like in the
+        //   example below).
+        // Basing on the config, Kea will encode the option according to RFC9463.
         "code": 144,
         "name": "v6-dnr",
-        "data": "1234, 23, example.some.host.org., " // please notice comma and space at the end put on purpose
-                                                     // this means empty last type of the record - binary type
+        "data": "100, resolver.example., 2001:db8::1 2001:db8::2, alpn=dot\\,h2\\,h3 port=8530 dohpath=/dns-query{?dns}"
       },
 
       // Option codes 145-65535 are unassigned.