Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1 | // Copyright 2013, Big Switch Networks, Inc. |
| 2 | // |
| 3 | // LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with |
| 4 | // the following special exception: |
| 5 | // |
| 6 | // LOXI Exception |
| 7 | // |
| 8 | // As a special exception to the terms of the EPL, you may distribute libraries |
| 9 | // generated by LoxiGen (LoxiGen Libraries) under the terms of your choice, provided |
| 10 | // that copyright and licensing notices generated by LoxiGen are not altered or removed |
| 11 | // from the LoxiGen Libraries and the notice provided below is (i) included in |
| 12 | // the LoxiGen Libraries, if distributed in source code form and (ii) included in any |
| 13 | // documentation for the LoxiGen Libraries, if distributed in binary form. |
| 14 | // |
| 15 | // Notice: "Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler." |
| 16 | // |
| 17 | // You may not use this file except in compliance with the EPL or LOXI Exception. You may obtain |
| 18 | // a copy of the EPL at: |
| 19 | // |
| 20 | // http://www.eclipse.org/legal/epl-v10.html |
| 21 | // |
| 22 | // Unless required by applicable law or agreed to in writing, software |
| 23 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 24 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 25 | // EPL for the specific language governing permissions and limitations |
| 26 | // under the EPL. |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 27 | // |
| 28 | // Also derived from the OpenFlow header files which have these copyrights: |
| 29 | // Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University |
| 30 | // Copyright (c) 2011, 2012 Open Networking Foundation |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 31 | |
| 32 | #version 3 |
| 33 | |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 34 | enum macro_definitions { |
| 35 | OFP_MAX_TABLE_NAME_LEN = 32, |
| 36 | OFP_MAX_PORT_NAME_LEN = 16, |
| 37 | |
Wilson Ng | d72013d | 2013-09-29 10:21:48 -0700 | [diff] [blame] | 38 | OFP_TCP_PORT = 6653, |
| 39 | OFP_SSL_PORT = 6653, |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 40 | |
| 41 | OFP_ETH_ALEN = 6, |
| 42 | |
| 43 | OFP_DEFAULT_MISS_SEND_LEN = 128, |
| 44 | |
| 45 | OFP_VLAN_NONE = 0, |
| 46 | |
| 47 | OFP_FLOW_PERMANENT = 0, |
| 48 | |
| 49 | OFP_DEFAULT_PRIORITY = 0x8000, |
| 50 | |
| 51 | OFP_NO_BUFFER = 0xffffffff, |
| 52 | |
| 53 | DESC_STR_LEN = 256, |
| 54 | SERIAL_NUM_LEN = 32, |
| 55 | |
| 56 | OFPQ_ALL = 0xffffffff, |
| 57 | |
| 58 | OFPQ_MIN_RATE_UNCFG = 0xffff, |
| 59 | OFPQ_MAX_RATE_UNCFG = 0xffff, |
| 60 | }; |
| 61 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 62 | enum ofp_port(wire_type=uint32_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 63 | OFPP_MAX = 0xffffff00, |
| 64 | OFPP_IN_PORT = 0xfffffff8, |
| 65 | OFPP_TABLE = 0xfffffff9, |
| 66 | OFPP_NORMAL = 0xfffffffa, |
| 67 | OFPP_FLOOD = 0xfffffffb, |
| 68 | OFPP_ALL = 0xfffffffc, |
| 69 | OFPP_CONTROLLER = 0xfffffffd, |
| 70 | OFPP_LOCAL = 0xfffffffe, |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 71 | OFPP_ANY = 0xffffffff, |
| 72 | }; |
| 73 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 74 | enum ofp_type(wire_type=uint8_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 75 | OFPT_HELLO = 0, |
| 76 | OFPT_ERROR = 1, |
| 77 | OFPT_ECHO_REQUEST = 2, |
| 78 | OFPT_ECHO_REPLY = 3, |
| 79 | OFPT_EXPERIMENTER = 4, |
| 80 | OFPT_FEATURES_REQUEST = 5, |
| 81 | OFPT_FEATURES_REPLY = 6, |
| 82 | OFPT_GET_CONFIG_REQUEST = 7, |
| 83 | OFPT_GET_CONFIG_REPLY = 8, |
| 84 | OFPT_SET_CONFIG = 9, |
| 85 | OFPT_PACKET_IN = 10, |
| 86 | OFPT_FLOW_REMOVED = 11, |
| 87 | OFPT_PORT_STATUS = 12, |
| 88 | OFPT_PACKET_OUT = 13, |
| 89 | OFPT_FLOW_MOD = 14, |
| 90 | OFPT_GROUP_MOD = 15, |
| 91 | OFPT_PORT_MOD = 16, |
| 92 | OFPT_TABLE_MOD = 17, |
| 93 | OFPT_STATS_REQUEST = 18, |
| 94 | OFPT_STATS_REPLY = 19, |
| 95 | OFPT_BARRIER_REQUEST = 20, |
| 96 | OFPT_BARRIER_REPLY = 21, |
| 97 | OFPT_QUEUE_GET_CONFIG_REQUEST = 22, |
| 98 | OFPT_QUEUE_GET_CONFIG_REPLY = 23, |
| 99 | OFPT_ROLE_REQUEST = 24, |
| 100 | OFPT_ROLE_REPLY = 25, |
| 101 | }; |
| 102 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 103 | enum ofp_config_flags(wire_type=uint16_t, bitmask=True) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 104 | OFPC_FRAG_NORMAL = 0, |
| 105 | OFPC_FRAG_DROP = 1, |
| 106 | OFPC_FRAG_REASM = 2, |
| 107 | OFPC_FRAG_MASK = 3, |
| 108 | OFPC_INVALID_TTL_TO_CONTROLLER = 4, |
| 109 | }; |
| 110 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 111 | enum ofp_table_config(wire_type=uint32_t, bitmask=True) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 112 | OFPTC_TABLE_MISS_CONTROLLER = 0, |
| 113 | OFPTC_TABLE_MISS_CONTINUE = 1, |
| 114 | OFPTC_TABLE_MISS_DROP = 2, |
| 115 | OFPTC_TABLE_MISS_MASK = 3, |
| 116 | }; |
| 117 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 118 | enum ofp_table(wire_type=uint8_t, complete=False) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 119 | OFPTT_MAX = 0xfe, |
| 120 | OFPTT_ALL = 0xff, |
| 121 | }; |
| 122 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 123 | enum ofp_capabilities(wire_type=uint32_t, bitmask=True) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 124 | OFPC_FLOW_STATS = 0x1, |
| 125 | OFPC_TABLE_STATS = 0x2, |
| 126 | OFPC_PORT_STATS = 0x4, |
| 127 | OFPC_GROUP_STATS = 0x8, |
| 128 | OFPC_IP_REASM = 0x20, |
| 129 | OFPC_QUEUE_STATS = 0x40, |
| 130 | OFPC_PORT_BLOCKED = 0x100, |
| 131 | }; |
| 132 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 133 | enum ofp_port_config(wire_type=uint32_t, bitmask=True) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 134 | OFPPC_PORT_DOWN = 0x1, |
| 135 | OFPPC_NO_RECV = 0x4, |
| 136 | OFPPC_NO_FWD = 0x20, |
| 137 | OFPPC_NO_PACKET_IN = 0x40, |
Rob Vaterlaus | 0a8ec14 | 2013-10-10 13:27:14 -0700 | [diff] [blame] | 138 | OFPPC_BSN_MIRROR_DEST = 0x80000000, |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 139 | }; |
| 140 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 141 | enum ofp_port_state(wire_type=uint32_t, bitmask=True) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 142 | OFPPS_LINK_DOWN = 0x1, |
| 143 | OFPPS_BLOCKED = 0x2, |
| 144 | OFPPS_LIVE = 0x4, |
| 145 | }; |
| 146 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 147 | enum ofp_port_features(wire_type=uint32_t, bitmask=True) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 148 | OFPPF_10MB_HD = 0x1, |
| 149 | OFPPF_10MB_FD = 0x2, |
| 150 | OFPPF_100MB_HD = 0x4, |
| 151 | OFPPF_100MB_FD = 0x8, |
| 152 | OFPPF_1GB_HD = 0x10, |
| 153 | OFPPF_1GB_FD = 0x20, |
| 154 | OFPPF_10GB_FD = 0x40, |
| 155 | OFPPF_40GB_FD = 0x80, |
| 156 | OFPPF_100GB_FD = 0x100, |
| 157 | OFPPF_1TB_FD = 0x200, |
| 158 | OFPPF_OTHER = 0x400, |
| 159 | OFPPF_COPPER = 0x800, |
| 160 | OFPPF_FIBER = 0x1000, |
| 161 | OFPPF_AUTONEG = 0x2000, |
| 162 | OFPPF_PAUSE = 0x4000, |
| 163 | OFPPF_PAUSE_ASYM = 0x8000, |
| 164 | }; |
| 165 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 166 | enum ofp_port_reason(wire_type=uint8_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 167 | OFPPR_ADD = 0, |
| 168 | OFPPR_DELETE = 1, |
| 169 | OFPPR_MODIFY = 2, |
| 170 | }; |
| 171 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 172 | enum ofp_match_type(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 173 | OFPMT_STANDARD = 0, |
| 174 | OFPMT_OXM = 1, |
| 175 | }; |
| 176 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 177 | enum ofp_oxm_class(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 178 | OFPXMC_NXM_0 = 0, |
| 179 | OFPXMC_NXM_1 = 1, |
| 180 | OFPXMC_OPENFLOW_BASIC = 0x8000, |
| 181 | OFPXMC_EXPERIMENTER = 0xffff, |
| 182 | }; |
| 183 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 184 | enum ofp_vlan_id(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 185 | OFPVID_NONE = 0, |
| 186 | OFPVID_PRESENT = 0x1000, |
| 187 | }; |
| 188 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 189 | enum ofp_action_type(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 190 | OFPAT_OUTPUT = 0, |
| 191 | OFPAT_COPY_TTL_OUT = 0xb, |
| 192 | OFPAT_COPY_TTL_IN = 0xc, |
| 193 | OFPAT_SET_MPLS_TTL = 0xf, |
| 194 | OFPAT_DEC_MPLS_TTL = 0x10, |
| 195 | OFPAT_PUSH_VLAN = 0x11, |
| 196 | OFPAT_POP_VLAN = 0x12, |
| 197 | OFPAT_PUSH_MPLS = 0x13, |
| 198 | OFPAT_POP_MPLS = 0x14, |
| 199 | OFPAT_SET_QUEUE = 0x15, |
| 200 | OFPAT_GROUP = 0x16, |
| 201 | OFPAT_SET_NW_TTL = 0x17, |
| 202 | OFPAT_DEC_NW_TTL = 0x18, |
| 203 | OFPAT_SET_FIELD = 0x19, |
| 204 | OFPAT_EXPERIMENTER = 0xffff, |
| 205 | }; |
| 206 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 207 | enum ofp_controller_max_len(wire_type=uint16_t, complete=False) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 208 | OFPCML_MAX = 0xffe5, |
| 209 | OFPCML_NO_BUFFER = 0xffff, |
| 210 | }; |
| 211 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 212 | enum ofp_instruction_type(wire_type=uint16_t, bitmask=True) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 213 | OFPIT_GOTO_TABLE = 0x1, |
| 214 | OFPIT_WRITE_METADATA = 0x2, |
| 215 | OFPIT_WRITE_ACTIONS = 0x3, |
| 216 | OFPIT_APPLY_ACTIONS = 0x4, |
| 217 | OFPIT_CLEAR_ACTIONS = 0x5, |
| 218 | OFPIT_EXPERIMENTER = 0xffff, |
| 219 | }; |
| 220 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 221 | enum ofp_flow_mod_command(wire_type=uint8_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 222 | OFPFC_ADD = 0, |
| 223 | OFPFC_MODIFY = 1, |
| 224 | OFPFC_MODIFY_STRICT = 2, |
| 225 | OFPFC_DELETE = 3, |
| 226 | OFPFC_DELETE_STRICT = 4, |
| 227 | }; |
| 228 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 229 | enum ofp_flow_mod_flags(wire_type=uint16_t, bitmask=True) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 230 | OFPFF_SEND_FLOW_REM = 0x1, |
| 231 | OFPFF_CHECK_OVERLAP = 0x2, |
| 232 | OFPFF_RESET_COUNTS = 0x4, |
| 233 | }; |
| 234 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 235 | enum ofp_group(wire_type=uint32_t, complete=False) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 236 | OFPG_MAX = 0xffffff00, |
| 237 | OFPG_ALL = 0xfffffffc, |
| 238 | OFPG_ANY = 0xffffffff, |
| 239 | }; |
| 240 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 241 | enum ofp_group_mod_command(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 242 | OFPGC_ADD = 0, |
| 243 | OFPGC_MODIFY = 1, |
| 244 | OFPGC_DELETE = 2, |
| 245 | }; |
| 246 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 247 | enum ofp_group_type(wire_type=uint8_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 248 | OFPGT_ALL = 0, |
| 249 | OFPGT_SELECT = 1, |
| 250 | OFPGT_INDIRECT = 2, |
| 251 | OFPGT_FF = 3, |
| 252 | }; |
| 253 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 254 | enum ofp_packet_in_reason(wire_type=uint8_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 255 | OFPR_NO_MATCH = 0, |
| 256 | OFPR_ACTION = 1, |
| 257 | OFPR_INVALID_TTL = 2, |
| 258 | }; |
| 259 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 260 | enum ofp_flow_removed_reason(wire_type=uint8_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 261 | OFPRR_IDLE_TIMEOUT = 0, |
| 262 | OFPRR_HARD_TIMEOUT = 1, |
| 263 | OFPRR_DELETE = 2, |
| 264 | OFPRR_GROUP_DELETE = 3, |
| 265 | }; |
| 266 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 267 | enum ofp_error_type(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 268 | OFPET_HELLO_FAILED = 0, |
| 269 | OFPET_BAD_REQUEST = 1, |
| 270 | OFPET_BAD_ACTION = 2, |
| 271 | OFPET_BAD_INSTRUCTION = 3, |
| 272 | OFPET_BAD_MATCH = 4, |
| 273 | OFPET_FLOW_MOD_FAILED = 5, |
| 274 | OFPET_GROUP_MOD_FAILED = 6, |
| 275 | OFPET_PORT_MOD_FAILED = 7, |
| 276 | OFPET_TABLE_MOD_FAILED = 8, |
| 277 | OFPET_QUEUE_OP_FAILED = 9, |
| 278 | OFPET_SWITCH_CONFIG_FAILED = 10, |
| 279 | OFPET_ROLE_REQUEST_FAILED = 11, |
| 280 | OFPET_EXPERIMENTER = 0xffff, |
| 281 | }; |
| 282 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 283 | enum ofp_hello_failed_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 284 | OFPHFC_INCOMPATIBLE = 0, |
| 285 | OFPHFC_EPERM = 1, |
| 286 | }; |
| 287 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 288 | enum ofp_bad_request_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 289 | OFPBRC_BAD_VERSION = 0, |
| 290 | OFPBRC_BAD_TYPE = 1, |
| 291 | OFPBRC_BAD_STAT = 2, |
| 292 | OFPBRC_BAD_EXPERIMENTER = 3, |
Rob Vaterlaus | b3f49d9 | 2013-10-01 17:57:31 -0700 | [diff] [blame] | 293 | OFPBRC_BAD_EXPERIMENTER_TYPE = 4, |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 294 | OFPBRC_EPERM = 5, |
| 295 | OFPBRC_BAD_LEN = 6, |
| 296 | OFPBRC_BUFFER_EMPTY = 7, |
| 297 | OFPBRC_BUFFER_UNKNOWN = 8, |
| 298 | OFPBRC_BAD_TABLE_ID = 9, |
| 299 | OFPBRC_IS_SLAVE = 10, |
| 300 | OFPBRC_BAD_PORT = 11, |
| 301 | OFPBRC_BAD_PACKET = 12, |
| 302 | }; |
| 303 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 304 | enum ofp_bad_action_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 305 | OFPBAC_BAD_TYPE = 0, |
| 306 | OFPBAC_BAD_LEN = 1, |
| 307 | OFPBAC_BAD_EXPERIMENTER = 2, |
Rob Vaterlaus | b3f49d9 | 2013-10-01 17:57:31 -0700 | [diff] [blame] | 308 | OFPBAC_BAD_EXPERIMENTER_TYPE = 3, |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 309 | OFPBAC_BAD_OUT_PORT = 4, |
| 310 | OFPBAC_BAD_ARGUMENT = 5, |
| 311 | OFPBAC_EPERM = 6, |
| 312 | OFPBAC_TOO_MANY = 7, |
| 313 | OFPBAC_BAD_QUEUE = 8, |
| 314 | OFPBAC_BAD_OUT_GROUP = 9, |
| 315 | OFPBAC_MATCH_INCONSISTENT = 10, |
| 316 | OFPBAC_UNSUPPORTED_ORDER = 11, |
| 317 | OFPBAC_BAD_TAG = 12, |
| 318 | OFPBAC_BAD_SET_TYPE = 13, |
| 319 | OFPBAC_BAD_SET_LEN = 14, |
| 320 | OFPBAC_BAD_SET_ARGUMENT = 15, |
| 321 | }; |
| 322 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 323 | enum ofp_bad_instruction_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 324 | OFPBIC_UNKNOWN_INST = 0, |
| 325 | OFPBIC_UNSUP_INST = 1, |
| 326 | OFPBIC_BAD_TABLE_ID = 2, |
| 327 | OFPBIC_UNSUP_METADATA = 3, |
| 328 | OFPBIC_UNSUP_METADATA_MASK = 4, |
| 329 | OFPBIC_BAD_EXPERIMENTER = 5, |
Rob Vaterlaus | b3f49d9 | 2013-10-01 17:57:31 -0700 | [diff] [blame] | 330 | OFPBIC_BAD_EXPERIMENTER_TYPE = 6, |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 331 | OFPBIC_BAD_LEN = 7, |
| 332 | OFPBIC_EPERM = 8, |
| 333 | }; |
| 334 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 335 | enum ofp_bad_match_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 336 | OFPBMC_BAD_TYPE = 0, |
| 337 | OFPBMC_BAD_LEN = 1, |
| 338 | OFPBMC_BAD_TAG = 2, |
| 339 | OFPBMC_BAD_DL_ADDR_MASK = 3, |
| 340 | OFPBMC_BAD_NW_ADDR_MASK = 4, |
| 341 | OFPBMC_BAD_WILDCARDS = 5, |
| 342 | OFPBMC_BAD_FIELD = 6, |
| 343 | OFPBMC_BAD_VALUE = 7, |
| 344 | OFPBMC_BAD_MASK = 8, |
| 345 | OFPBMC_BAD_PREREQ = 9, |
| 346 | OFPBMC_DUP_FIELD = 10, |
| 347 | OFPBMC_EPERM = 11, |
| 348 | }; |
| 349 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 350 | enum ofp_flow_mod_failed_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 351 | OFPFMFC_UNKNOWN = 0, |
| 352 | OFPFMFC_TABLE_FULL = 1, |
| 353 | OFPFMFC_BAD_TABLE_ID = 2, |
| 354 | OFPFMFC_OVERLAP = 3, |
| 355 | OFPFMFC_EPERM = 4, |
| 356 | OFPFMFC_BAD_TIMEOUT = 5, |
| 357 | OFPFMFC_BAD_COMMAND = 6, |
| 358 | OFPFMFC_BAD_FLAGS = 7, |
| 359 | }; |
| 360 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 361 | enum ofp_group_mod_failed_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 362 | OFPGMFC_GROUP_EXISTS = 0, |
| 363 | OFPGMFC_INVALID_GROUP = 1, |
| 364 | OFPGMFC_WEIGHT_UNSUPPORTED = 2, |
| 365 | OFPGMFC_OUT_OF_GROUPS = 3, |
| 366 | OFPGMFC_OUT_OF_BUCKETS = 4, |
| 367 | OFPGMFC_CHAINING_UNSUPPORTED = 5, |
| 368 | OFPGMFC_WATCH_UNSUPPORTED = 6, |
| 369 | OFPGMFC_LOOP = 7, |
| 370 | OFPGMFC_UNKNOWN_GROUP = 8, |
| 371 | OFPGMFC_CHAINED_GROUP = 9, |
| 372 | OFPGMFC_BAD_TYPE = 10, |
| 373 | OFPGMFC_BAD_COMMAND = 11, |
| 374 | OFPGMFC_BAD_BUCKET = 12, |
| 375 | OFPGMFC_BAD_WATCH = 13, |
| 376 | OFPGMFC_EPERM = 14, |
| 377 | }; |
| 378 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 379 | enum ofp_port_mod_failed_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 380 | OFPPMFC_BAD_PORT = 0, |
| 381 | OFPPMFC_BAD_HW_ADDR = 1, |
| 382 | OFPPMFC_BAD_CONFIG = 2, |
| 383 | OFPPMFC_BAD_ADVERTISE = 3, |
| 384 | OFPPMFC_EPERM = 4, |
| 385 | }; |
| 386 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 387 | enum ofp_table_mod_failed_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 388 | OFPTMFC_BAD_TABLE = 0, |
| 389 | OFPTMFC_BAD_CONFIG = 1, |
| 390 | OFPTMFC_EPERM = 2, |
| 391 | }; |
| 392 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 393 | enum ofp_queue_op_failed_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 394 | OFPQOFC_BAD_PORT = 0, |
| 395 | OFPQOFC_BAD_QUEUE = 1, |
| 396 | OFPQOFC_EPERM = 2, |
| 397 | }; |
| 398 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 399 | enum ofp_switch_config_failed_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 400 | OFPSCFC_BAD_FLAGS = 0, |
| 401 | OFPSCFC_BAD_LEN = 1, |
| 402 | OFPSCFC_EPERM = 2, |
| 403 | }; |
| 404 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 405 | enum ofp_role_request_failed_code (wire_type=uint16_t){ |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 406 | OFPRRFC_STALE = 0, |
| 407 | OFPRRFC_UNSUP = 1, |
| 408 | OFPRRFC_BAD_ROLE = 2, |
| 409 | }; |
| 410 | |
Rob Vaterlaus | feee371 | 2013-09-30 11:24:19 -0700 | [diff] [blame] | 411 | enum ofp_stats_type(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 412 | OFPST_DESC = 0, |
| 413 | OFPST_FLOW = 1, |
| 414 | OFPST_AGGREGATE = 2, |
| 415 | OFPST_TABLE = 3, |
| 416 | OFPST_PORT = 4, |
| 417 | OFPST_QUEUE = 5, |
| 418 | OFPST_GROUP = 6, |
| 419 | OFPST_GROUP_DESC = 7, |
| 420 | OFPST_GROUP_FEATURES = 8, |
| 421 | OFPST_EXPERIMENTER = 0xffff, |
| 422 | }; |
| 423 | |
Andreas Wundsam | b47d7e8 | 2013-10-18 17:43:00 -0700 | [diff] [blame] | 424 | enum ofp_stats_request_flags(wire_type=uint16_t, bitmask=True) { |
| 425 | }; |
| 426 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 427 | enum ofp_stats_reply_flags(wire_type=uint16_t, bitmask=True) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 428 | OFPSF_REPLY_MORE = 0x1, |
| 429 | }; |
| 430 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 431 | enum ofp_group_capabilities(wire_type=uint32_t, bitmask=True) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 432 | OFPGFC_SELECT_WEIGHT = 0x1, |
| 433 | OFPGFC_SELECT_LIVENESS = 0x2, |
| 434 | OFPGFC_CHAINING = 0x4, |
| 435 | OFPGFC_CHAINING_CHECKS = 0x8, |
| 436 | }; |
| 437 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 438 | enum ofp_queue_properties(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 439 | OFPQT_MIN_RATE = 0x1, |
| 440 | OFPQT_MAX_RATE = 0x2, |
| 441 | OFPQT_EXPERIMENTER = 0xffff, |
| 442 | }; |
| 443 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 444 | enum ofp_controller_role(wire_type=uint32_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 445 | OFPCR_ROLE_NOCHANGE = 0, |
| 446 | OFPCR_ROLE_EQUAL = 1, |
| 447 | OFPCR_ROLE_MASTER = 2, |
| 448 | OFPCR_ROLE_SLAVE = 3, |
| 449 | }; |
| 450 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 451 | /* XXX rename to of_message */ |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 452 | struct of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 453 | uint8_t version; |
Andreas Wundsam | c37ba3d | 2013-08-02 17:51:51 -0700 | [diff] [blame] | 454 | uint8_t type == ?; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 455 | uint16_t length; |
| 456 | uint32_t xid; |
| 457 | }; |
| 458 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 459 | struct of_hello : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 460 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 461 | uint8_t type == 0; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 462 | uint16_t length; |
| 463 | uint32_t xid; |
| 464 | }; |
| 465 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 466 | struct of_echo_request : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 467 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 468 | uint8_t type == 2; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 469 | uint16_t length; |
| 470 | uint32_t xid; |
| 471 | of_octets_t data; |
| 472 | }; |
| 473 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 474 | struct of_echo_reply : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 475 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 476 | uint8_t type == 3; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 477 | uint16_t length; |
| 478 | uint32_t xid; |
| 479 | of_octets_t data; |
| 480 | }; |
| 481 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 482 | struct of_experimenter : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 483 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 484 | uint8_t type == 4; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 485 | uint16_t length; |
| 486 | uint32_t xid; |
Rich Lane | b25d07c | 2013-08-22 17:22:43 -0700 | [diff] [blame] | 487 | uint32_t experimenter == ?; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 488 | uint32_t subtype; |
| 489 | of_octets_t data; |
| 490 | }; |
| 491 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 492 | struct of_barrier_request : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 493 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 494 | uint8_t type == 20; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 495 | uint16_t length; |
| 496 | uint32_t xid; |
| 497 | }; |
| 498 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 499 | struct of_barrier_reply : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 500 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 501 | uint8_t type == 21; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 502 | uint16_t length; |
| 503 | uint32_t xid; |
| 504 | }; |
| 505 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 506 | struct of_get_config_request : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 507 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 508 | uint8_t type == 7; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 509 | uint16_t length; |
| 510 | uint32_t xid; |
| 511 | }; |
| 512 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 513 | struct of_get_config_reply : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 514 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 515 | uint8_t type == 8; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 516 | uint16_t length; |
| 517 | uint32_t xid; |
| 518 | uint16_t flags; |
| 519 | uint16_t miss_send_len; |
| 520 | }; |
| 521 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 522 | struct of_set_config : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 523 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 524 | uint8_t type == 9; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 525 | uint16_t length; |
| 526 | uint32_t xid; |
| 527 | uint16_t flags; |
| 528 | uint16_t miss_send_len; |
| 529 | }; |
| 530 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 531 | struct of_table_mod : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 532 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 533 | uint8_t type == 17; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 534 | uint16_t length; |
| 535 | uint32_t xid; |
| 536 | uint8_t table_id; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 537 | pad(3); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 538 | uint32_t config; |
| 539 | }; |
| 540 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 541 | struct of_port_desc { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 542 | of_port_no_t port_no; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 543 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 544 | of_mac_addr_t hw_addr; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 545 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 546 | of_port_name_t name; |
Rob Vaterlaus | d9d72d2 | 2013-09-23 14:50:52 -0700 | [diff] [blame] | 547 | enum ofp_port_config config; |
| 548 | enum ofp_port_state state; |
| 549 | enum ofp_port_features curr; |
| 550 | enum ofp_port_features advertised; |
| 551 | enum ofp_port_features supported; |
| 552 | enum ofp_port_features peer; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 553 | uint32_t curr_speed; |
| 554 | uint32_t max_speed; |
| 555 | }; |
| 556 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 557 | struct of_features_request : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 558 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 559 | uint8_t type == 5; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 560 | uint16_t length; |
| 561 | uint32_t xid; |
| 562 | }; |
| 563 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 564 | struct of_features_reply : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 565 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 566 | uint8_t type == 6; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 567 | uint16_t length; |
| 568 | uint32_t xid; |
| 569 | uint64_t datapath_id; |
| 570 | uint32_t n_buffers; |
| 571 | uint8_t n_tables; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 572 | pad(3); |
Rob Vaterlaus | feee371 | 2013-09-30 11:24:19 -0700 | [diff] [blame] | 573 | enum ofp_capabilities capabilities; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 574 | uint32_t reserved; |
| 575 | list(of_port_desc_t) ports; |
| 576 | }; |
| 577 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 578 | struct of_port_status : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 579 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 580 | uint8_t type == 12; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 581 | uint16_t length; |
| 582 | uint32_t xid; |
Rob Vaterlaus | d9d72d2 | 2013-09-23 14:50:52 -0700 | [diff] [blame] | 583 | enum ofp_port_reason reason; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 584 | pad(7); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 585 | of_port_desc_t desc; |
| 586 | }; |
| 587 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 588 | struct of_port_mod : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 589 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 590 | uint8_t type == 16; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 591 | uint16_t length; |
| 592 | uint32_t xid; |
| 593 | of_port_no_t port_no; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 594 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 595 | of_mac_addr_t hw_addr; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 596 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 597 | uint32_t config; |
| 598 | uint32_t mask; |
| 599 | uint32_t advertise; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 600 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 601 | }; |
| 602 | |
Andreas Wundsam | 5da6851 | 2013-10-22 22:18:00 -0700 | [diff] [blame] | 603 | struct of_match_v3(align=8, length_includes_align=False) { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 604 | uint16_t type == 1; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 605 | uint16_t length; |
| 606 | list(of_oxm_t) oxm_list; |
| 607 | }; |
| 608 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 609 | struct of_action_output : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 610 | uint16_t type == 0; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 611 | uint16_t len; |
| 612 | of_port_no_t port; |
| 613 | uint16_t max_len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 614 | pad(6); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 615 | }; |
| 616 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 617 | struct of_action_copy_ttl_out : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 618 | uint16_t type == 11; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 619 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 620 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 621 | }; |
| 622 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 623 | struct of_action_copy_ttl_in : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 624 | uint16_t type == 12; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 625 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 626 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 627 | }; |
| 628 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 629 | struct of_action_set_mpls_ttl : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 630 | uint16_t type == 15; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 631 | uint16_t len; |
| 632 | uint8_t mpls_ttl; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 633 | pad(3); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 634 | }; |
| 635 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 636 | struct of_action_dec_mpls_ttl : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 637 | uint16_t type == 16; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 638 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 639 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 640 | }; |
| 641 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 642 | struct of_action_push_vlan : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 643 | uint16_t type == 17; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 644 | uint16_t len; |
| 645 | uint16_t ethertype; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 646 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 647 | }; |
| 648 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 649 | struct of_action_pop_vlan : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 650 | uint16_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 651 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 652 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 653 | }; |
| 654 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 655 | struct of_action_push_mpls : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 656 | uint16_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 657 | uint16_t len; |
| 658 | uint16_t ethertype; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 659 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 660 | }; |
| 661 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 662 | struct of_action_pop_mpls : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 663 | uint16_t type == 20; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 664 | uint16_t len; |
| 665 | uint16_t ethertype; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 666 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 667 | }; |
| 668 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 669 | struct of_action_set_queue : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 670 | uint16_t type == 21; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 671 | uint16_t len; |
| 672 | uint32_t queue_id; |
| 673 | }; |
| 674 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 675 | struct of_action_group : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 676 | uint16_t type == 22; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 677 | uint16_t len; |
| 678 | uint32_t group_id; |
| 679 | }; |
| 680 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 681 | struct of_action_set_nw_ttl : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 682 | uint16_t type == 23; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 683 | uint16_t len; |
| 684 | uint8_t nw_ttl; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 685 | pad(3); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 686 | }; |
| 687 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 688 | struct of_action_dec_nw_ttl : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 689 | uint16_t type == 24; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 690 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 691 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 692 | }; |
| 693 | |
Andreas Wundsam | 5da6851 | 2013-10-22 22:18:00 -0700 | [diff] [blame] | 694 | struct of_action_set_field(align=8, length_includes_align=True) : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 695 | uint16_t type == 25; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 696 | uint16_t len; |
Rich Lane | be90eae | 2013-07-22 16:44:26 -0700 | [diff] [blame] | 697 | of_oxm_t field; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 698 | }; |
| 699 | |
Andreas Wundsam | 5da6851 | 2013-10-22 22:18:00 -0700 | [diff] [blame] | 700 | struct of_action_experimenter(align=8, length_includes_align=True) : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 701 | uint16_t type == 65535; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 702 | uint16_t len; |
Rich Lane | b25d07c | 2013-08-22 17:22:43 -0700 | [diff] [blame] | 703 | uint32_t experimenter == ?; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 704 | of_octets_t data; |
| 705 | }; |
| 706 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 707 | struct of_action { |
Andreas Wundsam | c37ba3d | 2013-08-02 17:51:51 -0700 | [diff] [blame] | 708 | uint16_t type == ?; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 709 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 710 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 711 | }; |
| 712 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 713 | struct of_instruction { |
Andreas Wundsam | c37ba3d | 2013-08-02 17:51:51 -0700 | [diff] [blame] | 714 | uint16_t type == ?; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 715 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 716 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 717 | }; |
| 718 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 719 | struct of_instruction_goto_table : of_instruction { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 720 | uint16_t type == 1; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 721 | uint16_t len; |
| 722 | uint8_t table_id; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 723 | pad(3); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 724 | }; |
| 725 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 726 | struct of_instruction_write_metadata : of_instruction { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 727 | uint16_t type == 2; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 728 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 729 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 730 | uint64_t metadata; |
| 731 | uint64_t metadata_mask; |
| 732 | }; |
| 733 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 734 | struct of_instruction_write_actions : of_instruction { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 735 | uint16_t type == 3; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 736 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 737 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 738 | list(of_action_t) actions; |
| 739 | }; |
| 740 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 741 | struct of_instruction_apply_actions : of_instruction { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 742 | uint16_t type == 4; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 743 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 744 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 745 | list(of_action_t) actions; |
| 746 | }; |
| 747 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 748 | struct of_instruction_clear_actions : of_instruction { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 749 | uint16_t type == 5; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 750 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 751 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 752 | }; |
| 753 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 754 | struct of_instruction_experimenter : of_instruction { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 755 | uint16_t type == 65535; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 756 | uint16_t len; |
Rich Lane | b25d07c | 2013-08-22 17:22:43 -0700 | [diff] [blame] | 757 | uint32_t experimenter == ?; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 758 | of_octets_t data; |
| 759 | }; |
| 760 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 761 | struct of_flow_mod : of_header { |
| 762 | uint8_t version; |
| 763 | uint8_t type == 14; |
| 764 | uint16_t length; |
| 765 | uint32_t xid; |
| 766 | uint64_t cookie; |
| 767 | uint64_t cookie_mask; |
| 768 | uint8_t table_id; |
Andreas Wundsam | c37ba3d | 2013-08-02 17:51:51 -0700 | [diff] [blame] | 769 | of_fm_cmd_t _command == ?; |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 770 | uint16_t idle_timeout; |
| 771 | uint16_t hard_timeout; |
| 772 | uint16_t priority; |
| 773 | uint32_t buffer_id; |
| 774 | of_port_no_t out_port; |
| 775 | uint32_t out_group; |
Andreas Wundsam | dfeb594 | 2013-09-19 13:07:49 -0700 | [diff] [blame] | 776 | enum ofp_flow_mod_flags flags; |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 777 | pad(2); |
| 778 | of_match_t match; |
| 779 | list(of_instruction_t) instructions; |
| 780 | }; |
| 781 | |
| 782 | struct of_flow_add : of_flow_mod { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 783 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 784 | uint8_t type == 14; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 785 | uint16_t length; |
| 786 | uint32_t xid; |
| 787 | uint64_t cookie; |
| 788 | uint64_t cookie_mask; |
| 789 | uint8_t table_id; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 790 | of_fm_cmd_t _command == 0; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 791 | uint16_t idle_timeout; |
| 792 | uint16_t hard_timeout; |
| 793 | uint16_t priority; |
| 794 | uint32_t buffer_id; |
| 795 | of_port_no_t out_port; |
| 796 | uint32_t out_group; |
Andreas Wundsam | dfeb594 | 2013-09-19 13:07:49 -0700 | [diff] [blame] | 797 | enum ofp_flow_mod_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 798 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 799 | of_match_t match; |
| 800 | list(of_instruction_t) instructions; |
| 801 | }; |
| 802 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 803 | struct of_flow_modify : of_flow_mod { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 804 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 805 | uint8_t type == 14; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 806 | uint16_t length; |
| 807 | uint32_t xid; |
| 808 | uint64_t cookie; |
| 809 | uint64_t cookie_mask; |
| 810 | uint8_t table_id; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 811 | of_fm_cmd_t _command == 1; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 812 | uint16_t idle_timeout; |
| 813 | uint16_t hard_timeout; |
| 814 | uint16_t priority; |
| 815 | uint32_t buffer_id; |
| 816 | of_port_no_t out_port; |
| 817 | uint32_t out_group; |
Andreas Wundsam | dfeb594 | 2013-09-19 13:07:49 -0700 | [diff] [blame] | 818 | enum ofp_flow_mod_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 819 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 820 | of_match_t match; |
| 821 | list(of_instruction_t) instructions; |
| 822 | }; |
| 823 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 824 | struct of_flow_modify_strict : of_flow_mod { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 825 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 826 | uint8_t type == 14; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 827 | uint16_t length; |
| 828 | uint32_t xid; |
| 829 | uint64_t cookie; |
| 830 | uint64_t cookie_mask; |
| 831 | uint8_t table_id; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 832 | of_fm_cmd_t _command == 2; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 833 | uint16_t idle_timeout; |
| 834 | uint16_t hard_timeout; |
| 835 | uint16_t priority; |
| 836 | uint32_t buffer_id; |
| 837 | of_port_no_t out_port; |
| 838 | uint32_t out_group; |
Andreas Wundsam | dfeb594 | 2013-09-19 13:07:49 -0700 | [diff] [blame] | 839 | enum ofp_flow_mod_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 840 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 841 | of_match_t match; |
| 842 | list(of_instruction_t) instructions; |
| 843 | }; |
| 844 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 845 | struct of_flow_delete : of_flow_mod { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 846 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 847 | uint8_t type == 14; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 848 | uint16_t length; |
| 849 | uint32_t xid; |
| 850 | uint64_t cookie; |
| 851 | uint64_t cookie_mask; |
| 852 | uint8_t table_id; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 853 | of_fm_cmd_t _command == 3; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 854 | uint16_t idle_timeout; |
| 855 | uint16_t hard_timeout; |
| 856 | uint16_t priority; |
| 857 | uint32_t buffer_id; |
| 858 | of_port_no_t out_port; |
| 859 | uint32_t out_group; |
Andreas Wundsam | dfeb594 | 2013-09-19 13:07:49 -0700 | [diff] [blame] | 860 | enum ofp_flow_mod_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 861 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 862 | of_match_t match; |
| 863 | list(of_instruction_t) instructions; |
| 864 | }; |
| 865 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 866 | struct of_flow_delete_strict : of_flow_mod { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 867 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 868 | uint8_t type == 14; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 869 | uint16_t length; |
| 870 | uint32_t xid; |
| 871 | uint64_t cookie; |
| 872 | uint64_t cookie_mask; |
| 873 | uint8_t table_id; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 874 | of_fm_cmd_t _command == 4; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 875 | uint16_t idle_timeout; |
| 876 | uint16_t hard_timeout; |
| 877 | uint16_t priority; |
| 878 | uint32_t buffer_id; |
| 879 | of_port_no_t out_port; |
| 880 | uint32_t out_group; |
Andreas Wundsam | dfeb594 | 2013-09-19 13:07:49 -0700 | [diff] [blame] | 881 | enum ofp_flow_mod_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 882 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 883 | of_match_t match; |
| 884 | list(of_instruction_t) instructions; |
| 885 | }; |
| 886 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 887 | struct of_bucket { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 888 | uint16_t len; |
| 889 | uint16_t weight; |
| 890 | of_port_no_t watch_port; |
| 891 | uint32_t watch_group; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 892 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 893 | list(of_action_t) actions; |
| 894 | }; |
| 895 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 896 | struct of_group_mod : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 897 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 898 | uint8_t type == 15; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 899 | uint16_t length; |
| 900 | uint32_t xid; |
| 901 | uint16_t command; |
| 902 | uint8_t group_type; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 903 | pad(1); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 904 | uint32_t group_id; |
| 905 | list(of_bucket_t) buckets; |
| 906 | }; |
| 907 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 908 | struct of_packet_out : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 909 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 910 | uint8_t type == 13; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 911 | uint16_t length; |
| 912 | uint32_t xid; |
| 913 | uint32_t buffer_id; |
| 914 | of_port_no_t in_port; |
| 915 | uint16_t actions_len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 916 | pad(6); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 917 | list(of_action_t) actions; |
| 918 | of_octets_t data; |
| 919 | }; |
| 920 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 921 | struct of_packet_in : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 922 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 923 | uint8_t type == 10; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 924 | uint16_t length; |
| 925 | uint32_t xid; |
| 926 | uint32_t buffer_id; |
| 927 | uint16_t total_len; |
| 928 | uint8_t reason; |
| 929 | uint8_t table_id; |
| 930 | of_match_t match; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 931 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 932 | of_octets_t data; /* FIXME: Ensure total_len gets updated */ |
| 933 | }; |
| 934 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 935 | struct of_flow_removed : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 936 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 937 | uint8_t type == 11; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 938 | uint16_t length; |
| 939 | uint32_t xid; |
| 940 | uint64_t cookie; |
| 941 | uint16_t priority; |
| 942 | uint8_t reason; |
| 943 | uint8_t table_id; |
| 944 | uint32_t duration_sec; |
| 945 | uint32_t duration_nsec; |
| 946 | uint16_t idle_timeout; |
| 947 | uint16_t hard_timeout; |
| 948 | uint64_t packet_count; |
| 949 | uint64_t byte_count; |
| 950 | of_match_t match; |
| 951 | }; |
| 952 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 953 | struct of_error_msg : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 954 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 955 | uint8_t type == 1; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 956 | uint16_t length; |
| 957 | uint32_t xid; |
Rob Vaterlaus | feee371 | 2013-09-30 11:24:19 -0700 | [diff] [blame] | 958 | uint16_t err_type == ?; |
| 959 | }; |
| 960 | |
| 961 | struct of_hello_failed_error_msg : of_error_msg { |
| 962 | uint8_t version; |
| 963 | uint8_t type == 1; |
| 964 | uint16_t length; |
| 965 | uint32_t xid; |
| 966 | uint16_t err_type == 0; |
| 967 | enum ofp_hello_failed_code code; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 968 | of_octets_t data; |
| 969 | }; |
| 970 | |
Rob Vaterlaus | feee371 | 2013-09-30 11:24:19 -0700 | [diff] [blame] | 971 | struct of_bad_request_error_msg : of_error_msg { |
| 972 | uint8_t version; |
| 973 | uint8_t type == 1; |
| 974 | uint16_t length; |
| 975 | uint32_t xid; |
| 976 | uint16_t err_type == 1; |
| 977 | enum ofp_bad_request_code code; |
| 978 | of_octets_t data; |
| 979 | }; |
| 980 | |
| 981 | struct of_bad_action_error_msg : of_error_msg { |
| 982 | uint8_t version; |
| 983 | uint8_t type == 1; |
| 984 | uint16_t length; |
| 985 | uint32_t xid; |
| 986 | uint16_t err_type == 2; |
| 987 | enum ofp_bad_action_code code; |
| 988 | of_octets_t data; |
| 989 | }; |
| 990 | |
| 991 | struct of_bad_instruction_error_msg : of_error_msg { |
| 992 | uint8_t version; |
| 993 | uint8_t type == 1; |
| 994 | uint16_t length; |
| 995 | uint32_t xid; |
| 996 | uint16_t err_type == 3; |
| 997 | enum ofp_bad_instruction_code code; |
| 998 | of_octets_t data; |
| 999 | }; |
| 1000 | |
| 1001 | struct of_bad_match_error_msg : of_error_msg { |
| 1002 | uint8_t version; |
| 1003 | uint8_t type == 1; |
| 1004 | uint16_t length; |
| 1005 | uint32_t xid; |
| 1006 | uint16_t err_type == 4; |
| 1007 | enum ofp_bad_match_code code; |
| 1008 | of_octets_t data; |
| 1009 | }; |
| 1010 | |
| 1011 | struct of_flow_mod_failed_error_msg : of_error_msg { |
| 1012 | uint8_t version; |
| 1013 | uint8_t type == 1; |
| 1014 | uint16_t length; |
| 1015 | uint32_t xid; |
| 1016 | uint16_t err_type == 5; |
| 1017 | enum ofp_flow_mod_failed_code code; |
| 1018 | of_octets_t data; |
| 1019 | }; |
| 1020 | |
| 1021 | struct of_group_mod_failed_error_msg : of_error_msg { |
| 1022 | uint8_t version; |
| 1023 | uint8_t type == 1; |
| 1024 | uint16_t length; |
| 1025 | uint32_t xid; |
| 1026 | uint16_t err_type == 6; |
| 1027 | enum ofp_group_mod_failed_code code; |
| 1028 | of_octets_t data; |
| 1029 | }; |
| 1030 | |
| 1031 | struct of_port_mod_failed_error_msg : of_error_msg { |
| 1032 | uint8_t version; |
| 1033 | uint8_t type == 1; |
| 1034 | uint16_t length; |
| 1035 | uint32_t xid; |
| 1036 | uint16_t err_type == 7; |
| 1037 | enum ofp_port_mod_failed_code code; |
| 1038 | of_octets_t data; |
| 1039 | }; |
| 1040 | |
| 1041 | struct of_table_mod_failed_error_msg : of_error_msg { |
| 1042 | uint8_t version; |
| 1043 | uint8_t type == 1; |
| 1044 | uint16_t length; |
| 1045 | uint32_t xid; |
| 1046 | uint16_t err_type == 8; |
| 1047 | enum ofp_table_mod_failed_code code; |
| 1048 | of_octets_t data; |
| 1049 | }; |
| 1050 | |
| 1051 | struct of_queue_op_failed_error_msg : of_error_msg { |
| 1052 | uint8_t version; |
| 1053 | uint8_t type == 1; |
| 1054 | uint16_t length; |
| 1055 | uint32_t xid; |
| 1056 | uint16_t err_type == 9; |
| 1057 | enum ofp_queue_op_failed_code code; |
| 1058 | of_octets_t data; |
| 1059 | }; |
| 1060 | |
| 1061 | struct of_switch_config_failed_error_msg : of_error_msg { |
| 1062 | uint8_t version; |
| 1063 | uint8_t type == 1; |
| 1064 | uint16_t length; |
| 1065 | uint32_t xid; |
| 1066 | uint16_t err_type == 10; |
| 1067 | enum ofp_switch_config_failed_code code; |
| 1068 | of_octets_t data; |
| 1069 | }; |
| 1070 | |
| 1071 | struct of_role_request_failed_error_msg : of_error_msg { |
| 1072 | uint8_t version; |
| 1073 | uint8_t type == 1; |
| 1074 | uint16_t length; |
| 1075 | uint32_t xid; |
| 1076 | uint16_t err_type == 11; |
| 1077 | enum ofp_role_request_failed_code code; |
| 1078 | of_octets_t data; |
| 1079 | }; |
| 1080 | |
| 1081 | struct of_experimenter_error_msg { |
| 1082 | uint8_t version; |
| 1083 | uint8_t type == 1; |
| 1084 | uint16_t length; |
| 1085 | uint32_t xid; |
| 1086 | uint16_t err_type == 0xffff; |
| 1087 | uint16_t subtype; |
| 1088 | uint32_t experimenter; |
| 1089 | of_octets_t data; |
| 1090 | }; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1091 | |
| 1092 | // STATS ENTRIES: flow, table, port, queue, group stats, group desc stats |
| 1093 | // FIXME: Verify disambiguation w/ length in object and entry |
| 1094 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1095 | struct of_flow_stats_entry { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1096 | uint16_t length; |
| 1097 | uint8_t table_id; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1098 | pad(1); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1099 | uint32_t duration_sec; |
| 1100 | uint32_t duration_nsec; |
| 1101 | uint16_t priority; |
| 1102 | uint16_t idle_timeout; |
| 1103 | uint16_t hard_timeout; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1104 | pad(6); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1105 | uint64_t cookie; |
| 1106 | uint64_t packet_count; |
| 1107 | uint64_t byte_count; |
| 1108 | of_match_t match; |
| 1109 | list(of_instruction_t) instructions; |
| 1110 | }; |
| 1111 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1112 | struct of_table_stats_entry { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1113 | uint8_t table_id; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1114 | pad(7); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1115 | of_table_name_t name; |
| 1116 | of_match_bmap_t match; |
| 1117 | of_wc_bmap_t wildcards; |
| 1118 | uint32_t write_actions; |
| 1119 | uint32_t apply_actions; |
| 1120 | uint64_t write_setfields; |
| 1121 | uint64_t apply_setfields; |
| 1122 | uint64_t metadata_match; |
| 1123 | uint64_t metadata_write; |
| 1124 | uint32_t instructions; |
| 1125 | uint32_t config; |
| 1126 | uint32_t max_entries; |
| 1127 | uint32_t active_count; |
| 1128 | uint64_t lookup_count; |
| 1129 | uint64_t matched_count; |
| 1130 | }; |
| 1131 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1132 | struct of_port_stats_entry { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1133 | of_port_no_t port_no; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1134 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1135 | uint64_t rx_packets; |
| 1136 | uint64_t tx_packets; |
| 1137 | uint64_t rx_bytes; |
| 1138 | uint64_t tx_bytes; |
| 1139 | uint64_t rx_dropped; |
| 1140 | uint64_t tx_dropped; |
| 1141 | uint64_t rx_errors; |
| 1142 | uint64_t tx_errors; |
| 1143 | uint64_t rx_frame_err; |
| 1144 | uint64_t rx_over_err; |
| 1145 | uint64_t rx_crc_err; |
| 1146 | uint64_t collisions; |
| 1147 | }; |
| 1148 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1149 | struct of_queue_stats_entry { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1150 | of_port_no_t port_no; |
| 1151 | uint32_t queue_id; |
| 1152 | uint64_t tx_bytes; |
| 1153 | uint64_t tx_packets; |
| 1154 | uint64_t tx_errors; |
| 1155 | }; |
| 1156 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1157 | struct of_bucket_counter { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1158 | uint64_t packet_count; |
| 1159 | uint64_t byte_count; |
| 1160 | }; |
| 1161 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1162 | struct of_group_stats_entry { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1163 | uint16_t length; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1164 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1165 | uint32_t group_id; |
| 1166 | uint32_t ref_count; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1167 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1168 | uint64_t packet_count; |
| 1169 | uint64_t byte_count; |
| 1170 | list(of_bucket_counter_t) bucket_stats; |
| 1171 | }; |
| 1172 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1173 | struct of_group_desc_stats_entry { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1174 | uint16_t length; |
Rich Lane | 35e7ac7 | 2013-10-15 10:36:10 -0700 | [diff] [blame] | 1175 | uint8_t group_type; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1176 | pad(1); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1177 | uint32_t group_id; |
| 1178 | list(of_bucket_t) buckets; |
| 1179 | }; |
| 1180 | |
| 1181 | // STATS: |
| 1182 | // Desc, flow, agg, table, port, queue, group, group_desc, group_feat, experi |
| 1183 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1184 | struct of_stats_request : of_header { |
| 1185 | uint8_t version; |
| 1186 | uint8_t type == 18; |
| 1187 | uint16_t length; |
| 1188 | uint32_t xid; |
Andreas Wundsam | c37ba3d | 2013-08-02 17:51:51 -0700 | [diff] [blame] | 1189 | uint16_t stats_type == ?; |
Andreas Wundsam | b47d7e8 | 2013-10-18 17:43:00 -0700 | [diff] [blame] | 1190 | enum ofp_stats_request_flags flags; |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1191 | pad(4); |
| 1192 | }; |
| 1193 | |
| 1194 | struct of_stats_reply : of_header { |
| 1195 | uint8_t version; |
| 1196 | uint8_t type == 19; |
| 1197 | uint16_t length; |
| 1198 | uint32_t xid; |
Andreas Wundsam | c37ba3d | 2013-08-02 17:51:51 -0700 | [diff] [blame] | 1199 | uint16_t stats_type == ?; |
Andreas Wundsam | b47d7e8 | 2013-10-18 17:43:00 -0700 | [diff] [blame] | 1200 | enum ofp_stats_reply_flags flags; |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1201 | pad(4); |
| 1202 | }; |
| 1203 | |
| 1204 | struct of_desc_stats_request : of_stats_request { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1205 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1206 | uint8_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1207 | uint16_t length; |
| 1208 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1209 | uint16_t stats_type == 0; |
Andreas Wundsam | b47d7e8 | 2013-10-18 17:43:00 -0700 | [diff] [blame] | 1210 | enum ofp_stats_request_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1211 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1212 | }; |
| 1213 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1214 | struct of_desc_stats_reply : of_stats_reply { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1215 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1216 | uint8_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1217 | uint16_t length; |
| 1218 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1219 | uint16_t stats_type == 0; |
Andreas Wundsam | b47d7e8 | 2013-10-18 17:43:00 -0700 | [diff] [blame] | 1220 | enum ofp_stats_reply_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1221 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1222 | of_desc_str_t mfr_desc; |
| 1223 | of_desc_str_t hw_desc; |
| 1224 | of_desc_str_t sw_desc; |
| 1225 | of_serial_num_t serial_num; |
| 1226 | of_desc_str_t dp_desc; |
| 1227 | }; |
| 1228 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1229 | struct of_flow_stats_request : of_stats_request { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1230 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1231 | uint8_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1232 | uint16_t length; |
| 1233 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1234 | uint16_t stats_type == 1; |
Andreas Wundsam | b47d7e8 | 2013-10-18 17:43:00 -0700 | [diff] [blame] | 1235 | enum ofp_stats_request_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1236 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1237 | uint8_t table_id; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1238 | pad(3); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1239 | of_port_no_t out_port; |
| 1240 | uint32_t out_group; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1241 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1242 | uint64_t cookie; |
| 1243 | uint64_t cookie_mask; |
| 1244 | of_match_t match; |
| 1245 | }; |
| 1246 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1247 | struct of_flow_stats_reply : of_stats_reply { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1248 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1249 | uint8_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1250 | uint16_t length; |
| 1251 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1252 | uint16_t stats_type == 1; |
Andreas Wundsam | b47d7e8 | 2013-10-18 17:43:00 -0700 | [diff] [blame] | 1253 | enum ofp_stats_reply_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1254 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1255 | list(of_flow_stats_entry_t) entries; |
| 1256 | }; |
| 1257 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1258 | struct of_aggregate_stats_request : of_stats_request { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1259 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1260 | uint8_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1261 | uint16_t length; |
| 1262 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1263 | uint16_t stats_type == 2; |
Andreas Wundsam | b47d7e8 | 2013-10-18 17:43:00 -0700 | [diff] [blame] | 1264 | enum ofp_stats_request_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1265 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1266 | uint8_t table_id; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1267 | pad(3); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1268 | of_port_no_t out_port; |
| 1269 | uint32_t out_group; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1270 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1271 | uint64_t cookie; |
| 1272 | uint64_t cookie_mask; |
| 1273 | of_match_t match; |
| 1274 | }; |
| 1275 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1276 | struct of_aggregate_stats_reply : of_stats_reply { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1277 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1278 | uint8_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1279 | uint16_t length; |
| 1280 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1281 | uint16_t stats_type == 2; |
Andreas Wundsam | b47d7e8 | 2013-10-18 17:43:00 -0700 | [diff] [blame] | 1282 | enum ofp_stats_reply_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1283 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1284 | uint64_t packet_count; |
| 1285 | uint64_t byte_count; |
| 1286 | uint32_t flow_count; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1287 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1288 | }; |
| 1289 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1290 | struct of_table_stats_request : of_stats_request { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1291 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1292 | uint8_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1293 | uint16_t length; |
| 1294 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1295 | uint16_t stats_type == 3; |
Andreas Wundsam | b47d7e8 | 2013-10-18 17:43:00 -0700 | [diff] [blame] | 1296 | enum ofp_stats_request_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1297 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1298 | }; |
| 1299 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1300 | struct of_table_stats_reply : of_stats_reply { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1301 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1302 | uint8_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1303 | uint16_t length; |
| 1304 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1305 | uint16_t stats_type == 3; |
Andreas Wundsam | b47d7e8 | 2013-10-18 17:43:00 -0700 | [diff] [blame] | 1306 | enum ofp_stats_reply_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1307 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1308 | list(of_table_stats_entry_t) entries; |
| 1309 | }; |
| 1310 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1311 | struct of_port_stats_request : of_stats_request { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1312 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1313 | uint8_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1314 | uint16_t length; |
| 1315 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1316 | uint16_t stats_type == 4; |
Andreas Wundsam | b47d7e8 | 2013-10-18 17:43:00 -0700 | [diff] [blame] | 1317 | enum ofp_stats_request_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1318 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1319 | of_port_no_t port_no; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1320 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1321 | }; |
| 1322 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1323 | struct of_port_stats_reply : of_stats_reply { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1324 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1325 | uint8_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1326 | uint16_t length; |
| 1327 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1328 | uint16_t stats_type == 4; |
Andreas Wundsam | b47d7e8 | 2013-10-18 17:43:00 -0700 | [diff] [blame] | 1329 | enum ofp_stats_reply_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1330 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1331 | list(of_port_stats_entry_t) entries; |
| 1332 | }; |
| 1333 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1334 | struct of_queue_stats_request : of_stats_request { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1335 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1336 | uint8_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1337 | uint16_t length; |
| 1338 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1339 | uint16_t stats_type == 5; |
Andreas Wundsam | b47d7e8 | 2013-10-18 17:43:00 -0700 | [diff] [blame] | 1340 | enum ofp_stats_request_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1341 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1342 | of_port_no_t port_no; |
| 1343 | uint32_t queue_id; |
| 1344 | }; |
| 1345 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1346 | struct of_queue_stats_reply : of_stats_reply { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1347 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1348 | uint8_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1349 | uint16_t length; |
| 1350 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1351 | uint16_t stats_type == 5; |
Andreas Wundsam | b47d7e8 | 2013-10-18 17:43:00 -0700 | [diff] [blame] | 1352 | enum ofp_stats_reply_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1353 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1354 | list(of_queue_stats_entry_t) entries; |
| 1355 | }; |
| 1356 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1357 | struct of_group_stats_request : of_stats_request { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1358 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1359 | uint8_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1360 | uint16_t length; |
| 1361 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1362 | uint16_t stats_type == 6; |
Andreas Wundsam | b47d7e8 | 2013-10-18 17:43:00 -0700 | [diff] [blame] | 1363 | enum ofp_stats_request_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1364 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1365 | uint32_t group_id; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1366 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1367 | }; |
| 1368 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1369 | struct of_group_stats_reply : of_stats_reply { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1370 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1371 | uint8_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1372 | uint16_t length; |
| 1373 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1374 | uint16_t stats_type == 6; |
Andreas Wundsam | b47d7e8 | 2013-10-18 17:43:00 -0700 | [diff] [blame] | 1375 | enum ofp_stats_reply_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1376 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1377 | list(of_group_stats_entry_t) entries; |
| 1378 | }; |
| 1379 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1380 | struct of_group_desc_stats_request : of_stats_request { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1381 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1382 | uint8_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1383 | uint16_t length; |
| 1384 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1385 | uint16_t stats_type == 7; |
Andreas Wundsam | b47d7e8 | 2013-10-18 17:43:00 -0700 | [diff] [blame] | 1386 | enum ofp_stats_request_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1387 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1388 | }; |
| 1389 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1390 | struct of_group_desc_stats_reply : of_stats_reply { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1391 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1392 | uint8_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1393 | uint16_t length; |
| 1394 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1395 | uint16_t stats_type == 7; |
Andreas Wundsam | b47d7e8 | 2013-10-18 17:43:00 -0700 | [diff] [blame] | 1396 | enum ofp_stats_reply_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1397 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1398 | list(of_group_desc_stats_entry_t) entries; |
| 1399 | }; |
| 1400 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1401 | struct of_group_features_stats_request : of_stats_request { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1402 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1403 | uint8_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1404 | uint16_t length; |
| 1405 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1406 | uint16_t stats_type == 8; |
Andreas Wundsam | b47d7e8 | 2013-10-18 17:43:00 -0700 | [diff] [blame] | 1407 | enum ofp_stats_request_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1408 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1409 | }; |
| 1410 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1411 | struct of_group_features_stats_reply : of_stats_reply { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1412 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1413 | uint8_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1414 | uint16_t length; |
| 1415 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1416 | uint16_t stats_type == 8; |
Andreas Wundsam | b47d7e8 | 2013-10-18 17:43:00 -0700 | [diff] [blame] | 1417 | enum ofp_stats_reply_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1418 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1419 | uint32_t types; |
| 1420 | uint32_t capabilities; |
| 1421 | uint32_t max_groups_all; |
| 1422 | uint32_t max_groups_select; |
| 1423 | uint32_t max_groups_indirect; |
| 1424 | uint32_t max_groups_ff; |
| 1425 | uint32_t actions_all; |
| 1426 | uint32_t actions_select; |
| 1427 | uint32_t actions_indirect; |
| 1428 | uint32_t actions_ff; |
| 1429 | }; |
| 1430 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1431 | struct of_experimenter_stats_request : of_stats_request { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1432 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1433 | uint8_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1434 | uint16_t length; |
| 1435 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1436 | uint16_t stats_type == 0xffff; |
Andreas Wundsam | b47d7e8 | 2013-10-18 17:43:00 -0700 | [diff] [blame] | 1437 | enum ofp_stats_request_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1438 | pad(4); |
Rich Lane | b25d07c | 2013-08-22 17:22:43 -0700 | [diff] [blame] | 1439 | uint32_t experimenter == ?; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1440 | uint32_t subtype; |
| 1441 | of_octets_t data; |
| 1442 | }; |
| 1443 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1444 | struct of_experimenter_stats_reply : of_stats_reply { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1445 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1446 | uint8_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1447 | uint16_t length; |
| 1448 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1449 | uint16_t stats_type == 0xffff; |
Andreas Wundsam | b47d7e8 | 2013-10-18 17:43:00 -0700 | [diff] [blame] | 1450 | enum ofp_stats_reply_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1451 | pad(4); |
Rich Lane | b25d07c | 2013-08-22 17:22:43 -0700 | [diff] [blame] | 1452 | uint32_t experimenter == ?; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1453 | uint32_t subtype; |
| 1454 | of_octets_t data; |
| 1455 | }; |
| 1456 | |
| 1457 | // END OF STATS OBJECTS |
| 1458 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1459 | struct of_queue_prop { |
Andreas Wundsam | c37ba3d | 2013-08-02 17:51:51 -0700 | [diff] [blame] | 1460 | uint16_t type == ?; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1461 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1462 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1463 | }; |
| 1464 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1465 | struct of_queue_prop_min_rate : of_queue_prop { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1466 | uint16_t type == 1; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1467 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1468 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1469 | uint16_t rate; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1470 | pad(6); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1471 | }; |
| 1472 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1473 | struct of_queue_prop_max_rate : of_queue_prop { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1474 | uint16_t type == 2; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1475 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1476 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1477 | uint16_t rate; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1478 | pad(6); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1479 | }; |
| 1480 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1481 | struct of_queue_prop_experimenter : of_queue_prop { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1482 | uint16_t type == 65535; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1483 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1484 | pad(4); |
Rich Lane | b25d07c | 2013-08-22 17:22:43 -0700 | [diff] [blame] | 1485 | uint32_t experimenter == ?; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1486 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1487 | of_octets_t data; |
| 1488 | }; |
| 1489 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1490 | struct of_packet_queue { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1491 | uint32_t queue_id; |
| 1492 | of_port_no_t port; |
| 1493 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1494 | pad(6); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1495 | list(of_queue_prop_t) properties; |
| 1496 | }; |
| 1497 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1498 | struct of_queue_get_config_request : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1499 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1500 | uint8_t type == 22; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1501 | uint16_t length; |
| 1502 | uint32_t xid; |
| 1503 | of_port_no_t port; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1504 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1505 | }; |
| 1506 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1507 | struct of_queue_get_config_reply : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1508 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1509 | uint8_t type == 23; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1510 | uint16_t length; |
| 1511 | uint32_t xid; |
| 1512 | of_port_no_t port; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1513 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1514 | list(of_packet_queue_t) queues; |
| 1515 | }; |
| 1516 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1517 | struct of_role_request : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1518 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1519 | uint8_t type == 24; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1520 | uint16_t length; |
| 1521 | uint32_t xid; |
Andreas Wundsam | 4f796b7 | 2013-10-18 17:33:23 -0700 | [diff] [blame] | 1522 | enum ofp_controller_role role; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1523 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1524 | uint64_t generation_id; |
| 1525 | }; |
| 1526 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1527 | struct of_role_reply : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1528 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1529 | uint8_t type == 25; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1530 | uint16_t length; |
| 1531 | uint32_t xid; |
Andreas Wundsam | 4f796b7 | 2013-10-18 17:33:23 -0700 | [diff] [blame] | 1532 | enum ofp_controller_role role; |
| 1533 | pad(4); |
| 1534 | uint64_t generation_id; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1535 | }; |