PcapPlusPlus  Next
SingleCommandTextProtocol.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <sstream>
4 #include "Layer.h"
5 
7 
10 namespace pcpp
11 {
14  {
15  private:
16  size_t getArgumentFieldOffset() const;
17  void setDelimiter(bool hyphen);
18  bool hyphenRequired(const std::string& value);
19 
20  protected:
21  SingleCommandTextProtocol(uint8_t* data, size_t dataLen, Layer* prevLayer, Packet* packet,
22  ProtocolType protocol)
23  : Layer(data, dataLen, prevLayer, packet, protocol) {};
24 
25  SingleCommandTextProtocol(const std::string& command, const std::string& option, ProtocolType protocol);
26 
27  bool setCommandInternal(std::string value);
28  bool setCommandOptionInternal(std::string value);
29 
30  std::string getCommandInternal() const;
31  std::string getCommandOptionInternal() const;
32 
33  public:
38  bool isMultiLine() const;
39 
45  static bool isDataValid(const uint8_t* data, size_t dataSize);
46  };
47 } // namespace pcpp
Definition: Layer.h:60
Definition: Packet.h:22
Class for single command text based protocol (FTP, SMTP) messages.
Definition: SingleCommandTextProtocol.h:14
static bool isDataValid(const uint8_t *data, size_t dataSize)
The main namespace for the PcapPlusPlus lib.
uint8_t ProtocolType
Definition: ProtocolType.h:13