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)
 

Public Attributes

IPAddresssrcIP
 
IPAddressdstIP
 
size_t srcPort
 
size_t dstPort
 
uint32_t flowKey
 

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

◆ 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

Member Data Documentation

◆ dstIP

IPAddress* pcpp::ConnectionData::dstIP

Destination IP address

◆ dstPort

size_t pcpp::ConnectionData::dstPort

Destination TCP/UDP port

◆ 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