Kea  1.9.9-git
bootp_callouts.cc File Reference
#include <config.h>
#include <bootp_log.h>
#include <hooks/hooks.h>
#include <dhcp/pkt4.h>
#include <stats/stats_mgr.h>
#include <vector>
+ Include dependency graph for bootp_callouts.cc:

Go to the source code of this file.

Functions

int buffer4_receive (CalloutHandle &handle)
 This callout is called at the "buffer4_receive" hook. More...
 
int load (LibraryHandle &)
 This function is called when the library is loaded. More...
 
int multi_threading_compatible ()
 This function is called to retrieve the multi-threading compatibility. More...
 
int pkt4_send (CalloutHandle &handle)
 This callout is called at the "pkt4_send" hook. More...
 
int unload ()
 This function is called when the library is unloaded. More...
 

Function Documentation

int buffer4_receive ( CalloutHandle handle)

This callout is called at the "buffer4_receive" hook.

Ignore DHCP and BOOTREPLY messages. Remaining packets should be BOOTP requests so add the BOOTP client class and set the message type to DHCPREQUEST.

Parameters
handleCalloutHandle.
Returns
0 upon success, non-zero otherwise.

Definition at line 66 of file bootp_callouts.cc.

References BOOTP_BOOTP_QUERY, isc::bootp::bootp_logger, BOOTP_PACKET_OPTIONS_SKIPPED, BOOTP_PACKET_UNPACK_FAILED, isc::dhcp::BOOTREQUEST, isc::log::DBGLVL_TRACE_BASIC, isc::dhcp::DHCP_NOTYPE, isc::dhcp::DHCPREQUEST, isc::hooks::CalloutHandle::getArgument(), isc::hooks::CalloutHandle::getStatus(), LOG_DEBUG, isc::hooks::CalloutHandle::setStatus(), and isc::Exception::what().

+ Here is the call graph for this function:

int load ( LibraryHandle )

This function is called when the library is loaded.

Returns
always 0.

Definition at line 187 of file bootp_callouts.cc.

References BOOTP_LOAD, isc::bootp::bootp_logger, and LOG_INFO.

int multi_threading_compatible ( )

This function is called to retrieve the multi-threading compatibility.

Returns
1 which means compatible with multi-threading.

Definition at line 203 of file bootp_callouts.cc.

int pkt4_send ( CalloutHandle handle)

This callout is called at the "pkt4_send" hook.

Remove DHCP specific options and pad the buffer to 300 octets.

Parameters
handleCalloutHandle.
Returns
0 upon success, non-zero otherwise.

Definition at line 130 of file bootp_callouts.cc.

References isc::bootp::bootp_logger, BOOTP_PACKET_PACK, BOOTP_PACKET_PACK_FAIL, isc::log::DBGLVL_TRACE_BASIC, isc::hooks::CalloutHandle::getArgument(), isc::util::OutputBuffer::getLength(), isc::hooks::CalloutHandle::getStatus(), isc_throw, LOG_DEBUG, LOG_ERROR, isc::hooks::CalloutHandle::setStatus(), and isc::util::OutputBuffer::writeData().

+ Here is the call graph for this function:

int unload ( )

This function is called when the library is unloaded.

Returns
always 0.

Definition at line 195 of file bootp_callouts.cc.

References isc::bootp::bootp_logger, BOOTP_UNLOAD, and LOG_INFO.