Kea: unix_control_socket.h Source File

| Kea 3.2.0-git

unix_control_socket.h
Go to the documentation of this file.
1// Copyright (C) 2018-2022 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
9
10#ifndef UNIX_CONTROL_SOCKET_H
11#define UNIX_CONTROL_SOCKET_H
12
13#include <netconf/control_socket.h>
14
15namespace isc {
16namespace netconf {
17
23 class UnixControlSocket : public ControlSocketBase {
24public:
28 UnixControlSocket(CfgControlSocketPtr ctrl_sock);
29
31 virtual ~UnixControlSocket() = default;
32
40 data::ConstElementPtr configGet(const std::string& service) override final;
41
50 data::ConstElementPtr configTest(data::ElementPtr config,
51 const std::string& service) override final;
52
61 data::ConstElementPtr configSet(data::ElementPtr config,
62 const std::string& service) override final;
63
64private:
72 data::ConstElementPtr sendCommand(data::ConstElementPtr command);
73}; // UnixControlSocket
74
76 using UnixControlSocketPtr = std::shared_ptr<UnixControlSocket>;
77
82template <> ControlSocketBasePtr
83 createControlSocket<CfgControlSocket::Type::UNIX>(CfgControlSocketPtr ctrl_sock);
84
85} // namespace netconf
86} // namespace isc
87
88#endif // UNIX_CONTROL_SOCKET_H
isc::netconf::ControlSocketBase::ControlSocketBase
ControlSocketBase(CfgControlSocketPtr ctrl_sock)
Constructor.
Definition control_socket.h:39
isc::netconf::UnixControlSocket::configTest
data::ConstElementPtr configTest(data::ElementPtr config, const std::string &service) override final
Test configuration.
Definition unix_control_socket.cc:44
isc::netconf::UnixControlSocket::~UnixControlSocket
virtual ~UnixControlSocket()=default
Destructor (does nothing).
isc::netconf::UnixControlSocket::UnixControlSocket
UnixControlSocket(CfgControlSocketPtr ctrl_sock)
Constructor.
Definition unix_control_socket.cc:34
isc::netconf::UnixControlSocket::configGet
data::ConstElementPtr configGet(const std::string &service) override final
Get configuration.
Definition unix_control_socket.cc:39
isc::netconf::UnixControlSocket::configSet
data::ConstElementPtr configSet(data::ElementPtr config, const std::string &service) override final
Set configuration.
Definition unix_control_socket.cc:50
control_socket.h
Contains declarations for control socket communication.
isc::config
Definition command_interpreter.cc:23
isc::data::ConstElementPtr
boost::shared_ptr< const Element > ConstElementPtr
Definition data.h:30
isc::data::ElementPtr
boost::shared_ptr< Element > ElementPtr
Definition data.h:29
isc::netconf
Definition control_socket.cc:20
isc::netconf::ControlSocketBasePtr
std::shared_ptr< ControlSocketBase > ControlSocketBasePtr
Type definition for the pointer to the ControlSocketBase.
Definition control_socket.h:106
isc::netconf::createControlSocket< CfgControlSocket::Type::UNIX >
ControlSocketBasePtr createControlSocket< CfgControlSocket::Type::UNIX >(CfgControlSocketPtr ctrl_sock)
Factory template specialization for unix control sockets.
Definition unix_control_socket.cc:30
isc::netconf::CfgControlSocketPtr
std::shared_ptr< CfgControlSocket > CfgControlSocketPtr
Defines a pointer for CfgControlSocket instances.
Definition netconf_config.h:143
isc::netconf::UnixControlSocketPtr
std::shared_ptr< UnixControlSocket > UnixControlSocketPtr
Type definition for the pointer to the UnixControlSocket.
Definition unix_control_socket.h:76
isc
Defines the logger used by the top-level component of kea-lfc.
Definition check_exists_add.cc:18