Add is_processing_suspended BIF

This commit is contained in:
Tim Wojtulewicz 2023-04-06 10:27:38 -07:00
parent 8a23671b21
commit adcaa459c9

View file

@ -5387,6 +5387,7 @@ function is_remote_event%(%) : bool
## (*pseudo-realtime* mode). ## (*pseudo-realtime* mode).
## ##
## .. zeek:see:: continue_processing ## .. zeek:see:: continue_processing
## is_processing_suspended
function suspend_processing%(%) : any function suspend_processing%(%) : any
%{ %{
zeek::run_state::suspend_processing(); zeek::run_state::suspend_processing();
@ -5396,12 +5397,22 @@ function suspend_processing%(%) : any
## Resumes Zeek's packet processing. ## Resumes Zeek's packet processing.
## ##
## .. zeek:see:: suspend_processing ## .. zeek:see:: suspend_processing
## is_processing_suspended
function continue_processing%(%) : any function continue_processing%(%) : any
%{ %{
zeek::run_state::continue_processing(); zeek::run_state::continue_processing();
return nullptr; return nullptr;
%} %}
## Returns whether or not processing is currently suspended.
##
## .. zeek:see:: suspend_processing
## continue_processing
function is_processing_suspended%(%): bool
%{
return zeek::val_mgr->Bool(zeek::run_state::is_processing_suspended());
%}
# =========================================================================== # ===========================================================================
# #
# Internal Functions # Internal Functions
@ -5738,4 +5749,3 @@ function have_spicy_analyzers%(%) : bool
%{ %{
return zeek::val_mgr->Bool(USE_SPICY_ANALYZERS); return zeek::val_mgr->Bool(USE_SPICY_ANALYZERS);
%} %}