kea-custom-hooks
FeM custom hooks libraries for Kea DHCP
|
The Kea nodes need to communicate with the ARPwatch daemon, providing information about currently valid leases and seen devices (i.e.
devices which have requested a lease).
The integration is split into two components: the exporter and the interface. While the exporter handles hook-triggered exports of lease information from the Kea DHCP server, the interface provides an endpoint for ARPwatch to make requests against a DHCP node.
The admindb-arpwatch-exporter (AAE) is a Kea hooks library, hooking into the lease selection and renewal procedure, thus processing every lease the DHCP server assigns to devices.
Leases are pushed to a queue in arpwatch::Exporter
from where a separate thread processes lease information in several ways:
The admindb-arpwatch-interface (AAI) is a standalone program, providing an XML-RPC endpoint for ARPwatch to request lease information. The endpoint allows ARPwatch to request the MAC address which currently holds the lease for a given IP address.
Requests are handled as follows:
aai::XmlRpcServer
provides an XML-RPC server, listening for connections and receiving RPC calls.aai::ArpwatchRequestHandler
is called, which fetches the requested information from the local Redis cache and returns it as the function result.aai::XmlRpcServer
takes the function result and returns it as a response to the RPC call.