Kea 2.7.4
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 perfmon_control (CalloutHandle &handle)
 This is a command callout for 'perfmon-control' command.
 
int perfmon_get_all_durations (CalloutHandle &handle)
 This is a command callout for 'perfmon-get-all-durations' command.
 
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 & )

Definition at line 38 of file perfmon_callouts.cc.

References isc::log::DBGLVL_TRACE_BASIC, isc::dhcp::IfaceMgr::instance(), LOG_DEBUG, PERFMON_DHCP4_SOCKET_RECEIVED_TIME_SUPPORT, and isc::perfmon::perfmon_logger.

+ Here is the call graph for this function:

◆ dhcp6_srv_configured()

int dhcp6_srv_configured ( CalloutHandle & )

Definition at line 46 of file perfmon_callouts.cc.

References isc::log::DBGLVL_TRACE_BASIC, isc::dhcp::IfaceMgr::instance(), LOG_DEBUG, PERFMON_DHCP6_SOCKET_RECEIVED_TIME_SUPPORT, and isc::perfmon::perfmon_logger.

+ 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

Register commands.

Definition at line 142 of file perfmon_callouts.cc.

References isc::hooks::LibraryHandle::getParameters(), isc::process::Daemon::getProcName(), isc::dhcp::CfgMgr::instance(), isc_throw, LOG_ERROR, LOG_INFO, isc::perfmon::mgr, perfmon_control(), perfmon_get_all_durations(), PERFMON_INIT_FAILED, PERFMON_INIT_OK, isc::perfmon::perfmon_logger, and isc::hooks::LibraryHandle::registerCommandCallout().

+ 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 188 of file perfmon_callouts.cc.

◆ perfmon_control()

int perfmon_control ( CalloutHandle & handle)

This is a command callout for 'perfmon-control' command.

Parameters
handleCallout handle used to retrieve a command and provide a response.
Returns
0 if this callout has been invoked successfully, 1 otherwise.

Definition at line 124 of file perfmon_callouts.cc.

References isc::perfmon::mgr.

Referenced by load().

◆ perfmon_get_all_durations()

int perfmon_get_all_durations ( CalloutHandle & handle)

This is a command callout for 'perfmon-get-all-durations' command.

Parameters
handleCallout handle used to retrieve a command and provide a response.
Returns
0 if this callout has been invoked successfully, 1 otherwise.

Definition at line 134 of file perfmon_callouts.cc.

References isc::perfmon::mgr.

Referenced by load().

◆ 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 180 of file perfmon_callouts.cc.

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