PcapPlusPlus  Next
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 override
 
- 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)
 
 PayloadLayer (const std::string &payloadAsHexStream)
 
uint8_t * getPayload () const
 
size_t getPayloadLen () const
 
void parseNextLayer () override
 
size_t getHeaderLen () const override
 
void computeCalculateFields () override
 
void setPayload (const uint8_t *newPayload, size_t newPayloadLength)
 
std::string toString () const override
 
OsiModelLayer getOsiModelLayer () const override
 
- Public Member Functions inherited from pcpp::Layer
 ~Layer () override
 
LayergetNextLayer () const
 
LayergetPrevLayer () const
 
ProtocolType getProtocol () const
 
bool isMemberOfProtocolFamily (ProtocolTypeFamily protocolTypeFamily) 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 override
 

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
overridevirtual
Returns
Returns the protocol info as readable string

Implements pcpp::Layer.