Add method to register listener for unknown msg
[openflowjava.git] / openflow-protocol-api / src / main / yang / openflow-types.yang
old mode 100644 (file)
new mode 100755 (executable)
index 2c8e8ae..7d11baf
-module openflow-types {
+/*
+ * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+ module openflow-types {
     namespace "urn:opendaylight:openflow:common:types";
     prefix "oft";
 
     revision "2013-07-31" {
     namespace "urn:opendaylight:openflow:common:types";
     prefix "oft";
 
     revision "2013-07-31" {
-        //description "OpenFlow 1.3 - common types model";
+        description "#NOT_PUBLISHED# OpenFlow 1.3 - common types model";
     }
 
     typedef port-number {
     }
 
     typedef port-number {
+        description "Port numbering. Ports are numbered starting from 1 -
+         supports special / reserved values (in OF v1.3)";
         type uint32;
     }
         type uint32;
     }
-    
+
     typedef port-number-values {
     typedef port-number-values {
+        description "Reserved OpenFlow Port (fake output \"ports\") (OF v1.3).";
         type enumeration {
             enum MAX {
         type enumeration {
             enum MAX {
-                value -256; // 0xffffff00 
+                description "Maximum number of physical and logical switch ports.";
+                value -256; // 0xffffff00
             }
             enum IN_PORT {
             }
             enum IN_PORT {
+                description "Send the packet out the input port. This
+                            reserved port must be explicitly used
+                            in order to send back out of the input
+                            port.";
                 value -8; // 0xfffffff8
             }
             enum TABLE {
                 value -8; // 0xfffffff8
             }
             enum TABLE {
-                value -7; // 0xfffffff9 
+                description "Submit the packet to the first flow table
+                            NB: This destination port can only be
+                            used in packet-out messages.";
+                value -7; // 0xfffffff9
             }
             enum NORMAL {
             }
             enum NORMAL {
-                value -6; // 0xfffffffa 
+                description "Process with normal L2/L3 switching.";
+                value -6; // 0xfffffffa
             }
             enum FLOOD {
             }
             enum FLOOD {
-                value -5; // 0xfffffffb 
+                description "All physical ports in VLAN, except input
+                            port and those blocked or link down.";
+                value -5; // 0xfffffffb
             }
             enum ALL {
             }
             enum ALL {
-                value -4; // 0xfffffffc 
+                description "All physical ports except input port.";
+                value -4; // 0xfffffffc
             }
             enum CONTROLLER {
             }
             enum CONTROLLER {
+                description "Send to controller.";
                 value -3; // 0xfffffffd
             }
             enum LOCAL {
                 value -3; // 0xfffffffd
             }
             enum LOCAL {
+                description "Local openflow \"port\".";
                 value -2; // 0xfffffffe
             }
             enum ANY {
                 value -2; // 0xfffffffe
             }
             enum ANY {
+                description "Wildcard port used only for flow mod
+                            (delete) and flow stats requests. Selects
+                            all flows regardless of output port
+                            (including flows with no output port).";
                 value -1; // 0xffffffff
             }
         }
     }
 
     typedef port-features {
                 value -1; // 0xffffffff
             }
         }
     }
 
     typedef port-features {
-        ////description "Features of ports available in datapath.";
-        //reference "ofp_port_features";
+        description "Features of ports available in datapath.";
         type bits {
         type bits {
-            bit 10mb_hd { 
+            bit _10mb_hd {
                 position 0;
                 position 0;
-                //description "10 Mb half-duplex rate support.";
+                description "10 Mb half-duplex rate support.";
             }
             }
-            bit 10mb-fd { 
+            bit _10mb-fd {
                 position 1;
                 position 1;
-                //description "10 Mb full-duplex rate support.";
+                description "10 Mb full-duplex rate support.";
             }
             }
-            bit 100mb-hd { 
+            bit _100mb-hd {
                 position 2;
                 position 2;
-                //description "100 Mb half-duplex rate support.";
+                description "100 Mb half-duplex rate support.";
             }
             }
-            bit 100mb-fd { 
+            bit _100mb-fd {
                 position 3;
                 position 3;
-                //description "100 Mb full-duplex rate support.";
+                description "100 Mb full-duplex rate support.";
             }
             }
-            bit 1gb-hd { 
+            bit _1gb-hd {
                 position 4;
                 position 4;
-                //description "1 Gb half-duplex rate support.";
+                description "1 Gb half-duplex rate support.";
             }
             }
-            bit 1gb-fd { 
+            bit _1gb-fd {
                 position 5;
                 position 5;
-                //description "1 Gb full-duplex rate support.";
+                description "1 Gb full-duplex rate support.";
             }
             }
-            bit 10gb-fd { 
+            bit _10gb-fd {
                 position 6;
                 position 6;
-                //description "10 Gb full-duplex rate support.";
+                description "10 Gb full-duplex rate support.";
             }
             }
-            bit 40gb-fd { 
+            bit _40gb-fd {
                 position 7;
                 position 7;
-                //description "40 Gb full-duplex rate support.";
+                description "40 Gb full-duplex rate support.";
             }
             }
-            bit 100gb-fd { 
+            bit _100gb-fd {
                 position 8;
                 position 8;
-                //description "100 Gb full-duplex rate support.";
+                description "100 Gb full-duplex rate support.";
             }
             }
-            bit 1tb-fd { 
+            bit _1tb-fd {
                 position 9;
                 position 9;
-                //description "1 Tb full-duplex rate support.";
+                description "1 Tb full-duplex rate support.";
             }
             }
-            bit other { 
+            bit other {
                 position 10;
                 position 10;
-                //description "Other rate, not in the list.";
+                description "Other rate, not in the list.";
             }
             }
-            bit copper { 
+            bit copper {
                 position 11;
                 position 11;
-                //description "Copper medium.";
+                description "Copper medium.";
             }
             }
-            bit fiber { 
+            bit fiber {
                 position 12;
                 position 12;
-                //description "Fiber medium.";
+                description "Fiber medium.";
             }
             }
-            bit autoneg { 
+            bit autoneg {
                 position 13;
                 position 13;
-                //description "Auto-negotiation.";
+                description "Auto-negotiation.";
             }
             }
-            bit pause { 
+            bit pause {
                 position 14;
                 position 14;
-                //description "Pause.";
+                description "Pause.";
             }
             }
-            bit pause-asym { 
+            bit pause-asym {
                 position 15;
                 position 15;
-                //description "Asymmetric pause.";
+                description "Asymmetric pause.";
             }
         }
     }
 
     typedef port-config {
             }
         }
     }
 
     typedef port-config {
-        description 
+        description
            "Flags to indicate behavior of the physical port. These flags are
            "Flags to indicate behavior of the physical port. These flags are
-            describe the current configuration and used port_mod message 
+            describe the current configuration and used port_mod message
             to configure the port's behavior.";
         type bits {
             to configure the port's behavior.";
         type bits {
-            bit port-down { 
+            bit port-down {
                 //description " Port is administratively down.";
                 position 0;
             }
                 //description " Port is administratively down.";
                 position 0;
             }
-            bit no-recv { 
+            bit no-recv {
                 //description " Drop all packets received by port.";
                 position 2;
             }
                 //description " Drop all packets received by port.";
                 position 2;
             }
-            bit no-fwd { 
+            bit no-fwd {
                 //description " Drop packets forwarded to port.";
                 position 5;
             }
                 //description " Drop packets forwarded to port.";
                 position 5;
             }
-            bit no-packet-in { 
+            bit no-packet-in {
                 //description "Do not send packet-in msgs for port.";
                 position 6;
             }
                 //description "Do not send packet-in msgs for port.";
                 position 6;
             }
@@ -139,7 +167,7 @@ module openflow-types {
     }
 
     typedef port-state {
     }
 
     typedef port-state {
-        description 
+        description
             "Current state of the physical port. These are not configurable from
             the controller.";
         type bits {
             "Current state of the physical port. These are not configurable from
             the controller.";
         type bits {
@@ -159,28 +187,27 @@ module openflow-types {
     }
 
     identity match-type-base {
     }
 
     identity match-type-base {
-        description 
+        description
            "The match type indicates the match structure (set of fields that compose the
             match) in use. The match type is placed in the type field at the beginning
            "The match type indicates the match structure (set of fields that compose the
             match) in use. The match type is placed in the type field at the beginning
-            of all match structures.Extensions that define match types may be 
+            of all match structures.Extensions that define match types may be
             published on the ONF wiki. Support for extensions is optional.";
     }
 
     identity standard-match-type {
             published on the ONF wiki. Support for extensions is optional.";
     }
 
     identity standard-match-type {
-        deprecated true;
         base oft:match-type-base;
     }
 
         base oft:match-type-base;
     }
 
-    typedef oxm-match-type {
-        type identityref {
-            base oft:match-type-base;
-        }
+    identity instruction-base {
+        description "Base identity for instruction types";
     }
 
     }
 
-    identity instruction {
+    identity action-base {
+        description "Base identity for action types";
     }
 
     }
 
-    identity action {
+    identity experimenter-meter-band-sub-type {
+        description "The base identity for vendor's meter bands.";
     }
 
     typedef metadata {
     }
 
     typedef metadata {
@@ -203,367 +230,373 @@ module openflow-types {
     typedef ether-type {
         type uint16;
     }
     typedef ether-type {
         type uint16;
     }
-
+    typedef experimenter-id {
+        description "This type represents experimenter ID used in experimenter messages.
+                     It also represents vendor ID - as it is the same for OF version 1.3+.
+                     (VENDOR naming convention has been changed in OF v1.3 specification
+                      to EXPERIMENTER)";
+        type uint32;
+    }
     typedef error-type {
         type enumeration {
             enum HELLO_FAILED {
     typedef error-type {
         type enumeration {
             enum HELLO_FAILED {
-                value 0; 
+                value 0;
                 description "Hello Protocol failed.";
             }
             enum BAD_REQUEST {
                 description "Hello Protocol failed.";
             }
             enum BAD_REQUEST {
-                value 1; 
+                value 1;
                 description "Request was not understood.";
             }
             enum BAD_ACTION {
                 description "Request was not understood.";
             }
             enum BAD_ACTION {
-                value 2; 
+                value 2;
                 description "Error in action description.";
             }
             enum BAD_INSTRUCTION {
                 description "Error in action description.";
             }
             enum BAD_INSTRUCTION {
-                value 3; 
+                value 3;
                 description "Error in instruction list.";
             }
             enum BAD_MATCH {
                 description "Error in instruction list.";
             }
             enum BAD_MATCH {
-                value 4; 
+                value 4;
                 description "Error in match.";
             }
             enum FLOW_MOD_FAILED {
                 description "Error in match.";
             }
             enum FLOW_MOD_FAILED {
-                value 5; 
+                value 5;
                 description "Problem modifying flow entry.";
             }
             enum GROUP_MOD_FAILED {
                 description "Problem modifying flow entry.";
             }
             enum GROUP_MOD_FAILED {
-                value 6; 
+                value 6;
                 description "Problem modifying group entry.";
             }
             enum PORT_MOD_FAILED {
                 description "Problem modifying group entry.";
             }
             enum PORT_MOD_FAILED {
-                value 7; 
+                value 7;
                 description "Port mod request failed.";
             }
             enum TABLE_MOD_FAILED {
                 description "Port mod request failed.";
             }
             enum TABLE_MOD_FAILED {
-                value 8; 
+                value 8;
                 description "Table mod request failed.";
             }
             enum QUEUE_OP_FAILED {
                 description "Table mod request failed.";
             }
             enum QUEUE_OP_FAILED {
-                value 9; 
+                value 9;
                 description "Queue operation failed.";
             }
             enum SWITCH_CONFIG_FAILED {
                 description "Queue operation failed.";
             }
             enum SWITCH_CONFIG_FAILED {
-                value 10; 
+                value 10;
                 description "Switch config request failed.";
             }
             enum ROLE_REQUEST_FAILED {
                 description "Switch config request failed.";
             }
             enum ROLE_REQUEST_FAILED {
-                value 11; 
+                value 11;
                 description "Controller Role request failed.";
             }
             enum METER_MOD_FAILED {
                 description "Controller Role request failed.";
             }
             enum METER_MOD_FAILED {
-                value 12; 
+                value 12;
                 description "Error in meter.";
             }
             enum TABLE_FEATURES_FAILED {
                 description "Error in meter.";
             }
             enum TABLE_FEATURES_FAILED {
-                value 13; 
+                value 13;
                 description "Setting table features failed.";
             }
             enum EXPERIMENTER {
                 description "Setting table features failed.";
             }
             enum EXPERIMENTER {
-                value 65535; //0xffff 
+                value 65535; //0xffff
                 description "Experimenter error messages.";
             }
         }
     }
                 description "Experimenter error messages.";
             }
         }
     }
-    
+
     typedef hello-failed-code {
         type enumeration {
             enum INCOMPATIBLE {
     typedef hello-failed-code {
         type enumeration {
             enum INCOMPATIBLE {
-                value 0; 
+                value 0;
                 description "Hello Protocol failed.";
             }
             enum EPERM {
                 description "Hello Protocol failed.";
             }
             enum EPERM {
-                value 1; 
+                value 1;
                 description "Request was not understood.";
             }
         }
     }
                 description "Request was not understood.";
             }
         }
     }
-    
+
     typedef bad-request-code {
         type enumeration {
             enum BAD_VERSION {
     typedef bad-request-code {
         type enumeration {
             enum BAD_VERSION {
-                value 0; 
+                value 0;
             }
             enum BAD_TYPE {
             }
             enum BAD_TYPE {
-                value 1; 
+                value 1;
             }
             enum BAD_MULTIPART {
             }
             enum BAD_MULTIPART {
-                value 2; 
+                value 2;
             }
             enum BAD_EXPERIMENTER {
             }
             enum BAD_EXPERIMENTER {
-                value 3; 
+                value 3;
             }
             enum BAD_EXP_TYPE {
             }
             enum BAD_EXP_TYPE {
-                value 4; 
+                value 4;
             }
             enum EPERM {
             }
             enum EPERM {
-                value 5; 
+                value 5;
             }
             enum BAD_LEN {
             }
             enum BAD_LEN {
-                value 6; 
+                value 6;
             }
             enum BUFFER_EMPTY {
             }
             enum BUFFER_EMPTY {
-                value 7; 
+                value 7;
             }
             enum BUFFER_UNKNOWN {
             }
             enum BUFFER_UNKNOWN {
-                value 8; 
+                value 8;
             }
             enum BAD_TABLE_ID {
             }
             enum BAD_TABLE_ID {
-                value 9; 
+                value 9;
             }
             enum IS_SLAVE {
             }
             enum IS_SLAVE {
-                value 10; 
+                value 10;
             }
             enum BAD_PORT {
             }
             enum BAD_PORT {
-                value 11; 
+                value 11;
             }
             enum BAD_PACKET {
             }
             enum BAD_PACKET {
-                value 12; 
+                value 12;
             }
             enum MULTIPART_BUFFER_OVERFLOW {
             }
             enum MULTIPART_BUFFER_OVERFLOW {
-                value 13; 
+                value 13;
             }
         }
     }
             }
         }
     }
-    
+
     typedef bad-action-code {
         type enumeration {
             enum BAD_TYPE {
     typedef bad-action-code {
         type enumeration {
             enum BAD_TYPE {
-                value 0; 
+                value 0;
             }
             enum BAD_LEN {
             }
             enum BAD_LEN {
-                value 1; 
+                value 1;
             }
             enum BAD_EXPERIMENTER {
             }
             enum BAD_EXPERIMENTER {
-                value 2; 
+                value 2;
             }
             enum BAD_EXP_TYPE {
             }
             enum BAD_EXP_TYPE {
-                value 3; 
+                value 3;
             }
             enum BAD_OUT_PORT {
             }
             enum BAD_OUT_PORT {
-                value 4; 
+                value 4;
             }
             enum BAD_ARGUMENT {
             }
             enum BAD_ARGUMENT {
-                value 5; 
+                value 5;
             }
             enum EPERM {
             }
             enum EPERM {
-                value 6; 
+                value 6;
             }
             enum TOO_MANY {
             }
             enum TOO_MANY {
-                value 7; 
+                value 7;
             }
             enum BAD_QUEUE {
             }
             enum BAD_QUEUE {
-                value 8; 
+                value 8;
             }
             enum BAD_OUT_GROUP {
             }
             enum BAD_OUT_GROUP {
-                value 9; 
+                value 9;
             }
             enum MATCH_INCONSISTENT {
             }
             enum MATCH_INCONSISTENT {
-                value 10; 
+                value 10;
             }
             enum UNSUPPORTED_ORDER {
             }
             enum UNSUPPORTED_ORDER {
-                value 11; 
+                value 11;
             }
             enum BAD_TAG {
             }
             enum BAD_TAG {
-                value 12; 
+                value 12;
             }
             enum BAD_SET_TYPE {
             }
             enum BAD_SET_TYPE {
-                value 13; 
+                value 13;
             }
             enum BAD_SET_LEN {
             }
             enum BAD_SET_LEN {
-                value 14; 
+                value 14;
             }
             enum BAD_SET_ARGUMENT {
             }
             enum BAD_SET_ARGUMENT {
-                value 15; 
+                value 15;
             }
         }
     }
             }
         }
     }
-    
+
     typedef bad-instruction-code {
         type enumeration {
             enum UNKNOWN_INST {
     typedef bad-instruction-code {
         type enumeration {
             enum UNKNOWN_INST {
-                value 0; 
+                value 0;
             }
             enum UNSUP_INST {
             }
             enum UNSUP_INST {
-                value 1; 
+                value 1;
             }
             enum BAD_TABLE_ID {
             }
             enum BAD_TABLE_ID {
-                value 2; 
+                value 2;
             }
             enum UNSUP_METADATA {
             }
             enum UNSUP_METADATA {
-                value 3; 
+                value 3;
             }
             enum UNSUP_METADATA_MASK {
             }
             enum UNSUP_METADATA_MASK {
-                value 4; 
+                value 4;
             }
             enum BAD_EXPERIMENTER {
             }
             enum BAD_EXPERIMENTER {
-                value 5; 
+                value 5;
             }
             enum BAD_EXP_TYPE {
             }
             enum BAD_EXP_TYPE {
-                value 6; 
+                value 6;
             }
             enum BAD_LEN {
             }
             enum BAD_LEN {
-                value 7; 
+                value 7;
             }
             enum EPERM {
             }
             enum EPERM {
-                value 8; 
+                value 8;
             }
         }
     }
             }
         }
     }
-    
+
     typedef bad-match-code {
         type enumeration {
             enum BAD_TYPE {
     typedef bad-match-code {
         type enumeration {
             enum BAD_TYPE {
-                value 0; 
+                value 0;
             }
             enum BAD_LEN {
             }
             enum BAD_LEN {
-                value 1; 
+                value 1;
             }
             enum BAD_TAG {
             }
             enum BAD_TAG {
-                value 2; 
+                value 2;
             }
             enum BAD_DL_ADDR_MASK {
             }
             enum BAD_DL_ADDR_MASK {
-                value 3; 
+                value 3;
             }
             enum BAD_NW_ADDR_MASK {
             }
             enum BAD_NW_ADDR_MASK {
-                value 4; 
+                value 4;
             }
             enum BAD_WILDCARDS {
             }
             enum BAD_WILDCARDS {
-                value 5; 
+                value 5;
             }
             enum BAD_FIELD {
             }
             enum BAD_FIELD {
-                value 6; 
+                value 6;
             }
             enum BAD_VALUE {
             }
             enum BAD_VALUE {
-                value 7; 
+                value 7;
             }
             enum BAD_MASK {
             }
             enum BAD_MASK {
-                value 8; 
+                value 8;
             }
             enum BAD_PREREQ {
             }
             enum BAD_PREREQ {
-                value 9; 
+                value 9;
             }
             enum DUP_FIELD {
             }
             enum DUP_FIELD {
-                value 10; 
+                value 10;
             }
             enum EPERM {
             }
             enum EPERM {
-                value 11; 
+                value 11;
             }
         }
     }
             }
         }
     }
-    
+
     typedef flow-mod-failed-code {
         type enumeration {
             enum UNKNOWN {
     typedef flow-mod-failed-code {
         type enumeration {
             enum UNKNOWN {
-                value 0; 
+                value 0;
             }
             enum TABLE_FULL {
             }
             enum TABLE_FULL {
-                value 1; 
+                value 1;
             }
             enum BAD_TABLE_ID {
             }
             enum BAD_TABLE_ID {
-                value 2; 
+                value 2;
             }
             enum OVERLAP {
             }
             enum OVERLAP {
-                value 3; 
+                value 3;
             }
             enum EPERM {
             }
             enum EPERM {
-                value 4; 
+                value 4;
             }
             enum BAD_TIMEOUT {
             }
             enum BAD_TIMEOUT {
-                value 5; 
+                value 5;
             }
             enum BAD_COMMAND {
             }
             enum BAD_COMMAND {
-                value 6; 
+                value 6;
             }
             enum BAD_FLAGS {
             }
             enum BAD_FLAGS {
-                value 7; 
+                value 7;
             }
         }
     }
             }
         }
     }
-    
+
     typedef group-mod-failed-code {
         type enumeration {
             enum GROUP_EXISTS {
     typedef group-mod-failed-code {
         type enumeration {
             enum GROUP_EXISTS {
-                value 0; 
+                value 0;
             }
             enum INVALID_GROUP {
             }
             enum INVALID_GROUP {
-                value 1; 
+                value 1;
             }
             enum WEIGHT_UNSUPPORTED {
             }
             enum WEIGHT_UNSUPPORTED {
-                value 2; 
+                value 2;
             }
             enum OUT_OF_GROUPS {
             }
             enum OUT_OF_GROUPS {
-                value 3; 
+                value 3;
             }
             enum OUT_OF_BUCKETS {
             }
             enum OUT_OF_BUCKETS {
-                value 4; 
+                value 4;
             }
             enum CHAINING_UNSUPPORTED {
             }
             enum CHAINING_UNSUPPORTED {
-                value 5; 
+                value 5;
             }
             enum WATCH_UNSUPPORTED {
             }
             enum WATCH_UNSUPPORTED {
-                value 6; 
+                value 6;
             }
             enum LOOP {
             }
             enum LOOP {
-                value 7; 
+                value 7;
             }
             enum UNKNOWN_GROUP {
             }
             enum UNKNOWN_GROUP {
-                value 8; 
+                value 8;
             }
             enum CHAINED_GROUP {
             }
             enum CHAINED_GROUP {
-                value 9; 
+                value 9;
             }
             enum BAD_TYPE {
             }
             enum BAD_TYPE {
-                value 10; 
+                value 10;
             }
             enum BAD_COMMAND {
             }
             enum BAD_COMMAND {
-                value 11; 
+                value 11;
             }
             enum BAD_BUCKET {
             }
             enum BAD_BUCKET {
-                value 12; 
+                value 12;
             }
             enum BAD_WATCH {
             }
             enum BAD_WATCH {
-                value 13; 
+                value 13;
             }
             enum EPERM {
             }
             enum EPERM {
-                value 14; 
+                value 14;
             }
         }
     }
             }
         }
     }
-    
+
     typedef port-mod-failed-code {
         type enumeration {
             enum BAD_PORT {
     typedef port-mod-failed-code {
         type enumeration {
             enum BAD_PORT {
-                value 0; 
+                value 0;
             }
             enum BAD_HW_ADDR {
             }
             enum BAD_HW_ADDR {
-                value 1; 
+                value 1;
             }
             enum BAD_CONFIG {
             }
             enum BAD_CONFIG {
-                value 2; 
+                value 2;
             }
             enum BAD_ADVERTISE {
             }
             enum BAD_ADVERTISE {
-                value 3; 
+                value 3;
             }
             enum EPERM {
             }
             enum EPERM {
-                value 4; 
+                value 4;
             }
         }
     }
             }
         }
     }
-    
+
     typedef table-mod-failed-code {
         type enumeration {
             enum BAD_TABLE {
     typedef table-mod-failed-code {
         type enumeration {
             enum BAD_TABLE {
-                value 0; 
+                value 0;
             }
             enum BAD_CONFIG {
             }
             enum BAD_CONFIG {
-                value 1; 
+                value 1;
             }
             enum EPERM {
             }
             enum EPERM {
-                value 2; 
+                value 2;
             }
         }
     }
             }
         }
     }
@@ -571,124 +604,125 @@ module openflow-types {
     typedef queue-op-failed-code {
         type enumeration {
             enum BAD_PORT {
     typedef queue-op-failed-code {
         type enumeration {
             enum BAD_PORT {
-                value 0; 
+                value 0;
             }
             enum BAD_QUEUE {
             }
             enum BAD_QUEUE {
-                value 1; 
+                value 1;
             }
             enum EPERM {
             }
             enum EPERM {
-                value 2; 
+                value 2;
             }
         }
     }
             }
         }
     }
-    
+
     typedef switch-config-failed-code {
         type enumeration {
             enum BAD_FLAGS {
     typedef switch-config-failed-code {
         type enumeration {
             enum BAD_FLAGS {
-                value 0; 
+                value 0;
             }
             enum BAD_LEN {
             }
             enum BAD_LEN {
-                value 1; 
+                value 1;
             }
             enum EPERM {
             }
             enum EPERM {
-                value 2; 
+                value 2;
             }
         }
     }
             }
         }
     }
-    
+
     typedef role-request-failed-code {
         type enumeration {
             enum STALE {
     typedef role-request-failed-code {
         type enumeration {
             enum STALE {
-                value 0; 
+                value 0;
             }
             enum UNSUP {
             }
             enum UNSUP {
-                value 1; 
+                value 1;
             }
             enum BAD_ROLE {
             }
             enum BAD_ROLE {
-                value 2; 
+                value 2;
             }
         }
     }
             }
         }
     }
-    
+
     typedef meter-mod-failed-code {
         type enumeration {
             enum UNKNOWN {
     typedef meter-mod-failed-code {
         type enumeration {
             enum UNKNOWN {
-                value 0; 
+                value 0;
             }
             enum METER_EXISTS {
             }
             enum METER_EXISTS {
-                value 1; 
+                value 1;
             }
             enum INVALID_METER {
             }
             enum INVALID_METER {
-                value 2; 
+                value 2;
             }
             enum UNKNOWN_METER {
             }
             enum UNKNOWN_METER {
-                value 3; 
+                value 3;
             }
             enum BAD_COMMAND {
             }
             enum BAD_COMMAND {
-                value 4; 
+                value 4;
             }
             enum BAD_FLAGS {
             }
             enum BAD_FLAGS {
-                value 5; 
+                value 5;
             }
             enum BAD_RATE {
             }
             enum BAD_RATE {
-                value 6; 
+                value 6;
             }
             enum BAD_BURST {
             }
             enum BAD_BURST {
-                value 7; 
+                value 7;
             }
             enum BAD_BAND {
             }
             enum BAD_BAND {
-                value 8; 
+                value 8;
             }
             enum BAD_BAND_VALUE {
             }
             enum BAD_BAND_VALUE {
-                value 9; 
+                value 9;
             }
             enum OUT_OF_METERS {
             }
             enum OUT_OF_METERS {
-                value 10; 
+                value 10;
             }
             enum OUT_OF_BANDS {
             }
             enum OUT_OF_BANDS {
-                value 11; 
+                value 11;
             }
         }
     }
             }
         }
     }
-    
+
     typedef table-features-failed-code {
         type enumeration {
             enum BAD_TABLE {
     typedef table-features-failed-code {
         type enumeration {
             enum BAD_TABLE {
-                value 0; 
+                value 0;
             }
             enum BAD_METADATA {
             }
             enum BAD_METADATA {
-                value 1; 
+                value 1;
             }
             enum BAD_TYPE {
             }
             enum BAD_TYPE {
-                value 2; 
+                value 2;
             }
             enum BAD_LEN {
             }
             enum BAD_LEN {
-                value 3; 
+                value 3;
             }
             enum BAD_ARGUMENT {
             }
             enum BAD_ARGUMENT {
-                value 4; 
+                value 4;
             }
             enum EPERM {
             }
             enum EPERM {
-                value 5; 
+                value 5;
             }
         }
     }
             }
         }
     }
-    
+
     typedef hello-element-type {
         type enumeration {
             enum VERSIONBITMAP {
     typedef hello-element-type {
         type enumeration {
             enum VERSIONBITMAP {
-                value 1; 
+                value 1;
                 description "Bitmap of version supported.";
             }
         }
     }
                 description "Bitmap of version supported.";
             }
         }
     }
-    
+
     typedef capabilities {
     typedef capabilities {
+        description "Capabilities supported by the datapath.";
         type bits {
             bit OFPC_FLOW_STATS {
                 position 0;
                 /* Flow statistics. */
         type bits {
             bit OFPC_FLOW_STATS {
                 position 0;
                 /* Flow statistics. */
-            } 
+            }
             bit OFPC_TABLE_STATS {
                 position 1;
                 /* Table statistics. */
             bit OFPC_TABLE_STATS {
                 position 1;
                 /* Table statistics. */
@@ -717,28 +751,28 @@ module openflow-types {
     }
 
     typedef switch-config-flag {
     }
 
     typedef switch-config-flag {
-        /* Handling of IP fragments. */
+        description " Handling of IP fragments. ";
         type enumeration {
             enum FRAG_NORMAL {
         type enumeration {
             enum FRAG_NORMAL {
-                value 0; 
+                value 0;
                 description "No special handling for fragments.";
             }
             enum OFPC_FRAG_DROP {
                 description "No special handling for fragments.";
             }
             enum OFPC_FRAG_DROP {
-                value 1; 
+                value 1;
                 description "Drop fragments.";
             }
             enum OFPC_FRAG_REASM {
                 description "Drop fragments.";
             }
             enum OFPC_FRAG_REASM {
-                value 2; 
+                value 2;
                 description "Reassemble (only if OFPC_IP_REASM set).";
             }
             enum OFPC_FRAG_MASK {
                 description "Reassemble (only if OFPC_IP_REASM set).";
             }
             enum OFPC_FRAG_MASK {
-                value 3; 
+                value 3;
             }
         }
     }
 
     typedef flow-removed-reason {
             }
         }
     }
 
     typedef flow-removed-reason {
-        /* flow removed */
+        description "Why was this flow removed?";
         type enumeration {
             enum OFPRR_IDLE_TIMEOUT {
                 value 0;
         type enumeration {
             enum OFPRR_IDLE_TIMEOUT {
                 value 0;
@@ -760,7 +794,7 @@ module openflow-types {
     }
 
     typedef port-reason {
     }
 
     typedef port-reason {
-        /* port status */
+        description "What changed about the physical port";
         type enumeration {
             enum OFPPR_ADD {
                 value 0;
         type enumeration {
             enum OFPPR_ADD {
                 value 0;
@@ -780,9 +814,9 @@ module openflow-types {
     typedef flow-mod-command {
         /* ofp_flow_mod_command */
         type enumeration {
     typedef flow-mod-command {
         /* ofp_flow_mod_command */
         type enumeration {
-            enum OFPFC_ADD {      
-                value 0;      
-                description "New flow.";    
+            enum OFPFC_ADD {
+                value 0;
+                description "New flow.";
             }
             enum OFPFC_MODIFY {
                 value 1;
             }
             enum OFPFC_MODIFY {
                 value 1;
@@ -808,23 +842,23 @@ module openflow-types {
         type bits {
             bit OFPFF_SEND_FLOW_REM {
                 position 0;
         type bits {
             bit OFPFF_SEND_FLOW_REM {
                 position 0;
-                /* Send flow removed message when flow expires or is deleted. */
+                description "Send flow removed message when flow expires or is deleted.";
             }
             bit OFPFF_CHECK_OVERLAP {
                 position 1;
             }
             bit OFPFF_CHECK_OVERLAP {
                 position 1;
-                /* Check for overlapping entries first. */
+                description "Check for overlapping entries first.";
             }
             bit OFPFF_RESET_COUNTS {
                 position 2;
             }
             bit OFPFF_RESET_COUNTS {
                 position 2;
-                /* Reset flow packet and byte counts. */
+                description "Reset flow packet and byte counts.";
             }
             bit OFPFF_NO_PKT_COUNTS {
                 position 3;
             }
             bit OFPFF_NO_PKT_COUNTS {
                 position 3;
-                /* Don't keep track of packet count. */
+                description "Don't keep track of packet count.";
             }
             bit OFPFF_NO_BYT_COUNTS {
                 position 4;
             }
             bit OFPFF_NO_BYT_COUNTS {
                 position 4;
-                /* Don't keep track of byte count. */
+                description "Don't keep track of byte count.";
             }
         }
     }
             }
         }
     }
@@ -832,9 +866,9 @@ module openflow-types {
     typedef group-mod-command {
         /* ofp_group_mod_command */
         type enumeration {
     typedef group-mod-command {
         /* ofp_group_mod_command */
         type enumeration {
-            enum OFPGC_ADD {            
-              value 0;            
-              description "New group.";            
+            enum OFPGC_ADD {
+              value 0;
+              description "New group.";
             }
             enum OFPGC_MODIFY {
               value 1;
             }
             enum OFPGC_MODIFY {
               value 1;
@@ -844,16 +878,15 @@ module openflow-types {
               value 2;
               description "Delete all matching groups.";
             }
               value 2;
               description "Delete all matching groups.";
             }
-            
         }
     }
 
     typedef group-type {
         /* ofp_group_type */
         type enumeration {
         }
     }
 
     typedef group-type {
         /* ofp_group_type */
         type enumeration {
-            enum OFPGT_ALL {            
-              value 0;            
-              description "All (multicast/broadcast) group.";            
+            enum OFPGT_ALL {
+              value 0;
+              description "All (multicast/broadcast) group.";
             }
             enum OFPGT_SELECT {
               value 1;
             }
             enum OFPGT_SELECT {
               value 1;
@@ -870,42 +903,52 @@ module openflow-types {
         }
     }
 
         }
     }
 
-       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 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 {
     typedef multipart-request-flags {
-        description
-            "enum ofp_multipart_request_flags ";
+        description "enum ofp_multipart_request_flags ";
         type bits {
             bit OFPMPF_REQ_MORE {
         type bits {
             bit OFPMPF_REQ_MORE {
-                //description "More requests to follow.";
+                description "More requests to follow.";
                 position 0;
             }
         }
     }
 
     typedef multipart-type {
                 position 0;
             }
         }
     }
 
     typedef multipart-type {
-        /* ofp_multipart_type */
         type enumeration {
             enum OFPMP_DESC {
               value 0;
         type enumeration {
             enum OFPMP_DESC {
               value 0;
@@ -1020,7 +1063,7 @@ module openflow-types {
                 description "Maximum datarate.";
             }
             enum OFPQT_EXPERIMENTER {
                 description "Maximum datarate.";
             }
             enum OFPQT_EXPERIMENTER {
-                value 65535; // 0xffff 
+                value 65535; // 0xffff
                 description "Experimenter defined property.";
             }
         }
                 description "Experimenter defined property.";
             }
         }
@@ -1065,7 +1108,7 @@ module openflow-types {
             }
         }
     }
             }
         }
     }
-    
+
     typedef action-type {
         /* ofp_action_type */
         type bits {
     typedef action-type {
         /* ofp_action_type */
         type bits {
@@ -1193,7 +1236,7 @@ module openflow-types {
             }
         }
     }
             }
         }
     }
-    
+
     typedef meter-band-type-bitmap {
         /* ofp_meter_band_type */
         type bits {
     typedef meter-band-type-bitmap {
         /* ofp_meter_band_type */
         type bits {
@@ -1208,30 +1251,28 @@ module openflow-types {
         }
     }
 
         }
     }
 
-       typedef meter {
-               /* ofp_meter - 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 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 */
 
     typedef table-config {
         /* ofp_table_config */
@@ -1246,67 +1287,67 @@ module openflow-types {
     typedef table-features-prop-type {
         type enumeration {
             enum OFPTFPT_INSTRUCTIONS {
     typedef table-features-prop-type {
         type enumeration {
             enum OFPTFPT_INSTRUCTIONS {
-                value 0; 
+                value 0;
                 description "Instructions property.";
             }
             enum OFPTFPT_INSTRUCTIONS_MISS {
                 description "Instructions property.";
             }
             enum OFPTFPT_INSTRUCTIONS_MISS {
-                value 1; 
+                value 1;
                 description "Instructions for table-miss.";
             }
             enum OFPTFPT_NEXT_TABLES {
                 description "Instructions for table-miss.";
             }
             enum OFPTFPT_NEXT_TABLES {
-                value 2; 
+                value 2;
                 description "Next Table property.";
             }
             enum OFPTFPT_NEXT_TABLES_MISS {
                 description "Next Table property.";
             }
             enum OFPTFPT_NEXT_TABLES_MISS {
-                value 3; 
+                value 3;
                 description "Next Table for table-miss.";
             }
             enum OFPTFPT_WRITE_ACTIONS {
                 description "Next Table for table-miss.";
             }
             enum OFPTFPT_WRITE_ACTIONS {
-                value 4; 
+                value 4;
                 description "Write Actions property.";
             }
             enum OFPTFPT_WRITE_ACTIONS_MISS {
                 description "Write Actions property.";
             }
             enum OFPTFPT_WRITE_ACTIONS_MISS {
-                value 5; 
+                value 5;
                 description "Write Actions for table-miss.";
             }
             enum OFPTFPT_APPLY_ACTIONS {
                 description "Write Actions for table-miss.";
             }
             enum OFPTFPT_APPLY_ACTIONS {
-                value 6; 
+                value 6;
                 description "Apply Actions property.";
             }
             enum OFPTFPT_APPLY_ACTIONS_MISS {
                 description "Apply Actions property.";
             }
             enum OFPTFPT_APPLY_ACTIONS_MISS {
-                value 7; 
+                value 7;
                 description "Apply Actions for table-miss.";
             }
             enum OFPTFPT_MATCH {
                 description "Apply Actions for table-miss.";
             }
             enum OFPTFPT_MATCH {
-                value 8; 
+                value 8;
                 description "Match property.";
             }
             enum OFPTFPT_WILDCARDS {
                 description "Match property.";
             }
             enum OFPTFPT_WILDCARDS {
-                value 10; 
+                value 10;
                 description "Wildcards property.";
             }
             enum OFPTFPT_WRITE_SETFIELD {
                 description "Wildcards property.";
             }
             enum OFPTFPT_WRITE_SETFIELD {
-                value 12; 
+                value 12;
                 description "Write Set-Field property.";
             }
             enum OFPTFPT_WRITE_SETFIELD_MISS {
                 description "Write Set-Field property.";
             }
             enum OFPTFPT_WRITE_SETFIELD_MISS {
-                value 13; 
+                value 13;
                 description "Write Set-Field for table-miss.";
             }
             enum OFPTFPT_APPLY_SETFIELD {
                 description "Write Set-Field for table-miss.";
             }
             enum OFPTFPT_APPLY_SETFIELD {
-                value 14; 
+                value 14;
                 description "Apply Set-Field property.";
             }
             enum OFPTFPT_APPLY_SETFIELD_MISS {
                 description "Apply Set-Field property.";
             }
             enum OFPTFPT_APPLY_SETFIELD_MISS {
-                value 15; 
+                value 15;
                 description "Apply Set-Field for table-miss.";
             }
             enum OFPTFPT_EXPERIMENTER {
                 description "Apply Set-Field for table-miss.";
             }
             enum OFPTFPT_EXPERIMENTER {
-                value 65534; 
+                value 65534;
                 description "Experimenter property.";
             }
             enum OFPTFPT_EXPERIMENTER_MISS {
                 description "Experimenter property.";
             }
             enum OFPTFPT_EXPERIMENTER_MISS {
-                value 65535; //0xffff 
+                value 65535; //0xffff
                 description "Experimenter for table-miss.";
             }
         }
                 description "Experimenter for table-miss.";
             }
         }
@@ -1316,19 +1357,19 @@ module openflow-types {
         /* ofp_group_type */
         type bits {
             bit OFPGT_ALL {
         /* ofp_group_type */
         type bits {
             bit OFPGT_ALL {
-                /* All (multicast/broadcast) group. */
+                description "All (multicast/broadcast) group.";
                 position 0;
             }
             bit OFPGT_SELECT {
                 position 0;
             }
             bit OFPGT_SELECT {
-                /* Select group. */
+                description "Select group.";
                 position 1;
             }
             bit OFPGT_INDIRECT {
                 position 1;
             }
             bit OFPGT_INDIRECT {
-                /* Indirect group. */
+                description "Indirect group.";
                 position 2;
             }
             bit OFPGT_FF {
                 position 2;
             }
             bit OFPGT_FF {
-                /* Fast failover group. */
+                description "Fast failover group.";
                 position 3;
             }
         }
                 position 3;
             }
         }
@@ -1338,507 +1379,555 @@ module openflow-types {
         /* ofp_group_capabilities */
         type bits {
             bit OFPGFC_SELECT_WEIGHT {
         /* ofp_group_capabilities */
         type bits {
             bit OFPGFC_SELECT_WEIGHT {
-                /* Support weight for select groups */
+                description "Support weight for select groups";
                 position 0;
             }
             bit OFPGFC_SELECT_LIVENESS {
                 position 0;
             }
             bit OFPGFC_SELECT_LIVENESS {
-                /* Support liveness for select groups */
+                description "Support liveness for select groups";
                 position 1;
             }
             bit OFPGFC_CHAINING {
                 position 1;
             }
             bit OFPGFC_CHAINING {
-                /* Support chaining groups */
+                description "Support chaining group";
                 position 2;
             }
             bit OFPGFC_CHAINING_CHECKS {
                 position 2;
             }
             bit OFPGFC_CHAINING_CHECKS {
-                /* Check chaining for loops and delete */
+                description "Check chaining for loops and delete";
                 position 3;
             }
         }
     }
                 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
 // OPENFLOW v1.0 STRUCTURES
-    // Structures under this line are needed to support OpenFlow version 1.0 
+    // Structures under this line are needed to support OpenFlow version 1.0
     // wire protocol 0x01;
     // wire protocol 0x01;
-    
+
     typedef error-type-v10 {
         type enumeration {
             enum HELLO_FAILED {
     typedef error-type-v10 {
         type enumeration {
             enum HELLO_FAILED {
-                value 0; 
+                value 0;
                 description "Hello Protocol failed.";
             }
             enum BAD_REQUEST {
                 description "Hello Protocol failed.";
             }
             enum BAD_REQUEST {
-                value 1; 
+                value 1;
                 description "Request was not understood.";
             }
             enum BAD_ACTION {
                 description "Request was not understood.";
             }
             enum BAD_ACTION {
-                value 2; 
+                value 2;
                 description "Error in action description.";
             }
             enum FLOW_MOD_FAILED {
                 description "Error in action description.";
             }
             enum FLOW_MOD_FAILED {
-                value 3; 
+                value 3;
                 description "Problem modifying flow entry.";
             }
             enum PORT_MOD_FAILED {
                 description "Problem modifying flow entry.";
             }
             enum PORT_MOD_FAILED {
-                value 4; 
+                value 4;
                 description "Port mod request failed.";
             }
             enum QUEUE_OP_FAILED {
                 description "Port mod request failed.";
             }
             enum QUEUE_OP_FAILED {
-                value 5; 
+                value 5;
                 description "Queue operation failed.";
             }
         }
     }
                 description "Queue operation failed.";
             }
         }
     }
-    
+
     typedef hello-failed-code-v10 {
         type enumeration {
             enum INCOMPATIBLE {
     typedef hello-failed-code-v10 {
         type enumeration {
             enum INCOMPATIBLE {
-                value 0; 
+                value 0;
                 description "Hello Protocol failed.";
             }
             enum EPERM {
                 description "Hello Protocol failed.";
             }
             enum EPERM {
-                value 1; 
+                value 1;
                 description "Request was not understood.";
             }
         }
     }
                 description "Request was not understood.";
             }
         }
     }
-    
+
     typedef bad-request-code-v10 {
         type enumeration {
             enum BAD_VERSION {
     typedef bad-request-code-v10 {
         type enumeration {
             enum BAD_VERSION {
-                value 0; 
+                value 0;
             }
             enum BAD_TYPE {
             }
             enum BAD_TYPE {
-                value 1; 
+                value 1;
             }
             enum BAD_STAT {
             }
             enum BAD_STAT {
-                value 2; 
+                value 2;
             }
             enum BAD_VENDOR {
             }
             enum BAD_VENDOR {
-                value 3; 
+                value 3;
             }
             enum BAD_SUBTYPE {
             }
             enum BAD_SUBTYPE {
-                value 4; 
+                value 4;
             }
             enum EPERM {
             }
             enum EPERM {
-                value 5; 
+                value 5;
             }
             enum BAD_LEN {
             }
             enum BAD_LEN {
-                value 6; 
+                value 6;
             }
             enum BUFFER_EMPTY {
             }
             enum BUFFER_EMPTY {
-                value 7; 
+                value 7;
             }
             enum BUFFER_UNKNOWN {
             }
             enum BUFFER_UNKNOWN {
-                value 8; 
+                value 8;
             }
         }
     }
             }
         }
     }
-    
+
     typedef bad-action-code-v10 {
         type enumeration {
             enum BAD_TYPE {
     typedef bad-action-code-v10 {
         type enumeration {
             enum BAD_TYPE {
-                value 0; 
+                value 0;
             }
             enum BAD_LEN {
             }
             enum BAD_LEN {
-                value 1; 
+                value 1;
             }
             enum VENDOR {
             }
             enum VENDOR {
-                value 2; 
+                value 2;
             }
             enum BAD_VENDOR_TYPE {
             }
             enum BAD_VENDOR_TYPE {
-                value 3; 
+                value 3;
             }
             enum BAD_OUT_PORT {
             }
             enum BAD_OUT_PORT {
-                value 4; 
+                value 4;
             }
             enum BAD_ARGUMENT {
             }
             enum BAD_ARGUMENT {
-                value 5; 
+                value 5;
             }
             enum EPERM {
             }
             enum EPERM {
-                value 6; 
+                value 6;
             }
             enum TOO_MANY {
             }
             enum TOO_MANY {
-                value 7; 
+                value 7;
             }
             enum BAD_QUEUE {
             }
             enum BAD_QUEUE {
-                value 8; 
+                value 8;
             }
         }
     }
             }
         }
     }
-    
+
     typedef flow-mod-failed-code-v10 {
         type enumeration {
             enum ALL_TABLES_FULL {
     typedef flow-mod-failed-code-v10 {
         type enumeration {
             enum ALL_TABLES_FULL {
-                value 0; 
+                value 0;
             }
             enum OVERLAP {
             }
             enum OVERLAP {
-                value 1; 
+                value 1;
             }
             enum EPERM {
             }
             enum EPERM {
-                value 2; 
+                value 2;
             }
             enum BAD_EMERG_TIMEOUT {
             }
             enum BAD_EMERG_TIMEOUT {
-                value 3; 
+                value 3;
             }
             enum BAD_COMMAND {
             }
             enum BAD_COMMAND {
-                value 4; 
+                value 4;
             }
             enum UNSUPPORTED {
             }
             enum UNSUPPORTED {
-                value 5; 
+                value 5;
             }
         }
     }
             }
         }
     }
-    
+
     typedef port-mod-failed-code-v10 {
         type enumeration {
             enum BAD_PORT {
     typedef port-mod-failed-code-v10 {
         type enumeration {
             enum BAD_PORT {
-                value 0; 
+                value 0;
             }
             enum BAD_HW_ADDR {
             }
             enum BAD_HW_ADDR {
-                value 1; 
+                value 1;
             }
         }
     }
             }
         }
     }
-    
+
     typedef queue-op-failed-code-v10 {
         type enumeration {
             enum BAD_PORT {
     typedef queue-op-failed-code-v10 {
         type enumeration {
             enum BAD_PORT {
-                value 0; 
+                value 0;
             }
             enum BAD_QUEUE {
             }
             enum BAD_QUEUE {
-                value 1; 
+                value 1;
             }
             enum EPERM {
             }
             enum EPERM {
-                value 2; 
+                value 2;
             }
         }
     }
             }
         }
     }
-    
+
     typedef port-number-values-v10 {
     typedef port-number-values-v10 {
+        description "Port numbering. Physical ports are numbered starting from 1.";
         type enumeration {
             enum MAX {
         type enumeration {
             enum MAX {
-                value 65280; // 0xff00 
+                value 65280; // 0xff00
             }
             enum IN_PORT {
             }
             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 {
                 value 65528; // 0xfff8
             }
             enum TABLE {
-                value 65529; // 0xfff9 
+                description "Perform actions in flow table.
+                            NB: This can only be the destination
+                            port for packet-out messages.";
+                value 65529; // 0xfff9
             }
             enum NORMAL {
             }
             enum NORMAL {
-                value 65530; // 0xfffa 
+                description "Process with normal L2/L3 switching.";
+                value 65530; // 0xfffa
             }
             enum FLOOD {
             }
             enum FLOOD {
-                value 65531; // 0xfffb 
+                description "All physical ports except input port and
+                            those disabled by STP.";
+                value 65531; // 0xfffb
             }
             enum ALL {
             }
             enum ALL {
-                value 65532; // 0xfffc 
+                description "All physical ports except input port.";
+                value 65532; // 0xfffc
             }
             enum CONTROLLER {
             }
             enum CONTROLLER {
+                description "Send to controller.";
                 value 65533; // 0xfffd
             }
             enum LOCAL {
                 value 65533; // 0xfffd
             }
             enum LOCAL {
+                description "Local openflow \"port\".";
                 value 65534; // 0xfffe
             }
                 value 65534; // 0xfffe
             }
-            enum ANY {
+            enum NONE {
+                description "Not associated with a physical port.";
                 value 65535; // 0xffff
             }
         }
     }
                 value 65535; // 0xffff
             }
         }
     }
-    
+
     typedef port-config-v10 {
     typedef port-config-v10 {
-        description 
+        description
            "Flags to indicate behavior of the physical port. These flags are
            "Flags to indicate behavior of the physical port. These flags are
-            describe the current configuration and used port_mod message 
+            describe the current configuration and used port_mod message
             to configure the port's behavior.";
         type bits {
             to configure the port's behavior.";
         type bits {
-            bit port-down { 
-                //description " Port is administratively down.";
+            bit port-down {
+                description " Port is administratively down.";
                 position 0;
             }
             bit no-stp {
                 position 0;
             }
             bit no-stp {
-                //description" Disable 802.1D spanning tree on port.";
+                description "Disable 802.1D spanning tree on port.";
                 position 1;
             }
                 position 1;
             }
-            bit no-recv { 
-                //description " Drop all packets received by port.";
+            bit no-recv {
+                description " Drop all packets received by port.";
                 position 2;
             }
                 position 2;
             }
-            bit no-recv-stp { 
-                //description " Drop received 802.1D STP packets.";
+            bit no-recv-stp {
+                description " Drop received 802.1D STP packets.";
                 position 3;
             }
                 position 3;
             }
-            bit no-flood { 
-                //description " Do not include this port when flooding.";
+            bit no-flood {
+                description " Do not include this port when flooding.";
                 position 4;
             }
                 position 4;
             }
-            bit no-fwd { 
-                //description " Drop packets forwarded to port.";
+            bit no-fwd {
+                description " Drop packets forwarded to port.";
                 position 5;
             }
                 position 5;
             }
-            bit no-packet-in { 
-                //description "Do not send packet-in msgs for port.";
+            bit no-packet-in {
+                description "Do not send packet-in msgs for port.";
                 position 6;
             }
         }
     }
                 position 6;
             }
         }
     }
-    
+
     typedef port-state-v10 {
     typedef port-state-v10 {
-        description 
-            "Current state of the physical port. These are not configurable from
-            the controller.";
+        description "Current state of the physical port. These are not configurable from
+                    the controller.";
         type bits {
             bit link_down {
         type bits {
             bit link_down {
-                //description "No physical link present.";
+                description "No physical link present.";
                 position 0;
             }
             bit blocked {
                 position 0;
             }
             bit blocked {
-                //description "Port is blocked";
+                description "Port is blocked";
                 position 1;
             }
             bit live {
                 position 1;
             }
             bit live {
-                //description "Live for Fast Failover Group.";
+                description "Live for Fast Failover Group.";
                 position 2;
             }
             bit stp_listen {
                 position 2;
             }
             bit stp_listen {
-                //description "Live for Fast Failover Group.";
-                position 8;
+                description "Not learning or relaying frames.";
             }
             bit stp_learn {
             }
             bit stp_learn {
-                //description "Live for Fast Failover Group.";
-                position 8;
+                description "Learning but not relaying frames.";
             }
             bit stp_forward {
             }
             bit stp_forward {
-                //description "Live for Fast Failover Group.";
-                position 8;
+                description "Learning and relaying frames.";
             }
             bit stp_block {
             }
             bit stp_block {
-                //description "Live for Fast Failover Group.";
-                position 8;
+                description "Not part of spanning tree.";
             }
             bit stp_mask {
             }
             bit stp_mask {
-                //description "Live for Fast Failover Group.";
-                position 8;
+                description "Bit mask for OFPPS_STP_* values.";
             }
         }
     }
             }
         }
     }
-    
+
     typedef port-features-v10 {
     typedef port-features-v10 {
-        ////description "Features of ports available in datapath.";
-        //reference "ofp_port_features";
+        description "Features of ports available in datapath.";
+        reference "ofp_port_features";
         type bits {
         type bits {
-            bit 10mb-hd { 
+            bit _10mb-hd {
                 position 0;
                 position 0;
-                //description "10 Mb half-duplex rate support.";
+                description "10 Mb half-duplex rate support.";
             }
             }
-            bit 10mb-fd { 
+            bit _10mb-fd {
                 position 1;
                 position 1;
-                //description "10 Mb full-duplex rate support.";
+                description "10 Mb full-duplex rate support.";
             }
             }
-            bit 100mb-hd { 
+            bit _100mb-hd {
                 position 2;
                 position 2;
-                //description "100 Mb half-duplex rate support.";
+                description "100 Mb half-duplex rate support.";
             }
             }
-            bit 100mb-fd { 
+            bit _100mb-fd {
                 position 3;
                 position 3;
-                //description "100 Mb full-duplex rate support.";
+                description "100 Mb full-duplex rate support.";
             }
             }
-            bit 1gb-hd { 
+            bit _1gb-hd {
                 position 4;
                 position 4;
-                //description "1 Gb half-duplex rate support.";
+                description "1 Gb half-duplex rate support.";
             }
             }
-            bit 1gb-fd { 
+            bit _1gb-fd {
                 position 5;
                 position 5;
-                //description "1 Gb full-duplex rate support.";
+                description "1 Gb full-duplex rate support.";
             }
             }
-            bit 10gb-fd { 
+            bit _10gb-fd {
                 position 6;
                 position 6;
-                //description "10 Gb full-duplex rate support.";
+                description "10 Gb full-duplex rate support.";
             }
             }
-            bit copper { 
+            bit copper {
                 position 7;
                 position 7;
-                //description "Copper medium.";
+                description "Copper medium.";
             }
             }
-            bit fiber { 
+            bit fiber {
                 position 8;
                 position 8;
-                //description "Fiber medium.";
+                description "Fiber medium.";
             }
             }
-            bit autoneg { 
+            bit autoneg {
                 position 9;
                 position 9;
-                //description "Auto-negotiation.";
+                description "Auto-negotiation.";
             }
             }
-            bit pause { 
+            bit pause {
                 position 10;
                 position 10;
-                //description "Pause.";
+                description "Pause.";
             }
             }
-            bit pause-asym { 
+            bit pause-asym {
                 position 11;
                 position 11;
-                //description "Asymmetric pause.";
+                description "Asymmetric pause.";
             }
         }
     }
             }
         }
     }
-    
+
     typedef capabilities-v10 {
         type bits {
             bit OFPC_FLOW_STATS {
                 position 0;
     typedef capabilities-v10 {
         type bits {
             bit OFPC_FLOW_STATS {
                 position 0;
-                /* Flow statistics. */
-            } 
+                description "Flow statistics.";
+            }
             bit OFPC_TABLE_STATS {
                 position 1;
             bit OFPC_TABLE_STATS {
                 position 1;
-                /* Table statistics. */
+                description "Table statistics.";
             }
             bit OFPC_PORT_STATS {
                 position 2;
             }
             bit OFPC_PORT_STATS {
                 position 2;
-                /* Port statistics. */
+                description "Port statistics.";
             }
             bit OFPC_STP {
                 position 3;
             }
             bit OFPC_STP {
                 position 3;
-                /* 802.1d spanning tree. */
+                description "802.1d spanning tree.";
             }
             bit OFPC_RESERVED {
                 position 4;
             }
             bit OFPC_RESERVED {
                 position 4;
-                /* Reserved, must be zero. */
+                description "Reserved, must be zero.";
             }
             bit OFPC_IP_REASM {
                 position 5;
             }
             bit OFPC_IP_REASM {
                 position 5;
-                /* Can reassemble IP fragments. */
+                description "Can reassemble IP fragments.";
             }
             bit OFPC_QUEUE_STATS {
                 position 6;
             }
             bit OFPC_QUEUE_STATS {
                 position 6;
-                /* Queue statistics. */
+                description "Queue statistics.";
             }
             bit OFPC_ARP_MATCH_IP {
                 position 8;
             }
             bit OFPC_ARP_MATCH_IP {
                 position 8;
-                /* Match IP addresses in ARP pkts. */
+                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;
     typedef flow-mod-flags-v10 {
         /* ofp_flow_mod_flags */
         type bits {
             bit OFPFF_SEND_FLOW_REM {
                 position 0;
-                /* Send flow removed message when flow expires or is deleted. */
+                description "Send flow removed message when flow expires or is deleted.";
             }
             bit OFPFF_CHECK_OVERLAP {
                 position 1;
             }
             bit OFPFF_CHECK_OVERLAP {
                 position 1;
-                /* Check for overlapping entries first. */
+                description "Check for overlapping entries first.";
             }
             bit OFPFF_EMERG {
                 position 2;
             }
             bit OFPFF_EMERG {
                 position 2;
-                /* Reset flow packet and byte counts. */
+                description "Reset flow packet and byte counts.";
             }
         }
     }
             }
         }
     }
-    
+
     typedef action-type-v10 {
         /* ofp_action_type */
         type bits {
             bit OFPAT_OUTPUT {
                 position 0;
     typedef action-type-v10 {
         /* ofp_action_type */
         type bits {
             bit OFPAT_OUTPUT {
                 position 0;
-                /* Output to switch port. */
+                description "Output to switch port.";
             }
             bit OFPAT_SET_VLAN_VID {
                 position 1;
             }
             bit OFPAT_SET_VLAN_VID {
                 position 1;
-                /* Set the 802.1q VLAN id. */
+                description "Set the 802.1q VLAN id.";
             }
             bit OFPAT_SET_VLAN_PCP {
                 position 2;
             }
             bit OFPAT_SET_VLAN_PCP {
                 position 2;
-                /* Set the 802.1q priority. */
+                description "Set the 802.1q priority.";
             }
             bit OFPAT_STRIP_VLAN {
                 position 3;
             }
             bit OFPAT_STRIP_VLAN {
                 position 3;
-                /* Strip the 802.1q header. */
+                description "Strip the 802.1q header.";
             }
             bit OFPAT_SET_DL_SRC {
                 position 4;
             }
             bit OFPAT_SET_DL_SRC {
                 position 4;
-                /* Ethernet source address. */
+                description "Ethernet source address.";
             }
             bit OFPAT_SET_DL_DST {
                 position 5;
             }
             bit OFPAT_SET_DL_DST {
                 position 5;
-                /* Ethernet destination address. */
+                description "Ethernet destination address.";
             }
             bit OFPAT_SET_NW_SRC {
                 position 6;
             }
             bit OFPAT_SET_NW_SRC {
                 position 6;
-                /* IP source address. */
+                description "IP source address.";
             }
             bit OFPAT_SET_NW_DST {
                 position 7;
             }
             bit OFPAT_SET_NW_DST {
                 position 7;
-                /* IP destination address. */
+                description "IP destination address.";
             }
             bit OFPAT_SET_NW_TOS {
                 position 8;
             }
             bit OFPAT_SET_NW_TOS {
                 position 8;
-                /* IP ToS (DSCP field, 6 bits). */
+                description "IP ToS (DSCP field, 6 bits).";
             }
             bit OFPAT_SET_TP_SRC {
                 position 9;
             }
             bit OFPAT_SET_TP_SRC {
                 position 9;
-                /* TCP/UDP source port. */
+                description "TCP/UDP source port.";
             }
             bit OFPAT_SET_TP_DST {
                 position 10;
             }
             bit OFPAT_SET_TP_DST {
                 position 10;
-                /* TCP/UDP destination port. */
+                description "TCP/UDP destination port.";
             }
             bit OFPAT_ENQUEUE {
                 position 11;
             }
             bit OFPAT_ENQUEUE {
                 position 11;
-                /* Output to queue. */
+                description "Output to queue.";
             }
             bit OFPAT_VENDOR {
                 position 12;
             }
             bit OFPAT_VENDOR {
                 position 12;
-                /* Experimenter in later versions */
+                description "Experimenter in later versions.";
             }
         }
     }
             }
         }
     }
-    
+
     typedef flow-wildcards-v10 {
         /* ofp_flow_wildcards */
     typedef flow-wildcards-v10 {
         /* ofp_flow_wildcards */
+        description "Flow wildcards - NW_SRC_MASK & NW_DST_MASK are handled separately";
         type bits {
             bit IN_PORT {
         type bits {
             bit IN_PORT {
+                description "Switch input port.";
                 position 0;
                 position 0;
-                /* Switch input port. */
             }
             bit DL_VLAN {
             }
             bit DL_VLAN {
+                description "VLAN id.";
                 position 1;
                 position 1;
-                /* Switch input port. */
             }
             bit DL_SRC {
             }
             bit DL_SRC {
+                description "Ethernet source address.";
                 position 2;
                 position 2;
-                /* Switch input port. */
             }
             bit DL_DST {
             }
             bit DL_DST {
+                description "Ethernet destination address.";
                 position 3;
                 position 3;
-                /* Switch input port. */
             }
             bit DL_TYPE {
             }
             bit DL_TYPE {
+                description "Ethernet frame type.";
                 position 4;
                 position 4;
-                /* Switch input port. */
             }
             bit NW_PROTO {
             }
             bit NW_PROTO {
+                description "IP protocol.";
                 position 5;
                 position 5;
-                /* Switch input port. */
             }
             bit TP_SRC {
             }
             bit TP_SRC {
+                description "TCP/UDP source port.";
                 position 6;
                 position 6;
-                /* Switch input port. */
             }
             bit TP_DST {
             }
             bit TP_DST {
+                description "TCP/UDP destination port.";
                 position 7;
                 position 7;
-                /* Switch input port. */
             }
             bit DL_VLAN_PCP {
             }
             bit DL_VLAN_PCP {
+                description "VLAN priority.";
                 position 20;
                 position 20;
-                /* Switch input port. */
             }
             bit NW_TOS {
             }
             bit NW_TOS {
+                description "IP ToS (DSCP field, 6 bits).";
                 position 21;
                 position 21;
-                /* Switch input port. */
-            }
-            bit ALL {
-                position 22;
-                /* Switch input port. */
             }
         }
     }
             }
         }
     }
-    
+
 }
 }