Kea 2.7.6
|
Handles DHCPv4-over-DHCPv6 IPC on the DHCPv6 server side. More...
#include <dhcp6to4_ipc.h>
Public Member Functions | |
virtual void | open () |
Open communication socket. | |
Public Member Functions inherited from isc::dhcp::Dhcp4o6IpcBase | |
void | close () |
Close communication socket. | |
Pkt6Ptr | receive () |
Receive message over IPC. | |
void | send (const Pkt6Ptr &pkt) |
Send message over IPC. | |
Static Public Member Functions | |
static void | handler (int) |
On receive handler. | |
static Dhcp6to4Ipc & | instance () |
Returns pointer to the sole instance of Dhcp6to4Ipc. | |
Static Public Attributes | |
static uint16_t | client_port = 0 |
Protected Member Functions | |
Dhcp6to4Ipc () | |
Constructor. | |
virtual | ~Dhcp6to4Ipc () |
Destructor. | |
Protected Member Functions inherited from isc::dhcp::Dhcp4o6IpcBase | |
Dhcp4o6IpcBase () | |
Constructor. | |
virtual | ~Dhcp4o6IpcBase () |
Destructor. | |
int | open (uint16_t port, EndpointType endpoint_type) |
Open communication socket (from base class). | |
Additional Inherited Members | |
Public Types inherited from isc::dhcp::Dhcp4o6IpcBase | |
enum | EndpointType { ENDPOINT_TYPE_V4 = 4 , ENDPOINT_TYPE_V6 = 6 } |
Endpoint type: DHCPv4 or DHCPv6 server. More... | |
Protected Attributes inherited from isc::dhcp::Dhcp4o6IpcBase | |
uint16_t | port_ |
Port number configured for IPC communication. | |
int | socket_fd_ |
Socket descriptor. | |
Handles DHCPv4-over-DHCPv6 IPC on the DHCPv6 server side.
Definition at line 21 of file dhcp6to4_ipc.h.
|
protected |
|
inlineprotectedvirtual |
Destructor.
Definition at line 29 of file dhcp6to4_ipc.h.
|
static |
On receive handler.
The handler sends the DHCPv6 packet back to the remote address
Definition at line 57 of file dhcp6to4_ipc.cc.
References isc::hooks::HooksManager::callCallouts(), isc::hooks::HooksManager::calloutsPresent(), isc::dhcp::Dhcpv6Srv::checkRelaySourcePort(), isc::util::OutputBuffer::clear(), client_port, isc::dhcp::DBG_DHCP6_BASIC, isc::dhcp::DBG_DHCP6_DETAIL, isc::dhcp::DBG_DHCP6_DETAIL_DATA, isc::dhcp::DBG_DHCP6_HOOKS, isc::dhcp::DHCP6_DHCP4O6_PACKET_RECEIVED, isc::dhcp::DHCP6_DHCP4O6_RECEIVE_FAIL, isc::dhcp::DHCP6_DHCP4O6_RECEIVING, isc::dhcp::DHCP6_DHCP4O6_RESPONSE_DATA, isc::dhcp::DHCP6_DHCP4O6_SEND_FAIL, isc::dhcp::DHCP6_HOOK_BUFFER_SEND_SKIP, DHCPV6_RELAY_FORW, DHCPV6_RELAY_REPL, isc::dhcp::getCalloutHandle(), isc::dhcp::Dhcpv6Srv::getHookIndexBuffer6Send(), isc::hooks::hooks_logger, instance(), isc::dhcp::IfaceMgr::instance(), LOG_DEBUG, LOG_ERROR, isc::hooks::CalloutHandle::NEXT_STEP_DROP, isc::hooks::CalloutHandle::NEXT_STEP_SKIP, isc::dhcp::packet6_logger, isc::dhcp::Dhcpv6Srv::processStatsSent(), isc::dhcp::Dhcp4o6IpcBase::receive(), and isc::dhcp::IfaceMgr::send().
Referenced by open().
|
static |
Returns pointer to the sole instance of Dhcp6to4Ipc.
Dhcp6to4Ipc is a singleton class
Definition at line 34 of file dhcp6to4_ipc.cc.
Referenced by isc::dhcp::Dhcpv6Srv::Dhcpv6Srv(), isc::dhcp::Dhcpv6Srv::~Dhcpv6Srv(), handler(), isc::dhcp::ControlledDhcpv6Srv::processConfig(), and isc::dhcp::Dhcpv6Srv::processDhcp4Query().
|
virtual |
Open communication socket.
Call base open method and sets the handler/callback when needed
Implements isc::dhcp::Dhcp4o6IpcBase.
Definition at line 39 of file dhcp6to4_ipc.cc.
References isc::dhcp::IfaceMgr::addExternalSocket(), isc::dhcp::Dhcp4o6IpcBase::close(), isc::dhcp::Dhcp4o6IpcBase::ENDPOINT_TYPE_V6, isc::dhcp::CfgMgr::getStagingCfg(), handler(), isc::dhcp::CfgMgr::instance(), isc::dhcp::IfaceMgr::instance(), isc_throw, isc::dhcp::Dhcp4o6IpcBase::open(), and isc::dhcp::Dhcp4o6IpcBase::socket_fd_.
Referenced by isc::dhcp::ControlledDhcpv6Srv::processConfig().
|
static |
client_port | UDP port where all responses are sent to. Not zero is mostly useful for testing purposes. |
Definition at line 51 of file dhcp6to4_ipc.h.
Referenced by isc::dhcp::Dhcpv6Srv::Dhcpv6Srv(), and handler().