libtins
4.0
|
Represents a sniffed packet. More...
#include <packet.h>
Public Types | |
typedef PDUType | pdu_type |
typedef TimestampType | timestamp_type |
Public Member Functions | |
operator pdu_type () | |
User defined conversion to wrapped_type. More... | |
pdu_type | pdu () |
Returns the wrapped_type. | |
const pdu_type | pdu () const |
Returns the PDU const reference. | |
const Timestamp & | timestamp () const |
Returns the packet timestamp. More... | |
Friends | |
class | BaseSniffer |
class | SnifferIterator |
Represents a sniffed packet.
RefPackets contain a PDU reference and a timestamp. The difference between this class and the Packet class is that this one contains a reference to a PDU, and not a pointer to one.
This class is only used in some BaseSniffer methods as a thin wrapper to a PDU pointer/reference. Only BaseSniffer and derived objects can create instances of it.
|
inline |
User defined conversion to wrapped_type.
This conversion is defined so that BaseSniffer::sniff_loop callback or code that calls BaseSniffer::next_packet can still receive a PDU pointer/reference without modifying the code at all.
|
inline |
Returns the packet timestamp.
This is the timestamp in which the packet was taken out of the network interface/pcap file.