+
+ typedef flow-mod-command {
+ /* ofp_flow_mod_command */
+ type enumeration {
+ enum OFPFC_ADD {
+ value 0;
+ description "New flow.";
+ }
+ enum OFPFC_MODIFY {
+ value 1;
+ description "Modify all matching flows.";
+ }
+ enum OFPFC_MODIFY_STRICT {
+ value 2;
+ description "Modify entry strictly matching wildcards and priority.";
+ }
+ enum OFPFC_DELETE {
+ value 3;
+ description "Delete all matching flows.";
+ }
+ enum OFPFC_DELETE_STRICT {
+ value 4;
+ description "Delete entry strictly matching wildcards and priority.";
+ }
+ }
+ }
+
+ typedef flow-mod-flags {
+ /* ofp_flow_mod_flags */
+ type bits {
+ bit OFPFF_SEND_FLOW_REM {
+ position 0;
+ description "Send flow removed message when flow expires or is deleted.";
+ }
+ bit OFPFF_CHECK_OVERLAP {
+ position 1;
+ description "Check for overlapping entries first.";
+ }
+ bit OFPFF_RESET_COUNTS {
+ position 2;
+ description "Reset flow packet and byte counts.";
+ }
+ bit OFPFF_NO_PKT_COUNTS {
+ position 3;
+ description "Don't keep track of packet count.";
+ }
+ bit OFPFF_NO_BYT_COUNTS {
+ position 4;
+ description "Don't keep track of byte count.";
+ }
+ }
+ }
+
+ typedef group-mod-command {
+ /* ofp_group_mod_command */
+ type enumeration {
+ enum OFPGC_ADD {
+ value 0;
+ description "New group.";
+ }
+ enum OFPGC_MODIFY {
+ value 1;
+ description "Modify all matching groups.";
+ }
+ enum OFPGC_DELETE {
+ value 2;
+ description "Delete all matching groups.";
+ }
+ }
+ }
+
+ typedef group-type {
+ /* ofp_group_type */
+ type enumeration {
+ enum OFPGT_ALL {
+ value 0;
+ description "All (multicast/broadcast) group.";
+ }
+ enum OFPGT_SELECT {
+ value 1;
+ description "Select group.";
+ }
+ enum OFPGT_INDIRECT {
+ value 2;
+ description "Indirect group.";
+ }
+ enum OFPGT_FF {
+ value 3;
+ description "Fast failover group.";
+ }
+ }
+ }
+
+ typedef table-values {
+ /* ofp_table */
+ type enumeration {
+ enum OFPTT_MAX {
+ value 254; // 0xfe
+ description "Last usable table number.";
+ }
+ enum OFPTT_ALL {
+ value 255; // 0xff
+ description "Wildcard table used for table config,
+ flow stats and flow deletes.";
+ }
+ }
+ }
+
+ typedef group {
+ /* ofp_group - Group numbering. Groups can use any number up to OFPG_MAX.*/
+ type enumeration {
+ enum OFPG_MAX {
+ value -256; //0xffffff00
+ description "Last usable group number";
+ }
+ /* Fake groups. */
+ enum OFPG_ALL {
+ value -4; //0xfffffffc
+ description "Represents all groups for group delete commands";
+ }
+ enum OFPG_ANY {
+ value -1; //0xffffffff
+ description "Wildcard group used only for flow stats requests.
+ Selects all flows regardless of group (including flows with no group)";
+ }
+ }
+ }
+
+ typedef multipart-request-flags {
+ description "enum ofp_multipart_request_flags ";
+ type bits {
+ bit OFPMPF_REQ_MORE {
+ description "More requests to follow.";
+ position 0;
+ }
+ }
+ }
+
+ typedef multipart-type {
+ type enumeration {
+ enum OFPMP_DESC {
+ value 0;
+ description "Description of this OpenFlow switch.
+ The request body is empty.
+ The reply body is struct ofp_desc.";
+ }
+ enum OFPMP_FLOW {
+ value 1;
+ description "Individual flow statistics.
+ The request body is struct ofp_flow_stats_request.
+ The reply body is an array of struct ofp_flow_stats.";
+ }
+ enum OFPMP_AGGREGATE {
+ value 2;
+ description "Aggregate flow statistics.
+ The request body is struct ofp_aggregate_stats_request.
+ The reply body is struct ofp_aggregate_stats_reply.";
+ }
+ enum OFPMP_TABLE {
+ value 3;
+ description "Flow table statistics.
+ The request body is empty.
+ The reply body is an array of struct ofp_table_stats.";
+ }
+ enum OFPMP_PORT_STATS {
+ value 4;
+ description "Port statistics.
+ The request body is struct ofp_port_stats_request.
+ The reply body is an array of struct ofp_port_stats.";
+ }
+ enum OFPMP_QUEUE {
+ value 5;
+ description "Queue statistics for a port
+ The request body is struct ofp_queue_stats_request.
+ The reply body is an array of struct ofp_queue_stats";
+ }
+ enum OFPMP_GROUP {
+ value 6;
+ description "Group counter statistics.
+ The request body is struct ofp_group_stats_request.
+ The reply is an array of struct ofp_group_stats.";
+ }
+ enum OFPMP_GROUP_DESC {
+ value 7;
+ description "Group description.
+ The request body is empty.
+ The reply body is an array of struct ofp_group_desc.";
+ }
+ enum OFPMP_GROUP_FEATURES {
+ value 8;
+ description "Group features.
+ The request body is empty.
+ The reply body is struct ofp_group_features.";
+ }
+ enum OFPMP_METER {
+ value 9;
+ description "Meter statistics.
+ The request body is struct ofp_meter_multipart_requests.
+ The reply body is an array of struct ofp_meter_stats.";
+ }
+ enum OFPMP_METER_CONFIG {
+ value 10;
+ description "Meter configuration.
+ The request body is struct ofp_meter_multipart_requests.
+ The reply body is an array of struct ofp_meter_config.";
+ }
+ enum OFPMP_METER_FEATURES {
+ value 11;
+ description "Meter features.
+ The request body is empty.
+ The reply body is struct ofp_meter_features.";
+ }
+ enum OFPMP_TABLE_FEATURES {
+ value 12;
+ description "Table features.
+ The request body is either empty or contains an array of
+ struct ofp_table_features containing the controller’s
+ desired view of the switch. If the switch is unable to
+ set the specified view an error is returned.
+ The reply body is an array of struct ofp_table_features.";
+ }
+ enum OFPMP_PORT_DESC {
+ value 13;
+ description "Port description.
+ The request body is empty.
+ The reply body is an array of struct ofp_port.";
+ }
+ enum OFPMP_EXPERIMENTER {
+ value 65535; //0xffff
+ description "Experimenter extension.
+ The request and reply bodies begin with
+ struct ofp_experimenter_multipart_header.
+ The request and reply bodies are otherwise experimenter-defined.";
+ }
+ }
+ }
+
+ typedef queue-properties {
+ /* ofp_queue_properties */
+ type enumeration {
+ enum OFPQT_NONE {
+ value 0;
+ description "No property defined for queue (default).";
+ }
+ enum OFPQT_MIN_RATE {
+ value 1;
+ description "Minimum datarate guaranteed.";
+ }
+ enum OFPQT_MAX_RATE {
+ value 2;
+ description "Maximum datarate.";
+ }
+ enum OFPQT_EXPERIMENTER {
+ value 65535; // 0xffff
+ description "Experimenter defined property.";
+ }
+ }
+ }
+
+ typedef controller-role {
+ /* ofp_controller_role */
+ type enumeration {
+ enum OFPCR_ROLE_NOCHANGE {
+ value 0;
+ description "Don’t change current role.";
+ }
+ enum OFPCR_ROLE_EQUAL {
+ value 1;
+ description "Default role, full access.";
+ }
+ enum OFPCR_ROLE_MASTER {
+ value 2;
+ description "Full access, at most one master.";
+ }
+ enum OFPCR_ROLE_SLAVE {
+ value 3;
+ description "Read-only access.";
+ }
+ }
+ }
+
+ typedef packet-in-reason {
+ /* ofp_packet_in_reason */
+ type enumeration {
+ enum OFPR_NO_MATCH {
+ value 0;
+ description "No matching flow (table-miss flow entry). ";
+ }
+ enum OFPR_ACTION {
+ value 1;
+ description "Action explicitly output to controller. ";
+ }
+ enum OFPR_INVALID_TTL {
+ value 2;
+ description "Packet has invalid TTL ";
+ }
+ }
+ }
+
+ typedef action-type {
+ /* ofp_action_type */
+ type bits {
+ bit OFPAT_OUTPUT {
+ position 0;
+ /* Output to switch port. */
+ }
+ bit OFPAT_COPY_TTL_OUT {
+ position 1;
+ /* Copy TTL "outwards" -- from next-to-outermost to outermost */
+ }
+ bit OFPAT_COPY_TTL_IN {
+ position 2;
+ /* Copy TTL "inwards" -- from outermost to next-to-outermost */
+ }
+ bit OFPAT_SET_MPLS_TTL {
+ position 3;
+ /* MPLS TTL */
+ }
+ bit OFPAT_DEC_MPLS_TTL {
+ position 4;
+ /* Decrement MPLS TTL */
+ }
+ bit OFPAT_PUSH_VLAN {
+ position 5;
+ /* Push a new VLAN tag */
+ }
+ bit OFPAT_POP_VLAN {
+ position 6;
+ /* Pop the outer VLAN tag */
+ }
+ bit OFPAT_PUSH_MPLS {
+ position 7;
+ /* Push a new MPLS tag */
+ }
+ bit OFPAT_POP_MPLS {
+ position 8;
+ /* Pop the outer MPLS tag */
+ }
+ bit OFPAT_SET_QUEUE {
+ position 9;
+ /* Set queue id when outputting to a port */
+ }
+ bit OFPAT_GROUP {
+ position 10;
+ /* Apply group. */
+ }
+ bit OFPAT_SET_NW_TTL {
+ position 11;
+ /* IP TTL. */
+ }
+ bit OFPAT_DEC_NW_TTL {
+ position 12;
+ /* Decrement IP TTL. */
+ }
+ bit OFPAT_SET_FIELD {
+ position 13;
+ /* Set a header field using OXM TLV format. */
+ }
+ bit OFPAT_PUSH_PBB {
+ position 14;
+ /* Push a new PBB service tag (I-TAG) */
+ }
+ bit OFPAT_POP_PBB {
+ position 15;
+ /* Pop the outer PBB service tag (I-TAG) */
+ }
+ bit OFPAT_EXPERIMENTER {
+ position 16;
+ }
+ }
+ }
+
+ typedef meter-mod-command {
+ /* ofp_meter_mod_command */
+ type enumeration {
+ enum OFPMC_ADD {
+ description "New meter. ";
+ }
+ enum OFPMC_MODIFY {
+ description "Modify specified meter. ";
+ }
+ enum OFPMC_DELETE {
+ description "Delete specified meter. ";
+ }
+ }
+ }
+
+ typedef meter-flags {
+ /* ofp_meter_flags */
+ type bits {
+ bit OFPMF_KBPS {
+ position 0;
+ /* Rate value in kb/s (kilo-bit per second). */
+ }
+ bit OFPMF_PKTPS {
+ position 1;
+ /* Rate value in packet/sec. */
+ }
+ bit OFPMF_BURST {
+ position 2;
+ /* Do burst size. */
+ }
+ bit OFPMF_STATS {
+ position 3;
+ /* Collect statistics. */
+ }
+ }
+ }
+
+ typedef meter-band-type {
+ /* ofp_meter_band_type */
+ type enumeration {
+ enum OFPMBT_DROP {
+ value 1;
+ description "Drop packet. ";
+ }
+ enum OFPMBT_DSCP_REMARK {
+ value 2;
+ description "Remark DSCP in the IP header. ";
+ }
+ enum OFPMBT_EXPERIMENTER {
+ value 65535; //0xFFFF
+ description "Experimenter meter band. ";
+ }
+ }
+ }
+
+ typedef meter-band-type-bitmap {
+ /* ofp_meter_band_type */
+ type bits {
+ bit OFPMBT_DROP {
+ position 1;
+ description "Drop packet. ";
+ }
+ bit OFPMBT_DSCP_REMARK {
+ position 2;
+ description "Remark DSCP in the IP header. ";
+ }
+ }
+ }
+
+ typedef meter {
+ description "Meter numbering. Flow meters can use any number up to OFPM_MAX";
+ type enumeration {
+ enum OFPM_MAX {
+ value -65536; //0xffff0000
+ description "Last usable meter number";
+ }
+ /* Virtual meters. */
+ enum OFPM_SLOWPATH {
+ value -3; //0xfffffffd
+ description "Meter for slow datapath";
+ }
+ enum OFPM_CONTROLLER {
+ value -2; //0xfffffffe
+ description "Meter for controller connection";
+ }
+ enum OFPM_ALL {
+ value -1; //0xffffffff
+ description "Represents all meters for stat requests commands";
+ }
+ }
+ }
+
+ typedef table-config {
+ /* ofp_table_config */
+ type bits {
+ bit OFPTC_DEPRECATED_MASK {
+ /* Deprecated bits */
+ position 3;
+ }
+ }
+ }
+
+ typedef table-features-prop-type {
+ type enumeration {
+ enum OFPTFPT_INSTRUCTIONS {
+ value 0;
+ description "Instructions property.";
+ }
+ enum OFPTFPT_INSTRUCTIONS_MISS {
+ value 1;
+ description "Instructions for table-miss.";
+ }
+ enum OFPTFPT_NEXT_TABLES {
+ value 2;
+ description "Next Table property.";
+ }
+ enum OFPTFPT_NEXT_TABLES_MISS {
+ value 3;
+ description "Next Table for table-miss.";
+ }
+ enum OFPTFPT_WRITE_ACTIONS {
+ value 4;
+ description "Write Actions property.";
+ }
+ enum OFPTFPT_WRITE_ACTIONS_MISS {
+ value 5;
+ description "Write Actions for table-miss.";
+ }
+ enum OFPTFPT_APPLY_ACTIONS {
+ value 6;
+ description "Apply Actions property.";
+ }
+ enum OFPTFPT_APPLY_ACTIONS_MISS {
+ value 7;
+ description "Apply Actions for table-miss.";
+ }
+ enum OFPTFPT_MATCH {
+ value 8;
+ description "Match property.";
+ }
+ enum OFPTFPT_WILDCARDS {
+ value 10;
+ description "Wildcards property.";
+ }
+ enum OFPTFPT_WRITE_SETFIELD {
+ value 12;
+ description "Write Set-Field property.";
+ }
+ enum OFPTFPT_WRITE_SETFIELD_MISS {
+ value 13;
+ description "Write Set-Field for table-miss.";
+ }
+ enum OFPTFPT_APPLY_SETFIELD {
+ value 14;
+ description "Apply Set-Field property.";
+ }
+ enum OFPTFPT_APPLY_SETFIELD_MISS {
+ value 15;
+ description "Apply Set-Field for table-miss.";
+ }
+ enum OFPTFPT_EXPERIMENTER {
+ value 65534;
+ description "Experimenter property.";
+ }
+ enum OFPTFPT_EXPERIMENTER_MISS {
+ value 65535; //0xffff
+ description "Experimenter for table-miss.";
+ }
+ }
+ }
+
+ typedef group-types {
+ /* ofp_group_type */
+ type bits {
+ bit OFPGT_ALL {
+ description "All (multicast/broadcast) group.";
+ position 0;
+ }
+ bit OFPGT_SELECT {
+ description "Select group.";
+ position 1;
+ }
+ bit OFPGT_INDIRECT {
+ description "Indirect group.";
+ position 2;
+ }
+ bit OFPGT_FF {
+ description "Fast failover group.";
+ position 3;
+ }
+ }
+ }
+
+ typedef group-capabilities {
+ /* ofp_group_capabilities */
+ type bits {
+ bit OFPGFC_SELECT_WEIGHT {
+ description "Support weight for select groups";
+ position 0;
+ }
+ bit OFPGFC_SELECT_LIVENESS {
+ description "Support liveness for select groups";
+ position 1;
+ }
+ bit OFPGFC_CHAINING {
+ description "Support chaining group";
+ position 2;
+ }
+ bit OFPGFC_CHAINING_CHECKS {
+ description "Check chaining for loops and delete";
+ position 3;
+ }
+ }
+ }
+
+ typedef ipv6-exthdr-flags {
+ description "Bit definitions for IPv6 Extension Header pseudo-field.";
+ type bits {
+ bit nonext {
+ description "<No next header> encountered.";
+ position 0;
+ }
+ bit esp {
+ description "Encrypted Sec Payload header present.";
+ position 1;
+ }
+ bit auth {
+ description "Authentication header present.";
+ position 2;
+ }
+ bit dest {
+ description "1 or 2 dest headers present.";
+ position 3;
+ }
+ bit frag {
+ description "Fragment header present.";
+ position 4;
+ }
+ bit router {
+ description "Router header present.";
+ position 5;
+ }
+ bit hop {
+ description "Hop-by-hop header present.";
+ position 6;
+ }
+ bit unrep {
+ description "Unexpected repeats encountered.";
+ position 7;
+ }
+ bit unseq {
+ description "Unexpected sequencing encountered.";
+ position 8;
+ }
+ }
+ }
+
+// OPENFLOW v1.0 STRUCTURES
+ // Structures under this line are needed to support OpenFlow version 1.0
+ // wire protocol 0x01;
+
+ typedef error-type-v10 {
+ type enumeration {
+ enum HELLO_FAILED {
+ value 0;
+ description "Hello Protocol failed.";
+ }
+ enum BAD_REQUEST {
+ value 1;
+ description "Request was not understood.";
+ }
+ enum BAD_ACTION {
+ value 2;
+ description "Error in action description.";
+ }
+ enum FLOW_MOD_FAILED {
+ value 3;
+ description "Problem modifying flow entry.";
+ }
+ enum PORT_MOD_FAILED {
+ value 4;
+ description "Port mod request failed.";
+ }
+ enum QUEUE_OP_FAILED {
+ value 5;
+ description "Queue operation failed.";
+ }
+ }
+ }
+
+ typedef hello-failed-code-v10 {
+ type enumeration {
+ enum INCOMPATIBLE {
+ value 0;
+ description "Hello Protocol failed.";
+ }
+ enum EPERM {
+ value 1;
+ description "Request was not understood.";
+ }
+ }
+ }
+
+ typedef bad-request-code-v10 {
+ type enumeration {
+ enum BAD_VERSION {
+ value 0;
+ }
+ enum BAD_TYPE {
+ value 1;
+ }
+ enum BAD_STAT {
+ value 2;
+ }
+ enum BAD_VENDOR {
+ value 3;
+ }
+ enum BAD_SUBTYPE {
+ value 4;
+ }
+ enum EPERM {
+ value 5;
+ }
+ enum BAD_LEN {
+ value 6;
+ }
+ enum BUFFER_EMPTY {
+ value 7;
+ }
+ enum BUFFER_UNKNOWN {
+ value 8;
+ }
+ }
+ }
+
+ typedef bad-action-code-v10 {
+ type enumeration {
+ enum BAD_TYPE {
+ value 0;
+ }
+ enum BAD_LEN {
+ value 1;
+ }
+ enum VENDOR {
+ value 2;
+ }
+ enum BAD_VENDOR_TYPE {
+ value 3;
+ }
+ enum BAD_OUT_PORT {
+ value 4;
+ }
+ enum BAD_ARGUMENT {
+ value 5;
+ }
+ enum EPERM {
+ value 6;
+ }
+ enum TOO_MANY {
+ value 7;
+ }
+ enum BAD_QUEUE {
+ value 8;
+ }
+ }
+ }
+
+ typedef flow-mod-failed-code-v10 {
+ type enumeration {
+ enum ALL_TABLES_FULL {
+ value 0;
+ }
+ enum OVERLAP {
+ value 1;
+ }
+ enum EPERM {
+ value 2;
+ }
+ enum BAD_EMERG_TIMEOUT {
+ value 3;
+ }
+ enum BAD_COMMAND {
+ value 4;
+ }
+ enum UNSUPPORTED {
+ value 5;
+ }
+ }
+ }
+
+ typedef port-mod-failed-code-v10 {
+ type enumeration {
+ enum BAD_PORT {
+ value 0;
+ }
+ enum BAD_HW_ADDR {
+ value 1;
+ }
+ }
+ }
+
+ typedef queue-op-failed-code-v10 {
+ type enumeration {
+ enum BAD_PORT {
+ value 0;
+ }
+ enum BAD_QUEUE {
+ value 1;
+ }
+ enum EPERM {
+ value 2;
+ }
+ }
+ }
+
+ typedef port-number-values-v10 {
+ description "Port numbering. Physical ports are numbered starting from 1.";
+ type enumeration {
+ enum MAX {
+ value 65280; // 0xff00
+ }
+ enum IN_PORT {
+ description "Send the packet out the input port. This
+ virtual port must be explicitly used
+ in order to send back out of the input
+ port.";
+ value 65528; // 0xfff8
+ }
+ enum TABLE {
+ description "Perform actions in flow table.
+ NB: This can only be the destination
+ port for packet-out messages.";
+ value 65529; // 0xfff9
+ }
+ enum NORMAL {
+ description "Process with normal L2/L3 switching.";
+ value 65530; // 0xfffa
+ }
+ enum FLOOD {
+ description "All physical ports except input port and
+ those disabled by STP.";
+ value 65531; // 0xfffb
+ }
+ enum ALL {
+ description "All physical ports except input port.";
+ value 65532; // 0xfffc
+ }
+ enum CONTROLLER {
+ description "Send to controller.";
+ value 65533; // 0xfffd
+ }
+ enum LOCAL {
+ description "Local openflow \"port\".";
+ value 65534; // 0xfffe
+ }
+ enum NONE {
+ description "Not associated with a physical port.";
+ value 65535; // 0xffff
+ }
+ }
+ }
+
+ typedef port-config-v10 {
+ description
+ "Flags to indicate behavior of the physical port. These flags are
+ describe the current configuration and used port_mod message
+ to configure the port's behavior.";
+ type bits {
+ bit port-down {
+ description " Port is administratively down.";
+ position 0;
+ }
+ bit no-stp {
+ description "Disable 802.1D spanning tree on port.";
+ position 1;
+ }
+ bit no-recv {
+ description " Drop all packets received by port.";
+ position 2;
+ }
+ bit no-recv-stp {
+ description " Drop received 802.1D STP packets.";
+ position 3;
+ }
+ bit no-flood {
+ description " Do not include this port when flooding.";
+ position 4;
+ }
+ bit no-fwd {
+ description " Drop packets forwarded to port.";
+ position 5;
+ }
+ bit no-packet-in {
+ description "Do not send packet-in msgs for port.";
+ position 6;
+ }
+ }
+ }
+
+ typedef port-state-v10 {
+ description "Current state of the physical port. These are not configurable from
+ the controller.";
+ type bits {
+ bit link_down {
+ description "No physical link present.";
+ position 0;
+ }
+ bit blocked {
+ description "Port is blocked";
+ position 1;
+ }
+ bit live {
+ description "Live for Fast Failover Group.";
+ position 2;
+ }
+ bit stp_listen {
+ description "Not learning or relaying frames.";
+ }
+ bit stp_learn {
+ description "Learning but not relaying frames.";
+ }
+ bit stp_forward {
+ description "Learning and relaying frames.";
+ }
+ bit stp_block {
+ description "Not part of spanning tree.";
+ }
+ bit stp_mask {
+ description "Bit mask for OFPPS_STP_* values.";
+ }
+ }
+ }
+
+ typedef port-features-v10 {
+ description "Features of ports available in datapath.";
+ reference "ofp_port_features";
+ type bits {
+ bit _10mb-hd {
+ position 0;
+ description "10 Mb half-duplex rate support.";
+ }
+ bit _10mb-fd {
+ position 1;
+ description "10 Mb full-duplex rate support.";
+ }
+ bit _100mb-hd {
+ position 2;
+ description "100 Mb half-duplex rate support.";
+ }
+ bit _100mb-fd {
+ position 3;
+ description "100 Mb full-duplex rate support.";
+ }
+ bit _1gb-hd {
+ position 4;
+ description "1 Gb half-duplex rate support.";
+ }
+ bit _1gb-fd {
+ position 5;
+ description "1 Gb full-duplex rate support.";
+ }
+ bit _10gb-fd {
+ position 6;
+ description "10 Gb full-duplex rate support.";
+ }
+ bit copper {
+ position 7;
+ description "Copper medium.";
+ }
+ bit fiber {
+ position 8;
+ description "Fiber medium.";
+ }
+ bit autoneg {
+ position 9;
+ description "Auto-negotiation.";
+ }
+ bit pause {
+ position 10;
+ description "Pause.";
+ }
+ bit pause-asym {
+ position 11;
+ description "Asymmetric pause.";
+ }
+ }
+ }
+
+ typedef capabilities-v10 {
+ type bits {
+ bit OFPC_FLOW_STATS {
+ position 0;
+ description "Flow statistics.";
+ }
+ bit OFPC_TABLE_STATS {
+ position 1;
+ description "Table statistics.";
+ }
+ bit OFPC_PORT_STATS {
+ position 2;
+ description "Port statistics.";
+ }
+ bit OFPC_STP {
+ position 3;
+ description "802.1d spanning tree.";
+ }
+ bit OFPC_RESERVED {
+ position 4;
+ description "Reserved, must be zero.";
+ }
+ bit OFPC_IP_REASM {
+ position 5;
+ description "Can reassemble IP fragments.";
+ }
+ bit OFPC_QUEUE_STATS {
+ position 6;
+ description "Queue statistics.";
+ }
+ bit OFPC_ARP_MATCH_IP {
+ position 8;
+ description "Match IP addresses in ARP pkts.";
+ }
+ }
+ }
+
+ typedef flow-mod-flags-v10 {
+ /* ofp_flow_mod_flags */
+ type bits {
+ bit OFPFF_SEND_FLOW_REM {
+ position 0;
+ description "Send flow removed message when flow expires or is deleted.";
+ }
+ bit OFPFF_CHECK_OVERLAP {
+ position 1;
+ description "Check for overlapping entries first.";
+ }
+ bit OFPFF_EMERG {
+ position 2;
+ description "Reset flow packet and byte counts.";
+ }
+ }
+ }
+
+ typedef action-type-v10 {
+ /* ofp_action_type */
+ type bits {
+ bit OFPAT_OUTPUT {
+ position 0;
+ description "Output to switch port.";
+ }
+ bit OFPAT_SET_VLAN_VID {
+ position 1;
+ description "Set the 802.1q VLAN id.";
+ }
+ bit OFPAT_SET_VLAN_PCP {
+ position 2;
+ description "Set the 802.1q priority.";
+ }
+ bit OFPAT_STRIP_VLAN {
+ position 3;
+ description "Strip the 802.1q header.";
+ }
+ bit OFPAT_SET_DL_SRC {
+ position 4;
+ description "Ethernet source address.";
+ }
+ bit OFPAT_SET_DL_DST {
+ position 5;
+ description "Ethernet destination address.";
+ }
+ bit OFPAT_SET_NW_SRC {
+ position 6;
+ description "IP source address.";
+ }
+ bit OFPAT_SET_NW_DST {
+ position 7;
+ description "IP destination address.";
+ }
+ bit OFPAT_SET_NW_TOS {
+ position 8;
+ description "IP ToS (DSCP field, 6 bits).";
+ }
+ bit OFPAT_SET_TP_SRC {
+ position 9;
+ description "TCP/UDP source port.";
+ }
+ bit OFPAT_SET_TP_DST {
+ position 10;
+ description "TCP/UDP destination port.";
+ }
+ bit OFPAT_ENQUEUE {
+ position 11;
+ description "Output to queue.";
+ }
+ bit OFPAT_VENDOR {
+ position 12;
+ description "Experimenter in later versions.";
+ }
+ }
+ }
+
+ typedef flow-wildcards-v10 {
+ /* ofp_flow_wildcards */
+ description "Flow wildcards - NW_SRC_MASK & NW_DST_MASK are handled separately";
+ type bits {
+ bit IN_PORT {
+ description "Switch input port.";
+ position 0;
+ }
+ bit DL_VLAN {
+ description "VLAN id.";
+ position 1;
+ }
+ bit DL_SRC {
+ description "Ethernet source address.";
+ position 2;
+ }
+ bit DL_DST {
+ description "Ethernet destination address.";
+ position 3;
+ }
+ bit DL_TYPE {
+ description "Ethernet frame type.";
+ position 4;
+ }
+ bit NW_PROTO {
+ description "IP protocol.";
+ position 5;
+ }
+ bit TP_SRC {
+ description "TCP/UDP source port.";
+ position 6;
+ }
+ bit TP_DST {
+ description "TCP/UDP destination port.";
+ position 7;
+ }
+ bit DL_VLAN_PCP {
+ description "VLAN priority.";
+ position 20;
+ }
+ bit NW_TOS {
+ description "IP ToS (DSCP field, 6 bits).";
+ position 21;
+ }
+ }
+ }
+