base/frameworks/control/main.bro

Control

The control framework provides the foundation for providing “commands” that can be taken remotely at runtime to modify a running Bro instance or collect information from the running instance.

Namespace:Control
Source File:/scripts/base/frameworks/control/main.bro

Summary

Options

Control::arg: string &redef This can be used by commands that take an argument.
Control::cmd: string &redef The command that is being done.
Control::commands: set &redef The commands that can currently be given on the command line for remote control.
Control::controllee_events: pattern &redef Events that need to be handled by controllees.
Control::controller_events: pattern &redef Events that need to be handled by controllers.
Control::host: addr &redef The address of the host that will be controlled.
Control::host_port: port &redef The port of the host that will be controlled.
Control::zone_id: string &redef If Control::host is a non-global IPv6 address and requires a specific RFC 4007 zone_id, it can be set here.

Constants

Control::ignore_ids: set Variable IDs that are to be ignored by the update process.

Events

Control::configuration_update: event This event is a wrapper and alias for the Control::configuration_update_request event.
Control::configuration_update_request: event Inform the remote Bro instance that it’s configuration may have been updated.
Control::configuration_update_response: event Message in response to a configuration update request.
Control::id_value_request: event Event for requesting the value of an ID (a variable).
Control::id_value_response: event Event for returning the value of an ID after an Control::id_value_request event.
Control::net_stats_request: event Requests the current net_stats.
Control::net_stats_response: event Returns the current net_stats.
Control::peer_status_request: event Requests the current communication status.
Control::peer_status_response: event Returns the current communication status.
Control::shutdown_request: event Requests that the Bro instance begins shutting down.
Control::shutdown_response: event Message in response to a shutdown request.

Detailed Interface

Options

Control::arg
Type:string
Attributes:&redef
Default:""

This can be used by commands that take an argument.

Control::cmd
Type:string
Attributes:&redef
Default:""

The command that is being done. It’s typically set on the command line.

Control::commands
Type:set [string]
Attributes:&redef
Default:
{
   "net_stats",
   "shutdown",
   "configuration_update",
   "id_value",
   "peer_status"
}

The commands that can currently be given on the command line for remote control.

Control::controllee_events
Type:pattern
Attributes:&redef
Default:
/^?(Control::.*_response)$?/

Events that need to be handled by controllees.

Control::controller_events
Type:pattern
Attributes:&redef
Default:
/^?(Control::.*_request)$?/

Events that need to be handled by controllers.

Control::host
Type:addr
Attributes:&redef
Default:0.0.0.0

The address of the host that will be controlled.

Control::host_port
Type:port
Attributes:&redef
Default:0/tcp

The port of the host that will be controlled.

Control::zone_id
Type:string
Attributes:&redef
Default:""

If Control::host is a non-global IPv6 address and requires a specific RFC 4007 zone_id, it can be set here.

Constants

Control::ignore_ids
Type:set [string]
Default:{}

Variable IDs that are to be ignored by the update process.

Events

Control::configuration_update
Type:event ()

This event is a wrapper and alias for the Control::configuration_update_request event. This event is also a primary hooking point for the control framework.

Control::configuration_update_request
Type:event ()

Inform the remote Bro instance that it’s configuration may have been updated.

Control::configuration_update_response
Type:event ()

Message in response to a configuration update request.

Control::id_value_request
Type:event (id: string)

Event for requesting the value of an ID (a variable).

Control::id_value_response
Type:event (id: string, val: string)

Event for returning the value of an ID after an Control::id_value_request event.

Control::net_stats_request
Type:event ()

Requests the current net_stats.

Control::net_stats_response
Type:event (s: string)

Returns the current net_stats.

Control::peer_status_request
Type:event ()

Requests the current communication status.

Control::peer_status_response
Type:event (s: string)

Returns the current communication status.

Control::shutdown_request
Type:event ()

Requests that the Bro instance begins shutting down.

Control::shutdown_response
Type:event ()

Message in response to a shutdown request.

Copyright 2016, The Bro Project. Last updated on December 07, 2018. Created using Sphinx 1.8.2.