base/frameworks/openflow/types.zeek
- OpenFlow
Types used by the OpenFlow framework.
- Namespace
OpenFlow
- Imports
Summary
Types
Controller record representing an openflow controller. |
|
Controller related state. |
|
Available openflow plugins. |
|
The actions that can be taken in a flow. |
|
Openflow flow_mod definition, describing the action to perform. |
|
Openflow match definition. |
Detailed Interface
Types
- OpenFlow::Controller
- Type
-
- state:
OpenFlow::ControllerState
Controller related state.
- supports_flow_removed:
bool
Does the controller support the flow_removed event?
- describe:
function
(state:OpenFlow::ControllerState
)string
Function that describes the controller. Has to be implemented.
- init:
function
(state:OpenFlow::ControllerState
)void
&optional
One-time initialization function. If defined, controller_init_done has to be called once initialization finishes.
- destroy:
function
(state:OpenFlow::ControllerState
)void
&optional
One-time destruction function.
- flow_mod:
function
(state:OpenFlow::ControllerState
, match:OpenFlow::ofp_match
, flow_mod:OpenFlow::ofp_flow_mod
)bool
&optional
flow_mod function.
- flow_clear:
function
(state:OpenFlow::ControllerState
)bool
&optional
flow_clear function.
- state:
Controller record representing an openflow controller.
- OpenFlow::ControllerState
- Type
-
- _plugin:
OpenFlow::Plugin
&optional
Internally set to the type of plugin used.
- _name:
string
&optional
Internally set to the unique name of the controller.
- _activated:
bool
&default
=F
&optional
Internally set to true once the controller is activated.
- ryu_host:
addr
&optional
(present if base/frameworks/openflow/plugins/ryu.zeek is loaded)
Controller ip.
- ryu_port:
count
&optional
(present if base/frameworks/openflow/plugins/ryu.zeek is loaded)
Controller listen port.
- ryu_dpid:
count
&optional
(present if base/frameworks/openflow/plugins/ryu.zeek is loaded)
OpenFlow switch datapath id.
- ryu_debug:
bool
&default
=F
&optional
(present if base/frameworks/openflow/plugins/ryu.zeek is loaded)
Enable debug mode - output JSON to stdout; do not perform actions.
- log_dpid:
count
&optional
(present if base/frameworks/openflow/plugins/log.zeek is loaded)
OpenFlow switch datapath id.
- log_success_event:
bool
&optional
(present if base/frameworks/openflow/plugins/log.zeek is loaded)
Raise or do not raise success event.
- broker_host:
addr
&optional
(present if base/frameworks/openflow/plugins/broker.zeek is loaded)
Controller ip.
- broker_port:
port
&optional
(present if base/frameworks/openflow/plugins/broker.zeek is loaded)
Controller listen port.
- broker_dpid:
count
&optional
(present if base/frameworks/openflow/plugins/broker.zeek is loaded)
OpenFlow switch datapath id.
- broker_topic:
string
&optional
(present if base/frameworks/openflow/plugins/broker.zeek is loaded)
Topic to send events for this controller to.
- _plugin:
- Attributes
Controller related state. Can be redefined by plugins to add state.
- OpenFlow::Plugin
- Type
-
- OpenFlow::INVALID
Internal placeholder plugin.
- OpenFlow::RYU
(present if base/frameworks/openflow/plugins/ryu.zeek is loaded)
- OpenFlow::OFLOG
(present if base/frameworks/openflow/plugins/log.zeek is loaded)
- OpenFlow::BROKER
(present if base/frameworks/openflow/plugins/broker.zeek is loaded)
Available openflow plugins.
- OpenFlow::ofp_flow_action
- Type
-
- out_ports:
vector
ofcount
&default
=[]
&optional
&log
Output ports to send data to.
- vlan_vid:
count
&optional
&log
Set vlan vid to this value.
- vlan_pcp:
count
&optional
&log
Set vlan priority to this value.
- vlan_strip:
bool
&default
=F
&optional
&log
Strip vlan tag.
- dl_src:
string
&optional
&log
Set ethernet source address.
- dl_dst:
string
&optional
&log
Set ethernet destination address.
- nw_tos:
count
&optional
&log
Set ip tos to this value.
- nw_src:
addr
&optional
&log
Set source to this ip.
- nw_dst:
addr
&optional
&log
Set destination to this ip.
- tp_src:
count
&optional
&log
Set tcp/udp source port.
- tp_dst:
count
&optional
&log
Set tcp/udp destination port.
- out_ports:
- Attributes
The actions that can be taken in a flow. (Separate record to make ofp_flow_mod less crowded)
- OpenFlow::ofp_flow_mod
- Type
-
- cookie:
count
&log
Opaque controller-issued identifier.
- table_id:
count
&optional
&log
Table to put the flow in. OFPTT_ALL can be used for delete, to delete flows from all matching tables.
- command:
OpenFlow::ofp_flow_mod_command
&log
One of OFPFC_*.
- idle_timeout:
count
&default
=0
&optional
&log
Idle time before discarding (seconds).
- hard_timeout:
count
&default
=0
&optional
&log
Max time before discarding (seconds).
- priority:
count
&default
=0
&optional
&log
Priority level of flow entry.
- out_port:
count
&optional
&log
For OFPFC_DELETE* commands, require matching entry to include this as an output port/group. OFPP_ANY/OFPG_ANY means no restrictions.
out_group:
count
&optional
&log
- flags:
count
&default
=0
&optional
&log
Bitmap of the OFPFF_* flags
- actions:
OpenFlow::ofp_flow_action
&default
= [out_ports=[], vlan_vid=<uninitialized>, vlan_pcp=<uninitialized>, vlan_strip=F, dl_src=<uninitialized>, dl_dst=<uninitialized>, nw_tos=<uninitialized>, nw_src=<uninitialized>, nw_dst=<uninitialized>, tp_src=<uninitialized>, tp_dst=<uninitialized>]&optional
&log
Actions to take on match
- cookie:
- Attributes
Openflow flow_mod definition, describing the action to perform.