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