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