mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
Add script wrapper functions for broker BIFs
Also renamed the "print" function to "send_print" and the "event" function to "send_event" because Bro shows a syntax error when a Bro script function is named "event" or "print".
This commit is contained in:
parent
e9a87566ef
commit
f44bb4d9b8
17 changed files with 747 additions and 407 deletions
|
@ -227,7 +227,7 @@ function acld_add_rule_fun(p: PluginState, r: Rule) : bool
|
|||
if ( ar$command == "" )
|
||||
return F;
|
||||
|
||||
Broker::event(p$acld_config$acld_topic, Broker::event_args(acld_add_rule, p$acld_id, r, ar));
|
||||
Broker::send_event(p$acld_config$acld_topic, Broker::event_args(acld_add_rule, p$acld_id, r, ar));
|
||||
return T;
|
||||
}
|
||||
|
||||
|
@ -242,7 +242,7 @@ function acld_remove_rule_fun(p: PluginState, r: Rule) : bool
|
|||
else
|
||||
return F;
|
||||
|
||||
Broker::event(p$acld_config$acld_topic, Broker::event_args(acld_remove_rule, p$acld_id, r, ar));
|
||||
Broker::send_event(p$acld_config$acld_topic, Broker::event_args(acld_remove_rule, p$acld_id, r, ar));
|
||||
return T;
|
||||
}
|
||||
|
||||
|
|
|
@ -96,13 +96,13 @@ function broker_name(p: PluginState) : string
|
|||
|
||||
function broker_add_rule_fun(p: PluginState, r: Rule) : bool
|
||||
{
|
||||
Broker::event(p$broker_topic, Broker::event_args(broker_add_rule, p$broker_id, r));
|
||||
Broker::send_event(p$broker_topic, Broker::event_args(broker_add_rule, p$broker_id, r));
|
||||
return T;
|
||||
}
|
||||
|
||||
function broker_remove_rule_fun(p: PluginState, r: Rule) : bool
|
||||
{
|
||||
Broker::event(p$broker_topic, Broker::event_args(broker_remove_rule, p$broker_id, r));
|
||||
Broker::send_event(p$broker_topic, Broker::event_args(broker_remove_rule, p$broker_id, r));
|
||||
return T;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue