![]() |
Kea 2.7.7
|
Unix Commands Manager implementation for the Kea servers. More...
#include <unix_command_mgr.h>
Public Member Functions | |
void | addExternalSockets (bool use_external=true) |
Use external sockets flag. | |
void | closeCommandSocket (UnixSocketInfoPtr info=UnixSocketInfoPtr()) |
Shuts down any open unix control sockets. | |
void | closeCommandSockets () |
Shuts down any open unix control sockets. | |
int | getControlSocketFD (UnixSocketInfoPtr info=UnixSocketInfoPtr()) |
Returns unix control socket descriptor. | |
void | openCommandSocket (const isc::data::ConstElementPtr config) |
Opens unix control socket with parameters specified in socket_info (required parameters: socket-type: unix, socket-name:/unix/path). | |
void | openCommandSockets (const isc::data::ConstElementPtr config) |
Opens unix control socket with parameters specified in socket_info (required parameters: socket-type: unix, socket-name:/unix/path). | |
void | setConnectionTimeout (const long timeout) |
Override default connection timeout. | |
void | setIOService (const asiolink::IOServicePtr &io_service) |
Sets IO service to be used by the unix command manager. | |
Static Public Member Functions | |
static UnixCommandMgr & | instance () |
UnixCommandMgr is a singleton class. | |
Unix Commands Manager implementation for the Kea servers.
This class receives and responds to commands over unix domain sockets.
Definition at line 33 of file unix_command_mgr.h.
void isc::config::UnixCommandMgr::addExternalSockets | ( | bool | use_external = true | ) |
Use external sockets flag.
Add sockets as external sockets of the interface manager so available I/O on them makes a waiting select to return.
use_external | True (default) add external sockets. |
Definition at line 824 of file unix_command_mgr.cc.
Referenced by isc::d2::D2Process::init().
void isc::config::UnixCommandMgr::closeCommandSocket | ( | UnixSocketInfoPtr | info = UnixSocketInfoPtr() | ) |
Shuts down any open unix control sockets.
config | Configuration information for the unix control socket. |
Definition at line 793 of file unix_command_mgr.cc.
References isc::db::info.
void isc::config::UnixCommandMgr::closeCommandSockets | ( | ) |
Shuts down any open unix control sockets.
Definition at line 798 of file unix_command_mgr.cc.
Referenced by isc::dhcp::ControlledDhcpv4Srv::~ControlledDhcpv4Srv(), isc::dhcp::ControlledDhcpv6Srv::~ControlledDhcpv6Srv(), isc::dhcp::configureCommandChannel(), isc::d2::D2Controller::deregisterCommands(), and isc::d2::D2Process::reconfigureCommandChannel().
int isc::config::UnixCommandMgr::getControlSocketFD | ( | UnixSocketInfoPtr | info = UnixSocketInfoPtr() | ) |
Returns unix control socket descriptor.
This method should be used only in tests.
config | Configuration information for the unix control socket. |
Definition at line 803 of file unix_command_mgr.cc.
References isc::db::info.
|
static |
UnixCommandMgr is a singleton class.
This method returns reference to its sole instance.
Definition at line 808 of file unix_command_mgr.cc.
Referenced by isc::dhcp::ControlledDhcpv4Srv::ControlledDhcpv4Srv(), isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv(), isc::dhcp::ControlledDhcpv4Srv::~ControlledDhcpv4Srv(), isc::dhcp::ControlledDhcpv6Srv::~ControlledDhcpv6Srv(), isc::dhcp::configureCommandChannel(), isc::d2::D2Controller::deregisterCommands(), isc::d2::D2Process::init(), and isc::d2::D2Process::reconfigureCommandChannel().
void isc::config::UnixCommandMgr::openCommandSocket | ( | const isc::data::ConstElementPtr | config | ) |
Opens unix control socket with parameters specified in socket_info (required parameters: socket-type: unix, socket-name:/unix/path).
Creates acceptor, or reuses the existing one.
BadSocketInfo | When socket configuration is invalid. |
SocketError | When socket operation fails. |
config | Configuration information for the unix control socket. |
Definition at line 783 of file unix_command_mgr.cc.
void isc::config::UnixCommandMgr::openCommandSockets | ( | const isc::data::ConstElementPtr | config | ) |
Opens unix control socket with parameters specified in socket_info (required parameters: socket-type: unix, socket-name:/unix/path).
BadSocketInfo | When socket configuration is invalid. |
SocketError | When socket operation fails. |
config | Configuration information for the unix control socket. |
Definition at line 788 of file unix_command_mgr.cc.
Referenced by isc::dhcp::configureCommandChannel(), and isc::d2::D2Process::reconfigureCommandChannel().
void isc::config::UnixCommandMgr::setConnectionTimeout | ( | const long | timeout | ) |
Override default connection timeout.
timeout | New connection timeout in milliseconds. |
Definition at line 819 of file unix_command_mgr.cc.
void isc::config::UnixCommandMgr::setIOService | ( | const asiolink::IOServicePtr & | io_service | ) |
Sets IO service to be used by the unix command manager.
The server should use this method to provide the Unix Command Manager with the common IO service used by the server.
io_service | Pointer to the IO service. |
Definition at line 814 of file unix_command_mgr.cc.
Referenced by isc::dhcp::ControlledDhcpv4Srv::ControlledDhcpv4Srv(), isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv(), and isc::d2::D2Process::init().