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

Static Public Member Functions

static bool isFtpPort (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
inlinevirtual
Returns
Get the size of the layer

Implements pcpp::Layer.

◆ getOsiModelLayer()

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

Implements pcpp::Layer.

◆ isFtpPort()

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

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

Parameters
[in]portThe port number to be checked