Kea 2.7.6
|
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 () |
Shuts down any open unix control sockets. | |
int | getControlSocketFD () |
Returns unix control socket descriptor. | |
void | openCommandSocket (const isc::data::ConstElementPtr &socket_info) |
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 38 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 703 of file unix_command_mgr.cc.
Referenced by isc::d2::D2Process::init().
void isc::config::UnixCommandMgr::closeCommandSocket | ( | ) |
Shuts down any open unix control sockets.
Definition at line 677 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 | ( | ) |
Returns unix control socket descriptor.
This method should be used only in tests.
Definition at line 682 of file unix_command_mgr.cc.
|
static |
UnixCommandMgr is a singleton class.
This method returns reference to its sole instance.
Definition at line 687 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 & | socket_info | ) |
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. |
socket_info | Configuration information for the unix control socket. |
Definition at line 672 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 698 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 693 of file unix_command_mgr.cc.
Referenced by isc::dhcp::ControlledDhcpv4Srv::ControlledDhcpv4Srv(), isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv(), and isc::d2::D2Process::init().