Kea 3.1.1
host_cmds_callouts.cc File Reference
#include <config.h>
#include <host_cmds.h>
#include <host_cmds_log.h>
#include <cc/command_interpreter.h>
#include <hooks/hooks.h>
#include <dhcpsrv/cfgmgr.h>
#include <process/daemon.h>
+ Include dependency graph for host_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 reservation_add (CalloutHandle &handle)
 This is a command callout for 'reservation-add' command.
 
int reservation_del (CalloutHandle &handle)
 This is a command callout for 'reservation-del' command.
 
int reservation_get (CalloutHandle &handle)
 This is a command callout for 'reservation-get' command.
 
int reservation_get_all (CalloutHandle &handle)
 This is a command callout for 'reservation-get-all' command.
 
int reservation_get_by_address (CalloutHandle &handle)
 This is a command callout for 'reservation-get-by-address' command.
 
int reservation_get_by_hostname (CalloutHandle &handle)
 This is a command callout for 'reservation-get-by-hostname' command.
 
int reservation_get_by_id (CalloutHandle &handle)
 This is a command callout for 'reservation-get-by-id' command.
 
int reservation_get_page (CalloutHandle &handle)
 This is a command callout for 'reservation-get-page' command.
 
int reservation_update (CalloutHandle &handle)
 This is a command callout for the reservation-update 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 134 of file host_cmds_callouts.cc.

References isc::dhcp::CfgMgr::getFamily(), isc::process::Daemon::getProcName(), HOST_CMDS_INIT_FAILED, HOST_CMDS_INIT_OK, isc::host_cmds::host_cmds_logger, isc::dhcp::CfgMgr::instance(), isc_throw, LOG_ERROR, LOG_INFO, isc::hooks::LibraryHandle::registerCommandCallout(), reservation_add(), reservation_del(), reservation_get(), reservation_get_all(), reservation_get_by_address(), reservation_get_by_hostname(), reservation_get_by_id(), reservation_get_page(), and reservation_update().

+ 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 187 of file host_cmds_callouts.cc.

◆ reservation_add()

int reservation_add ( CalloutHandle & handle)

This is a command callout for 'reservation-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 host_cmds_callouts.cc.

Referenced by load().

◆ reservation_del()

int reservation_del ( CalloutHandle & handle)

This is a command callout for 'reservation-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 69 of file host_cmds_callouts.cc.

Referenced by load().

◆ reservation_get()

int reservation_get ( CalloutHandle & handle)

This is a command callout for 'reservation-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 47 of file host_cmds_callouts.cc.

Referenced by load().

◆ reservation_get_all()

int reservation_get_all ( CalloutHandle & handle)

This is a command callout for 'reservation-get-all' 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 80 of file host_cmds_callouts.cc.

Referenced by load().

◆ reservation_get_by_address()

int reservation_get_by_address ( CalloutHandle & handle)

This is a command callout for 'reservation-get-by-address' 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 58 of file host_cmds_callouts.cc.

Referenced by load().

◆ reservation_get_by_hostname()

int reservation_get_by_hostname ( CalloutHandle & handle)

This is a command callout for 'reservation-get-by-hostname' 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 102 of file host_cmds_callouts.cc.

Referenced by load().

◆ reservation_get_by_id()

int reservation_get_by_id ( CalloutHandle & handle)

This is a command callout for 'reservation-get-by-id' 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 113 of file host_cmds_callouts.cc.

Referenced by load().

◆ reservation_get_page()

int reservation_get_page ( CalloutHandle & handle)

This is a command callout for 'reservation-get-page' 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 91 of file host_cmds_callouts.cc.

Referenced by load().

◆ reservation_update()

int reservation_update ( CalloutHandle & handle)

This is a command callout for the reservation-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 125 of file host_cmds_callouts.cc.

Referenced by load().

◆ unload()

int unload ( )

This function is called when the library is unloaded.

Returns
0

Definition at line 179 of file host_cmds_callouts.cc.

References HOST_CMDS_DEINIT_OK, isc::host_cmds::host_cmds_logger, and LOG_INFO.