]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5105] Added examples for escaped options.
authorTomek Mrugalski <tomasz@isc.org>
Wed, 1 Feb 2017 19:57:48 +0000 (20:57 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Wed, 1 Feb 2017 19:57:48 +0000 (20:57 +0100)
doc/examples/kea4/multiple-options.json
doc/examples/kea6/multiple-options.json

index 940c448547cf7e8365e8f6ac0dbb4ee716c80595..c5d284427de9c061cb0fff74259b19fef1aeb20c 100644 (file)
 #  "renew-timer": 1000,
 #  "rebind-timer": 2000,
 
-# Defining a subnet. There are 3 DHCP options returned to the
-# clients connected to this subnet. The first two options are
-# identified by the name. The third option is identified by the
-# option code.
+// Defining a subnet. There are 3 DHCP options returned to the
+// clients connected to this subnet. The first and third options are
+// identified by the name. The third option is identified by the
+// option code.
   "subnet4": [
     {
        "pools": [ { "pool":  "192.0.2.10 - 192.0.2.200" } ],
              "data": "192.0.2.1"
          },
          {
-             "code": 15,
-             "data": "example.org"
+             // String options that have a comma in their values need to have
+             // it escaped (i.e. each comma is predeced by a backslash). That's
+             // because commas are reserved for separating fields in compound
+             // options.
+             "name": "boot-file-name",
+             "data": "EST5EDT4\,M3.2.0/02:00\,M11.1.0/02:00"
          }
        ]
     } 
index b0d2cf1be3e1c701335594b6a761f481b03904ae..3677da4c29a5c8b5e616c70cb153b53d6fcd5576 100644 (file)
   "renew-timer": 1000,
   "rebind-timer": 2000,
 
-# Defining a subnet. There are 2 DHCP options returned to the
-# clients connected to this subnet. The first option is identified
-# by the name. The second option is identified by the code.
-# There are two address pools defined within this subnet. Pool
-# specific value for option 12 is defined for the pool:
-# 2001:db8:1::1 - 2001:db8:1::100. Clients obtaining an address
-# from this pool will be assigned option 12 with a value of
-# 3001:cafe::21. Clients belonging to this subnet but obtaining
-# addresses from the other pool, or the clients obtaining
-# stateless configuration will be assigned subnet specific value
-# of option 12, i.e. 2001:db8:1:0:ff00::1.
+// Defining a subnet. There are 3 DHCP options returned to the
+// clients connected to this subnet. The first option is identified
+// by the name. The second option is identified by the code.
+// There are two address pools defined within this subnet. Pool
+// specific value for option 12 is defined for the pool:
+// 2001:db8:1::1 - 2001:db8:1::100. Clients obtaining an address
+// from this pool will be assigned option 12 with a value of
+// 3001:cafe::21. Clients belonging to this subnet but obtaining
+// addresses from the other pool, or the clients obtaining
+// stateless configuration will be assigned subnet specific value
+// of option 12, i.e. 2001:db8:1:0:ff00::1.
   "subnet6": [
     {
       "option-data": [
         {
             "code": 12,
             "data": "2001:db8:1:0:ff00::1"
+        },
+        {
+            // String options that have a comma in their values need to have
+            // it escaped (i.e. each comma is predeced by a backslash). That's
+            // because commas are reserved for separating fields in compound
+            // options.
+            "name": "new-posix-timezone",
+            "data": "EST5EDT4\,M3.2.0/02:00\,M11.1.0/02:00"
         }
       ],
       "pools": [
@@ -62,7 +70,7 @@
             ]
         },
         {
-            "pool": "2001:db8:1::500 - 2001:db8:2::1000"
+            "pool": "2001:db8:1::500 - 2001:db8:1::1000"
         }
       ],
       "subnet": "2001:db8:1::/64",