blob: ccef4db6dec543c5380d4f0c9921d18c3f073ed3 [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
38 OFP_TCP_PORT = 6633,
39 OFP_SSL_PORT = 6633,
40
41 OFP_ETH_ALEN = 6,
42
43 OFP_DEFAULT_MISS_SEND_LEN = 128,
44
45 OFP_VLAN_NONE = 0,
46
47 OFP_FLOW_PERMANENT = 0,
48
49 OFP_DEFAULT_PRIORITY = 0x8000,
50
51 OFP_NO_BUFFER = 0xffffffff,
52
53 DESC_STR_LEN = 256,
54 SERIAL_NUM_LEN = 32,
55
56 OFPQ_ALL = 0xffffffff,
57 OFPQ_MAX_RATE_UNCFG = 0xffff,
58 OFPQ_MIN_RATE_UNCFG = 0xffff,
59};
60
61enum ofp_port_no {
62 OFPP_ANY = 0xffffffff,
63};
64
65enum ofp_port {
66 OFPP_MAX = 0xffffff00,
67 OFPP_IN_PORT = 0xfffffff8,
68 OFPP_TABLE = 0xfffffff9,
69 OFPP_NORMAL = 0xfffffffa,
70 OFPP_FLOOD = 0xfffffffb,
71 OFPP_ALL = 0xfffffffc,
72 OFPP_CONTROLLER = 0xfffffffd,
73 OFPP_LOCAL = 0xfffffffe,
74};
75
76enum ofp_type {
77 OFPT_HELLO = 0,
78 OFPT_ERROR = 1,
79 OFPT_ECHO_REQUEST = 2,
80 OFPT_ECHO_REPLY = 3,
81 OFPT_EXPERIMENTER = 4,
82 OFPT_FEATURES_REQUEST = 5,
83 OFPT_FEATURES_REPLY = 6,
84 OFPT_GET_CONFIG_REQUEST = 7,
85 OFPT_GET_CONFIG_REPLY = 8,
86 OFPT_SET_CONFIG = 9,
87 OFPT_PACKET_IN = 10,
88 OFPT_FLOW_REMOVED = 11,
89 OFPT_PORT_STATUS = 12,
90 OFPT_PACKET_OUT = 13,
91 OFPT_FLOW_MOD = 14,
92 OFPT_GROUP_MOD = 15,
93 OFPT_PORT_MOD = 16,
94 OFPT_TABLE_MOD = 17,
95 OFPT_MULTIPART_REQUEST = 18,
96 OFPT_MULTIPART_REPLY = 19,
97 OFPT_BARRIER_REQUEST = 20,
98 OFPT_BARRIER_REPLY = 21,
99 OFPT_QUEUE_GET_CONFIG_REQUEST = 22,
100 OFPT_QUEUE_GET_CONFIG_REPLY = 23,
101 OFPT_ROLE_REQUEST = 24,
102 OFPT_ROLE_REPLY = 25,
103 OFPT_GET_ASYNC_REQUEST = 26,
104 OFPT_GET_ASYNC_REPLY = 27,
105 OFPT_SET_ASYNC = 28,
106 OFPT_METER_MOD = 29,
107};
108
109enum ofp_config_flags {
110 OFPC_FRAG_NORMAL = 0,
111 OFPC_FRAG_DROP = 1,
112 OFPC_FRAG_REASM = 2,
113 OFPC_FRAG_MASK = 3,
114};
115
116enum ofp_table_config {
117 OFPTC_DEPRECATED_MASK = 0x3,
118};
119
120enum ofp_table {
121 OFPTT_MAX = 0xfe,
122 OFPTT_ALL = 0xff,
123};
124
125enum ofp_capabilities {
126 OFPC_FLOW_STATS = 0x1,
127 OFPC_TABLE_STATS = 0x2,
128 OFPC_PORT_STATS = 0x4,
129 OFPC_GROUP_STATS = 0x8,
130 OFPC_IP_REASM = 0x20,
131 OFPC_QUEUE_STATS = 0x40,
132 OFPC_PORT_BLOCKED = 0x100,
133};
134
135enum ofp_port_config {
136 OFPPC_PORT_DOWN = 0x1,
137 OFPPC_NO_RECV = 0x4,
138 OFPPC_NO_FWD = 0x20,
139 OFPPC_NO_PACKET_IN = 0x40,
140};
141
142enum ofp_port_state {
143 OFPPS_LINK_DOWN = 0x1,
144 OFPPS_BLOCKED = 0x2,
145 OFPPS_LIVE = 0x4,
146};
147
148enum ofp_port_features {
149 OFPPF_10MB_HD = 0x1,
150 OFPPF_10MB_FD = 0x2,
151 OFPPF_100MB_HD = 0x4,
152 OFPPF_100MB_FD = 0x8,
153 OFPPF_1GB_HD = 0x10,
154 OFPPF_1GB_FD = 0x20,
155 OFPPF_10GB_FD = 0x40,
156 OFPPF_40GB_FD = 0x80,
157 OFPPF_100GB_FD = 0x100,
158 OFPPF_1TB_FD = 0x200,
159 OFPPF_OTHER = 0x400,
160 OFPPF_COPPER = 0x800,
161 OFPPF_FIBER = 0x1000,
162 OFPPF_AUTONEG = 0x2000,
163 OFPPF_PAUSE = 0x4000,
164 OFPPF_PAUSE_ASYM = 0x8000,
165};
166
167enum ofp_port_reason {
168 OFPPR_ADD = 0,
169 OFPPR_DELETE = 1,
170 OFPPR_MODIFY = 2,
171};
172
173enum ofp_match_type {
174 OFPMT_STANDARD = 0,
175 OFPMT_OXM = 1,
176};
177
178enum ofp_oxm_class {
179 OFPXMC_NXM_0 = 0,
180 OFPXMC_NXM_1 = 1,
181 OFPXMC_OPENFLOW_BASIC = 0x8000,
182 OFPXMC_EXPERIMENTER = 0xffff,
183};
184
185enum ofp_vlan_id {
186 OFPVID_NONE = 0,
187 OFPVID_PRESENT = 0x1000,
188};
189
190enum ofp_ipv6exthdr_flags {
191 OFPIEH_NONEXT = 0x1,
192 OFPIEH_ESP = 0x2,
193 OFPIEH_AUTH = 0x4,
194 OFPIEH_DEST = 0x8,
195 OFPIEH_FRAG = 0x10,
196 OFPIEH_ROUTER = 0x20,
197 OFPIEH_HOP = 0x40,
198 OFPIEH_UNREP = 0x80,
199 OFPIEH_UNSEQ = 0x100,
200};
201
202enum ofp_action_type {
203 OFPAT_OUTPUT = 0,
204 OFPAT_COPY_TTL_OUT = 0xb,
205 OFPAT_COPY_TTL_IN = 0xc,
206 OFPAT_SET_MPLS_TTL = 0xf,
207 OFPAT_DEC_MPLS_TTL = 0x10,
208 OFPAT_PUSH_VLAN = 0x11,
209 OFPAT_POP_VLAN = 0x12,
210 OFPAT_PUSH_MPLS = 0x13,
211 OFPAT_POP_MPLS = 0x14,
212 OFPAT_SET_QUEUE = 0x15,
213 OFPAT_GROUP = 0x16,
214 OFPAT_SET_NW_TTL = 0x17,
215 OFPAT_DEC_NW_TTL = 0x18,
216 OFPAT_SET_FIELD = 0x19,
217 OFPAT_PUSH_PBB = 0x1a,
218 OFPAT_POP_PBB = 0x1b,
219 OFPAT_EXPERIMENTER = 0xffff,
220};
221
222enum ofp_controller_max_len {
223 OFPCML_MAX = 0xffe5,
224 OFPCML_NO_BUFFER = 0xffff,
225};
226
227enum ofp_instruction_type {
228 OFPIT_GOTO_TABLE = 0x1,
229 OFPIT_WRITE_METADATA = 0x2,
230 OFPIT_WRITE_ACTIONS = 0x3,
231 OFPIT_APPLY_ACTIONS = 0x4,
232 OFPIT_CLEAR_ACTIONS = 0x5,
233 OFPIT_METER = 0x6,
234 OFPIT_EXPERIMENTER = 0xffff,
235};
236
237enum ofp_flow_mod_command {
238 OFPFC_ADD = 0,
239 OFPFC_MODIFY = 1,
240 OFPFC_MODIFY_STRICT = 2,
241 OFPFC_DELETE = 3,
242 OFPFC_DELETE_STRICT = 4,
243};
244
245enum ofp_flow_mod_flags {
246 OFPFF_SEND_FLOW_REM = 0x1,
247 OFPFF_CHECK_OVERLAP = 0x2,
248 OFPFF_RESET_COUNTS = 0x4,
249 OFPFF_NO_PKT_COUNTS = 0x8,
250 OFPFF_NO_BYT_COUNTS = 0x10,
251};
252
253enum ofp_group {
254 OFPG_MAX = 0xffffff00,
255 OFPG_ALL = 0xfffffffc,
256 OFPG_ANY = 0xffffffff,
257};
258
259enum ofp_group_mod_command {
260 OFPGC_ADD = 0,
261 OFPGC_MODIFY = 1,
262 OFPGC_DELETE = 2,
263};
264
265enum ofp_group_type {
266 OFPGT_ALL = 0,
267 OFPGT_SELECT = 1,
268 OFPGT_INDIRECT = 2,
269 OFPGT_FF = 3,
270};
271
272enum ofp_packet_in_reason {
273 OFPR_NO_MATCH = 0,
274 OFPR_ACTION = 1,
275 OFPR_INVALID_TTL = 2,
276};
277
278enum ofp_flow_removed_reason {
279 OFPRR_IDLE_TIMEOUT = 0,
280 OFPRR_HARD_TIMEOUT = 1,
281 OFPRR_DELETE = 2,
282 OFPRR_GROUP_DELETE = 3,
283};
284
285enum ofp_meter {
286 OFPM_MAX = 0xffff0000,
287 OFPM_SLOWPATH = 0xfffffffd,
288 OFPM_CONTROLLER = 0xfffffffe,
289 OFPM_ALL = 0xffffffff,
290};
291
292enum ofp_meter_band_type {
293 OFPMBT_DROP = 0x1,
294 OFPMBT_DSCP_REMARK = 0x2,
295 OFPMBT_EXPERIMENTER = 0xffff,
296};
297
298enum ofp_meter_mod_command {
299 OFPMC_ADD = 0,
300 OFPMC_MODIFY = 1,
301 OFPMC_DELETE = 2,
302};
303
304enum ofp_meter_flags {
305 OFPMF_KBPS = 0x1,
306 OFPMF_PKTPS = 0x2,
307 OFPMF_BURST = 0x4,
308 OFPMF_STATS = 0x8,
309};
310
311enum ofp_error_type {
312 OFPET_HELLO_FAILED = 0,
313 OFPET_BAD_REQUEST = 1,
314 OFPET_BAD_ACTION = 2,
315 OFPET_BAD_INSTRUCTION = 3,
316 OFPET_BAD_MATCH = 4,
317 OFPET_FLOW_MOD_FAILED = 5,
318 OFPET_GROUP_MOD_FAILED = 6,
319 OFPET_PORT_MOD_FAILED = 7,
320 OFPET_TABLE_MOD_FAILED = 8,
321 OFPET_QUEUE_OP_FAILED = 9,
322 OFPET_SWITCH_CONFIG_FAILED = 10,
323 OFPET_ROLE_REQUEST_FAILED = 11,
324 OFPET_METER_MOD_FAILED = 12,
325 OFPET_TABLE_FEATURES_FAILED = 13,
326 OFPET_EXPERIMENTER = 0xffff,
327};
328
329enum ofp_hello_failed_code {
330 OFPHFC_INCOMPATIBLE = 0,
331 OFPHFC_EPERM = 1,
332};
333
334enum ofp_bad_request_code {
335 OFPBRC_BAD_VERSION = 0,
336 OFPBRC_BAD_TYPE = 1,
337 OFPBRC_BAD_MULTIPART = 2,
338 OFPBRC_BAD_EXPERIMENTER = 3,
339 OFPBRC_BAD_EXP_TYPE = 4,
340 OFPBRC_EPERM = 5,
341 OFPBRC_BAD_LEN = 6,
342 OFPBRC_BUFFER_EMPTY = 7,
343 OFPBRC_BUFFER_UNKNOWN = 8,
344 OFPBRC_BAD_TABLE_ID = 9,
345 OFPBRC_IS_SLAVE = 10,
346 OFPBRC_BAD_PORT = 11,
347 OFPBRC_BAD_PACKET = 12,
348 OFPBRC_MULTIPART_BUFFER_OVERFLOW = 13,
349};
350
351enum ofp_bad_action_code {
352 OFPBAC_BAD_TYPE = 0,
353 OFPBAC_BAD_LEN = 1,
354 OFPBAC_BAD_EXPERIMENTER = 2,
355 OFPBAC_BAD_EXP_TYPE = 3,
356 OFPBAC_BAD_OUT_PORT = 4,
357 OFPBAC_BAD_ARGUMENT = 5,
358 OFPBAC_EPERM = 6,
359 OFPBAC_TOO_MANY = 7,
360 OFPBAC_BAD_QUEUE = 8,
361 OFPBAC_BAD_OUT_GROUP = 9,
362 OFPBAC_MATCH_INCONSISTENT = 10,
363 OFPBAC_UNSUPPORTED_ORDER = 11,
364 OFPBAC_BAD_TAG = 12,
365 OFPBAC_BAD_SET_TYPE = 13,
366 OFPBAC_BAD_SET_LEN = 14,
367 OFPBAC_BAD_SET_ARGUMENT = 15,
368};
369
370enum ofp_bad_instruction_code {
371 OFPBIC_UNKNOWN_INST = 0,
372 OFPBIC_UNSUP_INST = 1,
373 OFPBIC_BAD_TABLE_ID = 2,
374 OFPBIC_UNSUP_METADATA = 3,
375 OFPBIC_UNSUP_METADATA_MASK = 4,
376 OFPBIC_BAD_EXPERIMENTER = 5,
377 OFPBIC_BAD_EXP_TYPE = 6,
378 OFPBIC_BAD_LEN = 7,
379 OFPBIC_EPERM = 8,
380};
381
382enum ofp_bad_match_code {
383 OFPBMC_BAD_TYPE = 0,
384 OFPBMC_BAD_LEN = 1,
385 OFPBMC_BAD_TAG = 2,
386 OFPBMC_BAD_DL_ADDR_MASK = 3,
387 OFPBMC_BAD_NW_ADDR_MASK = 4,
388 OFPBMC_BAD_WILDCARDS = 5,
389 OFPBMC_BAD_FIELD = 6,
390 OFPBMC_BAD_VALUE = 7,
391 OFPBMC_BAD_MASK = 8,
392 OFPBMC_BAD_PREREQ = 9,
393 OFPBMC_DUP_FIELD = 10,
394 OFPBMC_EPERM = 11,
395};
396
397enum ofp_flow_mod_failed_code {
398 OFPFMFC_UNKNOWN = 0,
399 OFPFMFC_TABLE_FULL = 1,
400 OFPFMFC_BAD_TABLE_ID = 2,
401 OFPFMFC_OVERLAP = 3,
402 OFPFMFC_EPERM = 4,
403 OFPFMFC_BAD_TIMEOUT = 5,
404 OFPFMFC_BAD_COMMAND = 6,
405 OFPFMFC_BAD_FLAGS = 7,
406};
407
408enum ofp_group_mod_failed_code {
409 OFPGMFC_GROUP_EXISTS = 0,
410 OFPGMFC_INVALID_GROUP = 1,
411 OFPGMFC_WEIGHT_UNSUPPORTED = 2,
412 OFPGMFC_OUT_OF_GROUPS = 3,
413 OFPGMFC_OUT_OF_BUCKETS = 4,
414 OFPGMFC_CHAINING_UNSUPPORTED = 5,
415 OFPGMFC_WATCH_UNSUPPORTED = 6,
416 OFPGMFC_LOOP = 7,
417 OFPGMFC_UNKNOWN_GROUP = 8,
418 OFPGMFC_CHAINED_GROUP = 9,
419 OFPGMFC_BAD_TYPE = 10,
420 OFPGMFC_BAD_COMMAND = 11,
421 OFPGMFC_BAD_BUCKET = 12,
422 OFPGMFC_BAD_WATCH = 13,
423 OFPGMFC_EPERM = 14,
424};
425
426enum ofp_port_mod_failed_code {
427 OFPPMFC_BAD_PORT = 0,
428 OFPPMFC_BAD_HW_ADDR = 1,
429 OFPPMFC_BAD_CONFIG = 2,
430 OFPPMFC_BAD_ADVERTISE = 3,
431 OFPPMFC_EPERM = 4,
432};
433
434enum ofp_table_mod_failed_code {
435 OFPTMFC_BAD_TABLE = 0,
436 OFPTMFC_BAD_CONFIG = 1,
437 OFPTMFC_EPERM = 2,
438};
439
440enum ofp_queue_op_failed_code {
441 OFPQOFC_BAD_PORT = 0,
442 OFPQOFC_BAD_QUEUE = 1,
443 OFPQOFC_EPERM = 2,
444};
445
446enum ofp_switch_config_failed_code {
447 OFPSCFC_BAD_FLAGS = 0,
448 OFPSCFC_BAD_LEN = 1,
449 OFPSCFC_EPERM = 2,
450};
451
452enum ofp_role_request_failed_code {
453 OFPRRFC_STALE = 0,
454 OFPRRFC_UNSUP = 1,
455 OFPRRFC_BAD_ROLE = 2,
456};
457
458enum ofp_meter_mod_failed_code {
459 OFPMMFC_UNKNOWN = 0,
460 OFPMMFC_METER_EXISTS = 1,
461 OFPMMFC_INVALID_METER = 2,
462 OFPMMFC_UNKNOWN_METER = 3,
463 OFPMMFC_BAD_COMMAND = 4,
464 OFPMMFC_BAD_FLAGS = 5,
465 OFPMMFC_BAD_RATE = 6,
466 OFPMMFC_BAD_BURST = 7,
467 OFPMMFC_BAD_BAND = 8,
468 OFPMMFC_BAD_BAND_VALUE = 9,
469 OFPMMFC_OUT_OF_METERS = 10,
470 OFPMMFC_OUT_OF_BANDS = 11,
471};
472
473enum ofp_table_features_failed_code {
474 OFPTFFC_BAD_TABLE = 0,
475 OFPTFFC_BAD_METADATA = 1,
476 OFPTFFC_BAD_TYPE = 2,
477 OFPTFFC_BAD_LEN = 3,
478 OFPTFFC_BAD_ARGUMENT = 4,
479 OFPTFFC_EPERM = 5,
480};
481
482enum ofp_multipart_types {
483 OFPMP_DESC = 0,
484 OFPMP_FLOW = 1,
485 OFPMP_AGGREGATE = 2,
486 OFPMP_TABLE = 3,
487 OFPMP_PORT_STATS = 4,
488 OFPMP_QUEUE = 5,
489 OFPMP_GROUP = 6,
490 OFPMP_GROUP_DESC = 7,
491 OFPMP_GROUP_FEATURES = 8,
492 OFPMP_METER = 9,
493 OFPMP_METER_CONFIG = 10,
494 OFPMP_METER_FEATURES = 11,
495 OFPMP_TABLE_FEATURES = 12,
496 OFPMP_PORT_DESC = 13,
497 OFPMP_EXPERIMENTER = 0xffff,
498};
499
500enum ofp_multipart_request_flags {
501 OFPMPF_REQ_MORE = 0x1,
502};
503
504enum ofp_multipart_reply_flags {
505 OFPMPF_REPLY_MORE = 0x1,
506};
507
508enum ofp_table_feature_prop_type {
509 OFPTFPT_INSTRUCTIONS = 0,
510 OFPTFPT_INSTRUCTIONS_MISS = 1,
511 OFPTFPT_NEXT_TABLES = 2,
512 OFPTFPT_NEXT_TABLES_MISS = 3,
513 OFPTFPT_WRITE_ACTIONS = 4,
514 OFPTFPT_WRITE_ACTIONS_MISS = 5,
515 OFPTFPT_APPLY_ACTIONS = 6,
516 OFPTFPT_APPLY_ACTIONS_MISS = 7,
517 OFPTFPT_MATCH = 8,
518 OFPTFPT_WILDCARDS = 0xa,
519 OFPTFPT_WRITE_SETFIELD = 0xc,
520 OFPTFPT_WRITE_SETFIELD_MISS = 0xd,
521 OFPTFPT_APPLY_SETFIELD = 0xe,
522 OFPTFPT_APPLY_SETFIELD_MISS = 0xf,
523 OFPTFPT_EXPERIMENTER = 0xfffe,
524 OFPTFPT_EXPERIMENTER_MISS = 0xffff,
525};
526
527enum ofp_group_capabilities {
528 OFPGFC_SELECT_WEIGHT = 0x1,
529 OFPGFC_SELECT_LIVENESS = 0x2,
530 OFPGFC_CHAINING = 0x4,
531 OFPGFC_CHAINING_CHECKS = 0x8,
532};
533
534enum ofp_queue_properties {
535 OFPQT_MIN_RATE = 0x1,
536 OFPQT_MAX_RATE = 0x2,
537 OFPQT_EXPERIMENTER = 0xffff,
538};
539
540enum ofp_controller_role {
541 OFPCR_ROLE_NOCHANGE = 0,
542 OFPCR_ROLE_EQUAL = 1,
543 OFPCR_ROLE_MASTER = 2,
544 OFPCR_ROLE_SLAVE = 3,
545};
546
Rich Lane0733cd62013-04-18 21:14:42 -0700547enum ofp_hello_elem_type {
548 OFPHET_VERSIONBITMAP = 1,
549};
550
Rich Lane68ae4d72013-05-09 10:55:19 -0700551struct of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -0700552 uint8_t version;
553 uint8_t type;
554 uint16_t length;
555 uint32_t xid;
556};
557
558// Special structures used for managing scalar list elements
Rich Lane68ae4d72013-05-09 10:55:19 -0700559struct of_uint32 {
Rich Lanea06d0c32013-03-25 08:52:03 -0700560 uint32_t value;
561};
562
563// Special structures used for managing scalar list elements
Rich Lane68ae4d72013-05-09 10:55:19 -0700564struct of_uint8 {
Rich Lanea06d0c32013-03-25 08:52:03 -0700565 uint8_t value;
566};
567
Rich Lane68ae4d72013-05-09 10:55:19 -0700568struct of_hello_elem {
Rich Lanea06d0c32013-03-25 08:52:03 -0700569 uint16_t type;
570 uint16_t length;
571};
572
Rich Lane68ae4d72013-05-09 10:55:19 -0700573struct of_hello_elem_versionbitmap {
Rich Lane31b87142013-05-09 22:05:42 -0700574 uint16_t type == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -0700575 uint16_t length;
576 list(of_uint32_t) bitmaps;
577};
578
Rich Lane68ae4d72013-05-09 10:55:19 -0700579struct of_hello {
Rich Lanea06d0c32013-03-25 08:52:03 -0700580 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700581 uint8_t type == 0;
Rich Lanea06d0c32013-03-25 08:52:03 -0700582 uint16_t length;
583 uint32_t xid;
584 list(of_hello_elem_t) elements;
585};
586
Rich Lane68ae4d72013-05-09 10:55:19 -0700587struct of_echo_request {
Rich Lanea06d0c32013-03-25 08:52:03 -0700588 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700589 uint8_t type == 2;
Rich Lanea06d0c32013-03-25 08:52:03 -0700590 uint16_t length;
591 uint32_t xid;
592 of_octets_t data;
593};
594
Rich Lane68ae4d72013-05-09 10:55:19 -0700595struct of_echo_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -0700596 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700597 uint8_t type == 3;
Rich Lanea06d0c32013-03-25 08:52:03 -0700598 uint16_t length;
599 uint32_t xid;
600 of_octets_t data;
601};
602
Rich Lane68ae4d72013-05-09 10:55:19 -0700603struct of_experimenter {
Rich Lanea06d0c32013-03-25 08:52:03 -0700604 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700605 uint8_t type == 4;
Rich Lanea06d0c32013-03-25 08:52:03 -0700606 uint16_t length;
607 uint32_t xid;
608 uint32_t experimenter;
609 uint32_t subtype;
610 of_octets_t data;
611};
612
Rich Lane68ae4d72013-05-09 10:55:19 -0700613struct of_barrier_request {
Rich Lanea06d0c32013-03-25 08:52:03 -0700614 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700615 uint8_t type == 20;
Rich Lanea06d0c32013-03-25 08:52:03 -0700616 uint16_t length;
617 uint32_t xid;
618};
619
Rich Lane68ae4d72013-05-09 10:55:19 -0700620struct of_barrier_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -0700621 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700622 uint8_t type == 21;
Rich Lanea06d0c32013-03-25 08:52:03 -0700623 uint16_t length;
624 uint32_t xid;
625};
626
Rich Lane68ae4d72013-05-09 10:55:19 -0700627struct of_get_config_request {
Rich Lanea06d0c32013-03-25 08:52:03 -0700628 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700629 uint8_t type == 7;
Rich Lanea06d0c32013-03-25 08:52:03 -0700630 uint16_t length;
631 uint32_t xid;
632};
633
Rich Lane68ae4d72013-05-09 10:55:19 -0700634struct of_get_config_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -0700635 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700636 uint8_t type == 8;
Rich Lanea06d0c32013-03-25 08:52:03 -0700637 uint16_t length;
638 uint32_t xid;
639 uint16_t flags;
640 uint16_t miss_send_len;
641};
642
Rich Lane68ae4d72013-05-09 10:55:19 -0700643struct of_set_config {
Rich Lanea06d0c32013-03-25 08:52:03 -0700644 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700645 uint8_t type == 9;
Rich Lanea06d0c32013-03-25 08:52:03 -0700646 uint16_t length;
647 uint32_t xid;
648 uint16_t flags;
649 uint16_t miss_send_len;
650};
651
Rich Lane68ae4d72013-05-09 10:55:19 -0700652struct of_table_mod {
Rich Lanea06d0c32013-03-25 08:52:03 -0700653 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700654 uint8_t type == 17;
Rich Lanea06d0c32013-03-25 08:52:03 -0700655 uint16_t length;
656 uint32_t xid;
657 uint8_t table_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700658 pad(3);
Rich Lanea06d0c32013-03-25 08:52:03 -0700659 uint32_t config;
660};
661
Rich Lane68ae4d72013-05-09 10:55:19 -0700662struct of_port_desc {
Rich Lanea06d0c32013-03-25 08:52:03 -0700663 of_port_no_t port_no;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700664 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700665 of_mac_addr_t hw_addr;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700666 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700667 of_port_name_t name;
668 uint32_t config;
669 uint32_t state;
670 uint32_t curr;
671 uint32_t advertised;
672 uint32_t supported;
673 uint32_t peer;
674 uint32_t curr_speed;
675 uint32_t max_speed;
676};
677
Rich Lane68ae4d72013-05-09 10:55:19 -0700678struct of_features_request {
Rich Lanea06d0c32013-03-25 08:52:03 -0700679 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700680 uint8_t type == 5;
Rich Lanea06d0c32013-03-25 08:52:03 -0700681 uint16_t length;
682 uint32_t xid;
683};
684
Rich Lane68ae4d72013-05-09 10:55:19 -0700685struct of_features_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -0700686 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700687 uint8_t type == 6;
Rich Lanea06d0c32013-03-25 08:52:03 -0700688 uint16_t length;
689 uint32_t xid;
690 uint64_t datapath_id;
691 uint32_t n_buffers;
692 uint8_t n_tables;
693 uint8_t auxiliary_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700694 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700695 uint32_t capabilities;
696 uint32_t reserved;
697};
698
Rich Lane68ae4d72013-05-09 10:55:19 -0700699struct of_port_status {
Rich Lanea06d0c32013-03-25 08:52:03 -0700700 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700701 uint8_t type == 12;
Rich Lanea06d0c32013-03-25 08:52:03 -0700702 uint16_t length;
703 uint32_t xid;
704 uint8_t reason;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700705 pad(7);
Rich Lanea06d0c32013-03-25 08:52:03 -0700706 of_port_desc_t desc;
707};
708
Rich Lane68ae4d72013-05-09 10:55:19 -0700709struct of_port_mod {
Rich Lanea06d0c32013-03-25 08:52:03 -0700710 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700711 uint8_t type == 16;
Rich Lanea06d0c32013-03-25 08:52:03 -0700712 uint16_t length;
713 uint32_t xid;
714 of_port_no_t port_no;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700715 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700716 of_mac_addr_t hw_addr;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700717 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700718 uint32_t config;
719 uint32_t mask;
720 uint32_t advertise;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700721 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700722};
723
724// FIXME Does this need to be v4?
Rich Lane68ae4d72013-05-09 10:55:19 -0700725struct of_match_v3 {
Rich Lane31b87142013-05-09 22:05:42 -0700726 uint16_t type == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -0700727 uint16_t length;
728 list(of_oxm_t) oxm_list;
729};
730
Rich Lanea06d0c32013-03-25 08:52:03 -0700731// This looks like an action header, but is standalone. See
732// ofp_table_features_prop_actions
Rich Lane68ae4d72013-05-09 10:55:19 -0700733struct of_action_id {
Rich Lanea06d0c32013-03-25 08:52:03 -0700734 uint16_t type;
735 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700736 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700737};
738
Rich Lane68ae4d72013-05-09 10:55:19 -0700739struct of_action_output {
Rich Lane31b87142013-05-09 22:05:42 -0700740 uint16_t type == 0;
Rich Lanea06d0c32013-03-25 08:52:03 -0700741 uint16_t len;
742 of_port_no_t port;
743 uint16_t max_len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700744 pad(6);
Rich Lanea06d0c32013-03-25 08:52:03 -0700745};
746
Rich Lane68ae4d72013-05-09 10:55:19 -0700747struct of_action_copy_ttl_out {
Rich Lane31b87142013-05-09 22:05:42 -0700748 uint16_t type == 11;
Rich Lanea06d0c32013-03-25 08:52:03 -0700749 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700750 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700751};
752
Rich Lane68ae4d72013-05-09 10:55:19 -0700753struct of_action_copy_ttl_in {
Rich Lane31b87142013-05-09 22:05:42 -0700754 uint16_t type == 12;
Rich Lanea06d0c32013-03-25 08:52:03 -0700755 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700756 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700757};
758
Rich Lane68ae4d72013-05-09 10:55:19 -0700759struct of_action_set_mpls_ttl {
Rich Lane31b87142013-05-09 22:05:42 -0700760 uint16_t type == 15;
Rich Lanea06d0c32013-03-25 08:52:03 -0700761 uint16_t len;
762 uint8_t mpls_ttl;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700763 pad(3);
Rich Lanea06d0c32013-03-25 08:52:03 -0700764};
765
Rich Lane68ae4d72013-05-09 10:55:19 -0700766struct of_action_dec_mpls_ttl {
Rich Lane31b87142013-05-09 22:05:42 -0700767 uint16_t type == 16;
Rich Lanea06d0c32013-03-25 08:52:03 -0700768 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700769 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700770};
771
Rich Lane68ae4d72013-05-09 10:55:19 -0700772struct of_action_push_vlan {
Rich Lane31b87142013-05-09 22:05:42 -0700773 uint16_t type == 17;
Rich Lanea06d0c32013-03-25 08:52:03 -0700774 uint16_t len;
775 uint16_t ethertype;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700776 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700777};
778
Rich Lane68ae4d72013-05-09 10:55:19 -0700779struct of_action_pop_vlan {
Rich Lane31b87142013-05-09 22:05:42 -0700780 uint16_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -0700781 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700782 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700783};
784
Rich Lane68ae4d72013-05-09 10:55:19 -0700785struct of_action_push_mpls {
Rich Lane31b87142013-05-09 22:05:42 -0700786 uint16_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -0700787 uint16_t len;
788 uint16_t ethertype;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700789 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700790};
791
Rich Lane68ae4d72013-05-09 10:55:19 -0700792struct of_action_pop_mpls {
Rich Lane31b87142013-05-09 22:05:42 -0700793 uint16_t type == 20;
Rich Lanea06d0c32013-03-25 08:52:03 -0700794 uint16_t len;
795 uint16_t ethertype;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700796 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700797};
798
Rich Lane68ae4d72013-05-09 10:55:19 -0700799struct of_action_set_queue {
Rich Lane31b87142013-05-09 22:05:42 -0700800 uint16_t type == 21;
Rich Lanea06d0c32013-03-25 08:52:03 -0700801 uint16_t len;
802 uint32_t queue_id;
803};
804
Rich Lane68ae4d72013-05-09 10:55:19 -0700805struct of_action_group {
Rich Lane31b87142013-05-09 22:05:42 -0700806 uint16_t type == 22;
Rich Lanea06d0c32013-03-25 08:52:03 -0700807 uint16_t len;
808 uint32_t group_id;
809};
810
Rich Lane68ae4d72013-05-09 10:55:19 -0700811struct of_action_set_nw_ttl {
Rich Lane31b87142013-05-09 22:05:42 -0700812 uint16_t type == 23;
Rich Lanea06d0c32013-03-25 08:52:03 -0700813 uint16_t len;
814 uint8_t nw_ttl;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700815 pad(3);
Rich Lanea06d0c32013-03-25 08:52:03 -0700816};
817
Rich Lane68ae4d72013-05-09 10:55:19 -0700818struct of_action_dec_nw_ttl {
Rich Lane31b87142013-05-09 22:05:42 -0700819 uint16_t type == 24;
Rich Lanea06d0c32013-03-25 08:52:03 -0700820 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700821 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700822};
823
Rich Lane68ae4d72013-05-09 10:55:19 -0700824struct of_action_set_field {
Rich Lane31b87142013-05-09 22:05:42 -0700825 uint16_t type == 25;
Rich Lanea06d0c32013-03-25 08:52:03 -0700826 uint16_t len;
827 of_octets_t field;
828};
829
Rich Lane68ae4d72013-05-09 10:55:19 -0700830struct of_action_experimenter {
Rich Lane31b87142013-05-09 22:05:42 -0700831 uint16_t type == 65535;
Rich Lanea06d0c32013-03-25 08:52:03 -0700832 uint16_t len;
833 uint32_t experimenter;
834 of_octets_t data;
835};
836
Rich Lane68ae4d72013-05-09 10:55:19 -0700837struct of_action_pop_pbb {
Rich Lane31b87142013-05-09 22:05:42 -0700838 uint16_t type == 27;
Rich Lanea06d0c32013-03-25 08:52:03 -0700839 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700840 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700841};
842
Rich Lane68ae4d72013-05-09 10:55:19 -0700843struct of_action_push_pbb {
Rich Lane31b87142013-05-09 22:05:42 -0700844 uint16_t type == 26;
Rich Lanea06d0c32013-03-25 08:52:03 -0700845 uint16_t len;
846 uint16_t ethertype;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700847 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700848};
849
Rich Lane68ae4d72013-05-09 10:55:19 -0700850struct of_action {
Rich Lanea06d0c32013-03-25 08:52:03 -0700851 uint16_t type;
852 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700853 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700854};
855
Rich Lane68ae4d72013-05-09 10:55:19 -0700856struct of_instruction {
Rich Lanea06d0c32013-03-25 08:52:03 -0700857 uint16_t type;
858 uint16_t len;
859};
860
Rich Lane68ae4d72013-05-09 10:55:19 -0700861struct of_instruction_goto_table {
Rich Lane31b87142013-05-09 22:05:42 -0700862 uint16_t type == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -0700863 uint16_t len;
864 uint8_t table_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700865 pad(3);
Rich Lanea06d0c32013-03-25 08:52:03 -0700866};
867
Rich Lane68ae4d72013-05-09 10:55:19 -0700868struct of_instruction_write_metadata {
Rich Lane31b87142013-05-09 22:05:42 -0700869 uint16_t type == 2;
Rich Lanea06d0c32013-03-25 08:52:03 -0700870 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700871 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700872 uint64_t metadata;
873 uint64_t metadata_mask;
874};
875
Rich Lane68ae4d72013-05-09 10:55:19 -0700876struct of_instruction_write_actions {
Rich Lane31b87142013-05-09 22:05:42 -0700877 uint16_t type == 3;
Rich Lanea06d0c32013-03-25 08:52:03 -0700878 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700879 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700880 list(of_action_t) actions;
881};
882
Rich Lane68ae4d72013-05-09 10:55:19 -0700883struct of_instruction_apply_actions {
Rich Lane31b87142013-05-09 22:05:42 -0700884 uint16_t type == 4;
Rich Lanea06d0c32013-03-25 08:52:03 -0700885 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700886 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700887 list(of_action_t) actions;
888};
889
Rich Lane68ae4d72013-05-09 10:55:19 -0700890struct of_instruction_clear_actions {
Rich Lane31b87142013-05-09 22:05:42 -0700891 uint16_t type == 5;
Rich Lanea06d0c32013-03-25 08:52:03 -0700892 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700893 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700894};
895
Rich Lane68ae4d72013-05-09 10:55:19 -0700896struct of_instruction_meter {
Rich Lane31b87142013-05-09 22:05:42 -0700897 uint16_t type == 6;
Rich Lanea06d0c32013-03-25 08:52:03 -0700898 uint16_t len;
899 uint32_t meter_id;
900};
901
Rich Lane68ae4d72013-05-09 10:55:19 -0700902struct of_instruction_experimenter {
Rich Lane31b87142013-05-09 22:05:42 -0700903 uint16_t type == 65535;
Rich Lanea06d0c32013-03-25 08:52:03 -0700904 uint16_t len;
905 uint32_t experimenter;
906 of_octets_t data;
907};
908
Rich Lane68ae4d72013-05-09 10:55:19 -0700909struct of_flow_add {
Rich Lanea06d0c32013-03-25 08:52:03 -0700910 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700911 uint8_t type == 14;
Rich Lanea06d0c32013-03-25 08:52:03 -0700912 uint16_t length;
913 uint32_t xid;
914 uint64_t cookie;
915 uint64_t cookie_mask;
916 uint8_t table_id;
Rich Lane31b87142013-05-09 22:05:42 -0700917 of_fm_cmd_t _command == 0;
Rich Lanea06d0c32013-03-25 08:52:03 -0700918 uint16_t idle_timeout;
919 uint16_t hard_timeout;
920 uint16_t priority;
921 uint32_t buffer_id;
922 of_port_no_t out_port;
923 uint32_t out_group;
924 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700925 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700926 of_match_t match;
927 list(of_instruction_t) instructions;
928};
929
Rich Lane68ae4d72013-05-09 10:55:19 -0700930struct of_flow_modify {
Rich Lanea06d0c32013-03-25 08:52:03 -0700931 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700932 uint8_t type == 14;
Rich Lanea06d0c32013-03-25 08:52:03 -0700933 uint16_t length;
934 uint32_t xid;
935 uint64_t cookie;
936 uint64_t cookie_mask;
937 uint8_t table_id;
Rich Lane31b87142013-05-09 22:05:42 -0700938 of_fm_cmd_t _command == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -0700939 uint16_t idle_timeout;
940 uint16_t hard_timeout;
941 uint16_t priority;
942 uint32_t buffer_id;
943 of_port_no_t out_port;
944 uint32_t out_group;
945 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700946 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700947 of_match_t match;
948 list(of_instruction_t) instructions;
949};
950
Rich Lane68ae4d72013-05-09 10:55:19 -0700951struct of_flow_modify_strict {
Rich Lanea06d0c32013-03-25 08:52:03 -0700952 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700953 uint8_t type == 14;
Rich Lanea06d0c32013-03-25 08:52:03 -0700954 uint16_t length;
955 uint32_t xid;
956 uint64_t cookie;
957 uint64_t cookie_mask;
958 uint8_t table_id;
Rich Lane31b87142013-05-09 22:05:42 -0700959 of_fm_cmd_t _command == 2;
Rich Lanea06d0c32013-03-25 08:52:03 -0700960 uint16_t idle_timeout;
961 uint16_t hard_timeout;
962 uint16_t priority;
963 uint32_t buffer_id;
964 of_port_no_t out_port;
965 uint32_t out_group;
966 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700967 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700968 of_match_t match;
969 list(of_instruction_t) instructions;
970};
971
Rich Lane68ae4d72013-05-09 10:55:19 -0700972struct of_flow_delete {
Rich Lanea06d0c32013-03-25 08:52:03 -0700973 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700974 uint8_t type == 14;
Rich Lanea06d0c32013-03-25 08:52:03 -0700975 uint16_t length;
976 uint32_t xid;
977 uint64_t cookie;
978 uint64_t cookie_mask;
979 uint8_t table_id;
Rich Lane31b87142013-05-09 22:05:42 -0700980 of_fm_cmd_t _command == 3;
Rich Lanea06d0c32013-03-25 08:52:03 -0700981 uint16_t idle_timeout;
982 uint16_t hard_timeout;
983 uint16_t priority;
984 uint32_t buffer_id;
985 of_port_no_t out_port;
986 uint32_t out_group;
987 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700988 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700989 of_match_t match;
990 list(of_instruction_t) instructions;
991};
992
Rich Lane68ae4d72013-05-09 10:55:19 -0700993struct of_flow_delete_strict {
Rich Lanea06d0c32013-03-25 08:52:03 -0700994 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700995 uint8_t type == 14;
Rich Lanea06d0c32013-03-25 08:52:03 -0700996 uint16_t length;
997 uint32_t xid;
998 uint64_t cookie;
999 uint64_t cookie_mask;
1000 uint8_t table_id;
Rich Lane31b87142013-05-09 22:05:42 -07001001 of_fm_cmd_t _command == 4;
Rich Lanea06d0c32013-03-25 08:52:03 -07001002 uint16_t idle_timeout;
1003 uint16_t hard_timeout;
1004 uint16_t priority;
1005 uint32_t buffer_id;
1006 of_port_no_t out_port;
1007 uint32_t out_group;
1008 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001009 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -07001010 of_match_t match;
1011 list(of_instruction_t) instructions;
1012};
1013
Rich Lane68ae4d72013-05-09 10:55:19 -07001014struct of_bucket {
Rich Lanea06d0c32013-03-25 08:52:03 -07001015 uint16_t len;
1016 uint16_t weight;
1017 of_port_no_t watch_port;
1018 uint32_t watch_group;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001019 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001020 list(of_action_t) actions;
1021};
1022
Rich Lane68ae4d72013-05-09 10:55:19 -07001023struct of_group_mod {
Rich Lanea06d0c32013-03-25 08:52:03 -07001024 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001025 uint8_t type == 15;
Rich Lanea06d0c32013-03-25 08:52:03 -07001026 uint16_t length;
1027 uint32_t xid;
1028 uint16_t command;
1029 uint8_t group_type;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001030 pad(1);
Rich Lanea06d0c32013-03-25 08:52:03 -07001031 uint32_t group_id;
1032 list(of_bucket_t) buckets;
1033};
1034
Rich Lane68ae4d72013-05-09 10:55:19 -07001035struct of_packet_out {
Rich Lanea06d0c32013-03-25 08:52:03 -07001036 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001037 uint8_t type == 13;
Rich Lanea06d0c32013-03-25 08:52:03 -07001038 uint16_t length;
1039 uint32_t xid;
1040 uint32_t buffer_id;
1041 of_port_no_t in_port;
1042 uint16_t actions_len;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001043 pad(6);
Rich Lanea06d0c32013-03-25 08:52:03 -07001044 list(of_action_t) actions;
1045 of_octets_t data;
1046};
1047
Rich Lane68ae4d72013-05-09 10:55:19 -07001048struct of_packet_in {
Rich Lanea06d0c32013-03-25 08:52:03 -07001049 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001050 uint8_t type == 10;
Rich Lanea06d0c32013-03-25 08:52:03 -07001051 uint16_t length;
1052 uint32_t xid;
1053 uint32_t buffer_id;
1054 uint16_t total_len;
1055 uint8_t reason;
1056 uint8_t table_id;
1057 uint64_t cookie;
1058 of_match_t match;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001059 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -07001060 of_octets_t data; /* FIXME: Ensure total_len gets updated */
1061};
1062
Rich Lane68ae4d72013-05-09 10:55:19 -07001063struct of_flow_removed {
Rich Lanea06d0c32013-03-25 08:52:03 -07001064 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001065 uint8_t type == 11;
Rich Lanea06d0c32013-03-25 08:52:03 -07001066 uint16_t length;
1067 uint32_t xid;
1068 uint64_t cookie;
1069 uint16_t priority;
1070 uint8_t reason;
1071 uint8_t table_id;
1072 uint32_t duration_sec;
1073 uint32_t duration_nsec;
1074 uint16_t idle_timeout;
1075 uint16_t hard_timeout;
1076 uint64_t packet_count;
1077 uint64_t byte_count;
1078 of_match_t match;
1079};
1080
Rich Lane68ae4d72013-05-09 10:55:19 -07001081struct of_meter_band {
Rich Lanea06d0c32013-03-25 08:52:03 -07001082 uint16_t type;
1083 uint16_t len;
1084// uint32_t rate; // These are excluded b/c this is the header
1085// uint32_t burst_size; // These are excluded b/c this is the header
1086};
1087
Rich Lane68ae4d72013-05-09 10:55:19 -07001088struct of_meter_band_drop {
Rich Lane31b87142013-05-09 22:05:42 -07001089 uint16_t type == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -07001090 uint16_t len;
1091 uint32_t rate;
1092 uint32_t burst_size;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001093 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001094};
1095
Rich Lane68ae4d72013-05-09 10:55:19 -07001096struct of_meter_band_dscp_remark {
Rich Lane31b87142013-05-09 22:05:42 -07001097 uint16_t type == 2;
Rich Lanea06d0c32013-03-25 08:52:03 -07001098 uint16_t len;
1099 uint32_t rate;
1100 uint32_t burst_size;
1101 uint8_t prec_level;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001102 pad(3);
Rich Lanea06d0c32013-03-25 08:52:03 -07001103};
1104
Rich Lane68ae4d72013-05-09 10:55:19 -07001105struct of_meter_band_experimenter {
Rich Lane31b87142013-05-09 22:05:42 -07001106 uint16_t type == 65535;
Rich Lanea06d0c32013-03-25 08:52:03 -07001107 uint16_t len;
1108 uint32_t rate;
1109 uint32_t burst_size;
1110 uint32_t experimenter;
1111};
1112
Rich Lane68ae4d72013-05-09 10:55:19 -07001113struct of_meter_mod {
Rich Lanea06d0c32013-03-25 08:52:03 -07001114 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001115 uint8_t type == 29;
Rich Lanea06d0c32013-03-25 08:52:03 -07001116 uint16_t length;
1117 uint32_t xid;
1118 uint16_t command;
1119 uint16_t flags;
1120 uint32_t meter_id;
1121 list(of_meter_band_t) meters;
1122};
1123
Rich Lane68ae4d72013-05-09 10:55:19 -07001124struct of_error_msg {
Rich Lanea06d0c32013-03-25 08:52:03 -07001125 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001126 uint8_t type == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -07001127 uint16_t length;
1128 uint32_t xid;
1129 uint16_t err_type;
1130 uint16_t code;
1131 of_octets_t data;
1132};
1133
Rich Lane68ae4d72013-05-09 10:55:19 -07001134//struct of_error_experimenter_msg {
Rich Lanea06d0c32013-03-25 08:52:03 -07001135// uint8_t version;
1136// uint8_t type;
1137// uint16_t length;
1138// uint32_t xid;
1139// uint16_t err_type;
1140// uint16_t subtype;
1141// uint32_t experimenter;
1142// of_octets_t data;
1143//};
1144
1145// STATS ENTRIES: flow, table, port, queue, group stats, group desc stats
1146
Rich Lane68ae4d72013-05-09 10:55:19 -07001147struct of_flow_stats_entry {
Rich Lanea06d0c32013-03-25 08:52:03 -07001148 uint16_t length;
1149 uint8_t table_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001150 pad(1);
Rich Lanea06d0c32013-03-25 08:52:03 -07001151 uint32_t duration_sec;
1152 uint32_t duration_nsec;
1153 uint16_t priority;
1154 uint16_t idle_timeout;
1155 uint16_t hard_timeout;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001156 pad(6);
Rich Lanea06d0c32013-03-25 08:52:03 -07001157 uint64_t cookie;
1158 uint64_t packet_count;
1159 uint64_t byte_count;
1160 of_match_t match;
1161 list(of_instruction_t) instructions;
1162};
1163
1164
Rich Lane68ae4d72013-05-09 10:55:19 -07001165struct of_table_stats_entry {
Rich Lanea06d0c32013-03-25 08:52:03 -07001166 uint8_t table_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001167 pad(3);
Rich Lanea06d0c32013-03-25 08:52:03 -07001168 uint32_t active_count;
1169 uint64_t lookup_count;
1170 uint64_t matched_count;
1171};
1172
Rich Lane68ae4d72013-05-09 10:55:19 -07001173struct of_port_stats_entry {
Rich Lanea06d0c32013-03-25 08:52:03 -07001174 of_port_no_t port_no;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001175 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001176 uint64_t rx_packets;
1177 uint64_t tx_packets;
1178 uint64_t rx_bytes;
1179 uint64_t tx_bytes;
1180 uint64_t rx_dropped;
1181 uint64_t tx_dropped;
1182 uint64_t rx_errors;
1183 uint64_t tx_errors;
1184 uint64_t rx_frame_err;
1185 uint64_t rx_over_err;
1186 uint64_t rx_crc_err;
1187 uint64_t collisions;
1188 uint32_t duration_sec;
1189 uint32_t duration_nsec;
1190};
1191
Rich Lane68ae4d72013-05-09 10:55:19 -07001192struct of_queue_stats_entry {
Rich Lanea06d0c32013-03-25 08:52:03 -07001193 of_port_no_t port_no;
1194 uint32_t queue_id;
1195 uint64_t tx_bytes;
1196 uint64_t tx_packets;
1197 uint64_t tx_errors;
1198 uint32_t duration_sec;
1199 uint32_t duration_nsec;
1200};
1201
Rich Lane68ae4d72013-05-09 10:55:19 -07001202struct of_bucket_counter {
Rich Lanea06d0c32013-03-25 08:52:03 -07001203 uint64_t packet_count;
1204 uint64_t byte_count;
1205};
1206
Rich Lane68ae4d72013-05-09 10:55:19 -07001207struct of_group_stats_entry {
Rich Lanea06d0c32013-03-25 08:52:03 -07001208 uint16_t length;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001209 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -07001210 uint32_t group_id;
1211 uint32_t ref_count;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001212 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001213 uint64_t packet_count;
1214 uint64_t byte_count;
1215 uint32_t duration_sec;
1216 uint32_t duration_nsec;
1217 list(of_bucket_counter_t) bucket_stats;
1218};
1219
Rich Lane68ae4d72013-05-09 10:55:19 -07001220struct of_group_desc_stats_entry {
Rich Lanea06d0c32013-03-25 08:52:03 -07001221 uint16_t length;
1222 uint8_t type;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001223 pad(1);
Rich Lanea06d0c32013-03-25 08:52:03 -07001224 uint32_t group_id;
1225 list(of_bucket_t) buckets;
1226};
1227
1228// STATS:
1229// Desc, flow, agg, table, port, queue, group, group_desc, group_feat, experi
1230
Rich Lane68ae4d72013-05-09 10:55:19 -07001231struct of_desc_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001232 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001233 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001234 uint16_t length;
1235 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001236 uint16_t stats_type == 0;
Rich Lanea06d0c32013-03-25 08:52:03 -07001237 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001238 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001239};
1240
Rich Lane68ae4d72013-05-09 10:55:19 -07001241struct of_desc_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001242 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001243 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001244 uint16_t length;
1245 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001246 uint16_t stats_type == 0;
Rich Lanea06d0c32013-03-25 08:52:03 -07001247 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001248 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001249 of_desc_str_t mfr_desc;
1250 of_desc_str_t hw_desc;
1251 of_desc_str_t sw_desc;
1252 of_serial_num_t serial_num;
1253 of_desc_str_t dp_desc;
1254};
1255
Rich Lane68ae4d72013-05-09 10:55:19 -07001256struct of_flow_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001257 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001258 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001259 uint16_t length;
1260 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001261 uint16_t stats_type == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -07001262 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001263 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001264 uint8_t table_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001265 pad(3);
Rich Lanea06d0c32013-03-25 08:52:03 -07001266 of_port_no_t out_port;
1267 uint32_t out_group;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001268 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001269 uint64_t cookie;
1270 uint64_t cookie_mask;
1271 of_match_t match;
1272};
1273
Rich Lane68ae4d72013-05-09 10:55:19 -07001274struct of_flow_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001275 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001276 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001277 uint16_t length;
1278 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001279 uint16_t stats_type == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -07001280 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001281 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001282 list(of_flow_stats_entry_t) entries;
1283};
1284
Rich Lane68ae4d72013-05-09 10:55:19 -07001285struct of_aggregate_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001286 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001287 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001288 uint16_t length;
1289 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001290 uint16_t stats_type == 2;
Rich Lanea06d0c32013-03-25 08:52:03 -07001291 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001292 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001293 uint8_t table_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001294 pad(3);
Rich Lanea06d0c32013-03-25 08:52:03 -07001295 of_port_no_t out_port;
1296 uint32_t out_group;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001297 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001298 uint64_t cookie;
1299 uint64_t cookie_mask;
1300 of_match_t match;
1301};
1302
Rich Lane68ae4d72013-05-09 10:55:19 -07001303struct of_aggregate_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001304 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001305 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001306 uint16_t length;
1307 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001308 uint16_t stats_type == 2;
Rich Lanea06d0c32013-03-25 08:52:03 -07001309 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001310 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001311 uint64_t packet_count;
1312 uint64_t byte_count;
1313 uint32_t flow_count;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001314 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001315};
1316
Rich Lane68ae4d72013-05-09 10:55:19 -07001317struct of_table_stats_request {
Rich Lane8bfdafc2013-05-02 14:54:42 -07001318 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001319 uint8_t type == 18;
Rich Lane8bfdafc2013-05-02 14:54:42 -07001320 uint16_t length;
1321 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001322 uint16_t stats_type == 3;
Rich Lane8bfdafc2013-05-02 14:54:42 -07001323 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001324 pad(4);
Rich Lane8bfdafc2013-05-02 14:54:42 -07001325};
1326
Rich Lane68ae4d72013-05-09 10:55:19 -07001327struct of_table_stats_reply {
Rich Lane8bfdafc2013-05-02 14:54:42 -07001328 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001329 uint8_t type == 19;
Rich Lane8bfdafc2013-05-02 14:54:42 -07001330 uint16_t length;
1331 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001332 uint16_t stats_type == 3;
Rich Lane8bfdafc2013-05-02 14:54:42 -07001333 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001334 pad(4);
Rich Lane8bfdafc2013-05-02 14:54:42 -07001335 list(of_table_stats_entry_t) entries;
1336};
1337
Rich Lanea06d0c32013-03-25 08:52:03 -07001338// FIXME: These are padded to 8 byte align beyond the length indicated
1339
Rich Lane68ae4d72013-05-09 10:55:19 -07001340struct of_table_feature_prop {
Rich Lanea06d0c32013-03-25 08:52:03 -07001341 uint16_t type;
1342 uint16_t length;
1343};
1344
Rich Lane68ae4d72013-05-09 10:55:19 -07001345struct of_table_feature_prop_instructions {
Rich Lane31b87142013-05-09 22:05:42 -07001346 uint16_t type == 0;
Rich Lanea06d0c32013-03-25 08:52:03 -07001347 uint16_t length;
1348 // FIXME Check if instruction_t is right for ids here
1349 list(of_instruction_t) instruction_ids;
1350};
1351
Rich Lane68ae4d72013-05-09 10:55:19 -07001352struct of_table_feature_prop_instructions_miss {
Rich Lane31b87142013-05-09 22:05:42 -07001353 uint16_t type == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -07001354 uint16_t length;
1355 list(of_instruction_t) instruction_ids;
1356};
1357
Rich Lane68ae4d72013-05-09 10:55:19 -07001358struct of_table_feature_prop_next_tables {
Rich Lane31b87142013-05-09 22:05:42 -07001359 uint16_t type == 2;
Rich Lanea06d0c32013-03-25 08:52:03 -07001360 uint16_t length;
1361 list(of_uint8_t) next_table_ids;
1362};
1363
Rich Lane68ae4d72013-05-09 10:55:19 -07001364struct of_table_feature_prop_next_tables_miss {
Rich Lane31b87142013-05-09 22:05:42 -07001365 uint16_t type == 3;
Rich Lanea06d0c32013-03-25 08:52:03 -07001366 uint16_t length;
1367 list(of_uint8_t) next_table_ids;
1368};
1369
Rich Lane68ae4d72013-05-09 10:55:19 -07001370struct of_table_feature_prop_write_actions {
Rich Lane31b87142013-05-09 22:05:42 -07001371 uint16_t type == 4;
Rich Lanea06d0c32013-03-25 08:52:03 -07001372 uint16_t length;
1373 list(of_action_id_t) action_ids;
1374};
1375
Rich Lane68ae4d72013-05-09 10:55:19 -07001376struct of_table_feature_prop_write_actions_miss {
Rich Lane31b87142013-05-09 22:05:42 -07001377 uint16_t type == 5;
Rich Lanea06d0c32013-03-25 08:52:03 -07001378 uint16_t length;
1379 list(of_action_id_t) action_ids;
1380};
1381
Rich Lane68ae4d72013-05-09 10:55:19 -07001382struct of_table_feature_prop_apply_actions {
Rich Lane31b87142013-05-09 22:05:42 -07001383 uint16_t type == 6;
Rich Lanea06d0c32013-03-25 08:52:03 -07001384 uint16_t length;
1385 list(of_action_id_t) action_ids;
1386};
1387
Rich Lane68ae4d72013-05-09 10:55:19 -07001388struct of_table_feature_prop_apply_actions_miss {
Rich Lane31b87142013-05-09 22:05:42 -07001389 uint16_t type == 7;
Rich Lanea06d0c32013-03-25 08:52:03 -07001390 uint16_t length;
1391 list(of_action_id_t) action_ids;
1392};
1393
Rich Lane68ae4d72013-05-09 10:55:19 -07001394struct of_table_feature_prop_match {
Rich Lane31b87142013-05-09 22:05:42 -07001395 uint16_t type == 8;
Rich Lanea06d0c32013-03-25 08:52:03 -07001396 uint16_t length;
1397 list(of_uint32_t) oxm_ids;
1398};
1399
Rich Lane68ae4d72013-05-09 10:55:19 -07001400struct of_table_feature_prop_wildcards {
Rich Lane31b87142013-05-09 22:05:42 -07001401 uint16_t type == 10;
Rich Lanea06d0c32013-03-25 08:52:03 -07001402 uint16_t length;
1403 list(of_uint32_t) oxm_ids;
1404};
1405
Rich Lane68ae4d72013-05-09 10:55:19 -07001406struct of_table_feature_prop_write_setfield {
Rich Lane31b87142013-05-09 22:05:42 -07001407 uint16_t type == 12;
Rich Lanea06d0c32013-03-25 08:52:03 -07001408 uint16_t length;
1409 list(of_uint32_t) oxm_ids;
1410};
1411
Rich Lane68ae4d72013-05-09 10:55:19 -07001412struct of_table_feature_prop_write_setfield_miss {
Rich Lane31b87142013-05-09 22:05:42 -07001413 uint16_t type == 13;
Rich Lanea06d0c32013-03-25 08:52:03 -07001414 uint16_t length;
1415 list(of_uint32_t) oxm_ids;
1416};
1417
Rich Lane68ae4d72013-05-09 10:55:19 -07001418struct of_table_feature_prop_apply_setfield {
Rich Lane31b87142013-05-09 22:05:42 -07001419 uint16_t type == 14;
Rich Lanea06d0c32013-03-25 08:52:03 -07001420 uint16_t length;
1421 list(of_uint32_t) oxm_ids;
1422};
1423
Rich Lane68ae4d72013-05-09 10:55:19 -07001424struct of_table_feature_prop_apply_setfield_miss {
Rich Lane31b87142013-05-09 22:05:42 -07001425 uint16_t type == 15;
Rich Lanea06d0c32013-03-25 08:52:03 -07001426 uint16_t length;
1427 list(of_uint32_t) oxm_ids;
1428};
1429
Rich Lane68ae4d72013-05-09 10:55:19 -07001430struct of_table_feature_prop_experimenter {
Rich Lane31b87142013-05-09 22:05:42 -07001431 uint16_t type == 65535;
Rich Lanea06d0c32013-03-25 08:52:03 -07001432 uint16_t length;
1433 uint32_t experimenter;
1434 uint32_t subtype;
1435 of_octets_t experimenter_data;
1436};
1437
1438// Not yet supported
Rich Lane68ae4d72013-05-09 10:55:19 -07001439// struct of_table_feature_prop_experimenter_miss {
Rich Lanea06d0c32013-03-25 08:52:03 -07001440// uint16_t type;
1441// uint16_t length;
1442// uint32_t experimenter;
1443// uint32_t subtype;
1444// of_octets_t experimenter_data;
1445// };
1446
Rich Lane68ae4d72013-05-09 10:55:19 -07001447struct of_table_features {
Rich Lanea06d0c32013-03-25 08:52:03 -07001448 uint16_t length;
1449 uint8_t table_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001450 pad(5);
Rich Lanea06d0c32013-03-25 08:52:03 -07001451 of_table_name_t name;
1452 uint64_t metadata_match;
1453 uint64_t metadata_write;
1454 uint32_t config;
1455 uint32_t max_entries;
1456 list(of_table_feature_prop_t) properties;
1457};
1458
Rich Lane68ae4d72013-05-09 10:55:19 -07001459struct of_meter_features {
Rich Lanea06d0c32013-03-25 08:52:03 -07001460 uint32_t max_meter;
1461 uint32_t band_types;
1462 uint32_t capabilities;
1463 uint8_t max_bands;
1464 uint8_t max_color;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001465 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -07001466};
1467
Rich Lane68ae4d72013-05-09 10:55:19 -07001468struct of_port_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001469 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001470 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001471 uint16_t length;
1472 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001473 uint16_t stats_type == 4;
Rich Lanea06d0c32013-03-25 08:52:03 -07001474 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001475 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001476 of_port_no_t port_no;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001477 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001478};
1479
Rich Lane68ae4d72013-05-09 10:55:19 -07001480struct of_port_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001481 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001482 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001483 uint16_t length;
1484 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001485 uint16_t stats_type == 4;
Rich Lanea06d0c32013-03-25 08:52:03 -07001486 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001487 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001488 list(of_port_stats_entry_t) entries;
1489};
1490
Rich Lane68ae4d72013-05-09 10:55:19 -07001491struct of_queue_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001492 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001493 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001494 uint16_t length;
1495 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001496 uint16_t stats_type == 5;
Rich Lanea06d0c32013-03-25 08:52:03 -07001497 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001498 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001499 of_port_no_t port_no;
1500 uint32_t queue_id;
1501};
1502
Rich Lane68ae4d72013-05-09 10:55:19 -07001503struct of_queue_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001504 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001505 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001506 uint16_t length;
1507 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001508 uint16_t stats_type == 5;
Rich Lanea06d0c32013-03-25 08:52:03 -07001509 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001510 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001511 list(of_queue_stats_entry_t) entries;
1512};
1513
Rich Lane68ae4d72013-05-09 10:55:19 -07001514struct of_group_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001515 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001516 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001517 uint16_t length;
1518 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001519 uint16_t stats_type == 6;
Rich Lanea06d0c32013-03-25 08:52:03 -07001520 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001521 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001522 uint32_t group_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001523 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001524};
1525
Rich Lane68ae4d72013-05-09 10:55:19 -07001526struct of_group_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001527 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001528 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001529 uint16_t length;
1530 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001531 uint16_t stats_type == 6;
Rich Lanea06d0c32013-03-25 08:52:03 -07001532 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001533 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001534 list(of_group_stats_entry_t) entries;
1535};
1536
Rich Lane68ae4d72013-05-09 10:55:19 -07001537struct of_group_desc_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001538 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001539 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001540 uint16_t length;
1541 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001542 uint16_t stats_type == 7;
Rich Lanea06d0c32013-03-25 08:52:03 -07001543 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001544 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001545};
1546
Rich Lane68ae4d72013-05-09 10:55:19 -07001547struct of_group_desc_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001548 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001549 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001550 uint16_t length;
1551 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001552 uint16_t stats_type == 7;
Rich Lanea06d0c32013-03-25 08:52:03 -07001553 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001554 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001555 list(of_group_desc_stats_entry_t) entries;
1556};
1557
Rich Lane68ae4d72013-05-09 10:55:19 -07001558struct of_group_features_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001559 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001560 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001561 uint16_t length;
1562 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001563 uint16_t stats_type == 8;
Rich Lanea06d0c32013-03-25 08:52:03 -07001564 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001565 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001566};
1567
Rich Lane68ae4d72013-05-09 10:55:19 -07001568struct of_group_features_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001569 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001570 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001571 uint16_t length;
1572 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001573 uint16_t stats_type == 8;
Rich Lanea06d0c32013-03-25 08:52:03 -07001574 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001575 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001576 uint32_t types;
1577 uint32_t capabilities;
1578 uint32_t max_groups_all;
1579 uint32_t max_groups_select;
1580 uint32_t max_groups_indirect;
1581 uint32_t max_groups_ff;
1582 uint32_t actions_all;
1583 uint32_t actions_select;
1584 uint32_t actions_indirect;
1585 uint32_t actions_ff;
1586};
1587
Rich Lane68ae4d72013-05-09 10:55:19 -07001588struct of_meter_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001589 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001590 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001591 uint16_t length;
1592 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001593 uint16_t stats_type == 9;
Rich Lanea06d0c32013-03-25 08:52:03 -07001594 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001595 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001596 uint32_t meter_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001597 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001598};
1599
Rich Lane68ae4d72013-05-09 10:55:19 -07001600struct of_meter_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001601 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001602 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001603 uint16_t length;
1604 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001605 uint16_t stats_type == 9;
Rich Lanea06d0c32013-03-25 08:52:03 -07001606 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001607 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001608 list(of_meter_stats_t) entries;
1609};
1610
Rich Lane68ae4d72013-05-09 10:55:19 -07001611struct of_meter_config_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001612 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001613 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001614 uint16_t length;
1615 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001616 uint16_t stats_type == 10;
Rich Lanea06d0c32013-03-25 08:52:03 -07001617 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001618 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001619 uint32_t meter_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001620 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001621};
1622
Rich Lane68ae4d72013-05-09 10:55:19 -07001623struct of_meter_config_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001624 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001625 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001626 uint16_t length;
1627 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001628 uint16_t stats_type == 10;
Rich Lanea06d0c32013-03-25 08:52:03 -07001629 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001630 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001631 list(of_meter_band_t) entries;
1632};
1633
1634// FIXME stats added to get things working
Rich Lane68ae4d72013-05-09 10:55:19 -07001635struct of_meter_features_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001636 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001637 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001638 uint16_t length;
1639 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001640 uint16_t stats_type == 11;
Rich Lanea06d0c32013-03-25 08:52:03 -07001641 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001642 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001643};
1644
1645// FIXME stats added to get things working
Rich Lane68ae4d72013-05-09 10:55:19 -07001646struct of_meter_features_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001647 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001648 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001649 uint16_t length;
1650 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001651 uint16_t stats_type == 11;
Rich Lanea06d0c32013-03-25 08:52:03 -07001652 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001653 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001654 of_meter_features_t features;
1655};
1656
1657// FIXME stats added to get things working
Rich Lane68ae4d72013-05-09 10:55:19 -07001658struct of_table_features_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001659 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001660 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001661 uint16_t length;
1662 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001663 uint16_t stats_type == 12;
Rich Lanea06d0c32013-03-25 08:52:03 -07001664 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001665 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001666 list(of_table_features_t) entries;
1667};
1668
1669// FIXME stats added to get things working
Rich Lane68ae4d72013-05-09 10:55:19 -07001670struct of_table_features_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001671 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001672 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001673 uint16_t length;
1674 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001675 uint16_t stats_type == 12;
Rich Lanea06d0c32013-03-25 08:52:03 -07001676 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001677 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001678 list(of_table_features_t) entries;
1679};
1680
1681// FIXME stats added to get things working
Rich Lane68ae4d72013-05-09 10:55:19 -07001682struct of_port_desc_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001683 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001684 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001685 uint16_t length;
1686 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001687 uint16_t stats_type == 13;
Rich Lanea06d0c32013-03-25 08:52:03 -07001688 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001689 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001690};
1691
1692// FIXME stats added to get things working
Rich Lane68ae4d72013-05-09 10:55:19 -07001693struct of_port_desc_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001694 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001695 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001696 uint16_t length;
1697 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001698 uint16_t stats_type == 13;
Rich Lanea06d0c32013-03-25 08:52:03 -07001699 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001700 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001701 list(of_port_desc_t) entries;
1702};
1703
Rich Lane68ae4d72013-05-09 10:55:19 -07001704struct of_meter_band_stats {
Rich Lanea06d0c32013-03-25 08:52:03 -07001705 uint64_t packet_band_count;
1706 uint64_t byte_band_count;
1707};
1708
Rich Lane68ae4d72013-05-09 10:55:19 -07001709struct of_meter_stats {
Rich Lanea06d0c32013-03-25 08:52:03 -07001710 uint32_t meter_id;
1711 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001712 pad(6);
Rich Lanea06d0c32013-03-25 08:52:03 -07001713 uint32_t flow_count;
1714 uint64_t packet_in_count;
1715 uint64_t byte_in_count;
1716 uint32_t duration_sec;
1717 uint32_t duration_nsec;
1718 list(of_meter_band_stats_t) band_stats;
1719};
1720
Rich Lane68ae4d72013-05-09 10:55:19 -07001721struct of_meter_config {
Rich Lanea06d0c32013-03-25 08:52:03 -07001722 uint16_t length;
1723 uint16_t flags;
1724 uint32_t meter_id;
1725 list(of_meter_band_t) entries;
1726};
1727
Rich Lane68ae4d72013-05-09 10:55:19 -07001728struct of_experimenter_multipart_header {
Rich Lanea06d0c32013-03-25 08:52:03 -07001729 uint32_t experimenter;
1730 uint32_t subtype;
1731};
1732
1733// END OF STATS OBJECTS
1734
Rich Lane68ae4d72013-05-09 10:55:19 -07001735struct of_queue_prop {
Rich Lanea06d0c32013-03-25 08:52:03 -07001736 uint16_t type;
1737 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001738 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001739};
1740
Rich Lane68ae4d72013-05-09 10:55:19 -07001741struct of_queue_prop_min_rate {
Rich Lane31b87142013-05-09 22:05:42 -07001742 uint16_t type == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -07001743 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001744 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001745 uint16_t rate;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001746 pad(6);
Rich Lanea06d0c32013-03-25 08:52:03 -07001747};
1748
Rich Lane68ae4d72013-05-09 10:55:19 -07001749struct of_queue_prop_max_rate {
Rich Lane31b87142013-05-09 22:05:42 -07001750 uint16_t type == 2;
Rich Lanea06d0c32013-03-25 08:52:03 -07001751 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001752 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001753 uint16_t rate;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001754 pad(6);
Rich Lanea06d0c32013-03-25 08:52:03 -07001755};
1756
Rich Lane68ae4d72013-05-09 10:55:19 -07001757struct of_queue_prop_experimenter {
Rich Lane31b87142013-05-09 22:05:42 -07001758 uint16_t type == 65535;
Rich Lanea06d0c32013-03-25 08:52:03 -07001759 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001760 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001761 uint32_t experimenter;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001762 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001763 of_octets_t data;
1764};
1765
Rich Lane68ae4d72013-05-09 10:55:19 -07001766struct of_packet_queue {
Rich Lanea06d0c32013-03-25 08:52:03 -07001767 uint32_t queue_id;
1768 of_port_no_t port;
1769 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001770 pad(6);
Rich Lanea06d0c32013-03-25 08:52:03 -07001771 list(of_queue_prop_t) properties;
1772};
1773
Rich Lane68ae4d72013-05-09 10:55:19 -07001774struct of_queue_get_config_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001775 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001776 uint8_t type == 22;
Rich Lanea06d0c32013-03-25 08:52:03 -07001777 uint16_t length;
1778 uint32_t xid;
1779 of_port_no_t port;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001780 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001781};
1782
Rich Lane68ae4d72013-05-09 10:55:19 -07001783struct of_queue_get_config_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001784 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001785 uint8_t type == 23;
Rich Lanea06d0c32013-03-25 08:52:03 -07001786 uint16_t length;
1787 uint32_t xid;
1788 of_port_no_t port;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001789 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001790 list(of_packet_queue_t) queues;
1791};
1792
Rich Lane68ae4d72013-05-09 10:55:19 -07001793struct of_role_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001794 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001795 uint8_t type == 24;
Rich Lanea06d0c32013-03-25 08:52:03 -07001796 uint16_t length;
1797 uint32_t xid;
1798 uint32_t role;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001799 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001800 uint64_t generation_id;
1801};
1802
Rich Lane68ae4d72013-05-09 10:55:19 -07001803struct of_role_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001804 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001805 uint8_t type == 25;
Rich Lanea06d0c32013-03-25 08:52:03 -07001806 uint16_t length;
1807 uint32_t xid;
1808 of_octets_t data;
1809};
1810
1811////////////////////////////////////////////////////////////////
1812// FIXME understand async; where do bitmasks live?
1813// Determine bitmap type for masks below.
1814// DOCUMENT masks where uint32_t[0] is interest for equal/master
1815// while uint32_t[1] is interest for slave
1816////////////////////////////////////////////////////////////////
1817
Rich Lane68ae4d72013-05-09 10:55:19 -07001818struct of_async_get_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001819 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001820 uint8_t type == 26;
Rich Lanea06d0c32013-03-25 08:52:03 -07001821 uint16_t length;
1822 uint32_t xid;
1823 uint32_t packet_in_mask_equal_master;
1824 uint32_t packet_in_mask_slave;
1825 uint32_t port_status_mask_equal_master;
1826 uint32_t port_status_mask_slave;
1827 uint32_t flow_removed_mask_equal_master;
1828 uint32_t flow_removed_mask_slave;
1829};
1830
Rich Lane68ae4d72013-05-09 10:55:19 -07001831struct of_async_get_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001832 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001833 uint8_t type == 27;
Rich Lanea06d0c32013-03-25 08:52:03 -07001834 uint16_t length;
1835 uint32_t xid;
1836 uint32_t packet_in_mask_equal_master;
1837 uint32_t packet_in_mask_slave;
1838 uint32_t port_status_mask_equal_master;
1839 uint32_t port_status_mask_slave;
1840 uint32_t flow_removed_mask_equal_master;
1841 uint32_t flow_removed_mask_slave;
1842};
1843
Rich Lane68ae4d72013-05-09 10:55:19 -07001844struct of_async_set {
Rich Lanea06d0c32013-03-25 08:52:03 -07001845 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001846 uint8_t type == 28;
Rich Lanea06d0c32013-03-25 08:52:03 -07001847 uint16_t length;
1848 uint32_t xid;
1849 uint32_t packet_in_mask_equal_master;
1850 uint32_t packet_in_mask_slave;
1851 uint32_t port_status_mask_equal_master;
1852 uint32_t port_status_mask_slave;
1853 uint32_t flow_removed_mask_equal_master;
1854 uint32_t flow_removed_mask_slave;
1855};