Kea 2.7.6
|
Client race avoidance RAII handler. More...
#include <client_handler.h>
Public Member Functions | |
ClientHandler () | |
Public interface. | |
ClientHandler () | |
Public interface. | |
virtual | ~ClientHandler () |
Destructor. | |
virtual | ~ClientHandler () |
Destructor. | |
bool | tryLock (Pkt4Ptr query, ContinuationPtr cont=ContinuationPtr()) |
Tries to acquires a client. | |
bool | tryLock (Pkt6Ptr query, ContinuationPtr cont=ContinuationPtr()) |
Tries to acquires a client. | |
Client race avoidance RAII handler.
Definition at line 37 of file dhcp6/client_handler.h.
isc::dhcp::ClientHandler::ClientHandler | ( | ) |
|
virtual |
Destructor.
Releases the client if it was acquired.
Definition at line 139 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(), isc::util::MultiThreadingMgr::instance(), and LOG_DEBUG.
isc::dhcp::ClientHandler::ClientHandler | ( | ) |
Public interface.
Constructor.
|
virtual |
Destructor.
Releases the client if it was acquired.
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 164 of file dhcp4/client_handler.cc.
References isc::stats::StatsMgr::addValue(), isc::dhcp::bad_packet4_logger, isc::log::DBGLVL_PKT_HANDLING, isc::dhcp::DHCP4_PACKET_DROP_0011, isc::dhcp::DHCP4_PACKET_DROP_0012, isc::stats::StatsMgr::instance(), isc_throw, and LOG_DEBUG.
Referenced by isc::dhcp::Dhcpv4Srv::processDhcp4Query(), and isc::dhcp::Dhcpv6Srv::processDhcp6Query().
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 86 of file dhcp6/client_handler.cc.
References isc::dhcp::bad_packet6_logger, isc::log::DBGLVL_PKT_HANDLING, isc::dhcp::DHCP6_PACKET_DROP_DUPLICATE, isc_throw, and LOG_DEBUG.