Kea 2.7.6
isc::config::UnixCommandMgr Class Reference

Unix Commands Manager implementation for the Kea servers. More...

#include <unix_command_mgr.h>

+ Inheritance diagram for isc::config::UnixCommandMgr:

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 UnixCommandMgrinstance ()
 UnixCommandMgr is a singleton class.
 

Detailed Description

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.

Member Function Documentation

◆ addExternalSockets()

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.

Parameters
use_externalTrue (default) add external sockets.

Definition at line 703 of file unix_command_mgr.cc.

Referenced by isc::d2::D2Process::init().

◆ closeCommandSocket()

◆ getControlSocketFD()

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.

◆ instance()

◆ openCommandSocket()

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).

Exceptions
BadSocketInfoWhen socket configuration is invalid.
SocketErrorWhen socket operation fails.
Parameters
socket_infoConfiguration 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().

◆ setConnectionTimeout()

void isc::config::UnixCommandMgr::setConnectionTimeout ( const long timeout)

Override default connection timeout.

Parameters
timeoutNew connection timeout in milliseconds.

Definition at line 698 of file unix_command_mgr.cc.

◆ setIOService()

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.

Parameters
io_servicePointer 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().


The documentation for this class was generated from the following files: