Kea 3.1.1
ping_check_callouts.cc File Reference
#include <config.h>
#include <asiolink/io_service_mgr.h>
#include <database/audit_entry.h>
#include <dhcpsrv/cfgmgr.h>
#include <ping_check_log.h>
#include <ping_check_mgr.h>
#include <hooks/hooks.h>
#include <process/daemon.h>
#include <string>
+ Include dependency graph for ping_check_callouts.cc:

Go to the source code of this file.

Namespaces

namespace  isc
 Defines the logger used by the top-level component of kea-lfc.
 
namespace  isc::ping_check
 

Functions

int cb4_updated (CalloutHandle &handle)
 cb4_updated callout implementation.
 
int dhcp4_srv_configured (CalloutHandle &handle)
 dhcp4_srv_configured implementation.
 
int lease4_offer (CalloutHandle &handle)
 lease4_offer callout implementation.
 
int load (LibraryHandle &handle)
 This function is called when the library is loaded.
 
int multi_threading_compatible ()
 This function is called to retrieve the multi-threading compatibility.
 
int unload ()
 This function is called when the library is unloaded.
 

Variables

PingCheckMgrPtr isc::ping_check::mgr
 PingCheckMgr singleton.
 

Function Documentation

◆ cb4_updated()

int cb4_updated ( CalloutHandle & handle)

cb4_updated callout implementation.

If it detects that any subnets were altered by the update it replaces the subnet cache contents. If any of the subnets fail to parse, the error is logged and the function returns a non-zero value.

Parameters
handleCalloutHandle.
Returns
0 upon success, 1 otherwise

Definition at line 84 of file ping_check_callouts.cc.

References isc::hooks::CalloutHandle::getArgument(), isc::dhcp::CfgMgr::instance(), LOG_ERROR, isc::ping_check::mgr, PING_CHECK_CB4_UPDATE_FAILED, and isc::ping_check::ping_check_logger.

+ Here is the call graph for this function:

◆ dhcp4_srv_configured()

int dhcp4_srv_configured ( CalloutHandle & handle)

dhcp4_srv_configured implementation.

Parameters
handlecallout handle.

Definition at line 46 of file ping_check_callouts.cc.

References isc::db::error, isc::hooks::CalloutHandle::getArgument(), isc::asiolink::IOServiceMgr::instance(), LOG_ERROR, isc::ping_check::mgr, isc::hooks::CalloutHandle::NEXT_STEP_DROP, PING_CHECK_DHCP4_SRV_CONFIGURED_FAILED, isc::ping_check::ping_check_logger, isc::asiolink::IOServiceMgr::registerIOService(), isc::hooks::CalloutHandle::setArgument(), and isc::hooks::CalloutHandle::setStatus().

+ Here is the call graph for this function:

◆ lease4_offer()

int lease4_offer ( CalloutHandle & handle)

lease4_offer callout implementation.

Parameters
handlecallout handle.

Definition at line 107 of file ping_check_callouts.cc.

References isc::dhcp::DHCPDISCOVER, isc::hooks::CalloutHandle::getArgument(), isc::hooks::CalloutHandle::getParkingLotHandlePtr(), isc::hooks::CalloutHandle::getStatus(), isc_throw, LOG_ERROR, isc::ping_check::mgr, CalloutHandle::NEXT_STEP_DROP, CalloutHandle::NEXT_STEP_PARK, CalloutHandle::NEXT_STEP_SKIP, PING_CHECK_LEASE4_OFFER_FAILED, isc::ping_check::ping_check_logger, and isc::hooks::CalloutHandle::setStatus().

+ Here is the call graph for this function:

◆ load()

int load ( LibraryHandle & handle)

This function is called when the library is loaded.

Parameters
handlelibrary handle
Returns
0 when initialization is successful, 1 otherwise

Definition at line 199 of file ping_check_callouts.cc.

References isc::hooks::LibraryHandle::getParameters(), isc::process::Daemon::getProcName(), isc_throw, LOG_ERROR, LOG_INFO, isc::ping_check::mgr, PING_CHECK_LOAD_ERROR, PING_CHECK_LOAD_OK, and isc::ping_check::ping_check_logger.

+ Here is the call graph for this function:

◆ multi_threading_compatible()

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 239 of file ping_check_callouts.cc.

◆ unload()

int unload ( )

This function is called when the library is unloaded.

Returns
always 0.

Definition at line 227 of file ping_check_callouts.cc.

References isc::asiolink::IOServiceMgr::instance(), LOG_INFO, isc::ping_check::mgr, isc::ping_check::ping_check_logger, PING_CHECK_UNLOAD, and isc::asiolink::IOServiceMgr::unregisterIOService().

+ Here is the call graph for this function: