From: Marcin Siodelski Date: Thu, 25 Jan 2018 12:46:53 +0000 (+0100) Subject: [5457] Documented new dhcp4_srv_configured and leases4_committed hooks. X-Git-Tag: ha_checkpoints12~3^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=286d6a021500787b76746468ae35a12e48289e82;p=thirdparty%2Fkea.git [5457] Documented new dhcp4_srv_configured and leases4_committed hooks. --- diff --git a/src/bin/dhcp4/dhcp4_hooks.dox b/src/bin/dhcp4/dhcp4_hooks.dox index b909599553..c16b51d825 100644 --- a/src/bin/dhcp4/dhcp4_hooks.dox +++ b/src/bin/dhcp4/dhcp4_hooks.dox @@ -46,6 +46,23 @@ packet processing, but the exact order depends on the actual processing. Hook po that are not specific to packet processing (e.g. lease expiration) will be added to the end of this list. + @subsection dhcp4HooksDhcpv4SrvConfigured dhcp4_srv_configured + - @b Arguments: + - name: @b io_service, type: isc::asiolink::IOServicePtr, direction: in + - name: @b json_config, type: isc::data::ConstElementPtr, direction: in + - name: @b server_config, type: isc::dhcp::SrvConfigPtr, direction: in + + - @b Description: this callout is executed when the server has completed + its (re)configuration. The server provides received and parsed configuration + structures to the hook library. It also provides a pointer to the io_service + object which is used by the server to run asynchronous operations. The hooks + libraries can use this IO service object to schedule asynchronous tasks which + are triggered by the DHCP server's main loop. The hook library should hold the + pointer provided pointer until the library is unloaded. + + - Next step status: Status codes retured by the callouts installed on + this hook point are ignored. + @subsection dhcpv4HooksBuffer4Receive buffer4_receive - @b Arguments: @@ -215,6 +232,37 @@ to the end of this list. marked this lease as unavailable. If the client restarts its configuration, it will get the same (not declined) lease as a result. +@subsection dhcpv4Leases4Committed leases4_committed + + - @b Arguments: + - name: @b query4, type: isc::dhcp::Pkt4Ptr, direction: in + - name: @b leases4, type: isc::dhcp::Leases4CollectionPtr, direction: in + - name: @b deleted_leases4, type: isc::dhcp::Leases4CollectionPtr, direction: in + + - @b Description: this callout is executed when the server has applied all + lease changes as a result of DHCP message processing. This includes + writing new lease into the database, releasing an old lease for this + client or declining a lease. This callout is executed only for the + DHCP client messages which may cause lease changes, i.e. DHCPREQUEST, + DHCPRELEASE and DHCPDECLINE. This callout is not executed for DHCPDISCOVER + and DHCPINFORM. If the callouts are executed as a result of DHCPREQUEST + message, it is possible that both leases collections hold leases to be + handled. This is the case when the new lease allocation replaces an existing + lease for the client. The "deleted_leases4" object will hold a previous + lease instance and the "leases4" object will hold the new lease for this + client. The callouts should be prepared to handle such situation. When + the callout is executed as a result DHCPRELESE, the callout will typically + receive only one lease (being released) in the "deleted_leases4" object. + Both leases collections are always provided to the callouts, + even though they may sometimes be empty. + + - Next step status: If any callout installed on the "leases4_committed" + sets the next step action to DROP the server will drop the processed query. + If it sets the next step action to PARK, the server will park the processed + packet (hold packet processing) until the hook libraries explicitly unpark + the packet after they are done performing asynchronous operations. + + @subsection dhcpv4HooksPkt4Send pkt4_send - @b Arguments: