Adding options Analyzer::disable_all to disable all analyzers at

startup.

One can then selectively enable the ones one wants inside a bro_init()
handler.
This commit is contained in:
Robin Sommer 2013-04-04 15:24:15 -07:00
parent b122b39874
commit bccaea6883
4 changed files with 26 additions and 1 deletions

View file

@ -5,6 +5,9 @@ module Analyzer;
# as they are loaded.
export {
## XXX
global disable_all = F &redef;
## XXX.
global enable_analyzer: function(tag: Analyzer::Tag) : bool;
@ -63,8 +66,11 @@ export {
global ports: table[Analyzer::Tag] of set[port];
event bro_init()
event bro_init() &priority=-5
{
if ( disable_all )
__disable_all_analyzers();
for ( a in disabled_analyzers )
disable_analyzer(a);
}