mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 08:08:19 +00:00
packet_analysis: Introduce PacketAnalyzer::__disable_analyzer()
This adds machinery to the packet_analysis manager for disabling and enabling packet analyzers and implements two low-level bifs to use it. Extend Analyzer::enable_analyzer() and Analyzer::disable_analyzer() to transparently work with packet analyzers, too. This also allows to add packet analyzers to Analyzer::disabled_analyzers.
This commit is contained in:
parent
0d5c669c1c
commit
af5a0215c0
12 changed files with 206 additions and 11 deletions
|
@ -82,6 +82,46 @@ public:
|
|||
*/
|
||||
AnalyzerPtr GetAnalyzer(const std::string& name);
|
||||
|
||||
/**
|
||||
* Enables an analyzer type. Only enabled analyzers will participate
|
||||
* in packet processing.
|
||||
*
|
||||
* @param tag The analyzer's tag.
|
||||
*
|
||||
* @return True if successful.
|
||||
*/
|
||||
bool EnableAnalyzer(zeek::EnumVal* tag);
|
||||
|
||||
/**
|
||||
* Enables an analyzer type. Only enabled analyzers will participate
|
||||
* in packet processing.
|
||||
*
|
||||
* @param tag The analyzer's tag.
|
||||
*
|
||||
* @return True if successful.
|
||||
*/
|
||||
bool EnableAnalyzer(const zeek::Tag& tag) { return EnableAnalyzer(tag.AsVal().get()); }
|
||||
|
||||
/**
|
||||
* Disables an analyzer type. Disabled analyzers will not participate
|
||||
* in packet processing.
|
||||
*
|
||||
* @param tag The packet analyzer's tag.
|
||||
*
|
||||
* @return True if successful.
|
||||
*/
|
||||
bool DisableAnalyzer(zeek::EnumVal* tag);
|
||||
|
||||
/**
|
||||
* Disables an analyzer type. Disabled analyzers will not participate
|
||||
* in packet processing.
|
||||
*
|
||||
* @param tag The packet analyzer's tag.
|
||||
*
|
||||
* @return True if successful.
|
||||
*/
|
||||
bool DisableAnalyzer(const zeek::Tag& tag) { return DisableAnalyzer(tag.AsVal().get()); };
|
||||
|
||||
/**
|
||||
* Processes a packet by applying the configured packet analyzers.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue