Kea 2.7.6
isc::dhcp::PktEvent Class Reference

Describes an event during the life cycle of a packet. More...

#include <pkt.h>

Public Member Functions

 PktEvent (const std::string &label, boost::posix_time::ptime timestamp)
 Constructor.
 
 ~PktEvent ()=default
 Destructor.
 

Static Public Member Functions

static boost::posix_time::ptime & EMPTY_TIME ()
 Fetch an empty timestamp, used for logic comparisons.
 
static boost::posix_time::ptime & MAX_TIME ()
 Fetches the maximum timestamp.
 
static boost::posix_time::ptime & MIN_TIME ()
 Fetches the minimum timestamp.
 
static boost::posix_time::ptime now ()
 Fetch the current UTC system time, microsecond precision.
 

Public Attributes

std::string label_
 Label identifying this event.
 
boost::posix_time::ptime timestamp_
 Timestamp at which the event occurred.
 

Static Public Attributes

static const std::string BUFFER_READ
 Event that marks when a packet is read from the socket buffer by application.
 
static const std::string RESPONSE_SENT
 Event that marks when a packet is been written to the socket by application.
 
static const std::string SOCKET_RECEIVED
 Event that marks when a packet is placed in the socket buffer by the kernel.
 

Detailed Description

Describes an event during the life cycle of a packet.

Definition at line 89 of file pkt.h.

Constructor & Destructor Documentation

◆ PktEvent()

isc::dhcp::PktEvent::PktEvent ( const std::string & label,
boost::posix_time::ptime timestamp )
inline

Constructor.

Parameters
labelstring identifying the event.
timestamptime at which the event occurred.

Definition at line 107 of file pkt.h.

◆ ~PktEvent()

isc::dhcp::PktEvent::~PktEvent ( )
default

Destructor.

Member Function Documentation

◆ EMPTY_TIME()

static boost::posix_time::ptime & isc::dhcp::PktEvent::EMPTY_TIME ( )
inlinestatic

Fetch an empty timestamp, used for logic comparisons.

Returns
an unset ptime.

Definition at line 124 of file pkt.h.

Referenced by isc::perfmon::Alarm::checkSample(), isc::dhcp::Pkt::getPktEventTime(), and isc::perfmon::Alarm::setState().

◆ MAX_TIME()

static boost::posix_time::ptime & isc::dhcp::PktEvent::MAX_TIME ( )
inlinestatic

Fetches the maximum timestamp.

Returns
the maximum timestamp

Definition at line 140 of file pkt.h.

◆ MIN_TIME()

static boost::posix_time::ptime & isc::dhcp::PktEvent::MIN_TIME ( )
inlinestatic

Fetches the minimum timestamp.

Returns
the minimum timestamp

Definition at line 132 of file pkt.h.

Referenced by isc::perfmon::MonitoredDuration::getCurrentIntervalStart(), and isc::perfmon::MonitoredDurationStore::getOverdueReports().

◆ now()

static boost::posix_time::ptime isc::dhcp::PktEvent::now ( )
inlinestatic

Fetch the current UTC system time, microsecond precision.

Returns
ptime containing the microsecond system time.

Definition at line 117 of file pkt.h.

Referenced by isc::perfmon::MonitoredDuration::addSample(), isc::perfmon::Alarm::checkSample(), isc::perfmon::MonitoredDurationStore::getReportsNext(), isc::perfmon::PerfMonMgr::perfmonGetAllDurationsHandler(), and isc::perfmon::Alarm::setState().

Member Data Documentation

◆ BUFFER_READ

const std::string isc::dhcp::PktEvent::BUFFER_READ
static

Event that marks when a packet is read from the socket buffer by application.

Definition at line 97 of file pkt.h.

Referenced by isc::dhcp::PktFilterBPF::receive(), and isc::dhcp::PktFilterLPF::receive().

◆ label_

std::string isc::dhcp::PktEvent::label_

Label identifying this event.

Definition at line 146 of file pkt.h.

◆ RESPONSE_SENT

const std::string isc::dhcp::PktEvent::RESPONSE_SENT
static

Event that marks when a packet is been written to the socket by application.

Definition at line 101 of file pkt.h.

Referenced by isc::dhcp::PktFilterBPF::send(), and isc::dhcp::PktFilterLPF::send().

◆ SOCKET_RECEIVED

const std::string isc::dhcp::PktEvent::SOCKET_RECEIVED
static

Event that marks when a packet is placed in the socket buffer by the kernel.

Definition at line 93 of file pkt.h.

Referenced by isc::dhcp::PktFilterBPF::receive(), isc::dhcp::PktFilterInet::receive(), and isc::dhcp::PktFilterLPF::receive().

◆ timestamp_

boost::posix_time::ptime isc::dhcp::PktEvent::timestamp_

Timestamp at which the event occurred.

Definition at line 149 of file pkt.h.


The documentation for this class was generated from the following files: