[Kea-users] AllocationEngine instance from Hooks

Francis Dupont fdupont at isc.org
Wed May 1 13:55:33 UTC 2019

Rajdip Patel writes:
> I want to write custom Kea hook as per hook developer guide.
> How can I get access AllocationEngine instance from hooks callback function
> ?

=> I do not believe you can: it is a private member of the exchange context
which is not passed to hooks. It is a protected member of the Dhcpv4Srv
which is derived into the ControlledDhcpv4Srv singleton so if it is changed
to be public using ControlledDhcpv4Srv::getInstance() will give an access
to it.
Now why do you need AllocationEngine instance? I can't see obvious reason
to ask for this...


Francis Dupont <fdupont at isc.org>

More information about the Kea-users mailing list