Kea 2.7.6
stat_cmds_callouts.cc File Reference
#include <config.h>
#include <stat_cmds.h>
#include <stat_cmds_log.h>
#include <cc/command_interpreter.h>
#include <dhcpsrv/cfgmgr.h>
#include <hooks/hooks.h>
#include <process/daemon.h>
+ Include dependency graph for stat_cmds_callouts.cc:

Go to the source code of this file.

Functions

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 stat_lease4_get (CalloutHandle &handle)
 This is a command callout for 'stat-lease4-get' command.
 
int stat_lease6_get (CalloutHandle &handle)
 This is a command callout for 'stat-lease6-get' command.
 
int unload ()
 This function is called when the library is unloaded.
 

Function Documentation

◆ 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 53 of file stat_cmds_callouts.cc.

References isc::dhcp::CfgMgr::getFamily(), isc::process::Daemon::getProcName(), isc::dhcp::CfgMgr::instance(), isc_throw, LOG_INFO, isc::hooks::LibraryHandle::registerCommandCallout(), STAT_CMDS_INIT_OK, isc::stat_cmds::stat_cmds_logger, stat_lease4_get(), and stat_lease6_get().

+ 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 86 of file stat_cmds_callouts.cc.

◆ stat_lease4_get()

int stat_lease4_get ( CalloutHandle & handle)

This is a command callout for 'stat-lease4-get' 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 33 of file stat_cmds_callouts.cc.

References isc::stat_cmds::StatCmds::statLease4GetHandler().

Referenced by load().

+ Here is the call graph for this function:

◆ stat_lease6_get()

int stat_lease6_get ( CalloutHandle & handle)

This is a command callout for 'stat-lease6-get' 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 44 of file stat_cmds_callouts.cc.

References isc::stat_cmds::StatCmds::statLease6GetHandler().

Referenced by load().

+ 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 78 of file stat_cmds_callouts.cc.

References LOG_INFO, STAT_CMDS_DEINIT_OK, and isc::stat_cmds::stat_cmds_logger.