![]() |
Kea 3.1.1
|
#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>
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. | |
int load | ( | LibraryHandle & | handle | ) |
This function is called when the library is loaded.
handle | library handle |
Definition at line 790 of file subnet_cmds_callouts.cc.
References isc::dhcp::CfgMgr::getFamily(), isc::process::Daemon::getProcName(), isc::dhcp::CfgMgr::instance(), isc_throw, LOG_ERROR, LOG_INFO, network4_add(), network4_del(), network4_get(), network4_list(), network4_subnet_add(), network4_subnet_del(), network6_add(), network6_del(), network6_get(), network6_list(), network6_subnet_add(), network6_subnet_del(), isc::hooks::LibraryHandle::registerCommandCallout(), subnet4_add(), subnet4_del(), subnet4_delta_add(), subnet4_delta_del(), subnet4_get(), subnet4_list(), subnet4_update(), subnet6_add(), subnet6_del(), subnet6_delta_add(), subnet6_delta_del(), subnet6_get(), subnet6_list(), subnet6_update(), isc::subnet_cmds::SUBNET_CMDS_INIT_FAILED, isc::subnet_cmds::SUBNET_CMDS_INIT_OK, and isc::subnet_cmds::subnet_cmds_logger.
int multi_threading_compatible | ( | ) |
This function is called to retrieve the multi-threading compatibility.
Definition at line 862 of file subnet_cmds_callouts.cc.
int network4_add | ( | CalloutHandle & | handle | ) |
This is a command handler for 'network4-add' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int network4_del | ( | CalloutHandle & | handle | ) |
This is a command handler for 'network4-del' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int network4_get | ( | CalloutHandle & | handle | ) |
This is a command handler for 'network4-get' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int network4_list | ( | CalloutHandle & | handle | ) |
This is a command handler for 'network4-list' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int network4_subnet_add | ( | CalloutHandle & | handle | ) |
This is a command handler for 'network4-subnet-add' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int network4_subnet_del | ( | CalloutHandle & | handle | ) |
This is a command handler for 'network4-subnet-del' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int network6_add | ( | CalloutHandle & | handle | ) |
This is a command handler for 'network6-add' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int network6_del | ( | CalloutHandle & | handle | ) |
This is a command handler for 'network6-del' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int network6_get | ( | CalloutHandle & | handle | ) |
This is a command handler for 'network4-get' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int network6_list | ( | CalloutHandle & | handle | ) |
This is a command handler for 'network6-list' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int network6_subnet_add | ( | CalloutHandle & | handle | ) |
This is a command handler for 'network6-subnet-add' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int network6_subnet_del | ( | CalloutHandle & | handle | ) |
This is a command handler for 'network6-subnet-del' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int subnet4_add | ( | CalloutHandle & | handle | ) |
This is a command handler for 'subnet4-add' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int subnet4_del | ( | CalloutHandle & | handle | ) |
This is a command handler for 'subnet4-del' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int subnet4_delta_add | ( | CalloutHandle & | handle | ) |
This is a command handler for 'subnet4-delta-add' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int subnet4_delta_del | ( | CalloutHandle & | handle | ) |
This is a command handler for 'subnet4-delta-del' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int subnet4_get | ( | CalloutHandle & | handle | ) |
This is a command handler for 'subnet4-get' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int subnet4_list | ( | CalloutHandle & | handle | ) |
This is a command handler for 'subnet4-list' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int subnet4_update | ( | CalloutHandle & | handle | ) |
This is a command handler for 'subnet4-update' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int subnet6_add | ( | CalloutHandle & | handle | ) |
This is a command handler for 'subnet6-add' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int subnet6_del | ( | CalloutHandle & | handle | ) |
This is a command handler for 'subnet6-del' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int subnet6_delta_add | ( | CalloutHandle & | handle | ) |
This is a command handler for 'subnet6-delta-add' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int subnet6_delta_del | ( | CalloutHandle & | handle | ) |
This is a command handler for 'subnet6-delta-del' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int subnet6_get | ( | CalloutHandle & | handle | ) |
This is a command handler for 'subnet4-get' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int subnet6_list | ( | CalloutHandle & | handle | ) |
This is a command handler for 'subnet6-list' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int subnet6_update | ( | CalloutHandle & | handle | ) |
This is a command handler for 'subnet6-update' command.
handle | Callout handle used to retrieve a command and provide a response. |
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().
int unload | ( | ) |
This function is called when the library is unloaded.
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.