blob: bedb5339ddeb90aea3236151f1275d55cc63f630 [file] [log] [blame]
Rich Lanea06d0c32013-03-25 08:52:03 -07001// 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 Lane5d33a622013-04-08 17:33:11 -070027//
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 Lanea06d0c32013-03-25 08:52:03 -070031
32#version 4
33
Rich Lane5d33a622013-04-08 17:33:11 -070034enum macro_definitions {
35 OFP_MAX_TABLE_NAME_LEN = 32,
36 OFP_MAX_PORT_NAME_LEN = 16,
37
Wilson Ngd72013d2013-09-29 10:21:48 -070038 OFP_TCP_PORT = 6653,
39 OFP_SSL_PORT = 6653,
Rich Lane5d33a622013-04-08 17:33:11 -070040
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 Wundsam4ee51462013-07-30 11:00:37 -070061enum ofp_port(wire_type=uint32_t) {
Rich Lane5d33a622013-04-08 17:33:11 -070062 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,
Tomasz949aa522013-10-23 16:12:27 -070070 OFPP_ANY = 0xffffffff,
Rich Lane5d33a622013-04-08 17:33:11 -070071};
72
Andreas Wundsam4ee51462013-07-30 11:00:37 -070073enum ofp_type(wire_type=uint8_t) {
Rich Lane5d33a622013-04-08 17:33:11 -070074 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 Vaterlausfeee3712013-09-30 11:24:19 -070092 OFPT_STATS_REQUEST = 18,
93 OFPT_STATS_REPLY = 19,
Rich Lane5d33a622013-04-08 17:33:11 -070094 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 Wundsam4ee51462013-07-30 11:00:37 -0700106enum ofp_config_flags(wire_type=uint16_t, bitmask=True) {
Rich Lane5d33a622013-04-08 17:33:11 -0700107 OFPC_FRAG_NORMAL = 0,
108 OFPC_FRAG_DROP = 1,
109 OFPC_FRAG_REASM = 2,
110 OFPC_FRAG_MASK = 3,
111};
112
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700113enum ofp_table_config(wire_type=uint32_t, bitmask=True) {
Rich Lane5d33a622013-04-08 17:33:11 -0700114 OFPTC_DEPRECATED_MASK = 0x3,
115};
116
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700117enum ofp_table(wire_type=uint8_t, complete=False) {
Rich Lane5d33a622013-04-08 17:33:11 -0700118 OFPTT_MAX = 0xfe,
119 OFPTT_ALL = 0xff,
120};
121
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700122enum ofp_capabilities(wire_type=uint32_t, bitmask=True) {
Rich Lane5d33a622013-04-08 17:33:11 -0700123 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 Wundsam4ee51462013-07-30 11:00:37 -0700132enum ofp_port_config(wire_type=uint32_t, bitmask=True) {
Rich Lane5d33a622013-04-08 17:33:11 -0700133 OFPPC_PORT_DOWN = 0x1,
134 OFPPC_NO_RECV = 0x4,
135 OFPPC_NO_FWD = 0x20,
136 OFPPC_NO_PACKET_IN = 0x40,
Rob Vaterlaus0a8ec142013-10-10 13:27:14 -0700137 OFPPC_BSN_MIRROR_DEST = 0x80000000,
Rich Lane5d33a622013-04-08 17:33:11 -0700138};
139
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700140enum ofp_port_state(wire_type=uint32_t, bitmask=True) {
Rich Lane5d33a622013-04-08 17:33:11 -0700141 OFPPS_LINK_DOWN = 0x1,
142 OFPPS_BLOCKED = 0x2,
143 OFPPS_LIVE = 0x4,
144};
145
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700146enum ofp_port_features(wire_type=uint32_t, bitmask=True) {
Rich Lane5d33a622013-04-08 17:33:11 -0700147 OFPPF_10MB_HD = 0x1,
148 OFPPF_10MB_FD = 0x2,
149 OFPPF_100MB_HD = 0x4,
150 OFPPF_100MB_FD = 0x8,
151 OFPPF_1GB_HD = 0x10,
152 OFPPF_1GB_FD = 0x20,
153 OFPPF_10GB_FD = 0x40,
154 OFPPF_40GB_FD = 0x80,
155 OFPPF_100GB_FD = 0x100,
156 OFPPF_1TB_FD = 0x200,
157 OFPPF_OTHER = 0x400,
158 OFPPF_COPPER = 0x800,
159 OFPPF_FIBER = 0x1000,
160 OFPPF_AUTONEG = 0x2000,
161 OFPPF_PAUSE = 0x4000,
162 OFPPF_PAUSE_ASYM = 0x8000,
163};
164
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700165enum ofp_port_reason(wire_type=uint8_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700166 OFPPR_ADD = 0,
167 OFPPR_DELETE = 1,
168 OFPPR_MODIFY = 2,
169};
170
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700171enum ofp_match_type(wire_type=uint16_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700172 OFPMT_STANDARD = 0,
173 OFPMT_OXM = 1,
174};
175
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700176enum ofp_oxm_class(wire_type=uint16_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700177 OFPXMC_NXM_0 = 0,
178 OFPXMC_NXM_1 = 1,
179 OFPXMC_OPENFLOW_BASIC = 0x8000,
180 OFPXMC_EXPERIMENTER = 0xffff,
181};
182
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700183enum ofp_vlan_id(wire_type=uint16_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700184 OFPVID_NONE = 0,
185 OFPVID_PRESENT = 0x1000,
186};
187
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700188// FIXME: OF spec specified this as '9' bits, implicitly adding
189// to full byte
190enum ofp_ipv6exthdr_flags(wire_type=uint16_t, bitmask=True) {
Rich Lane5d33a622013-04-08 17:33:11 -0700191 OFPIEH_NONEXT = 0x1,
192 OFPIEH_ESP = 0x2,
193 OFPIEH_AUTH = 0x4,
194 OFPIEH_DEST = 0x8,
195 OFPIEH_FRAG = 0x10,
196 OFPIEH_ROUTER = 0x20,
197 OFPIEH_HOP = 0x40,
198 OFPIEH_UNREP = 0x80,
199 OFPIEH_UNSEQ = 0x100,
200};
201
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700202enum ofp_action_type(wire_type=uint16_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700203 OFPAT_OUTPUT = 0,
204 OFPAT_COPY_TTL_OUT = 0xb,
205 OFPAT_COPY_TTL_IN = 0xc,
206 OFPAT_SET_MPLS_TTL = 0xf,
207 OFPAT_DEC_MPLS_TTL = 0x10,
208 OFPAT_PUSH_VLAN = 0x11,
209 OFPAT_POP_VLAN = 0x12,
210 OFPAT_PUSH_MPLS = 0x13,
211 OFPAT_POP_MPLS = 0x14,
212 OFPAT_SET_QUEUE = 0x15,
213 OFPAT_GROUP = 0x16,
214 OFPAT_SET_NW_TTL = 0x17,
215 OFPAT_DEC_NW_TTL = 0x18,
216 OFPAT_SET_FIELD = 0x19,
217 OFPAT_PUSH_PBB = 0x1a,
218 OFPAT_POP_PBB = 0x1b,
219 OFPAT_EXPERIMENTER = 0xffff,
220};
221
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700222enum ofp_controller_max_len(wire_type=uint16_t, complete=False) {
Rich Lane5d33a622013-04-08 17:33:11 -0700223 OFPCML_MAX = 0xffe5,
224 OFPCML_NO_BUFFER = 0xffff,
225};
226
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700227enum ofp_instruction_type(wire_type=uint16_t, bitmask=True) {
Rich Lane5d33a622013-04-08 17:33:11 -0700228 OFPIT_GOTO_TABLE = 0x1,
229 OFPIT_WRITE_METADATA = 0x2,
230 OFPIT_WRITE_ACTIONS = 0x3,
231 OFPIT_APPLY_ACTIONS = 0x4,
232 OFPIT_CLEAR_ACTIONS = 0x5,
233 OFPIT_METER = 0x6,
234 OFPIT_EXPERIMENTER = 0xffff,
235};
236
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700237enum ofp_flow_mod_command(wire_type=uint8_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700238 OFPFC_ADD = 0,
239 OFPFC_MODIFY = 1,
240 OFPFC_MODIFY_STRICT = 2,
241 OFPFC_DELETE = 3,
242 OFPFC_DELETE_STRICT = 4,
243};
244
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700245enum ofp_flow_mod_flags(wire_type=uint16_t, bitmask=True) {
Rich Lane5d33a622013-04-08 17:33:11 -0700246 OFPFF_SEND_FLOW_REM = 0x1,
247 OFPFF_CHECK_OVERLAP = 0x2,
248 OFPFF_RESET_COUNTS = 0x4,
249 OFPFF_NO_PKT_COUNTS = 0x8,
250 OFPFF_NO_BYT_COUNTS = 0x10,
Rich Lanef86f39a2013-10-07 18:04:11 -0700251
252 /* Non-standard, enabled by an experimenter message */
253 /* See the bsn_flow_idle input file */
254 OFPFF_BSN_SEND_IDLE = 0x80,
Rich Lane5d33a622013-04-08 17:33:11 -0700255};
256
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700257enum ofp_group(wire_type=uint32_t, complete=False) {
Rich Lane5d33a622013-04-08 17:33:11 -0700258 OFPG_MAX = 0xffffff00,
259 OFPG_ALL = 0xfffffffc,
260 OFPG_ANY = 0xffffffff,
261};
262
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700263enum ofp_group_mod_command(wire_type=uint16_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700264 OFPGC_ADD = 0,
265 OFPGC_MODIFY = 1,
266 OFPGC_DELETE = 2,
267};
268
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700269enum ofp_group_type(wire_type=uint8_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700270 OFPGT_ALL = 0,
271 OFPGT_SELECT = 1,
272 OFPGT_INDIRECT = 2,
273 OFPGT_FF = 3,
274};
275
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700276enum ofp_packet_in_reason(wire_type=uint8_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700277 OFPR_NO_MATCH = 0,
278 OFPR_ACTION = 1,
279 OFPR_INVALID_TTL = 2,
Andreas Wundsam7723c562013-10-23 16:27:40 -0700280
281 // non-standard BSN extensions. OF does not have a standard-conformant
282 // way to extend the set of packet_in reasons
283 OFPR_BSN_NEW_HOST = 128,
284 OFPR_BSN_STATION_MOVE = 129,
285 OFPR_BSN_BAD_VLAN = 130,
286 OFPR_BSN_DESTINATION_LOOKUP_FAILURE = 131,
Rich Lane5d33a622013-04-08 17:33:11 -0700287};
288
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700289enum ofp_flow_removed_reason(wire_type=uint8_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700290 OFPRR_IDLE_TIMEOUT = 0,
291 OFPRR_HARD_TIMEOUT = 1,
292 OFPRR_DELETE = 2,
293 OFPRR_GROUP_DELETE = 3,
294};
295
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700296enum ofp_meter(wire_type=uint32_t, complete=False) {
Rich Lane5d33a622013-04-08 17:33:11 -0700297 OFPM_MAX = 0xffff0000,
298 OFPM_SLOWPATH = 0xfffffffd,
299 OFPM_CONTROLLER = 0xfffffffe,
300 OFPM_ALL = 0xffffffff,
301};
302
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700303enum ofp_meter_band_type(wire_type=uint16_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700304 OFPMBT_DROP = 0x1,
305 OFPMBT_DSCP_REMARK = 0x2,
306 OFPMBT_EXPERIMENTER = 0xffff,
307};
308
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700309enum ofp_meter_mod_command(wire_type=uint16_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700310 OFPMC_ADD = 0,
311 OFPMC_MODIFY = 1,
312 OFPMC_DELETE = 2,
313};
314
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700315enum ofp_meter_flags(wire_type=uint16_t, bitmask=True) {
Rich Lane5d33a622013-04-08 17:33:11 -0700316 OFPMF_KBPS = 0x1,
317 OFPMF_PKTPS = 0x2,
318 OFPMF_BURST = 0x4,
319 OFPMF_STATS = 0x8,
320};
321
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700322enum ofp_error_type(wire_type=uint16_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700323 OFPET_HELLO_FAILED = 0,
324 OFPET_BAD_REQUEST = 1,
325 OFPET_BAD_ACTION = 2,
326 OFPET_BAD_INSTRUCTION = 3,
327 OFPET_BAD_MATCH = 4,
328 OFPET_FLOW_MOD_FAILED = 5,
329 OFPET_GROUP_MOD_FAILED = 6,
330 OFPET_PORT_MOD_FAILED = 7,
331 OFPET_TABLE_MOD_FAILED = 8,
332 OFPET_QUEUE_OP_FAILED = 9,
333 OFPET_SWITCH_CONFIG_FAILED = 10,
334 OFPET_ROLE_REQUEST_FAILED = 11,
335 OFPET_METER_MOD_FAILED = 12,
336 OFPET_TABLE_FEATURES_FAILED = 13,
337 OFPET_EXPERIMENTER = 0xffff,
338};
339
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700340enum ofp_hello_failed_code(wire_type=uint16_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700341 OFPHFC_INCOMPATIBLE = 0,
342 OFPHFC_EPERM = 1,
343};
344
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700345enum ofp_bad_request_code(wire_type=uint16_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700346 OFPBRC_BAD_VERSION = 0,
347 OFPBRC_BAD_TYPE = 1,
Rob Vaterlausfeee3712013-09-30 11:24:19 -0700348 OFPBRC_BAD_STAT = 2,
Rich Lane5d33a622013-04-08 17:33:11 -0700349 OFPBRC_BAD_EXPERIMENTER = 3,
Rob Vaterlausb3f49d92013-10-01 17:57:31 -0700350 OFPBRC_BAD_EXPERIMENTER_TYPE = 4,
Rich Lane5d33a622013-04-08 17:33:11 -0700351 OFPBRC_EPERM = 5,
352 OFPBRC_BAD_LEN = 6,
353 OFPBRC_BUFFER_EMPTY = 7,
354 OFPBRC_BUFFER_UNKNOWN = 8,
355 OFPBRC_BAD_TABLE_ID = 9,
356 OFPBRC_IS_SLAVE = 10,
357 OFPBRC_BAD_PORT = 11,
358 OFPBRC_BAD_PACKET = 12,
359 OFPBRC_MULTIPART_BUFFER_OVERFLOW = 13,
360};
361
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700362enum ofp_bad_action_code(wire_type=uint16_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700363 OFPBAC_BAD_TYPE = 0,
364 OFPBAC_BAD_LEN = 1,
365 OFPBAC_BAD_EXPERIMENTER = 2,
Rob Vaterlausb3f49d92013-10-01 17:57:31 -0700366 OFPBAC_BAD_EXPERIMENTER_TYPE = 3,
Rich Lane5d33a622013-04-08 17:33:11 -0700367 OFPBAC_BAD_OUT_PORT = 4,
368 OFPBAC_BAD_ARGUMENT = 5,
369 OFPBAC_EPERM = 6,
370 OFPBAC_TOO_MANY = 7,
371 OFPBAC_BAD_QUEUE = 8,
372 OFPBAC_BAD_OUT_GROUP = 9,
373 OFPBAC_MATCH_INCONSISTENT = 10,
374 OFPBAC_UNSUPPORTED_ORDER = 11,
375 OFPBAC_BAD_TAG = 12,
376 OFPBAC_BAD_SET_TYPE = 13,
377 OFPBAC_BAD_SET_LEN = 14,
378 OFPBAC_BAD_SET_ARGUMENT = 15,
379};
380
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700381enum ofp_bad_instruction_code(wire_type=uint16_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700382 OFPBIC_UNKNOWN_INST = 0,
383 OFPBIC_UNSUP_INST = 1,
384 OFPBIC_BAD_TABLE_ID = 2,
385 OFPBIC_UNSUP_METADATA = 3,
386 OFPBIC_UNSUP_METADATA_MASK = 4,
387 OFPBIC_BAD_EXPERIMENTER = 5,
Rob Vaterlausb3f49d92013-10-01 17:57:31 -0700388 OFPBIC_BAD_EXPERIMENTER_TYPE = 6,
Rich Lane5d33a622013-04-08 17:33:11 -0700389 OFPBIC_BAD_LEN = 7,
390 OFPBIC_EPERM = 8,
391};
392
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700393enum ofp_bad_match_code(wire_type=uint16_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700394 OFPBMC_BAD_TYPE = 0,
395 OFPBMC_BAD_LEN = 1,
396 OFPBMC_BAD_TAG = 2,
397 OFPBMC_BAD_DL_ADDR_MASK = 3,
398 OFPBMC_BAD_NW_ADDR_MASK = 4,
399 OFPBMC_BAD_WILDCARDS = 5,
400 OFPBMC_BAD_FIELD = 6,
401 OFPBMC_BAD_VALUE = 7,
402 OFPBMC_BAD_MASK = 8,
403 OFPBMC_BAD_PREREQ = 9,
404 OFPBMC_DUP_FIELD = 10,
405 OFPBMC_EPERM = 11,
406};
407
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700408enum ofp_flow_mod_failed_code(wire_type=uint16_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700409 OFPFMFC_UNKNOWN = 0,
410 OFPFMFC_TABLE_FULL = 1,
411 OFPFMFC_BAD_TABLE_ID = 2,
412 OFPFMFC_OVERLAP = 3,
413 OFPFMFC_EPERM = 4,
414 OFPFMFC_BAD_TIMEOUT = 5,
415 OFPFMFC_BAD_COMMAND = 6,
416 OFPFMFC_BAD_FLAGS = 7,
417};
418
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700419enum ofp_group_mod_failed_code(wire_type=uint16_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700420 OFPGMFC_GROUP_EXISTS = 0,
421 OFPGMFC_INVALID_GROUP = 1,
422 OFPGMFC_WEIGHT_UNSUPPORTED = 2,
423 OFPGMFC_OUT_OF_GROUPS = 3,
424 OFPGMFC_OUT_OF_BUCKETS = 4,
425 OFPGMFC_CHAINING_UNSUPPORTED = 5,
426 OFPGMFC_WATCH_UNSUPPORTED = 6,
427 OFPGMFC_LOOP = 7,
428 OFPGMFC_UNKNOWN_GROUP = 8,
429 OFPGMFC_CHAINED_GROUP = 9,
430 OFPGMFC_BAD_TYPE = 10,
431 OFPGMFC_BAD_COMMAND = 11,
432 OFPGMFC_BAD_BUCKET = 12,
433 OFPGMFC_BAD_WATCH = 13,
434 OFPGMFC_EPERM = 14,
435};
436
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700437enum ofp_port_mod_failed_code(wire_type=uint16_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700438 OFPPMFC_BAD_PORT = 0,
439 OFPPMFC_BAD_HW_ADDR = 1,
440 OFPPMFC_BAD_CONFIG = 2,
441 OFPPMFC_BAD_ADVERTISE = 3,
442 OFPPMFC_EPERM = 4,
443};
444
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700445enum ofp_table_mod_failed_code(wire_type=uint16_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700446 OFPTMFC_BAD_TABLE = 0,
447 OFPTMFC_BAD_CONFIG = 1,
448 OFPTMFC_EPERM = 2,
449};
450
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700451enum ofp_queue_op_failed_code(wire_type=uint16_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700452 OFPQOFC_BAD_PORT = 0,
453 OFPQOFC_BAD_QUEUE = 1,
454 OFPQOFC_EPERM = 2,
455};
456
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700457enum ofp_switch_config_failed_code(wire_type=uint16_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700458 OFPSCFC_BAD_FLAGS = 0,
459 OFPSCFC_BAD_LEN = 1,
460 OFPSCFC_EPERM = 2,
461};
462
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700463enum ofp_role_request_failed_code(wire_type=uint16_t){
Rich Lane5d33a622013-04-08 17:33:11 -0700464 OFPRRFC_STALE = 0,
465 OFPRRFC_UNSUP = 1,
466 OFPRRFC_BAD_ROLE = 2,
467};
468
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700469enum ofp_meter_mod_failed_code(wire_type=uint16_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700470 OFPMMFC_UNKNOWN = 0,
471 OFPMMFC_METER_EXISTS = 1,
472 OFPMMFC_INVALID_METER = 2,
473 OFPMMFC_UNKNOWN_METER = 3,
474 OFPMMFC_BAD_COMMAND = 4,
475 OFPMMFC_BAD_FLAGS = 5,
476 OFPMMFC_BAD_RATE = 6,
477 OFPMMFC_BAD_BURST = 7,
478 OFPMMFC_BAD_BAND = 8,
479 OFPMMFC_BAD_BAND_VALUE = 9,
480 OFPMMFC_OUT_OF_METERS = 10,
481 OFPMMFC_OUT_OF_BANDS = 11,
482};
483
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700484enum ofp_table_features_failed_code(wire_type=uint16_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700485 OFPTFFC_BAD_TABLE = 0,
486 OFPTFFC_BAD_METADATA = 1,
487 OFPTFFC_BAD_TYPE = 2,
488 OFPTFFC_BAD_LEN = 3,
489 OFPTFFC_BAD_ARGUMENT = 4,
490 OFPTFFC_EPERM = 5,
491};
492
Rob Vaterlausfeee3712013-09-30 11:24:19 -0700493enum ofp_stats_type(wire_type=uint16_t) {
494 OFPST_DESC = 0,
495 OFPST_FLOW = 1,
496 OFPST_AGGREGATE = 2,
497 OFPST_TABLE = 3,
498 OFPST_PORT = 4,
499 OFPST_QUEUE = 5,
500 OFPST_GROUP = 6,
501 OFPST_GROUP_DESC = 7,
502 OFPST_GROUP_FEATURES = 8,
503 OFPST_METER = 9,
504 OFPST_METER_CONFIG = 10,
505 OFPST_METER_FEATURES = 11,
506 OFPST_TABLE_FEATURES = 12,
507 OFPST_PORT_DESC = 13,
508 OFPST_EXPERIMENTER = 0xffff,
Rich Lane5d33a622013-04-08 17:33:11 -0700509};
510
Rob Vaterlausfeee3712013-09-30 11:24:19 -0700511enum ofp_stats_request_flags(wire_type=uint16_t, bitmask=True) {
512 OFPSF_REQ_MORE = 0x1,
Rich Lane5d33a622013-04-08 17:33:11 -0700513};
514
Rob Vaterlausfeee3712013-09-30 11:24:19 -0700515enum ofp_stats_reply_flags(wire_type=uint16_t, bitmask=True) {
516 OFPSF_REPLY_MORE = 0x1,
Rich Lane5d33a622013-04-08 17:33:11 -0700517};
518
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700519enum ofp_table_feature_prop_type(wire_type=uint16_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700520 OFPTFPT_INSTRUCTIONS = 0,
521 OFPTFPT_INSTRUCTIONS_MISS = 1,
522 OFPTFPT_NEXT_TABLES = 2,
523 OFPTFPT_NEXT_TABLES_MISS = 3,
524 OFPTFPT_WRITE_ACTIONS = 4,
525 OFPTFPT_WRITE_ACTIONS_MISS = 5,
526 OFPTFPT_APPLY_ACTIONS = 6,
527 OFPTFPT_APPLY_ACTIONS_MISS = 7,
528 OFPTFPT_MATCH = 8,
529 OFPTFPT_WILDCARDS = 0xa,
530 OFPTFPT_WRITE_SETFIELD = 0xc,
531 OFPTFPT_WRITE_SETFIELD_MISS = 0xd,
532 OFPTFPT_APPLY_SETFIELD = 0xe,
533 OFPTFPT_APPLY_SETFIELD_MISS = 0xf,
534 OFPTFPT_EXPERIMENTER = 0xfffe,
535 OFPTFPT_EXPERIMENTER_MISS = 0xffff,
536};
537
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700538enum ofp_group_capabilities(wire_type=uint32_t, bitmask=True) {
Rich Lane5d33a622013-04-08 17:33:11 -0700539 OFPGFC_SELECT_WEIGHT = 0x1,
540 OFPGFC_SELECT_LIVENESS = 0x2,
541 OFPGFC_CHAINING = 0x4,
542 OFPGFC_CHAINING_CHECKS = 0x8,
543};
544
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700545enum ofp_queue_properties(wire_type=uint16_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700546 OFPQT_MIN_RATE = 0x1,
547 OFPQT_MAX_RATE = 0x2,
548 OFPQT_EXPERIMENTER = 0xffff,
549};
550
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700551enum ofp_controller_role(wire_type=uint32_t) {
Rich Lane5d33a622013-04-08 17:33:11 -0700552 OFPCR_ROLE_NOCHANGE = 0,
553 OFPCR_ROLE_EQUAL = 1,
554 OFPCR_ROLE_MASTER = 2,
555 OFPCR_ROLE_SLAVE = 3,
556};
557
Andreas Wundsam4ee51462013-07-30 11:00:37 -0700558enum ofp_hello_elem_type(wire_type=uint16_t) {
Rich Lane0733cd62013-04-18 21:14:42 -0700559 OFPHET_VERSIONBITMAP = 1,
560};
561
Rich Lanee9c37db2013-06-21 18:30:24 -0700562/* XXX rename to of_message */
Rich Lane68ae4d72013-05-09 10:55:19 -0700563struct of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -0700564 uint8_t version;
Andreas Wundsamc37ba3d2013-08-02 17:51:51 -0700565 uint8_t type == ?;
Rich Lanea06d0c32013-03-25 08:52:03 -0700566 uint16_t length;
567 uint32_t xid;
568};
569
570// Special structures used for managing scalar list elements
Rich Lane68ae4d72013-05-09 10:55:19 -0700571struct of_uint32 {
Rich Lanea06d0c32013-03-25 08:52:03 -0700572 uint32_t value;
573};
574
575// Special structures used for managing scalar list elements
Rich Lane68ae4d72013-05-09 10:55:19 -0700576struct of_uint8 {
Rich Lanea06d0c32013-03-25 08:52:03 -0700577 uint8_t value;
578};
579
Rich Lane68ae4d72013-05-09 10:55:19 -0700580struct of_hello_elem {
Andreas Wundsam70411bf2013-08-02 22:26:38 -0700581 uint16_t type == ?;
Rich Lanea06d0c32013-03-25 08:52:03 -0700582 uint16_t length;
583};
584
Rich Lanee9c37db2013-06-21 18:30:24 -0700585struct of_hello_elem_versionbitmap : of_hello_elem {
Rich Lane31b87142013-05-09 22:05:42 -0700586 uint16_t type == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -0700587 uint16_t length;
588 list(of_uint32_t) bitmaps;
589};
590
Rich Lanee9c37db2013-06-21 18:30:24 -0700591struct of_hello : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -0700592 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700593 uint8_t type == 0;
Rich Lanea06d0c32013-03-25 08:52:03 -0700594 uint16_t length;
595 uint32_t xid;
596 list(of_hello_elem_t) elements;
597};
598
Rich Lanee9c37db2013-06-21 18:30:24 -0700599struct of_echo_request : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -0700600 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700601 uint8_t type == 2;
Rich Lanea06d0c32013-03-25 08:52:03 -0700602 uint16_t length;
603 uint32_t xid;
604 of_octets_t data;
605};
606
Rich Lanee9c37db2013-06-21 18:30:24 -0700607struct of_echo_reply : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -0700608 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700609 uint8_t type == 3;
Rich Lanea06d0c32013-03-25 08:52:03 -0700610 uint16_t length;
611 uint32_t xid;
612 of_octets_t data;
613};
614
Rich Lanee9c37db2013-06-21 18:30:24 -0700615struct of_experimenter : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -0700616 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700617 uint8_t type == 4;
Rich Lanea06d0c32013-03-25 08:52:03 -0700618 uint16_t length;
619 uint32_t xid;
Rich Laneb25d07c2013-08-22 17:22:43 -0700620 uint32_t experimenter == ?;
Rich Lanea06d0c32013-03-25 08:52:03 -0700621 uint32_t subtype;
622 of_octets_t data;
623};
624
Rich Lanee9c37db2013-06-21 18:30:24 -0700625struct of_barrier_request : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -0700626 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700627 uint8_t type == 20;
Rich Lanea06d0c32013-03-25 08:52:03 -0700628 uint16_t length;
629 uint32_t xid;
630};
631
Rich Lanee9c37db2013-06-21 18:30:24 -0700632struct of_barrier_reply : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -0700633 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700634 uint8_t type == 21;
Rich Lanea06d0c32013-03-25 08:52:03 -0700635 uint16_t length;
636 uint32_t xid;
637};
638
Rich Lanee9c37db2013-06-21 18:30:24 -0700639struct of_get_config_request : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -0700640 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700641 uint8_t type == 7;
Rich Lanea06d0c32013-03-25 08:52:03 -0700642 uint16_t length;
643 uint32_t xid;
644};
645
Rich Lanee9c37db2013-06-21 18:30:24 -0700646struct of_get_config_reply : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -0700647 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700648 uint8_t type == 8;
Rich Lanea06d0c32013-03-25 08:52:03 -0700649 uint16_t length;
650 uint32_t xid;
651 uint16_t flags;
652 uint16_t miss_send_len;
653};
654
Rich Lanee9c37db2013-06-21 18:30:24 -0700655struct of_set_config : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -0700656 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700657 uint8_t type == 9;
Rich Lanea06d0c32013-03-25 08:52:03 -0700658 uint16_t length;
659 uint32_t xid;
660 uint16_t flags;
661 uint16_t miss_send_len;
662};
663
Rich Lanee9c37db2013-06-21 18:30:24 -0700664struct of_table_mod : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -0700665 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700666 uint8_t type == 17;
Rich Lanea06d0c32013-03-25 08:52:03 -0700667 uint16_t length;
668 uint32_t xid;
669 uint8_t table_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700670 pad(3);
Rich Lanea06d0c32013-03-25 08:52:03 -0700671 uint32_t config;
672};
673
Rich Lane68ae4d72013-05-09 10:55:19 -0700674struct of_port_desc {
Rich Lanea06d0c32013-03-25 08:52:03 -0700675 of_port_no_t port_no;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700676 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700677 of_mac_addr_t hw_addr;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700678 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700679 of_port_name_t name;
Rob Vaterlausd9d72d22013-09-23 14:50:52 -0700680 enum ofp_port_config config;
681 enum ofp_port_state state;
682 enum ofp_port_features curr;
683 enum ofp_port_features advertised;
684 enum ofp_port_features supported;
685 enum ofp_port_features peer;
Rich Lanea06d0c32013-03-25 08:52:03 -0700686 uint32_t curr_speed;
687 uint32_t max_speed;
688};
689
Rich Lanee9c37db2013-06-21 18:30:24 -0700690struct of_features_request : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -0700691 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700692 uint8_t type == 5;
Rich Lanea06d0c32013-03-25 08:52:03 -0700693 uint16_t length;
694 uint32_t xid;
695};
696
Rich Lanee9c37db2013-06-21 18:30:24 -0700697struct of_features_reply : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -0700698 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700699 uint8_t type == 6;
Rich Lanea06d0c32013-03-25 08:52:03 -0700700 uint16_t length;
701 uint32_t xid;
702 uint64_t datapath_id;
703 uint32_t n_buffers;
704 uint8_t n_tables;
705 uint8_t auxiliary_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700706 pad(2);
Rob Vaterlausfeee3712013-09-30 11:24:19 -0700707 enum ofp_capabilities capabilities;
Rich Lanea06d0c32013-03-25 08:52:03 -0700708 uint32_t reserved;
709};
710
Rich Lanee9c37db2013-06-21 18:30:24 -0700711struct of_port_status : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -0700712 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700713 uint8_t type == 12;
Rich Lanea06d0c32013-03-25 08:52:03 -0700714 uint16_t length;
715 uint32_t xid;
Rob Vaterlausd9d72d22013-09-23 14:50:52 -0700716 enum ofp_port_reason reason;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700717 pad(7);
Rich Lanea06d0c32013-03-25 08:52:03 -0700718 of_port_desc_t desc;
719};
720
Rich Lanee9c37db2013-06-21 18:30:24 -0700721struct of_port_mod : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -0700722 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700723 uint8_t type == 16;
Rich Lanea06d0c32013-03-25 08:52:03 -0700724 uint16_t length;
725 uint32_t xid;
726 of_port_no_t port_no;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700727 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700728 of_mac_addr_t hw_addr;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700729 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700730 uint32_t config;
731 uint32_t mask;
732 uint32_t advertise;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700733 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700734};
735
736// FIXME Does this need to be v4?
Andreas Wundsam5da68512013-10-22 22:18:00 -0700737struct of_match_v3(align=8, length_includes_align=False) {
Rich Lane31b87142013-05-09 22:05:42 -0700738 uint16_t type == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -0700739 uint16_t length;
740 list(of_oxm_t) oxm_list;
741};
742
Rich Lanea06d0c32013-03-25 08:52:03 -0700743// This looks like an action header, but is standalone. See
744// ofp_table_features_prop_actions
Rich Lane68ae4d72013-05-09 10:55:19 -0700745struct of_action_id {
Rich Lanea06d0c32013-03-25 08:52:03 -0700746 uint16_t type;
747 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700748 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700749};
750
Rich Lanee9c37db2013-06-21 18:30:24 -0700751struct of_action_output : of_action {
Rich Lane31b87142013-05-09 22:05:42 -0700752 uint16_t type == 0;
Rich Lanea06d0c32013-03-25 08:52:03 -0700753 uint16_t len;
754 of_port_no_t port;
755 uint16_t max_len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700756 pad(6);
Rich Lanea06d0c32013-03-25 08:52:03 -0700757};
758
Rich Lanee9c37db2013-06-21 18:30:24 -0700759struct of_action_copy_ttl_out : of_action {
Rich Lane31b87142013-05-09 22:05:42 -0700760 uint16_t type == 11;
Rich Lanea06d0c32013-03-25 08:52:03 -0700761 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700762 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700763};
764
Rich Lanee9c37db2013-06-21 18:30:24 -0700765struct of_action_copy_ttl_in : of_action {
Rich Lane31b87142013-05-09 22:05:42 -0700766 uint16_t type == 12;
Rich Lanea06d0c32013-03-25 08:52:03 -0700767 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700768 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700769};
770
Rich Lanee9c37db2013-06-21 18:30:24 -0700771struct of_action_set_mpls_ttl : of_action {
Rich Lane31b87142013-05-09 22:05:42 -0700772 uint16_t type == 15;
Rich Lanea06d0c32013-03-25 08:52:03 -0700773 uint16_t len;
774 uint8_t mpls_ttl;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700775 pad(3);
Rich Lanea06d0c32013-03-25 08:52:03 -0700776};
777
Rich Lanee9c37db2013-06-21 18:30:24 -0700778struct of_action_dec_mpls_ttl : of_action {
Rich Lane31b87142013-05-09 22:05:42 -0700779 uint16_t type == 16;
Rich Lanea06d0c32013-03-25 08:52:03 -0700780 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700781 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700782};
783
Rich Lanee9c37db2013-06-21 18:30:24 -0700784struct of_action_push_vlan : of_action {
Rich Lane31b87142013-05-09 22:05:42 -0700785 uint16_t type == 17;
Rich Lanea06d0c32013-03-25 08:52:03 -0700786 uint16_t len;
787 uint16_t ethertype;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700788 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700789};
790
Rich Lanee9c37db2013-06-21 18:30:24 -0700791struct of_action_pop_vlan : of_action {
Rich Lane31b87142013-05-09 22:05:42 -0700792 uint16_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -0700793 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700794 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700795};
796
Rich Lanee9c37db2013-06-21 18:30:24 -0700797struct of_action_push_mpls : of_action {
Rich Lane31b87142013-05-09 22:05:42 -0700798 uint16_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -0700799 uint16_t len;
800 uint16_t ethertype;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700801 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700802};
803
Rich Lanee9c37db2013-06-21 18:30:24 -0700804struct of_action_pop_mpls : of_action {
Rich Lane31b87142013-05-09 22:05:42 -0700805 uint16_t type == 20;
Rich Lanea06d0c32013-03-25 08:52:03 -0700806 uint16_t len;
807 uint16_t ethertype;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700808 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700809};
810
Rich Lanee9c37db2013-06-21 18:30:24 -0700811struct of_action_set_queue : of_action {
Rich Lane31b87142013-05-09 22:05:42 -0700812 uint16_t type == 21;
Rich Lanea06d0c32013-03-25 08:52:03 -0700813 uint16_t len;
814 uint32_t queue_id;
815};
816
Rich Lanee9c37db2013-06-21 18:30:24 -0700817struct of_action_group : of_action {
Rich Lane31b87142013-05-09 22:05:42 -0700818 uint16_t type == 22;
Rich Lanea06d0c32013-03-25 08:52:03 -0700819 uint16_t len;
820 uint32_t group_id;
821};
822
Rich Lanee9c37db2013-06-21 18:30:24 -0700823struct of_action_set_nw_ttl : of_action {
Rich Lane31b87142013-05-09 22:05:42 -0700824 uint16_t type == 23;
Rich Lanea06d0c32013-03-25 08:52:03 -0700825 uint16_t len;
826 uint8_t nw_ttl;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700827 pad(3);
Rich Lanea06d0c32013-03-25 08:52:03 -0700828};
829
Rich Lanee9c37db2013-06-21 18:30:24 -0700830struct of_action_dec_nw_ttl : of_action {
Rich Lane31b87142013-05-09 22:05:42 -0700831 uint16_t type == 24;
Rich Lanea06d0c32013-03-25 08:52:03 -0700832 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700833 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700834};
835
Andreas Wundsam5da68512013-10-22 22:18:00 -0700836struct of_action_set_field(align=8, length_includes_align=True) : of_action {
Rich Lane31b87142013-05-09 22:05:42 -0700837 uint16_t type == 25;
Rich Lanea06d0c32013-03-25 08:52:03 -0700838 uint16_t len;
Rich Lanebe90eae2013-07-22 16:44:26 -0700839 of_oxm_t field;
Rich Lanea06d0c32013-03-25 08:52:03 -0700840};
841
Andreas Wundsam5da68512013-10-22 22:18:00 -0700842struct of_action_experimenter(align=8, length_includes_align=True): of_action {
Rich Lane31b87142013-05-09 22:05:42 -0700843 uint16_t type == 65535;
Rich Lanea06d0c32013-03-25 08:52:03 -0700844 uint16_t len;
Rich Laneb25d07c2013-08-22 17:22:43 -0700845 uint32_t experimenter == ?;
Rich Lanea06d0c32013-03-25 08:52:03 -0700846 of_octets_t data;
847};
848
Rich Lanee9c37db2013-06-21 18:30:24 -0700849struct of_action_pop_pbb : of_action {
Rich Lane31b87142013-05-09 22:05:42 -0700850 uint16_t type == 27;
Rich Lanea06d0c32013-03-25 08:52:03 -0700851 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700852 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700853};
854
Rich Lanee9c37db2013-06-21 18:30:24 -0700855struct of_action_push_pbb : of_action {
Rich Lane31b87142013-05-09 22:05:42 -0700856 uint16_t type == 26;
Rich Lanea06d0c32013-03-25 08:52:03 -0700857 uint16_t len;
858 uint16_t ethertype;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700859 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700860};
861
Rich Lane68ae4d72013-05-09 10:55:19 -0700862struct of_action {
Andreas Wundsamc37ba3d2013-08-02 17:51:51 -0700863 uint16_t type == ?;
Rich Lanea06d0c32013-03-25 08:52:03 -0700864 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700865 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700866};
867
Rich Lane68ae4d72013-05-09 10:55:19 -0700868struct of_instruction {
Andreas Wundsamc37ba3d2013-08-02 17:51:51 -0700869 uint16_t type == ?;
Rich Lanea06d0c32013-03-25 08:52:03 -0700870 uint16_t len;
871};
872
Rich Lanee9c37db2013-06-21 18:30:24 -0700873struct of_instruction_goto_table : of_instruction {
Rich Lane31b87142013-05-09 22:05:42 -0700874 uint16_t type == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -0700875 uint16_t len;
876 uint8_t table_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700877 pad(3);
Rich Lanea06d0c32013-03-25 08:52:03 -0700878};
879
Rich Lanee9c37db2013-06-21 18:30:24 -0700880struct of_instruction_write_metadata : of_instruction {
Rich Lane31b87142013-05-09 22:05:42 -0700881 uint16_t type == 2;
Rich Lanea06d0c32013-03-25 08:52:03 -0700882 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700883 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700884 uint64_t metadata;
885 uint64_t metadata_mask;
886};
887
Rich Lanee9c37db2013-06-21 18:30:24 -0700888struct of_instruction_write_actions : of_instruction {
Rich Lane31b87142013-05-09 22:05:42 -0700889 uint16_t type == 3;
Rich Lanea06d0c32013-03-25 08:52:03 -0700890 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700891 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700892 list(of_action_t) actions;
893};
894
Rich Lanee9c37db2013-06-21 18:30:24 -0700895struct of_instruction_apply_actions : of_instruction {
Rich Lane31b87142013-05-09 22:05:42 -0700896 uint16_t type == 4;
Rich Lanea06d0c32013-03-25 08:52:03 -0700897 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700898 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700899 list(of_action_t) actions;
900};
901
Rich Lanee9c37db2013-06-21 18:30:24 -0700902struct of_instruction_clear_actions : of_instruction {
Rich Lane31b87142013-05-09 22:05:42 -0700903 uint16_t type == 5;
Rich Lanea06d0c32013-03-25 08:52:03 -0700904 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700905 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700906};
907
Rich Lanee9c37db2013-06-21 18:30:24 -0700908struct of_instruction_meter : of_instruction {
Rich Lane31b87142013-05-09 22:05:42 -0700909 uint16_t type == 6;
Rich Lanea06d0c32013-03-25 08:52:03 -0700910 uint16_t len;
911 uint32_t meter_id;
912};
913
Rich Lanee9c37db2013-06-21 18:30:24 -0700914struct of_instruction_experimenter : of_instruction {
Rich Lane31b87142013-05-09 22:05:42 -0700915 uint16_t type == 65535;
Rich Lanea06d0c32013-03-25 08:52:03 -0700916 uint16_t len;
Rich Laneb25d07c2013-08-22 17:22:43 -0700917 uint32_t experimenter == ?;
Rich Lanea06d0c32013-03-25 08:52:03 -0700918 of_octets_t data;
919};
920
Rich Lanee9c37db2013-06-21 18:30:24 -0700921struct of_flow_mod : of_header {
922 uint8_t version;
923 uint8_t type == 14;
924 uint16_t length;
925 uint32_t xid;
926 uint64_t cookie;
927 uint64_t cookie_mask;
928 uint8_t table_id;
Andreas Wundsamc37ba3d2013-08-02 17:51:51 -0700929 of_fm_cmd_t _command == ?;
Rich Lanee9c37db2013-06-21 18:30:24 -0700930 uint16_t idle_timeout;
931 uint16_t hard_timeout;
932 uint16_t priority;
933 uint32_t buffer_id;
934 of_port_no_t out_port;
935 uint32_t out_group;
Andreas Wundsamdfeb5942013-09-19 13:07:49 -0700936 enum ofp_flow_mod_flags flags;
Rich Lanee9c37db2013-06-21 18:30:24 -0700937 pad(2);
938 of_match_t match;
939 list(of_instruction_t) instructions;
940};
941
942struct of_flow_add : of_flow_mod {
Rich Lanea06d0c32013-03-25 08:52:03 -0700943 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700944 uint8_t type == 14;
Rich Lanea06d0c32013-03-25 08:52:03 -0700945 uint16_t length;
946 uint32_t xid;
947 uint64_t cookie;
948 uint64_t cookie_mask;
949 uint8_t table_id;
Rich Lane31b87142013-05-09 22:05:42 -0700950 of_fm_cmd_t _command == 0;
Rich Lanea06d0c32013-03-25 08:52:03 -0700951 uint16_t idle_timeout;
952 uint16_t hard_timeout;
953 uint16_t priority;
954 uint32_t buffer_id;
955 of_port_no_t out_port;
956 uint32_t out_group;
Andreas Wundsamdfeb5942013-09-19 13:07:49 -0700957 enum ofp_flow_mod_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700958 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700959 of_match_t match;
960 list(of_instruction_t) instructions;
961};
962
Rich Lanee9c37db2013-06-21 18:30:24 -0700963struct of_flow_modify : of_flow_mod {
Rich Lanea06d0c32013-03-25 08:52:03 -0700964 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700965 uint8_t type == 14;
Rich Lanea06d0c32013-03-25 08:52:03 -0700966 uint16_t length;
967 uint32_t xid;
968 uint64_t cookie;
969 uint64_t cookie_mask;
970 uint8_t table_id;
Rich Lane31b87142013-05-09 22:05:42 -0700971 of_fm_cmd_t _command == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -0700972 uint16_t idle_timeout;
973 uint16_t hard_timeout;
974 uint16_t priority;
975 uint32_t buffer_id;
976 of_port_no_t out_port;
977 uint32_t out_group;
Andreas Wundsamdfeb5942013-09-19 13:07:49 -0700978 enum ofp_flow_mod_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700979 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700980 of_match_t match;
981 list(of_instruction_t) instructions;
982};
983
Rich Lanee9c37db2013-06-21 18:30:24 -0700984struct of_flow_modify_strict : of_flow_mod {
Rich Lanea06d0c32013-03-25 08:52:03 -0700985 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700986 uint8_t type == 14;
Rich Lanea06d0c32013-03-25 08:52:03 -0700987 uint16_t length;
988 uint32_t xid;
989 uint64_t cookie;
990 uint64_t cookie_mask;
991 uint8_t table_id;
Rich Lane31b87142013-05-09 22:05:42 -0700992 of_fm_cmd_t _command == 2;
Rich Lanea06d0c32013-03-25 08:52:03 -0700993 uint16_t idle_timeout;
994 uint16_t hard_timeout;
995 uint16_t priority;
996 uint32_t buffer_id;
997 of_port_no_t out_port;
998 uint32_t out_group;
Andreas Wundsamdfeb5942013-09-19 13:07:49 -0700999 enum ofp_flow_mod_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001000 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -07001001 of_match_t match;
1002 list(of_instruction_t) instructions;
1003};
1004
Rich Lanee9c37db2013-06-21 18:30:24 -07001005struct of_flow_delete : of_flow_mod {
Rich Lanea06d0c32013-03-25 08:52:03 -07001006 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001007 uint8_t type == 14;
Rich Lanea06d0c32013-03-25 08:52:03 -07001008 uint16_t length;
1009 uint32_t xid;
1010 uint64_t cookie;
1011 uint64_t cookie_mask;
1012 uint8_t table_id;
Rich Lane31b87142013-05-09 22:05:42 -07001013 of_fm_cmd_t _command == 3;
Rich Lanea06d0c32013-03-25 08:52:03 -07001014 uint16_t idle_timeout;
1015 uint16_t hard_timeout;
1016 uint16_t priority;
1017 uint32_t buffer_id;
1018 of_port_no_t out_port;
1019 uint32_t out_group;
Andreas Wundsamdfeb5942013-09-19 13:07:49 -07001020 enum ofp_flow_mod_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001021 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -07001022 of_match_t match;
1023 list(of_instruction_t) instructions;
1024};
1025
Rich Lanee9c37db2013-06-21 18:30:24 -07001026struct of_flow_delete_strict : of_flow_mod {
Rich Lanea06d0c32013-03-25 08:52:03 -07001027 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001028 uint8_t type == 14;
Rich Lanea06d0c32013-03-25 08:52:03 -07001029 uint16_t length;
1030 uint32_t xid;
1031 uint64_t cookie;
1032 uint64_t cookie_mask;
1033 uint8_t table_id;
Rich Lane31b87142013-05-09 22:05:42 -07001034 of_fm_cmd_t _command == 4;
Rich Lanea06d0c32013-03-25 08:52:03 -07001035 uint16_t idle_timeout;
1036 uint16_t hard_timeout;
1037 uint16_t priority;
1038 uint32_t buffer_id;
1039 of_port_no_t out_port;
1040 uint32_t out_group;
Andreas Wundsamdfeb5942013-09-19 13:07:49 -07001041 enum ofp_flow_mod_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001042 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -07001043 of_match_t match;
1044 list(of_instruction_t) instructions;
1045};
1046
Rich Lane68ae4d72013-05-09 10:55:19 -07001047struct of_bucket {
Rich Lanea06d0c32013-03-25 08:52:03 -07001048 uint16_t len;
1049 uint16_t weight;
1050 of_port_no_t watch_port;
1051 uint32_t watch_group;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001052 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001053 list(of_action_t) actions;
1054};
1055
Rich Lanee9c37db2013-06-21 18:30:24 -07001056struct of_group_mod : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -07001057 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001058 uint8_t type == 15;
Rich Lanea06d0c32013-03-25 08:52:03 -07001059 uint16_t length;
1060 uint32_t xid;
Andreas Wundsam5812cf32013-11-15 13:51:24 -08001061 enum ofp_group_mod_command command == ?;
1062 enum ofp_group_type group_type;
1063 pad(1);
1064 uint32_t group_id;
1065 list(of_bucket_t) buckets;
1066};
1067
1068struct of_group_add : of_group_mod {
1069 uint8_t version;
1070 uint8_t type == 15;
1071 uint16_t length;
1072 uint32_t xid;
1073 enum ofp_group_mod_command command == 0;
1074 enum ofp_group_type group_type;
1075 pad(1);
1076 uint32_t group_id;
1077 list(of_bucket_t) buckets;
1078};
1079
1080struct of_group_modify : of_group_mod {
1081 uint8_t version;
1082 uint8_t type == 15;
1083 uint16_t length;
1084 uint32_t xid;
1085 enum ofp_group_mod_command command == 1;
1086 enum ofp_group_type group_type;
1087 pad(1);
1088 uint32_t group_id;
1089 list(of_bucket_t) buckets;
1090};
1091
1092struct of_group_delete : of_group_mod {
1093 uint8_t version;
1094 uint8_t type == 15;
1095 uint16_t length;
1096 uint32_t xid;
1097 enum ofp_group_mod_command command == 2;
1098 enum ofp_group_type group_type;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001099 pad(1);
Rich Lanea06d0c32013-03-25 08:52:03 -07001100 uint32_t group_id;
1101 list(of_bucket_t) buckets;
1102};
1103
Rich Lanee9c37db2013-06-21 18:30:24 -07001104struct of_packet_out : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -07001105 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001106 uint8_t type == 13;
Rich Lanea06d0c32013-03-25 08:52:03 -07001107 uint16_t length;
1108 uint32_t xid;
1109 uint32_t buffer_id;
1110 of_port_no_t in_port;
1111 uint16_t actions_len;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001112 pad(6);
Rich Lanea06d0c32013-03-25 08:52:03 -07001113 list(of_action_t) actions;
1114 of_octets_t data;
1115};
1116
Rich Lanee9c37db2013-06-21 18:30:24 -07001117struct of_packet_in : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -07001118 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001119 uint8_t type == 10;
Rich Lanea06d0c32013-03-25 08:52:03 -07001120 uint16_t length;
1121 uint32_t xid;
1122 uint32_t buffer_id;
1123 uint16_t total_len;
1124 uint8_t reason;
1125 uint8_t table_id;
1126 uint64_t cookie;
1127 of_match_t match;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001128 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -07001129 of_octets_t data; /* FIXME: Ensure total_len gets updated */
1130};
1131
Rich Lanee9c37db2013-06-21 18:30:24 -07001132struct of_flow_removed : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -07001133 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001134 uint8_t type == 11;
Rich Lanea06d0c32013-03-25 08:52:03 -07001135 uint16_t length;
1136 uint32_t xid;
1137 uint64_t cookie;
1138 uint16_t priority;
1139 uint8_t reason;
1140 uint8_t table_id;
1141 uint32_t duration_sec;
1142 uint32_t duration_nsec;
1143 uint16_t idle_timeout;
1144 uint16_t hard_timeout;
1145 uint64_t packet_count;
1146 uint64_t byte_count;
1147 of_match_t match;
1148};
1149
Rich Lane68ae4d72013-05-09 10:55:19 -07001150struct of_meter_band {
Andreas Wundsam9ba65362013-08-02 19:14:42 -07001151 uint16_t type == ?;
Rich Lanea06d0c32013-03-25 08:52:03 -07001152 uint16_t len;
1153// uint32_t rate; // These are excluded b/c this is the header
1154// uint32_t burst_size; // These are excluded b/c this is the header
1155};
1156
Rich Lanee9c37db2013-06-21 18:30:24 -07001157struct of_meter_band_drop : of_meter_band {
Rich Lane31b87142013-05-09 22:05:42 -07001158 uint16_t type == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -07001159 uint16_t len;
1160 uint32_t rate;
1161 uint32_t burst_size;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001162 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001163};
1164
Rich Lanee9c37db2013-06-21 18:30:24 -07001165struct of_meter_band_dscp_remark : of_meter_band {
Rich Lane31b87142013-05-09 22:05:42 -07001166 uint16_t type == 2;
Rich Lanea06d0c32013-03-25 08:52:03 -07001167 uint16_t len;
1168 uint32_t rate;
1169 uint32_t burst_size;
1170 uint8_t prec_level;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001171 pad(3);
Rich Lanea06d0c32013-03-25 08:52:03 -07001172};
1173
Rich Lanee9c37db2013-06-21 18:30:24 -07001174struct of_meter_band_experimenter : of_meter_band {
Rich Lane31b87142013-05-09 22:05:42 -07001175 uint16_t type == 65535;
Rich Lanea06d0c32013-03-25 08:52:03 -07001176 uint16_t len;
1177 uint32_t rate;
1178 uint32_t burst_size;
1179 uint32_t experimenter;
1180};
1181
Rich Lanee9c37db2013-06-21 18:30:24 -07001182struct of_meter_mod : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -07001183 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001184 uint8_t type == 29;
Rich Lanea06d0c32013-03-25 08:52:03 -07001185 uint16_t length;
1186 uint32_t xid;
1187 uint16_t command;
1188 uint16_t flags;
1189 uint32_t meter_id;
1190 list(of_meter_band_t) meters;
1191};
1192
Rich Lanee9c37db2013-06-21 18:30:24 -07001193struct of_error_msg : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -07001194 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001195 uint8_t type == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -07001196 uint16_t length;
1197 uint32_t xid;
Rob Vaterlausfeee3712013-09-30 11:24:19 -07001198 uint16_t err_type == ?;
1199};
1200
1201struct of_hello_failed_error_msg : of_error_msg {
1202 uint8_t version;
1203 uint8_t type == 1;
1204 uint16_t length;
1205 uint32_t xid;
1206 uint16_t err_type == 0;
1207 enum ofp_hello_failed_code code;
Rich Lanea06d0c32013-03-25 08:52:03 -07001208 of_octets_t data;
1209};
1210
Rob Vaterlausfeee3712013-09-30 11:24:19 -07001211struct of_bad_request_error_msg : of_error_msg {
1212 uint8_t version;
1213 uint8_t type == 1;
1214 uint16_t length;
1215 uint32_t xid;
1216 uint16_t err_type == 1;
1217 enum ofp_bad_request_code code;
1218 of_octets_t data;
1219};
1220
1221struct of_bad_action_error_msg : of_error_msg {
1222 uint8_t version;
1223 uint8_t type == 1;
1224 uint16_t length;
1225 uint32_t xid;
1226 uint16_t err_type == 2;
1227 enum ofp_bad_action_code code;
1228 of_octets_t data;
1229};
1230
1231struct of_bad_instruction_error_msg : of_error_msg {
1232 uint8_t version;
1233 uint8_t type == 1;
1234 uint16_t length;
1235 uint32_t xid;
1236 uint16_t err_type == 3;
1237 enum ofp_bad_instruction_code code;
1238 of_octets_t data;
1239};
1240
1241struct of_bad_match_error_msg : of_error_msg {
1242 uint8_t version;
1243 uint8_t type == 1;
1244 uint16_t length;
1245 uint32_t xid;
1246 uint16_t err_type == 4;
1247 enum ofp_bad_match_code code;
1248 of_octets_t data;
1249};
1250
1251struct of_flow_mod_failed_error_msg : of_error_msg {
1252 uint8_t version;
1253 uint8_t type == 1;
1254 uint16_t length;
1255 uint32_t xid;
1256 uint16_t err_type == 5;
1257 enum ofp_flow_mod_failed_code code;
1258 of_octets_t data;
1259};
1260
1261struct of_group_mod_failed_error_msg : of_error_msg {
1262 uint8_t version;
1263 uint8_t type == 1;
1264 uint16_t length;
1265 uint32_t xid;
1266 uint16_t err_type == 6;
1267 enum ofp_group_mod_failed_code code;
1268 of_octets_t data;
1269};
1270
1271struct of_port_mod_failed_error_msg : of_error_msg {
1272 uint8_t version;
1273 uint8_t type == 1;
1274 uint16_t length;
1275 uint32_t xid;
1276 uint16_t err_type == 7;
1277 enum ofp_port_mod_failed_code code;
1278 of_octets_t data;
1279};
1280
1281struct of_table_mod_failed_error_msg : of_error_msg {
1282 uint8_t version;
1283 uint8_t type == 1;
1284 uint16_t length;
1285 uint32_t xid;
1286 uint16_t err_type == 8;
1287 enum ofp_table_mod_failed_code code;
1288 of_octets_t data;
1289};
1290
1291struct of_queue_op_failed_error_msg : of_error_msg {
1292 uint8_t version;
1293 uint8_t type == 1;
1294 uint16_t length;
1295 uint32_t xid;
1296 uint16_t err_type == 9;
1297 enum ofp_queue_op_failed_code code;
1298 of_octets_t data;
1299};
1300
1301struct of_switch_config_failed_error_msg : of_error_msg {
1302 uint8_t version;
1303 uint8_t type == 1;
1304 uint16_t length;
1305 uint32_t xid;
1306 uint16_t err_type == 10;
1307 enum ofp_switch_config_failed_code code;
1308 of_octets_t data;
1309};
1310
1311struct of_role_request_failed_error_msg : of_error_msg {
1312 uint8_t version;
1313 uint8_t type == 1;
1314 uint16_t length;
1315 uint32_t xid;
1316 uint16_t err_type == 11;
1317 enum ofp_role_request_failed_code code;
1318 of_octets_t data;
1319};
1320
1321struct of_meter_mod_failed_error_msg : of_error_msg {
1322 uint8_t version;
1323 uint8_t type == 1;
1324 uint16_t length;
1325 uint32_t xid;
1326 uint16_t err_type == 12;
1327 enum ofp_meter_mod_failed_code code;
1328 of_octets_t data;
1329};
1330
1331struct of_table_features_failed_error_msg : of_error_msg {
1332 uint8_t version;
1333 uint8_t type == 1;
1334 uint16_t length;
1335 uint32_t xid;
1336 uint16_t err_type == 13;
1337 enum ofp_table_features_failed_code code;
1338 of_octets_t data;
1339};
1340
Andreas Wundsamcc8cd662013-11-15 13:52:06 -08001341struct of_experimenter_error_msg : of_error_msg {
Rob Vaterlausfeee3712013-09-30 11:24:19 -07001342 uint8_t version;
1343 uint8_t type == 1;
1344 uint16_t length;
1345 uint32_t xid;
1346 uint16_t err_type == 0xffff;
1347 uint16_t subtype;
1348 uint32_t experimenter;
1349 of_octets_t data;
1350};
Rich Lanea06d0c32013-03-25 08:52:03 -07001351
1352// STATS ENTRIES: flow, table, port, queue, group stats, group desc stats
1353
Rich Lane68ae4d72013-05-09 10:55:19 -07001354struct of_flow_stats_entry {
Rich Lanea06d0c32013-03-25 08:52:03 -07001355 uint16_t length;
1356 uint8_t table_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001357 pad(1);
Rich Lanea06d0c32013-03-25 08:52:03 -07001358 uint32_t duration_sec;
1359 uint32_t duration_nsec;
1360 uint16_t priority;
1361 uint16_t idle_timeout;
1362 uint16_t hard_timeout;
Rich Lane1a47c1c2013-08-28 15:27:00 -07001363 uint16_t flags;
1364 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001365 uint64_t cookie;
1366 uint64_t packet_count;
1367 uint64_t byte_count;
1368 of_match_t match;
1369 list(of_instruction_t) instructions;
1370};
1371
1372
Rich Lane68ae4d72013-05-09 10:55:19 -07001373struct of_table_stats_entry {
Rich Lanea06d0c32013-03-25 08:52:03 -07001374 uint8_t table_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001375 pad(3);
Rich Lanea06d0c32013-03-25 08:52:03 -07001376 uint32_t active_count;
1377 uint64_t lookup_count;
1378 uint64_t matched_count;
1379};
1380
Rich Lane68ae4d72013-05-09 10:55:19 -07001381struct of_port_stats_entry {
Rich Lanea06d0c32013-03-25 08:52:03 -07001382 of_port_no_t port_no;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001383 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001384 uint64_t rx_packets;
1385 uint64_t tx_packets;
1386 uint64_t rx_bytes;
1387 uint64_t tx_bytes;
1388 uint64_t rx_dropped;
1389 uint64_t tx_dropped;
1390 uint64_t rx_errors;
1391 uint64_t tx_errors;
1392 uint64_t rx_frame_err;
1393 uint64_t rx_over_err;
1394 uint64_t rx_crc_err;
1395 uint64_t collisions;
1396 uint32_t duration_sec;
1397 uint32_t duration_nsec;
1398};
1399
Rich Lane68ae4d72013-05-09 10:55:19 -07001400struct of_queue_stats_entry {
Rich Lanea06d0c32013-03-25 08:52:03 -07001401 of_port_no_t port_no;
1402 uint32_t queue_id;
1403 uint64_t tx_bytes;
1404 uint64_t tx_packets;
1405 uint64_t tx_errors;
1406 uint32_t duration_sec;
1407 uint32_t duration_nsec;
1408};
1409
Rich Lane68ae4d72013-05-09 10:55:19 -07001410struct of_bucket_counter {
Rich Lanea06d0c32013-03-25 08:52:03 -07001411 uint64_t packet_count;
1412 uint64_t byte_count;
1413};
1414
Rich Lane68ae4d72013-05-09 10:55:19 -07001415struct of_group_stats_entry {
Rich Lanea06d0c32013-03-25 08:52:03 -07001416 uint16_t length;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001417 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -07001418 uint32_t group_id;
1419 uint32_t ref_count;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001420 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001421 uint64_t packet_count;
1422 uint64_t byte_count;
1423 uint32_t duration_sec;
1424 uint32_t duration_nsec;
1425 list(of_bucket_counter_t) bucket_stats;
1426};
1427
Rich Lane68ae4d72013-05-09 10:55:19 -07001428struct of_group_desc_stats_entry {
Rich Lanea06d0c32013-03-25 08:52:03 -07001429 uint16_t length;
Rich Lane35e7ac72013-10-15 10:36:10 -07001430 uint8_t group_type;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001431 pad(1);
Rich Lanea06d0c32013-03-25 08:52:03 -07001432 uint32_t group_id;
1433 list(of_bucket_t) buckets;
1434};
1435
1436// STATS:
1437// Desc, flow, agg, table, port, queue, group, group_desc, group_feat, experi
1438
Rich Lanee9c37db2013-06-21 18:30:24 -07001439struct of_stats_request : of_header {
1440 uint8_t version;
1441 uint8_t type == 18;
1442 uint16_t length;
1443 uint32_t xid;
Andreas Wundsamc37ba3d2013-08-02 17:51:51 -07001444 uint16_t stats_type == ?;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001445 enum ofp_stats_request_flags flags;
Rich Lanee9c37db2013-06-21 18:30:24 -07001446 pad(4);
1447};
1448
1449struct of_stats_reply : of_header {
1450 uint8_t version;
1451 uint8_t type == 19;
1452 uint16_t length;
1453 uint32_t xid;
Andreas Wundsamc37ba3d2013-08-02 17:51:51 -07001454 uint16_t stats_type == ?;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001455 enum ofp_stats_reply_flags flags;
Rich Lanee9c37db2013-06-21 18:30:24 -07001456 pad(4);
1457};
1458
1459struct of_desc_stats_request : of_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001460 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001461 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001462 uint16_t length;
1463 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001464 uint16_t stats_type == 0;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001465 enum ofp_stats_request_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001466 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001467};
1468
Rich Lanee9c37db2013-06-21 18:30:24 -07001469struct of_desc_stats_reply : of_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001470 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001471 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001472 uint16_t length;
1473 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001474 uint16_t stats_type == 0;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001475 enum ofp_stats_reply_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001476 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001477 of_desc_str_t mfr_desc;
1478 of_desc_str_t hw_desc;
1479 of_desc_str_t sw_desc;
1480 of_serial_num_t serial_num;
1481 of_desc_str_t dp_desc;
1482};
1483
Rich Lanee9c37db2013-06-21 18:30:24 -07001484struct of_flow_stats_request : of_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001485 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001486 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001487 uint16_t length;
1488 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001489 uint16_t stats_type == 1;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001490 enum ofp_stats_request_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001491 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001492 uint8_t table_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001493 pad(3);
Rich Lanea06d0c32013-03-25 08:52:03 -07001494 of_port_no_t out_port;
1495 uint32_t out_group;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001496 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001497 uint64_t cookie;
1498 uint64_t cookie_mask;
1499 of_match_t match;
1500};
1501
Rich Lanee9c37db2013-06-21 18:30:24 -07001502struct of_flow_stats_reply : of_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001503 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001504 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001505 uint16_t length;
1506 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001507 uint16_t stats_type == 1;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001508 enum ofp_stats_reply_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001509 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001510 list(of_flow_stats_entry_t) entries;
1511};
1512
Rich Lanee9c37db2013-06-21 18:30:24 -07001513struct of_aggregate_stats_request : of_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001514 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001515 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001516 uint16_t length;
1517 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001518 uint16_t stats_type == 2;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001519 enum ofp_stats_request_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001520 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001521 uint8_t table_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001522 pad(3);
Rich Lanea06d0c32013-03-25 08:52:03 -07001523 of_port_no_t out_port;
1524 uint32_t out_group;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001525 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001526 uint64_t cookie;
1527 uint64_t cookie_mask;
1528 of_match_t match;
1529};
1530
Rich Lanee9c37db2013-06-21 18:30:24 -07001531struct of_aggregate_stats_reply : of_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001532 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001533 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001534 uint16_t length;
1535 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001536 uint16_t stats_type == 2;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001537 enum ofp_stats_reply_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001538 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001539 uint64_t packet_count;
1540 uint64_t byte_count;
1541 uint32_t flow_count;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001542 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001543};
1544
Rich Lanee9c37db2013-06-21 18:30:24 -07001545struct of_table_stats_request : of_stats_request {
Rich Lane8bfdafc2013-05-02 14:54:42 -07001546 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001547 uint8_t type == 18;
Rich Lane8bfdafc2013-05-02 14:54:42 -07001548 uint16_t length;
1549 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001550 uint16_t stats_type == 3;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001551 enum ofp_stats_request_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001552 pad(4);
Rich Lane8bfdafc2013-05-02 14:54:42 -07001553};
1554
Rich Lanee9c37db2013-06-21 18:30:24 -07001555struct of_table_stats_reply : of_stats_reply {
Rich Lane8bfdafc2013-05-02 14:54:42 -07001556 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001557 uint8_t type == 19;
Rich Lane8bfdafc2013-05-02 14:54:42 -07001558 uint16_t length;
1559 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001560 uint16_t stats_type == 3;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001561 enum ofp_stats_reply_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001562 pad(4);
Rich Lane8bfdafc2013-05-02 14:54:42 -07001563 list(of_table_stats_entry_t) entries;
1564};
1565
Rich Lanea06d0c32013-03-25 08:52:03 -07001566// FIXME: These are padded to 8 byte align beyond the length indicated
1567
Rich Lane68ae4d72013-05-09 10:55:19 -07001568struct of_table_feature_prop {
Rich Lanea1b8f442013-10-01 22:05:22 -07001569 uint16_t type == ?;
Rich Lanea06d0c32013-03-25 08:52:03 -07001570 uint16_t length;
1571};
1572
Rich Lanee9c37db2013-06-21 18:30:24 -07001573struct of_table_feature_prop_instructions : of_table_feature_prop {
Rich Lane31b87142013-05-09 22:05:42 -07001574 uint16_t type == 0;
Rich Lanea06d0c32013-03-25 08:52:03 -07001575 uint16_t length;
1576 // FIXME Check if instruction_t is right for ids here
1577 list(of_instruction_t) instruction_ids;
1578};
1579
Rich Lanee9c37db2013-06-21 18:30:24 -07001580struct of_table_feature_prop_instructions_miss : of_table_feature_prop {
Rich Lane31b87142013-05-09 22:05:42 -07001581 uint16_t type == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -07001582 uint16_t length;
1583 list(of_instruction_t) instruction_ids;
1584};
1585
Rich Lanee9c37db2013-06-21 18:30:24 -07001586struct of_table_feature_prop_next_tables : of_table_feature_prop {
Rich Lane31b87142013-05-09 22:05:42 -07001587 uint16_t type == 2;
Rich Lanea06d0c32013-03-25 08:52:03 -07001588 uint16_t length;
1589 list(of_uint8_t) next_table_ids;
1590};
1591
Rich Lanee9c37db2013-06-21 18:30:24 -07001592struct of_table_feature_prop_next_tables_miss : of_table_feature_prop {
Rich Lane31b87142013-05-09 22:05:42 -07001593 uint16_t type == 3;
Rich Lanea06d0c32013-03-25 08:52:03 -07001594 uint16_t length;
1595 list(of_uint8_t) next_table_ids;
1596};
1597
Rich Lanee9c37db2013-06-21 18:30:24 -07001598struct of_table_feature_prop_write_actions : of_table_feature_prop {
Rich Lane31b87142013-05-09 22:05:42 -07001599 uint16_t type == 4;
Rich Lanea06d0c32013-03-25 08:52:03 -07001600 uint16_t length;
1601 list(of_action_id_t) action_ids;
1602};
1603
Rich Lanee9c37db2013-06-21 18:30:24 -07001604struct of_table_feature_prop_write_actions_miss : of_table_feature_prop {
Rich Lane31b87142013-05-09 22:05:42 -07001605 uint16_t type == 5;
Rich Lanea06d0c32013-03-25 08:52:03 -07001606 uint16_t length;
1607 list(of_action_id_t) action_ids;
1608};
1609
Rich Lanee9c37db2013-06-21 18:30:24 -07001610struct of_table_feature_prop_apply_actions : of_table_feature_prop {
Rich Lane31b87142013-05-09 22:05:42 -07001611 uint16_t type == 6;
Rich Lanea06d0c32013-03-25 08:52:03 -07001612 uint16_t length;
1613 list(of_action_id_t) action_ids;
1614};
1615
Rich Lanee9c37db2013-06-21 18:30:24 -07001616struct of_table_feature_prop_apply_actions_miss : of_table_feature_prop {
Rich Lane31b87142013-05-09 22:05:42 -07001617 uint16_t type == 7;
Rich Lanea06d0c32013-03-25 08:52:03 -07001618 uint16_t length;
1619 list(of_action_id_t) action_ids;
1620};
1621
Rich Lanee9c37db2013-06-21 18:30:24 -07001622struct of_table_feature_prop_match : of_table_feature_prop {
Rich Lane31b87142013-05-09 22:05:42 -07001623 uint16_t type == 8;
Rich Lanea06d0c32013-03-25 08:52:03 -07001624 uint16_t length;
1625 list(of_uint32_t) oxm_ids;
1626};
1627
Rich Lanee9c37db2013-06-21 18:30:24 -07001628struct of_table_feature_prop_wildcards : of_table_feature_prop {
Rich Lane31b87142013-05-09 22:05:42 -07001629 uint16_t type == 10;
Rich Lanea06d0c32013-03-25 08:52:03 -07001630 uint16_t length;
1631 list(of_uint32_t) oxm_ids;
1632};
1633
Rich Lanee9c37db2013-06-21 18:30:24 -07001634struct of_table_feature_prop_write_setfield : of_table_feature_prop {
Rich Lane31b87142013-05-09 22:05:42 -07001635 uint16_t type == 12;
Rich Lanea06d0c32013-03-25 08:52:03 -07001636 uint16_t length;
1637 list(of_uint32_t) oxm_ids;
1638};
1639
Rich Lanee9c37db2013-06-21 18:30:24 -07001640struct of_table_feature_prop_write_setfield_miss : of_table_feature_prop {
Rich Lane31b87142013-05-09 22:05:42 -07001641 uint16_t type == 13;
Rich Lanea06d0c32013-03-25 08:52:03 -07001642 uint16_t length;
1643 list(of_uint32_t) oxm_ids;
1644};
1645
Rich Lanee9c37db2013-06-21 18:30:24 -07001646struct of_table_feature_prop_apply_setfield : of_table_feature_prop {
Rich Lane31b87142013-05-09 22:05:42 -07001647 uint16_t type == 14;
Rich Lanea06d0c32013-03-25 08:52:03 -07001648 uint16_t length;
1649 list(of_uint32_t) oxm_ids;
1650};
1651
Rich Lanee9c37db2013-06-21 18:30:24 -07001652struct of_table_feature_prop_apply_setfield_miss : of_table_feature_prop {
Rich Lane31b87142013-05-09 22:05:42 -07001653 uint16_t type == 15;
Rich Lanea06d0c32013-03-25 08:52:03 -07001654 uint16_t length;
1655 list(of_uint32_t) oxm_ids;
1656};
1657
Rich Lanee9c37db2013-06-21 18:30:24 -07001658struct of_table_feature_prop_experimenter : of_table_feature_prop {
Rich Lane31b87142013-05-09 22:05:42 -07001659 uint16_t type == 65535;
Rich Lanea06d0c32013-03-25 08:52:03 -07001660 uint16_t length;
1661 uint32_t experimenter;
1662 uint32_t subtype;
1663 of_octets_t experimenter_data;
1664};
1665
1666// Not yet supported
Rich Lanee9c37db2013-06-21 18:30:24 -07001667// struct of_table_feature_prop_experimenter_miss : of_table_feature_prop {
Rich Lanea06d0c32013-03-25 08:52:03 -07001668// uint16_t type;
1669// uint16_t length;
1670// uint32_t experimenter;
1671// uint32_t subtype;
1672// of_octets_t experimenter_data;
1673// };
1674
Rich Lane68ae4d72013-05-09 10:55:19 -07001675struct of_table_features {
Rich Lanea06d0c32013-03-25 08:52:03 -07001676 uint16_t length;
1677 uint8_t table_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001678 pad(5);
Rich Lanea06d0c32013-03-25 08:52:03 -07001679 of_table_name_t name;
1680 uint64_t metadata_match;
1681 uint64_t metadata_write;
1682 uint32_t config;
1683 uint32_t max_entries;
1684 list(of_table_feature_prop_t) properties;
1685};
1686
Rich Lane68ae4d72013-05-09 10:55:19 -07001687struct of_meter_features {
Rich Lanea06d0c32013-03-25 08:52:03 -07001688 uint32_t max_meter;
1689 uint32_t band_types;
1690 uint32_t capabilities;
1691 uint8_t max_bands;
1692 uint8_t max_color;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001693 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -07001694};
1695
Rich Lanee9c37db2013-06-21 18:30:24 -07001696struct of_port_stats_request : of_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001697 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001698 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001699 uint16_t length;
1700 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001701 uint16_t stats_type == 4;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001702 enum ofp_stats_request_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001703 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001704 of_port_no_t port_no;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001705 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001706};
1707
Rich Lanee9c37db2013-06-21 18:30:24 -07001708struct of_port_stats_reply : of_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001709 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001710 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001711 uint16_t length;
1712 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001713 uint16_t stats_type == 4;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001714 enum ofp_stats_reply_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001715 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001716 list(of_port_stats_entry_t) entries;
1717};
1718
Rich Lanee9c37db2013-06-21 18:30:24 -07001719struct of_queue_stats_request : of_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001720 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001721 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001722 uint16_t length;
1723 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001724 uint16_t stats_type == 5;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001725 enum ofp_stats_request_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001726 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001727 of_port_no_t port_no;
1728 uint32_t queue_id;
1729};
1730
Rich Lanee9c37db2013-06-21 18:30:24 -07001731struct of_queue_stats_reply : of_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001732 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001733 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001734 uint16_t length;
1735 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001736 uint16_t stats_type == 5;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001737 enum ofp_stats_reply_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001738 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001739 list(of_queue_stats_entry_t) entries;
1740};
1741
Rich Lanee9c37db2013-06-21 18:30:24 -07001742struct of_group_stats_request : of_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001743 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001744 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001745 uint16_t length;
1746 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001747 uint16_t stats_type == 6;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001748 enum ofp_stats_request_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001749 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001750 uint32_t group_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001751 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001752};
1753
Rich Lanee9c37db2013-06-21 18:30:24 -07001754struct of_group_stats_reply : of_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001755 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001756 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001757 uint16_t length;
1758 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001759 uint16_t stats_type == 6;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001760 enum ofp_stats_reply_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001761 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001762 list(of_group_stats_entry_t) entries;
1763};
1764
Rich Lanee9c37db2013-06-21 18:30:24 -07001765struct of_group_desc_stats_request : of_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001766 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001767 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001768 uint16_t length;
1769 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001770 uint16_t stats_type == 7;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001771 enum ofp_stats_request_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001772 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001773};
1774
Rich Lanee9c37db2013-06-21 18:30:24 -07001775struct of_group_desc_stats_reply : of_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001776 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001777 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001778 uint16_t length;
1779 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001780 uint16_t stats_type == 7;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001781 enum ofp_stats_reply_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001782 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001783 list(of_group_desc_stats_entry_t) entries;
1784};
1785
Rich Lanee9c37db2013-06-21 18:30:24 -07001786struct of_group_features_stats_request : of_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001787 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001788 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001789 uint16_t length;
1790 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001791 uint16_t stats_type == 8;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001792 enum ofp_stats_request_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001793 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001794};
1795
Rich Lanee9c37db2013-06-21 18:30:24 -07001796struct of_group_features_stats_reply : of_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001797 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001798 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001799 uint16_t length;
1800 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001801 uint16_t stats_type == 8;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001802 enum ofp_stats_reply_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001803 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001804 uint32_t types;
1805 uint32_t capabilities;
1806 uint32_t max_groups_all;
1807 uint32_t max_groups_select;
1808 uint32_t max_groups_indirect;
1809 uint32_t max_groups_ff;
1810 uint32_t actions_all;
1811 uint32_t actions_select;
1812 uint32_t actions_indirect;
1813 uint32_t actions_ff;
1814};
1815
Rich Lanee9c37db2013-06-21 18:30:24 -07001816struct of_meter_stats_request : of_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001817 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001818 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001819 uint16_t length;
1820 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001821 uint16_t stats_type == 9;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001822 enum ofp_stats_request_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001823 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001824 uint32_t meter_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001825 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001826};
1827
Rich Lanee9c37db2013-06-21 18:30:24 -07001828struct of_meter_stats_reply : of_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001829 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001830 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001831 uint16_t length;
1832 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001833 uint16_t stats_type == 9;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001834 enum ofp_stats_reply_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001835 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001836 list(of_meter_stats_t) entries;
1837};
1838
Rich Lanee9c37db2013-06-21 18:30:24 -07001839struct of_meter_config_stats_request : of_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001840 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001841 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001842 uint16_t length;
1843 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001844 uint16_t stats_type == 10;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001845 enum ofp_stats_request_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001846 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001847 uint32_t meter_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001848 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001849};
1850
Rich Lanee9c37db2013-06-21 18:30:24 -07001851struct of_meter_config_stats_reply : of_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001852 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001853 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001854 uint16_t length;
1855 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001856 uint16_t stats_type == 10;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001857 enum ofp_stats_reply_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001858 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001859 list(of_meter_band_t) entries;
1860};
1861
1862// FIXME stats added to get things working
Rich Lanee9c37db2013-06-21 18:30:24 -07001863struct of_meter_features_stats_request : of_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001864 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001865 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001866 uint16_t length;
1867 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001868 uint16_t stats_type == 11;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001869 enum ofp_stats_request_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001870 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001871};
1872
1873// FIXME stats added to get things working
Rich Lanee9c37db2013-06-21 18:30:24 -07001874struct of_meter_features_stats_reply : of_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001875 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001876 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001877 uint16_t length;
1878 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001879 uint16_t stats_type == 11;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001880 enum ofp_stats_reply_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001881 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001882 of_meter_features_t features;
1883};
1884
1885// FIXME stats added to get things working
Rich Lanee9c37db2013-06-21 18:30:24 -07001886struct of_table_features_stats_request : of_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001887 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001888 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001889 uint16_t length;
1890 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001891 uint16_t stats_type == 12;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001892 enum ofp_stats_request_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001893 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001894 list(of_table_features_t) entries;
1895};
1896
1897// FIXME stats added to get things working
Rich Lanee9c37db2013-06-21 18:30:24 -07001898struct of_table_features_stats_reply : of_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001899 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001900 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001901 uint16_t length;
1902 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001903 uint16_t stats_type == 12;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001904 enum ofp_stats_reply_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001905 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001906 list(of_table_features_t) entries;
1907};
1908
1909// FIXME stats added to get things working
Rich Lanee9c37db2013-06-21 18:30:24 -07001910struct of_port_desc_stats_request : of_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001911 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001912 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001913 uint16_t length;
1914 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001915 uint16_t stats_type == 13;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001916 enum ofp_stats_request_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001917 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001918};
1919
1920// FIXME stats added to get things working
Rich Lanee9c37db2013-06-21 18:30:24 -07001921struct of_port_desc_stats_reply : of_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001922 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001923 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001924 uint16_t length;
1925 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001926 uint16_t stats_type == 13;
Andreas Wundsamb47d7e82013-10-18 17:43:00 -07001927 enum ofp_stats_reply_flags flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001928 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001929 list(of_port_desc_t) entries;
1930};
1931
Rich Lane68ae4d72013-05-09 10:55:19 -07001932struct of_meter_band_stats {
Rich Lanea06d0c32013-03-25 08:52:03 -07001933 uint64_t packet_band_count;
1934 uint64_t byte_band_count;
1935};
1936
Rich Lane68ae4d72013-05-09 10:55:19 -07001937struct of_meter_stats {
Rich Lanea06d0c32013-03-25 08:52:03 -07001938 uint32_t meter_id;
1939 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001940 pad(6);
Rich Lanea06d0c32013-03-25 08:52:03 -07001941 uint32_t flow_count;
1942 uint64_t packet_in_count;
1943 uint64_t byte_in_count;
1944 uint32_t duration_sec;
1945 uint32_t duration_nsec;
1946 list(of_meter_band_stats_t) band_stats;
1947};
1948
Rich Lane68ae4d72013-05-09 10:55:19 -07001949struct of_meter_config {
Rich Lanea06d0c32013-03-25 08:52:03 -07001950 uint16_t length;
1951 uint16_t flags;
1952 uint32_t meter_id;
1953 list(of_meter_band_t) entries;
1954};
1955
Rob Vaterlausfeee3712013-09-30 11:24:19 -07001956struct of_experimenter_stats_header {
Rich Laneb25d07c2013-08-22 17:22:43 -07001957 uint32_t experimenter == ?;
Rich Lanea06d0c32013-03-25 08:52:03 -07001958 uint32_t subtype;
1959};
1960
1961// END OF STATS OBJECTS
1962
Rich Lane68ae4d72013-05-09 10:55:19 -07001963struct of_queue_prop {
Andreas Wundsamc37ba3d2013-08-02 17:51:51 -07001964 uint16_t type == ?;
Rich Lanea06d0c32013-03-25 08:52:03 -07001965 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001966 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001967};
1968
Rich Lanee9c37db2013-06-21 18:30:24 -07001969struct of_queue_prop_min_rate : of_queue_prop {
Rich Lane31b87142013-05-09 22:05:42 -07001970 uint16_t type == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -07001971 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001972 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001973 uint16_t rate;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001974 pad(6);
Rich Lanea06d0c32013-03-25 08:52:03 -07001975};
1976
Rich Lanee9c37db2013-06-21 18:30:24 -07001977struct of_queue_prop_max_rate : of_queue_prop {
Rich Lane31b87142013-05-09 22:05:42 -07001978 uint16_t type == 2;
Rich Lanea06d0c32013-03-25 08:52:03 -07001979 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001980 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001981 uint16_t rate;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001982 pad(6);
Rich Lanea06d0c32013-03-25 08:52:03 -07001983};
1984
Rich Lanee9c37db2013-06-21 18:30:24 -07001985struct of_queue_prop_experimenter : of_queue_prop {
Rich Lane31b87142013-05-09 22:05:42 -07001986 uint16_t type == 65535;
Rich Lanea06d0c32013-03-25 08:52:03 -07001987 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001988 pad(4);
Rich Laneb25d07c2013-08-22 17:22:43 -07001989 uint32_t experimenter == ?;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001990 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001991 of_octets_t data;
1992};
1993
Rich Lane68ae4d72013-05-09 10:55:19 -07001994struct of_packet_queue {
Rich Lanea06d0c32013-03-25 08:52:03 -07001995 uint32_t queue_id;
1996 of_port_no_t port;
1997 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001998 pad(6);
Rich Lanea06d0c32013-03-25 08:52:03 -07001999 list(of_queue_prop_t) properties;
2000};
2001
Rich Lanee9c37db2013-06-21 18:30:24 -07002002struct of_queue_get_config_request : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -07002003 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07002004 uint8_t type == 22;
Rich Lanea06d0c32013-03-25 08:52:03 -07002005 uint16_t length;
2006 uint32_t xid;
2007 of_port_no_t port;
Rich Lanee2af4ee2013-05-09 11:04:06 -07002008 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07002009};
2010
Rich Lanee9c37db2013-06-21 18:30:24 -07002011struct of_queue_get_config_reply : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -07002012 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07002013 uint8_t type == 23;
Rich Lanea06d0c32013-03-25 08:52:03 -07002014 uint16_t length;
2015 uint32_t xid;
2016 of_port_no_t port;
Rich Lanee2af4ee2013-05-09 11:04:06 -07002017 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07002018 list(of_packet_queue_t) queues;
2019};
2020
Rich Lanee9c37db2013-06-21 18:30:24 -07002021struct of_role_request : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -07002022 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07002023 uint8_t type == 24;
Rich Lanea06d0c32013-03-25 08:52:03 -07002024 uint16_t length;
2025 uint32_t xid;
Andreas Wundsam4f796b72013-10-18 17:33:23 -07002026 enum ofp_controller_role role;
Rich Lanee2af4ee2013-05-09 11:04:06 -07002027 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07002028 uint64_t generation_id;
2029};
2030
Rich Lanee9c37db2013-06-21 18:30:24 -07002031struct of_role_reply : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -07002032 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07002033 uint8_t type == 25;
Rich Lanea06d0c32013-03-25 08:52:03 -07002034 uint16_t length;
2035 uint32_t xid;
Andreas Wundsam4f796b72013-10-18 17:33:23 -07002036 enum ofp_controller_role role;
2037 pad(4);
2038 uint64_t generation_id;
Rich Lanea06d0c32013-03-25 08:52:03 -07002039};
2040
2041////////////////////////////////////////////////////////////////
2042// FIXME understand async; where do bitmasks live?
2043// Determine bitmap type for masks below.
2044// DOCUMENT masks where uint32_t[0] is interest for equal/master
2045// while uint32_t[1] is interest for slave
2046////////////////////////////////////////////////////////////////
2047
Rich Lanee9c37db2013-06-21 18:30:24 -07002048struct of_async_get_request : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -07002049 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07002050 uint8_t type == 26;
Rich Lanea06d0c32013-03-25 08:52:03 -07002051 uint16_t length;
2052 uint32_t xid;
2053 uint32_t packet_in_mask_equal_master;
2054 uint32_t packet_in_mask_slave;
2055 uint32_t port_status_mask_equal_master;
2056 uint32_t port_status_mask_slave;
2057 uint32_t flow_removed_mask_equal_master;
2058 uint32_t flow_removed_mask_slave;
2059};
2060
Rich Lanee9c37db2013-06-21 18:30:24 -07002061struct of_async_get_reply : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -07002062 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07002063 uint8_t type == 27;
Rich Lanea06d0c32013-03-25 08:52:03 -07002064 uint16_t length;
2065 uint32_t xid;
2066 uint32_t packet_in_mask_equal_master;
2067 uint32_t packet_in_mask_slave;
2068 uint32_t port_status_mask_equal_master;
2069 uint32_t port_status_mask_slave;
2070 uint32_t flow_removed_mask_equal_master;
2071 uint32_t flow_removed_mask_slave;
2072};
2073
Rich Lanee9c37db2013-06-21 18:30:24 -07002074struct of_async_set : of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -07002075 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07002076 uint8_t type == 28;
Rich Lanea06d0c32013-03-25 08:52:03 -07002077 uint16_t length;
2078 uint32_t xid;
2079 uint32_t packet_in_mask_equal_master;
2080 uint32_t packet_in_mask_slave;
2081 uint32_t port_status_mask_equal_master;
2082 uint32_t port_status_mask_slave;
2083 uint32_t flow_removed_mask_equal_master;
2084 uint32_t flow_removed_mask_slave;
2085};