12 #define PCPP_END_OF_TEXT_BASED_PROTOCOL_HEADER ""
14 class TextBasedProtocolMessage;
87 return m_IsEndOfHeaderField;
91 HeaderField(
const std::string& name,
const std::string& value,
char nameValueSeparator,
92 bool spacesAllowedBetweenNameAndValue);
94 bool spacesAllowedBetweenNameAndValue);
96 char* getData()
const;
99 void initNewField(
const std::string& name,
const std::string& value);
102 uint8_t* m_NewFieldData;
104 int m_NameOffsetInMessage;
105 size_t m_FieldNameSize;
106 int m_ValueOffsetInMessage;
107 size_t m_FieldValueSize;
110 bool m_IsEndOfHeaderField;
111 char m_NameValueSeparator;
112 bool m_SpacesAllowedBetweenNameAndValue;
157 if (prevField !=
nullptr)
158 return prevField->getNextField();
198 const std::string& fieldValue);
209 const std::string& fieldValue);
275 void shiftFieldsOffset(
HeaderField* fromField,
int numOfBytesToShift);
278 virtual char getHeaderFieldNameValueSeparator()
const = 0;
279 virtual bool spacesAllowedBetweenHeaderFieldNameAndValue()
const = 0;
284 std::multimap<std::string, HeaderField*> m_FieldNameToFieldMap;
Definition: TextBasedProtocol.h:123
bool isHeaderComplete() const
HeaderField * getFieldByName(std::string fieldName, int index=0) const
bool removeField(HeaderField *fieldToRemove)
HeaderField * getFirstField() const
Definition: TextBasedProtocol.h:144
virtual HeaderField * insertField(std::string prevFieldName, const std::string &fieldName, const std::string &fieldValue)
HeaderField * getNextField(HeaderField *prevField) const
Definition: TextBasedProtocol.h:155
bool removeField(std::string fieldName, int index=0)
virtual void computeCalculateFields()
virtual HeaderField * insertField(HeaderField *prevField, const std::string &fieldName, const std::string &fieldValue)
virtual HeaderField * insertField(HeaderField *prevField, const HeaderField &newField)
size_t getHeaderLen() const
virtual void parseNextLayer()
virtual HeaderField * addField(const std::string &fieldName, const std::string &fieldValue)
int getFieldCount() const
virtual HeaderField * addField(const HeaderField &newField)
HeaderField * addEndOfHeader()
The main namespace for the PcapPlusPlus lib.
uint8_t ProtocolType
Definition: ProtocolType.h:17