Avoid flow.lua overhead if all the modules are disabled

This commit is contained in:
emanuele-f 2019-09-11 14:52:26 +02:00
parent e31afe72d6
commit e4f1d1f5d3
4 changed files with 45 additions and 8 deletions

View file

@ -964,11 +964,12 @@ end
-- - scripts/callbacks/interface/alerts/flow for community scripts
-- - scripts/callbacks/interface/alerts/flow for pro/enterprise scripts
--
-- A script must return a lua table, with the following optional fields:
-- - setup(): a function to call once before processing any flow
-- - protocolDetected(info): a function which will be called once the flow protocol
-- A script must return a lua table, with the following fields:
-- - setup(): a function to call once before processing any flow. It must return true
-- if the module is enabled, false otherwise.
-- - protocolDetected(info) (optional): a function which will be called once the flow protocol
-- has been detected or detection has been aborted. This should happen once per flow.
-- - statusChanged(info): a function which will be called *after* the protocolDetected()
-- - statusChanged(info) (optional): a function which will be called *after* the protocolDetected()
-- if the flow status changes.
--
function alerts_api.load_flow_check_modules()