{ # subclass with guard declaration config # options "Dhcp4": { "option-def": [ { "space": "dhcp4", "name": "mysystem", "code": 250, "type": "string" }, { "space": "dhcp4", "name": "myversion", "code": 251, "type": "uint16" }, { "space": "dhcp4", "name": "mydescr", "code": 252, "type": "string" } ], "client-classes": [ # superclass declaration /// match: option dhcp.mysystem { "name": "foobar", /// from: match if (option dhcp.myversion) = 0x0001 "test": "option[251].hex == 0x0001" }, # simple subclass declaration /// subclass selector 'system1' { "name": "sub#foobar#0", /// from: match-if (option dhcp.myversion) = 0x0001 /// match: option dhcp.mysystem /// data: 'system1' "test": "(option[251].hex == 0x0001) and (option[250].hex == 'system1')" }, # option setting subclass declaration /// subclass selector 'system2' { "name": "sub#foobar#1", "option-data": [ { "space": "dhcp4", "name": "mydescr", "code": 252, "data": "1.2" } ], /// from: match-if (option dhcp.myversion) = 0x0001 /// match: option dhcp.mysystem /// data: 'system2' "test": "(option[251].hex == 0x0001) and (option[250].hex == 'system2')" }, # complex subclass declaration /// subclass selector 'system3' { "name": "sub#foobar#2", "option-data": [ { "space": "dhcp4", "name": "mydescr", "code": 252, "data": "1.3" } ], "next-server": "192.168.0.1", /// from: match-if (option dhcp.myversion) = 0x0001 /// match: option dhcp.mysystem /// data: 'system3' "test": "(option[251].hex == 0x0001) and (option[250].hex == 'system3')" } ] } }