Mass replace CRLF->LF
[openflowjava.git] / openflow-protocol-api / src / main / yang / openflow-protocol.yang
index 32070d14cf900c973825c3fe47985df02d7e7e3a..9330fac6fd5fbdd4f9f0305d7cbc8e5b33ca78a3 100644 (file)
-/*\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
-    import ietf-yang-types {prefix yang;}\r
-    \r
-    import openflow-types {prefix oft;}\r
-    import openflow-extensible-match { prefix oxm;}\r
-    import openflow-instruction { prefix ofinstruction;}\r
-    import openflow-action {prefix ofaction;}\r
-\r
-    revision "2013-07-31" {\r
-        description "OpenFlow 1.3 - protocol objects model";\r
-    }\r
-\r
-    // Generic Structures\r
-        grouping port-grouping {\r
-            reference "ofp_port";\r
-            leaf port-no {\r
-                type uint32;\r
-            }\r
-            leaf hw-addr {\r
-                type yang:mac-address;\r
-            }\r
-            leaf name {\r
-                type string;\r
-            }\r
-            leaf config {\r
-                description "Bitmap of OFPPC_* flags.";\r
-                type oft:port-config;\r
-            }\r
-            leaf state {\r
-                description "Bitmap of OFPPS_* flags.";\r
-                type oft:port-state;\r
-            }\r
-            leaf current-features {\r
-                description "Current features.";\r
-                type oft:port-features;\r
-            }\r
-            leaf advertised-features {\r
-                description "Features being advertised by the port.";\r
-                type oft:port-features;\r
-            }\r
-            leaf supported-features {\r
-                description "Features supported by the port.";\r
-                type oft:port-features;\r
-            }\r
-            leaf peer-features {\r
-                description "Features advertised by peer.";\r
-                type oft:port-features; \r
-            }\r
-            leaf curr-speed {\r
-                description "Current port bitrate in kbps.";\r
-                type uint32;\r
-                units "kbps";\r
-            }\r
-            leaf max-speed {\r
-                description "Max port bitrate in kbps";\r
-                type uint32;\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 buckets-grouping {\r
-                list buckets-list {\r
-                    uses bucket-grouping;\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-grouping;\r
-        }\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
-    // # MESSAGE Structures\r
-        /* Immutable messages. */\r
-            grouping ofHeader {\r
-                reference "ofp_header struct in Openflow Switch 1.3 Spec";\r
-                leaf version {\r
-                    type uint8;\r
-                    description "OpenFlow version";\r
-                }\r
-                leaf xid {\r
-                    type uint32;\r
-                    description "Transaction ID";\r
-                }\r
-            }\r
-            grouping ofHelloElementHeader {\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
-                /* Symmetric message */\r
-                uses ofHeader;\r
-                \r
-                list elements {\r
-                    uses ofHelloElementHeader;\r
-                    \r
-                    leaf-list version-bitmap {\r
-                        type boolean;\r
-                    }\r
-                }\r
-            }\r
-            grouping error {\r
-                reference "OFPT_ERROR message in Openflow Switch 1.3 Spec";\r
-                /* Symmetric message */\r
-                uses ofHeader;\r
-                \r
-                leaf 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
-                /* Symmetric message */\r
-                uses ofHeader;\r
-                \r
-                leaf data {\r
-                    type binary;\r
-                }\r
-            }\r
-            grouping echo-reply {\r
-                reference "OFPT_ECHO_REPLY message in Openflow Switch 1.3 Spec";\r
-                /* Symmetric message */\r
-                uses ofHeader;\r
-                \r
-                leaf data {\r
-                    type binary;\r
-                }\r
-            }\r
-            grouping experimenter {\r
-                reference "OFPT_EXPERIMENTER message in Openflow Switch 1.3 Spec";\r
-                /* Symmetric message */\r
-                uses ofHeader;\r
-                \r
-                leaf experimenter {\r
-                    type oft:experimenter-id;\r
-                }\r
-                leaf exp_type {\r
-                    type uint32;\r
-                }\r
-            }\r
-        /* Switch configuration messages. */\r
-            grouping features-request {\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
-                /* Controller/switch message */\r
-                uses ofHeader;\r
-                \r
-                leaf datapathId {\r
-                    type uint64;\r
-                }\r
-                leaf buffers {\r
-                    type uint32;\r
-                }\r
-                leaf tables {\r
-                    type uint8;\r
-                }\r
-                leaf auxiliaryId {\r
-                    type uint8;\r
-                }\r
-                leaf capabilities {\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
-                /* 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
-                /* Controller/switch message */\r
-                uses ofHeader;\r
-                \r
-                leaf flags {\r
-                    type oft:switch-config-flag;\r
-                }\r
-                leaf miss-send-len {\r
-                    type uint16;\r
-                }\r
-            }\r
-            grouping set-config {\r
-                reference "OFPT_SET_CONFIG message in Openflow Switch 1.3 Spec";\r
-                /* Controller/switch message */\r
-                \r
-                uses ofHeader;\r
-                \r
-                leaf flags {\r
-                    type oft:switch-config-flag;\r
-                }\r
-                leaf miss-send-len {\r
-                    type uint16;\r
-                }\r
-            }\r
-        /* Asynchronous messages. */\r
-            grouping packet-in {\r
-                reference "OFPT_PACKET_IN message in Openflow Switch 1.3 Spec";\r
-                /* Async message */\r
-                \r
-                uses ofHeader;\r
-                \r
-                leaf buffer-id {\r
-                    // ID assigned by datapath.\r
-                    type uint32;\r
-                }\r
-                leaf total-len {\r
-                    // Full length of frame.\r
-                    type uint16;\r
-                }\r
-                leaf reason {\r
-                    // Reason packet is being sent (one of OFPR_*) \r
-                    type oft:packet-in-reason;\r
-                }\r
-                leaf table-id {\r
-                    // ID of the table that was looked up\r
-                    type oft:table-id;\r
-                }\r
-                leaf cookie {\r
-                    // Cookie of the flow entry that was looked up.\r
-                    type uint64;\r
-                }\r
-                uses oxm:match-grouping;\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
-                /* Async message */\r
-                uses ofHeader;\r
-                \r
-                leaf cookie {\r
-                    type uint64;\r
-                }\r
-                leaf priority {\r
-                    type uint16;\r
-                }\r
-                leaf reason {\r
-                    type oft:flow-removed-reason;\r
-                }\r
-                leaf table-id {\r
-                    type oft:table-id;\r
-                }\r
-                leaf duration-sec {\r
-                    type uint32;\r
-                }\r
-                leaf duration-nsec {\r
-                    type uint32;\r
-                }\r
-                leaf idle-timeout {\r
-                    type uint16;\r
-                }\r
-                leaf hard-timeout {\r
-                    type uint16;\r
-                }\r
-                leaf packet-count {\r
-                    type uint64;\r
-                }\r
-                leaf byte-count {\r
-                    type uint64;\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
-                \r
-                uses ofHeader;\r
-                \r
-                uses port-grouping;\r
-                \r
-                leaf reason {\r
-                    type oft:port-reason;\r
-                }\r
-            }\r
-        /* Controller command messages. */\r
-            grouping packet-out {\r
-                reference "OFPT_PACKET_OUT message in Openflow Switch 1.3 Spec";\r
-                /* Controller/switch message */\r
-                \r
-                uses ofHeader;\r
-                \r
-                uses ofaction:actions-grouping;\r
-                \r
-                leaf data {\r
-                    type binary;\r
-                }\r
-                leaf buffer-id {\r
-                    type uint32;\r
-                }\r
-                leaf in-port {\r
-                    type oft:port-number;\r
-                }\r
-            } \r
-            grouping flow-mod {\r
-                reference "OFPT_FLOW_MOD message in Openflow Switch 1.3 Spec";\r
-                /* Controller/switch message */\r
-                \r
-                uses ofHeader;\r
-                \r
-                leaf cookie {\r
-                    type uint64;\r
-                }\r
-                leaf cookie-mask {\r
-                    type uint64;\r
-                }\r
-                leaf table-id {\r
-                    type oft:table-id;\r
-                }\r
-                leaf command {\r
-                    type oft:flow-mod-command;\r
-                }\r
-                leaf idle-timeout {\r
-                    type uint16;\r
-                }\r
-                leaf hard-timeout {\r
-                    type uint16;\r
-                }\r
-                leaf priority {\r
-                    type uint16;\r
-                }\r
-                leaf buffer-id {\r
-                    type uint32;\r
-                }\r
-                leaf out-port {\r
-                    type oft:port-number;\r
-                }\r
-                leaf out-group {\r
-                    type uint32;\r
-                }\r
-                leaf flags {\r
-                    type oft:flow-mod-flags;\r
-                }\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
-                /* Controller/switch message */\r
-                \r
-                uses ofHeader;\r
-                \r
-                leaf command {\r
-                    type oft:group-mod-command;\r
-                }\r
-                leaf type {\r
-                    type oft:group-type;\r
-                }\r
-                leaf group-id {\r
-                    type oft:group-id;\r
-                }\r
-                \r
-                uses buckets-grouping;\r
-            }\r
-            \r
-            grouping port-mod {\r
-                reference "OFPT_PORT_MOD message in Openflow Switch 1.3 Spec";\r
-                /* Controller/switch message */\r
-\r
-                uses ofHeader;\r
-                \r
-                leaf port-no {\r
-                    type oft:port-number;\r
-                }\r
-                leaf hw-address {\r
-                    type yang:mac-address;\r
-                }       \r
-                leaf config {\r
-                    type oft:port-config;\r
-                }   \r
-                leaf mask {\r
-                    type oft:port-config;\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
-                /* Controller/switch message */\r
-\r
-                uses ofHeader;\r
-                \r
-                leaf table-id {\r
-                    type oft:table-id;\r
-                }\r
-                leaf config {\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
-                /* 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-request-body {\r
-                    case multipart-request-desc-case {\r
-                        container multipart-request-desc {\r
-                            leaf empty {\r
-                                type empty;\r
-                            }\r
-                        }\r
-                    }\r
-                    case multipart-request-flow-case {\r
-                        container 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
-                            uses oxm:match-grouping;\r
-                            \r
-                            // OF1.0 structures\r
-                            uses oxm:match-v10-grouping;\r
-                        }\r
-                    }\r
-                    case multipart-request-aggregate-case {\r
-                        container 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
-                            uses oxm:match-grouping;\r
-                            \r
-                            // OF1.0 structures\r
-                            uses oxm:match-v10-grouping;\r
-                        }\r
-                    }\r
-                    case multipart-request-table-case {\r
-                        container multipart-request-table {\r
-                            leaf empty {\r
-                                type empty;\r
-                            }\r
-                        }\r
-                    }\r
-                    case multipart-request-port-stats-case {\r
-                        container multipart-request-port-stats {\r
-                            leaf port-no {\r
-                                type uint32;\r
-                            }\r
-                        }\r
-                    }\r
-                    case multipart-request-queue-case {\r
-                        container multipart-request-queue {\r
-                            leaf port-no {\r
-                                type uint32;\r
-                            }\r
-                            leaf queue-id {\r
-                                type uint32;\r
-                            }\r
-                        }\r
-                    }\r
-                    case multipart-request-group-case {\r
-                        container multipart-request-group {\r
-                            leaf group-id {\r
-                                type oft:group-id;\r
-                            }\r
-                        }\r
-                    }\r
-                    case multipart-request-group-desc-case {\r
-                        container multipart-request-group-desc {\r
-                            leaf empty {\r
-                                type empty;\r
-                            }\r
-                        }\r
-                    }\r
-                    case multipart-request-group-features-case {\r
-                        container multipart-request-group-features {\r
-                            leaf empty {\r
-                                type empty;\r
-                            }\r
-                        }\r
-                    }\r
-                    case multipart-request-meter-case {\r
-                        container multipart-request-meter {\r
-                            leaf meter-id {\r
-                                type oft:meter-id;\r
-                            }\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
-                        }\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-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
-                        }\r
-                    }\r
-                    case multipart-request-port-desc-case {\r
-                        container multipart-request-port-desc {\r
-                            leaf empty {\r
-                                type empty;\r
-                            }\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 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
-                            }\r
-                        }\r
-                    }\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 flow-count {\r
-                                type uint32;\r
-                            }\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 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-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-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-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
-                        }\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
-                        }\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 capabilities {\r
-                                type oft:group-capabilities;\r
-                            }\r
-                            leaf-list max_groups {\r
-                                type uint32;\r
-                            }\r
-                            leaf-list actions-bitmap {\r
-                                type oft:action-type;\r
-                            }\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-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-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-case {\r
-                        container multipart-reply-meter-features {\r
-                            leaf max-meter {\r
-                                type uint32;\r
-                            }\r
-                            leaf band-types {\r
-                                type oft:meter-band-type-bitmap;\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
-                    }\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-port-desc-case {\r
-                        container multipart-reply-port-desc {\r
-                            list ports {\r
-                                uses port-grouping;\r
-                            }\r
-                        }\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
-                /* Controller/switch message */\r
-                uses ofHeader;\r
-            } \r
-            grouping barrier-reply {\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
-                /* Controller/switch message */\r
-                \r
-                uses ofHeader;\r
-                \r
-                leaf port {\r
-                    type oft:port-number;\r
-                }\r
-            } \r
-            grouping queue-get-config-reply {\r
-                reference "OFPT_QUEUE_GET_CONFIG_REPLY message in Openflow Switch 1.3 Spec";\r
-                /* Controller/switch message */\r
-\r
-                uses ofHeader;\r
-                \r
-                leaf port {\r
-                    type oft:port-number;\r
-                }\r
-                list queues {\r
-                    uses packet-queue;\r
-                }\r
-            }\r
-            grouping packet-queue {\r
-                leaf queue-id {\r
-                    type oft:queue-id;\r
-                }\r
-                leaf port {\r
-                    type oft:port-number;\r
-                }\r
-                uses queue-property-header;\r
-            }\r
-            container queue-prop-container {\r
-                uses queue-property-header;\r
-            }\r
-            grouping queue-property-header {\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
-                /* Controller/switch message */\r
-                \r
-                uses ofHeader;\r
-                \r
-                leaf role {\r
-                    type oft:controller-role;\r
-                }\r
-                leaf generation-id {\r
-                    type uint64;\r
-                }\r
-            } \r
-            grouping role-reply {\r
-                reference "OFPT_ROLE_REPLY message in Openflow Switch 1.3 Spec";\r
-                /* Controller/switch message */\r
-\r
-                uses ofHeader;\r
-                \r
-                leaf role {\r
-                    type oft:controller-role;\r
-                }\r
-                leaf generation-id {\r
-                    type uint64;\r
-                }\r
-            } \r
-            /* Asynchronous message configuration. */\r
-            grouping get-async-request {\r
-                reference "OFPT_GET_ASYNC_REQUEST message in Openflow Switch 1.3 Spec";\r
-                /* Controller/switch message */\r
-\r
-                uses ofHeader;\r
-            } \r
-            grouping get-async-reply {\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
-                    }\r
-                }\r
-                list port-status-mask {\r
-                    leaf-list mask {\r
-                        type oft:port-reason;\r
-                    }\r
-                }\r
-                list flow-removed-mask {\r
-                    leaf-list 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
-                /* Controller/switch message */\r
-\r
-                uses ofHeader;\r
-                \r
-                leaf command {\r
-                    type oft:meter-mod-command;\r
-                } \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
-            container meter-band-container {\r
-                uses meter-band-header;\r
-            }\r
-            grouping meter-band-header {\r
-                choice meter-band {\r
-                    case meter-band-drop-case {\r
-                        container meter-band-drop {\r
-                            uses meter-band-commons;\r
-                        }\r
-                    }\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-case {\r
-                        container meter-band-experimenter {\r
-                            uses meter-band-commons;\r
-                        }\r
-                    }\r
-                }\r
-            }\r
-            \r
-            grouping meter-band-commons {\r
-                leaf type {\r
-                    type oft:meter-band-type;\r
-                }\r
-                leaf rate {\r
-                    type uint32;\r
-                }\r
-                leaf burst-size {\r
-                    type uint32;\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
-                \r
-                /* Symmetric message */\r
-            }\r
-            notification error-message {\r
-                uses error;\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
-                \r
-                /* Symmetric message */\r
-            }\r
-            notification experimenter-message {\r
-                uses experimenter;\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
-                input {\r
-                    uses echo-request;\r
-                }\r
-                /* Controller/switch message */\r
-                output {\r
-                    uses echo-reply;\r
-                }\r
-            }\r
-            \r
-            rpc echo-reply {\r
-                input {\r
-                    uses echo-reply;\r
-                }\r
-            }\r
-            \r
-            rpc hello {\r
-                input {\r
-                    uses hello;\r
-                }\r
-            }\r
-            \r
-            rpc experimenter {\r
-                input {\r
-                    uses experimenter;\r
-                }\r
-            }\r
-\r
-        /* Switch configuration messages. */\r
-            rpc get-features {\r
-                input {\r
-                    uses features-request;\r
-                }\r
-                /* Controller/switch message */\r
-                output {\r
-                    uses features-reply;\r
-                }\r
-            }\r
-            \r
-            rpc get-config {\r
-                input {\r
-                    uses get-config-request;\r
-                }\r
-                output {\r
-                    uses get-config-reply;\r
-                }\r
-                /* Controller/switch message */\r
-            }\r
-            \r
-            rpc set-config {\r
-                input {\r
-                    uses set-config;\r
-                }   \r
-                /* Controller/switch message */\r
-            }\r
-        /* Asynchronous messages. */\r
-            notification packet-in-message {\r
-                uses packet-in;\r
-                \r
-             /* Async message */\r
-            }\r
-            notification flow-removed-message {\r
-                uses flow-removed;\r
-                \r
-                /* Async message */\r
-            } \r
-            notification port-status-message {\r
-                uses port-status;\r
-                \r
-            } /* Async message */\r
-\r
-        /* Controller command messages. */\r
-            rpc packet-out {\r
-                input {\r
-                    uses packet-out;\r
-                }\r
-                /* Controller/switch message */\r
-            } \r
-            rpc flow-mod {\r
-                input {\r
-                    uses flow-mod;\r
-                }\r
-                /* Controller/switch message */\r
-            } \r
-            rpc group-mod {\r
-                input {\r
-                    uses group-mod;\r
-                }\r
-                /* Controller/switch message */\r
-            } \r
-            rpc port-mod {\r
-                input {\r
-                    uses port-mod;\r
-                }\r
-            } /* Controller/switch message */\r
-            \r
-            rpc table-mod {\r
-                input {\r
-                    uses table-mod;\r
-                }\r
-            } /* Controller/switch message */\r
-\r
-        /* Multipart messages. */\r
-\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
-                // notification because of multiple following responses\r
-            } /* Controller/switch message */\r
-            \r
-\r
-            /* Barrier messages. */\r
-            rpc barrier {\r
-                input {\r
-                    uses barrier-request;\r
-                }\r
-                output {\r
-                    uses barrier-reply;\r
-                }\r
-            }\r
-        /* Queue Configuration messages. */\r
-            rpc get-queue-config {\r
-                input {\r
-                    uses queue-get-config-request;\r
-                }\r
-                output {\r
-                    uses queue-get-config-reply;\r
-                }\r
-            } \r
-\r
-        /* Controller role change request messages. */\r
-            rpc role-request {\r
-                input {\r
-                    uses role-request;\r
-                }\r
-                output {\r
-                    uses role-reply;\r
-                }\r
-            } /* Controller/switch message */\r
-            \r
-        /* Asynchronous message configuration. */\r
-            rpc get-async {\r
-                input {\r
-                    uses get-async-request;\r
-                }\r
-                output {\r
-                    uses get-async-reply;\r
-                }\r
-            } \r
-             /* Controller/switch message */\r
-            rpc set-async {\r
-                input { \r
-                    uses set-async;\r
-                }\r
-                \r
-            } \r
-        /* Meters and rate limiters configuration messages. */\r
-            rpc meter-mod {\r
-                input {\r
-                    uses meter-mod;\r
-                }\r
-            } /* Controller/switch message */\r
+/*
+ * 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-protocol {
+    namespace "urn:opendaylight:openflow:protocol";
+    prefix "ofproto";
+
+    import ietf-yang-types {prefix yang;}
+    
+    import openflow-types {prefix oft;}
+    import openflow-extensible-match { prefix oxm;}
+    import openflow-instruction { prefix ofinstruction;}
+    import openflow-action {prefix ofaction;}
+
+    revision "2013-07-31" {
+        description "OpenFlow 1.3 - protocol objects model";
+    }
+
+    // Generic Structures
+        grouping port-grouping {
+            reference "ofp_port";
+            leaf port-no {
+                type uint32;
+            }
+            leaf hw-addr {
+                type yang:mac-address;
+            }
+            leaf name {
+                type string;
+            }
+            leaf config {
+                description "Bitmap of OFPPC_* flags.";
+                type oft:port-config;
+            }
+            leaf state {
+                description "Bitmap of OFPPS_* flags.";
+                type oft:port-state;
+            }
+            leaf current-features {
+                description "Current features.";
+                type oft:port-features;
+            }
+            leaf advertised-features {
+                description "Features being advertised by the port.";
+                type oft:port-features;
+            }
+            leaf supported-features {
+                description "Features supported by the port.";
+                type oft:port-features;
+            }
+            leaf peer-features {
+                description "Features advertised by peer.";
+                type oft:port-features; 
+            }
+            leaf curr-speed {
+                description "Current port bitrate in kbps.";
+                type uint32;
+                units "kbps";
+            }
+            leaf max-speed {
+                description "Max port bitrate in kbps";
+                type uint32;
+                units "kbps";
+            }
+
+            // OF1.0 structures
+            leaf config-v10 {
+                type oft:port-config-v10;
+            }
+            leaf state-v10 { 
+                type oft:port-state-v10;
+            }
+            leaf current-features-v10 {
+                description "Current features.";
+                type oft:port-features-v10;
+            }
+            leaf advertised-features-v10 {
+                description "Features being advertised by the port.";
+                type oft:port-features-v10;
+            }
+            leaf supported-features-v10 {
+                description "Features supported by the port.";
+                type oft:port-features-v10;
+            }
+            leaf peer-features-v10 { 
+                description "Features advertised by peer.";
+                type oft:port-features-v10; 
+            }
+        }
+
+        grouping buckets-grouping {
+                list buckets-list {
+                    uses bucket-grouping;
+                }
+            }
+
+            grouping bucket-grouping {
+                description "Bucket for use in groups.";
+                leaf weight {
+                    description "Relative weight of bucket. Only
+                                defined for select groups.";
+                    type uint16;
+                }
+                leaf watch-port {
+                    description "Port whose state affects whether this
+                                bucket is live. Only required for fast
+                                failover groups.";
+                    type oft:port-number;
+                }
+                leaf watch-group {
+                    description "Group whose state affects whether this
+                                bucket is live. Only required for fast
+                                failover groups.";
+                    type uint32;
+                }
+
+                uses ofaction:actions-grouping;
+            }
+            
+        container table-features-properties-container {
+            uses table-features-properties-grouping;
+        }
+
+        grouping table-features-properties-grouping {
+            list table-feature-properties {
+                config false;
+                leaf type {
+                    type oft:table-features-prop-type;
+                }
+            }
+        }
+
+    // # MESSAGE Structures
+        /* Immutable messages. */
+            grouping ofHeader {
+                reference "ofp_header struct in Openflow Switch 1.3 Spec";
+                leaf version {
+                    type uint8;
+                    description "OpenFlow version";
+                }
+                leaf xid {
+                    type uint32;
+                    description "Transaction ID";
+                }
+            }
+            grouping ofHelloElementHeader {
+                reference "ofpt_hello_elem_header struct in Openflow Switch 1.3 Spec";
+                leaf type {
+                    type oft:hello-element-type;
+                    //reference "OpenFlow Header element type - OFPHET_*";
+                }
+            }
+            grouping hello {
+                reference "OFPT_HELLO message in Openflow Switch 1.3 Spec";
+                /* Symmetric message */
+                uses ofHeader;
+                
+                list elements {
+                    uses ofHelloElementHeader;
+                    
+                    leaf-list version-bitmap {
+                        type boolean;
+                    }
+                }
+            }
+            grouping error {
+                reference "OFPT_ERROR message in Openflow Switch 1.3 Spec";
+                /* Symmetric message */
+                uses ofHeader;
+                
+                leaf type {
+                    type uint16;
+                }
+                leaf code {
+                    type uint16;
+                }
+                leaf type-string {
+                    type string;
+                }
+                leaf code-string {
+                    type string;
+                }
+                leaf data {
+                    type binary; 
+                }
+            }
+            grouping echo-request {
+                reference "OFPT_ECHO_REQUEST message in Openflow Switch 1.3 Spec";
+                /* Symmetric message */
+                uses ofHeader;
+                
+                leaf data {
+                    type binary;
+                }
+            }
+            grouping echo-reply {
+                reference "OFPT_ECHO_REPLY message in Openflow Switch 1.3 Spec";
+                /* Symmetric message */
+                uses ofHeader;
+                
+                leaf data {
+                    type binary;
+                }
+            }
+            grouping experimenter {
+                reference "OFPT_EXPERIMENTER message in Openflow Switch 1.3 Spec";
+                /* Symmetric message */
+                uses ofHeader;
+                
+                leaf experimenter {
+                    type oft:experimenter-id;
+                }
+                leaf exp_type {
+                    type uint32;
+                }
+            }
+        /* Switch configuration messages. */
+            grouping features-request {
+                reference "OFPT_FEATURES_REQUEST message in Openflow Switch 1.3 Spec";
+                /* Controller/switch message */
+                uses ofHeader;
+            }
+            grouping features-reply {
+                reference "OFPT_FEATURES_REPLY message in Openflow Switch 1.3 Spec";
+                /* Controller/switch message */
+                uses ofHeader;
+                
+                leaf datapathId {
+                    type uint64;
+                }
+                leaf buffers {
+                    type uint32;
+                }
+                leaf tables {
+                    type uint8;
+                }
+                leaf auxiliaryId {
+                    type uint8;
+                }
+                leaf capabilities {
+                    type oft:capabilities;
+                }
+                leaf reserved {
+                    type uint32;
+                }
+                // OF1.0 structures
+                leaf capabilities-v10 {
+                    type oft:capabilities-v10;
+                }
+                leaf actions-v10 {
+                    type oft:action-type-v10;
+                }
+                list phy-port {
+                    uses port-grouping;
+                }
+            }
+            grouping get-config-request {
+                reference "OFPT_GET_CONFIG_REQUEST message in Openflow Switch 1.3 Spec";
+                /* Controller/switch message */
+                uses ofHeader;
+            }
+            grouping get-config-reply {
+                reference "OFPT_GET_CONFIG_REPLY message in Openflow Switch 1.3 Spec";
+                /* Controller/switch message */
+                uses ofHeader;
+                
+                leaf flags {
+                    type oft:switch-config-flag;
+                }
+                leaf miss-send-len {
+                    type uint16;
+                }
+            }
+            grouping set-config {
+                reference "OFPT_SET_CONFIG message in Openflow Switch 1.3 Spec";
+                /* Controller/switch message */
+                
+                uses ofHeader;
+                
+                leaf flags {
+                    type oft:switch-config-flag;
+                }
+                leaf miss-send-len {
+                    type uint16;
+                }
+            }
+        /* Asynchronous messages. */
+            grouping packet-in {
+                reference "OFPT_PACKET_IN message in Openflow Switch 1.3 Spec";
+                /* Async message */
+                
+                uses ofHeader;
+                
+                leaf buffer-id {
+                    // ID assigned by datapath.
+                    type uint32;
+                }
+                leaf total-len {
+                    // Full length of frame.
+                    type uint16;
+                }
+                leaf reason {
+                    // Reason packet is being sent (one of OFPR_*) 
+                    type oft:packet-in-reason;
+                }
+                leaf table-id {
+                    // ID of the table that was looked up
+                    type oft:table-id;
+                }
+                leaf cookie {
+                    // Cookie of the flow entry that was looked up.
+                    type uint64;
+                }
+                uses oxm:match-grouping;
+
+                leaf data {
+                    type binary;
+                }
+                
+                // OF1.0 structures
+                leaf in-port {
+                    type uint16;
+                }
+            }
+            grouping flow-removed {
+                reference "OFPT_FLOW_REMOVED message in Openflow Switch 1.3 Spec";
+                /* Async message */
+                uses ofHeader;
+                
+                leaf cookie {
+                    type uint64;
+                }
+                leaf priority {
+                    type uint16;
+                }
+                leaf reason {
+                    type oft:flow-removed-reason;
+                }
+                leaf table-id {
+                    type oft:table-id;
+                }
+                leaf duration-sec {
+                    type uint32;
+                }
+                leaf duration-nsec {
+                    type uint32;
+                }
+                leaf idle-timeout {
+                    type uint16;
+                }
+                leaf hard-timeout {
+                    type uint16;
+                }
+                leaf packet-count {
+                    type uint64;
+                }
+                leaf byte-count {
+                    type uint64;
+                }
+                uses oxm:match-grouping;
+                
+                // OF1.0 structures
+                uses oxm:match-v10-grouping;
+            } 
+            grouping port-status {
+                reference "OFPT_PORT_STATUS message in Openflow Switch 1.3 Spec";
+                
+                uses ofHeader;
+                
+                uses port-grouping;
+                
+                leaf reason {
+                    type oft:port-reason;
+                }
+            }
+        /* Controller command messages. */
+            grouping packet-out {
+                reference "OFPT_PACKET_OUT message in Openflow Switch 1.3 Spec";
+                /* Controller/switch message */
+                
+                uses ofHeader;
+                
+                uses ofaction:actions-grouping;
+                
+                leaf data {
+                    type binary;
+                }
+                leaf buffer-id {
+                    type uint32;
+                }
+                leaf in-port {
+                    type oft:port-number;
+                }
+            } 
+            grouping flow-mod {
+                reference "OFPT_FLOW_MOD message in Openflow Switch 1.3 Spec";
+                /* Controller/switch message */
+                
+                uses ofHeader;
+                
+                leaf cookie {
+                    type uint64;
+                }
+                leaf cookie-mask {
+                    type uint64;
+                }
+                leaf table-id {
+                    type oft:table-id;
+                }
+                leaf command {
+                    type oft:flow-mod-command;
+                }
+                leaf idle-timeout {
+                    type uint16;
+                }
+                leaf hard-timeout {
+                    type uint16;
+                }
+                leaf priority {
+                    type uint16;
+                }
+                leaf buffer-id {
+                    type uint32;
+                }
+                leaf out-port {
+                    type oft:port-number;
+                }
+                leaf out-group {
+                    type uint32;
+                }
+                leaf flags {
+                    type oft:flow-mod-flags;
+                }
+                uses oxm:match-grouping;
+                
+                uses ofinstruction:instructions-grouping;
+                
+                // OF1.0 structures
+                leaf flags-v10 {
+                    type oft:flow-mod-flags-v10;
+                }
+                uses oxm:match-v10-grouping;
+                uses ofaction:actions-grouping;
+            } 
+            grouping group-mod {
+                reference "OFPT_GROUP_MOD message in Openflow Switch 1.3 Spec";
+                /* Controller/switch message */
+                
+                uses ofHeader;
+                
+                leaf command {
+                    type oft:group-mod-command;
+                }
+                leaf type {
+                    type oft:group-type;
+                }
+                leaf group-id {
+                    type oft:group-id;
+                }
+                
+                uses buckets-grouping;
+            }
+            
+            grouping port-mod {
+                reference "OFPT_PORT_MOD message in Openflow Switch 1.3 Spec";
+                /* Controller/switch message */
+
+                uses ofHeader;
+                
+                leaf port-no {
+                    type oft:port-number;
+                }
+                leaf hw-address {
+                    type yang:mac-address;
+                }       
+                leaf config {
+                    type oft:port-config;
+                }   
+                leaf mask {
+                    type oft:port-config;
+                }
+                leaf advertise {
+                    type oft:port-features;
+                }
+                // OF1.0 structures
+                leaf config-v10 {
+                    type oft:port-config-v10;
+                }
+                leaf mask-v10 {
+                    type oft:port-config-v10;
+                }
+                leaf advertise-v10 {
+                    type oft:port-features-v10;
+                }
+            } 
+            grouping table-mod {
+                reference "OFPT_TABLE_MOD message in Openflow Switch 1.3 Spec";
+                /* Controller/switch message */
+
+                uses ofHeader;
+                
+                leaf table-id {
+                    type oft:table-id;
+                }
+                leaf config {
+                    type oft:table-config;
+                }
+            } 
+            
+        /* Multipart messages. */
+            grouping multipart-request {
+                reference "OFPT_MULTIPART_REQUEST message in Openflow Switch 1.3 Spec";
+                /* Controller/switch message */
+
+                uses ofHeader;
+                
+                leaf type {
+                    type oft:multipart-type;
+                }
+                leaf flags {
+                    type oft:multipart-request-flags;
+                }
+                choice multipart-request-body {
+                    case multipart-request-desc-case {
+                        container multipart-request-desc {
+                            leaf empty {
+                                type empty;
+                            }
+                        }
+                    }
+                    case multipart-request-flow-case {
+                        container multipart-request-flow {
+                            leaf table-id {
+                                type uint8;
+                            }
+                            leaf out-port {
+                                type uint32;
+                            }
+                            leaf out-group {
+                                type uint32;
+                            }
+                            leaf cookie {
+                                type uint64;
+                            }
+                            leaf cookie-mask {
+                                type uint64;
+                            }
+                            uses oxm:match-grouping;
+                            
+                            // OF1.0 structures
+                            uses oxm:match-v10-grouping;
+                        }
+                    }
+                    case multipart-request-aggregate-case {
+                        container multipart-request-aggregate {
+                            leaf table-id {
+                                type uint8;
+                            }
+                            leaf out-port {
+                                type uint32;
+                            }
+                            leaf out-group {
+                                type uint32;
+                            }
+                            leaf cookie {
+                                type uint64;
+                            }
+                            leaf cookie-mask {
+                                type uint64;
+                            }
+                            uses oxm:match-grouping;
+                            
+                            // OF1.0 structures
+                            uses oxm:match-v10-grouping;
+                        }
+                    }
+                    case multipart-request-table-case {
+                        container multipart-request-table {
+                            leaf empty {
+                                type empty;
+                            }
+                        }
+                    }
+                    case multipart-request-port-stats-case {
+                        container multipart-request-port-stats {
+                            leaf port-no {
+                                type uint32;
+                            }
+                        }
+                    }
+                    case multipart-request-queue-case {
+                        container multipart-request-queue {
+                            leaf port-no {
+                                type uint32;
+                            }
+                            leaf queue-id {
+                                type uint32;
+                            }
+                        }
+                    }
+                    case multipart-request-group-case {
+                        container multipart-request-group {
+                            leaf group-id {
+                                type oft:group-id;
+                            }
+                        }
+                    }
+                    case multipart-request-group-desc-case {
+                        container multipart-request-group-desc {
+                            leaf empty {
+                                type empty;
+                            }
+                        }
+                    }
+                    case multipart-request-group-features-case {
+                        container multipart-request-group-features {
+                            leaf empty {
+                                type empty;
+                            }
+                        }
+                    }
+                    case multipart-request-meter-case {
+                        container multipart-request-meter {
+                            leaf meter-id {
+                                type oft:meter-id;
+                            }
+                        }
+                    }
+                    case multipart-request-meter-config-case {
+                        container multipart-request-meter-config {
+                            leaf meter-id {
+                                type oft:meter-id;
+                            }
+                        }
+                    }
+                    case multipart-request-meter-features-case {
+                        container multipart-request-meter-features {
+                            leaf empty {
+                                type empty;
+                            }
+                        }
+                    }
+                    case multipart-request-table-features-case {
+                        container multipart-request-table-features {
+                            list table-features {
+                                leaf table-id {
+                                    type uint8;
+                                }
+                                leaf name {
+                                    type string;
+                                }
+                                leaf metadata-match {
+                                    type uint64;
+                                }
+                                leaf metadata-write {
+                                    type uint64;
+                                }
+                                leaf config {
+                                    type oft:table-config;
+                                }
+                                leaf max-entries {
+                                    type uint32;
+                                }
+                                uses table-features-properties-grouping;
+                            }
+                        }
+                    }
+                    case multipart-request-port-desc-case {
+                        container multipart-request-port-desc {
+                            leaf empty {
+                                type empty;
+                            }
+                        }
+                    }
+                    case multipart-request-experimenter-case {
+                        container multipart-request-experimenter {
+                            // empty body - used for experimenter augmentation
+                        }
+                    }
+                }
+            } 
+            grouping multipart-reply {
+                reference "OFPT_MULTIPART_REPLY message in Openflow Switch 1.3 Spec";
+                /* Controller/switch message */
+
+                uses ofHeader;
+                
+                leaf type {
+                    type oft:multipart-type;
+                }
+                leaf flags {
+                    type oft:multipart-request-flags;
+                }
+                choice multipart-reply-body {
+                    case multipart-reply-desc-case {
+                        container multipart-reply-desc {
+                            leaf mfr_desc {
+                                type string;
+                            }
+                            leaf hw_desc {
+                                type string;
+                            }
+                            leaf sw_desc {
+                                type string;
+                            }
+                            leaf serial_num {
+                                type string;
+                            }
+                            leaf dp_desc {
+                                type string;
+                            }
+                        }
+                    }
+                    case multipart-reply-flow-case {
+                        container multipart-reply-flow {
+                            list flow-stats {
+                                leaf table-id {
+                                    type uint8;
+                                }
+                                leaf duration-sec {
+                                    type uint32;
+                                }
+                                leaf duration-nsec {
+                                    type uint32;
+                                }
+                                leaf priority {
+                                    type uint16;
+                                }
+                                leaf idle-timeout {
+                                    type uint16;
+                                }
+                                leaf hard-timeout {
+                                    type uint16;
+                                }
+                                leaf flags {
+                                    type oft:flow-mod-flags;
+                                }
+                                leaf cookie {
+                                    type uint64;
+                                }
+                                leaf packet-count {
+                                    type uint64;
+                                }
+                                leaf byte-count {
+                                    type uint64;
+                                }
+                                uses oxm:match-grouping;
+                                
+                                uses ofinstruction:instructions-grouping;
+                                
+                                // OF1.0 structures
+                                uses oxm:match-v10-grouping;
+                                uses ofaction:actions-grouping;
+                            }
+                        }
+                    }
+                    case multipart-reply-aggregate-case {
+                        container multipart-reply-aggregate {
+                            leaf packet-count {
+                                type uint64;
+                            }
+                            leaf byte-count {
+                                type uint64;
+                            }
+                            leaf flow-count {
+                                type uint32;
+                            }
+                        }
+                    }
+                    case multipart-reply-table-case {
+                        container multipart-reply-table {
+                            list table-stats {
+                                leaf table-id {
+                                    type uint8;
+                                }
+                                leaf active-count {
+                                    type uint32;
+                                }
+                                leaf lookup-count {
+                                    type uint64;
+                                }
+                                leaf matched-count {
+                                    type uint64;
+                                }
+                                
+                                // OF1.0 structures
+                                leaf name {
+                                    type string;
+                                }
+                                leaf wildcards {
+                                    type oft:flow-wildcards-v10;
+                                }
+                                leaf nw-src-mask {
+                                    type uint8;
+                                }
+                                leaf nw-dst-mask {
+                                    type uint8;
+                                }
+                                leaf max-entries {
+                                    type uint32;
+                                }
+                            }
+                        }
+                    }
+                    case multipart-reply-port-stats-case {
+                        container multipart-reply-port-stats {
+                            list port-stats {
+                                leaf port-no {
+                                    type uint32;
+                                }
+                                leaf rx-packets {
+                                    type uint64;
+                                }
+                                leaf tx-packets {
+                                    type uint64;
+                                }
+                                leaf rx-bytes {
+                                    type uint64;
+                                }
+                                leaf tx-bytes {
+                                    type uint64;
+                                }
+                                leaf rx-dropped {
+                                    type uint64;
+                                }
+                                leaf tx-dropped {
+                                    type uint64;
+                                }
+                                leaf rx-errors {
+                                    type uint64;
+                                }
+                                leaf tx-errors {
+                                    type uint64;
+                                }
+                                leaf rx-frame-err {
+                                    type uint64;
+                                }
+                                leaf rx-over-err {
+                                    type uint64;
+                                }
+                                leaf rx-crc-err {
+                                    type uint64;
+                                }
+                                leaf collisions {
+                                    type uint64;
+                                }
+                                leaf duration-sec {
+                                    type uint32;
+                                }
+                                leaf duration-nsec {
+                                    type uint32;
+                                }
+                            }
+                        }
+                    }
+                    case multipart-reply-queue-case {
+                        container multipart-reply-queue {
+                            list queue-stats {
+                                leaf port-no {
+                                    type uint32;
+                                }
+                                leaf queue-id {
+                                    type uint32;
+                                }
+                                leaf tx-bytes {
+                                    type uint64;
+                                }
+                                leaf tx-packets {
+                                    type uint64;
+                                }
+                                leaf tx-errors {
+                                    type uint64;
+                                }
+                                leaf duration-sec {
+                                    type uint32;
+                                }
+                                leaf duration-nsec {
+                                    type uint32;
+                                }
+                            }
+                        }
+                    }
+                    case multipart-reply-group-case {
+                        container multipart-reply-group {
+                            list group-stats {
+                                leaf group-id {
+                                    type oft:group-id;
+                                }
+                                leaf ref-count {
+                                    type uint32;
+                                }
+                                leaf packet-count {
+                                    type uint64;
+                                }
+                                leaf byte-count {
+                                    type uint64;
+                                }
+                                leaf duration-sec {
+                                    type uint32;
+                                }
+                                leaf duration-nsec {
+                                    type uint32;
+                                }
+                                list bucket-stats {
+                                    leaf packet-count {
+                                        type uint64;
+                                    }
+                                    leaf byte-count {
+                                        type uint64;
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    case multipart-reply-group-desc-case {
+                        container multipart-reply-group-desc {
+                            list group-desc {
+                                leaf type {
+                                    type oft:group-type;
+                                }
+                                leaf group-id {
+                                    type oft:group-id;
+                                }
+                                uses buckets-grouping;
+                            }
+                        }
+                    }
+                    case multipart-reply-group-features-case {
+                        container multipart-reply-group-features {
+                            leaf types {
+                                type oft:group-types;
+                            }
+                            leaf capabilities {
+                                type oft:group-capabilities;
+                            }
+                            leaf-list max_groups {
+                                type uint32;
+                            }
+                            leaf-list actions-bitmap {
+                                type oft:action-type;
+                            }
+                        }
+                    }
+                    case multipart-reply-meter-case {
+                        container multipart-reply-meter {
+                            list meter-stats {
+                                leaf meter-id {
+                                    type oft:meter-id;
+                                }
+                                leaf flow-count {
+                                    type uint32;
+                                }
+                                leaf packet-in-count {
+                                    type uint64;
+                                }
+                                leaf byte-in-count {
+                                    type uint64;
+                                }
+                                leaf duration-sec {
+                                    type uint32;
+                                }
+                                leaf duration-nsec {
+                                    type uint32;
+                                }
+                                list meter-band-stats {
+                                    leaf packet-band-count {
+                                        type uint64;
+                                    }
+                                    leaf byte-band-count {
+                                        type uint64;
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    case multipart-reply-meter-config-case {
+                        container multipart-reply-meter-config {
+                            list meter-config {
+                                leaf flags {
+                                    type oft:meter-flags;
+                                }
+                                leaf meter-id {
+                                    type oft:meter-id;
+                                }
+                                list bands {
+                                    uses meter-band-header;
+                                }
+                            }
+                        }
+                    }
+                    case multipart-reply-meter-features-case {
+                        container multipart-reply-meter-features {
+                            leaf max-meter {
+                                type uint32;
+                            }
+                            leaf band-types {
+                                type oft:meter-band-type-bitmap;
+                            }
+                            leaf capabilities {
+                                type oft:meter-flags;
+                            }
+                            leaf max-bands {
+                                type uint8;
+                            }
+                            leaf max-color {
+                                type uint8;
+                            }
+                        }
+                    }
+                    case multipart-reply-table-features-case {
+                        container multipart-reply-table-features {
+                            list table-features {
+                                leaf table-id {
+                                    type uint8;
+                                }
+                                leaf name {
+                                    type string;
+                                }
+                                leaf metadata-match {
+                                    type binary;
+                                }
+                                leaf metadata-write {
+                                    type binary;
+                                }
+                                leaf config {
+                                    type oft:table-config;
+                                } 
+                                leaf max-entries {
+                                    type uint32;
+                                }
+                                uses table-features-properties-grouping;
+                            }
+                        }
+                    }
+                    case multipart-reply-port-desc-case {
+                        container multipart-reply-port-desc {
+                            list ports {
+                                uses port-grouping;
+                            }
+                        }
+                    }
+                    case multipart-reply-experimenter-case {
+                        container multipart-reply-experimenter {
+                            // empty body - used for experimenter augmentation
+                        }
+                    }
+                }
+            } 
+            /* Barrier messages. */
+            grouping barrier-request {
+                reference "OFPT_BARRIER_REQUEST message in Openflow Switch 1.3 Spec";
+                /* Controller/switch message */
+                uses ofHeader;
+            } 
+            grouping barrier-reply {
+                reference "OFPT_BARRIER_REPLY message in Openflow Switch 1.3 Spec";
+                /* Controller/switch message */
+                uses ofHeader;
+            } 
+        /* Queue Configuration messages. */
+            grouping queue-get-config-request {
+                reference "OFPT_QUEUE_GET_CONFIG_REQUEST message in Openflow Switch 1.3 Spec";
+                /* Controller/switch message */
+                
+                uses ofHeader;
+                
+                leaf port {
+                    type oft:port-number;
+                }
+            } 
+            grouping queue-get-config-reply {
+                reference "OFPT_QUEUE_GET_CONFIG_REPLY message in Openflow Switch 1.3 Spec";
+                /* Controller/switch message */
+
+                uses ofHeader;
+                
+                leaf port {
+                    type oft:port-number;
+                }
+                list queues {
+                    uses packet-queue;
+                }
+            }
+            grouping packet-queue {
+                leaf queue-id {
+                    type oft:queue-id;
+                }
+                leaf port {
+                    type oft:port-number;
+                }
+                uses queue-property-header;
+            }
+            container queue-prop-container {
+                uses queue-property-header;
+            }
+            grouping queue-property-header {
+                list queue-property {
+                    config false;
+                    leaf property {
+                        type oft:queue-properties;
+                    }
+                }
+            }
+            /* Controller role change request messages. */
+            grouping role-request {
+                reference "OFPT_ROLE_REQUEST message in Openflow Switch 1.3 Spec";
+                /* Controller/switch message */
+                
+                uses ofHeader;
+                
+                leaf role {
+                    type oft:controller-role;
+                }
+                leaf generation-id {
+                    type uint64;
+                }
+            } 
+            grouping role-reply {
+                reference "OFPT_ROLE_REPLY message in Openflow Switch 1.3 Spec";
+                /* Controller/switch message */
+
+                uses ofHeader;
+                
+                leaf role {
+                    type oft:controller-role;
+                }
+                leaf generation-id {
+                    type uint64;
+                }
+            } 
+            /* Asynchronous message configuration. */
+            grouping get-async-request {
+                reference "OFPT_GET_ASYNC_REQUEST message in Openflow Switch 1.3 Spec";
+                /* Controller/switch message */
+
+                uses ofHeader;
+            } 
+            grouping get-async-reply {
+                reference "OFPT_GET_ASYNC_REPLY message in Openflow Switch 1.3 Spec";
+                /* Controller/switch message */
+
+                uses ofHeader;
+                uses async-body-grouping;
+            } 
+            grouping set-async {
+                reference "OFPT_SET_ASYNC message in Openflow Switch 1.3 Spec";
+                /* Controller/switch message */
+                
+                uses ofHeader;
+                uses async-body-grouping;
+            }
+            
+            grouping async-body-grouping {
+                list packet-in-mask {
+                    leaf-list mask {
+                        type oft:packet-in-reason;
+                    }
+                }
+                list port-status-mask {
+                    leaf-list mask {
+                        type oft:port-reason;
+                    }
+                }
+                list flow-removed-mask {
+                    leaf-list mask {
+                        type oft:flow-removed-reason;
+                    }
+                }
+            }
+            /* Meters and rate limiters configuration messages. */
+            grouping meter-mod {
+                reference "OFPT_METER_MOD message in Openflow Switch 1.3 Spec";
+                /* Controller/switch message */
+
+                uses ofHeader;
+                
+                leaf command {
+                    type oft:meter-mod-command;
+                } 
+                leaf flags {
+                    type oft:meter-flags;
+                }
+                leaf meter-id {
+                    type oft:meter-id;
+                }
+                list bands {
+                    uses meter-band-header;
+                }
+            }
+            
+            container meter-band-container {
+                uses meter-band-header;
+            }
+            grouping meter-band-header {
+                choice meter-band {
+                    case meter-band-drop-case {
+                        container meter-band-drop {
+                            uses meter-band-commons;
+                        }
+                    }
+                    case meter-band-dscp-remark-case {
+                        container meter-band-dscp-remark {
+                            uses meter-band-commons;
+                            leaf prec-level {
+                                type uint8;
+                            }
+                        }
+                    }
+                    case meter-band-experimenter-case {
+                        container meter-band-experimenter {
+                            uses meter-band-commons;
+                        }
+                    }
+                }
+            }
+            
+            grouping meter-band-commons {
+                leaf type {
+                    type oft:meter-band-type;
+                }
+                leaf rate {
+                    type uint32;
+                }
+                leaf burst-size {
+                    type uint32;
+                }
+            }
+
+            /* Immutable messages. */
+            notification hello-message {
+                uses hello;
+                reference "OFPT_HELLO message in Openflow Switch 1.3 Spec";
+                
+                /* Symmetric message */
+            }
+            notification error-message {
+                uses error;
+                reference "OFPT_ERROR message in Openflow Switch 1.3 Spec";
+                
+                /* Symmetric message */
+            }
+            notification echo-request-message {
+                uses echo-request;
+                reference "OFPT_ECHO_REQUEST message in Openflow Switch 1.3 Spec";
+                
+                /* Symmetric message */
+            }
+            notification experimenter-message {
+                uses experimenter;
+                reference "OFPT_EXPERIMENTER message in Openflow Switch 1.3 Spec";
+                // TODO:: does switch send this when understood experimenter msg from lib?
+                /* Symmetric message */
+            }
+    // # Notification and RPCs
+        /* Symmetric RPC. */
+            rpc echo {
+                input {
+                    uses echo-request;
+                }
+                /* Controller/switch message */
+                output {
+                    uses echo-reply;
+                }
+            }
+            
+            rpc echo-reply {
+                input {
+                    uses echo-reply;
+                }
+            }
+            
+            rpc hello {
+                input {
+                    uses hello;
+                }
+            }
+            
+            rpc experimenter {
+                input {
+                    uses experimenter;
+                }
+            }
+
+        /* Switch configuration messages. */
+            rpc get-features {
+                input {
+                    uses features-request;
+                }
+                /* Controller/switch message */
+                output {
+                    uses features-reply;
+                }
+            }
+            
+            rpc get-config {
+                input {
+                    uses get-config-request;
+                }
+                output {
+                    uses get-config-reply;
+                }
+                /* Controller/switch message */
+            }
+            
+            rpc set-config {
+                input {
+                    uses set-config;
+                }   
+                /* Controller/switch message */
+            }
+        /* Asynchronous messages. */
+            notification packet-in-message {
+                uses packet-in;
+                
+             /* Async message */
+            }
+            notification flow-removed-message {
+                uses flow-removed;
+                
+                /* Async message */
+            } 
+            notification port-status-message {
+                uses port-status;
+                
+            } /* Async message */
+
+        /* Controller command messages. */
+            rpc packet-out {
+                input {
+                    uses packet-out;
+                }
+                /* Controller/switch message */
+            } 
+            rpc flow-mod {
+                input {
+                    uses flow-mod;
+                }
+                /* Controller/switch message */
+            } 
+            rpc group-mod {
+                input {
+                    uses group-mod;
+                }
+                /* Controller/switch message */
+            } 
+            rpc port-mod {
+                input {
+                    uses port-mod;
+                }
+            } /* Controller/switch message */
+            
+            rpc table-mod {
+                input {
+                    uses table-mod;
+                }
+            } /* Controller/switch message */
+
+        /* Multipart messages. */
+
+            rpc multipart-request {
+                input {
+                    uses multipart-request;
+                }
+            }
+
+             /* Controller/switch message */
+            notification multipart-reply-message {
+                uses multipart-reply;
+                // notification because of multiple following responses
+            } /* Controller/switch message */
+            
+
+            /* Barrier messages. */
+            rpc barrier {
+                input {
+                    uses barrier-request;
+                }
+                output {
+                    uses barrier-reply;
+                }
+            }
+        /* Queue Configuration messages. */
+            rpc get-queue-config {
+                input {
+                    uses queue-get-config-request;
+                }
+                output {
+                    uses queue-get-config-reply;
+                }
+            } 
+
+        /* Controller role change request messages. */
+            rpc role-request {
+                input {
+                    uses role-request;
+                }
+                output {
+                    uses role-reply;
+                }
+            } /* Controller/switch message */
+            
+        /* Asynchronous message configuration. */
+            rpc get-async {
+                input {
+                    uses get-async-request;
+                }
+                output {
+                    uses get-async-reply;
+                }
+            } 
+             /* Controller/switch message */
+            rpc set-async {
+                input { 
+                    uses set-async;
+                }
+                
+            } 
+        /* Meters and rate limiters configuration messages. */
+            rpc meter-mod {
+                input {
+                    uses meter-mod;
+                }
+            } /* Controller/switch message */
 }
\ No newline at end of file