 |
Kea
1.5.0
|
Go to the documentation of this file.
34 return (dhcp6to4_ipc);
49 if ((old_fd == -1) && (
socket_fd_ != old_fd)) {
66 .arg(
static_cast<int>(pkt->getType()))
67 .arg(pkt->getRemoteAddr().toText())
68 .arg(pkt->getRemotePort())
69 .arg(pkt->getIface());
71 }
catch (
const std::exception& e) {
95 uint8_t msg_type = buf[0];
97 pkt->setRemotePort(relay_port ? relay_port : DHCP6_SERVER_PORT);
99 pkt->setRemotePort(DHCP6_CLIENT_PORT);
111 callout_handle->deleteAllArguments();
117 callout_handle->setArgument(
"response6", pkt);
126 if ((callout_handle->getStatus() == CalloutHandle::NEXT_STEP_SKIP) ||
127 (callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP)) {
129 DHCP6_HOOK_BUFFER_SEND_SKIP)
130 .arg(pkt->getLabel());
134 callout_handle->getArgument(
"response6", pkt);
138 .arg(
static_cast<int>(pkt->getType())).arg(pkt->toText());
146 }
catch (
const std::exception& e) {
bool send(const Pkt6Ptr &pkt)
Sends an IPv6 packet.
static Dhcp6to4Ipc & instance()
Returns pointer to the sole instance of Dhcp6to4Ipc.
#define LOG_ERROR(LOGGER, MESSAGE)
Macro to conveniently test error output and log it.
static CfgMgr & instance()
returns a single instance of Configuration Manager
virtual void open()
Open communication socket.
virtual void open()=0
Open communication socket (for derived classes).
const int DBG_DHCP6_HOOKS
Debug level used to trace hook related operations.
void close()
Close communication socket.
boost::shared_ptr< CalloutHandle > CalloutHandlePtr
A shared pointer to a CalloutHandle object.
isc::log::Logger hooks_logger("hooks")
Hooks Logger.
isc::log::Logger packet6_logger(DHCP6_PACKET_LOGGER_NAME)
Logger for processed packets.
static int getHookIndexBuffer6Send()
Returns the index of the buffer6_send hook.
RAII object enabling copying options retrieved from the packet.
int socket_fd_
Socket descriptor.
Pkt6Ptr receive()
Receive message over IPC.
static void handler()
On receive handler.
static uint16_t checkRelaySourcePort(const Pkt6Ptr &query)
Used for DHCPv4-over-DHCPv6 too.
This class implements the communication between the DHCPv4 and DHCPv6 servers to allow for transmissi...
Defines the logger used by the top-level component of kea-dhcp-ddns.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
#define LOG_DEBUG(LOGGER, LEVEL, MESSAGE)
Macro to conveniently test debug output and log it.
Handles DHCPv4-over-DHCPv6 IPC on the DHCPv6 server side.
void clear()
Clear buffer content.
static IfaceMgr & instance()
IfaceMgr is a singleton class.
The OutputBuffer class is a buffer abstraction for manipulating mutable data.
static void processStatsSent(const Pkt6Ptr &response)
Updates statistics for transmitted packets.
SrvConfigPtr getStagingCfg()
Returns a pointer to the staging configuration.
void addExternalSocket(int socketfd, SocketCallback callback)
Adds external socket and a callback.
A generic exception that is thrown if a parameter given to a method would refer to or modify out-of-r...
const int DBG_DHCP6_DETAIL_DATA
This level is used to log the contents of packets received and sent.
const int DBG_DHCP6_DETAIL
Debug level used to trace detailed errors.
boost::shared_ptr< Pkt6 > Pkt6Ptr
A pointer to Pkt6 packet.
const int DBG_DHCP6_BASIC
Debug level used to trace basic operations within the code.
isc::hooks::CalloutHandlePtr getCalloutHandle(const T &pktptr)
CalloutHandle Store.