PcapPlusPlus
pcpp::NullLoopbackLayer Class Reference

#include <NullLoopbackLayer.h>

Inheritance diagram for pcpp::NullLoopbackLayer:
pcpp::Layer pcpp::IDataContainer

Public Member Functions

 NullLoopbackLayer (uint8_t *data, size_t dataLen, Packet *packet)
 
 NullLoopbackLayer (uint32_t family)
 
 ~NullLoopbackLayer ()
 
uint32_t getFamily ()
 
void setFamily (uint32_t family)
 
void parseNextLayer ()
 
size_t getHeaderLen ()
 
void computeCalculateFields ()
 
std::string toString ()
 
OsiModelLayer getOsiModelLayer ()
 
- Public Member Functions inherited from pcpp::Layer
virtual ~Layer ()
 
LayergetNextLayer ()
 
LayergetPrevLayer ()
 
ProtocolType getProtocol ()
 
uint8_t * getData ()
 
size_t getDataLen ()
 
uint8_t * getLayerPayload ()
 
size_t getLayerPayloadSize ()
 
bool isAllocatedToPacket ()
 
void copyData (uint8_t *toArr)
 
uint8_t * getDataPtr (size_t offset=0)
 

Detailed Description

Represents a NULL/Loopback layer

Constructor & Destructor Documentation

◆ NullLoopbackLayer() [1/2]

pcpp::NullLoopbackLayer::NullLoopbackLayer ( uint8_t *  data,
size_t  dataLen,
Packet packet 
)
inline

A constructor that creates the layer from an existing packet raw data

Parameters
[in]dataA pointer to the raw data
[in]dataLenSize of the data in bytes
[in]packetA pointer to the Packet instance where layer will be stored in

◆ NullLoopbackLayer() [2/2]

pcpp::NullLoopbackLayer::NullLoopbackLayer ( uint32_t  family)

A constructor that allocates a new Null/Loopback header

Parameters
[in]familyThe family protocol to set

◆ ~NullLoopbackLayer()

pcpp::NullLoopbackLayer::~NullLoopbackLayer ( )
inline

A destructor for this layer (does nothing)

Member Function Documentation

◆ computeCalculateFields()

void pcpp::NullLoopbackLayer::computeCalculateFields ( )
inlinevirtual

Does nothing for this layer

Implements pcpp::Layer.

◆ getFamily()

uint32_t pcpp::NullLoopbackLayer::getFamily ( )
Returns
The protocol family in this layer

◆ getHeaderLen()

size_t pcpp::NullLoopbackLayer::getHeaderLen ( )
inlinevirtual
Returns
Size of Null/Loopback header = 4B

Implements pcpp::Layer.

◆ getOsiModelLayer()

OsiModelLayer pcpp::NullLoopbackLayer::getOsiModelLayer ( )
inlinevirtual
Returns
The OSI Model layer this protocol belongs to

Implements pcpp::Layer.

◆ parseNextLayer()

void pcpp::NullLoopbackLayer::parseNextLayer ( )
virtual

Identifies the next layers by family:

Implements pcpp::Layer.

◆ setFamily()

void pcpp::NullLoopbackLayer::setFamily ( uint32_t  family)

Set a protocol family

Parameters
[in]familyThe family protocol to set

◆ toString()

std::string pcpp::NullLoopbackLayer::toString ( )
virtual
Returns
A string representation of the layer most important data (should look like the layer description in Wireshark)

Implements pcpp::Layer.