mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 23:28:20 +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
|
@ -107,6 +107,14 @@ bool Analyzer::ForwardPacket(size_t len, const uint8_t* data, Packet* packet,
|
|||
return false;
|
||||
}
|
||||
|
||||
if ( ! inner_analyzer->IsEnabled() )
|
||||
{
|
||||
DBG_LOG(DBG_PACKET_ANALYSIS,
|
||||
"Analysis in %s found disabled next layer analyzer %s for identifier %#x",
|
||||
GetAnalyzerName(), inner_analyzer->GetAnalyzerName(), identifier);
|
||||
return false;
|
||||
}
|
||||
|
||||
DBG_LOG(DBG_PACKET_ANALYSIS, "Analysis in %s succeeded, next layer identifier is %#x.",
|
||||
GetAnalyzerName(), identifier);
|
||||
return inner_analyzer->AnalyzePacket(len, data, packet);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue