PcapPlusPlus  Next
pcpp::FtpLayer Class Reference

#include <FtpLayer.h>

Inheritance diagram for pcpp::FtpLayer:
pcpp::SingleCommandTextProtocol pcpp::Layer pcpp::IDataContainer pcpp::FtpRequestLayer pcpp::FtpResponseLayer

Public Member Functions

void parseNextLayer () override
 FTP is the always last so does nothing for this layer.
 
size_t getHeaderLen () const override
 
void computeCalculateFields () override
 Does nothing for this layer.
 
OsiModelLayer getOsiModelLayer () const override
 
- Public Member Functions inherited from pcpp::SingleCommandTextProtocol
bool isMultiLine () const
 
- 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
 
virtual std::string toString () const =0
 

Static Public Member Functions

static bool isFtpPort (uint16_t port)
 
static bool isFtpDataPort (uint16_t port)
 
- Static Public Member Functions inherited from pcpp::SingleCommandTextProtocol
static bool isDataValid (const uint8_t *data, size_t dataSize)
 

Detailed Description

Class for general FTP message

Member Function Documentation

◆ getHeaderLen()

size_t pcpp::FtpLayer::getHeaderLen ( ) const
inlineoverridevirtual
Returns
Get the size of the layer

Implements pcpp::Layer.

◆ getOsiModelLayer()

OsiModelLayer pcpp::FtpLayer::getOsiModelLayer ( ) const
inlineoverridevirtual
Returns
The OSI layer level of FTP (Application Layer).

Implements pcpp::Layer.

◆ isFtpDataPort()

static bool pcpp::FtpLayer::isFtpDataPort ( uint16_t  port)
inlinestatic

A static method that checks whether the port is considered as FTP data

Parameters
[in]portThe port number to be checked

◆ isFtpPort()

static bool pcpp::FtpLayer::isFtpPort ( uint16_t  port)
inlinestatic

A static method that checks whether the port is considered as FTP control

Parameters
[in]portThe port number to be checked