Kea 2.5.9
perfmon_callouts.cc File Reference
#include <config.h>
#include <perfmon_log.h>
#include <perfmon_mgr.h>
#include <cc/command_interpreter.h>
#include <dhcpsrv/cfgmgr.h>
#include <hooks/hooks.h>
#include <process/daemon.h>
+ Include dependency graph for perfmon_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::perfmon
 

Functions

int dhcp4_srv_configured (CalloutHandle &)
 
int dhcp6_srv_configured (CalloutHandle &)
 
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 pkt4_send (CalloutHandle &handle)
 This callout is called at the "pkt4_send" hook.
 
int pkt6_send (CalloutHandle &handle)
 This callout is called at the "pkt6_send" hook.
 
int unload ()
 This function is called when the library is unloaded.
 

Variables

PerfMonMgrPtr isc::perfmon::mgr
 PerfMonMgr singleton.
 

Function Documentation

◆ dhcp4_srv_configured()

int dhcp4_srv_configured ( CalloutHandle )

◆ dhcp6_srv_configured()

int dhcp6_srv_configured ( CalloutHandle )

◆ 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
Todo:
register commands handle.registerCommandCallout("command-here", handler_here);

Definition at line 122 of file perfmon_callouts.cc.

References isc::dhcp::CfgMgr::getFamily(), isc::hooks::LibraryHandle::getParameters(), isc::process::Daemon::getProcName(), isc::dhcp::CfgMgr::instance(), isc_throw, LOG_ERROR, LOG_INFO, isc::perfmon::mgr, PERFMON_INIT_FAILED, PERFMON_INIT_OK, and isc::perfmon::perfmon_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 167 of file perfmon_callouts.cc.

◆ pkt4_send()

int pkt4_send ( CalloutHandle handle)

This callout is called at the "pkt4_send" hook.

Parameters
handleCalloutHandle which provides access to context.
Returns
0 upon success, non-zero otherwise.

Definition at line 59 of file perfmon_callouts.cc.

References isc::log::DBGLVL_TRACE_DETAIL, isc::hooks::CalloutHandle::getArgument(), isc::hooks::CalloutHandle::getStatus(), LOG_DEBUG, isc::perfmon::mgr, isc::hooks::CalloutHandle::NEXT_STEP_DROP, isc::hooks::CalloutHandle::NEXT_STEP_SKIP, PERFMON_DHCP4_PKT_PROCESS_ERROR, and isc::perfmon::perfmon_logger.

+ Here is the call graph for this function:

◆ pkt6_send()

int pkt6_send ( CalloutHandle handle)

This callout is called at the "pkt6_send" hook.

Parameters
handleCalloutHandle which provides access to context.
Returns
0 upon success, non-zero otherwise.

Definition at line 91 of file perfmon_callouts.cc.

References isc::log::DBGLVL_TRACE_DETAIL, isc::hooks::CalloutHandle::getArgument(), isc::hooks::CalloutHandle::getStatus(), LOG_DEBUG, isc::perfmon::mgr, isc::hooks::CalloutHandle::NEXT_STEP_DROP, isc::hooks::CalloutHandle::NEXT_STEP_SKIP, PERFMON_DHCP6_PKT_PROCESS_ERROR, and isc::perfmon::perfmon_logger.

+ Here is the call graph for this function:

◆ unload()

int unload ( )

This function is called when the library is unloaded.

Returns
0 if deregistration was successful, 1 otherwise

Definition at line 159 of file perfmon_callouts.cc.

References LOG_INFO, PERFMON_DEINIT_OK, and isc::perfmon::perfmon_logger.