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