Updated experimenter model
[openflowjava.git] / openflow-protocol-api / src / main / yang / openflow-protocol.yang
index 6a353a41352af81dee14bd98640080230dd4956f..32070d14cf900c973825c3fe47985df02d7e7e3a 100644 (file)
@@ -1,9 +1,15 @@
-module openflow-protocol {\r
+/*\r
+ * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved.\r
+ *\r
+ * This program and the accompanying materials are made available under the\r
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
+ * and is available at http://www.eclipse.org/legal/epl-v10.html\r
+ */\r
\r
+ module openflow-protocol {\r
     namespace "urn:opendaylight:openflow:protocol";\r
     prefix "ofproto";\r
 \r
-\r
-    import ietf-inet-types {prefix inet;}\r
     import ietf-yang-types {prefix yang;}\r
     \r
     import openflow-types {prefix oft;}\r
@@ -11,115 +17,146 @@ module openflow-protocol {
     import openflow-instruction { prefix ofinstruction;}\r
     import openflow-action {prefix ofaction;}\r
 \r
-\r
-\r
     revision "2013-07-31" {\r
-        description "Initial model";\r
+        description "OpenFlow 1.3 - protocol objects model";\r
     }\r
 \r
     // Generic Structures\r
-\r
-        grouping port {\r
-            // reference "ofp_port";\r
-            leaf port-no { \r
-                // reference "ofp_port.port_no"; \r
+        grouping port-grouping {\r
+            reference "ofp_port";\r
+            leaf port-no {\r
                 type uint32;\r
             }\r
-            leaf hw-addr { \r
-                // reference "ofp_port.hw_addr"; \r
+            leaf hw-addr {\r
                 type yang:mac-address;\r
             }\r
-            leaf name { \r
-                // reference "ofp_port.name"; \r
+            leaf name {\r
                 type string;\r
             }\r
-            leaf config { \r
-                // reference "ofp_port.config"; \r
+            leaf config {\r
+                description "Bitmap of OFPPC_* flags.";\r
                 type oft:port-config;\r
             }\r
-            leaf state { \r
-                // reference "ofp_port.state"; \r
+            leaf state {\r
+                description "Bitmap of OFPPS_* flags.";\r
                 type oft:port-state;\r
             }\r
-            leaf current-features { \r
+            leaf current-features {\r
                 description "Current features.";\r
-                // reference "ofp_port.curr"; \r
-                type oft:port-features; \r
+                type oft:port-features;\r
             }\r
-            leaf advertised-features { \r
+            leaf advertised-features {\r
                 description "Features being advertised by the port.";\r
-                // reference "ofp_port.advertised"; \r
-                type oft:port-features; \r
+                type oft:port-features;\r
             }\r
-            leaf supported-features { \r
+            leaf supported-features {\r
                 description "Features supported by the port.";\r
-                // reference "ofp_port.supported"; \r
-                type oft:port-features; \r
+                type oft:port-features;\r
             }\r
-            leaf peer-features { \r
+            leaf peer-features {\r
                 description "Features advertised by peer.";\r
-                // reference "ofp_port.peer"; \r
                 type oft:port-features; \r
             }\r
-            leaf curr_speed { \r
+            leaf curr-speed {\r
                 description "Current port bitrate in kbps.";\r
-                // reference "ofp_port.curr_speed"; \r
-                type uint32; \r
+                type uint32;\r
                 units "kbps";\r
             }\r
-            leaf max_speed { \r
+            leaf max-speed {\r
                 description "Max port bitrate in kbps";\r
-                // reference "ofp_port.max_speed"; \r
                 type uint32;\r
-                units "kbps"; \r
+                units "kbps";\r
+            }\r
+\r
+            // OF1.0 structures\r
+            leaf config-v10 {\r
+                type oft:port-config-v10;\r
+            }\r
+            leaf state-v10 { \r
+                type oft:port-state-v10;\r
+            }\r
+            leaf current-features-v10 {\r
+                description "Current features.";\r
+                type oft:port-features-v10;\r
+            }\r
+            leaf advertised-features-v10 {\r
+                description "Features being advertised by the port.";\r
+                type oft:port-features-v10;\r
+            }\r
+            leaf supported-features-v10 {\r
+                description "Features supported by the port.";\r
+                type oft:port-features-v10;\r
+            }\r
+            leaf peer-features-v10 { \r
+                description "Features advertised by peer.";\r
+                type oft:port-features-v10; \r
             }\r
         }\r
-        \r
-        grouping match {\r
-            leaf type {\r
-                type identityref {\r
-                    base oft:match-type-base;\r
+\r
+        grouping buckets-grouping {\r
+                list buckets-list {\r
+                    uses bucket-grouping;\r
                 }\r
             }\r
-            uses oxm:oxm-fields;\r
-        }\r
-        \r
+\r
+            grouping bucket-grouping {\r
+                description "Bucket for use in groups.";\r
+                leaf weight {\r
+                    description "Relative weight of bucket. Only\r
+                                defined for select groups.";\r
+                    type uint16;\r
+                }\r
+                leaf watch-port {\r
+                    description "Port whose state affects whether this\r
+                                bucket is live. Only required for fast\r
+                                failover groups.";\r
+                    type oft:port-number;\r
+                }\r
+                leaf watch-group {\r
+                    description "Group whose state affects whether this\r
+                                bucket is live. Only required for fast\r
+                                failover groups.";\r
+                    type uint32;\r
+                }\r
+\r
+                uses ofaction:actions-grouping;\r
+            }\r
+            \r
         container table-features-properties-container {\r
-            uses table-features-properties;\r
+            uses table-features-properties-grouping;\r
         }\r
-        \r
-        grouping table-features-properties {\r
+\r
+        grouping table-features-properties-grouping {\r
             list table-feature-properties {\r
+                config false;\r
                 leaf type {\r
                     type oft:table-features-prop-type;\r
                 }\r
             }\r
         }\r
 \r
-    // TODO: ofp_packet_queue\r
-\r
     // # MESSAGE Structures\r
         /* Immutable messages. */\r
             grouping ofHeader {\r
-                //reference "ofpt_header struct in Openflow Switch 1.3 Spec"\r
+                reference "ofp_header struct in Openflow Switch 1.3 Spec";\r
                 leaf version {\r
                     type uint8;\r
-                    //reference "OpenFlow Header - OFP_VERSION";\r
+                    description "OpenFlow version";\r
                 }\r
                 leaf xid {\r
                     type uint32;\r
-                    //reference "OpenFlow Header - transaction id";\r
+                    description "Transaction ID";\r
                 }\r
             }\r
             grouping ofHelloElementHeader {\r
-                //reference "ofpt_hello_elem_header struct in Openflow Switch 1.3 Spec"\r
+                reference "ofpt_hello_elem_header struct in Openflow Switch 1.3 Spec";\r
                 leaf type {\r
                     type oft:hello-element-type;\r
                     //reference "OpenFlow Header element type - OFPHET_*";\r
                 }\r
             }\r
             grouping hello {\r
-                // reference "OFPT_HELLO message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_HELLO message in Openflow Switch 1.3 Spec";\r
                 /* Symmetric message */\r
                 uses ofHeader;\r
                 \r
@@ -129,29 +166,31 @@ module openflow-protocol {
                     leaf-list version-bitmap {\r
                         type boolean;\r
                     }\r
-                    \r
-                    leaf data {\r
-                        type binary;\r
-                    }\r
                 }\r
             }\r
             grouping error {\r
-                // reference "OFPT_ERROR message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_ERROR message in Openflow Switch 1.3 Spec";\r
                 /* Symmetric message */\r
                 uses ofHeader;\r
                 \r
                 leaf type {\r
-                    type oft:error-type;\r
+                    type uint16;\r
                 }\r
                 leaf code {\r
                     type uint16;\r
                 }\r
+                leaf type-string {\r
+                    type string;\r
+                }\r
+                leaf code-string {\r
+                    type string;\r
+                }\r
                 leaf data {\r
                     type binary; \r
                 }\r
             }\r
             grouping echo-request {\r
-                // reference "OFPT_ECHO_REQUEST message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_ECHO_REQUEST message in Openflow Switch 1.3 Spec";\r
                 /* Symmetric message */\r
                 uses ofHeader;\r
                 \r
@@ -160,7 +199,7 @@ module openflow-protocol {
                 }\r
             }\r
             grouping echo-reply {\r
-                // reference "OFPT_ECHO_REPLY message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_ECHO_REPLY message in Openflow Switch 1.3 Spec";\r
                 /* Symmetric message */\r
                 uses ofHeader;\r
                 \r
@@ -169,28 +208,25 @@ module openflow-protocol {
                 }\r
             }\r
             grouping experimenter {\r
-                // reference "OFPT_EXPERIMENTER message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_EXPERIMENTER message in Openflow Switch 1.3 Spec";\r
                 /* Symmetric message */\r
                 uses ofHeader;\r
                 \r
                 leaf experimenter {\r
-                    type uint32;\r
+                    type oft:experimenter-id;\r
                 }\r
                 leaf exp_type {\r
                     type uint32;\r
                 }\r
-                leaf data {\r
-                    type binary;\r
-                }\r
             }\r
         /* Switch configuration messages. */\r
             grouping features-request {\r
-                // reference "OFPT_FEATURES_REQUEST message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_FEATURES_REQUEST message in Openflow Switch 1.3 Spec";\r
                 /* Controller/switch message */\r
                 uses ofHeader;\r
             }\r
             grouping features-reply {\r
-                // reference "OFPT_FEATURES_REPLY message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_FEATURES_REPLY message in Openflow Switch 1.3 Spec";\r
                 /* Controller/switch message */\r
                 uses ofHeader;\r
                 \r
@@ -207,19 +243,29 @@ module openflow-protocol {
                     type uint8;\r
                 }\r
                 leaf capabilities {\r
-                    type uint32;\r
+                    type oft:capabilities;\r
                 }\r
                 leaf reserved {\r
                     type uint32;\r
                 }\r
+                // OF1.0 structures\r
+                leaf capabilities-v10 {\r
+                    type oft:capabilities-v10;\r
+                }\r
+                leaf actions-v10 {\r
+                    type oft:action-type-v10;\r
+                }\r
+                list phy-port {\r
+                    uses port-grouping;\r
+                }\r
             }\r
             grouping get-config-request {\r
-                // reference "OFPT_GET_CONFIG_REQUEST message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_GET_CONFIG_REQUEST message in Openflow Switch 1.3 Spec";\r
                 /* Controller/switch message */\r
                 uses ofHeader;\r
             }\r
             grouping get-config-reply {\r
-                // reference "OFPT_GET_CONFIG_REPLY message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_GET_CONFIG_REPLY message in Openflow Switch 1.3 Spec";\r
                 /* Controller/switch message */\r
                 uses ofHeader;\r
                 \r
@@ -231,12 +277,12 @@ module openflow-protocol {
                 }\r
             }\r
             grouping set-config {\r
-                // reference "OFPT_SET_CONFIG message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_SET_CONFIG message in Openflow Switch 1.3 Spec";\r
                 /* Controller/switch message */\r
                 \r
                 uses ofHeader;\r
                 \r
-                leaf-list flags {\r
+                leaf flags {\r
                     type oft:switch-config-flag;\r
                 }\r
                 leaf miss-send-len {\r
@@ -245,7 +291,7 @@ module openflow-protocol {
             }\r
         /* Asynchronous messages. */\r
             grouping packet-in {\r
-                // reference "OFPT_PACKET_IN message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_PACKET_IN message in Openflow Switch 1.3 Spec";\r
                 /* Async message */\r
                 \r
                 uses ofHeader;\r
@@ -260,7 +306,7 @@ module openflow-protocol {
                 }\r
                 leaf reason {\r
                     // Reason packet is being sent (one of OFPR_*) \r
-                    type uint8;\r
+                    type oft:packet-in-reason;\r
                 }\r
                 leaf table-id {\r
                     // ID of the table that was looked up\r
@@ -270,24 +316,19 @@ module openflow-protocol {
                     // Cookie of the flow entry that was looked up.\r
                     type uint64;\r
                 }\r
-                container match {\r
-                    uses match;\r
-                }\r
+                uses oxm:match-grouping;\r
 \r
-// struct ofp_match match; /* Packet metadata. Variable size. */\r
-// /* The variable size and padded match is always followed by:\r
-//  *   - Exactly 2 all-zero padding bytes, then\r
-//  *   - An Ethernet frame whose length is inferred from header.length.\r
-//  * The padding bytes preceding the Ethernet frame ensure that the IP\r
-//  * header (if any) following the Ethernet header is 32-bit aligned.\r
-//  */\r
                 leaf data {\r
                     type binary;\r
                 }\r
                 \r
+                // OF1.0 structures\r
+                leaf in-port {\r
+                    type uint16;\r
+                }\r
             }\r
             grouping flow-removed {\r
-                // reference "OFPT_FLOW_REMOVED message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_FLOW_REMOVED message in Openflow Switch 1.3 Spec";\r
                 /* Async message */\r
                 uses ofHeader;\r
                 \r
@@ -321,36 +362,34 @@ module openflow-protocol {
                 leaf byte-count {\r
                     type uint64;\r
                 }\r
-                container match {\r
-                    uses match;\r
-                }\r
+                uses oxm:match-grouping;\r
+                \r
+                // OF1.0 structures\r
+                uses oxm:match-v10-grouping;\r
             } \r
             grouping port-status {\r
-                // reference "OFPT_PORT_STATUS message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_PORT_STATUS message in Openflow Switch 1.3 Spec";\r
                 \r
                 uses ofHeader;\r
                 \r
-                uses port;\r
+                uses port-grouping;\r
                 \r
                 leaf reason {\r
                     type oft:port-reason;\r
                 }\r
-            } /* Async message */\r
+            }\r
         /* Controller command messages. */\r
             grouping packet-out {\r
-                // reference "OFPT_PACKET_OUT message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_PACKET_OUT message in Openflow Switch 1.3 Spec";\r
                 /* Controller/switch message */\r
                 \r
                 uses ofHeader;\r
                 \r
-                list actions-list {\r
-                    uses ofaction:action-header;\r
-                    \r
-                    leaf data {\r
-                        type binary;\r
-                    }\r
-                }\r
+                uses ofaction:actions-grouping;\r
                 \r
+                leaf data {\r
+                    type binary;\r
+                }\r
                 leaf buffer-id {\r
                     type uint32;\r
                 }\r
@@ -359,7 +398,7 @@ module openflow-protocol {
                 }\r
             } \r
             grouping flow-mod {\r
-                // reference "OFPT_FLOW_MOD message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_FLOW_MOD message in Openflow Switch 1.3 Spec";\r
                 /* Controller/switch message */\r
                 \r
                 uses ofHeader;\r
@@ -397,12 +436,19 @@ module openflow-protocol {
                 leaf flags {\r
                     type oft:flow-mod-flags;\r
                 }\r
-                container match {\r
-                    uses match;\r
+                uses oxm:match-grouping;\r
+                \r
+                uses ofinstruction:instructions-grouping;\r
+                \r
+                // OF1.0 structures\r
+                leaf flags-v10 {\r
+                    type oft:flow-mod-flags-v10;\r
                 }\r
+                uses oxm:match-v10-grouping;\r
+                uses ofaction:actions-grouping;\r
             } \r
             grouping group-mod {\r
-                // reference "OFPT_GROUP_MOD message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_GROUP_MOD message in Openflow Switch 1.3 Spec";\r
                 /* Controller/switch message */\r
                 \r
                 uses ofHeader;\r
@@ -414,30 +460,14 @@ module openflow-protocol {
                     type oft:group-type;\r
                 }\r
                 leaf group-id {\r
-                    type uint32;\r
-                }\r
-                \r
-                list buckets {\r
-                    uses bucket;\r
-                }\r
-            }\r
-            grouping bucket {\r
-                leaf weight {\r
-                    type uint16;\r
-                }\r
-                leaf watch-port {\r
-                    type oft:port-number;\r
-                }\r
-                leaf watch-group {\r
-                    type uint32;\r
+                    type oft:group-id;\r
                 }\r
                 \r
-                list actions-list {\r
-                    uses ofaction:action-header;\r
-                }\r
+                uses buckets-grouping;\r
             }\r
+            \r
             grouping port-mod {\r
-                // reference "OFPT_PORT_MOD message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_PORT_MOD message in Openflow Switch 1.3 Spec";\r
                 /* Controller/switch message */\r
 \r
                 uses ofHeader;\r
@@ -453,13 +483,23 @@ module openflow-protocol {
                 }   \r
                 leaf mask {\r
                     type oft:port-config;\r
-                }  \r
+                }\r
                 leaf advertise {\r
                     type oft:port-features;\r
                 }\r
+                // OF1.0 structures\r
+                leaf config-v10 {\r
+                    type oft:port-config-v10;\r
+                }\r
+                leaf mask-v10 {\r
+                    type oft:port-config-v10;\r
+                }\r
+                leaf advertise-v10 {\r
+                    type oft:port-features-v10;\r
+                }\r
             } \r
             grouping table-mod {\r
-                // reference "OFPT_TABLE_MOD message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_TABLE_MOD message in Openflow Switch 1.3 Spec";\r
                 /* Controller/switch message */\r
 \r
                 uses ofHeader;\r
@@ -468,465 +508,563 @@ module openflow-protocol {
                     type oft:table-id;\r
                 }\r
                 leaf config {\r
-                    type oft:port-config;\r
-                }                \r
+                    type oft:table-config;\r
+                }\r
             } \r
             \r
         /* Multipart messages. */\r
             grouping multipart-request {\r
-                // reference "OFPT_MULTIPART_REQUEST message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_MULTIPART_REQUEST message in Openflow Switch 1.3 Spec";\r
                 /* Controller/switch message */\r
 \r
                 uses ofHeader;\r
                 \r
                 leaf type {\r
                     type oft:multipart-type;\r
-                }          \r
+                }\r
                 leaf flags {\r
                     type oft:multipart-request-flags;\r
-                }      \r
+                }\r
                 choice multipart-request-body {\r
-                    case multipart-request-flow {\r
-                        leaf table-id {\r
-                            type uint8;\r
-                        }\r
-                        leaf out-port {\r
-                            type uint32;\r
-                        }\r
-                        leaf out-group {\r
-                            type uint32;\r
-                        }\r
-                        leaf cookie {\r
-                            type uint64;\r
-                        }\r
-                        leaf cookie-mask {\r
-                            type uint64;\r
-                        }\r
-                        container match {\r
-                            uses match;\r
-                        }\r
-                    }\r
-                    case multipart-request-aggregate {\r
-                        leaf table-id {\r
-                            type uint8;\r
-                        }\r
-                        leaf out-port {\r
-                            type uint32;\r
-                        }\r
-                        leaf out-group {\r
-                            type uint32;\r
-                        }\r
-                        leaf cookie {\r
-                            type uint64;\r
-                        }\r
-                        leaf cookie-mask {\r
-                            type uint64;\r
-                        }\r
-                        container match {\r
-                            uses match;\r
-                        }\r
-                    }\r
-                    case multipart-request-port-stats {\r
-                        leaf port-no {\r
-                            type uint32;\r
-                        }\r
-                    }\r
-                    case multipart-request-queue {\r
-                        leaf port-no {\r
-                            type uint32;\r
-                        }\r
-                        leaf queue-id {\r
-                            type uint32;\r
-                        }\r
-                    }\r
-                    case multipart-request-group {\r
-                        leaf group-id {\r
-                            type uint32;\r
-                        }\r
-                    }\r
-                    case multipart-request-meter {\r
-                        leaf meter-id {\r
-                            type uint32;\r
-                        }\r
-                    }\r
-                    case multipart-request-meter-config {\r
-                        leaf meter-id {\r
-                            type uint32;\r
+                    case multipart-request-desc-case {\r
+                        container multipart-request-desc {\r
+                            leaf empty {\r
+                                type empty;\r
+                            }\r
                         }\r
                     }\r
-                    case multipart-request-table-features {\r
-                        list table-features {\r
+                    case multipart-request-flow-case {\r
+                        container multipart-request-flow {\r
                             leaf table-id {\r
                                 type uint8;\r
                             }\r
-                            leaf name {\r
-                                type string;\r
+                            leaf out-port {\r
+                                type uint32;\r
                             }\r
-                            leaf metadata-match {\r
-                                type uint64;\r
+                            leaf out-group {\r
+                                type uint32;\r
                             }\r
-                            leaf metadata-write {\r
+                            leaf cookie {\r
                                 type uint64;\r
                             }\r
-                            leaf config {\r
-                                type oft:table-config;\r
-                            }\r
-                            leaf max-entries {\r
-                                type uint32;\r
+                            leaf cookie-mask {\r
+                                type uint64;\r
                             }\r
-                            uses table-features-properties;\r
-                        }\r
-                    }\r
-                    case multipart-request-experimenter {\r
-                        leaf experimenter {\r
-                            type uint32;\r
-                        }\r
-                        leaf exp-type {\r
-                            type uint32;\r
-                        }\r
-                    }\r
-                }\r
-            } \r
-            grouping multipart-reply {\r
-                // reference "OFPT_MULTIPART_REPLY message in Openflow Switch 1.3 Spec"\r
-                /* Controller/switch message */\r
-\r
-                uses ofHeader;\r
-                \r
-                leaf type {\r
-                    type oft:multipart-type;\r
-                }\r
-                leaf flags {\r
-                    type oft:multipart-request-flags;\r
-                }\r
-                choice multipart-reply-body {\r
-                    case multipart-reply-desc {\r
-                        leaf mfr_desc {\r
-                            type string;\r
-                        }\r
-                        leaf hw_desc {\r
-                            type string;\r
-                        }\r
-                        leaf sw_desc {\r
-                            type string;\r
-                        }\r
-                        leaf serial_num {\r
-                            type string;\r
-                        }\r
-                        leaf dp_desc {\r
-                            type string;\r
+                            uses oxm:match-grouping;\r
+                            \r
+                            // OF1.0 structures\r
+                            uses oxm:match-v10-grouping;\r
                         }\r
                     }\r
-                    case multipart-reply-flow {\r
-                        list flow-stats {\r
+                    case multipart-request-aggregate-case {\r
+                        container multipart-request-aggregate {\r
                             leaf table-id {\r
                                 type uint8;\r
                             }\r
-                            leaf duration-sec {\r
+                            leaf out-port {\r
                                 type uint32;\r
                             }\r
-                            leaf duration-nsec {\r
+                            leaf out-group {\r
                                 type uint32;\r
                             }\r
-                            leaf priority {\r
-                                type uint16;\r
-                            }\r
-                            leaf idle-timeout {\r
-                                type uint16;\r
-                            }\r
-                            leaf hard-timeout {\r
-                                type uint16;\r
-                            }\r
-                            leaf flags {\r
-                                type oft:flow-mod-flags;\r
-                            }\r
                             leaf cookie {\r
                                 type uint64;\r
                             }\r
-                            leaf packet-count {\r
+                            leaf cookie-mask {\r
                                 type uint64;\r
                             }\r
-                            leaf byte-count {\r
-                                type uint64;\r
-                            }\r
-                            container match {\r
-                                uses match;\r
-                            }\r
+                            uses oxm:match-grouping;\r
+                            \r
+                            // OF1.0 structures\r
+                            uses oxm:match-v10-grouping;\r
                         }\r
                     }\r
-                    case multipart-reply-aggregate {\r
-                        leaf packet-count {\r
-                            type uint64;\r
-                        }\r
-                        leaf byte-count {\r
-                            type uint64;\r
-                        }\r
-                        leaf flow-count {\r
-                            type uint32;\r
+                    case multipart-request-table-case {\r
+                        container multipart-request-table {\r
+                            leaf empty {\r
+                                type empty;\r
+                            }\r
                         }\r
                     }\r
-                    case multipart-reply-table {\r
-                        list table-stats {\r
-                            leaf table-id {\r
-                                type uint8;\r
-                            }\r
-                            leaf active-count {\r
+                    case multipart-request-port-stats-case {\r
+                        container multipart-request-port-stats {\r
+                            leaf port-no {\r
                                 type uint32;\r
                             }\r
-                            leaf lookup-count {\r
-                                type uint64;\r
-                            }\r
-                            leaf matched-count {\r
-                                type uint64;\r
-                            }\r
                         }\r
                     }\r
-                    case multipart-reply-port-stats {\r
-                        list port-stats {\r
+                    case multipart-request-queue-case {\r
+                        container multipart-request-queue {\r
                             leaf port-no {\r
                                 type uint32;\r
                             }\r
-                            leaf rx-packets {\r
-                                type uint64;\r
-                            }\r
-                            leaf tx-packets {\r
-                                type uint64;\r
-                            }\r
-                            leaf rx-bytes {\r
-                                type uint64;\r
-                            }\r
-                            leaf tx-bytes {\r
-                                type uint64;\r
-                            }\r
-                            leaf rx-dropped {\r
-                                type uint64;\r
-                            }\r
-                            leaf tx-dropped {\r
-                                type uint64;\r
-                            }\r
-                            leaf rx-errors {\r
-                                type uint64;\r
-                            }\r
-                            leaf tx-errors {\r
-                                type uint64;\r
+                            leaf queue-id {\r
+                                type uint32;\r
                             }\r
-                            leaf rx-frame-err {\r
-                                type uint64;\r
+                        }\r
+                    }\r
+                    case multipart-request-group-case {\r
+                        container multipart-request-group {\r
+                            leaf group-id {\r
+                                type oft:group-id;\r
                             }\r
-                            leaf rx-over-err {\r
-                                type uint64;\r
+                        }\r
+                    }\r
+                    case multipart-request-group-desc-case {\r
+                        container multipart-request-group-desc {\r
+                            leaf empty {\r
+                                type empty;\r
                             }\r
-                            leaf rx-crc-err {\r
-                                type uint64;\r
+                        }\r
+                    }\r
+                    case multipart-request-group-features-case {\r
+                        container multipart-request-group-features {\r
+                            leaf empty {\r
+                                type empty;\r
                             }\r
-                            leaf collisions {\r
-                                type uint64;\r
+                        }\r
+                    }\r
+                    case multipart-request-meter-case {\r
+                        container multipart-request-meter {\r
+                            leaf meter-id {\r
+                                type oft:meter-id;\r
                             }\r
-                            leaf duration-sec {\r
-                                type uint32;\r
+                        }\r
+                    }\r
+                    case multipart-request-meter-config-case {\r
+                        container multipart-request-meter-config {\r
+                            leaf meter-id {\r
+                                type oft:meter-id;\r
                             }\r
-                            leaf duration-nsec {\r
-                                type uint32;\r
+                        }\r
+                    }\r
+                    case multipart-request-meter-features-case {\r
+                        container multipart-request-meter-features {\r
+                            leaf empty {\r
+                                type empty;\r
                             }\r
                         }\r
                     }\r
-                    case multipart-reply-queue {\r
-                        list queue-stats {\r
-                            leaf port-no {\r
-                                type uint32;\r
+                    case multipart-request-table-features-case {\r
+                        container multipart-request-table-features {\r
+                            list table-features {\r
+                                leaf table-id {\r
+                                    type uint8;\r
+                                }\r
+                                leaf name {\r
+                                    type string;\r
+                                }\r
+                                leaf metadata-match {\r
+                                    type uint64;\r
+                                }\r
+                                leaf metadata-write {\r
+                                    type uint64;\r
+                                }\r
+                                leaf config {\r
+                                    type oft:table-config;\r
+                                }\r
+                                leaf max-entries {\r
+                                    type uint32;\r
+                                }\r
+                                uses table-features-properties-grouping;\r
                             }\r
-                            leaf queue-id {\r
-                                type uint32;\r
+                        }\r
+                    }\r
+                    case multipart-request-port-desc-case {\r
+                        container multipart-request-port-desc {\r
+                            leaf empty {\r
+                                type empty;\r
                             }\r
-                            leaf tx-bytes {\r
-                                type uint64;\r
+                        }\r
+                    }\r
+                    case multipart-request-experimenter-case {\r
+                        container multipart-request-experimenter {\r
+                            // empty body - used for experimenter augmentation\r
+                        }\r
+                    }\r
+                }\r
+            } \r
+            grouping multipart-reply {\r
+                reference "OFPT_MULTIPART_REPLY message in Openflow Switch 1.3 Spec";\r
+                /* Controller/switch message */\r
+\r
+                uses ofHeader;\r
+                \r
+                leaf type {\r
+                    type oft:multipart-type;\r
+                }\r
+                leaf flags {\r
+                    type oft:multipart-request-flags;\r
+                }\r
+                choice multipart-reply-body {\r
+                    case multipart-reply-desc-case {\r
+                        container multipart-reply-desc {\r
+                            leaf mfr_desc {\r
+                                type string;\r
                             }\r
-                            leaf tx-packets {\r
-                                type uint64;\r
+                            leaf hw_desc {\r
+                                type string;\r
                             }\r
-                            leaf tx-errors {\r
-                                type uint64;\r
+                            leaf sw_desc {\r
+                                type string;\r
                             }\r
-                            leaf duration-sec {\r
-                                type uint32;\r
+                            leaf serial_num {\r
+                                type string;\r
                             }\r
-                            leaf duration-nsec {\r
-                                type uint32;\r
+                            leaf dp_desc {\r
+                                type string;\r
                             }\r
                         }\r
                     }\r
-                    case multipart-reply-group {\r
-                        list group-stats {\r
-                            leaf group-id {\r
-                                type uint32;\r
-                            }\r
-                            leaf ref-count {\r
-                                type uint32;\r
+                    case multipart-reply-flow-case {\r
+                        container multipart-reply-flow {\r
+                            list flow-stats {\r
+                                leaf table-id {\r
+                                    type uint8;\r
+                                }\r
+                                leaf duration-sec {\r
+                                    type uint32;\r
+                                }\r
+                                leaf duration-nsec {\r
+                                    type uint32;\r
+                                }\r
+                                leaf priority {\r
+                                    type uint16;\r
+                                }\r
+                                leaf idle-timeout {\r
+                                    type uint16;\r
+                                }\r
+                                leaf hard-timeout {\r
+                                    type uint16;\r
+                                }\r
+                                leaf flags {\r
+                                    type oft:flow-mod-flags;\r
+                                }\r
+                                leaf cookie {\r
+                                    type uint64;\r
+                                }\r
+                                leaf packet-count {\r
+                                    type uint64;\r
+                                }\r
+                                leaf byte-count {\r
+                                    type uint64;\r
+                                }\r
+                                uses oxm:match-grouping;\r
+                                \r
+                                uses ofinstruction:instructions-grouping;\r
+                                \r
+                                // OF1.0 structures\r
+                                uses oxm:match-v10-grouping;\r
+                                uses ofaction:actions-grouping;\r
                             }\r
+                        }\r
+                    }\r
+                    case multipart-reply-aggregate-case {\r
+                        container multipart-reply-aggregate {\r
                             leaf packet-count {\r
                                 type uint64;\r
                             }\r
                             leaf byte-count {\r
                                 type uint64;\r
                             }\r
-                            leaf duration-sec {\r
-                                type uint32;\r
-                            }\r
-                            leaf duration-nsec {\r
+                            leaf flow-count {\r
                                 type uint32;\r
                             }\r
-                            list bucket-stats {\r
-                                leaf packet-count {\r
+                        }\r
+                    }\r
+                    case multipart-reply-table-case {\r
+                        container multipart-reply-table {\r
+                            list table-stats {\r
+                                leaf table-id {\r
+                                    type uint8;\r
+                                }\r
+                                leaf active-count {\r
+                                    type uint32;\r
+                                }\r
+                                leaf lookup-count {\r
                                     type uint64;\r
                                 }\r
-                                leaf byte-count {\r
+                                leaf matched-count {\r
                                     type uint64;\r
                                 }\r
+                                \r
+                                // OF1.0 structures\r
+                                leaf name {\r
+                                    type string;\r
+                                }\r
+                                leaf wildcards {\r
+                                    type oft:flow-wildcards-v10;\r
+                                }\r
+                                leaf nw-src-mask {\r
+                                    type uint8;\r
+                                }\r
+                                leaf nw-dst-mask {\r
+                                    type uint8;\r
+                                }\r
+                                leaf max-entries {\r
+                                    type uint32;\r
+                                }\r
                             }\r
                         }\r
                     }\r
-                    case multipart-reply-group-desc {\r
-                        list group-desc {\r
-                            leaf type {\r
-                                //type uint8;\r
-                                type oft:group-type;\r
-                            }\r
-                            leaf group-id {\r
-                                type uint32;\r
-                            }\r
-                            list buckets {\r
-                                uses bucket;\r
+                    case multipart-reply-port-stats-case {\r
+                        container multipart-reply-port-stats {\r
+                            list port-stats {\r
+                                leaf port-no {\r
+                                    type uint32;\r
+                                }\r
+                                leaf rx-packets {\r
+                                    type uint64;\r
+                                }\r
+                                leaf tx-packets {\r
+                                    type uint64;\r
+                                }\r
+                                leaf rx-bytes {\r
+                                    type uint64;\r
+                                }\r
+                                leaf tx-bytes {\r
+                                    type uint64;\r
+                                }\r
+                                leaf rx-dropped {\r
+                                    type uint64;\r
+                                }\r
+                                leaf tx-dropped {\r
+                                    type uint64;\r
+                                }\r
+                                leaf rx-errors {\r
+                                    type uint64;\r
+                                }\r
+                                leaf tx-errors {\r
+                                    type uint64;\r
+                                }\r
+                                leaf rx-frame-err {\r
+                                    type uint64;\r
+                                }\r
+                                leaf rx-over-err {\r
+                                    type uint64;\r
+                                }\r
+                                leaf rx-crc-err {\r
+                                    type uint64;\r
+                                }\r
+                                leaf collisions {\r
+                                    type uint64;\r
+                                }\r
+                                leaf duration-sec {\r
+                                    type uint32;\r
+                                }\r
+                                leaf duration-nsec {\r
+                                    type uint32;\r
+                                }\r
                             }\r
                         }\r
                     }\r
-                    case multipart-reply-group-features {\r
-                        leaf types {\r
-                            type oft:group-types;\r
-                        }\r
-                        leaf capabilities {\r
-                            type oft:group-capabilities;\r
-                        }\r
-                        leaf-list max_groups {\r
-                            type uint32;\r
-                        }\r
-                        //leaf-list actions {\r
-                        //    type ofaction:action-type;\r
-                        //}\r
-                        list actions-list {\r
-                            uses ofaction:action-header;\r
+                    case multipart-reply-queue-case {\r
+                        container multipart-reply-queue {\r
+                            list queue-stats {\r
+                                leaf port-no {\r
+                                    type uint32;\r
+                                }\r
+                                leaf queue-id {\r
+                                    type uint32;\r
+                                }\r
+                                leaf tx-bytes {\r
+                                    type uint64;\r
+                                }\r
+                                leaf tx-packets {\r
+                                    type uint64;\r
+                                }\r
+                                leaf tx-errors {\r
+                                    type uint64;\r
+                                }\r
+                                leaf duration-sec {\r
+                                    type uint32;\r
+                                }\r
+                                leaf duration-nsec {\r
+                                    type uint32;\r
+                                }\r
+                            }\r
                         }\r
                     }\r
-                    case multipart-reply-meter {\r
-                        list meter-stats {\r
-                            leaf meter-id {\r
-                                type uint32;\r
+                    case multipart-reply-group-case {\r
+                        container multipart-reply-group {\r
+                            list group-stats {\r
+                                leaf group-id {\r
+                                    type oft:group-id;\r
+                                }\r
+                                leaf ref-count {\r
+                                    type uint32;\r
+                                }\r
+                                leaf packet-count {\r
+                                    type uint64;\r
+                                }\r
+                                leaf byte-count {\r
+                                    type uint64;\r
+                                }\r
+                                leaf duration-sec {\r
+                                    type uint32;\r
+                                }\r
+                                leaf duration-nsec {\r
+                                    type uint32;\r
+                                }\r
+                                list bucket-stats {\r
+                                    leaf packet-count {\r
+                                        type uint64;\r
+                                    }\r
+                                    leaf byte-count {\r
+                                        type uint64;\r
+                                    }\r
+                                }\r
                             }\r
-                            leaf flow-count {\r
-                                type uint32;\r
+                        }\r
+                    }\r
+                    case multipart-reply-group-desc-case {\r
+                        container multipart-reply-group-desc {\r
+                            list group-desc {\r
+                                leaf type {\r
+                                    type oft:group-type;\r
+                                }\r
+                                leaf group-id {\r
+                                    type oft:group-id;\r
+                                }\r
+                                uses buckets-grouping;\r
                             }\r
-                            leaf packet-in-count {\r
-                                type uint64;\r
+                        }\r
+                    }\r
+                    case multipart-reply-group-features-case {\r
+                        container multipart-reply-group-features {\r
+                            leaf types {\r
+                                type oft:group-types;\r
                             }\r
-                            leaf byte-in-count {\r
-                                type uint64;\r
+                            leaf capabilities {\r
+                                type oft:group-capabilities;\r
                             }\r
-                            leaf duration-sec {\r
+                            leaf-list max_groups {\r
                                 type uint32;\r
                             }\r
-                            leaf duration-nsec {\r
-                                type uint32;\r
+                            leaf-list actions-bitmap {\r
+                                type oft:action-type;\r
                             }\r
-                            list meter-band-stats {\r
-                                leaf packet-band-count {\r
+                        }\r
+                    }\r
+                    case multipart-reply-meter-case {\r
+                        container multipart-reply-meter {\r
+                            list meter-stats {\r
+                                leaf meter-id {\r
+                                    type oft:meter-id;\r
+                                }\r
+                                leaf flow-count {\r
+                                    type uint32;\r
+                                }\r
+                                leaf packet-in-count {\r
                                     type uint64;\r
                                 }\r
-                                leaf byte-band-count {\r
+                                leaf byte-in-count {\r
                                     type uint64;\r
                                 }\r
+                                leaf duration-sec {\r
+                                    type uint32;\r
+                                }\r
+                                leaf duration-nsec {\r
+                                    type uint32;\r
+                                }\r
+                                list meter-band-stats {\r
+                                    leaf packet-band-count {\r
+                                        type uint64;\r
+                                    }\r
+                                    leaf byte-band-count {\r
+                                        type uint64;\r
+                                    }\r
+                                }\r
                             }\r
                         }\r
                     }\r
-                    case multipart-reply-meter-config {\r
-                        list meter-config {\r
-                            leaf flags {\r
-                                type oft:meter-mod-command;\r
-                            }\r
-                            leaf meter-id {\r
-                                type uint32;\r
-                            }\r
-                            list bands {\r
-                                uses meter-band-header;\r
+                    case multipart-reply-meter-config-case {\r
+                        container multipart-reply-meter-config {\r
+                            list meter-config {\r
+                                leaf flags {\r
+                                    type oft:meter-flags;\r
+                                }\r
+                                leaf meter-id {\r
+                                    type oft:meter-id;\r
+                                }\r
+                                list bands {\r
+                                    uses meter-band-header;\r
+                                }\r
                             }\r
                         }\r
                     }\r
-                    case multipart-reply-meter-features {\r
-                        leaf max-meter {\r
-                            type uint32;\r
-                        }\r
-                        leaf band-types {\r
-                            type oft:meter-band-type;\r
-                        }\r
-                        leaf capabilities {\r
-                            type oft:meter-flags;\r
-                        }\r
-                        leaf max-bands {\r
-                            type uint8;\r
-                        }\r
-                        leaf max-color {\r
-                            type uint8;\r
-                        }\r
-                    }\r
-                    case multipart-reply-table-features {\r
-                        list table-features {\r
-                            leaf table-id {\r
-                                type uint8;\r
+                    case multipart-reply-meter-features-case {\r
+                        container multipart-reply-meter-features {\r
+                            leaf max-meter {\r
+                                type uint32;\r
                             }\r
-                            leaf name {\r
-                                type string;\r
+                            leaf band-types {\r
+                                type oft:meter-band-type-bitmap;\r
                             }\r
-                            leaf metadata-match {\r
-                                type binary;\r
+                            leaf capabilities {\r
+                                type oft:meter-flags;\r
                             }\r
-                            leaf metadata-write {\r
-                                type binary;\r
+                            leaf max-bands {\r
+                                type uint8;\r
                             }\r
-                            leaf config {\r
-                                type oft:port-config;\r
-                            } \r
-                            leaf max-entries {\r
-                                type uint32;\r
+                            leaf max-color {\r
+                                type uint8;\r
                             }\r
                         }\r
                     }\r
-                    case multipart-reply-port-desc {\r
-                        list ports {\r
-                            uses port;\r
+                    case multipart-reply-table-features-case {\r
+                        container multipart-reply-table-features {\r
+                            list table-features {\r
+                                leaf table-id {\r
+                                    type uint8;\r
+                                }\r
+                                leaf name {\r
+                                    type string;\r
+                                }\r
+                                leaf metadata-match {\r
+                                    type binary;\r
+                                }\r
+                                leaf metadata-write {\r
+                                    type binary;\r
+                                }\r
+                                leaf config {\r
+                                    type oft:table-config;\r
+                                } \r
+                                leaf max-entries {\r
+                                    type uint32;\r
+                                }\r
+                                uses table-features-properties-grouping;\r
+                            }\r
                         }\r
                     }\r
-                    case multipart-reply-experimenter {\r
-                        leaf experimenter {\r
-                            type uint32;\r
+                    case multipart-reply-port-desc-case {\r
+                        container multipart-reply-port-desc {\r
+                            list ports {\r
+                                uses port-grouping;\r
+                            }\r
                         }\r
-                        leaf exp-type {\r
-                            type uint32;\r
+                    }\r
+                    case multipart-reply-experimenter-case {\r
+                        container multipart-reply-experimenter {\r
+                            // empty body - used for experimenter augmentation\r
                         }\r
                     }\r
                 }\r
             } \r
             /* Barrier messages. */\r
             grouping barrier-request {\r
-                // reference "OFPT_BARRIER_REQUEST message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_BARRIER_REQUEST message in Openflow Switch 1.3 Spec";\r
                 /* Controller/switch message */\r
                 uses ofHeader;\r
             } \r
             grouping barrier-reply {\r
-                // reference "OFPT_BARRIER_REPLY message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_BARRIER_REPLY message in Openflow Switch 1.3 Spec";\r
                 /* Controller/switch message */\r
                 uses ofHeader;\r
             } \r
         /* Queue Configuration messages. */\r
             grouping queue-get-config-request {\r
-                // reference "OFPT_QUEUE_GET_CONFIG_REQUEST message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_QUEUE_GET_CONFIG_REQUEST message in Openflow Switch 1.3 Spec";\r
                 /* Controller/switch message */\r
                 \r
                 uses ofHeader;\r
@@ -936,7 +1074,7 @@ module openflow-protocol {
                 }\r
             } \r
             grouping queue-get-config-reply {\r
-                // reference "OFPT_QUEUE_GET_CONFIG_REPLY message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_QUEUE_GET_CONFIG_REPLY message in Openflow Switch 1.3 Spec";\r
                 /* Controller/switch message */\r
 \r
                 uses ofHeader;\r
@@ -947,7 +1085,7 @@ module openflow-protocol {
                 list queues {\r
                     uses packet-queue;\r
                 }\r
-            } \r
+            }\r
             grouping packet-queue {\r
                 leaf queue-id {\r
                     type oft:queue-id;\r
@@ -955,18 +1093,22 @@ module openflow-protocol {
                 leaf port {\r
                     type oft:port-number;\r
                 }\r
-                list properties {\r
-                    uses queue-property-header;\r
-                }\r
+                uses queue-property-header;\r
+            }\r
+            container queue-prop-container {\r
+                uses queue-property-header;\r
             }\r
             grouping queue-property-header {\r
-                leaf property {\r
-                    type oft:queue-property;\r
+                list queue-property {\r
+                    config false;\r
+                    leaf property {\r
+                        type oft:queue-properties;\r
+                    }\r
                 }\r
             }\r
             /* Controller role change request messages. */\r
             grouping role-request {\r
-                // reference "OFPT_ROLE_REQUEST message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_ROLE_REQUEST message in Openflow Switch 1.3 Spec";\r
                 /* Controller/switch message */\r
                 \r
                 uses ofHeader;\r
@@ -979,7 +1121,7 @@ module openflow-protocol {
                 }\r
             } \r
             grouping role-reply {\r
-                // reference "OFPT_ROLE_REPLY message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_ROLE_REPLY message in Openflow Switch 1.3 Spec";\r
                 /* Controller/switch message */\r
 \r
                 uses ofHeader;\r
@@ -993,17 +1135,27 @@ module openflow-protocol {
             } \r
             /* Asynchronous message configuration. */\r
             grouping get-async-request {\r
-                // reference "OFPT_GET_ASYNC_REQUEST message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_GET_ASYNC_REQUEST message in Openflow Switch 1.3 Spec";\r
                 /* Controller/switch message */\r
 \r
-                uses ofHeader;                \r
+                uses ofHeader;\r
             } \r
             grouping get-async-reply {\r
-                // reference "OFPT_GET_ASYNC_REPLY message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_GET_ASYNC_REPLY message in Openflow Switch 1.3 Spec";\r
                 /* Controller/switch message */\r
 \r
                 uses ofHeader;\r
+                uses async-body-grouping;\r
+            } \r
+            grouping set-async {\r
+                reference "OFPT_SET_ASYNC message in Openflow Switch 1.3 Spec";\r
+                /* Controller/switch message */\r
                 \r
+                uses ofHeader;\r
+                uses async-body-grouping;\r
+            }\r
+            \r
+            grouping async-body-grouping {\r
                 list packet-in-mask {\r
                     leaf-list mask {\r
                         type oft:packet-in-reason;\r
@@ -1019,26 +1171,10 @@ module openflow-protocol {
                         type oft:flow-removed-reason;\r
                     }\r
                 }\r
-            } \r
-            grouping set-async {\r
-                // reference "OFPT_SET_ASYNC message in Openflow Switch 1.3 Spec"\r
-                /* Controller/switch message */\r
-                \r
-                uses ofHeader;\r
-                \r
-                leaf-list packet-in-mask {\r
-                    type oft:packet-in-reason;\r
-                }\r
-                leaf-list port-status-mask {\r
-                    type oft:port-reason;\r
-                }\r
-                leaf-list flow-removed-mask {\r
-                    type oft:flow-removed-reason;\r
-                }\r
-            } \r
+            }\r
             /* Meters and rate limiters configuration messages. */\r
             grouping meter-mod {\r
-                // reference "OFPT_METER_MOD message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_METER_MOD message in Openflow Switch 1.3 Spec";\r
                 /* Controller/switch message */\r
 \r
                 uses ofHeader;\r
@@ -1048,30 +1184,36 @@ module openflow-protocol {
                 } \r
                 leaf flags {\r
                     type oft:meter-flags;\r
-                }            \r
+                }\r
                 leaf meter-id {\r
                     type oft:meter-id;\r
-                }   \r
+                }\r
                 list bands {\r
                     uses meter-band-header;\r
                 }\r
-            } \r
+            }\r
             \r
+            container meter-band-container {\r
+                uses meter-band-header;\r
+            }\r
             grouping meter-band-header {\r
                 choice meter-band {\r
-                    case meter-band-drop {\r
-                        uses meter-band-commons;\r
+                    case meter-band-drop-case {\r
+                        container meter-band-drop {\r
+                            uses meter-band-commons;\r
+                        }\r
                     }\r
-                    case meter-band-dscp-remark {\r
-                        uses meter-band-commons;\r
-                        leaf prec-level {\r
-                            type uint8;\r
+                    case meter-band-dscp-remark-case {\r
+                        container meter-band-dscp-remark {\r
+                            uses meter-band-commons;\r
+                            leaf prec-level {\r
+                                type uint8;\r
+                            }\r
                         }\r
                     }\r
-                    case meter-band-experimenter {\r
-                        uses meter-band-commons;\r
-                        leaf experimenter {\r
-                            type uint32;\r
+                    case meter-band-experimenter-case {\r
+                        container meter-band-experimenter {\r
+                            uses meter-band-commons;\r
                         }\r
                     }\r
                 }\r
@@ -1089,36 +1231,34 @@ module openflow-protocol {
                 }\r
             }\r
 \r
-\r
             /* Immutable messages. */\r
             notification hello-message {\r
                 uses hello;\r
-                // reference "OFPT_HELLO message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_HELLO message in Openflow Switch 1.3 Spec";\r
                 \r
                 /* Symmetric message */\r
             }\r
             notification error-message {\r
                 uses error;\r
-                // reference "OFPT_ERROR message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_ERROR message in Openflow Switch 1.3 Spec";\r
                 \r
                 /* Symmetric message */\r
             }\r
             notification echo-request-message {\r
                 uses echo-request;\r
-                // reference "OFPT_ECHO_REQUEST message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_ECHO_REQUEST message in Openflow Switch 1.3 Spec";\r
                 \r
                 /* Symmetric message */\r
             }\r
             notification experimenter-message {\r
                 uses experimenter;\r
-                // reference "OFPT_EXPERIMENTER message in Openflow Switch 1.3 Spec"\r
+                reference "OFPT_EXPERIMENTER message in Openflow Switch 1.3 Spec";\r
                 // TODO:: does switch send this when understood experimenter msg from lib?\r
                 /* Symmetric message */\r
             }\r
     // # Notification and RPCs\r
         /* Symmetric RPC. */\r
             rpc echo {\r
-                // reference "OFPT_ECHO_REQUEST message in Openflow Switch 1.3 Spec"\r
                 input {\r
                     uses echo-request;\r
                 }\r
@@ -1129,21 +1269,18 @@ module openflow-protocol {
             }\r
             \r
             rpc echo-reply {\r
-                // reference "OFPT_ECHO_REQUEST message in Openflow Switch 1.3 Spec"\r
                 input {\r
                     uses echo-reply;\r
                 }\r
             }\r
             \r
             rpc hello {\r
-                // reference "OFPT_HELLO message in Openflow Switch 1.3 Spec"\r
                 input {\r
                     uses hello;\r
                 }\r
             }\r
             \r
             rpc experimenter {\r
-                // reference "OFPT_EXPERIMENTER message in Openflow Switch 1.3 Spec"\r
                 input {\r
                     uses experimenter;\r
                 }\r
@@ -1151,7 +1288,6 @@ module openflow-protocol {
 \r
         /* Switch configuration messages. */\r
             rpc get-features {\r
-                // reference "OFPT_FEATURES_REQUEST message in Openflow Switch 1.3 Spec"\r
                 input {\r
                     uses features-request;\r
                 }\r
@@ -1162,7 +1298,6 @@ module openflow-protocol {
             }\r
             \r
             rpc get-config {\r
-                // reference "OFPT_GET_CONFIG_REQUEST message in Openflow Switch 1.3 Spec"\r
                 input {\r
                     uses get-config-request;\r
                 }\r
@@ -1173,7 +1308,6 @@ module openflow-protocol {
             }\r
             \r
             rpc set-config {\r
-                // reference "OFPT_SET_CONFIG message in Openflow Switch 1.3 Spec"\r
                 input {\r
                     uses set-config;\r
                 }   \r
@@ -1182,19 +1316,16 @@ module openflow-protocol {
         /* Asynchronous messages. */\r
             notification packet-in-message {\r
                 uses packet-in;\r
-                // reference "OFPT_PACKET_IN message in Openflow Switch 1.3 Spec"\r
                 \r
              /* Async message */\r
             }\r
             notification flow-removed-message {\r
                 uses flow-removed;\r
-                // reference "OFPT_FLOW_REMOVED message in Openflow Switch 1.3 Spec"\r
                 \r
                 /* Async message */\r
             } \r
             notification port-status-message {\r
                 uses port-status;\r
-                // reference "OFPT_PORT_STATUS message in Openflow Switch 1.3 Spec"\r
                 \r
             } /* Async message */\r
 \r
@@ -1202,50 +1333,45 @@ module openflow-protocol {
             rpc packet-out {\r
                 input {\r
                     uses packet-out;\r
-                    // reference "OFPT_PACKET_OUT message in Openflow Switch 1.3 Spec"\r
                 }\r
                 /* Controller/switch message */\r
             } \r
             rpc flow-mod {\r
                 input {\r
                     uses flow-mod;\r
-                    // reference "OFPT_FLOW_MOD message in Openflow Switch 1.3 Spec"\r
                 }\r
                 /* Controller/switch message */\r
             } \r
             rpc group-mod {\r
                 input {\r
                     uses group-mod;\r
-                    // reference "OFPT_GROUP_MOD message in Openflow Switch 1.3 Spec"\r
                 }\r
                 /* Controller/switch message */\r
             } \r
             rpc port-mod {\r
                 input {\r
                     uses port-mod;\r
-                    // reference "OFPT_PORT_MOD message in Openflow Switch 1.3 Spec"\r
                 }\r
             } /* Controller/switch message */\r
             \r
             rpc table-mod {\r
                 input {\r
                     uses table-mod;\r
-                    // reference "OFPT_TABLE_MOD message in Openflow Switch 1.3 Spec"\r
                 }\r
             } /* Controller/switch message */\r
 \r
         /* Multipart messages. */\r
-            //FIXME: Arent this wire protocol specific?\r
 \r
-            notification multipart-request-message {\r
-                uses multipart-request;\r
-                // reference "OFPT_MULTIPART_REQUEST message in Openflow Switch 1.3 Spec"\r
-                \r
-            } /* Controller/switch message */\r
+            rpc multipart-request {\r
+                input {\r
+                    uses multipart-request;\r
+                }\r
+            }\r
+\r
+             /* Controller/switch message */\r
             notification multipart-reply-message {\r
                 uses multipart-reply;\r
-                // reference "OFPT_MULTIPART_REPLY message in Openflow Switch 1.3 Spec"\r
-                \r
+                // notification because of multiple following responses\r
             } /* Controller/switch message */\r
             \r
 \r
@@ -1253,22 +1379,18 @@ module openflow-protocol {
             rpc barrier {\r
                 input {\r
                     uses barrier-request;\r
-                    // reference "OFPT_BARRIER_REQUEST message in Openflow Switch 1.3 Spec"\r
                 }\r
                 output {\r
                     uses barrier-reply;\r
-                    // reference "OFPT_BARRIER_REPLY message in Openflow Switch 1.3 Spec"\r
                 }\r
             }\r
         /* Queue Configuration messages. */\r
             rpc get-queue-config {\r
                 input {\r
                     uses queue-get-config-request;\r
-                    // reference "OFPT_QUEUE_GET_CONFIG_REQUEST message in Openflow Switch 1.3 Spec"\r
                 }\r
                 output {\r
                     uses queue-get-config-reply;\r
-                    // reference "OFPT_QUEUE_GET_CONFIG_REPLY message in Openflow Switch 1.3 Spec"\r
                 }\r
             } \r
 \r
@@ -1276,11 +1398,9 @@ module openflow-protocol {
             rpc role-request {\r
                 input {\r
                     uses role-request;\r
-                    // reference "OFPT_ROLE_REQUEST message in Openflow Switch 1.3 Spec"\r
                 }\r
                 output {\r
                     uses role-reply;\r
-                    // reference "OFPT_ROLE_REPLY message in Openflow Switch 1.3 Spec"\r
                 }\r
             } /* Controller/switch message */\r
             \r
@@ -1288,18 +1408,15 @@ module openflow-protocol {
             rpc get-async {\r
                 input {\r
                     uses get-async-request;\r
-                    // reference "OFPT_GET_ASYNC_REQUEST message in Openflow Switch 1.3 Spec"\r
                 }\r
                 output {\r
                     uses get-async-reply;\r
-                    // reference "OFPT_GET_ASYNC_REPLY message in Openflow Switch 1.3 Spec"\r
                 }\r
             } \r
              /* Controller/switch message */\r
             rpc set-async {\r
                 input { \r
                     uses set-async;\r
-                // reference "OFPT_SET_ASYNC message in Openflow Switch 1.3 Spec"\r
                 }\r
                 \r
             } \r
@@ -1307,7 +1424,6 @@ module openflow-protocol {
             rpc meter-mod {\r
                 input {\r
                     uses meter-mod;\r
-                    // reference "OFPT_METER_MOD message in Openflow Switch 1.3 Spec"\r
                 }\r
             } /* Controller/switch message */\r
 }
\ No newline at end of file