mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 15:18:20 +00:00
Remove broxygen Sphinx integration
The broxygen-generated files now live in the git repo, have tests that check that they are up-to-date, and a script to re-generate them on-demand.
This commit is contained in:
parent
9e5e9d04b7
commit
7e9d48f532
549 changed files with 89909 additions and 100 deletions
14
doc/scripts/base/frameworks/openflow/__load__.bro.rst
Normal file
14
doc/scripts/base/frameworks/openflow/__load__.bro.rst
Normal file
|
@ -0,0 +1,14 @@
|
|||
:tocdepth: 3
|
||||
|
||||
base/frameworks/openflow/__load__.bro
|
||||
=====================================
|
||||
|
||||
|
||||
:Imports: :doc:`base/frameworks/cluster </scripts/base/frameworks/cluster/index>`, :doc:`base/frameworks/openflow/consts.bro </scripts/base/frameworks/openflow/consts.bro>`, :doc:`base/frameworks/openflow/main.bro </scripts/base/frameworks/openflow/main.bro>`, :doc:`base/frameworks/openflow/non-cluster.bro </scripts/base/frameworks/openflow/non-cluster.bro>`, :doc:`base/frameworks/openflow/plugins </scripts/base/frameworks/openflow/plugins/index>`, :doc:`base/frameworks/openflow/types.bro </scripts/base/frameworks/openflow/types.bro>`
|
||||
|
||||
Summary
|
||||
~~~~~~~
|
||||
|
||||
Detailed Interface
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
564
doc/scripts/base/frameworks/openflow/consts.bro.rst
Normal file
564
doc/scripts/base/frameworks/openflow/consts.bro.rst
Normal file
|
@ -0,0 +1,564 @@
|
|||
:tocdepth: 3
|
||||
|
||||
base/frameworks/openflow/consts.bro
|
||||
===================================
|
||||
.. bro:namespace:: OpenFlow
|
||||
|
||||
Constants used by the OpenFlow framework.
|
||||
|
||||
:Namespace: OpenFlow
|
||||
|
||||
Summary
|
||||
~~~~~~~
|
||||
Constants
|
||||
#########
|
||||
============================================================= ======================================================================
|
||||
:bro:id:`OpenFlow::ETH_APPLETALK`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::ETH_APPLETALK_ARP`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::ETH_ARP`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::ETH_EAP_OVER_LAN`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::ETH_ETHER_FLOW_CONTROL`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::ETH_IPX`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::ETH_IPX_OLD`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::ETH_IPv4`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::ETH_IPv6`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::ETH_JUMBO_FRAMES`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::ETH_MAC_SECURITY`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::ETH_MPLS_MULTICAST`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::ETH_MPLS_UNICAST`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::ETH_PPPOE_DISCOVERY`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::ETH_PPPOE_SESSION`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::ETH_PROVIDER_BRIDING`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::ETH_QINQ`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::ETH_RARP`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::ETH_VLAN`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::ETH_WOL`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::INVALID_COOKIE`: :bro:type:`count` Return value for a cookie from a flow
|
||||
which is not added, modified or deleted
|
||||
from the bro openflow framework.
|
||||
:bro:id:`OpenFlow::IP_CBT`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::IP_EGP`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::IP_ETHERIP`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::IP_FC`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::IP_GGP`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::IP_GRE`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::IP_HOPOPT`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::IP_ICMP`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::IP_IGMP`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::IP_IGP`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::IP_IPIP`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::IP_IPv6`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::IP_ISIS`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::IP_L2TP`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::IP_MPLS`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::IP_MTP`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::IP_OSPF`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::IP_RDP`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::IP_RSVP`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::IP_ST`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::IP_TCP`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::IP_UDP`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::OFPFF_CHECK_OVERLAP`: :bro:type:`count` Check for overlapping entries first.
|
||||
:bro:id:`OpenFlow::OFPFF_EMERG`: :bro:type:`count` Remark this is for emergency.
|
||||
:bro:id:`OpenFlow::OFPFF_SEND_FLOW_REM`: :bro:type:`count` Send flow removed message when flow
|
||||
expires or is deleted.
|
||||
:bro:id:`OpenFlow::OFPP_ALL`: :bro:type:`count` All physical ports except input port.
|
||||
:bro:id:`OpenFlow::OFPP_ANY`: :bro:type:`count` Wildcard port used only for flow mod (delete) and flow stats requests.
|
||||
:bro:id:`OpenFlow::OFPP_CONTROLLER`: :bro:type:`count` Send to controller.
|
||||
:bro:id:`OpenFlow::OFPP_FLOOD`: :bro:type:`count` All physical ports except input port and
|
||||
those disabled by STP.
|
||||
:bro:id:`OpenFlow::OFPP_IN_PORT`: :bro:type:`count` Send the packet out the input port.
|
||||
:bro:id:`OpenFlow::OFPP_LOCAL`: :bro:type:`count` Local openflow "port".
|
||||
:bro:id:`OpenFlow::OFPP_NORMAL`: :bro:type:`count` Process with normal L2/L3 switching.
|
||||
:bro:id:`OpenFlow::OFPP_TABLE`: :bro:type:`count` Perform actions in flow table.
|
||||
:bro:id:`OpenFlow::OFPTT_ALL`: :bro:type:`count`
|
||||
:bro:id:`OpenFlow::OFP_NO_BUFFER`: :bro:type:`count`
|
||||
============================================================= ======================================================================
|
||||
|
||||
Types
|
||||
#####
|
||||
============================================================ ======================================
|
||||
:bro:type:`OpenFlow::ofp_action_type`: :bro:type:`enum` Openflow action_type definitions.
|
||||
:bro:type:`OpenFlow::ofp_config_flags`: :bro:type:`enum` Openflow config flag definitions.
|
||||
:bro:type:`OpenFlow::ofp_flow_mod_command`: :bro:type:`enum` Openflow flow_mod_command definitions.
|
||||
============================================================ ======================================
|
||||
|
||||
|
||||
Detailed Interface
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
Constants
|
||||
#########
|
||||
.. bro:id:: OpenFlow::ETH_APPLETALK
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``32923``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::ETH_APPLETALK_ARP
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``33011``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::ETH_ARP
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``2054``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::ETH_EAP_OVER_LAN
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``34958``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::ETH_ETHER_FLOW_CONTROL
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``34824``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::ETH_IPX
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``33080``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::ETH_IPX_OLD
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``33079``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::ETH_IPv4
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``2048``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::ETH_IPv6
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``34525``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::ETH_JUMBO_FRAMES
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``34928``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::ETH_MAC_SECURITY
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``35045``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::ETH_MPLS_MULTICAST
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``34888``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::ETH_MPLS_UNICAST
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``34887``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::ETH_PPPOE_DISCOVERY
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``34915``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::ETH_PPPOE_SESSION
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``34916``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::ETH_PROVIDER_BRIDING
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``34984``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::ETH_QINQ
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``37120``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::ETH_RARP
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``32821``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::ETH_VLAN
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``33024``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::ETH_WOL
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``2114``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::INVALID_COOKIE
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``18446744073709551615``
|
||||
|
||||
Return value for a cookie from a flow
|
||||
which is not added, modified or deleted
|
||||
from the bro openflow framework.
|
||||
|
||||
.. bro:id:: OpenFlow::IP_CBT
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``7``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::IP_EGP
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``8``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::IP_ETHERIP
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``97``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::IP_FC
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``133``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::IP_GGP
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``3``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::IP_GRE
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``47``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::IP_HOPOPT
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``0``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::IP_ICMP
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``1``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::IP_IGMP
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``2``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::IP_IGP
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``9``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::IP_IPIP
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``4``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::IP_IPv6
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``41``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::IP_ISIS
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``124``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::IP_L2TP
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``115``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::IP_MPLS
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``137``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::IP_MTP
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``92``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::IP_OSPF
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``89``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::IP_RDP
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``27``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::IP_RSVP
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``46``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::IP_ST
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``5``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::IP_TCP
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``6``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::IP_UDP
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``17``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::OFPFF_CHECK_OVERLAP
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``2``
|
||||
|
||||
Check for overlapping entries first.
|
||||
|
||||
.. bro:id:: OpenFlow::OFPFF_EMERG
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``4``
|
||||
|
||||
Remark this is for emergency.
|
||||
Flows added with this are only used
|
||||
when the controller is disconnected.
|
||||
|
||||
.. bro:id:: OpenFlow::OFPFF_SEND_FLOW_REM
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``1``
|
||||
|
||||
Send flow removed message when flow
|
||||
expires or is deleted.
|
||||
|
||||
.. bro:id:: OpenFlow::OFPP_ALL
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``4294967292``
|
||||
|
||||
All physical ports except input port.
|
||||
|
||||
.. bro:id:: OpenFlow::OFPP_ANY
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``4294967295``
|
||||
|
||||
Wildcard port used only for flow mod (delete) and flow stats requests.
|
||||
|
||||
.. bro:id:: OpenFlow::OFPP_CONTROLLER
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``4294967293``
|
||||
|
||||
Send to controller.
|
||||
|
||||
.. bro:id:: OpenFlow::OFPP_FLOOD
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``4294967291``
|
||||
|
||||
All physical ports except input port and
|
||||
those disabled by STP.
|
||||
|
||||
.. bro:id:: OpenFlow::OFPP_IN_PORT
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``4294967288``
|
||||
|
||||
Send the packet out the input port. This
|
||||
virual port must be explicitly used in
|
||||
order to send back out of the input port.
|
||||
|
||||
.. bro:id:: OpenFlow::OFPP_LOCAL
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``4294967294``
|
||||
|
||||
Local openflow "port".
|
||||
|
||||
.. bro:id:: OpenFlow::OFPP_NORMAL
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``4294967290``
|
||||
|
||||
Process with normal L2/L3 switching.
|
||||
|
||||
.. bro:id:: OpenFlow::OFPP_TABLE
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``4294967289``
|
||||
|
||||
Perform actions in flow table.
|
||||
NB: This can only be the destination port
|
||||
for packet-out messages.
|
||||
|
||||
.. bro:id:: OpenFlow::OFPTT_ALL
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``255``
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::OFP_NO_BUFFER
|
||||
|
||||
:Type: :bro:type:`count`
|
||||
:Default: ``4294967295``
|
||||
|
||||
|
||||
Types
|
||||
#####
|
||||
.. bro:type:: OpenFlow::ofp_action_type
|
||||
|
||||
:Type: :bro:type:`enum`
|
||||
|
||||
.. bro:enum:: OpenFlow::OFPAT_OUTPUT OpenFlow::ofp_action_type
|
||||
|
||||
Output to switch port.
|
||||
|
||||
.. bro:enum:: OpenFlow::OFPAT_SET_VLAN_VID OpenFlow::ofp_action_type
|
||||
|
||||
Set the 802.1q VLAN id.
|
||||
|
||||
.. bro:enum:: OpenFlow::OFPAT_SET_VLAN_PCP OpenFlow::ofp_action_type
|
||||
|
||||
Set the 802.1q priority.
|
||||
|
||||
.. bro:enum:: OpenFlow::OFPAT_STRIP_VLAN OpenFlow::ofp_action_type
|
||||
|
||||
Strip the 802.1q header.
|
||||
|
||||
.. bro:enum:: OpenFlow::OFPAT_SET_DL_SRC OpenFlow::ofp_action_type
|
||||
|
||||
Ethernet source address.
|
||||
|
||||
.. bro:enum:: OpenFlow::OFPAT_SET_DL_DST OpenFlow::ofp_action_type
|
||||
|
||||
Ethernet destination address.
|
||||
|
||||
.. bro:enum:: OpenFlow::OFPAT_SET_NW_SRC OpenFlow::ofp_action_type
|
||||
|
||||
IP source address.
|
||||
|
||||
.. bro:enum:: OpenFlow::OFPAT_SET_NW_DST OpenFlow::ofp_action_type
|
||||
|
||||
IP destination address.
|
||||
|
||||
.. bro:enum:: OpenFlow::OFPAT_SET_NW_TOS OpenFlow::ofp_action_type
|
||||
|
||||
IP ToS (DSCP field, 6 bits).
|
||||
|
||||
.. bro:enum:: OpenFlow::OFPAT_SET_TP_SRC OpenFlow::ofp_action_type
|
||||
|
||||
TCP/UDP source port.
|
||||
|
||||
.. bro:enum:: OpenFlow::OFPAT_SET_TP_DST OpenFlow::ofp_action_type
|
||||
|
||||
TCP/UDP destination port.
|
||||
|
||||
.. bro:enum:: OpenFlow::OFPAT_ENQUEUE OpenFlow::ofp_action_type
|
||||
|
||||
Output to queue.
|
||||
|
||||
.. bro:enum:: OpenFlow::OFPAT_VENDOR OpenFlow::ofp_action_type
|
||||
|
||||
Vendor specific.
|
||||
|
||||
Openflow action_type definitions.
|
||||
|
||||
The openflow action type defines
|
||||
what actions openflow can take
|
||||
to modify a packet
|
||||
|
||||
.. bro:type:: OpenFlow::ofp_config_flags
|
||||
|
||||
:Type: :bro:type:`enum`
|
||||
|
||||
.. bro:enum:: OpenFlow::OFPC_FRAG_NORMAL OpenFlow::ofp_config_flags
|
||||
|
||||
No special handling for fragments.
|
||||
|
||||
.. bro:enum:: OpenFlow::OFPC_FRAG_DROP OpenFlow::ofp_config_flags
|
||||
|
||||
Drop fragments.
|
||||
|
||||
.. bro:enum:: OpenFlow::OFPC_FRAG_REASM OpenFlow::ofp_config_flags
|
||||
|
||||
Reassemble (only if OFPC_IP_REASM set).
|
||||
|
||||
.. bro:enum:: OpenFlow::OFPC_FRAG_MASK OpenFlow::ofp_config_flags
|
||||
|
||||
Openflow config flag definitions.
|
||||
|
||||
TODO: describe
|
||||
|
||||
.. bro:type:: OpenFlow::ofp_flow_mod_command
|
||||
|
||||
:Type: :bro:type:`enum`
|
||||
|
||||
.. bro:enum:: OpenFlow::OFPFC_ADD OpenFlow::ofp_flow_mod_command
|
||||
|
||||
New flow.
|
||||
|
||||
.. bro:enum:: OpenFlow::OFPFC_MODIFY OpenFlow::ofp_flow_mod_command
|
||||
|
||||
Modify all matching flows.
|
||||
|
||||
.. bro:enum:: OpenFlow::OFPFC_MODIFY_STRICT OpenFlow::ofp_flow_mod_command
|
||||
|
||||
Modify entry strictly matching wildcards.
|
||||
|
||||
.. bro:enum:: OpenFlow::OFPFC_DELETE OpenFlow::ofp_flow_mod_command
|
||||
|
||||
Delete all matching flows.
|
||||
|
||||
.. bro:enum:: OpenFlow::OFPFC_DELETE_STRICT OpenFlow::ofp_flow_mod_command
|
||||
|
||||
Strictly matching wildcards and priority.
|
||||
|
||||
Openflow flow_mod_command definitions.
|
||||
|
||||
The openflow flow_mod_command describes
|
||||
of what kind an action is.
|
||||
|
||||
|
50
doc/scripts/base/frameworks/openflow/index.rst
Normal file
50
doc/scripts/base/frameworks/openflow/index.rst
Normal file
|
@ -0,0 +1,50 @@
|
|||
:orphan:
|
||||
|
||||
Package: base/frameworks/openflow
|
||||
=================================
|
||||
|
||||
The OpenFlow framework exposes the data structures and functions
|
||||
necessary to interface to OpenFlow capable hardware.
|
||||
|
||||
:doc:`/scripts/base/frameworks/openflow/__load__.bro`
|
||||
|
||||
|
||||
:doc:`/scripts/base/frameworks/openflow/consts.bro`
|
||||
|
||||
Constants used by the OpenFlow framework.
|
||||
|
||||
:doc:`/scripts/base/frameworks/openflow/types.bro`
|
||||
|
||||
Types used by the OpenFlow framework.
|
||||
|
||||
:doc:`/scripts/base/frameworks/openflow/main.bro`
|
||||
|
||||
Bro's OpenFlow control framework.
|
||||
|
||||
This plugin-based framework allows to control OpenFlow capable
|
||||
switches by implementing communication to an OpenFlow controller
|
||||
via plugins. The framework has to be instantiated via the new function
|
||||
in one of the plugins. This framework only offers very low-level
|
||||
functionality; if you want to use OpenFlow capable switches, e.g.,
|
||||
for shunting, please look at the NetControl framework, which provides higher
|
||||
level functions and can use the OpenFlow framework as a backend.
|
||||
|
||||
:doc:`/scripts/base/frameworks/openflow/plugins/__load__.bro`
|
||||
|
||||
|
||||
:doc:`/scripts/base/frameworks/openflow/plugins/ryu.bro`
|
||||
|
||||
OpenFlow plugin for the Ryu controller.
|
||||
|
||||
:doc:`/scripts/base/frameworks/openflow/plugins/log.bro`
|
||||
|
||||
OpenFlow plugin that outputs flow-modification commands
|
||||
to a Bro log file.
|
||||
|
||||
:doc:`/scripts/base/frameworks/openflow/plugins/broker.bro`
|
||||
|
||||
OpenFlow plugin for interfacing to controllers via Broker.
|
||||
|
||||
:doc:`/scripts/base/frameworks/openflow/non-cluster.bro`
|
||||
|
||||
|
265
doc/scripts/base/frameworks/openflow/main.bro.rst
Normal file
265
doc/scripts/base/frameworks/openflow/main.bro.rst
Normal file
|
@ -0,0 +1,265 @@
|
|||
:tocdepth: 3
|
||||
|
||||
base/frameworks/openflow/main.bro
|
||||
=================================
|
||||
.. bro:namespace:: OpenFlow
|
||||
|
||||
Bro's OpenFlow control framework.
|
||||
|
||||
This plugin-based framework allows to control OpenFlow capable
|
||||
switches by implementing communication to an OpenFlow controller
|
||||
via plugins. The framework has to be instantiated via the new function
|
||||
in one of the plugins. This framework only offers very low-level
|
||||
functionality; if you want to use OpenFlow capable switches, e.g.,
|
||||
for shunting, please look at the NetControl framework, which provides higher
|
||||
level functions and can use the OpenFlow framework as a backend.
|
||||
|
||||
:Namespace: OpenFlow
|
||||
:Imports: :doc:`base/frameworks/openflow/consts.bro </scripts/base/frameworks/openflow/consts.bro>`, :doc:`base/frameworks/openflow/types.bro </scripts/base/frameworks/openflow/types.bro>`
|
||||
|
||||
Summary
|
||||
~~~~~~~
|
||||
Events
|
||||
######
|
||||
=========================================================== =============================================================================================
|
||||
:bro:id:`OpenFlow::controller_activated`: :bro:type:`event` Event that is raised once a controller finishes initialization
|
||||
and is completely activated.
|
||||
:bro:id:`OpenFlow::flow_mod_failure`: :bro:type:`event` Reports an error while installing a flow Rule.
|
||||
:bro:id:`OpenFlow::flow_mod_success`: :bro:type:`event` Event confirming successful modification of a flow rule.
|
||||
:bro:id:`OpenFlow::flow_removed`: :bro:type:`event` Reports that a flow was removed by the switch because of either the hard or the idle timeout.
|
||||
=========================================================== =============================================================================================
|
||||
|
||||
Functions
|
||||
#########
|
||||
=============================================================== =====================================================================
|
||||
:bro:id:`OpenFlow::controller_init_done`: :bro:type:`function` Function to signal that a controller finished activation and is
|
||||
ready to use.
|
||||
:bro:id:`OpenFlow::flow_clear`: :bro:type:`function` Clear the current flow table of the controller.
|
||||
:bro:id:`OpenFlow::flow_mod`: :bro:type:`function` Global flow_mod function.
|
||||
:bro:id:`OpenFlow::generate_cookie`: :bro:type:`function` Function to generate a new cookie using our group id.
|
||||
:bro:id:`OpenFlow::get_cookie_gid`: :bro:type:`function` Function to get the group id out of a given cookie.
|
||||
:bro:id:`OpenFlow::get_cookie_uid`: :bro:type:`function` Function to get the unique id out of a given cookie.
|
||||
:bro:id:`OpenFlow::lookup_controller`: :bro:type:`function` Function to lookup a controller instance by name.
|
||||
:bro:id:`OpenFlow::match_conn`: :bro:type:`function` Convert a conn_id record into an ofp_match record that can be used to
|
||||
create match objects for OpenFlow.
|
||||
:bro:id:`OpenFlow::register_controller`: :bro:type:`function` Function to register a controller instance.
|
||||
:bro:id:`OpenFlow::unregister_controller`: :bro:type:`function` Function to unregister a controller instance.
|
||||
=============================================================== =====================================================================
|
||||
|
||||
|
||||
Detailed Interface
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
Events
|
||||
######
|
||||
.. bro:id:: OpenFlow::controller_activated
|
||||
|
||||
:Type: :bro:type:`event` (name: :bro:type:`string`, controller: :bro:type:`OpenFlow::Controller`)
|
||||
|
||||
Event that is raised once a controller finishes initialization
|
||||
and is completely activated.
|
||||
|
||||
:name: Unique name of this controller instance.
|
||||
|
||||
|
||||
:controller: The controller that finished activation.
|
||||
|
||||
.. bro:id:: OpenFlow::flow_mod_failure
|
||||
|
||||
:Type: :bro:type:`event` (name: :bro:type:`string`, match: :bro:type:`OpenFlow::ofp_match`, flow_mod: :bro:type:`OpenFlow::ofp_flow_mod`, msg: :bro:type:`string` :bro:attr:`&default` = ``""`` :bro:attr:`&optional`)
|
||||
|
||||
Reports an error while installing a flow Rule.
|
||||
|
||||
|
||||
:name: The unique name of the OpenFlow controller from which this event originated.
|
||||
|
||||
|
||||
:match: The ofp_match record which describes the flow to match.
|
||||
|
||||
|
||||
:flow_mod: The openflow flow_mod record which describes the action to take.
|
||||
|
||||
|
||||
:msg: Message to describe the event.
|
||||
|
||||
.. bro:id:: OpenFlow::flow_mod_success
|
||||
|
||||
:Type: :bro:type:`event` (name: :bro:type:`string`, match: :bro:type:`OpenFlow::ofp_match`, flow_mod: :bro:type:`OpenFlow::ofp_flow_mod`, msg: :bro:type:`string` :bro:attr:`&default` = ``""`` :bro:attr:`&optional`)
|
||||
|
||||
Event confirming successful modification of a flow rule.
|
||||
|
||||
|
||||
:name: The unique name of the OpenFlow controller from which this event originated.
|
||||
|
||||
|
||||
:match: The ofp_match record which describes the flow to match.
|
||||
|
||||
|
||||
:flow_mod: The openflow flow_mod record which describes the action to take.
|
||||
|
||||
|
||||
:msg: An optional informational message by the plugin.
|
||||
|
||||
.. bro:id:: OpenFlow::flow_removed
|
||||
|
||||
:Type: :bro:type:`event` (name: :bro:type:`string`, match: :bro:type:`OpenFlow::ofp_match`, cookie: :bro:type:`count`, priority: :bro:type:`count`, reason: :bro:type:`count`, duration_sec: :bro:type:`count`, idle_timeout: :bro:type:`count`, packet_count: :bro:type:`count`, byte_count: :bro:type:`count`)
|
||||
|
||||
Reports that a flow was removed by the switch because of either the hard or the idle timeout.
|
||||
This message is only generated by controllers that indicate that they support flow removal
|
||||
in supports_flow_removed.
|
||||
|
||||
|
||||
:name: The unique name of the OpenFlow controller from which this event originated.
|
||||
|
||||
|
||||
:match: The ofp_match record which was used to create the flow.
|
||||
|
||||
|
||||
:cookie: The cookie that was specified when creating the flow.
|
||||
|
||||
|
||||
:priority: The priority that was specified when creating the flow.
|
||||
|
||||
|
||||
:reason: The reason for flow removal (OFPRR_*).
|
||||
|
||||
|
||||
:duration_sec: Duration of the flow in seconds.
|
||||
|
||||
|
||||
:packet_count: Packet count of the flow.
|
||||
|
||||
|
||||
:byte_count: Byte count of the flow.
|
||||
|
||||
Functions
|
||||
#########
|
||||
.. bro:id:: OpenFlow::controller_init_done
|
||||
|
||||
:Type: :bro:type:`function` (controller: :bro:type:`OpenFlow::Controller`) : :bro:type:`void`
|
||||
|
||||
Function to signal that a controller finished activation and is
|
||||
ready to use. Will throw the ``OpenFlow::controller_activated``
|
||||
event.
|
||||
|
||||
.. bro:id:: OpenFlow::flow_clear
|
||||
|
||||
:Type: :bro:type:`function` (controller: :bro:type:`OpenFlow::Controller`) : :bro:type:`bool`
|
||||
|
||||
Clear the current flow table of the controller.
|
||||
|
||||
|
||||
: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.
|
||||
|
||||
.. bro:id:: OpenFlow::flow_mod
|
||||
|
||||
:Type: :bro:type:`function` (controller: :bro:type:`OpenFlow::Controller`, match: :bro:type:`OpenFlow::ofp_match`, flow_mod: :bro:type:`OpenFlow::ofp_flow_mod`) : :bro:type:`bool`
|
||||
|
||||
Global flow_mod function.
|
||||
|
||||
|
||||
:controller: The controller which should execute the flow modification.
|
||||
|
||||
|
||||
:match: The ofp_match record which describes the flow to match.
|
||||
|
||||
|
||||
:flow_mod: The openflow flow_mod record which describes the action to take.
|
||||
|
||||
|
||||
:returns: F on error or if the plugin does not support the operation, T when the operation was queued.
|
||||
|
||||
.. bro:id:: OpenFlow::generate_cookie
|
||||
|
||||
:Type: :bro:type:`function` (cookie: :bro:type:`count` :bro:attr:`&default` = ``0`` :bro:attr:`&optional`) : :bro:type:`count`
|
||||
|
||||
Function to generate a new cookie using our group id.
|
||||
|
||||
|
||||
:cookie: The openflow match cookie.
|
||||
|
||||
|
||||
:returns: The cookie group id.
|
||||
|
||||
.. bro:id:: OpenFlow::get_cookie_gid
|
||||
|
||||
:Type: :bro:type:`function` (cookie: :bro:type:`count`) : :bro:type:`count`
|
||||
|
||||
Function to get the group id out of a given cookie.
|
||||
|
||||
|
||||
:cookie: The openflow match cookie.
|
||||
|
||||
|
||||
:returns: The cookie group id.
|
||||
|
||||
.. bro:id:: OpenFlow::get_cookie_uid
|
||||
|
||||
:Type: :bro:type:`function` (cookie: :bro:type:`count`) : :bro:type:`count`
|
||||
|
||||
Function to get the unique id out of a given cookie.
|
||||
|
||||
|
||||
:cookie: The openflow match cookie.
|
||||
|
||||
|
||||
:returns: The cookie unique id.
|
||||
|
||||
.. bro:id:: OpenFlow::lookup_controller
|
||||
|
||||
:Type: :bro:type:`function` (name: :bro:type:`string`) : :bro:type:`vector` of :bro:type:`OpenFlow::Controller`
|
||||
|
||||
Function to lookup a controller instance by name.
|
||||
|
||||
|
||||
:name: Unique name of the controller to look up.
|
||||
|
||||
|
||||
:returns: One element vector with controller, if found. Empty vector otherwise.
|
||||
|
||||
.. bro:id:: OpenFlow::match_conn
|
||||
|
||||
:Type: :bro:type:`function` (id: :bro:type:`conn_id`, reverse: :bro:type:`bool` :bro:attr:`&default` = ``F`` :bro:attr:`&optional`) : :bro:type:`OpenFlow::ofp_match`
|
||||
|
||||
Convert a conn_id record into an ofp_match record that can be used to
|
||||
create match objects for OpenFlow.
|
||||
|
||||
|
||||
:id: The conn_id record that describes the record.
|
||||
|
||||
|
||||
:reverse: Reverse the sources and destinations when creating the match record (default F).
|
||||
|
||||
|
||||
:returns: ofp_match object for the conn_id record.
|
||||
|
||||
.. bro:id:: OpenFlow::register_controller
|
||||
|
||||
:Type: :bro:type:`function` (tpe: :bro:type:`OpenFlow::Plugin`, name: :bro:type:`string`, controller: :bro:type:`OpenFlow::Controller`) : :bro:type:`void`
|
||||
|
||||
Function to register a controller instance. This function
|
||||
is called automatically by the plugin _new functions.
|
||||
|
||||
|
||||
:tpe: Type of this plugin.
|
||||
|
||||
|
||||
:name: Unique name of this controller instance.
|
||||
|
||||
|
||||
:controller: The controller to register.
|
||||
|
||||
.. bro:id:: OpenFlow::unregister_controller
|
||||
|
||||
:Type: :bro:type:`function` (controller: :bro:type:`OpenFlow::Controller`) : :bro:type:`void`
|
||||
|
||||
Function to unregister a controller instance. This function
|
||||
should be called when a specific controller should no longer
|
||||
be used.
|
||||
|
||||
|
||||
:controller: The controller to unregister.
|
||||
|
||||
|
16
doc/scripts/base/frameworks/openflow/non-cluster.bro.rst
Normal file
16
doc/scripts/base/frameworks/openflow/non-cluster.bro.rst
Normal file
|
@ -0,0 +1,16 @@
|
|||
:tocdepth: 3
|
||||
|
||||
base/frameworks/openflow/non-cluster.bro
|
||||
========================================
|
||||
.. bro:namespace:: OpenFlow
|
||||
|
||||
|
||||
:Namespace: OpenFlow
|
||||
:Imports: :doc:`base/frameworks/openflow/main.bro </scripts/base/frameworks/openflow/main.bro>`
|
||||
|
||||
Summary
|
||||
~~~~~~~
|
||||
|
||||
Detailed Interface
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
:tocdepth: 3
|
||||
|
||||
base/frameworks/openflow/plugins/__load__.bro
|
||||
=============================================
|
||||
|
||||
|
||||
:Imports: :doc:`base/frameworks/openflow/plugins/broker.bro </scripts/base/frameworks/openflow/plugins/broker.bro>`, :doc:`base/frameworks/openflow/plugins/log.bro </scripts/base/frameworks/openflow/plugins/log.bro>`, :doc:`base/frameworks/openflow/plugins/ryu.bro </scripts/base/frameworks/openflow/plugins/ryu.bro>`
|
||||
|
||||
Summary
|
||||
~~~~~~~
|
||||
|
||||
Detailed Interface
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
72
doc/scripts/base/frameworks/openflow/plugins/broker.bro.rst
Normal file
72
doc/scripts/base/frameworks/openflow/plugins/broker.bro.rst
Normal file
|
@ -0,0 +1,72 @@
|
|||
:tocdepth: 3
|
||||
|
||||
base/frameworks/openflow/plugins/broker.bro
|
||||
===========================================
|
||||
.. bro:namespace:: OpenFlow
|
||||
|
||||
OpenFlow plugin for interfacing to controllers via Broker.
|
||||
|
||||
:Namespace: OpenFlow
|
||||
:Imports: :doc:`base/frameworks/broker </scripts/base/frameworks/broker/index>`, :doc:`base/frameworks/openflow </scripts/base/frameworks/openflow/index>`
|
||||
|
||||
Summary
|
||||
~~~~~~~
|
||||
Redefinitions
|
||||
#############
|
||||
============================================================================ =
|
||||
:bro:type:`OpenFlow::ControllerState`: :bro:type:`record` :bro:attr:`&redef`
|
||||
:bro:type:`OpenFlow::Plugin`: :bro:type:`enum`
|
||||
============================================================================ =
|
||||
|
||||
Events
|
||||
######
|
||||
======================================================== =
|
||||
:bro:id:`OpenFlow::broker_flow_clear`: :bro:type:`event`
|
||||
:bro:id:`OpenFlow::broker_flow_mod`: :bro:type:`event`
|
||||
======================================================== =
|
||||
|
||||
Functions
|
||||
#########
|
||||
==================================================== ==============================
|
||||
:bro:id:`OpenFlow::broker_new`: :bro:type:`function` Broker controller constructor.
|
||||
==================================================== ==============================
|
||||
|
||||
|
||||
Detailed Interface
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
Events
|
||||
######
|
||||
.. bro:id:: OpenFlow::broker_flow_clear
|
||||
|
||||
:Type: :bro:type:`event` (name: :bro:type:`string`, dpid: :bro:type:`count`)
|
||||
|
||||
|
||||
.. bro:id:: OpenFlow::broker_flow_mod
|
||||
|
||||
:Type: :bro:type:`event` (name: :bro:type:`string`, dpid: :bro:type:`count`, match: :bro:type:`OpenFlow::ofp_match`, flow_mod: :bro:type:`OpenFlow::ofp_flow_mod`)
|
||||
|
||||
|
||||
Functions
|
||||
#########
|
||||
.. bro:id:: OpenFlow::broker_new
|
||||
|
||||
:Type: :bro:type:`function` (name: :bro:type:`string`, host: :bro:type:`addr`, host_port: :bro:type:`port`, topic: :bro:type:`string`, dpid: :bro:type:`count`) : :bro:type:`OpenFlow::Controller`
|
||||
|
||||
Broker controller constructor.
|
||||
|
||||
|
||||
:host: Controller ip.
|
||||
|
||||
|
||||
:host_port: Controller listen port.
|
||||
|
||||
|
||||
:topic: Broker topic to send messages to.
|
||||
|
||||
|
||||
:dpid: OpenFlow switch datapath id.
|
||||
|
||||
|
||||
:returns: OpenFlow::Controller record.
|
||||
|
||||
|
23
doc/scripts/base/frameworks/openflow/plugins/index.rst
Normal file
23
doc/scripts/base/frameworks/openflow/plugins/index.rst
Normal file
|
@ -0,0 +1,23 @@
|
|||
:orphan:
|
||||
|
||||
Package: base/frameworks/openflow/plugins
|
||||
=========================================
|
||||
|
||||
Plugins for the OpenFlow framework.
|
||||
|
||||
:doc:`/scripts/base/frameworks/openflow/plugins/__load__.bro`
|
||||
|
||||
|
||||
:doc:`/scripts/base/frameworks/openflow/plugins/ryu.bro`
|
||||
|
||||
OpenFlow plugin for the Ryu controller.
|
||||
|
||||
:doc:`/scripts/base/frameworks/openflow/plugins/log.bro`
|
||||
|
||||
OpenFlow plugin that outputs flow-modification commands
|
||||
to a Bro log file.
|
||||
|
||||
:doc:`/scripts/base/frameworks/openflow/plugins/broker.bro`
|
||||
|
||||
OpenFlow plugin for interfacing to controllers via Broker.
|
||||
|
91
doc/scripts/base/frameworks/openflow/plugins/log.bro.rst
Normal file
91
doc/scripts/base/frameworks/openflow/plugins/log.bro.rst
Normal file
|
@ -0,0 +1,91 @@
|
|||
:tocdepth: 3
|
||||
|
||||
base/frameworks/openflow/plugins/log.bro
|
||||
========================================
|
||||
.. bro:namespace:: OpenFlow
|
||||
|
||||
OpenFlow plugin that outputs flow-modification commands
|
||||
to a Bro log file.
|
||||
|
||||
:Namespace: OpenFlow
|
||||
:Imports: :doc:`base/frameworks/logging </scripts/base/frameworks/logging/index>`, :doc:`base/frameworks/openflow </scripts/base/frameworks/openflow/index>`
|
||||
|
||||
Summary
|
||||
~~~~~~~
|
||||
Types
|
||||
#####
|
||||
============================================== =================================================================
|
||||
:bro:type:`OpenFlow::Info`: :bro:type:`record` The record type which contains column fields of the OpenFlow log.
|
||||
============================================== =================================================================
|
||||
|
||||
Redefinitions
|
||||
#############
|
||||
============================================================================ =
|
||||
:bro:type:`Log::ID`: :bro:type:`enum`
|
||||
:bro:type:`OpenFlow::ControllerState`: :bro:type:`record` :bro:attr:`&redef`
|
||||
:bro:type:`OpenFlow::Plugin`: :bro:type:`enum`
|
||||
============================================================================ =
|
||||
|
||||
Events
|
||||
######
|
||||
=================================================== ==================================================================
|
||||
:bro:id:`OpenFlow::log_openflow`: :bro:type:`event` Event that can be handled to access the :bro:type:`OpenFlow::Info`
|
||||
record as it is sent on to the logging framework.
|
||||
=================================================== ==================================================================
|
||||
|
||||
Functions
|
||||
#########
|
||||
================================================= ===========================
|
||||
:bro:id:`OpenFlow::log_new`: :bro:type:`function` Log controller constructor.
|
||||
================================================= ===========================
|
||||
|
||||
|
||||
Detailed Interface
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
Types
|
||||
#####
|
||||
.. bro:type:: OpenFlow::Info
|
||||
|
||||
:Type: :bro:type:`record`
|
||||
|
||||
ts: :bro:type:`time` :bro:attr:`&log`
|
||||
Network time.
|
||||
|
||||
dpid: :bro:type:`count` :bro:attr:`&log`
|
||||
OpenFlow switch datapath id.
|
||||
|
||||
match: :bro:type:`OpenFlow::ofp_match` :bro:attr:`&log`
|
||||
OpenFlow match fields.
|
||||
|
||||
flow_mod: :bro:type:`OpenFlow::ofp_flow_mod` :bro:attr:`&log`
|
||||
OpenFlow modify flow entry message.
|
||||
|
||||
The record type which contains column fields of the OpenFlow log.
|
||||
|
||||
Events
|
||||
######
|
||||
.. bro:id:: OpenFlow::log_openflow
|
||||
|
||||
:Type: :bro:type:`event` (rec: :bro:type:`OpenFlow::Info`)
|
||||
|
||||
Event that can be handled to access the :bro:type:`OpenFlow::Info`
|
||||
record as it is sent on to the logging framework.
|
||||
|
||||
Functions
|
||||
#########
|
||||
.. bro:id:: OpenFlow::log_new
|
||||
|
||||
:Type: :bro:type:`function` (dpid: :bro:type:`count`, success_event: :bro:type:`bool` :bro:attr:`&default` = ``T`` :bro:attr:`&optional`) : :bro:type:`OpenFlow::Controller`
|
||||
|
||||
Log controller constructor.
|
||||
|
||||
|
||||
:dpid: OpenFlow switch datapath id.
|
||||
|
||||
|
||||
:success_event: If true, flow_mod_success is raised for each logged line.
|
||||
|
||||
|
||||
:returns: OpenFlow::Controller record.
|
||||
|
||||
|
50
doc/scripts/base/frameworks/openflow/plugins/ryu.bro.rst
Normal file
50
doc/scripts/base/frameworks/openflow/plugins/ryu.bro.rst
Normal file
|
@ -0,0 +1,50 @@
|
|||
:tocdepth: 3
|
||||
|
||||
base/frameworks/openflow/plugins/ryu.bro
|
||||
========================================
|
||||
.. bro:namespace:: OpenFlow
|
||||
|
||||
OpenFlow plugin for the Ryu controller.
|
||||
|
||||
:Namespace: OpenFlow
|
||||
:Imports: :doc:`base/frameworks/openflow </scripts/base/frameworks/openflow/index>`, :doc:`base/utils/active-http.bro </scripts/base/utils/active-http.bro>`, :doc:`base/utils/exec.bro </scripts/base/utils/exec.bro>`, :doc:`base/utils/json.bro </scripts/base/utils/json.bro>`
|
||||
|
||||
Summary
|
||||
~~~~~~~
|
||||
Redefinitions
|
||||
#############
|
||||
============================================================================ =
|
||||
:bro:type:`OpenFlow::ControllerState`: :bro:type:`record` :bro:attr:`&redef`
|
||||
:bro:type:`OpenFlow::Plugin`: :bro:type:`enum`
|
||||
============================================================================ =
|
||||
|
||||
Functions
|
||||
#########
|
||||
================================================= ===========================
|
||||
:bro:id:`OpenFlow::ryu_new`: :bro:type:`function` Ryu controller constructor.
|
||||
================================================= ===========================
|
||||
|
||||
|
||||
Detailed Interface
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
Functions
|
||||
#########
|
||||
.. bro:id:: OpenFlow::ryu_new
|
||||
|
||||
:Type: :bro:type:`function` (host: :bro:type:`addr`, host_port: :bro:type:`count`, dpid: :bro:type:`count`) : :bro:type:`OpenFlow::Controller`
|
||||
|
||||
Ryu controller constructor.
|
||||
|
||||
|
||||
:host: Controller ip.
|
||||
|
||||
|
||||
:host_port: Controller listen port.
|
||||
|
||||
|
||||
:dpid: OpenFlow switch datapath id.
|
||||
|
||||
|
||||
:returns: OpenFlow::Controller record.
|
||||
|
||||
|
264
doc/scripts/base/frameworks/openflow/types.bro.rst
Normal file
264
doc/scripts/base/frameworks/openflow/types.bro.rst
Normal file
|
@ -0,0 +1,264 @@
|
|||
:tocdepth: 3
|
||||
|
||||
base/frameworks/openflow/types.bro
|
||||
==================================
|
||||
.. bro:namespace:: OpenFlow
|
||||
|
||||
Types used by the OpenFlow framework.
|
||||
|
||||
:Namespace: OpenFlow
|
||||
:Imports: :doc:`base/frameworks/openflow/consts.bro </scripts/base/frameworks/openflow/consts.bro>`
|
||||
|
||||
Summary
|
||||
~~~~~~~
|
||||
Types
|
||||
#####
|
||||
============================================================================ ===============================================================
|
||||
:bro:type:`OpenFlow::Controller`: :bro:type:`record` Controller record representing an openflow controller.
|
||||
:bro:type:`OpenFlow::ControllerState`: :bro:type:`record` :bro:attr:`&redef` Controller related state.
|
||||
:bro:type:`OpenFlow::Plugin`: :bro:type:`enum` Available openflow plugins.
|
||||
:bro:type:`OpenFlow::ofp_flow_action`: :bro:type:`record` :bro:attr:`&log` The actions that can be taken in a flow.
|
||||
:bro:type:`OpenFlow::ofp_flow_mod`: :bro:type:`record` :bro:attr:`&log` Openflow flow_mod definition, describing the action to perform.
|
||||
:bro:type:`OpenFlow::ofp_match`: :bro:type:`record` :bro:attr:`&log` Openflow match definition.
|
||||
============================================================================ ===============================================================
|
||||
|
||||
|
||||
Detailed Interface
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
Types
|
||||
#####
|
||||
.. bro:type:: OpenFlow::Controller
|
||||
|
||||
:Type: :bro:type:`record`
|
||||
|
||||
state: :bro:type:`OpenFlow::ControllerState`
|
||||
Controller related state.
|
||||
|
||||
supports_flow_removed: :bro:type:`bool`
|
||||
Does the controller support the flow_removed event?
|
||||
|
||||
describe: :bro:type:`function` (state: :bro:type:`OpenFlow::ControllerState`) : :bro:type:`string`
|
||||
Function that describes the controller. Has to be implemented.
|
||||
|
||||
init: :bro:type:`function` (state: :bro:type:`OpenFlow::ControllerState`) : :bro:type:`void` :bro:attr:`&optional`
|
||||
One-time initialization function. If defined, controller_init_done has to be called once initialization finishes.
|
||||
|
||||
destroy: :bro:type:`function` (state: :bro:type:`OpenFlow::ControllerState`) : :bro:type:`void` :bro:attr:`&optional`
|
||||
One-time destruction function.
|
||||
|
||||
flow_mod: :bro:type:`function` (state: :bro:type:`OpenFlow::ControllerState`, match: :bro:type:`OpenFlow::ofp_match`, flow_mod: :bro:type:`OpenFlow::ofp_flow_mod`) : :bro:type:`bool` :bro:attr:`&optional`
|
||||
flow_mod function.
|
||||
|
||||
flow_clear: :bro:type:`function` (state: :bro:type:`OpenFlow::ControllerState`) : :bro:type:`bool` :bro:attr:`&optional`
|
||||
flow_clear function.
|
||||
|
||||
Controller record representing an openflow controller.
|
||||
|
||||
.. bro:type:: OpenFlow::ControllerState
|
||||
|
||||
:Type: :bro:type:`record`
|
||||
|
||||
_plugin: :bro:type:`OpenFlow::Plugin` :bro:attr:`&optional`
|
||||
Internally set to the type of plugin used.
|
||||
|
||||
_name: :bro:type:`string` :bro:attr:`&optional`
|
||||
Internally set to the unique name of the controller.
|
||||
|
||||
_activated: :bro:type:`bool` :bro:attr:`&default` = ``F`` :bro:attr:`&optional`
|
||||
Internally set to true once the controller is activated.
|
||||
|
||||
ryu_host: :bro:type:`addr` :bro:attr:`&optional`
|
||||
(present if :doc:`/scripts/base/frameworks/openflow/plugins/ryu.bro` is loaded)
|
||||
|
||||
Controller ip.
|
||||
|
||||
ryu_port: :bro:type:`count` :bro:attr:`&optional`
|
||||
(present if :doc:`/scripts/base/frameworks/openflow/plugins/ryu.bro` is loaded)
|
||||
|
||||
Controller listen port.
|
||||
|
||||
ryu_dpid: :bro:type:`count` :bro:attr:`&optional`
|
||||
(present if :doc:`/scripts/base/frameworks/openflow/plugins/ryu.bro` is loaded)
|
||||
|
||||
OpenFlow switch datapath id.
|
||||
|
||||
ryu_debug: :bro:type:`bool` :bro:attr:`&default` = ``F`` :bro:attr:`&optional`
|
||||
(present if :doc:`/scripts/base/frameworks/openflow/plugins/ryu.bro` is loaded)
|
||||
|
||||
Enable debug mode - output JSON to stdout; do not perform actions.
|
||||
|
||||
log_dpid: :bro:type:`count` :bro:attr:`&optional`
|
||||
(present if :doc:`/scripts/base/frameworks/openflow/plugins/log.bro` is loaded)
|
||||
|
||||
OpenFlow switch datapath id.
|
||||
|
||||
log_success_event: :bro:type:`bool` :bro:attr:`&optional`
|
||||
(present if :doc:`/scripts/base/frameworks/openflow/plugins/log.bro` is loaded)
|
||||
|
||||
Raise or do not raise success event.
|
||||
|
||||
broker_host: :bro:type:`addr` :bro:attr:`&optional`
|
||||
(present if :doc:`/scripts/base/frameworks/openflow/plugins/broker.bro` is loaded)
|
||||
|
||||
Controller ip.
|
||||
|
||||
broker_port: :bro:type:`port` :bro:attr:`&optional`
|
||||
(present if :doc:`/scripts/base/frameworks/openflow/plugins/broker.bro` is loaded)
|
||||
|
||||
Controller listen port.
|
||||
|
||||
broker_dpid: :bro:type:`count` :bro:attr:`&optional`
|
||||
(present if :doc:`/scripts/base/frameworks/openflow/plugins/broker.bro` is loaded)
|
||||
|
||||
OpenFlow switch datapath id.
|
||||
|
||||
broker_topic: :bro:type:`string` :bro:attr:`&optional`
|
||||
(present if :doc:`/scripts/base/frameworks/openflow/plugins/broker.bro` is loaded)
|
||||
|
||||
Topic to send events for this controller to.
|
||||
:Attributes: :bro:attr:`&redef`
|
||||
|
||||
Controller related state.
|
||||
Can be redefined by plugins to
|
||||
add state.
|
||||
|
||||
.. bro:type:: OpenFlow::Plugin
|
||||
|
||||
:Type: :bro:type:`enum`
|
||||
|
||||
.. bro:enum:: OpenFlow::INVALID OpenFlow::Plugin
|
||||
|
||||
Internal placeholder plugin.
|
||||
|
||||
.. bro:enum:: OpenFlow::RYU OpenFlow::Plugin
|
||||
|
||||
(present if :doc:`/scripts/base/frameworks/openflow/plugins/ryu.bro` is loaded)
|
||||
|
||||
|
||||
.. bro:enum:: OpenFlow::OFLOG OpenFlow::Plugin
|
||||
|
||||
(present if :doc:`/scripts/base/frameworks/openflow/plugins/log.bro` is loaded)
|
||||
|
||||
|
||||
.. bro:enum:: OpenFlow::BROKER OpenFlow::Plugin
|
||||
|
||||
(present if :doc:`/scripts/base/frameworks/openflow/plugins/broker.bro` is loaded)
|
||||
|
||||
|
||||
Available openflow plugins.
|
||||
|
||||
.. bro:type:: OpenFlow::ofp_flow_action
|
||||
|
||||
:Type: :bro:type:`record`
|
||||
|
||||
out_ports: :bro:type:`vector` of :bro:type:`count` :bro:attr:`&default` = ``[]`` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
Output ports to send data to.
|
||||
|
||||
vlan_vid: :bro:type:`count` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
Set vlan vid to this value.
|
||||
|
||||
vlan_pcp: :bro:type:`count` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
Set vlan priority to this value.
|
||||
|
||||
vlan_strip: :bro:type:`bool` :bro:attr:`&default` = ``F`` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
Strip vlan tag.
|
||||
|
||||
dl_src: :bro:type:`string` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
Set ethernet source address.
|
||||
|
||||
dl_dst: :bro:type:`string` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
Set ethernet destination address.
|
||||
|
||||
nw_tos: :bro:type:`count` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
Set ip tos to this value.
|
||||
|
||||
nw_src: :bro:type:`addr` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
Set source to this ip.
|
||||
|
||||
nw_dst: :bro:type:`addr` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
Set destination to this ip.
|
||||
|
||||
tp_src: :bro:type:`count` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
Set tcp/udp source port.
|
||||
|
||||
tp_dst: :bro:type:`count` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
Set tcp/udp destination port.
|
||||
:Attributes: :bro:attr:`&log`
|
||||
|
||||
The actions that can be taken in a flow.
|
||||
(Separate record to make ofp_flow_mod less crowded)
|
||||
|
||||
.. bro:type:: OpenFlow::ofp_flow_mod
|
||||
|
||||
:Type: :bro:type:`record`
|
||||
|
||||
cookie: :bro:type:`count` :bro:attr:`&log`
|
||||
Opaque controller-issued identifier.
|
||||
|
||||
table_id: :bro:type:`count` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
Table to put the flow in. OFPTT_ALL can be used for delete,
|
||||
to delete flows from all matching tables.
|
||||
|
||||
command: :bro:type:`OpenFlow::ofp_flow_mod_command` :bro:attr:`&log`
|
||||
One of OFPFC_*.
|
||||
|
||||
idle_timeout: :bro:type:`count` :bro:attr:`&default` = ``0`` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
Idle time before discarding (seconds).
|
||||
|
||||
hard_timeout: :bro:type:`count` :bro:attr:`&default` = ``0`` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
Max time before discarding (seconds).
|
||||
|
||||
priority: :bro:type:`count` :bro:attr:`&default` = ``0`` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
Priority level of flow entry.
|
||||
|
||||
out_port: :bro:type:`count` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
For OFPFC_DELETE* commands, require matching entried to include
|
||||
this as an output port/group. OFPP_ANY/OFPG_ANY means no restrictions.
|
||||
|
||||
out_group: :bro:type:`count` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
|
||||
flags: :bro:type:`count` :bro:attr:`&default` = ``0`` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
Bitmap of the OFPFF_* flags
|
||||
|
||||
actions: :bro:type:`OpenFlow::ofp_flow_action` :bro:attr:`&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>]`` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
Actions to take on match
|
||||
:Attributes: :bro:attr:`&log`
|
||||
|
||||
Openflow flow_mod definition, describing the action to perform.
|
||||
|
||||
.. bro:type:: OpenFlow::ofp_match
|
||||
|
||||
:Type: :bro:type:`record`
|
||||
|
||||
in_port: :bro:type:`count` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
|
||||
dl_src: :bro:type:`string` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
|
||||
dl_dst: :bro:type:`string` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
|
||||
dl_vlan: :bro:type:`count` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
|
||||
dl_vlan_pcp: :bro:type:`count` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
|
||||
dl_type: :bro:type:`count` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
|
||||
nw_tos: :bro:type:`count` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
|
||||
nw_proto: :bro:type:`count` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
|
||||
nw_src: :bro:type:`subnet` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
|
||||
nw_dst: :bro:type:`subnet` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
|
||||
tp_src: :bro:type:`count` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
|
||||
tp_dst: :bro:type:`count` :bro:attr:`&optional` :bro:attr:`&log`
|
||||
:Attributes: :bro:attr:`&log`
|
||||
|
||||
Openflow match definition.
|
||||
|
||||
The openflow match record describes
|
||||
which packets match to a specific
|
||||
rule in a flow table.
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue