base/frameworks/netcontrol/plugins/broker.zeek

NetControl

Broker plugin for the NetControl framework. Sends the raw data structures used in NetControl on to Broker to allow for easy handling, e.g., of command-line scripts.

Namespace

NetControl

Imports

base/frameworks/broker, base/frameworks/netcontrol/main.zeek, base/frameworks/netcontrol/plugin.zeek

Summary

Types

NetControl::BrokerConfig: record

This record specifies the configuration that is passed to NetControl::create_broker.

Redefinitions

NetControl::PluginState: record

New Fields

NetControl::PluginState

broker_config: NetControl::BrokerConfig &optional

OpenFlow controller for NetControl Broker plugin.

broker_id: count &optional

The ID of this broker instance - for the mapping to PluginStates.

Events

NetControl::broker_add_rule: event

NetControl::broker_remove_rule: event

NetControl::broker_rule_added: event

NetControl::broker_rule_error: event

NetControl::broker_rule_exists: event

NetControl::broker_rule_removed: event

NetControl::broker_rule_timeout: event

Functions

NetControl::create_broker: function

Instantiates the broker plugin.

Detailed Interface

Types

NetControl::BrokerConfig
Type

record

topic: string &optional

The broker topic to send events to.

host: addr &optional

Broker host to connect to.

bport: port &optional

Broker port to connect to.

monitor: bool &default = T &optional

Do we accept rules for the monitor path? Default true.

forward: bool &default = T &optional

Do we accept rules for the forward path? Default true.

check_pred: function (p: NetControl::PluginState, r: NetControl::Rule)bool &optional

Predicate that is called on rule insertion or removal.

param p

Current plugin state.

param r

The rule to be inserted or removed.

returns

T if the rule can be handled by the current backend, F otherwise.

This record specifies the configuration that is passed to NetControl::create_broker.

Events

NetControl::broker_add_rule
Type

event (id: count, r: NetControl::Rule)

NetControl::broker_remove_rule
Type

event (id: count, r: NetControl::Rule, reason: string)

NetControl::broker_rule_added
Type

event (id: count, r: NetControl::Rule, msg: string)

NetControl::broker_rule_error
Type

event (id: count, r: NetControl::Rule, msg: string)

NetControl::broker_rule_exists
Type

event (id: count, r: NetControl::Rule, msg: string)

NetControl::broker_rule_removed
Type

event (id: count, r: NetControl::Rule, msg: string)

NetControl::broker_rule_timeout
Type

event (id: count, r: NetControl::Rule, i: NetControl::FlowInfo)

Functions

NetControl::create_broker
Type

function (config: NetControl::BrokerConfig, can_expire: bool) : NetControl::PluginState

Instantiates the broker plugin.