+ 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;