Add Broker::peer_counts_as_iosource option

Disabling this option allows one to read pcaps, but still initiate
Broker peerings and automatically exit when done processing the pcap
file.  The default behavior would normally cause Broker::peer() to
prevent shutting the process down even after done reading the pcap.
This commit is contained in:
Jon Siwek 2019-01-16 19:03:07 -06:00
parent 5eab9b9d47
commit 0d685efbf5
6 changed files with 49 additions and 10 deletions

View file

@ -11,6 +11,14 @@ The Broker-based communication API and its various options.
Summary
~~~~~~~
Runtime Options
###############
============================================================================== =================================================================
:bro:id:`Broker::peer_counts_as_iosource`: :bro:type:`bool` :bro:attr:`&redef` Whether calling :bro:see:`Broker::peer` will register the Broker
system as an I/O source that will block the process from shutting
down.
============================================================================== =================================================================
Redefinable Options
###################
================================================================================= ======================================================================
@ -94,6 +102,20 @@ Functions
Detailed Interface
~~~~~~~~~~~~~~~~~~
Runtime Options
###############
.. bro:id:: Broker::peer_counts_as_iosource
:Type: :bro:type:`bool`
:Attributes: :bro:attr:`&redef`
:Default: ``T``
Whether calling :bro:see:`Broker::peer` will register the Broker
system as an I/O source that will block the process from shutting
down. For example, set this to false when you are reading pcaps,
but also want to initaiate a Broker peering and still shutdown after
done reading the pcap.
Redefinable Options
###################
.. bro:id:: Broker::aggressive_interval