PcapPlusPlus
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)
 
uint16_t getIpID ()
 
IPv4Address getSrcIP ()
 
IPv4Address getDstIP ()
 
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 ()
 

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

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

A default c'tor which zeros all members

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
pcpp::IPReassembly::IPv4PacketKey::IPv4PacketKey ( const IPv4PacketKey other)
inline

A copy c'tor for this class

Member Function Documentation

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.

IPv4Address pcpp::IPReassembly::IPv4PacketKey::getDstIP ( )
inline
Returns
Dest IP address
uint32_t pcpp::IPReassembly::IPv4PacketKey::getHashValue ( ) const
virtual
Returns
A 4-byte hash value of the packet key

Implements pcpp::IPReassembly::PacketKey.

uint16_t pcpp::IPReassembly::IPv4PacketKey::getIpID ( )
inline
Returns
IP ID value
ProtocolType pcpp::IPReassembly::IPv4PacketKey::getProtocolType ( ) const
inlinevirtual
Returns
pcpp::IPv4 protocol

Implements pcpp::IPReassembly::PacketKey.

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

Set dest IPv4 address

Parameters
[in]dstIPDest IP to set
void pcpp::IPReassembly::IPv4PacketKey::setIpID ( uint16_t  ipID)
inline

Set IP ID

Parameters
[in]ipIDIP ID value to set
void pcpp::IPReassembly::IPv4PacketKey::setSrcIP ( const IPv4Address srcIP)
inline

Set source IPv4 address

Parameters
[in]srcIPSource IP to set