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 4 |
| 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 | OFPQ_MAX_RATE_UNCFG = 0xffff, |
| 58 | OFPQ_MIN_RATE_UNCFG = 0xffff, |
| 59 | }; |
| 60 | |
Andreas Wundsam | 7933beb | 2013-08-02 22:36:42 -0700 | [diff] [blame] | 61 | enum ofp_port_no(wire_type=uint32_t, complete=False) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 62 | OFPP_ANY = 0xffffffff, |
| 63 | }; |
| 64 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 65 | enum ofp_port(wire_type=uint32_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 66 | OFPP_MAX = 0xffffff00, |
| 67 | OFPP_IN_PORT = 0xfffffff8, |
| 68 | OFPP_TABLE = 0xfffffff9, |
| 69 | OFPP_NORMAL = 0xfffffffa, |
| 70 | OFPP_FLOOD = 0xfffffffb, |
| 71 | OFPP_ALL = 0xfffffffc, |
| 72 | OFPP_CONTROLLER = 0xfffffffd, |
| 73 | OFPP_LOCAL = 0xfffffffe, |
| 74 | }; |
| 75 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 76 | enum ofp_type(wire_type=uint8_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 77 | OFPT_HELLO = 0, |
| 78 | OFPT_ERROR = 1, |
| 79 | OFPT_ECHO_REQUEST = 2, |
| 80 | OFPT_ECHO_REPLY = 3, |
| 81 | OFPT_EXPERIMENTER = 4, |
| 82 | OFPT_FEATURES_REQUEST = 5, |
| 83 | OFPT_FEATURES_REPLY = 6, |
| 84 | OFPT_GET_CONFIG_REQUEST = 7, |
| 85 | OFPT_GET_CONFIG_REPLY = 8, |
| 86 | OFPT_SET_CONFIG = 9, |
| 87 | OFPT_PACKET_IN = 10, |
| 88 | OFPT_FLOW_REMOVED = 11, |
| 89 | OFPT_PORT_STATUS = 12, |
| 90 | OFPT_PACKET_OUT = 13, |
| 91 | OFPT_FLOW_MOD = 14, |
| 92 | OFPT_GROUP_MOD = 15, |
| 93 | OFPT_PORT_MOD = 16, |
| 94 | OFPT_TABLE_MOD = 17, |
Rob Vaterlaus | feee371 | 2013-09-30 11:24:19 -0700 | [diff] [blame] | 95 | OFPT_STATS_REQUEST = 18, |
| 96 | OFPT_STATS_REPLY = 19, |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 97 | OFPT_BARRIER_REQUEST = 20, |
| 98 | OFPT_BARRIER_REPLY = 21, |
| 99 | OFPT_QUEUE_GET_CONFIG_REQUEST = 22, |
| 100 | OFPT_QUEUE_GET_CONFIG_REPLY = 23, |
| 101 | OFPT_ROLE_REQUEST = 24, |
| 102 | OFPT_ROLE_REPLY = 25, |
| 103 | OFPT_GET_ASYNC_REQUEST = 26, |
| 104 | OFPT_GET_ASYNC_REPLY = 27, |
| 105 | OFPT_SET_ASYNC = 28, |
| 106 | OFPT_METER_MOD = 29, |
| 107 | }; |
| 108 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 109 | enum ofp_config_flags(wire_type=uint16_t, bitmask=True) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 110 | OFPC_FRAG_NORMAL = 0, |
| 111 | OFPC_FRAG_DROP = 1, |
| 112 | OFPC_FRAG_REASM = 2, |
| 113 | OFPC_FRAG_MASK = 3, |
| 114 | }; |
| 115 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 116 | enum ofp_table_config(wire_type=uint32_t, bitmask=True) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 117 | OFPTC_DEPRECATED_MASK = 0x3, |
| 118 | }; |
| 119 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 120 | enum ofp_table(wire_type=uint8_t, complete=False) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 121 | OFPTT_MAX = 0xfe, |
| 122 | OFPTT_ALL = 0xff, |
| 123 | }; |
| 124 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 125 | enum ofp_capabilities(wire_type=uint32_t, bitmask=True) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 126 | OFPC_FLOW_STATS = 0x1, |
| 127 | OFPC_TABLE_STATS = 0x2, |
| 128 | OFPC_PORT_STATS = 0x4, |
| 129 | OFPC_GROUP_STATS = 0x8, |
| 130 | OFPC_IP_REASM = 0x20, |
| 131 | OFPC_QUEUE_STATS = 0x40, |
| 132 | OFPC_PORT_BLOCKED = 0x100, |
| 133 | }; |
| 134 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 135 | enum ofp_port_config(wire_type=uint32_t, bitmask=True) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 136 | OFPPC_PORT_DOWN = 0x1, |
| 137 | OFPPC_NO_RECV = 0x4, |
| 138 | OFPPC_NO_FWD = 0x20, |
| 139 | OFPPC_NO_PACKET_IN = 0x40, |
Rob Vaterlaus | 0a8ec14 | 2013-10-10 13:27:14 -0700 | [diff] [blame] | 140 | OFPPC_BSN_MIRROR_DEST = 0x80000000, |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 141 | }; |
| 142 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 143 | enum ofp_port_state(wire_type=uint32_t, bitmask=True) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 144 | OFPPS_LINK_DOWN = 0x1, |
| 145 | OFPPS_BLOCKED = 0x2, |
| 146 | OFPPS_LIVE = 0x4, |
| 147 | }; |
| 148 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 149 | enum ofp_port_features(wire_type=uint32_t, bitmask=True) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 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 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 168 | enum ofp_port_reason(wire_type=uint8_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 169 | OFPPR_ADD = 0, |
| 170 | OFPPR_DELETE = 1, |
| 171 | OFPPR_MODIFY = 2, |
| 172 | }; |
| 173 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 174 | enum ofp_match_type(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 175 | OFPMT_STANDARD = 0, |
| 176 | OFPMT_OXM = 1, |
| 177 | }; |
| 178 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 179 | enum ofp_oxm_class(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 180 | OFPXMC_NXM_0 = 0, |
| 181 | OFPXMC_NXM_1 = 1, |
| 182 | OFPXMC_OPENFLOW_BASIC = 0x8000, |
| 183 | OFPXMC_EXPERIMENTER = 0xffff, |
| 184 | }; |
| 185 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 186 | enum ofp_vlan_id(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 187 | OFPVID_NONE = 0, |
| 188 | OFPVID_PRESENT = 0x1000, |
| 189 | }; |
| 190 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 191 | // FIXME: OF spec specified this as '9' bits, implicitly adding |
| 192 | // to full byte |
| 193 | enum ofp_ipv6exthdr_flags(wire_type=uint16_t, bitmask=True) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 194 | OFPIEH_NONEXT = 0x1, |
| 195 | OFPIEH_ESP = 0x2, |
| 196 | OFPIEH_AUTH = 0x4, |
| 197 | OFPIEH_DEST = 0x8, |
| 198 | OFPIEH_FRAG = 0x10, |
| 199 | OFPIEH_ROUTER = 0x20, |
| 200 | OFPIEH_HOP = 0x40, |
| 201 | OFPIEH_UNREP = 0x80, |
| 202 | OFPIEH_UNSEQ = 0x100, |
| 203 | }; |
| 204 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 205 | enum ofp_action_type(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 206 | OFPAT_OUTPUT = 0, |
| 207 | OFPAT_COPY_TTL_OUT = 0xb, |
| 208 | OFPAT_COPY_TTL_IN = 0xc, |
| 209 | OFPAT_SET_MPLS_TTL = 0xf, |
| 210 | OFPAT_DEC_MPLS_TTL = 0x10, |
| 211 | OFPAT_PUSH_VLAN = 0x11, |
| 212 | OFPAT_POP_VLAN = 0x12, |
| 213 | OFPAT_PUSH_MPLS = 0x13, |
| 214 | OFPAT_POP_MPLS = 0x14, |
| 215 | OFPAT_SET_QUEUE = 0x15, |
| 216 | OFPAT_GROUP = 0x16, |
| 217 | OFPAT_SET_NW_TTL = 0x17, |
| 218 | OFPAT_DEC_NW_TTL = 0x18, |
| 219 | OFPAT_SET_FIELD = 0x19, |
| 220 | OFPAT_PUSH_PBB = 0x1a, |
| 221 | OFPAT_POP_PBB = 0x1b, |
| 222 | OFPAT_EXPERIMENTER = 0xffff, |
| 223 | }; |
| 224 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 225 | enum ofp_controller_max_len(wire_type=uint16_t, complete=False) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 226 | OFPCML_MAX = 0xffe5, |
| 227 | OFPCML_NO_BUFFER = 0xffff, |
| 228 | }; |
| 229 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 230 | enum ofp_instruction_type(wire_type=uint16_t, bitmask=True) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 231 | OFPIT_GOTO_TABLE = 0x1, |
| 232 | OFPIT_WRITE_METADATA = 0x2, |
| 233 | OFPIT_WRITE_ACTIONS = 0x3, |
| 234 | OFPIT_APPLY_ACTIONS = 0x4, |
| 235 | OFPIT_CLEAR_ACTIONS = 0x5, |
| 236 | OFPIT_METER = 0x6, |
| 237 | OFPIT_EXPERIMENTER = 0xffff, |
| 238 | }; |
| 239 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 240 | enum ofp_flow_mod_command(wire_type=uint8_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 241 | OFPFC_ADD = 0, |
| 242 | OFPFC_MODIFY = 1, |
| 243 | OFPFC_MODIFY_STRICT = 2, |
| 244 | OFPFC_DELETE = 3, |
| 245 | OFPFC_DELETE_STRICT = 4, |
| 246 | }; |
| 247 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 248 | enum ofp_flow_mod_flags(wire_type=uint16_t, bitmask=True) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 249 | OFPFF_SEND_FLOW_REM = 0x1, |
| 250 | OFPFF_CHECK_OVERLAP = 0x2, |
| 251 | OFPFF_RESET_COUNTS = 0x4, |
| 252 | OFPFF_NO_PKT_COUNTS = 0x8, |
| 253 | OFPFF_NO_BYT_COUNTS = 0x10, |
Rich Lane | f86f39a | 2013-10-07 18:04:11 -0700 | [diff] [blame] | 254 | |
| 255 | /* Non-standard, enabled by an experimenter message */ |
| 256 | /* See the bsn_flow_idle input file */ |
| 257 | OFPFF_BSN_SEND_IDLE = 0x80, |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 258 | }; |
| 259 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 260 | enum ofp_group(wire_type=uint32_t, complete=False) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 261 | OFPG_MAX = 0xffffff00, |
| 262 | OFPG_ALL = 0xfffffffc, |
| 263 | OFPG_ANY = 0xffffffff, |
| 264 | }; |
| 265 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 266 | enum ofp_group_mod_command(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 267 | OFPGC_ADD = 0, |
| 268 | OFPGC_MODIFY = 1, |
| 269 | OFPGC_DELETE = 2, |
| 270 | }; |
| 271 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 272 | enum ofp_group_type(wire_type=uint8_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 273 | OFPGT_ALL = 0, |
| 274 | OFPGT_SELECT = 1, |
| 275 | OFPGT_INDIRECT = 2, |
| 276 | OFPGT_FF = 3, |
| 277 | }; |
| 278 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 279 | enum ofp_packet_in_reason(wire_type=uint8_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 280 | OFPR_NO_MATCH = 0, |
| 281 | OFPR_ACTION = 1, |
| 282 | OFPR_INVALID_TTL = 2, |
| 283 | }; |
| 284 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 285 | enum ofp_flow_removed_reason(wire_type=uint8_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 286 | OFPRR_IDLE_TIMEOUT = 0, |
| 287 | OFPRR_HARD_TIMEOUT = 1, |
| 288 | OFPRR_DELETE = 2, |
| 289 | OFPRR_GROUP_DELETE = 3, |
| 290 | }; |
| 291 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 292 | enum ofp_meter(wire_type=uint32_t, complete=False) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 293 | OFPM_MAX = 0xffff0000, |
| 294 | OFPM_SLOWPATH = 0xfffffffd, |
| 295 | OFPM_CONTROLLER = 0xfffffffe, |
| 296 | OFPM_ALL = 0xffffffff, |
| 297 | }; |
| 298 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 299 | enum ofp_meter_band_type(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 300 | OFPMBT_DROP = 0x1, |
| 301 | OFPMBT_DSCP_REMARK = 0x2, |
| 302 | OFPMBT_EXPERIMENTER = 0xffff, |
| 303 | }; |
| 304 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 305 | enum ofp_meter_mod_command(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 306 | OFPMC_ADD = 0, |
| 307 | OFPMC_MODIFY = 1, |
| 308 | OFPMC_DELETE = 2, |
| 309 | }; |
| 310 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 311 | enum ofp_meter_flags(wire_type=uint16_t, bitmask=True) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 312 | OFPMF_KBPS = 0x1, |
| 313 | OFPMF_PKTPS = 0x2, |
| 314 | OFPMF_BURST = 0x4, |
| 315 | OFPMF_STATS = 0x8, |
| 316 | }; |
| 317 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 318 | enum ofp_error_type(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 319 | OFPET_HELLO_FAILED = 0, |
| 320 | OFPET_BAD_REQUEST = 1, |
| 321 | OFPET_BAD_ACTION = 2, |
| 322 | OFPET_BAD_INSTRUCTION = 3, |
| 323 | OFPET_BAD_MATCH = 4, |
| 324 | OFPET_FLOW_MOD_FAILED = 5, |
| 325 | OFPET_GROUP_MOD_FAILED = 6, |
| 326 | OFPET_PORT_MOD_FAILED = 7, |
| 327 | OFPET_TABLE_MOD_FAILED = 8, |
| 328 | OFPET_QUEUE_OP_FAILED = 9, |
| 329 | OFPET_SWITCH_CONFIG_FAILED = 10, |
| 330 | OFPET_ROLE_REQUEST_FAILED = 11, |
| 331 | OFPET_METER_MOD_FAILED = 12, |
| 332 | OFPET_TABLE_FEATURES_FAILED = 13, |
| 333 | OFPET_EXPERIMENTER = 0xffff, |
| 334 | }; |
| 335 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 336 | enum ofp_hello_failed_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 337 | OFPHFC_INCOMPATIBLE = 0, |
| 338 | OFPHFC_EPERM = 1, |
| 339 | }; |
| 340 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 341 | enum ofp_bad_request_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 342 | OFPBRC_BAD_VERSION = 0, |
| 343 | OFPBRC_BAD_TYPE = 1, |
Rob Vaterlaus | feee371 | 2013-09-30 11:24:19 -0700 | [diff] [blame] | 344 | OFPBRC_BAD_STAT = 2, |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 345 | OFPBRC_BAD_EXPERIMENTER = 3, |
Rob Vaterlaus | b3f49d9 | 2013-10-01 17:57:31 -0700 | [diff] [blame] | 346 | OFPBRC_BAD_EXPERIMENTER_TYPE = 4, |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 347 | OFPBRC_EPERM = 5, |
| 348 | OFPBRC_BAD_LEN = 6, |
| 349 | OFPBRC_BUFFER_EMPTY = 7, |
| 350 | OFPBRC_BUFFER_UNKNOWN = 8, |
| 351 | OFPBRC_BAD_TABLE_ID = 9, |
| 352 | OFPBRC_IS_SLAVE = 10, |
| 353 | OFPBRC_BAD_PORT = 11, |
| 354 | OFPBRC_BAD_PACKET = 12, |
| 355 | OFPBRC_MULTIPART_BUFFER_OVERFLOW = 13, |
| 356 | }; |
| 357 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 358 | enum ofp_bad_action_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 359 | OFPBAC_BAD_TYPE = 0, |
| 360 | OFPBAC_BAD_LEN = 1, |
| 361 | OFPBAC_BAD_EXPERIMENTER = 2, |
Rob Vaterlaus | b3f49d9 | 2013-10-01 17:57:31 -0700 | [diff] [blame] | 362 | OFPBAC_BAD_EXPERIMENTER_TYPE = 3, |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 363 | OFPBAC_BAD_OUT_PORT = 4, |
| 364 | OFPBAC_BAD_ARGUMENT = 5, |
| 365 | OFPBAC_EPERM = 6, |
| 366 | OFPBAC_TOO_MANY = 7, |
| 367 | OFPBAC_BAD_QUEUE = 8, |
| 368 | OFPBAC_BAD_OUT_GROUP = 9, |
| 369 | OFPBAC_MATCH_INCONSISTENT = 10, |
| 370 | OFPBAC_UNSUPPORTED_ORDER = 11, |
| 371 | OFPBAC_BAD_TAG = 12, |
| 372 | OFPBAC_BAD_SET_TYPE = 13, |
| 373 | OFPBAC_BAD_SET_LEN = 14, |
| 374 | OFPBAC_BAD_SET_ARGUMENT = 15, |
| 375 | }; |
| 376 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 377 | enum ofp_bad_instruction_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 378 | OFPBIC_UNKNOWN_INST = 0, |
| 379 | OFPBIC_UNSUP_INST = 1, |
| 380 | OFPBIC_BAD_TABLE_ID = 2, |
| 381 | OFPBIC_UNSUP_METADATA = 3, |
| 382 | OFPBIC_UNSUP_METADATA_MASK = 4, |
| 383 | OFPBIC_BAD_EXPERIMENTER = 5, |
Rob Vaterlaus | b3f49d9 | 2013-10-01 17:57:31 -0700 | [diff] [blame] | 384 | OFPBIC_BAD_EXPERIMENTER_TYPE = 6, |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 385 | OFPBIC_BAD_LEN = 7, |
| 386 | OFPBIC_EPERM = 8, |
| 387 | }; |
| 388 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 389 | enum ofp_bad_match_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 390 | OFPBMC_BAD_TYPE = 0, |
| 391 | OFPBMC_BAD_LEN = 1, |
| 392 | OFPBMC_BAD_TAG = 2, |
| 393 | OFPBMC_BAD_DL_ADDR_MASK = 3, |
| 394 | OFPBMC_BAD_NW_ADDR_MASK = 4, |
| 395 | OFPBMC_BAD_WILDCARDS = 5, |
| 396 | OFPBMC_BAD_FIELD = 6, |
| 397 | OFPBMC_BAD_VALUE = 7, |
| 398 | OFPBMC_BAD_MASK = 8, |
| 399 | OFPBMC_BAD_PREREQ = 9, |
| 400 | OFPBMC_DUP_FIELD = 10, |
| 401 | OFPBMC_EPERM = 11, |
| 402 | }; |
| 403 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 404 | enum ofp_flow_mod_failed_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 405 | OFPFMFC_UNKNOWN = 0, |
| 406 | OFPFMFC_TABLE_FULL = 1, |
| 407 | OFPFMFC_BAD_TABLE_ID = 2, |
| 408 | OFPFMFC_OVERLAP = 3, |
| 409 | OFPFMFC_EPERM = 4, |
| 410 | OFPFMFC_BAD_TIMEOUT = 5, |
| 411 | OFPFMFC_BAD_COMMAND = 6, |
| 412 | OFPFMFC_BAD_FLAGS = 7, |
| 413 | }; |
| 414 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 415 | enum ofp_group_mod_failed_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 416 | OFPGMFC_GROUP_EXISTS = 0, |
| 417 | OFPGMFC_INVALID_GROUP = 1, |
| 418 | OFPGMFC_WEIGHT_UNSUPPORTED = 2, |
| 419 | OFPGMFC_OUT_OF_GROUPS = 3, |
| 420 | OFPGMFC_OUT_OF_BUCKETS = 4, |
| 421 | OFPGMFC_CHAINING_UNSUPPORTED = 5, |
| 422 | OFPGMFC_WATCH_UNSUPPORTED = 6, |
| 423 | OFPGMFC_LOOP = 7, |
| 424 | OFPGMFC_UNKNOWN_GROUP = 8, |
| 425 | OFPGMFC_CHAINED_GROUP = 9, |
| 426 | OFPGMFC_BAD_TYPE = 10, |
| 427 | OFPGMFC_BAD_COMMAND = 11, |
| 428 | OFPGMFC_BAD_BUCKET = 12, |
| 429 | OFPGMFC_BAD_WATCH = 13, |
| 430 | OFPGMFC_EPERM = 14, |
| 431 | }; |
| 432 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 433 | enum ofp_port_mod_failed_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 434 | OFPPMFC_BAD_PORT = 0, |
| 435 | OFPPMFC_BAD_HW_ADDR = 1, |
| 436 | OFPPMFC_BAD_CONFIG = 2, |
| 437 | OFPPMFC_BAD_ADVERTISE = 3, |
| 438 | OFPPMFC_EPERM = 4, |
| 439 | }; |
| 440 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 441 | enum ofp_table_mod_failed_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 442 | OFPTMFC_BAD_TABLE = 0, |
| 443 | OFPTMFC_BAD_CONFIG = 1, |
| 444 | OFPTMFC_EPERM = 2, |
| 445 | }; |
| 446 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 447 | enum ofp_queue_op_failed_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 448 | OFPQOFC_BAD_PORT = 0, |
| 449 | OFPQOFC_BAD_QUEUE = 1, |
| 450 | OFPQOFC_EPERM = 2, |
| 451 | }; |
| 452 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 453 | enum ofp_switch_config_failed_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 454 | OFPSCFC_BAD_FLAGS = 0, |
| 455 | OFPSCFC_BAD_LEN = 1, |
| 456 | OFPSCFC_EPERM = 2, |
| 457 | }; |
| 458 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 459 | enum ofp_role_request_failed_code(wire_type=uint16_t){ |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 460 | OFPRRFC_STALE = 0, |
| 461 | OFPRRFC_UNSUP = 1, |
| 462 | OFPRRFC_BAD_ROLE = 2, |
| 463 | }; |
| 464 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 465 | enum ofp_meter_mod_failed_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 466 | OFPMMFC_UNKNOWN = 0, |
| 467 | OFPMMFC_METER_EXISTS = 1, |
| 468 | OFPMMFC_INVALID_METER = 2, |
| 469 | OFPMMFC_UNKNOWN_METER = 3, |
| 470 | OFPMMFC_BAD_COMMAND = 4, |
| 471 | OFPMMFC_BAD_FLAGS = 5, |
| 472 | OFPMMFC_BAD_RATE = 6, |
| 473 | OFPMMFC_BAD_BURST = 7, |
| 474 | OFPMMFC_BAD_BAND = 8, |
| 475 | OFPMMFC_BAD_BAND_VALUE = 9, |
| 476 | OFPMMFC_OUT_OF_METERS = 10, |
| 477 | OFPMMFC_OUT_OF_BANDS = 11, |
| 478 | }; |
| 479 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 480 | enum ofp_table_features_failed_code(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 481 | OFPTFFC_BAD_TABLE = 0, |
| 482 | OFPTFFC_BAD_METADATA = 1, |
| 483 | OFPTFFC_BAD_TYPE = 2, |
| 484 | OFPTFFC_BAD_LEN = 3, |
| 485 | OFPTFFC_BAD_ARGUMENT = 4, |
| 486 | OFPTFFC_EPERM = 5, |
| 487 | }; |
| 488 | |
Rob Vaterlaus | feee371 | 2013-09-30 11:24:19 -0700 | [diff] [blame] | 489 | enum ofp_stats_type(wire_type=uint16_t) { |
| 490 | OFPST_DESC = 0, |
| 491 | OFPST_FLOW = 1, |
| 492 | OFPST_AGGREGATE = 2, |
| 493 | OFPST_TABLE = 3, |
| 494 | OFPST_PORT = 4, |
| 495 | OFPST_QUEUE = 5, |
| 496 | OFPST_GROUP = 6, |
| 497 | OFPST_GROUP_DESC = 7, |
| 498 | OFPST_GROUP_FEATURES = 8, |
| 499 | OFPST_METER = 9, |
| 500 | OFPST_METER_CONFIG = 10, |
| 501 | OFPST_METER_FEATURES = 11, |
| 502 | OFPST_TABLE_FEATURES = 12, |
| 503 | OFPST_PORT_DESC = 13, |
| 504 | OFPST_EXPERIMENTER = 0xffff, |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 505 | }; |
| 506 | |
Rob Vaterlaus | feee371 | 2013-09-30 11:24:19 -0700 | [diff] [blame] | 507 | enum ofp_stats_request_flags(wire_type=uint16_t, bitmask=True) { |
| 508 | OFPSF_REQ_MORE = 0x1, |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 509 | }; |
| 510 | |
Rob Vaterlaus | feee371 | 2013-09-30 11:24:19 -0700 | [diff] [blame] | 511 | enum ofp_stats_reply_flags(wire_type=uint16_t, bitmask=True) { |
| 512 | OFPSF_REPLY_MORE = 0x1, |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 513 | }; |
| 514 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 515 | enum ofp_table_feature_prop_type(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 516 | OFPTFPT_INSTRUCTIONS = 0, |
| 517 | OFPTFPT_INSTRUCTIONS_MISS = 1, |
| 518 | OFPTFPT_NEXT_TABLES = 2, |
| 519 | OFPTFPT_NEXT_TABLES_MISS = 3, |
| 520 | OFPTFPT_WRITE_ACTIONS = 4, |
| 521 | OFPTFPT_WRITE_ACTIONS_MISS = 5, |
| 522 | OFPTFPT_APPLY_ACTIONS = 6, |
| 523 | OFPTFPT_APPLY_ACTIONS_MISS = 7, |
| 524 | OFPTFPT_MATCH = 8, |
| 525 | OFPTFPT_WILDCARDS = 0xa, |
| 526 | OFPTFPT_WRITE_SETFIELD = 0xc, |
| 527 | OFPTFPT_WRITE_SETFIELD_MISS = 0xd, |
| 528 | OFPTFPT_APPLY_SETFIELD = 0xe, |
| 529 | OFPTFPT_APPLY_SETFIELD_MISS = 0xf, |
| 530 | OFPTFPT_EXPERIMENTER = 0xfffe, |
| 531 | OFPTFPT_EXPERIMENTER_MISS = 0xffff, |
| 532 | }; |
| 533 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 534 | enum ofp_group_capabilities(wire_type=uint32_t, bitmask=True) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 535 | OFPGFC_SELECT_WEIGHT = 0x1, |
| 536 | OFPGFC_SELECT_LIVENESS = 0x2, |
| 537 | OFPGFC_CHAINING = 0x4, |
| 538 | OFPGFC_CHAINING_CHECKS = 0x8, |
| 539 | }; |
| 540 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 541 | enum ofp_queue_properties(wire_type=uint16_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 542 | OFPQT_MIN_RATE = 0x1, |
| 543 | OFPQT_MAX_RATE = 0x2, |
| 544 | OFPQT_EXPERIMENTER = 0xffff, |
| 545 | }; |
| 546 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 547 | enum ofp_controller_role(wire_type=uint32_t) { |
Rich Lane | 5d33a62 | 2013-04-08 17:33:11 -0700 | [diff] [blame] | 548 | OFPCR_ROLE_NOCHANGE = 0, |
| 549 | OFPCR_ROLE_EQUAL = 1, |
| 550 | OFPCR_ROLE_MASTER = 2, |
| 551 | OFPCR_ROLE_SLAVE = 3, |
| 552 | }; |
| 553 | |
Andreas Wundsam | 4ee5146 | 2013-07-30 11:00:37 -0700 | [diff] [blame] | 554 | enum ofp_hello_elem_type(wire_type=uint16_t) { |
Rich Lane | 0733cd6 | 2013-04-18 21:14:42 -0700 | [diff] [blame] | 555 | OFPHET_VERSIONBITMAP = 1, |
| 556 | }; |
| 557 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 558 | /* XXX rename to of_message */ |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 559 | struct of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 560 | uint8_t version; |
Andreas Wundsam | c37ba3d | 2013-08-02 17:51:51 -0700 | [diff] [blame] | 561 | uint8_t type == ?; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 562 | uint16_t length; |
| 563 | uint32_t xid; |
| 564 | }; |
| 565 | |
| 566 | // Special structures used for managing scalar list elements |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 567 | struct of_uint32 { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 568 | uint32_t value; |
| 569 | }; |
| 570 | |
| 571 | // Special structures used for managing scalar list elements |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 572 | struct of_uint8 { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 573 | uint8_t value; |
| 574 | }; |
| 575 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 576 | struct of_hello_elem { |
Andreas Wundsam | 70411bf | 2013-08-02 22:26:38 -0700 | [diff] [blame] | 577 | uint16_t type == ?; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 578 | uint16_t length; |
| 579 | }; |
| 580 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 581 | struct of_hello_elem_versionbitmap : of_hello_elem { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 582 | uint16_t type == 1; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 583 | uint16_t length; |
| 584 | list(of_uint32_t) bitmaps; |
| 585 | }; |
| 586 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 587 | struct of_hello : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 588 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 589 | uint8_t type == 0; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 590 | uint16_t length; |
| 591 | uint32_t xid; |
| 592 | list(of_hello_elem_t) elements; |
| 593 | }; |
| 594 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 595 | struct of_echo_request : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 596 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 597 | uint8_t type == 2; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 598 | uint16_t length; |
| 599 | uint32_t xid; |
| 600 | of_octets_t data; |
| 601 | }; |
| 602 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 603 | struct of_echo_reply : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 604 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 605 | uint8_t type == 3; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 606 | uint16_t length; |
| 607 | uint32_t xid; |
| 608 | of_octets_t data; |
| 609 | }; |
| 610 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 611 | struct of_experimenter : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 612 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 613 | uint8_t type == 4; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 614 | uint16_t length; |
| 615 | uint32_t xid; |
Rich Lane | b25d07c | 2013-08-22 17:22:43 -0700 | [diff] [blame] | 616 | uint32_t experimenter == ?; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 617 | uint32_t subtype; |
| 618 | of_octets_t data; |
| 619 | }; |
| 620 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 621 | struct of_barrier_request : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 622 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 623 | uint8_t type == 20; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 624 | uint16_t length; |
| 625 | uint32_t xid; |
| 626 | }; |
| 627 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 628 | struct of_barrier_reply : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 629 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 630 | uint8_t type == 21; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 631 | uint16_t length; |
| 632 | uint32_t xid; |
| 633 | }; |
| 634 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 635 | struct of_get_config_request : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 636 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 637 | uint8_t type == 7; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 638 | uint16_t length; |
| 639 | uint32_t xid; |
| 640 | }; |
| 641 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 642 | struct of_get_config_reply : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 643 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 644 | uint8_t type == 8; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 645 | uint16_t length; |
| 646 | uint32_t xid; |
| 647 | uint16_t flags; |
| 648 | uint16_t miss_send_len; |
| 649 | }; |
| 650 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 651 | struct of_set_config : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 652 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 653 | uint8_t type == 9; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 654 | uint16_t length; |
| 655 | uint32_t xid; |
| 656 | uint16_t flags; |
| 657 | uint16_t miss_send_len; |
| 658 | }; |
| 659 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 660 | struct of_table_mod : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 661 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 662 | uint8_t type == 17; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 663 | uint16_t length; |
| 664 | uint32_t xid; |
| 665 | uint8_t table_id; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 666 | pad(3); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 667 | uint32_t config; |
| 668 | }; |
| 669 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 670 | struct of_port_desc { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 671 | of_port_no_t port_no; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 672 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 673 | of_mac_addr_t hw_addr; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 674 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 675 | of_port_name_t name; |
Rob Vaterlaus | d9d72d2 | 2013-09-23 14:50:52 -0700 | [diff] [blame] | 676 | enum ofp_port_config config; |
| 677 | enum ofp_port_state state; |
| 678 | enum ofp_port_features curr; |
| 679 | enum ofp_port_features advertised; |
| 680 | enum ofp_port_features supported; |
| 681 | enum ofp_port_features peer; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 682 | uint32_t curr_speed; |
| 683 | uint32_t max_speed; |
| 684 | }; |
| 685 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 686 | struct of_features_request : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 687 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 688 | uint8_t type == 5; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 689 | uint16_t length; |
| 690 | uint32_t xid; |
| 691 | }; |
| 692 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 693 | struct of_features_reply : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 694 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 695 | uint8_t type == 6; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 696 | uint16_t length; |
| 697 | uint32_t xid; |
| 698 | uint64_t datapath_id; |
| 699 | uint32_t n_buffers; |
| 700 | uint8_t n_tables; |
| 701 | uint8_t auxiliary_id; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 702 | pad(2); |
Rob Vaterlaus | feee371 | 2013-09-30 11:24:19 -0700 | [diff] [blame] | 703 | enum ofp_capabilities capabilities; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 704 | uint32_t reserved; |
| 705 | }; |
| 706 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 707 | struct of_port_status : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 708 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 709 | uint8_t type == 12; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 710 | uint16_t length; |
| 711 | uint32_t xid; |
Rob Vaterlaus | d9d72d2 | 2013-09-23 14:50:52 -0700 | [diff] [blame] | 712 | enum ofp_port_reason reason; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 713 | pad(7); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 714 | of_port_desc_t desc; |
| 715 | }; |
| 716 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 717 | struct of_port_mod : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 718 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 719 | uint8_t type == 16; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 720 | uint16_t length; |
| 721 | uint32_t xid; |
| 722 | of_port_no_t port_no; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 723 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 724 | of_mac_addr_t hw_addr; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 725 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 726 | uint32_t config; |
| 727 | uint32_t mask; |
| 728 | uint32_t advertise; |
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 | }; |
| 731 | |
| 732 | // FIXME Does this need to be v4? |
Andreas Wundsam | fef7d5f | 2013-08-01 22:15:44 -0700 | [diff] [blame] | 733 | struct of_match_v3(align=8) { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 734 | uint16_t type == 1; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 735 | uint16_t length; |
| 736 | list(of_oxm_t) oxm_list; |
| 737 | }; |
| 738 | |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 739 | // This looks like an action header, but is standalone. See |
| 740 | // ofp_table_features_prop_actions |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 741 | struct of_action_id { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 742 | uint16_t type; |
| 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 | }; |
| 746 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 747 | struct of_action_output : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 748 | uint16_t type == 0; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 749 | uint16_t len; |
| 750 | of_port_no_t port; |
| 751 | uint16_t max_len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 752 | pad(6); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 753 | }; |
| 754 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 755 | struct of_action_copy_ttl_out : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 756 | uint16_t type == 11; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 757 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 758 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 759 | }; |
| 760 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 761 | struct of_action_copy_ttl_in : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 762 | uint16_t type == 12; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 763 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 764 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 765 | }; |
| 766 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 767 | struct of_action_set_mpls_ttl : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 768 | uint16_t type == 15; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 769 | uint16_t len; |
| 770 | uint8_t mpls_ttl; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 771 | pad(3); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 772 | }; |
| 773 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 774 | struct of_action_dec_mpls_ttl : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 775 | uint16_t type == 16; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 776 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 777 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 778 | }; |
| 779 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 780 | struct of_action_push_vlan : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 781 | uint16_t type == 17; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 782 | uint16_t len; |
| 783 | uint16_t ethertype; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 784 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 785 | }; |
| 786 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 787 | struct of_action_pop_vlan : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 788 | uint16_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 789 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 790 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 791 | }; |
| 792 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 793 | struct of_action_push_mpls : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 794 | uint16_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 795 | uint16_t len; |
| 796 | uint16_t ethertype; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 797 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 798 | }; |
| 799 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 800 | struct of_action_pop_mpls : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 801 | uint16_t type == 20; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 802 | uint16_t len; |
| 803 | uint16_t ethertype; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 804 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 805 | }; |
| 806 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 807 | struct of_action_set_queue : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 808 | uint16_t type == 21; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 809 | uint16_t len; |
| 810 | uint32_t queue_id; |
| 811 | }; |
| 812 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 813 | struct of_action_group : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 814 | uint16_t type == 22; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 815 | uint16_t len; |
| 816 | uint32_t group_id; |
| 817 | }; |
| 818 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 819 | struct of_action_set_nw_ttl : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 820 | uint16_t type == 23; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 821 | uint16_t len; |
| 822 | uint8_t nw_ttl; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 823 | pad(3); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 824 | }; |
| 825 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 826 | struct of_action_dec_nw_ttl : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 827 | uint16_t type == 24; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 828 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 829 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 830 | }; |
| 831 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 832 | struct of_action_set_field : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 833 | uint16_t type == 25; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 834 | uint16_t len; |
Rich Lane | be90eae | 2013-07-22 16:44:26 -0700 | [diff] [blame] | 835 | of_oxm_t field; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 836 | }; |
| 837 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 838 | struct of_action_experimenter : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 839 | uint16_t type == 65535; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 840 | uint16_t len; |
Rich Lane | b25d07c | 2013-08-22 17:22:43 -0700 | [diff] [blame] | 841 | uint32_t experimenter == ?; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 842 | of_octets_t data; |
| 843 | }; |
| 844 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 845 | struct of_action_pop_pbb : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 846 | uint16_t type == 27; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 847 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 848 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 849 | }; |
| 850 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 851 | struct of_action_push_pbb : of_action { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 852 | uint16_t type == 26; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 853 | uint16_t len; |
| 854 | uint16_t ethertype; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 855 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 856 | }; |
| 857 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 858 | struct of_action { |
Andreas Wundsam | c37ba3d | 2013-08-02 17:51:51 -0700 | [diff] [blame] | 859 | uint16_t type == ?; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 860 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 861 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 862 | }; |
| 863 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 864 | struct of_instruction { |
Andreas Wundsam | c37ba3d | 2013-08-02 17:51:51 -0700 | [diff] [blame] | 865 | uint16_t type == ?; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 866 | uint16_t len; |
| 867 | }; |
| 868 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 869 | struct of_instruction_goto_table : of_instruction { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 870 | uint16_t type == 1; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 871 | uint16_t len; |
| 872 | uint8_t table_id; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 873 | pad(3); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 874 | }; |
| 875 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 876 | struct of_instruction_write_metadata : of_instruction { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 877 | uint16_t type == 2; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 878 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 879 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 880 | uint64_t metadata; |
| 881 | uint64_t metadata_mask; |
| 882 | }; |
| 883 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 884 | struct of_instruction_write_actions : of_instruction { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 885 | uint16_t type == 3; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 886 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 887 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 888 | list(of_action_t) actions; |
| 889 | }; |
| 890 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 891 | struct of_instruction_apply_actions : of_instruction { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 892 | uint16_t type == 4; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 893 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 894 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 895 | list(of_action_t) actions; |
| 896 | }; |
| 897 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 898 | struct of_instruction_clear_actions : of_instruction { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 899 | uint16_t type == 5; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 900 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 901 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 902 | }; |
| 903 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 904 | struct of_instruction_meter : of_instruction { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 905 | uint16_t type == 6; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 906 | uint16_t len; |
| 907 | uint32_t meter_id; |
| 908 | }; |
| 909 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 910 | struct of_instruction_experimenter : of_instruction { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 911 | uint16_t type == 65535; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 912 | uint16_t len; |
Rich Lane | b25d07c | 2013-08-22 17:22:43 -0700 | [diff] [blame] | 913 | uint32_t experimenter == ?; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 914 | of_octets_t data; |
| 915 | }; |
| 916 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 917 | struct of_flow_mod : of_header { |
| 918 | uint8_t version; |
| 919 | uint8_t type == 14; |
| 920 | uint16_t length; |
| 921 | uint32_t xid; |
| 922 | uint64_t cookie; |
| 923 | uint64_t cookie_mask; |
| 924 | uint8_t table_id; |
Andreas Wundsam | c37ba3d | 2013-08-02 17:51:51 -0700 | [diff] [blame] | 925 | of_fm_cmd_t _command == ?; |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 926 | uint16_t idle_timeout; |
| 927 | uint16_t hard_timeout; |
| 928 | uint16_t priority; |
| 929 | uint32_t buffer_id; |
| 930 | of_port_no_t out_port; |
| 931 | uint32_t out_group; |
Andreas Wundsam | dfeb594 | 2013-09-19 13:07:49 -0700 | [diff] [blame] | 932 | enum ofp_flow_mod_flags flags; |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 933 | pad(2); |
| 934 | of_match_t match; |
| 935 | list(of_instruction_t) instructions; |
| 936 | }; |
| 937 | |
| 938 | struct of_flow_add : of_flow_mod { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 939 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 940 | uint8_t type == 14; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 941 | uint16_t length; |
| 942 | uint32_t xid; |
| 943 | uint64_t cookie; |
| 944 | uint64_t cookie_mask; |
| 945 | uint8_t table_id; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 946 | of_fm_cmd_t _command == 0; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 947 | uint16_t idle_timeout; |
| 948 | uint16_t hard_timeout; |
| 949 | uint16_t priority; |
| 950 | uint32_t buffer_id; |
| 951 | of_port_no_t out_port; |
| 952 | uint32_t out_group; |
Andreas Wundsam | dfeb594 | 2013-09-19 13:07:49 -0700 | [diff] [blame] | 953 | enum ofp_flow_mod_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 954 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 955 | of_match_t match; |
| 956 | list(of_instruction_t) instructions; |
| 957 | }; |
| 958 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 959 | struct of_flow_modify : of_flow_mod { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 960 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 961 | uint8_t type == 14; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 962 | uint16_t length; |
| 963 | uint32_t xid; |
| 964 | uint64_t cookie; |
| 965 | uint64_t cookie_mask; |
| 966 | uint8_t table_id; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 967 | of_fm_cmd_t _command == 1; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 968 | uint16_t idle_timeout; |
| 969 | uint16_t hard_timeout; |
| 970 | uint16_t priority; |
| 971 | uint32_t buffer_id; |
| 972 | of_port_no_t out_port; |
| 973 | uint32_t out_group; |
Andreas Wundsam | dfeb594 | 2013-09-19 13:07:49 -0700 | [diff] [blame] | 974 | enum ofp_flow_mod_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 975 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 976 | of_match_t match; |
| 977 | list(of_instruction_t) instructions; |
| 978 | }; |
| 979 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 980 | struct of_flow_modify_strict : of_flow_mod { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 981 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 982 | uint8_t type == 14; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 983 | uint16_t length; |
| 984 | uint32_t xid; |
| 985 | uint64_t cookie; |
| 986 | uint64_t cookie_mask; |
| 987 | uint8_t table_id; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 988 | of_fm_cmd_t _command == 2; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 989 | uint16_t idle_timeout; |
| 990 | uint16_t hard_timeout; |
| 991 | uint16_t priority; |
| 992 | uint32_t buffer_id; |
| 993 | of_port_no_t out_port; |
| 994 | uint32_t out_group; |
Andreas Wundsam | dfeb594 | 2013-09-19 13:07:49 -0700 | [diff] [blame] | 995 | enum ofp_flow_mod_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 996 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 997 | of_match_t match; |
| 998 | list(of_instruction_t) instructions; |
| 999 | }; |
| 1000 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1001 | struct of_flow_delete : of_flow_mod { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1002 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1003 | uint8_t type == 14; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1004 | uint16_t length; |
| 1005 | uint32_t xid; |
| 1006 | uint64_t cookie; |
| 1007 | uint64_t cookie_mask; |
| 1008 | uint8_t table_id; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1009 | of_fm_cmd_t _command == 3; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1010 | uint16_t idle_timeout; |
| 1011 | uint16_t hard_timeout; |
| 1012 | uint16_t priority; |
| 1013 | uint32_t buffer_id; |
| 1014 | of_port_no_t out_port; |
| 1015 | uint32_t out_group; |
Andreas Wundsam | dfeb594 | 2013-09-19 13:07:49 -0700 | [diff] [blame] | 1016 | enum ofp_flow_mod_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1017 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1018 | of_match_t match; |
| 1019 | list(of_instruction_t) instructions; |
| 1020 | }; |
| 1021 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1022 | struct of_flow_delete_strict : of_flow_mod { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1023 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1024 | uint8_t type == 14; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1025 | uint16_t length; |
| 1026 | uint32_t xid; |
| 1027 | uint64_t cookie; |
| 1028 | uint64_t cookie_mask; |
| 1029 | uint8_t table_id; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1030 | of_fm_cmd_t _command == 4; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1031 | uint16_t idle_timeout; |
| 1032 | uint16_t hard_timeout; |
| 1033 | uint16_t priority; |
| 1034 | uint32_t buffer_id; |
| 1035 | of_port_no_t out_port; |
| 1036 | uint32_t out_group; |
Andreas Wundsam | dfeb594 | 2013-09-19 13:07:49 -0700 | [diff] [blame] | 1037 | enum ofp_flow_mod_flags flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1038 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1039 | of_match_t match; |
| 1040 | list(of_instruction_t) instructions; |
| 1041 | }; |
| 1042 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1043 | struct of_bucket { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1044 | uint16_t len; |
| 1045 | uint16_t weight; |
| 1046 | of_port_no_t watch_port; |
| 1047 | uint32_t watch_group; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1048 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1049 | list(of_action_t) actions; |
| 1050 | }; |
| 1051 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1052 | struct of_group_mod : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1053 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1054 | uint8_t type == 15; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1055 | uint16_t length; |
| 1056 | uint32_t xid; |
| 1057 | uint16_t command; |
| 1058 | uint8_t group_type; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1059 | pad(1); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1060 | uint32_t group_id; |
| 1061 | list(of_bucket_t) buckets; |
| 1062 | }; |
| 1063 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1064 | struct of_packet_out : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1065 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1066 | uint8_t type == 13; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1067 | uint16_t length; |
| 1068 | uint32_t xid; |
| 1069 | uint32_t buffer_id; |
| 1070 | of_port_no_t in_port; |
| 1071 | uint16_t actions_len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1072 | pad(6); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1073 | list(of_action_t) actions; |
| 1074 | of_octets_t data; |
| 1075 | }; |
| 1076 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1077 | struct of_packet_in : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1078 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1079 | uint8_t type == 10; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1080 | uint16_t length; |
| 1081 | uint32_t xid; |
| 1082 | uint32_t buffer_id; |
| 1083 | uint16_t total_len; |
| 1084 | uint8_t reason; |
| 1085 | uint8_t table_id; |
| 1086 | uint64_t cookie; |
| 1087 | of_match_t match; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1088 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1089 | of_octets_t data; /* FIXME: Ensure total_len gets updated */ |
| 1090 | }; |
| 1091 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1092 | struct of_flow_removed : of_header { |
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 == 11; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1095 | uint16_t length; |
| 1096 | uint32_t xid; |
| 1097 | uint64_t cookie; |
| 1098 | uint16_t priority; |
| 1099 | uint8_t reason; |
| 1100 | uint8_t table_id; |
| 1101 | uint32_t duration_sec; |
| 1102 | uint32_t duration_nsec; |
| 1103 | uint16_t idle_timeout; |
| 1104 | uint16_t hard_timeout; |
| 1105 | uint64_t packet_count; |
| 1106 | uint64_t byte_count; |
| 1107 | of_match_t match; |
| 1108 | }; |
| 1109 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1110 | struct of_meter_band { |
Andreas Wundsam | 9ba6536 | 2013-08-02 19:14:42 -0700 | [diff] [blame] | 1111 | uint16_t type == ?; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1112 | uint16_t len; |
| 1113 | // uint32_t rate; // These are excluded b/c this is the header |
| 1114 | // uint32_t burst_size; // These are excluded b/c this is the header |
| 1115 | }; |
| 1116 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1117 | struct of_meter_band_drop : of_meter_band { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1118 | uint16_t type == 1; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1119 | uint16_t len; |
| 1120 | uint32_t rate; |
| 1121 | uint32_t burst_size; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1122 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1123 | }; |
| 1124 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1125 | struct of_meter_band_dscp_remark : of_meter_band { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1126 | uint16_t type == 2; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1127 | uint16_t len; |
| 1128 | uint32_t rate; |
| 1129 | uint32_t burst_size; |
| 1130 | uint8_t prec_level; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1131 | pad(3); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1132 | }; |
| 1133 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1134 | struct of_meter_band_experimenter : of_meter_band { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1135 | uint16_t type == 65535; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1136 | uint16_t len; |
| 1137 | uint32_t rate; |
| 1138 | uint32_t burst_size; |
| 1139 | uint32_t experimenter; |
| 1140 | }; |
| 1141 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1142 | struct of_meter_mod : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1143 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1144 | uint8_t type == 29; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1145 | uint16_t length; |
| 1146 | uint32_t xid; |
| 1147 | uint16_t command; |
| 1148 | uint16_t flags; |
| 1149 | uint32_t meter_id; |
| 1150 | list(of_meter_band_t) meters; |
| 1151 | }; |
| 1152 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1153 | struct of_error_msg : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1154 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1155 | uint8_t type == 1; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1156 | uint16_t length; |
| 1157 | uint32_t xid; |
Rob Vaterlaus | feee371 | 2013-09-30 11:24:19 -0700 | [diff] [blame] | 1158 | uint16_t err_type == ?; |
| 1159 | }; |
| 1160 | |
| 1161 | struct of_hello_failed_error_msg : of_error_msg { |
| 1162 | uint8_t version; |
| 1163 | uint8_t type == 1; |
| 1164 | uint16_t length; |
| 1165 | uint32_t xid; |
| 1166 | uint16_t err_type == 0; |
| 1167 | enum ofp_hello_failed_code code; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1168 | of_octets_t data; |
| 1169 | }; |
| 1170 | |
Rob Vaterlaus | feee371 | 2013-09-30 11:24:19 -0700 | [diff] [blame] | 1171 | struct of_bad_request_error_msg : of_error_msg { |
| 1172 | uint8_t version; |
| 1173 | uint8_t type == 1; |
| 1174 | uint16_t length; |
| 1175 | uint32_t xid; |
| 1176 | uint16_t err_type == 1; |
| 1177 | enum ofp_bad_request_code code; |
| 1178 | of_octets_t data; |
| 1179 | }; |
| 1180 | |
| 1181 | struct of_bad_action_error_msg : of_error_msg { |
| 1182 | uint8_t version; |
| 1183 | uint8_t type == 1; |
| 1184 | uint16_t length; |
| 1185 | uint32_t xid; |
| 1186 | uint16_t err_type == 2; |
| 1187 | enum ofp_bad_action_code code; |
| 1188 | of_octets_t data; |
| 1189 | }; |
| 1190 | |
| 1191 | struct of_bad_instruction_error_msg : of_error_msg { |
| 1192 | uint8_t version; |
| 1193 | uint8_t type == 1; |
| 1194 | uint16_t length; |
| 1195 | uint32_t xid; |
| 1196 | uint16_t err_type == 3; |
| 1197 | enum ofp_bad_instruction_code code; |
| 1198 | of_octets_t data; |
| 1199 | }; |
| 1200 | |
| 1201 | struct of_bad_match_error_msg : of_error_msg { |
| 1202 | uint8_t version; |
| 1203 | uint8_t type == 1; |
| 1204 | uint16_t length; |
| 1205 | uint32_t xid; |
| 1206 | uint16_t err_type == 4; |
| 1207 | enum ofp_bad_match_code code; |
| 1208 | of_octets_t data; |
| 1209 | }; |
| 1210 | |
| 1211 | struct of_flow_mod_failed_error_msg : of_error_msg { |
| 1212 | uint8_t version; |
| 1213 | uint8_t type == 1; |
| 1214 | uint16_t length; |
| 1215 | uint32_t xid; |
| 1216 | uint16_t err_type == 5; |
| 1217 | enum ofp_flow_mod_failed_code code; |
| 1218 | of_octets_t data; |
| 1219 | }; |
| 1220 | |
| 1221 | struct of_group_mod_failed_error_msg : of_error_msg { |
| 1222 | uint8_t version; |
| 1223 | uint8_t type == 1; |
| 1224 | uint16_t length; |
| 1225 | uint32_t xid; |
| 1226 | uint16_t err_type == 6; |
| 1227 | enum ofp_group_mod_failed_code code; |
| 1228 | of_octets_t data; |
| 1229 | }; |
| 1230 | |
| 1231 | struct of_port_mod_failed_error_msg : of_error_msg { |
| 1232 | uint8_t version; |
| 1233 | uint8_t type == 1; |
| 1234 | uint16_t length; |
| 1235 | uint32_t xid; |
| 1236 | uint16_t err_type == 7; |
| 1237 | enum ofp_port_mod_failed_code code; |
| 1238 | of_octets_t data; |
| 1239 | }; |
| 1240 | |
| 1241 | struct of_table_mod_failed_error_msg : of_error_msg { |
| 1242 | uint8_t version; |
| 1243 | uint8_t type == 1; |
| 1244 | uint16_t length; |
| 1245 | uint32_t xid; |
| 1246 | uint16_t err_type == 8; |
| 1247 | enum ofp_table_mod_failed_code code; |
| 1248 | of_octets_t data; |
| 1249 | }; |
| 1250 | |
| 1251 | struct of_queue_op_failed_error_msg : of_error_msg { |
| 1252 | uint8_t version; |
| 1253 | uint8_t type == 1; |
| 1254 | uint16_t length; |
| 1255 | uint32_t xid; |
| 1256 | uint16_t err_type == 9; |
| 1257 | enum ofp_queue_op_failed_code code; |
| 1258 | of_octets_t data; |
| 1259 | }; |
| 1260 | |
| 1261 | struct of_switch_config_failed_error_msg : of_error_msg { |
| 1262 | uint8_t version; |
| 1263 | uint8_t type == 1; |
| 1264 | uint16_t length; |
| 1265 | uint32_t xid; |
| 1266 | uint16_t err_type == 10; |
| 1267 | enum ofp_switch_config_failed_code code; |
| 1268 | of_octets_t data; |
| 1269 | }; |
| 1270 | |
| 1271 | struct of_role_request_failed_error_msg : of_error_msg { |
| 1272 | uint8_t version; |
| 1273 | uint8_t type == 1; |
| 1274 | uint16_t length; |
| 1275 | uint32_t xid; |
| 1276 | uint16_t err_type == 11; |
| 1277 | enum ofp_role_request_failed_code code; |
| 1278 | of_octets_t data; |
| 1279 | }; |
| 1280 | |
| 1281 | struct of_meter_mod_failed_error_msg : of_error_msg { |
| 1282 | uint8_t version; |
| 1283 | uint8_t type == 1; |
| 1284 | uint16_t length; |
| 1285 | uint32_t xid; |
| 1286 | uint16_t err_type == 12; |
| 1287 | enum ofp_meter_mod_failed_code code; |
| 1288 | of_octets_t data; |
| 1289 | }; |
| 1290 | |
| 1291 | struct of_table_features_failed_error_msg : of_error_msg { |
| 1292 | uint8_t version; |
| 1293 | uint8_t type == 1; |
| 1294 | uint16_t length; |
| 1295 | uint32_t xid; |
| 1296 | uint16_t err_type == 13; |
| 1297 | enum ofp_table_features_failed_code code; |
| 1298 | of_octets_t data; |
| 1299 | }; |
| 1300 | |
| 1301 | struct of_experimenter_error_msg { |
| 1302 | uint8_t version; |
| 1303 | uint8_t type == 1; |
| 1304 | uint16_t length; |
| 1305 | uint32_t xid; |
| 1306 | uint16_t err_type == 0xffff; |
| 1307 | uint16_t subtype; |
| 1308 | uint32_t experimenter; |
| 1309 | of_octets_t data; |
| 1310 | }; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1311 | |
| 1312 | // STATS ENTRIES: flow, table, port, queue, group stats, group desc stats |
| 1313 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1314 | struct of_flow_stats_entry { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1315 | uint16_t length; |
| 1316 | uint8_t table_id; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1317 | pad(1); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1318 | uint32_t duration_sec; |
| 1319 | uint32_t duration_nsec; |
| 1320 | uint16_t priority; |
| 1321 | uint16_t idle_timeout; |
| 1322 | uint16_t hard_timeout; |
Rich Lane | 1a47c1c | 2013-08-28 15:27:00 -0700 | [diff] [blame] | 1323 | uint16_t flags; |
| 1324 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1325 | uint64_t cookie; |
| 1326 | uint64_t packet_count; |
| 1327 | uint64_t byte_count; |
| 1328 | of_match_t match; |
| 1329 | list(of_instruction_t) instructions; |
| 1330 | }; |
| 1331 | |
| 1332 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1333 | struct of_table_stats_entry { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1334 | uint8_t table_id; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1335 | pad(3); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1336 | uint32_t active_count; |
| 1337 | uint64_t lookup_count; |
| 1338 | uint64_t matched_count; |
| 1339 | }; |
| 1340 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1341 | struct of_port_stats_entry { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1342 | of_port_no_t port_no; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1343 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1344 | uint64_t rx_packets; |
| 1345 | uint64_t tx_packets; |
| 1346 | uint64_t rx_bytes; |
| 1347 | uint64_t tx_bytes; |
| 1348 | uint64_t rx_dropped; |
| 1349 | uint64_t tx_dropped; |
| 1350 | uint64_t rx_errors; |
| 1351 | uint64_t tx_errors; |
| 1352 | uint64_t rx_frame_err; |
| 1353 | uint64_t rx_over_err; |
| 1354 | uint64_t rx_crc_err; |
| 1355 | uint64_t collisions; |
| 1356 | uint32_t duration_sec; |
| 1357 | uint32_t duration_nsec; |
| 1358 | }; |
| 1359 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1360 | struct of_queue_stats_entry { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1361 | of_port_no_t port_no; |
| 1362 | uint32_t queue_id; |
| 1363 | uint64_t tx_bytes; |
| 1364 | uint64_t tx_packets; |
| 1365 | uint64_t tx_errors; |
| 1366 | uint32_t duration_sec; |
| 1367 | uint32_t duration_nsec; |
| 1368 | }; |
| 1369 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1370 | struct of_bucket_counter { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1371 | uint64_t packet_count; |
| 1372 | uint64_t byte_count; |
| 1373 | }; |
| 1374 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1375 | struct of_group_stats_entry { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1376 | uint16_t length; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1377 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1378 | uint32_t group_id; |
| 1379 | uint32_t ref_count; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1380 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1381 | uint64_t packet_count; |
| 1382 | uint64_t byte_count; |
| 1383 | uint32_t duration_sec; |
| 1384 | uint32_t duration_nsec; |
| 1385 | list(of_bucket_counter_t) bucket_stats; |
| 1386 | }; |
| 1387 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1388 | struct of_group_desc_stats_entry { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1389 | uint16_t length; |
Rich Lane | 35e7ac7 | 2013-10-15 10:36:10 -0700 | [diff] [blame] | 1390 | uint8_t group_type; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1391 | pad(1); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1392 | uint32_t group_id; |
| 1393 | list(of_bucket_t) buckets; |
| 1394 | }; |
| 1395 | |
| 1396 | // STATS: |
| 1397 | // Desc, flow, agg, table, port, queue, group, group_desc, group_feat, experi |
| 1398 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1399 | struct of_stats_request : of_header { |
| 1400 | uint8_t version; |
| 1401 | uint8_t type == 18; |
| 1402 | uint16_t length; |
| 1403 | uint32_t xid; |
Andreas Wundsam | c37ba3d | 2013-08-02 17:51:51 -0700 | [diff] [blame] | 1404 | uint16_t stats_type == ?; |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1405 | uint16_t flags; |
| 1406 | pad(4); |
| 1407 | }; |
| 1408 | |
| 1409 | struct of_stats_reply : of_header { |
| 1410 | uint8_t version; |
| 1411 | uint8_t type == 19; |
| 1412 | uint16_t length; |
| 1413 | uint32_t xid; |
Andreas Wundsam | c37ba3d | 2013-08-02 17:51:51 -0700 | [diff] [blame] | 1414 | uint16_t stats_type == ?; |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1415 | uint16_t flags; |
| 1416 | pad(4); |
| 1417 | }; |
| 1418 | |
| 1419 | struct of_desc_stats_request : of_stats_request { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1420 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1421 | uint8_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1422 | uint16_t length; |
| 1423 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1424 | uint16_t stats_type == 0; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1425 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1426 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1427 | }; |
| 1428 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1429 | struct of_desc_stats_reply : of_stats_reply { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1430 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1431 | uint8_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1432 | uint16_t length; |
| 1433 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1434 | uint16_t stats_type == 0; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1435 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1436 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1437 | of_desc_str_t mfr_desc; |
| 1438 | of_desc_str_t hw_desc; |
| 1439 | of_desc_str_t sw_desc; |
| 1440 | of_serial_num_t serial_num; |
| 1441 | of_desc_str_t dp_desc; |
| 1442 | }; |
| 1443 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1444 | struct of_flow_stats_request : of_stats_request { |
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 == 18; |
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 == 1; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1450 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1451 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1452 | uint8_t table_id; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1453 | pad(3); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1454 | of_port_no_t out_port; |
| 1455 | uint32_t out_group; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1456 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1457 | uint64_t cookie; |
| 1458 | uint64_t cookie_mask; |
| 1459 | of_match_t match; |
| 1460 | }; |
| 1461 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1462 | struct of_flow_stats_reply : of_stats_reply { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1463 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1464 | uint8_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1465 | uint16_t length; |
| 1466 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1467 | uint16_t stats_type == 1; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1468 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1469 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1470 | list(of_flow_stats_entry_t) entries; |
| 1471 | }; |
| 1472 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1473 | struct of_aggregate_stats_request : of_stats_request { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1474 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1475 | uint8_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1476 | uint16_t length; |
| 1477 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1478 | uint16_t stats_type == 2; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1479 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1480 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1481 | uint8_t table_id; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1482 | pad(3); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1483 | of_port_no_t out_port; |
| 1484 | uint32_t out_group; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1485 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1486 | uint64_t cookie; |
| 1487 | uint64_t cookie_mask; |
| 1488 | of_match_t match; |
| 1489 | }; |
| 1490 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1491 | struct of_aggregate_stats_reply : of_stats_reply { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1492 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1493 | uint8_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1494 | uint16_t length; |
| 1495 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1496 | uint16_t stats_type == 2; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1497 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1498 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1499 | uint64_t packet_count; |
| 1500 | uint64_t byte_count; |
| 1501 | uint32_t flow_count; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1502 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1503 | }; |
| 1504 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1505 | struct of_table_stats_request : of_stats_request { |
Rich Lane | 8bfdafc | 2013-05-02 14:54:42 -0700 | [diff] [blame] | 1506 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1507 | uint8_t type == 18; |
Rich Lane | 8bfdafc | 2013-05-02 14:54:42 -0700 | [diff] [blame] | 1508 | uint16_t length; |
| 1509 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1510 | uint16_t stats_type == 3; |
Rich Lane | 8bfdafc | 2013-05-02 14:54:42 -0700 | [diff] [blame] | 1511 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1512 | pad(4); |
Rich Lane | 8bfdafc | 2013-05-02 14:54:42 -0700 | [diff] [blame] | 1513 | }; |
| 1514 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1515 | struct of_table_stats_reply : of_stats_reply { |
Rich Lane | 8bfdafc | 2013-05-02 14:54:42 -0700 | [diff] [blame] | 1516 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1517 | uint8_t type == 19; |
Rich Lane | 8bfdafc | 2013-05-02 14:54:42 -0700 | [diff] [blame] | 1518 | uint16_t length; |
| 1519 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1520 | uint16_t stats_type == 3; |
Rich Lane | 8bfdafc | 2013-05-02 14:54:42 -0700 | [diff] [blame] | 1521 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1522 | pad(4); |
Rich Lane | 8bfdafc | 2013-05-02 14:54:42 -0700 | [diff] [blame] | 1523 | list(of_table_stats_entry_t) entries; |
| 1524 | }; |
| 1525 | |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1526 | // FIXME: These are padded to 8 byte align beyond the length indicated |
| 1527 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1528 | struct of_table_feature_prop { |
Rich Lane | a1b8f44 | 2013-10-01 22:05:22 -0700 | [diff] [blame] | 1529 | uint16_t type == ?; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1530 | uint16_t length; |
| 1531 | }; |
| 1532 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1533 | struct of_table_feature_prop_instructions : of_table_feature_prop { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1534 | uint16_t type == 0; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1535 | uint16_t length; |
| 1536 | // FIXME Check if instruction_t is right for ids here |
| 1537 | list(of_instruction_t) instruction_ids; |
| 1538 | }; |
| 1539 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1540 | struct of_table_feature_prop_instructions_miss : of_table_feature_prop { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1541 | uint16_t type == 1; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1542 | uint16_t length; |
| 1543 | list(of_instruction_t) instruction_ids; |
| 1544 | }; |
| 1545 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1546 | struct of_table_feature_prop_next_tables : of_table_feature_prop { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1547 | uint16_t type == 2; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1548 | uint16_t length; |
| 1549 | list(of_uint8_t) next_table_ids; |
| 1550 | }; |
| 1551 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1552 | struct of_table_feature_prop_next_tables_miss : of_table_feature_prop { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1553 | uint16_t type == 3; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1554 | uint16_t length; |
| 1555 | list(of_uint8_t) next_table_ids; |
| 1556 | }; |
| 1557 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1558 | struct of_table_feature_prop_write_actions : of_table_feature_prop { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1559 | uint16_t type == 4; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1560 | uint16_t length; |
| 1561 | list(of_action_id_t) action_ids; |
| 1562 | }; |
| 1563 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1564 | struct of_table_feature_prop_write_actions_miss : of_table_feature_prop { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1565 | uint16_t type == 5; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1566 | uint16_t length; |
| 1567 | list(of_action_id_t) action_ids; |
| 1568 | }; |
| 1569 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1570 | struct of_table_feature_prop_apply_actions : of_table_feature_prop { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1571 | uint16_t type == 6; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1572 | uint16_t length; |
| 1573 | list(of_action_id_t) action_ids; |
| 1574 | }; |
| 1575 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1576 | struct of_table_feature_prop_apply_actions_miss : of_table_feature_prop { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1577 | uint16_t type == 7; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1578 | uint16_t length; |
| 1579 | list(of_action_id_t) action_ids; |
| 1580 | }; |
| 1581 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1582 | struct of_table_feature_prop_match : of_table_feature_prop { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1583 | uint16_t type == 8; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1584 | uint16_t length; |
| 1585 | list(of_uint32_t) oxm_ids; |
| 1586 | }; |
| 1587 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1588 | struct of_table_feature_prop_wildcards : of_table_feature_prop { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1589 | uint16_t type == 10; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1590 | uint16_t length; |
| 1591 | list(of_uint32_t) oxm_ids; |
| 1592 | }; |
| 1593 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1594 | struct of_table_feature_prop_write_setfield : of_table_feature_prop { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1595 | uint16_t type == 12; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1596 | uint16_t length; |
| 1597 | list(of_uint32_t) oxm_ids; |
| 1598 | }; |
| 1599 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1600 | struct of_table_feature_prop_write_setfield_miss : of_table_feature_prop { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1601 | uint16_t type == 13; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1602 | uint16_t length; |
| 1603 | list(of_uint32_t) oxm_ids; |
| 1604 | }; |
| 1605 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1606 | struct of_table_feature_prop_apply_setfield : of_table_feature_prop { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1607 | uint16_t type == 14; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1608 | uint16_t length; |
| 1609 | list(of_uint32_t) oxm_ids; |
| 1610 | }; |
| 1611 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1612 | struct of_table_feature_prop_apply_setfield_miss : of_table_feature_prop { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1613 | uint16_t type == 15; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1614 | uint16_t length; |
| 1615 | list(of_uint32_t) oxm_ids; |
| 1616 | }; |
| 1617 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1618 | struct of_table_feature_prop_experimenter : of_table_feature_prop { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1619 | uint16_t type == 65535; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1620 | uint16_t length; |
| 1621 | uint32_t experimenter; |
| 1622 | uint32_t subtype; |
| 1623 | of_octets_t experimenter_data; |
| 1624 | }; |
| 1625 | |
| 1626 | // Not yet supported |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1627 | // struct of_table_feature_prop_experimenter_miss : of_table_feature_prop { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1628 | // uint16_t type; |
| 1629 | // uint16_t length; |
| 1630 | // uint32_t experimenter; |
| 1631 | // uint32_t subtype; |
| 1632 | // of_octets_t experimenter_data; |
| 1633 | // }; |
| 1634 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1635 | struct of_table_features { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1636 | uint16_t length; |
| 1637 | uint8_t table_id; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1638 | pad(5); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1639 | of_table_name_t name; |
| 1640 | uint64_t metadata_match; |
| 1641 | uint64_t metadata_write; |
| 1642 | uint32_t config; |
| 1643 | uint32_t max_entries; |
| 1644 | list(of_table_feature_prop_t) properties; |
| 1645 | }; |
| 1646 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1647 | struct of_meter_features { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1648 | uint32_t max_meter; |
| 1649 | uint32_t band_types; |
| 1650 | uint32_t capabilities; |
| 1651 | uint8_t max_bands; |
| 1652 | uint8_t max_color; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1653 | pad(2); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1654 | }; |
| 1655 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1656 | struct of_port_stats_request : of_stats_request { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1657 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1658 | uint8_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1659 | uint16_t length; |
| 1660 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1661 | uint16_t stats_type == 4; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1662 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1663 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1664 | of_port_no_t port_no; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1665 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1666 | }; |
| 1667 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1668 | struct of_port_stats_reply : of_stats_reply { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1669 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1670 | uint8_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1671 | uint16_t length; |
| 1672 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1673 | uint16_t stats_type == 4; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1674 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1675 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1676 | list(of_port_stats_entry_t) entries; |
| 1677 | }; |
| 1678 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1679 | struct of_queue_stats_request : of_stats_request { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1680 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1681 | uint8_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1682 | uint16_t length; |
| 1683 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1684 | uint16_t stats_type == 5; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1685 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1686 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1687 | of_port_no_t port_no; |
| 1688 | uint32_t queue_id; |
| 1689 | }; |
| 1690 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1691 | struct of_queue_stats_reply : of_stats_reply { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1692 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1693 | uint8_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1694 | uint16_t length; |
| 1695 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1696 | uint16_t stats_type == 5; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1697 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1698 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1699 | list(of_queue_stats_entry_t) entries; |
| 1700 | }; |
| 1701 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1702 | struct of_group_stats_request : of_stats_request { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1703 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1704 | uint8_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1705 | uint16_t length; |
| 1706 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1707 | uint16_t stats_type == 6; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1708 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1709 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1710 | uint32_t group_id; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1711 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1712 | }; |
| 1713 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1714 | struct of_group_stats_reply : of_stats_reply { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1715 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1716 | uint8_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1717 | uint16_t length; |
| 1718 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1719 | uint16_t stats_type == 6; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1720 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1721 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1722 | list(of_group_stats_entry_t) entries; |
| 1723 | }; |
| 1724 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1725 | struct of_group_desc_stats_request : of_stats_request { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1726 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1727 | uint8_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1728 | uint16_t length; |
| 1729 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1730 | uint16_t stats_type == 7; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1731 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1732 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1733 | }; |
| 1734 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1735 | struct of_group_desc_stats_reply : of_stats_reply { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1736 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1737 | uint8_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1738 | uint16_t length; |
| 1739 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1740 | uint16_t stats_type == 7; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1741 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1742 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1743 | list(of_group_desc_stats_entry_t) entries; |
| 1744 | }; |
| 1745 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1746 | struct of_group_features_stats_request : of_stats_request { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1747 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1748 | uint8_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1749 | uint16_t length; |
| 1750 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1751 | uint16_t stats_type == 8; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1752 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1753 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1754 | }; |
| 1755 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1756 | struct of_group_features_stats_reply : of_stats_reply { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1757 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1758 | uint8_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1759 | uint16_t length; |
| 1760 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1761 | uint16_t stats_type == 8; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1762 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1763 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1764 | uint32_t types; |
| 1765 | uint32_t capabilities; |
| 1766 | uint32_t max_groups_all; |
| 1767 | uint32_t max_groups_select; |
| 1768 | uint32_t max_groups_indirect; |
| 1769 | uint32_t max_groups_ff; |
| 1770 | uint32_t actions_all; |
| 1771 | uint32_t actions_select; |
| 1772 | uint32_t actions_indirect; |
| 1773 | uint32_t actions_ff; |
| 1774 | }; |
| 1775 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1776 | struct of_meter_stats_request : of_stats_request { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1777 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1778 | uint8_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1779 | uint16_t length; |
| 1780 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1781 | uint16_t stats_type == 9; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1782 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1783 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1784 | uint32_t meter_id; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1785 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1786 | }; |
| 1787 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1788 | struct of_meter_stats_reply : of_stats_reply { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1789 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1790 | uint8_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1791 | uint16_t length; |
| 1792 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1793 | uint16_t stats_type == 9; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1794 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1795 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1796 | list(of_meter_stats_t) entries; |
| 1797 | }; |
| 1798 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1799 | struct of_meter_config_stats_request : of_stats_request { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1800 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1801 | uint8_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1802 | uint16_t length; |
| 1803 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1804 | uint16_t stats_type == 10; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1805 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1806 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1807 | uint32_t meter_id; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1808 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1809 | }; |
| 1810 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1811 | struct of_meter_config_stats_reply : of_stats_reply { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1812 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1813 | uint8_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1814 | uint16_t length; |
| 1815 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1816 | uint16_t stats_type == 10; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1817 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1818 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1819 | list(of_meter_band_t) entries; |
| 1820 | }; |
| 1821 | |
| 1822 | // FIXME stats added to get things working |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1823 | struct of_meter_features_stats_request : of_stats_request { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1824 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1825 | uint8_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1826 | uint16_t length; |
| 1827 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1828 | uint16_t stats_type == 11; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1829 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1830 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1831 | }; |
| 1832 | |
| 1833 | // FIXME stats added to get things working |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1834 | struct of_meter_features_stats_reply : of_stats_reply { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1835 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1836 | uint8_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1837 | uint16_t length; |
| 1838 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1839 | uint16_t stats_type == 11; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1840 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1841 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1842 | of_meter_features_t features; |
| 1843 | }; |
| 1844 | |
| 1845 | // FIXME stats added to get things working |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1846 | struct of_table_features_stats_request : of_stats_request { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1847 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1848 | uint8_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1849 | uint16_t length; |
| 1850 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1851 | uint16_t stats_type == 12; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1852 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1853 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1854 | list(of_table_features_t) entries; |
| 1855 | }; |
| 1856 | |
| 1857 | // FIXME stats added to get things working |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1858 | struct of_table_features_stats_reply : of_stats_reply { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1859 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1860 | uint8_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1861 | uint16_t length; |
| 1862 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1863 | uint16_t stats_type == 12; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1864 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1865 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1866 | list(of_table_features_t) entries; |
| 1867 | }; |
| 1868 | |
| 1869 | // FIXME stats added to get things working |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1870 | struct of_port_desc_stats_request : of_stats_request { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1871 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1872 | uint8_t type == 18; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1873 | uint16_t length; |
| 1874 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1875 | uint16_t stats_type == 13; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1876 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1877 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1878 | }; |
| 1879 | |
| 1880 | // FIXME stats added to get things working |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1881 | struct of_port_desc_stats_reply : of_stats_reply { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1882 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1883 | uint8_t type == 19; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1884 | uint16_t length; |
| 1885 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1886 | uint16_t stats_type == 13; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1887 | uint16_t flags; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1888 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1889 | list(of_port_desc_t) entries; |
| 1890 | }; |
| 1891 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1892 | struct of_meter_band_stats { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1893 | uint64_t packet_band_count; |
| 1894 | uint64_t byte_band_count; |
| 1895 | }; |
| 1896 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1897 | struct of_meter_stats { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1898 | uint32_t meter_id; |
| 1899 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1900 | pad(6); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1901 | uint32_t flow_count; |
| 1902 | uint64_t packet_in_count; |
| 1903 | uint64_t byte_in_count; |
| 1904 | uint32_t duration_sec; |
| 1905 | uint32_t duration_nsec; |
| 1906 | list(of_meter_band_stats_t) band_stats; |
| 1907 | }; |
| 1908 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1909 | struct of_meter_config { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1910 | uint16_t length; |
| 1911 | uint16_t flags; |
| 1912 | uint32_t meter_id; |
| 1913 | list(of_meter_band_t) entries; |
| 1914 | }; |
| 1915 | |
Rob Vaterlaus | feee371 | 2013-09-30 11:24:19 -0700 | [diff] [blame] | 1916 | struct of_experimenter_stats_header { |
Rich Lane | b25d07c | 2013-08-22 17:22:43 -0700 | [diff] [blame] | 1917 | uint32_t experimenter == ?; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1918 | uint32_t subtype; |
| 1919 | }; |
| 1920 | |
| 1921 | // END OF STATS OBJECTS |
| 1922 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1923 | struct of_queue_prop { |
Andreas Wundsam | c37ba3d | 2013-08-02 17:51:51 -0700 | [diff] [blame] | 1924 | uint16_t type == ?; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1925 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1926 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1927 | }; |
| 1928 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1929 | struct of_queue_prop_min_rate : of_queue_prop { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1930 | uint16_t type == 1; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1931 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1932 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1933 | uint16_t rate; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1934 | pad(6); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1935 | }; |
| 1936 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1937 | struct of_queue_prop_max_rate : of_queue_prop { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1938 | uint16_t type == 2; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1939 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1940 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1941 | uint16_t rate; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1942 | pad(6); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1943 | }; |
| 1944 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1945 | struct of_queue_prop_experimenter : of_queue_prop { |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1946 | uint16_t type == 65535; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1947 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1948 | pad(4); |
Rich Lane | b25d07c | 2013-08-22 17:22:43 -0700 | [diff] [blame] | 1949 | uint32_t experimenter == ?; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1950 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1951 | of_octets_t data; |
| 1952 | }; |
| 1953 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 1954 | struct of_packet_queue { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1955 | uint32_t queue_id; |
| 1956 | of_port_no_t port; |
| 1957 | uint16_t len; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1958 | pad(6); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1959 | list(of_queue_prop_t) properties; |
| 1960 | }; |
| 1961 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1962 | struct of_queue_get_config_request : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1963 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1964 | uint8_t type == 22; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1965 | uint16_t length; |
| 1966 | uint32_t xid; |
| 1967 | of_port_no_t port; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1968 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1969 | }; |
| 1970 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1971 | struct of_queue_get_config_reply : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1972 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1973 | uint8_t type == 23; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1974 | uint16_t length; |
| 1975 | uint32_t xid; |
| 1976 | of_port_no_t port; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1977 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1978 | list(of_packet_queue_t) queues; |
| 1979 | }; |
| 1980 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1981 | struct of_role_request : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1982 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1983 | uint8_t type == 24; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1984 | uint16_t length; |
| 1985 | uint32_t xid; |
| 1986 | uint32_t role; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 1987 | pad(4); |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1988 | uint64_t generation_id; |
| 1989 | }; |
| 1990 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 1991 | struct of_role_reply : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1992 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 1993 | uint8_t type == 25; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1994 | uint16_t length; |
| 1995 | uint32_t xid; |
| 1996 | of_octets_t data; |
| 1997 | }; |
| 1998 | |
| 1999 | //////////////////////////////////////////////////////////////// |
| 2000 | // FIXME understand async; where do bitmasks live? |
| 2001 | // Determine bitmap type for masks below. |
| 2002 | // DOCUMENT masks where uint32_t[0] is interest for equal/master |
| 2003 | // while uint32_t[1] is interest for slave |
| 2004 | //////////////////////////////////////////////////////////////// |
| 2005 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 2006 | struct of_async_get_request : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 2007 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 2008 | uint8_t type == 26; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 2009 | uint16_t length; |
| 2010 | uint32_t xid; |
| 2011 | uint32_t packet_in_mask_equal_master; |
| 2012 | uint32_t packet_in_mask_slave; |
| 2013 | uint32_t port_status_mask_equal_master; |
| 2014 | uint32_t port_status_mask_slave; |
| 2015 | uint32_t flow_removed_mask_equal_master; |
| 2016 | uint32_t flow_removed_mask_slave; |
| 2017 | }; |
| 2018 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 2019 | struct of_async_get_reply : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 2020 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 2021 | uint8_t type == 27; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 2022 | uint16_t length; |
| 2023 | uint32_t xid; |
| 2024 | uint32_t packet_in_mask_equal_master; |
| 2025 | uint32_t packet_in_mask_slave; |
| 2026 | uint32_t port_status_mask_equal_master; |
| 2027 | uint32_t port_status_mask_slave; |
| 2028 | uint32_t flow_removed_mask_equal_master; |
| 2029 | uint32_t flow_removed_mask_slave; |
| 2030 | }; |
| 2031 | |
Rich Lane | e9c37db | 2013-06-21 18:30:24 -0700 | [diff] [blame] | 2032 | struct of_async_set : of_header { |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 2033 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 2034 | uint8_t type == 28; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 2035 | uint16_t length; |
| 2036 | uint32_t xid; |
| 2037 | uint32_t packet_in_mask_equal_master; |
| 2038 | uint32_t packet_in_mask_slave; |
| 2039 | uint32_t port_status_mask_equal_master; |
| 2040 | uint32_t port_status_mask_slave; |
| 2041 | uint32_t flow_removed_mask_equal_master; |
| 2042 | uint32_t flow_removed_mask_slave; |
| 2043 | }; |