Merge branch 'topic/robin/exit-after-terminate' into topic/bernhard/input-tests-exit-after-terminate

This commit is contained in:
Bernhard Amann 2013-01-30 16:34:37 -08:00
commit e80d28c9ef
3 changed files with 12 additions and 1 deletions

View file

@ -2608,6 +2608,15 @@ const gap_report_freq = 1.0 sec &redef;
## .. bro:see:: content_gap gap_report partial_connection ## .. bro:see:: content_gap gap_report partial_connection
const report_gaps_for_partial = F &redef; const report_gaps_for_partial = F &redef;
## Flag to prevent Bro from exiting automatically when input is exhausted.
## Normally Bro terminates when all packets sources have gone dry
## and communication isn't enabled. If this flag is set, Bro's main loop will
## instead keep idleing until :bro:see::`terminate` is explicitly called.
##
## This is mainly for testing purposes when termination behaviour needs to be
## controlled for reproducing results.
const exit_only_after_terminate = F &redef;
## The CA certificate file to authorize remote Bros/Broccolis. ## The CA certificate file to authorize remote Bros/Broccolis.
## ##
## .. bro:see:: ssl_private_key ssl_passphrase ## .. bro:see:: ssl_private_key ssl_passphrase

View file

@ -421,7 +421,8 @@ void net_run()
set_processing_status("RUNNING", "net_run"); set_processing_status("RUNNING", "net_run");
while ( io_sources.Size() || while ( io_sources.Size() ||
(packet_sorter && ! packet_sorter->Empty()) ) (packet_sorter && ! packet_sorter->Empty()) ||
(BifConst::exit_only_after_terminate && ! terminating) )
{ {
double ts; double ts;
IOSource* src = io_sources.FindSoonest(&ts); IOSource* src = io_sources.FindSoonest(&ts);

View file

@ -6,6 +6,7 @@ const ignore_keep_alive_rexmit: bool;
const skip_http_data: bool; const skip_http_data: bool;
const use_conn_size_analyzer: bool; const use_conn_size_analyzer: bool;
const report_gaps_for_partial: bool; const report_gaps_for_partial: bool;
const exit_only_after_terminate: bool;
const NFS3::return_data: bool; const NFS3::return_data: bool;
const NFS3::return_data_max: count; const NFS3::return_data_max: count;