Kea 3.1.1
class_cmds_callouts.cc File Reference
#include <config.h>
#include <class_cmds.h>
#include <class_cmds_log.h>
#include <cc/command_interpreter.h>
#include <hooks/hooks.h>
#include <dhcpsrv/cfgmgr.h>
#include <process/daemon.h>
+ Include dependency graph for class_cmds_callouts.cc:

Go to the source code of this file.

Functions

int class_add (CalloutHandle &handle)
 This is a command callout for 'class-add' command.
 
int class_del (CalloutHandle &handle)
 This is a command callout for 'class-del' command.
 
int class_get (CalloutHandle &handle)
 This is a command callout for 'class-get' command.
 
int class_list (CalloutHandle &handle)
 This is a command callout for 'class-list' command.
 
int class_update (CalloutHandle &handle)
 This is a command callout for 'class-update' command.
 
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.
 

Function Documentation

◆ class_add()

int class_add ( CalloutHandle & handle)

This is a command callout for 'class-add' 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 36 of file class_cmds_callouts.cc.

References CLASS_CMDS_CLASS_ADD_HANDLER_FAILED, isc::class_cmds::class_cmds_logger, and LOG_ERROR.

Referenced by load().

◆ class_del()

int class_del ( CalloutHandle & handle)

This is a command callout for 'class-del' 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 116 of file class_cmds_callouts.cc.

References CLASS_CMDS_CLASS_DEL_HANDLER_FAILED, isc::class_cmds::class_cmds_logger, and LOG_ERROR.

Referenced by load().

◆ class_get()

int class_get ( CalloutHandle & handle)

This is a command callout for 'class-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 56 of file class_cmds_callouts.cc.

References CLASS_CMDS_CLASS_GET_HANDLER_FAILED, isc::class_cmds::class_cmds_logger, and LOG_ERROR.

Referenced by load().

◆ class_list()

int class_list ( CalloutHandle & handle)

This is a command callout for 'class-list' 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 76 of file class_cmds_callouts.cc.

References CLASS_CMDS_CLASS_LIST_HANDLER_FAILED, isc::class_cmds::class_cmds_logger, and LOG_ERROR.

Referenced by isc::class_cmds::ClassCmdsImpl::addClass(), isc::dhcp::BaseNetworkParser::getAdditionalClassesElem(), isc::dhcp::BaseNetworkParser::getClientClassesElem(), load(), and isc::class_cmds::ClassCmdsImpl::updateClass().

◆ class_update()

int class_update ( CalloutHandle & handle)

This is a command callout for 'class-update' 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 96 of file class_cmds_callouts.cc.

References CLASS_CMDS_CLASS_UPDATE_HANDLER_FAILED, isc::class_cmds::class_cmds_logger, and LOG_ERROR.

Referenced by load().

◆ 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 134 of file class_cmds_callouts.cc.

References class_add(), CLASS_CMDS_INIT_FAILED, CLASS_CMDS_INIT_OK, isc::class_cmds::class_cmds_logger, class_del(), class_get(), class_list(), class_update(), isc::dhcp::CfgMgr::getFamily(), isc::process::Daemon::getProcName(), isc::dhcp::CfgMgr::instance(), isc_throw, LOG_ERROR, LOG_INFO, 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 178 of file class_cmds_callouts.cc.

◆ unload()

int unload ( )

This function is called when the library is unloaded.

Returns
0

Definition at line 170 of file class_cmds_callouts.cc.

References CLASS_CMDS_DEINIT_OK, isc::class_cmds::class_cmds_logger, and LOG_INFO.