PcapPlusPlus
pcpp::ConnectionData Struct Reference

#include <TcpReassembly.h>

Public Member Functions

 ConnectionData ()
 
 ~ConnectionData ()
 
 ConnectionData (const ConnectionData &other)
 
ConnectionDataoperator= (const ConnectionData &other)
 
void setSrcIpAddress (const IPAddress *sourceIP)
 
void setDstIpAddress (const IPAddress *destIP)
 
void setStartTime (const timeval &startTime)
 
void setEndTime (const timeval &endTime)
 

Public Attributes

IPAddresssrcIP
 
IPAddressdstIP
 
size_t srcPort
 
size_t dstPort
 
uint32_t flowKey
 
timeval startTime
 
timeval endTime
 

Detailed Description

Represents basic TCP/UDP + IP connection data

Constructor & Destructor Documentation

◆ ConnectionData() [1/2]

pcpp::ConnectionData::ConnectionData ( )
inline

A c'tor for this struct that basically zeros all members

◆ ~ConnectionData()

pcpp::ConnectionData::~ConnectionData ( )

A d'tor for this strcut. Notice it frees the memory of srcIP and dstIP members

◆ ConnectionData() [2/2]

pcpp::ConnectionData::ConnectionData ( const ConnectionData other)

A copy constructor for this struct. Notice it clones ConnectionData::srcIP and ConnectionData::dstIP

Member Function Documentation

◆ operator=()

ConnectionData& pcpp::ConnectionData::operator= ( const ConnectionData other)

An assignment operator for this struct. Notice it clones ConnectionData::srcIP and ConnectionData::dstIP

◆ setDstIpAddress()

void pcpp::ConnectionData::setDstIpAddress ( const IPAddress destIP)
inline

Set destination IP

Parameters
[in]destIPA pointer to the destination IP to set. Notice the IPAddress object will be cloned

◆ setEndTime()

void pcpp::ConnectionData::setEndTime ( const timeval &  endTime)
inline

Set endTime of Connection

Parameters
[in]endTimeinteger value

◆ setSrcIpAddress()

void pcpp::ConnectionData::setSrcIpAddress ( const IPAddress sourceIP)
inline

Set source IP

Parameters
[in]sourceIPA pointer to the source IP to set. Notice the IPAddress object will be cloned

◆ setStartTime()

void pcpp::ConnectionData::setStartTime ( const timeval &  startTime)
inline

Set startTime of Connection

Parameters
[in]startTimeinteger value

Member Data Documentation

◆ dstIP

IPAddress* pcpp::ConnectionData::dstIP

Destination IP address

◆ dstPort

size_t pcpp::ConnectionData::dstPort

Destination TCP/UDP port

◆ endTime

timeval pcpp::ConnectionData::endTime

End TimeStamp of the connection

◆ flowKey

uint32_t pcpp::ConnectionData::flowKey

A 4-byte hash key representing the connection

◆ srcIP

IPAddress* pcpp::ConnectionData::srcIP

Source IP address

◆ srcPort

size_t pcpp::ConnectionData::srcPort

Source TCP/UDP port

◆ startTime

timeval pcpp::ConnectionData::startTime

Start TimeStamp of the connection