Move cur_pos from packet into packet manager loop.

This commit is contained in:
Jan Grashoefer 2020-07-17 18:25:22 +02:00 committed by Tim Wojtulewicz
parent c2500d03d6
commit 96d0e11bb8
39 changed files with 148 additions and 169 deletions

View file

@ -63,18 +63,19 @@ public:
bool IsAnalyzer(const char* name);
/**
* Analyzes the given packet. The analysis is supposed to start at cur_pos
* of the packet, which points to the so far unanalyzed part of the packet.
* If the analyzed protocol encapsulates another protocol, the packet's
* cur_pos should be updated to point to that payload.
* Analyzes the given packet. The data reference points to the part of the
* raw packet to be analyzed. If the analyzed protocol encapsulates another
* protocol, the data reference should be updated to point to that payload.
*
* @param packet The packet to analyze.
*
* @param data Reference to the payload pointer into the raw packet.
*
* @return A tuple of analysis result and identifier. The result indicates
* how to proceed. If analysis can continue, the identifier determines the
* encapsulated protocol.
*/
virtual AnalysisResultTuple Analyze(Packet* packet) = 0;
virtual AnalysisResultTuple Analyze(Packet* packet, const uint8_t*& data) = 0;
protected:
friend class Manager;