<div dir="ltr">
<div>I am new to Kea so excuse my lack of knowledge here. <br></div><div><br></div><div>I
 have been running a ISC DHCP server to handle cable modems (and 
associated CPE and MTA) IP assignment. I needed some more advanced logic
 with the assignment of configuration file and Kea with the customizable
 hooks seemed like the logical choice.</div><div><br></div><div>I 
migrated my configuration to Kea and I'm now able to perform basic 
provisioning of CM and CPEs. I'm relying on a subset of the vendor class
 identifier (because it can be docsis3.0 or docsis3.1) and all is good 
with the following resulting class configuration</div><div><br></div><div>  "client-classes": [<br>        {<br>           "name": "CM",<br>           "test": "substring(option[vendor-class-identifier].text, 0, 6) == 'docsis'"<br><br>        },<br>        {<br>           "name": "MTA",<br>           "test": "substring(option[vendor-class-identifier].text, 0, 4) == 'pktc'"<br>        },<br>        {<br>           "name": "CPE",<br>           "test": "not (member('CM')) and not (member('MTA'))"<br>        }<br>  ],</div><div><br></div><div>My
 problem is with the hook. I want to dynamically assign the boot-file 
and server based on MAC address and model information (option 43, 
suboption 9) and potentially software version (option 43, suboption 6).</div><div><br></div><div>I
 will therefore need to extract these in pkt4_receive and then replace 
the boot-file and server according to my logic in pkt4_send.</div><div><br></div><div>I
 just don't know how to retrieve and parse the suboptions in option 43. 
Would anybody have sample code showing how I can extract these?</div><div><br></div><div>Thanks</div>

<div><br></div><div>Dave M.<br></div></div>