<div dir="ltr">Thanks you so much Francis,<div><br></div><div>My requirement is as below.</div><div><br></div><div>Once Kea assigns a IPv4 lease, I want to confirm it operating system's MAC Table and if it is already present in Mac table I want Kea AllocationEngine to assign new lease. So for requesting new lease I need AllocationEngine's instance from hook callback which is not available.</div><div>I want this validation in case users assigned static IP to their devices and I want to prevent IP conflicts in enterprise network. </div><div><br></div><div>Also, I tried to use <b>ControlledDhcpv4Srv::getInstance()</b> but ControlledDhcpv4Srv class doesn't seems part of any exported header file.</div><div><br></div><div>Any alternative workaround would be highly appreciated.</div><div><br></div><div>Thanks</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 1, 2019 at 7:25 PM Francis Dupont <<a href="mailto:fdupont@isc.org">fdupont@isc.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Rajdip Patel writes:<br>
> I want to write custom Kea hook as per hook developer guide.<br>
> <br>
> How can I get access AllocationEngine instance from hooks callback function<br>
> ?<br>
<br>
=> I do not believe you can: it is a private member of the exchange context<br>
which is not passed to hooks. It is a protected member of the Dhcpv4Srv<br>
which is derived into the ControlledDhcpv4Srv singleton so if it is changed<br>
to be public using ControlledDhcpv4Srv::getInstance() will give an access<br>
to it.<br>
Now why do you need AllocationEngine instance? I can't see obvious reason<br>
to ask for this...<br>
<br>
Regards<br>
<br>
Francis Dupont <<a href="mailto:fdupont@isc.org" target="_blank">fdupont@isc.org</a>><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Thanks,<div>Rajdip Patel</div></div>