Fix various typos in the openflow framework docs

This commit is contained in:
Daniel Thayer 2016-11-09 14:29:03 -06:00
parent 462eaefc43
commit aa8d200e80
7 changed files with 60 additions and 60 deletions

View file

@ -1,2 +1,2 @@
The OpenFlow framework exposes the datastructures and functions The OpenFlow framework exposes the data structures and functions
necessary to interface to OpenFlow capable hardware. necessary to interface to OpenFlow capable hardware.

View file

@ -1,7 +1,7 @@
##! Constants used by the OpenFlow framework. ##! Constants used by the OpenFlow framework.
# All types/constants not specific to OpenFlow will be defined here # All types/constants not specific to OpenFlow will be defined here
# unitl they somehow get into Bro. # until they somehow get into Bro.
module OpenFlow; module OpenFlow;
@ -122,9 +122,9 @@ export {
## Return value for a cookie from a flow ## Return value for a cookie from a flow
## which is not added, modified or deleted ## which is not added, modified or deleted
## from the bro openflow framework ## from the bro openflow framework.
const INVALID_COOKIE = 0xffffffffffffffff; const INVALID_COOKIE = 0xffffffffffffffff;
# Openflow pysical port definitions # Openflow physical port definitions
## Send the packet out the input port. This ## Send the packet out the input port. This
## virual port must be explicitly used in ## virual port must be explicitly used in
## order to send back out of the input port. ## order to send back out of the input port.
@ -135,10 +135,10 @@ export {
const OFPP_TABLE = 0xfffffff9; const OFPP_TABLE = 0xfffffff9;
## Process with normal L2/L3 switching. ## Process with normal L2/L3 switching.
const OFPP_NORMAL = 0xfffffffa; const OFPP_NORMAL = 0xfffffffa;
## All pysical ports except input port and ## All physical ports except input port and
## those disabled by STP. ## those disabled by STP.
const OFPP_FLOOD = 0xfffffffb; const OFPP_FLOOD = 0xfffffffb;
## All pysical ports except input port. ## All physical ports except input port.
const OFPP_ALL = 0xfffffffc; const OFPP_ALL = 0xfffffffc;
## Send to controller. ## Send to controller.
const OFPP_CONTROLLER = 0xfffffffd; const OFPP_CONTROLLER = 0xfffffffd;
@ -162,7 +162,7 @@ export {
# flow stats and flow deletes. # flow stats and flow deletes.
const OFPTT_ALL = 0xff; const OFPTT_ALL = 0xff;
## Openflow action_type definitions ## Openflow action_type definitions.
## ##
## The openflow action type defines ## The openflow action type defines
## what actions openflow can take ## what actions openflow can take
@ -180,7 +180,7 @@ export {
OFPAT_SET_DL_SRC = 0x0004, OFPAT_SET_DL_SRC = 0x0004,
## Ethernet destination address. ## Ethernet destination address.
OFPAT_SET_DL_DST = 0x0005, OFPAT_SET_DL_DST = 0x0005,
## IP source address ## IP source address.
OFPAT_SET_NW_SRC = 0x0006, OFPAT_SET_NW_SRC = 0x0006,
## IP destination address. ## IP destination address.
OFPAT_SET_NW_DST = 0x0007, OFPAT_SET_NW_DST = 0x0007,
@ -192,11 +192,11 @@ export {
OFPAT_SET_TP_DST = 0x000a, OFPAT_SET_TP_DST = 0x000a,
## Output to queue. ## Output to queue.
OFPAT_ENQUEUE = 0x000b, OFPAT_ENQUEUE = 0x000b,
## Vendor specific ## Vendor specific.
OFPAT_VENDOR = 0xffff, OFPAT_VENDOR = 0xffff,
}; };
## Openflow flow_mod_command definitions ## Openflow flow_mod_command definitions.
## ##
## The openflow flow_mod_command describes ## The openflow flow_mod_command describes
## of what kind an action is. ## of what kind an action is.
@ -213,7 +213,7 @@ export {
OFPFC_DELETE_STRICT = 0x4, OFPFC_DELETE_STRICT = 0x4,
}; };
## Openflow config flag definitions ## Openflow config flag definitions.
## ##
## TODO: describe ## TODO: describe
type ofp_config_flags: enum { type ofp_config_flags: enum {

View file

@ -1,11 +1,11 @@
##! Bro's OpenFlow control framework ##! Bro's OpenFlow control framework.
##! ##!
##! This plugin-based framework allows to control OpenFlow capable ##! This plugin-based framework allows to control OpenFlow capable
##! switches by implementing communication to an OpenFlow controller ##! switches by implementing communication to an OpenFlow controller
##! via plugins. The framework has to be instantiated via the new function ##! via plugins. The framework has to be instantiated via the new function
##! in one of the plugins. This framework only offers very low-level ##! in one of the plugins. This framework only offers very low-level
##! functionality; if you want to use OpenFlow capable switches, e.g., ##! functionality; if you want to use OpenFlow capable switches, e.g.,
##! for shunting, please look at the PACF framework, which provides higher ##! for shunting, please look at the NetControl framework, which provides higher
##! level functions and can use the OpenFlow framework as a backend. ##! level functions and can use the OpenFlow framework as a backend.
module OpenFlow; module OpenFlow;
@ -16,7 +16,7 @@ module OpenFlow;
export { export {
## Global flow_mod function. ## Global flow_mod function.
## ##
## controller: The controller which should execute the flow modification ## controller: The controller which should execute the flow modification.
## ##
## match: The ofp_match record which describes the flow to match. ## match: The ofp_match record which describes the flow to match.
## ##
@ -27,7 +27,7 @@ export {
## Clear the current flow table of the controller. ## Clear the current flow table of the controller.
## ##
## controller: The controller which should execute the flow modification ## controller: The controller which should execute the flow modification.
## ##
## Returns: F on error or if the plugin does not support the operation, T when the operation was queued. ## Returns: F on error or if the plugin does not support the operation, T when the operation was queued.
global flow_clear: function(controller: Controller): bool; global flow_clear: function(controller: Controller): bool;
@ -66,21 +66,21 @@ export {
## ##
## priority: The priority that was specified when creating the flow. ## priority: The priority that was specified when creating the flow.
## ##
## reason: The reason for flow removal (OFPRR_*) ## reason: The reason for flow removal (OFPRR_*).
## ##
## duration_sec: duration of the flow in seconds ## duration_sec: Duration of the flow in seconds.
## ##
## packet_count: packet count of the flow ## packet_count: Packet count of the flow.
## ##
## byte_count: byte count of the flow ## byte_count: Byte count of the flow.
global flow_removed: event(name: string, match: ofp_match, cookie: count, priority: count, reason: count, duration_sec: count, idle_timeout: count, packet_count: count, byte_count: count); global flow_removed: event(name: string, match: ofp_match, cookie: count, priority: count, reason: count, duration_sec: count, idle_timeout: count, packet_count: count, byte_count: count);
## Convert a conn_id record into an ofp_match record that can be used to ## Convert a conn_id record into an ofp_match record that can be used to
## create match objects for OpenFlow. ## create match objects for OpenFlow.
## ##
## id: the conn_id record that describes the record. ## id: The conn_id record that describes the record.
## ##
## reverse: reverse the sources and destinations when creating the match record (default F) ## reverse: Reverse the sources and destinations when creating the match record (default F).
## ##
## Returns: ofp_match object for the conn_id record. ## Returns: ofp_match object for the conn_id record.
global match_conn: function(id: conn_id, reverse: bool &default=F): ofp_match; global match_conn: function(id: conn_id, reverse: bool &default=F): ofp_match;
@ -113,18 +113,18 @@ export {
## Function to register a controller instance. This function ## Function to register a controller instance. This function
## is called automatically by the plugin _new functions. ## is called automatically by the plugin _new functions.
## ##
## tpe: type of this plugin ## tpe: Type of this plugin.
## ##
## name: unique name of this controller instance. ## name: Unique name of this controller instance.
## ##
## controller: The controller to register ## controller: The controller to register.
global register_controller: function(tpe: OpenFlow::Plugin, name: string, controller: Controller); global register_controller: function(tpe: OpenFlow::Plugin, name: string, controller: Controller);
## Function to unregister a controller instance. This function ## Function to unregister a controller instance. This function
## should be called when a specific controller should no longer ## should be called when a specific controller should no longer
## be used. ## be used.
## ##
## controller: The controller to unregister ## controller: The controller to unregister.
global unregister_controller: function(controller: Controller); global unregister_controller: function(controller: Controller);
## Function to signal that a controller finished activation and is ## Function to signal that a controller finished activation and is
@ -134,16 +134,16 @@ export {
## Event that is raised once a controller finishes initialization ## Event that is raised once a controller finishes initialization
## and is completely activated. ## and is completely activated.
## name: unique name of this controller instance. ## name: Unique name of this controller instance.
## ##
## controller: The controller that finished activation. ## controller: The controller that finished activation.
global OpenFlow::controller_activated: event(name: string, controller: Controller); global OpenFlow::controller_activated: event(name: string, controller: Controller);
## Function to lookup a controller instance by name ## Function to lookup a controller instance by name.
## ##
## name: unique name of the controller to look up ## name: Unique name of the controller to look up.
## ##
## Returns: one element vector with controller, if found. Empty vector otherwhise. ## Returns: One element vector with controller, if found. Empty vector otherwise.
global lookup_controller: function(name: string): vector of Controller; global lookup_controller: function(name: string): vector of Controller;
} }

View file

@ -18,11 +18,11 @@ export {
## ##
## host_port: Controller listen port. ## host_port: Controller listen port.
## ##
## topic: broker topic to send messages to. ## topic: Broker topic to send messages to.
## ##
## dpid: OpenFlow switch datapath id. ## dpid: OpenFlow switch datapath id.
## ##
## Returns: OpenFlow::Controller record ## Returns: OpenFlow::Controller record.
global broker_new: function(name: string, host: addr, host_port: port, topic: string, dpid: count): OpenFlow::Controller; global broker_new: function(name: string, host: addr, host_port: port, topic: string, dpid: count): OpenFlow::Controller;
redef record ControllerState += { redef record ControllerState += {
@ -32,7 +32,7 @@ export {
broker_port: port &optional; broker_port: port &optional;
## OpenFlow switch datapath id. ## OpenFlow switch datapath id.
broker_dpid: count &optional; broker_dpid: count &optional;
## Topic to sent events for this controller to ## Topic to send events for this controller to.
broker_topic: string &optional; broker_topic: string &optional;
}; };

View file

@ -19,25 +19,25 @@ export {
## ##
## success_event: If true, flow_mod_success is raised for each logged line. ## success_event: If true, flow_mod_success is raised for each logged line.
## ##
## Returns: OpenFlow::Controller record ## Returns: OpenFlow::Controller record.
global log_new: function(dpid: count, success_event: bool &default=T): OpenFlow::Controller; global log_new: function(dpid: count, success_event: bool &default=T): OpenFlow::Controller;
redef record ControllerState += { redef record ControllerState += {
## OpenFlow switch datapath id. ## OpenFlow switch datapath id.
log_dpid: count &optional; log_dpid: count &optional;
## Raise or do not raise success event ## Raise or do not raise success event.
log_success_event: bool &optional; log_success_event: bool &optional;
}; };
## The record type which contains column fields of the OpenFlow log. ## The record type which contains column fields of the OpenFlow log.
type Info: record { type Info: record {
## Network time ## Network time.
ts: time &log; ts: time &log;
## OpenFlow switch datapath id ## OpenFlow switch datapath id.
dpid: count &log; dpid: count &log;
## OpenFlow match fields ## OpenFlow match fields.
match: ofp_match &log; match: ofp_match &log;
## OpenFlow modify flow entry message ## OpenFlow modify flow entry message.
flow_mod: ofp_flow_mod &log; flow_mod: ofp_flow_mod &log;
}; };

View file

@ -20,7 +20,7 @@ export {
## ##
## dpid: OpenFlow switch datapath id. ## dpid: OpenFlow switch datapath id.
## ##
## Returns: OpenFlow::Controller record ## Returns: OpenFlow::Controller record.
global ryu_new: function(host: addr, host_port: count, dpid: count): OpenFlow::Controller; global ryu_new: function(host: addr, host_port: count, dpid: count): OpenFlow::Controller;
redef record ControllerState += { redef record ControllerState += {
@ -30,7 +30,7 @@ export {
ryu_port: count &optional; ryu_port: count &optional;
## OpenFlow switch datapath id. ## OpenFlow switch datapath id.
ryu_dpid: count &optional; ryu_dpid: count &optional;
## Enable debug mode - output JSON to stdout; do not perform actions ## Enable debug mode - output JSON to stdout; do not perform actions.
ryu_debug: bool &default=F; ryu_debug: bool &default=F;
}; };
} }

View file

@ -5,9 +5,9 @@ module OpenFlow;
@load ./consts @load ./consts
export { export {
## Available openflow plugins ## Available openflow plugins.
type Plugin: enum { type Plugin: enum {
## Internal placeholder plugin ## Internal placeholder plugin.
INVALID, INVALID,
}; };
@ -19,7 +19,7 @@ export {
_plugin: Plugin &optional; _plugin: Plugin &optional;
## Internally set to the unique name of the controller. ## Internally set to the unique name of the controller.
_name: string &optional; _name: string &optional;
## Internally set to true once the controller is activated ## Internally set to true once the controller is activated.
_activated: bool &default=F; _activated: bool &default=F;
} &redef; } &redef;
@ -58,29 +58,29 @@ export {
} &log; } &log;
## The actions that can be taken in a flow. ## The actions that can be taken in a flow.
## (Sepearate record to make ofp_flow_mod less crowded) ## (Separate record to make ofp_flow_mod less crowded)
type ofp_flow_action: record { type ofp_flow_action: record {
## Output ports to send data to. ## Output ports to send data to.
out_ports: vector of count &default=vector(); out_ports: vector of count &default=vector();
## set vlan vid to this value ## Set vlan vid to this value.
vlan_vid: count &optional; vlan_vid: count &optional;
## set vlan priority to this value ## Set vlan priority to this value.
vlan_pcp: count &optional; vlan_pcp: count &optional;
## strip vlan tag ## Strip vlan tag.
vlan_strip: bool &default=F; vlan_strip: bool &default=F;
## set ethernet source address ## Set ethernet source address.
dl_src: string &optional; dl_src: string &optional;
## set ethernet destination address ## Set ethernet destination address.
dl_dst: string &optional; dl_dst: string &optional;
## set ip tos to this value ## Set ip tos to this value.
nw_tos: count &optional; nw_tos: count &optional;
## set source to this ip ## Set source to this ip.
nw_src: addr &optional; nw_src: addr &optional;
## set destination to this ip ## Set destination to this ip.
nw_dst: addr &optional; nw_dst: addr &optional;
## set tcp/udp source port ## Set tcp/udp source port.
tp_src: count &optional; tp_src: count &optional;
## set tcp/udp destination port ## Set tcp/udp destination port.
tp_dst: count &optional; tp_dst: count &optional;
} &log; } &log;
@ -112,21 +112,21 @@ export {
actions: ofp_flow_action &default=ofp_flow_action(); actions: ofp_flow_action &default=ofp_flow_action();
} &log; } &log;
## Controller record representing an openflow controller ## Controller record representing an openflow controller.
type Controller: record { type Controller: record {
## Controller related state. ## Controller related state.
state: ControllerState; state: ControllerState;
## Does the controller support the flow_removed event? ## Does the controller support the flow_removed event?
supports_flow_removed: bool; supports_flow_removed: bool;
## function that describes the controller. Has to be implemented. ## Function that describes the controller. Has to be implemented.
describe: function(state: ControllerState): string; describe: function(state: ControllerState): string;
## one-time initialization function. If defined, controller_init_done has to be called once initialization finishes. ## One-time initialization function. If defined, controller_init_done has to be called once initialization finishes.
init: function (state: ControllerState) &optional; init: function (state: ControllerState) &optional;
## one-time destruction function ## One-time destruction function.
destroy: function (state: ControllerState) &optional; destroy: function (state: ControllerState) &optional;
## flow_mod function ## flow_mod function.
flow_mod: function(state: ControllerState, match: ofp_match, flow_mod: ofp_flow_mod): bool &optional; flow_mod: function(state: ControllerState, match: ofp_match, flow_mod: ofp_flow_mod): bool &optional;
## flow_clear function ## flow_clear function.
flow_clear: function(state: ControllerState): bool &optional; flow_clear: function(state: ControllerState): bool &optional;
}; };
} }