PcapPlusPlus  23.09
pcpp::FtpDataLayer Class Reference

#include <FtpLayer.h>

Inheritance diagram for pcpp::FtpDataLayer:
pcpp::PayloadLayer pcpp::Layer pcpp::IDataContainer

Public Member Functions

 FtpDataLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
 
std::string toString () const
 
- Public Member Functions inherited from pcpp::PayloadLayer
 PayloadLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
 
 PayloadLayer (const uint8_t *data, size_t dataLen, bool dummy)
 
 PayloadLayer (const std::string &payloadAsHexStream)
 
uint8_t * getPayload () const
 
size_t getPayloadLen () const
 
void parseNextLayer ()
 
size_t getHeaderLen () const
 
void computeCalculateFields ()
 
void setPayload (const uint8_t *newPayload, size_t newPayloadLength)
 
std::string toString () const
 
OsiModelLayer getOsiModelLayer () const
 
- Public Member Functions inherited from pcpp::Layer
virtual ~Layer ()
 
LayergetNextLayer () const
 
LayergetPrevLayer () const
 
ProtocolType getProtocol () const
 
uint8_t * getData () const
 
size_t getDataLen () const
 
uint8_t * getLayerPayload () const
 
size_t getLayerPayloadSize () const
 
bool isAllocatedToPacket () const
 
void copyData (uint8_t *toArr) const
 
uint8_t * getDataPtr (size_t offset=0) const
 

Detailed Description

Class for representing the data of FTP Layer

Constructor & Destructor Documentation

◆ FtpDataLayer()

pcpp::FtpDataLayer::FtpDataLayer ( uint8_t *  data,
size_t  dataLen,
Layer prevLayer,
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]prevLayerA pointer to the previous layer
[in]packetA pointer to the Packet instance where layer will be stored in

Member Function Documentation

◆ toString()

std::string pcpp::FtpDataLayer::toString ( ) const
virtual
Returns
Returns the protocol info as readable string

Implements pcpp::Layer.