Kea
1.9.9-git
|
Client race avoidance RAII handler. More...
#include <client_handler.h>
Public Member Functions | |
ClientHandler () | |
Public interface. More... | |
ClientHandler () | |
Public interface. More... | |
virtual | ~ClientHandler () |
Destructor. More... | |
virtual | ~ClientHandler () |
Destructor. More... | |
bool | tryLock (Pkt6Ptr query, ContinuationPtr cont=ContinuationPtr()) |
Tries to acquires a client. More... | |
bool | tryLock (Pkt4Ptr query, ContinuationPtr cont=ContinuationPtr()) |
Tries to acquires a client. More... | |
Client race avoidance RAII handler.
Definition at line 38 of file dhcp4/client_handler.h.
isc::dhcp::ClientHandler::ClientHandler | ( | ) |
|
virtual |
Destructor.
Releases the client if it was acquired.
Definition at line 138 of file dhcp4/client_handler.cc.
References isc::util::ThreadPool< WorkItem, Container >::addFront(), isc::dhcp::DBG_DHCP4_BASIC, isc::dhcp::dhcp4_logger, isc::dhcp::DHCP4_PACKET_QUEUE_FULL, isc::util::MultiThreadingMgr::getMode(), isc::util::MultiThreadingMgr::getThreadPool(), and LOG_DEBUG.
isc::dhcp::ClientHandler::ClientHandler | ( | ) |
Public interface.
Constructor.
|
virtual |
Destructor.
Releases the client if it was acquired.
bool isc::dhcp::ClientHandler::tryLock | ( | Pkt6Ptr | query, |
ContinuationPtr | cont = ContinuationPtr() |
||
) |
Tries to acquires a client.
Lookup the client:
query | The query from the client. |
cont | The continuation in the case the client was held. |
Definition at line 85 of file dhcp6/client_handler.cc.
References isc::stats::StatsMgr::addValue(), isc::dhcp::bad_packet6_logger, isc::dhcp::DHCP6_PACKET_DROP_DUPLICATE, isc::stats::StatsMgr::instance(), isc_throw, and LOG_WARN.
bool isc::dhcp::ClientHandler::tryLock | ( | Pkt4Ptr | query, |
ContinuationPtr | cont = ContinuationPtr() |
||
) |
Tries to acquires a client.
Lookup the client:
query | The query from the client. |
cont | The continuation in the case the client was held. |
Definition at line 163 of file dhcp4/client_handler.cc.
References isc::stats::StatsMgr::addValue(), isc::dhcp::bad_packet4_logger, isc::dhcp::DHCP4_PACKET_DROP_0011, isc::dhcp::DHCP4_PACKET_DROP_0012, isc::dhcp::DHO_DHCP_CLIENT_IDENTIFIER, isc::stats::StatsMgr::instance(), isc_throw, and LOG_WARN.
Referenced by isc::dhcp::Dhcpv4Srv::processDhcp4Query(), and isc::dhcp::Dhcpv6Srv::processDhcp6Query().