mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 05:58:20 +00:00
Simplify packet analyzer config.
This commit is contained in:
parent
efa262a229
commit
7ede4f48bd
28 changed files with 233 additions and 213 deletions
|
@ -63,21 +63,6 @@ public:
|
|||
*/
|
||||
bool IsAnalyzer(const char* name);
|
||||
|
||||
/**
|
||||
* Registers an analyzer to be dispatched for the given identifier.
|
||||
*
|
||||
* @param identifier The identifier an analyzer should be called for.
|
||||
* @param analyzer The analyzer that should be called.
|
||||
*/
|
||||
void RegisterAnalyzerMapping(uint32_t identifier, AnalyzerPtr analyzer);
|
||||
|
||||
/**
|
||||
* Registers a default analyzer.
|
||||
*
|
||||
* @param default_analyzer The analyzer to use as default.
|
||||
*/
|
||||
void RegisterDefaultAnalyzer(AnalyzerPtr default_analyzer);
|
||||
|
||||
/**
|
||||
* Analyzes the given packet. A common case is that the analyzed protocol
|
||||
* encapsulates another protocol, which can be determined by an identifier
|
||||
|
@ -119,6 +104,15 @@ protected:
|
|||
*/
|
||||
AnalyzerPtr LoadAnalyzer(const std::string& name);
|
||||
|
||||
/**
|
||||
* Returns the module name corresponding to the analyzer, i.e. its script-land
|
||||
* namespace. Configuration values for the analyzer are expected in this module.
|
||||
* @return Analyzer's module name.
|
||||
*/
|
||||
std::string GetModuleName() const {
|
||||
return util::fmt("PacketAnalyzer::%s::", GetAnalyzerName());
|
||||
};
|
||||
|
||||
/**
|
||||
* Triggers analysis of the encapsulated packet. The encapsulated protocol
|
||||
* is determined using the given identifier.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue