diff --git a/Packet++/header/FtpLayer.h b/Packet++/header/FtpLayer.h index 63cd6565b4..c0be452282 100644 --- a/Packet++/header/FtpLayer.h +++ b/Packet++/header/FtpLayer.h @@ -14,9 +14,9 @@ namespace pcpp { protected: FtpLayer(uint8_t* data, size_t dataLen, Layer* prevLayer, Packet* packet) - : SingleCommandTextProtocol(data, dataLen, prevLayer, packet, FTP) {}; + : SingleCommandTextProtocol(data, dataLen, prevLayer, packet, FTPControl) {}; FtpLayer(const std::string& command, const std::string& option) - : SingleCommandTextProtocol(command, option, FTP) {}; + : SingleCommandTextProtocol(command, option, FTPControl) {}; public: /// A static method that checks whether the port is considered as FTP control @@ -447,7 +447,7 @@ namespace pcpp FtpDataLayer(uint8_t* data, size_t dataLen, Layer* prevLayer, Packet* packet) : PayloadLayer(data, dataLen, prevLayer, packet) { - m_Protocol = FTP; + m_Protocol = FTPData; }; /// @return Returns the protocol info as readable string diff --git a/Packet++/header/ProtocolType.h b/Packet++/header/ProtocolType.h index 2e6d00044b..e025123bd2 100644 --- a/Packet++/header/ProtocolType.h +++ b/Packet++/header/ProtocolType.h @@ -163,8 +163,8 @@ namespace pcpp /// Telnet Protocol const ProtocolType Telnet = 40; - /// File Transfer (FTP) Protocol - const ProtocolType FTP = 41; + /// File Transfer (FTP) Protocol - Control channel + const ProtocolType FTPControl = 41; /// ICMPv6 protocol const ProtocolType ICMPv6 = 42; @@ -223,6 +223,12 @@ namespace pcpp /// Diagnostic over IP protocol (DOIP) const ProtocolType DOIP = 59; + /// File Transfer Protocol (FTP) Data channel + const ProtocolType FTPData = 60; + + /// FTP protocol family (FTPControl and FtpData protocols) + const ProtocolTypeFamily FTP = 0x3c29; + /// An enum representing OSI model layers enum OsiModelLayer {