[Bro] Bro Process Initialization and Stages
anthony.kasza at gmail.com
Thu Feb 6 18:42:33 PST 2014
I'm trying to determine the "stages" of a Bro process when invoked
from bro/bin/bro. I live mainly in scriptland and could be very wrong,
but in my mind things occur in the following order:
1. The Bro process is spawned.
2. The core does some initialization things (I'm guessing).
3. @ statements, including @load / @if / @idef / etc, are handled (in
order of appearance until all scripts are loaded).
4. Script land is initialized (all bro_init() events are handled by priority).
5. Export statements are handled making things globally available.
6. Packet processing in the core begins.
7. Events are raised by the core and handled by scriptland
(asynchronously and, again, by priority).
8. Scriptland terminates (all bro_done() events are handled by priority).
9. The core terminates (I'm assuming some garbage collection or clean
up happens here).
10. The Bro process dies.
In my mind I compare these stages to runlevels. I assume I'm missing
quite a few details. Perhaps someone here can add some insight into
each of these stages or stages I've overlooked. Thanks,
More information about the Bro