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

pcpp::ConnectionData::ConnectionData ( )
inline

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

pcpp::ConnectionData::~ConnectionData ( )

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

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

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

Member Function Documentation

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

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

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
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

IPAddress* pcpp::ConnectionData::dstIP

Destination IP address

size_t pcpp::ConnectionData::dstPort

Destination TCP/UDP port

uint32_t pcpp::ConnectionData::flowKey

A 4-byte hash key representing the connection

IPAddress* pcpp::ConnectionData::srcIP

Source IP address

size_t pcpp::ConnectionData::srcPort

Source TCP/UDP port