![]() |
Kea 2.7.3
|
Socket wrapper structure. More...
#include <perf_socket.h>
Public Member Functions | |
BasePerfSocket () | |
Default constructor of BasePerfSocket. | |
virtual | ~BasePerfSocket ()=default |
Destructor of the socket wrapper class. | |
virtual dhcp::IfacePtr | getIface ()=0 |
See description of this method in PerfSocket class below. | |
virtual dhcp::Pkt4Ptr | receive4 (uint32_t timeout_sec, uint32_t timeout_usec)=0 |
See description of this method in PerfSocket class below. | |
virtual dhcp::Pkt6Ptr | receive6 (uint32_t timeout_sec, uint32_t timeout_usec)=0 |
See description of this method in PerfSocket class below. | |
virtual bool | send (const dhcp::Pkt4Ptr &pkt)=0 |
See description of this method in PerfSocket class below. | |
virtual bool | send (const dhcp::Pkt6Ptr &pkt)=0 |
See description of this method in PerfSocket class below. | |
![]() | |
SocketInfo (const isc::asiolink::IOAddress &addr, const uint16_t port, const int sockfd, const int fallbackfd=-1) | |
SocketInfo constructor. | |
Public Attributes | |
unsigned int | ifindex_ |
Interface index. | |
![]() | |
isc::asiolink::IOAddress | addr_ |
int | fallbackfd_ |
Fallback socket descriptor. | |
uint16_t | family_ |
socket port | |
uint16_t | port_ |
bound address | |
int | sockfd_ |
IPv4 or IPv6. | |
Socket wrapper structure.
This is a base class that is inherited by PerfSocket and unit tests derived that. This way it allows mocking out socket operations and avoid using real network interfaces.
Definition at line 26 of file perf_socket.h.
|
inline |
Default constructor of BasePerfSocket.
Definition at line 32 of file perf_socket.h.
|
virtualdefault |
Destructor of the socket wrapper class.
|
pure virtual |
See description of this method in PerfSocket class below.
Implemented in isc::perfdhcp::PerfSocket.
Referenced by isc::perfdhcp::TestControl::setDefaults4(), and isc::perfdhcp::TestControl::setDefaults6().
|
pure virtual |
See description of this method in PerfSocket class below.
Implemented in isc::perfdhcp::PerfSocket.
|
pure virtual |
See description of this method in PerfSocket class below.
Implemented in isc::perfdhcp::PerfSocket.
|
pure virtual |
See description of this method in PerfSocket class below.
Implemented in isc::perfdhcp::PerfSocket.
Referenced by isc::perfdhcp::AvalancheScen::resendPackets(), isc::perfdhcp::TestControl::sendDiscover4(), isc::perfdhcp::TestControl::sendDiscover4(), isc::perfdhcp::TestControl::sendMessageFromAck(), isc::perfdhcp::TestControl::sendMessageFromReply(), isc::perfdhcp::TestControl::sendRequest4(), isc::perfdhcp::TestControl::sendRequest4(), isc::perfdhcp::TestControl::sendRequest6(), isc::perfdhcp::TestControl::sendRequest6(), isc::perfdhcp::TestControl::sendSolicit6(), and isc::perfdhcp::TestControl::sendSolicit6().
|
pure virtual |
See description of this method in PerfSocket class below.
Implemented in isc::perfdhcp::PerfSocket.
unsigned int isc::perfdhcp::BasePerfSocket::ifindex_ |
Interface index.
Definition at line 29 of file perf_socket.h.
Referenced by isc::perfdhcp::PerfSocket::~PerfSocket(), isc::perfdhcp::PerfSocket::getIface(), isc::perfdhcp::PerfSocket::initSocketData(), isc::perfdhcp::TestControl::setDefaults4(), and isc::perfdhcp::TestControl::setDefaults6().