PcapPlusPlus  23.09
SingleCommandTextProtocol.h
Go to the documentation of this file.
1 #ifndef PACKETPP_SINGLE_COMMAND_TEXT_PROTOCOL_LAYER
2 #define PACKETPP_SINGLE_COMMAND_TEXT_PROTOCOL_LAYER
3 
4 #include <sstream>
5 #include "Layer.h"
6 
8 
13 namespace pcpp
14 {
15 
20  {
21  private:
22  size_t getArgumentFieldOffset() const;
23  void setDelimiter(bool hyphen);
24  bool hyphenRequired(const std::string& value);
25 
26  protected:
27  SingleCommandTextProtocol(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) : Layer(data, dataLen, prevLayer, packet) {};
28  SingleCommandTextProtocol(const std::string &command, const std::string &option);
29 
30  bool setCommandInternal(std::string value);
31  bool setCommandOptionInternal(std::string value);
32 
33  std::string getCommandInternal() const;
34  std::string getCommandOptionInternal() const;
35 
36  public:
37 
43  bool isMultiLine() const;
44 
52  static bool isDataValid(const uint8_t *data, size_t dataSize);
53  };
54 } // namespace pcpp
55 
56 #endif /* PACKETPP_SINGLE_COMMAND_TEXT_PROTOCOL_LAYER */
The main namespace for the PcapPlusPlus lib.
Definition: SingleCommandTextProtocol.h:19
Definition: Layer.h:70
Definition: Packet.h:26
static bool isDataValid(const uint8_t *data, size_t dataSize)