[Kea-users] Get leases via hook

Tomek Mrugalski tomasz at isc.org
Tue Sep 20 17:47:30 UTC 2016


W dniu 20.09.2016 o 18:55, Rui Pedro Caldeira pisze:
> Hello guys, i have a question. Is there any way I can get all leases
> from kea in a hook library code?
No. We're not aware of any use case that would require getting all the
leases at once, so this capability is not currently supported.

Do you have any specific use case for it?

If you want to get specific leases, you could call
LeaseMgrFactory::getLeaseMgrPtr() and then use various getLease4() or
getLease6() calls as defined in lease_mgr.h. But you need to know
something about the lease you're looking for.

On a somewhat related note, we have several lease manipulation commands
planned. They're described here:
http://kea.isc.org/wiki/ControlAPIRequirements. I was wondering if any
of those would be helpful to achieve whatever you're trying to do.

Tomek




More information about the Kea-users mailing list