{ # substring data expression # empty configs are not accepted by Kea "Dhcp4": { "valid-lifetime": 1800, "client-classes": [ # use substring in a reductible match /// match: substring(option dhcp.host-name, 0, 3) { "name": "reductible" }, /// subclass selector 'www' { "name": "sub#reductible#0", /// from: match substring(option dhcp.host-name, 0, 3) /// data: 'www' "test": "substring(option[12].hex,0,3) == 'www'" }, # reduce literals too { "name": "literal", /// from: match if (option dhcp.host-name) = (substring('www.example.com', 0, 3)) "test": "option[12].hex == 'www'" } ], "option-data": [ // # raw // { // "space": "dhcp4", // "name": "domain-name", // "code": 15, // "csv-format": false, // "expression": { // "substring": { // "expression": { // "option": { // "universe": "dhcp", // "name": "domain-name", // "code": 15 // } // }, // "offset": 4, // "length": 1000 // } // } // } ] } } |