Kea 3.1.1
subnet_cmds_callouts.cc File Reference
#include <config.h>
#include <subnet_cmds.h>
#include <subnet_cmds_log.h>
#include <cc/command_interpreter.h>
#include <hooks/hooks.h>
#include <dhcpsrv/cfgmgr.h>
#include <process/daemon.h>
+ Include dependency graph for subnet_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 network4_add (CalloutHandle &handle)
 This is a command handler for 'network4-add' command.
 
int network4_del (CalloutHandle &handle)
 This is a command handler for 'network4-del' command.
 
int network4_get (CalloutHandle &handle)
 This is a command handler for 'network4-get' command.
 
int network4_list (CalloutHandle &handle)
 This is a command handler for 'network4-list' command.
 
int network4_subnet_add (CalloutHandle &handle)
 This is a command handler for 'network4-subnet-add' command.
 
int network4_subnet_del (CalloutHandle &handle)
 This is a command handler for 'network4-subnet-del' command.
 
int network6_add (CalloutHandle &handle)
 This is a command handler for 'network6-add' command.
 
int network6_del (CalloutHandle &handle)
 This is a command handler for 'network6-del' command.
 
int network6_get (CalloutHandle &handle)
 This is a command handler for 'network4-get' command.
 
int network6_list (CalloutHandle &handle)
 This is a command handler for 'network6-list' command.
 
int network6_subnet_add (CalloutHandle &handle)
 This is a command handler for 'network6-subnet-add' command.
 
int network6_subnet_del (CalloutHandle &handle)
 This is a command handler for 'network6-subnet-del' command.
 
int subnet4_add (CalloutHandle &handle)
 This is a command handler for 'subnet4-add' command.
 
int subnet4_del (CalloutHandle &handle)
 This is a command handler for 'subnet4-del' command.
 
int subnet4_delta_add (CalloutHandle &handle)
 This is a command handler for 'subnet4-delta-add' command.
 
int subnet4_delta_del (CalloutHandle &handle)
 This is a command handler for 'subnet4-delta-del' command.
 
int subnet4_get (CalloutHandle &handle)
 This is a command handler for 'subnet4-get' command.
 
int subnet4_list (CalloutHandle &handle)
 This is a command handler for 'subnet4-list' command.
 
int subnet4_update (CalloutHandle &handle)
 This is a command handler for 'subnet4-update' command.
 
int subnet6_add (CalloutHandle &handle)
 This is a command handler for 'subnet6-add' command.
 
int subnet6_del (CalloutHandle &handle)
 This is a command handler for 'subnet6-del' command.
 
int subnet6_delta_add (CalloutHandle &handle)
 This is a command handler for 'subnet6-delta-add' command.
 
int subnet6_delta_del (CalloutHandle &handle)
 This is a command handler for 'subnet6-delta-del' command.
 
int subnet6_get (CalloutHandle &handle)
 This is a command handler for 'subnet4-get' command.
 
int subnet6_list (CalloutHandle &handle)
 This is a command handler for 'subnet6-list' command.
 
int subnet6_update (CalloutHandle &handle)
 This is a command handler for 'subnet6-update' command.
 
int unload ()
 This function is called when the library is unloaded.
 

Function Documentation

◆ load()

◆ 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 862 of file subnet_cmds_callouts.cc.

◆ network4_add()

int network4_add ( CalloutHandle & handle)

This is a command handler for 'network4-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 552 of file subnet_cmds_callouts.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), LOG_ERROR, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_NETWORK4_ADD_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ network4_del()

int network4_del ( CalloutHandle & handle)

This is a command handler for 'network4-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 612 of file subnet_cmds_callouts.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), LOG_ERROR, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_NETWORK4_DEL_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ network4_get()

int network4_get ( CalloutHandle & handle)

This is a command handler for 'network4-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 492 of file subnet_cmds_callouts.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), LOG_ERROR, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_NETWORK4_GET_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ network4_list()

int network4_list ( CalloutHandle & handle)

This is a command handler for 'network4-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 446 of file subnet_cmds_callouts.cc.

References LOG_ERROR, isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_NETWORK4_LIST_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ network4_subnet_add()

int network4_subnet_add ( CalloutHandle & handle)

This is a command handler for 'network4-subnet-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 672 of file subnet_cmds_callouts.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), LOG_ERROR, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_NETWORK4_SUBNET_ADD_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ network4_subnet_del()

int network4_subnet_del ( CalloutHandle & handle)

This is a command handler for 'network4-subnet-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 732 of file subnet_cmds_callouts.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), LOG_ERROR, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_NETWORK4_SUBNET_DEL_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ network6_add()

int network6_add ( CalloutHandle & handle)

This is a command handler for 'network6-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 582 of file subnet_cmds_callouts.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), LOG_ERROR, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_NETWORK6_ADD_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ network6_del()

int network6_del ( CalloutHandle & handle)

This is a command handler for 'network6-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 642 of file subnet_cmds_callouts.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), LOG_ERROR, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_NETWORK6_DEL_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ network6_get()

int network6_get ( CalloutHandle & handle)

This is a command handler for 'network4-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 522 of file subnet_cmds_callouts.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), LOG_ERROR, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_NETWORK6_GET_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ network6_list()

int network6_list ( CalloutHandle & handle)

This is a command handler for 'network6-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 469 of file subnet_cmds_callouts.cc.

References LOG_ERROR, isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_NETWORK6_LIST_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ network6_subnet_add()

int network6_subnet_add ( CalloutHandle & handle)

This is a command handler for 'network6-subnet-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 702 of file subnet_cmds_callouts.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), LOG_ERROR, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_NETWORK6_SUBNET_ADD_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ network6_subnet_del()

int network6_subnet_del ( CalloutHandle & handle)

This is a command handler for 'network6-subnet-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 762 of file subnet_cmds_callouts.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), LOG_ERROR, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_NETWORK6_SUBNET_DEL_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ subnet4_add()

int subnet4_add ( CalloutHandle & handle)

This is a command handler for 'subnet4-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 142 of file subnet_cmds_callouts.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), LOG_ERROR, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_SUBNET4_ADD_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ subnet4_del()

int subnet4_del ( CalloutHandle & handle)

This is a command handler for 'subnet4-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 262 of file subnet_cmds_callouts.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), LOG_ERROR, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_SUBNET4_DEL_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ subnet4_delta_add()

int subnet4_delta_add ( CalloutHandle & handle)

This is a command handler for 'subnet4-delta-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 322 of file subnet_cmds_callouts.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), LOG_ERROR, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_SUBNET4_DELTA_ADD_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ subnet4_delta_del()

int subnet4_delta_del ( CalloutHandle & handle)

This is a command handler for 'subnet4-delta-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 382 of file subnet_cmds_callouts.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), LOG_ERROR, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_SUBNET4_DELTA_DEL_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ subnet4_get()

int subnet4_get ( CalloutHandle & handle)

This is a command handler for 'subnet4-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 82 of file subnet_cmds_callouts.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), LOG_ERROR, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_SUBNET4_GET_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ subnet4_list()

int subnet4_list ( CalloutHandle & handle)

This is a command handler for 'subnet4-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 36 of file subnet_cmds_callouts.cc.

References LOG_ERROR, isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_SUBNET4_LIST_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ subnet4_update()

int subnet4_update ( CalloutHandle & handle)

This is a command handler for 'subnet4-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 202 of file subnet_cmds_callouts.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), LOG_ERROR, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_SUBNET4_UPDATE_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ subnet6_add()

int subnet6_add ( CalloutHandle & handle)

This is a command handler for 'subnet6-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 172 of file subnet_cmds_callouts.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), LOG_ERROR, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_SUBNET6_ADD_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ subnet6_del()

int subnet6_del ( CalloutHandle & handle)

This is a command handler for 'subnet6-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 292 of file subnet_cmds_callouts.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), LOG_ERROR, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_SUBNET6_DEL_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ subnet6_delta_add()

int subnet6_delta_add ( CalloutHandle & handle)

This is a command handler for 'subnet6-delta-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 352 of file subnet_cmds_callouts.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), LOG_ERROR, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_SUBNET6_DELTA_ADD_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ subnet6_delta_del()

int subnet6_delta_del ( CalloutHandle & handle)

This is a command handler for 'subnet6-delta-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 412 of file subnet_cmds_callouts.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), LOG_ERROR, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_SUBNET6_DELTA_DEL_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ subnet6_get()

int subnet6_get ( CalloutHandle & handle)

This is a command handler for 'subnet4-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 112 of file subnet_cmds_callouts.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), LOG_ERROR, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_SUBNET6_GET_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ subnet6_list()

int subnet6_list ( CalloutHandle & handle)

This is a command handler for 'subnet6-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 59 of file subnet_cmds_callouts.cc.

References LOG_ERROR, isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_SUBNET6_LIST_FAILED.

Referenced by load().

+ Here is the call graph for this function:

◆ subnet6_update()

int subnet6_update ( CalloutHandle & handle)

This is a command handler for 'subnet6-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 232 of file subnet_cmds_callouts.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::createAnswer(), isc::hooks::CalloutHandle::getArgument(), LOG_ERROR, isc::config::parseCommand(), isc::hooks::CalloutHandle::setArgument(), isc::subnet_cmds::subnet_cmds_logger, and isc::subnet_cmds::SUBNET_CMDS_SUBNET6_UPDATE_FAILED.

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 854 of file subnet_cmds_callouts.cc.

References LOG_INFO, isc::subnet_cmds::SUBNET_CMDS_DEINIT_OK, and isc::subnet_cmds::subnet_cmds_logger.