<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">ok, i’ll try<div class=""><br class=""></div><div class="">im reading the src code and i see theres a parser for hook-libraries</div><div class=""><br class=""></div><div class="">so here’s my config related to the lib</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 14px; font-family: Courier; color: rgb(177, 37, 18); background-color: rgb(223, 219, 196);" class="">"hook-libraries"<span style="font-variant-ligatures: no-common-ligatures; color: #4c2f2d" class=""> : [</span></div><div style="margin: 0px; font-size: 14px; font-family: Courier; color: rgb(76, 47, 45); background-color: rgb(223, 219, 196);" class=""> {</div><div style="margin: 0px; font-size: 14px; font-family: Courier; color: rgb(177, 37, 18); background-color: rgb(223, 219, 196);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #4c2f2d" class=""> </span>"name"<span style="font-variant-ligatures: no-common-ligatures; color: #4c2f2d" class=""> : </span>"lib/example.so"</div><div style="margin: 0px; font-size: 14px; font-family: Courier; color: rgb(76, 47, 45); background-color: rgb(223, 219, 196);" class=""> }</div><div style="margin: 0px; font-size: 14px; font-family: Courier; color: rgb(76, 47, 45); background-color: rgb(223, 219, 196);" class=""> ],</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 14px; font-family: Courier; color: rgb(76, 47, 45); background-color: rgb(223, 219, 196);" class="">2014-11-12 17:16:08.202 ERROR [kea-dhcp4.dhcp4/30551] DHCP4_INIT_FAIL failed to initialize Kea server: configuration error using file '/opt/keadevel/etc/kea/kea.conf': unsupported global configuration parameter: hook-libraries (/opt/keadevel/etc/kea/kea.conf:19:23)</div></div><div class=""><br class=""></div><div class="">is what i get when i try to start dhcp4</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 12, 2014, at 17:08, Tomek Mrugalski <<a href="mailto:tomasz@isc.org" class="">tomasz@isc.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">On 12/11/14 09:40, alexis wrote:<br class=""><blockquote type="cite" class="">Hello, guys, im learning about the hooks, C++ and so on.<br class=""><br class="">i made the version hook, compiled it and added this to the kea.conf<br class=""><br class="">"hook_libraries" : [<br class=""> {<br class=""> "name" : "/home/administrator/example.so"<br class=""> }<br class=""> ],<br class=""><br class="">restarted the dhcp4 and service is up now.<br class=""><br class="">how can i test and see if the hook was loaded? So i can move on and add<br class="">new ones.<br class=""></blockquote>Version is the initial function that is required for the library to be<br class="">loaded, it's not a callout per se.<br class=""><br class="">Also you can enable logging level info and look for various hook related<br class="">messages. You may want to take a look at the list of messages<br class=""><a href="http://kea.isc.org/docs/kea-messages.html" class="">http://kea.isc.org/docs/kea-messages.html</a>. Search for hooks. There are<br class="">messages that will report that your library was loaded, that your<br class="">callout was registered, that it was called etc.<br class=""><br class="">The easiest would be for your hook to print out something in your actual<br class="">callout and then send a client packet towards your server. If you don't<br class="">know where to start, pkt4_receive or pkt6_receive are good places to<br class="">start. These are the points where you see the incoming packets in a form<br class="">that is easy to inspect and manipulate.<br class=""><br class="">Tomek<br class=""><br class=""><br class=""></div></blockquote></div><br class=""></div></div></body></html>