Yate
CaptureInfo Class Reference

Data associated with a captured packet. More...

#include <yateclass.h>

Public Member Functions

 CaptureInfo (uint64_t ts=Time::now(), SocketAddr *srcAddr=0, SocketAddr *dstAddr=0, const NamedList &extra=NamedList::empty())
 
SocketAddrsrcAddr () const
 
SocketAddrdstAddr () const
 
const NamedListextraInfo () const
 
uint64_t ts () const
 
uint16_t srcPort () const
 
uint16_t dstPort () const
 

Detailed Description

Data associated with a captured packet.

CaptureInfo class allows passing information about a captured packet

Constructor & Destructor Documentation

◆ CaptureInfo()

CaptureInfo ( uint64_t ts = Time::now(),
SocketAddr * srcAddr = 0,
SocketAddr * dstAddr = 0,
const NamedList & extra = NamedList::empty() )
inline

Constructor

Parameters
tsTimestamp when packet was captures/created in microseconds
srcAddrSource address of the packet
dstAddrDestination address of the packet
extraExtra parameters

Member Function Documentation

◆ dstAddr()

SocketAddr * dstAddr ( ) const
inline

Retrieve the destination address of this packet

Returns
The destination address of the packet

◆ dstPort()

uint16_t dstPort ( ) const
inline

Destination port of this packet

Returns
Destination port of this packet, 0 if not known

◆ extraInfo()

const NamedList & extraInfo ( ) const
inline

Get the extra information parameters

Returns
The extra information parameters

◆ srcAddr()

SocketAddr * srcAddr ( ) const
inline

Retrieve the source address

Returns
The source address of the packet

◆ srcPort()

uint16_t srcPort ( ) const
inline

Source port of this packet

Returns
Source port of this packet, 0 if not known

◆ ts()

uint64_t ts ( ) const
inline

Timestamp in microseconds when this packet was captured

Returns
The timestamp of this packet

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