+ enum BAD_ADVERTISE {
+ value 3;
+ }
+ enum EPERM {
+ value 4;
+ }
+ }
+ }
+
+ typedef table-mod-failed-code {
+ type enumeration {
+ enum BAD_TABLE {
+ value 0;
+ }
+ enum BAD_CONFIG {
+ value 1;
+ }
+ enum EPERM {
+ value 2;
+ }
+ }
+ }
+
+ typedef queue-op-failed-code {
+ type enumeration {
+ enum BAD_PORT {
+ value 0;
+ }
+ enum BAD_QUEUE {
+ value 1;
+ }
+ enum EPERM {
+ value 2;
+ }
+ }
+ }
+
+ typedef switch-config-failed-code {
+ type enumeration {
+ enum BAD_FLAGS {
+ value 0;
+ }
+ enum BAD_LEN {
+ value 1;
+ }
+ enum EPERM {
+ value 2;
+ }
+ }
+ }
+
+ typedef role-request-failed-code {
+ type enumeration {
+ enum STALE {
+ value 0;
+ }
+ enum UNSUP {
+ value 1;
+ }
+ enum BAD_ROLE {
+ value 2;
+ }
+ }
+ }
+
+ typedef meter-mod-failed-code {
+ type enumeration {
+ enum UNKNOWN {
+ value 0;
+ }
+ enum METER_EXISTS {
+ value 1;
+ }
+ enum INVALID_METER {
+ value 2;
+ }
+ enum UNKNOWN_METER {
+ value 3;
+ }
+ enum BAD_COMMAND {
+ value 4;
+ }
+ enum BAD_FLAGS {
+ value 5;
+ }
+ enum BAD_RATE {
+ value 6;
+ }
+ enum BAD_BURST {
+ value 7;
+ }
+ enum BAD_BAND {
+ value 8;
+ }
+ enum BAD_BAND_VALUE {
+ value 9;
+ }
+ enum OUT_OF_METERS {
+ value 10;
+ }
+ enum OUT_OF_BANDS {
+ value 11;
+ }
+ }
+ }
+
+ typedef table-features-failed-code {
+ type enumeration {
+ enum BAD_TABLE {
+ value 0;
+ }
+ enum BAD_METADATA {
+ value 1;
+ }
+ enum BAD_TYPE {
+ value 2;
+ }
+ enum BAD_LEN {
+ value 3;
+ }
+ enum BAD_ARGUMENT {
+ value 4;
+ }
+ enum EPERM {
+ value 5;
+ }
+ }
+ }
+
+ typedef hello-element-type {
+ type enumeration {
+ enum VERSIONBITMAP {
+ value 1;
+ description "Bitmap of version supported.";
+ }
+ }
+ }
+
+ typedef capabilities {
+ description "Capabilities supported by the datapath.";
+ type bits {
+ bit OFPC_FLOW_STATS {
+ position 0;
+ /* Flow statistics. */
+ }
+ bit OFPC_TABLE_STATS {
+ position 1;
+ /* Table statistics. */
+ }
+ bit OFPC_PORT_STATS {
+ position 2;
+ /* Port statistics. */
+ }
+ bit OFPC_GROUP_STATS {
+ position 3;
+ /* Group statistics. */
+ }
+ bit OFPC_IP_REASM {
+ position 5;
+ /* Can reassemble IP fragments. */
+ }
+ bit OFPC_QUEUE_STATS {
+ position 6;
+ /* Queue statistics. */
+ }
+ bit OFPC_PORT_BLOCKED {
+ position 8;
+ /* Switch will block looping ports. */
+ }
+ }
+ }
+
+ typedef switch-config-flag {
+ description " Handling of IP fragments. ";
+ type enumeration {
+ enum FRAG_NORMAL {
+ value 0;
+ description "No special handling for fragments.";
+ }
+ enum OFPC_FRAG_DROP {
+ value 1;
+ description "Drop fragments.";
+ }
+ enum OFPC_FRAG_REASM {
+ value 2;
+ description "Reassemble (only if OFPC_IP_REASM set).";
+ }
+ enum OFPC_FRAG_MASK {
+ value 3;
+ }
+ }
+ }
+
+ typedef flow-removed-reason {
+ description "Why was this flow removed?";
+ type enumeration {
+ enum OFPRR_IDLE_TIMEOUT {
+ value 0;
+ description "Flow idle time exceeded idle_timeout.";
+ }
+ enum OFPRR_HARD_TIMEOUT {
+ value 1;
+ description "Time exceeded hard_timeout.";
+ }
+ enum OFPRR_DELETE {
+ value 2;
+ description "Evicted by a DELETE flow mod.";
+ }
+ enum OFPRR_GROUP_DELETE {
+ value 3;
+ description "Group was removed.";
+ }
+ }
+ }
+
+ typedef port-reason {
+ description "What changed about the physical port";
+ type enumeration {
+ enum OFPPR_ADD {
+ value 0;
+ description "The port was added.";
+ }
+ enum OFPPR_DELETE {
+ value 1;
+ description "he port was removed.";
+ }
+ enum OFPPR_MODIFY {
+ value 2;
+ description "Some attribute of the port has changed.";
+ }
+ }
+ }
+
+ 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