PcapPlusPlus  24.09
pcpp::IPReassembly::IPv4PacketKey Class Reference

#include <IPReassembly.h>

Inheritance diagram for pcpp::IPReassembly::IPv4PacketKey:
pcpp::IPReassembly::PacketKey

Public Member Functions

 IPv4PacketKey ()
 
 IPv4PacketKey (uint16_t ipid, IPv4Address srcip, IPv4Address dstip)
 
 IPv4PacketKey (const IPv4PacketKey &other)
 
IPv4PacketKeyoperator= (const IPv4PacketKey &other)
 
uint16_t getIpID () const
 
IPv4Address getSrcIP () const
 
IPv4Address getDstIP () const
 
void setIpID (uint16_t ipID)
 
void setSrcIP (const IPv4Address &srcIP)
 
void setDstIP (const IPv4Address &dstIP)
 
uint32_t getHashValue () const
 
ProtocolType getProtocolType () const
 
PacketKeyclone () const
 
- Public Member Functions inherited from pcpp::IPReassembly::PacketKey
virtual ~PacketKey ()=default
 

Detailed Description

Represents a key that can uniquely identify IPv4 packets. The key comprises of source IPv4 address, dest IPv4 address and IP ID

Constructor & Destructor Documentation

◆ IPv4PacketKey() [1/3]

pcpp::IPReassembly::IPv4PacketKey::IPv4PacketKey ( )
inline

A default c'tor which zeros all members

◆ IPv4PacketKey() [2/3]

pcpp::IPReassembly::IPv4PacketKey::IPv4PacketKey ( uint16_t  ipid,
IPv4Address  srcip,
IPv4Address  dstip 
)
inline

A c'tor that sets values in each one of the members

Parameters
[in]ipidIP ID value
[in]srcipSource IPv4 address
[in]dstipDest IPv4 address

◆ IPv4PacketKey() [3/3]

pcpp::IPReassembly::IPv4PacketKey::IPv4PacketKey ( const IPv4PacketKey other)
inline

A copy c'tor for this class

Parameters
[in]otherThe instance to copy from

Member Function Documentation

◆ clone()

PacketKey* pcpp::IPReassembly::IPv4PacketKey::clone ( ) const
inlinevirtual
Returns
A pointer to a new instance which is a clone of the current instance

Implements pcpp::IPReassembly::PacketKey.

◆ getDstIP()

IPv4Address pcpp::IPReassembly::IPv4PacketKey::getDstIP ( ) const
inline
Returns
Dest IP address

◆ getHashValue()

uint32_t pcpp::IPReassembly::IPv4PacketKey::getHashValue ( ) const
virtual
Returns
A 4-byte hash value of the packet key

Implements pcpp::IPReassembly::PacketKey.

◆ getIpID()

uint16_t pcpp::IPReassembly::IPv4PacketKey::getIpID ( ) const
inline
Returns
IP ID value

◆ getProtocolType()

ProtocolType pcpp::IPReassembly::IPv4PacketKey::getProtocolType ( ) const
inlinevirtual
Returns
pcpp::IPv4 protocol

Implements pcpp::IPReassembly::PacketKey.

◆ getSrcIP()

IPv4Address pcpp::IPReassembly::IPv4PacketKey::getSrcIP ( ) const
inline
Returns
Source IP address

◆ operator=()

IPv4PacketKey& pcpp::IPReassembly::IPv4PacketKey::operator= ( const IPv4PacketKey other)
inline

Assignment operator for this class

Parameters
[in]otherThe instance to assign from

◆ setDstIP()

void pcpp::IPReassembly::IPv4PacketKey::setDstIP ( const IPv4Address dstIP)
inline

Set dest IPv4 address

Parameters
[in]dstIPDest IP to set

◆ setIpID()

void pcpp::IPReassembly::IPv4PacketKey::setIpID ( uint16_t  ipID)
inline

Set IP ID

Parameters
[in]ipIDIP ID value to set

◆ setSrcIP()

void pcpp::IPReassembly::IPv4PacketKey::setSrcIP ( const IPv4Address srcIP)
inline

Set source IPv4 address

Parameters
[in]srcIPSource IP to set