Add base class for IP-based packet analyzers

This commit is contained in:
Tim Wojtulewicz 2021-04-13 15:36:31 -07:00
parent 3e1692676d
commit c1f0d312b5
23 changed files with 781 additions and 421 deletions

View file

@ -17,8 +17,11 @@ public:
*
* @param name The name for the type of analyzer. The name must match
* the one the corresponding Component registers.
* @param report_unknown_protocols Flag for whether to report unknown
* protocols during packet forwarding. This should generally always be
* set to true.
*/
explicit Analyzer(std::string name);
explicit Analyzer(std::string name, bool report_unknown_protocols=true);
/**
* Constructor.
@ -165,6 +168,11 @@ private:
Dispatcher dispatcher;
AnalyzerPtr default_analyzer = nullptr;
/**
* Flag for whether to report unknown protocols in ForwardPacket.
*/
bool report_unknown_protocols = true;
void Init(const Tag& tag);
};