Kea: isc::netconf::UnixControlSocket Class Reference

| Kea 3.0.3-git

isc::netconf::UnixControlSocket Class Reference

Class for control socket communication over UNIX socket. More...

`#include <unix_control_socket.h>`

Inheritance diagram for isc::netconf::UnixControlSocket:
[legend]

## Public Member Functions
| UnixControlSocket (CfgControlSocketPtr ctrl_sock)
| Constructor.
virtual | ~UnixControlSocket ()=default
| Destructor (does nothing).
data::ConstElementPtr | configGet (const std::string &service) override final
| Get configuration.
data::ConstElementPtr | configSet (data::ElementPtr config, const std::string &service) override final
| Set configuration.
data::ConstElementPtr | configTest (data::ElementPtr config, const std::string &service) override final
| Test configuration.
Public Member Functions inherited from isc::netconf::ControlSocketBase
| ControlSocketBase (CfgControlSocketPtr ctrl_sock)
| Constructor.
virtual | ~ControlSocketBase ()=default
| Destructor (does nothing).
const std::string | getName () const
| Returns the Unix socket name.
CfgControlSocket::Type | getType () const
| Getter which returns the socket type.
const isc::http::Url | getUrl () const
| Returns the HTTP server URL.

## Additional Inherited Members
Public Attributes inherited from isc::netconf::ControlSocketBase
CfgControlSocketPtr | socket_cfg_
| The control socket configuration.

## Detailed Description

Class for control socket communication over UNIX socket.

This class is the derived class for control socket communication over UNIX sockets. This class implements config-get, config-test and config-set.

Definition at line 23 of file unix_control_socket.h.

## Constructor & Destructor Documentation

## ◆ UnixControlSocket()

isc::netconf::UnixControlSocket::UnixControlSocket | ( | CfgControlSocketPtr | ctrl_sock | ) |

Constructor.

Parameters

  ctrl_sock | The control socket configuration.

Definition at line 33 of file unix_control_socket.cc.

References isc::netconf::ControlSocketBase::ControlSocketBase().

Here is the call graph for this function:

## ◆ ~UnixControlSocket()

virtual isc::netconf::UnixControlSocket::~UnixControlSocket | ( |  | ) |
| virtualdefault

Destructor (does nothing).

## Member Function Documentation

## ◆ configGet()

ConstElementPtr isc::netconf::UnixControlSocket::configGet | ( | const std::string & | service | ) |
| finaloverridevirtual

Get configuration.

Call config-get over the control socket.

Parameters

  service | The target service (ignored).

Returns
  The JSON element answer of config-get.

Exceptions

  ControlSocketError | when a communication error occurs.

Implements isc::netconf::ControlSocketBase.

Definition at line 38 of file unix_control_socket.cc.

References isc::config::createCommand().

Here is the call graph for this function:

## ◆ configSet()

ConstElementPtr isc::netconf::UnixControlSocket::configSet | ( | data::ElementPtr | config,
|  | const std::string & | service )
| finaloverridevirtual

Set configuration.

Call config-set over the control socket.

Parameters

  config | The configuration to set.
  service | The target service (ignored).

Returns
  The JSON element answer of config-set.

Exceptions

  ControlSocketError | when a communication error occurs.

Implements isc::netconf::ControlSocketBase.

Definition at line 49 of file unix_control_socket.cc.

References isc::config::createCommand().

Here is the call graph for this function:

## ◆ configTest()

ConstElementPtr isc::netconf::UnixControlSocket::configTest | ( | data::ElementPtr | config,
|  | const std::string & | service )
| finaloverridevirtual

Test configuration.

Call config-test over the control socket.

Parameters

  service | The target service (ignored).
  config | The configuration to test.

Returns
  The JSON element answer of config-test.

Exceptions

  ControlSocketError | when a communication error occurs.

Implements isc::netconf::ControlSocketBase.

Definition at line 43 of file unix_control_socket.cc.

References isc::config::createCommand().

Here is the call graph for this function:

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

- unix_control_socket.h
- unix_control_socket.cc