<div dir="ltr">Thanks Marcin, I just did what you mentioned in the code and printed <span style="font-size:12.8px"><b>iface_configuation->str()</b> and it prints an empty array interface. Probably because I didn't link the hook user_chk with </span><span style="font-size:12.8px"><b>libkea-dhcpsrv</b>. </span><div><span style="font-size:12.8px">I tried linking<b> </b></span><b>libkea<span style="font-size:12.8px">-</span>dhcpsrv </b>by adding </div><div><pre style="color:rgb(0,0,0);font-family:Menlo;font-size:9pt">libdhcp_user_chk_la_LIBADD  += $(top_builddir)/src/lib/hooks/<a href="http://libkea-dhcpsrv.la">libkea-dhcpsrv.la</a></pre><pre style="color:rgb(0,0,0);font-size:9pt"><font face="arial, helvetica, sans-serif">in src/hooks/dhcp/user_chk/Makefile.am and did a make.</font></pre><pre style="color:rgb(0,0,0);font-size:9pt"><font face="arial, helvetica, sans-serif">I'm getting automake-1.14: command not found. Every time editing Makefile.am, I'm getting this error. Am I doing the linking correctly? Am I missing something here? Please correct me if I'm wrong</font></pre><div><span style="font-size:12.8px"><br></span><div><span style="font-size:12.8px"><br></span></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 23, 2017 at 3:09 PM, Marcin Siodelski <span dir="ltr"><<a href="mailto:marcin@isc.org" target="_blank">marcin@isc.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 23.08.2017 11:24, Gokulakrishnan Gopalakrishnan wrote:<br>
> "interfaces-config": {<br>
><br>
>         "interfaces": [ "eth0" ]<br>
><br>
>   }<br>
><br>
> Can we get the list of interface name in hooks code? In the example<br>
> mentioned above, can we get the value "eth0" in hooks code in<br>
> <int load(LibraryHandle&)> function?<br>
><br>
><br>
<br>
</div></div>To retrieve server configuration information you'd need to link your<br>
hook library with libkea-dhcpsrv and do something like this:<br>
<br>
#include <dhcpsrv/cfg_iface.h><br>
<br>
ConstCfgIfacePtr cfg =  CfgMgr::instance().<wbr>getCurrentCfg()->getCfgIface()<wbr>;<br>
ElementPtr iface_configuation = cfg->toElement();<br>
<br>
The iface_configuration will now hold the conifguration structure you're<br>
looking for.<br>
<span class="HOEnZb"><font color="#888888"><br>
Marcin Siodelski<br>
ISC<br>
</font></span></blockquote></div><br></div>