mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 15:18:20 +00:00

Netcontrol log now includes more information; before that, it had not quite caught up to the new capabilities (like flow modifying and redirection, as well as mac addresses). Furthermore, this fixes a number of bugs with cluster mode (like duplicate events), test failures due to updates in Bro, etc.
47 lines
897 B
Text
47 lines
897 B
Text
module NetControl;
|
|
|
|
@load ./main
|
|
|
|
function activate(p: PluginState, priority: int)
|
|
{
|
|
activate_impl(p, priority);
|
|
}
|
|
|
|
function add_rule(r: Rule) : string
|
|
{
|
|
return add_rule_impl(r);
|
|
}
|
|
|
|
function remove_rule(id: string) : bool
|
|
{
|
|
return remove_rule_impl(id);
|
|
}
|
|
|
|
event rule_expire(r: Rule, p: PluginState) &priority=-5
|
|
{
|
|
rule_expire_impl(r, p);
|
|
}
|
|
|
|
event rule_added(r: Rule, p: PluginState, msg: string &default="") &priority=5
|
|
{
|
|
rule_added_impl(r, p, msg);
|
|
|
|
if ( r?$expire && ! p$plugin$can_expire )
|
|
schedule r$expire { rule_expire(r, p) };
|
|
}
|
|
|
|
event rule_removed(r: Rule, p: PluginState, msg: string &default="") &priority=-5
|
|
{
|
|
rule_removed_impl(r, p, msg);
|
|
}
|
|
|
|
event rule_timeout(r: Rule, i: FlowInfo, p: PluginState) &priority=-5
|
|
{
|
|
rule_timeout_impl(r, i, p);
|
|
}
|
|
|
|
event rule_error(r: Rule, p: PluginState, msg: string &default="") &priority=-5
|
|
{
|
|
rule_error_impl(r, p, msg);
|
|
}
|
|
|