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