blob: 50bb0428a47f2a88faf25d09d5e8c6143515899a [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 3
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
58 OFPQ_MIN_RATE_UNCFG = 0xffff,
59 OFPQ_MAX_RATE_UNCFG = 0xffff,
60};
61
62enum ofp_port {
63 OFPP_MAX = 0xffffff00,
64 OFPP_IN_PORT = 0xfffffff8,
65 OFPP_TABLE = 0xfffffff9,
66 OFPP_NORMAL = 0xfffffffa,
67 OFPP_FLOOD = 0xfffffffb,
68 OFPP_ALL = 0xfffffffc,
69 OFPP_CONTROLLER = 0xfffffffd,
70 OFPP_LOCAL = 0xfffffffe,
71};
72
73enum ofp_port_no {
74 OFPP_ANY = 0xffffffff,
75};
76
77enum ofp_type {
78 OFPT_HELLO = 0,
79 OFPT_ERROR = 1,
80 OFPT_ECHO_REQUEST = 2,
81 OFPT_ECHO_REPLY = 3,
82 OFPT_EXPERIMENTER = 4,
83 OFPT_FEATURES_REQUEST = 5,
84 OFPT_FEATURES_REPLY = 6,
85 OFPT_GET_CONFIG_REQUEST = 7,
86 OFPT_GET_CONFIG_REPLY = 8,
87 OFPT_SET_CONFIG = 9,
88 OFPT_PACKET_IN = 10,
89 OFPT_FLOW_REMOVED = 11,
90 OFPT_PORT_STATUS = 12,
91 OFPT_PACKET_OUT = 13,
92 OFPT_FLOW_MOD = 14,
93 OFPT_GROUP_MOD = 15,
94 OFPT_PORT_MOD = 16,
95 OFPT_TABLE_MOD = 17,
96 OFPT_STATS_REQUEST = 18,
97 OFPT_STATS_REPLY = 19,
98 OFPT_BARRIER_REQUEST = 20,
99 OFPT_BARRIER_REPLY = 21,
100 OFPT_QUEUE_GET_CONFIG_REQUEST = 22,
101 OFPT_QUEUE_GET_CONFIG_REPLY = 23,
102 OFPT_ROLE_REQUEST = 24,
103 OFPT_ROLE_REPLY = 25,
104};
105
106enum ofp_config_flags {
107 OFPC_FRAG_NORMAL = 0,
108 OFPC_FRAG_DROP = 1,
109 OFPC_FRAG_REASM = 2,
110 OFPC_FRAG_MASK = 3,
111 OFPC_INVALID_TTL_TO_CONTROLLER = 4,
112};
113
114enum ofp_table_config {
115 OFPTC_TABLE_MISS_CONTROLLER = 0,
116 OFPTC_TABLE_MISS_CONTINUE = 1,
117 OFPTC_TABLE_MISS_DROP = 2,
118 OFPTC_TABLE_MISS_MASK = 3,
119};
120
121enum ofp_table {
122 OFPTT_MAX = 0xfe,
123 OFPTT_ALL = 0xff,
124};
125
126enum ofp_capabilities {
127 OFPC_FLOW_STATS = 0x1,
128 OFPC_TABLE_STATS = 0x2,
129 OFPC_PORT_STATS = 0x4,
130 OFPC_GROUP_STATS = 0x8,
131 OFPC_IP_REASM = 0x20,
132 OFPC_QUEUE_STATS = 0x40,
133 OFPC_PORT_BLOCKED = 0x100,
134};
135
136enum ofp_port_config {
137 OFPPC_PORT_DOWN = 0x1,
138 OFPPC_NO_RECV = 0x4,
139 OFPPC_NO_FWD = 0x20,
140 OFPPC_NO_PACKET_IN = 0x40,
141};
142
143enum ofp_port_state {
144 OFPPS_LINK_DOWN = 0x1,
145 OFPPS_BLOCKED = 0x2,
146 OFPPS_LIVE = 0x4,
147};
148
149enum ofp_port_features {
150 OFPPF_10MB_HD = 0x1,
151 OFPPF_10MB_FD = 0x2,
152 OFPPF_100MB_HD = 0x4,
153 OFPPF_100MB_FD = 0x8,
154 OFPPF_1GB_HD = 0x10,
155 OFPPF_1GB_FD = 0x20,
156 OFPPF_10GB_FD = 0x40,
157 OFPPF_40GB_FD = 0x80,
158 OFPPF_100GB_FD = 0x100,
159 OFPPF_1TB_FD = 0x200,
160 OFPPF_OTHER = 0x400,
161 OFPPF_COPPER = 0x800,
162 OFPPF_FIBER = 0x1000,
163 OFPPF_AUTONEG = 0x2000,
164 OFPPF_PAUSE = 0x4000,
165 OFPPF_PAUSE_ASYM = 0x8000,
166};
167
168enum ofp_port_reason {
169 OFPPR_ADD = 0,
170 OFPPR_DELETE = 1,
171 OFPPR_MODIFY = 2,
172};
173
174enum ofp_match_type {
175 OFPMT_STANDARD = 0,
176 OFPMT_OXM = 1,
177};
178
179enum ofp_oxm_class {
180 OFPXMC_NXM_0 = 0,
181 OFPXMC_NXM_1 = 1,
182 OFPXMC_OPENFLOW_BASIC = 0x8000,
183 OFPXMC_EXPERIMENTER = 0xffff,
184};
185
186enum ofp_vlan_id {
187 OFPVID_NONE = 0,
188 OFPVID_PRESENT = 0x1000,
189};
190
191enum ofp_action_type {
192 OFPAT_OUTPUT = 0,
193 OFPAT_COPY_TTL_OUT = 0xb,
194 OFPAT_COPY_TTL_IN = 0xc,
195 OFPAT_SET_MPLS_TTL = 0xf,
196 OFPAT_DEC_MPLS_TTL = 0x10,
197 OFPAT_PUSH_VLAN = 0x11,
198 OFPAT_POP_VLAN = 0x12,
199 OFPAT_PUSH_MPLS = 0x13,
200 OFPAT_POP_MPLS = 0x14,
201 OFPAT_SET_QUEUE = 0x15,
202 OFPAT_GROUP = 0x16,
203 OFPAT_SET_NW_TTL = 0x17,
204 OFPAT_DEC_NW_TTL = 0x18,
205 OFPAT_SET_FIELD = 0x19,
206 OFPAT_EXPERIMENTER = 0xffff,
207};
208
209enum ofp_controller_max_len {
210 OFPCML_MAX = 0xffe5,
211 OFPCML_NO_BUFFER = 0xffff,
212};
213
214enum ofp_instruction_type {
215 OFPIT_GOTO_TABLE = 0x1,
216 OFPIT_WRITE_METADATA = 0x2,
217 OFPIT_WRITE_ACTIONS = 0x3,
218 OFPIT_APPLY_ACTIONS = 0x4,
219 OFPIT_CLEAR_ACTIONS = 0x5,
220 OFPIT_EXPERIMENTER = 0xffff,
221};
222
223enum ofp_flow_mod_command {
224 OFPFC_ADD = 0,
225 OFPFC_MODIFY = 1,
226 OFPFC_MODIFY_STRICT = 2,
227 OFPFC_DELETE = 3,
228 OFPFC_DELETE_STRICT = 4,
229};
230
231enum ofp_flow_mod_flags {
232 OFPFF_SEND_FLOW_REM = 0x1,
233 OFPFF_CHECK_OVERLAP = 0x2,
234 OFPFF_RESET_COUNTS = 0x4,
235};
236
237enum ofp_group {
238 OFPG_MAX = 0xffffff00,
239 OFPG_ALL = 0xfffffffc,
240 OFPG_ANY = 0xffffffff,
241};
242
243enum ofp_group_mod_command {
244 OFPGC_ADD = 0,
245 OFPGC_MODIFY = 1,
246 OFPGC_DELETE = 2,
247};
248
249enum ofp_group_type {
250 OFPGT_ALL = 0,
251 OFPGT_SELECT = 1,
252 OFPGT_INDIRECT = 2,
253 OFPGT_FF = 3,
254};
255
256enum ofp_packet_in_reason {
257 OFPR_NO_MATCH = 0,
258 OFPR_ACTION = 1,
259 OFPR_INVALID_TTL = 2,
260};
261
262enum ofp_flow_removed_reason {
263 OFPRR_IDLE_TIMEOUT = 0,
264 OFPRR_HARD_TIMEOUT = 1,
265 OFPRR_DELETE = 2,
266 OFPRR_GROUP_DELETE = 3,
267};
268
269enum ofp_error_type {
270 OFPET_HELLO_FAILED = 0,
271 OFPET_BAD_REQUEST = 1,
272 OFPET_BAD_ACTION = 2,
273 OFPET_BAD_INSTRUCTION = 3,
274 OFPET_BAD_MATCH = 4,
275 OFPET_FLOW_MOD_FAILED = 5,
276 OFPET_GROUP_MOD_FAILED = 6,
277 OFPET_PORT_MOD_FAILED = 7,
278 OFPET_TABLE_MOD_FAILED = 8,
279 OFPET_QUEUE_OP_FAILED = 9,
280 OFPET_SWITCH_CONFIG_FAILED = 10,
281 OFPET_ROLE_REQUEST_FAILED = 11,
282 OFPET_EXPERIMENTER = 0xffff,
283};
284
285enum ofp_hello_failed_code {
286 OFPHFC_INCOMPATIBLE = 0,
287 OFPHFC_EPERM = 1,
288};
289
290enum ofp_bad_request_code {
291 OFPBRC_BAD_VERSION = 0,
292 OFPBRC_BAD_TYPE = 1,
293 OFPBRC_BAD_STAT = 2,
294 OFPBRC_BAD_EXPERIMENTER = 3,
295 OFPBRC_BAD_EXP_TYPE = 4,
296 OFPBRC_EPERM = 5,
297 OFPBRC_BAD_LEN = 6,
298 OFPBRC_BUFFER_EMPTY = 7,
299 OFPBRC_BUFFER_UNKNOWN = 8,
300 OFPBRC_BAD_TABLE_ID = 9,
301 OFPBRC_IS_SLAVE = 10,
302 OFPBRC_BAD_PORT = 11,
303 OFPBRC_BAD_PACKET = 12,
304};
305
306enum ofp_bad_action_code {
307 OFPBAC_BAD_TYPE = 0,
308 OFPBAC_BAD_LEN = 1,
309 OFPBAC_BAD_EXPERIMENTER = 2,
310 OFPBAC_BAD_EXP_TYPE = 3,
311 OFPBAC_BAD_OUT_PORT = 4,
312 OFPBAC_BAD_ARGUMENT = 5,
313 OFPBAC_EPERM = 6,
314 OFPBAC_TOO_MANY = 7,
315 OFPBAC_BAD_QUEUE = 8,
316 OFPBAC_BAD_OUT_GROUP = 9,
317 OFPBAC_MATCH_INCONSISTENT = 10,
318 OFPBAC_UNSUPPORTED_ORDER = 11,
319 OFPBAC_BAD_TAG = 12,
320 OFPBAC_BAD_SET_TYPE = 13,
321 OFPBAC_BAD_SET_LEN = 14,
322 OFPBAC_BAD_SET_ARGUMENT = 15,
323};
324
325enum ofp_bad_instruction_code {
326 OFPBIC_UNKNOWN_INST = 0,
327 OFPBIC_UNSUP_INST = 1,
328 OFPBIC_BAD_TABLE_ID = 2,
329 OFPBIC_UNSUP_METADATA = 3,
330 OFPBIC_UNSUP_METADATA_MASK = 4,
331 OFPBIC_BAD_EXPERIMENTER = 5,
332 OFPBIC_BAD_EXP_TYPE = 6,
333 OFPBIC_BAD_LEN = 7,
334 OFPBIC_EPERM = 8,
335};
336
337enum ofp_bad_match_code {
338 OFPBMC_BAD_TYPE = 0,
339 OFPBMC_BAD_LEN = 1,
340 OFPBMC_BAD_TAG = 2,
341 OFPBMC_BAD_DL_ADDR_MASK = 3,
342 OFPBMC_BAD_NW_ADDR_MASK = 4,
343 OFPBMC_BAD_WILDCARDS = 5,
344 OFPBMC_BAD_FIELD = 6,
345 OFPBMC_BAD_VALUE = 7,
346 OFPBMC_BAD_MASK = 8,
347 OFPBMC_BAD_PREREQ = 9,
348 OFPBMC_DUP_FIELD = 10,
349 OFPBMC_EPERM = 11,
350};
351
352enum ofp_flow_mod_failed_code {
353 OFPFMFC_UNKNOWN = 0,
354 OFPFMFC_TABLE_FULL = 1,
355 OFPFMFC_BAD_TABLE_ID = 2,
356 OFPFMFC_OVERLAP = 3,
357 OFPFMFC_EPERM = 4,
358 OFPFMFC_BAD_TIMEOUT = 5,
359 OFPFMFC_BAD_COMMAND = 6,
360 OFPFMFC_BAD_FLAGS = 7,
361};
362
363enum ofp_group_mod_failed_code {
364 OFPGMFC_GROUP_EXISTS = 0,
365 OFPGMFC_INVALID_GROUP = 1,
366 OFPGMFC_WEIGHT_UNSUPPORTED = 2,
367 OFPGMFC_OUT_OF_GROUPS = 3,
368 OFPGMFC_OUT_OF_BUCKETS = 4,
369 OFPGMFC_CHAINING_UNSUPPORTED = 5,
370 OFPGMFC_WATCH_UNSUPPORTED = 6,
371 OFPGMFC_LOOP = 7,
372 OFPGMFC_UNKNOWN_GROUP = 8,
373 OFPGMFC_CHAINED_GROUP = 9,
374 OFPGMFC_BAD_TYPE = 10,
375 OFPGMFC_BAD_COMMAND = 11,
376 OFPGMFC_BAD_BUCKET = 12,
377 OFPGMFC_BAD_WATCH = 13,
378 OFPGMFC_EPERM = 14,
379};
380
381enum ofp_port_mod_failed_code {
382 OFPPMFC_BAD_PORT = 0,
383 OFPPMFC_BAD_HW_ADDR = 1,
384 OFPPMFC_BAD_CONFIG = 2,
385 OFPPMFC_BAD_ADVERTISE = 3,
386 OFPPMFC_EPERM = 4,
387};
388
389enum ofp_table_mod_failed_code {
390 OFPTMFC_BAD_TABLE = 0,
391 OFPTMFC_BAD_CONFIG = 1,
392 OFPTMFC_EPERM = 2,
393};
394
395enum ofp_queue_op_failed_code {
396 OFPQOFC_BAD_PORT = 0,
397 OFPQOFC_BAD_QUEUE = 1,
398 OFPQOFC_EPERM = 2,
399};
400
401enum ofp_switch_config_failed_code {
402 OFPSCFC_BAD_FLAGS = 0,
403 OFPSCFC_BAD_LEN = 1,
404 OFPSCFC_EPERM = 2,
405};
406
407enum ofp_role_request_failed_code {
408 OFPRRFC_STALE = 0,
409 OFPRRFC_UNSUP = 1,
410 OFPRRFC_BAD_ROLE = 2,
411};
412
413enum ofp_stats_types {
414 OFPST_DESC = 0,
415 OFPST_FLOW = 1,
416 OFPST_AGGREGATE = 2,
417 OFPST_TABLE = 3,
418 OFPST_PORT = 4,
419 OFPST_QUEUE = 5,
420 OFPST_GROUP = 6,
421 OFPST_GROUP_DESC = 7,
422 OFPST_GROUP_FEATURES = 8,
423 OFPST_EXPERIMENTER = 0xffff,
424};
425
426enum ofp_stats_reply_flags {
427 OFPSF_REPLY_MORE = 0x1,
428};
429
430enum ofp_group_capabilities {
431 OFPGFC_SELECT_WEIGHT = 0x1,
432 OFPGFC_SELECT_LIVENESS = 0x2,
433 OFPGFC_CHAINING = 0x4,
434 OFPGFC_CHAINING_CHECKS = 0x8,
435};
436
437enum ofp_queue_properties {
438 OFPQT_MIN_RATE = 0x1,
439 OFPQT_MAX_RATE = 0x2,
440 OFPQT_EXPERIMENTER = 0xffff,
441};
442
443enum ofp_controller_role {
444 OFPCR_ROLE_NOCHANGE = 0,
445 OFPCR_ROLE_EQUAL = 1,
446 OFPCR_ROLE_MASTER = 2,
447 OFPCR_ROLE_SLAVE = 3,
448};
449
Rich Lane68ae4d72013-05-09 10:55:19 -0700450struct of_header {
Rich Lanea06d0c32013-03-25 08:52:03 -0700451 uint8_t version;
452 uint8_t type;
453 uint16_t length;
454 uint32_t xid;
455};
456
Rich Lane68ae4d72013-05-09 10:55:19 -0700457struct of_hello {
Rich Lanea06d0c32013-03-25 08:52:03 -0700458 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700459 uint8_t type == 0;
Rich Lanea06d0c32013-03-25 08:52:03 -0700460 uint16_t length;
461 uint32_t xid;
462};
463
Rich Lane68ae4d72013-05-09 10:55:19 -0700464struct of_echo_request {
Rich Lanea06d0c32013-03-25 08:52:03 -0700465 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700466 uint8_t type == 2;
Rich Lanea06d0c32013-03-25 08:52:03 -0700467 uint16_t length;
468 uint32_t xid;
469 of_octets_t data;
470};
471
Rich Lane68ae4d72013-05-09 10:55:19 -0700472struct of_echo_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -0700473 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700474 uint8_t type == 3;
Rich Lanea06d0c32013-03-25 08:52:03 -0700475 uint16_t length;
476 uint32_t xid;
477 of_octets_t data;
478};
479
Rich Lane68ae4d72013-05-09 10:55:19 -0700480struct of_experimenter {
Rich Lanea06d0c32013-03-25 08:52:03 -0700481 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700482 uint8_t type == 4;
Rich Lanea06d0c32013-03-25 08:52:03 -0700483 uint16_t length;
484 uint32_t xid;
485 uint32_t experimenter;
486 uint32_t subtype;
487 of_octets_t data;
488};
489
Rich Lane68ae4d72013-05-09 10:55:19 -0700490struct of_barrier_request {
Rich Lanea06d0c32013-03-25 08:52:03 -0700491 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700492 uint8_t type == 20;
Rich Lanea06d0c32013-03-25 08:52:03 -0700493 uint16_t length;
494 uint32_t xid;
495};
496
Rich Lane68ae4d72013-05-09 10:55:19 -0700497struct of_barrier_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -0700498 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700499 uint8_t type == 21;
Rich Lanea06d0c32013-03-25 08:52:03 -0700500 uint16_t length;
501 uint32_t xid;
502};
503
Rich Lane68ae4d72013-05-09 10:55:19 -0700504struct of_get_config_request {
Rich Lanea06d0c32013-03-25 08:52:03 -0700505 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700506 uint8_t type == 7;
Rich Lanea06d0c32013-03-25 08:52:03 -0700507 uint16_t length;
508 uint32_t xid;
509};
510
Rich Lane68ae4d72013-05-09 10:55:19 -0700511struct of_get_config_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -0700512 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700513 uint8_t type == 8;
Rich Lanea06d0c32013-03-25 08:52:03 -0700514 uint16_t length;
515 uint32_t xid;
516 uint16_t flags;
517 uint16_t miss_send_len;
518};
519
Rich Lane68ae4d72013-05-09 10:55:19 -0700520struct of_set_config {
Rich Lanea06d0c32013-03-25 08:52:03 -0700521 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700522 uint8_t type == 9;
Rich Lanea06d0c32013-03-25 08:52:03 -0700523 uint16_t length;
524 uint32_t xid;
525 uint16_t flags;
526 uint16_t miss_send_len;
527};
528
Rich Lane68ae4d72013-05-09 10:55:19 -0700529struct of_table_mod {
Rich Lanea06d0c32013-03-25 08:52:03 -0700530 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700531 uint8_t type == 17;
Rich Lanea06d0c32013-03-25 08:52:03 -0700532 uint16_t length;
533 uint32_t xid;
534 uint8_t table_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700535 pad(3);
Rich Lanea06d0c32013-03-25 08:52:03 -0700536 uint32_t config;
537};
538
Rich Lane68ae4d72013-05-09 10:55:19 -0700539struct of_port_desc {
Rich Lanea06d0c32013-03-25 08:52:03 -0700540 of_port_no_t port_no;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700541 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700542 of_mac_addr_t hw_addr;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700543 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700544 of_port_name_t name;
545 uint32_t config;
546 uint32_t state;
547 uint32_t curr;
548 uint32_t advertised;
549 uint32_t supported;
550 uint32_t peer;
551 uint32_t curr_speed;
552 uint32_t max_speed;
553};
554
Rich Lane68ae4d72013-05-09 10:55:19 -0700555struct of_features_request {
Rich Lanea06d0c32013-03-25 08:52:03 -0700556 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700557 uint8_t type == 5;
Rich Lanea06d0c32013-03-25 08:52:03 -0700558 uint16_t length;
559 uint32_t xid;
560};
561
Rich Lane68ae4d72013-05-09 10:55:19 -0700562struct of_features_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -0700563 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700564 uint8_t type == 6;
Rich Lanea06d0c32013-03-25 08:52:03 -0700565 uint16_t length;
566 uint32_t xid;
567 uint64_t datapath_id;
568 uint32_t n_buffers;
569 uint8_t n_tables;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700570 pad(3);
Rich Lanea06d0c32013-03-25 08:52:03 -0700571 uint32_t capabilities;
572 uint32_t reserved;
573 list(of_port_desc_t) ports;
574};
575
Rich Lane68ae4d72013-05-09 10:55:19 -0700576struct of_port_status {
Rich Lanea06d0c32013-03-25 08:52:03 -0700577 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700578 uint8_t type == 12;
Rich Lanea06d0c32013-03-25 08:52:03 -0700579 uint16_t length;
580 uint32_t xid;
581 uint8_t reason;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700582 pad(7);
Rich Lanea06d0c32013-03-25 08:52:03 -0700583 of_port_desc_t desc;
584};
585
Rich Lane68ae4d72013-05-09 10:55:19 -0700586struct of_port_mod {
Rich Lanea06d0c32013-03-25 08:52:03 -0700587 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700588 uint8_t type == 16;
Rich Lanea06d0c32013-03-25 08:52:03 -0700589 uint16_t length;
590 uint32_t xid;
591 of_port_no_t port_no;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700592 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700593 of_mac_addr_t hw_addr;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700594 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700595 uint32_t config;
596 uint32_t mask;
597 uint32_t advertise;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700598 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700599};
600
Rich Lane68ae4d72013-05-09 10:55:19 -0700601struct of_match_v3 {
Rich Lane31b87142013-05-09 22:05:42 -0700602 uint16_t type == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -0700603 uint16_t length;
604 list(of_oxm_t) oxm_list;
605};
606
Rich Lane68ae4d72013-05-09 10:55:19 -0700607struct of_oxm_experimenter_header {
Rich Lanea06d0c32013-03-25 08:52:03 -0700608 uint32_t oxm_header;
609 uint32_t experimenter;
610 of_octets_t data;
611};
612
Rich Lane68ae4d72013-05-09 10:55:19 -0700613struct of_action_output {
Rich Lane31b87142013-05-09 22:05:42 -0700614 uint16_t type == 0;
Rich Lanea06d0c32013-03-25 08:52:03 -0700615 uint16_t len;
616 of_port_no_t port;
617 uint16_t max_len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700618 pad(6);
Rich Lanea06d0c32013-03-25 08:52:03 -0700619};
620
Rich Lane68ae4d72013-05-09 10:55:19 -0700621struct of_action_copy_ttl_out {
Rich Lane31b87142013-05-09 22:05:42 -0700622 uint16_t type == 11;
Rich Lanea06d0c32013-03-25 08:52:03 -0700623 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700624 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700625};
626
Rich Lane68ae4d72013-05-09 10:55:19 -0700627struct of_action_copy_ttl_in {
Rich Lane31b87142013-05-09 22:05:42 -0700628 uint16_t type == 12;
Rich Lanea06d0c32013-03-25 08:52:03 -0700629 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700630 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700631};
632
Rich Lane68ae4d72013-05-09 10:55:19 -0700633struct of_action_set_mpls_ttl {
Rich Lane31b87142013-05-09 22:05:42 -0700634 uint16_t type == 15;
Rich Lanea06d0c32013-03-25 08:52:03 -0700635 uint16_t len;
636 uint8_t mpls_ttl;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700637 pad(3);
Rich Lanea06d0c32013-03-25 08:52:03 -0700638};
639
Rich Lane68ae4d72013-05-09 10:55:19 -0700640struct of_action_dec_mpls_ttl {
Rich Lane31b87142013-05-09 22:05:42 -0700641 uint16_t type == 16;
Rich Lanea06d0c32013-03-25 08:52:03 -0700642 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700643 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700644};
645
Rich Lane68ae4d72013-05-09 10:55:19 -0700646struct of_action_push_vlan {
Rich Lane31b87142013-05-09 22:05:42 -0700647 uint16_t type == 17;
Rich Lanea06d0c32013-03-25 08:52:03 -0700648 uint16_t len;
649 uint16_t ethertype;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700650 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700651};
652
Rich Lane68ae4d72013-05-09 10:55:19 -0700653struct of_action_pop_vlan {
Rich Lane31b87142013-05-09 22:05:42 -0700654 uint16_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -0700655 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700656 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700657};
658
Rich Lane68ae4d72013-05-09 10:55:19 -0700659struct of_action_push_mpls {
Rich Lane31b87142013-05-09 22:05:42 -0700660 uint16_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -0700661 uint16_t len;
662 uint16_t ethertype;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700663 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700664};
665
Rich Lane68ae4d72013-05-09 10:55:19 -0700666struct of_action_pop_mpls {
Rich Lane31b87142013-05-09 22:05:42 -0700667 uint16_t type == 20;
Rich Lanea06d0c32013-03-25 08:52:03 -0700668 uint16_t len;
669 uint16_t ethertype;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700670 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700671};
672
Rich Lane68ae4d72013-05-09 10:55:19 -0700673struct of_action_set_queue {
Rich Lane31b87142013-05-09 22:05:42 -0700674 uint16_t type == 21;
Rich Lanea06d0c32013-03-25 08:52:03 -0700675 uint16_t len;
676 uint32_t queue_id;
677};
678
Rich Lane68ae4d72013-05-09 10:55:19 -0700679struct of_action_group {
Rich Lane31b87142013-05-09 22:05:42 -0700680 uint16_t type == 22;
Rich Lanea06d0c32013-03-25 08:52:03 -0700681 uint16_t len;
682 uint32_t group_id;
683};
684
Rich Lane68ae4d72013-05-09 10:55:19 -0700685struct of_action_set_nw_ttl {
Rich Lane31b87142013-05-09 22:05:42 -0700686 uint16_t type == 23;
Rich Lanea06d0c32013-03-25 08:52:03 -0700687 uint16_t len;
688 uint8_t nw_ttl;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700689 pad(3);
Rich Lanea06d0c32013-03-25 08:52:03 -0700690};
691
Rich Lane68ae4d72013-05-09 10:55:19 -0700692struct of_action_dec_nw_ttl {
Rich Lane31b87142013-05-09 22:05:42 -0700693 uint16_t type == 24;
Rich Lanea06d0c32013-03-25 08:52:03 -0700694 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700695 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700696};
697
Rich Lane68ae4d72013-05-09 10:55:19 -0700698struct of_action_set_field {
Rich Lane31b87142013-05-09 22:05:42 -0700699 uint16_t type == 25;
Rich Lanea06d0c32013-03-25 08:52:03 -0700700 uint16_t len;
701 of_octets_t field;
702};
703
Rich Lane68ae4d72013-05-09 10:55:19 -0700704struct of_action_experimenter {
Rich Lane31b87142013-05-09 22:05:42 -0700705 uint16_t type == 65535;
Rich Lanea06d0c32013-03-25 08:52:03 -0700706 uint16_t len;
707 uint32_t experimenter;
708 of_octets_t data;
709};
710
Rich Lane68ae4d72013-05-09 10:55:19 -0700711struct of_action {
Rich Lanea06d0c32013-03-25 08:52:03 -0700712 uint16_t type;
713 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700714 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700715};
716
Rich Lane68ae4d72013-05-09 10:55:19 -0700717struct of_instruction {
Rich Lanea06d0c32013-03-25 08:52:03 -0700718 uint16_t type;
719 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700720 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700721};
722
Rich Lane68ae4d72013-05-09 10:55:19 -0700723struct of_instruction_goto_table {
Rich Lane31b87142013-05-09 22:05:42 -0700724 uint16_t type == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -0700725 uint16_t len;
726 uint8_t table_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700727 pad(3);
Rich Lanea06d0c32013-03-25 08:52:03 -0700728};
729
Rich Lane68ae4d72013-05-09 10:55:19 -0700730struct of_instruction_write_metadata {
Rich Lane31b87142013-05-09 22:05:42 -0700731 uint16_t type == 2;
Rich Lanea06d0c32013-03-25 08:52:03 -0700732 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700733 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700734 uint64_t metadata;
735 uint64_t metadata_mask;
736};
737
Rich Lane68ae4d72013-05-09 10:55:19 -0700738struct of_instruction_write_actions {
Rich Lane31b87142013-05-09 22:05:42 -0700739 uint16_t type == 3;
Rich Lanea06d0c32013-03-25 08:52:03 -0700740 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700741 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700742 list(of_action_t) actions;
743};
744
Rich Lane68ae4d72013-05-09 10:55:19 -0700745struct of_instruction_apply_actions {
Rich Lane31b87142013-05-09 22:05:42 -0700746 uint16_t type == 4;
Rich Lanea06d0c32013-03-25 08:52:03 -0700747 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700748 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700749 list(of_action_t) actions;
750};
751
Rich Lane68ae4d72013-05-09 10:55:19 -0700752struct of_instruction_clear_actions {
Rich Lane31b87142013-05-09 22:05:42 -0700753 uint16_t type == 5;
Rich Lanea06d0c32013-03-25 08:52:03 -0700754 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700755 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700756};
757
Rich Lane68ae4d72013-05-09 10:55:19 -0700758struct of_instruction_experimenter {
Rich Lane31b87142013-05-09 22:05:42 -0700759 uint16_t type == 65535;
Rich Lanea06d0c32013-03-25 08:52:03 -0700760 uint16_t len;
761 uint32_t experimenter;
762 of_octets_t data;
763};
764
Rich Lane68ae4d72013-05-09 10:55:19 -0700765struct of_flow_add {
Rich Lanea06d0c32013-03-25 08:52:03 -0700766 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700767 uint8_t type == 14;
Rich Lanea06d0c32013-03-25 08:52:03 -0700768 uint16_t length;
769 uint32_t xid;
770 uint64_t cookie;
771 uint64_t cookie_mask;
772 uint8_t table_id;
Rich Lane31b87142013-05-09 22:05:42 -0700773 of_fm_cmd_t _command == 0;
Rich Lanea06d0c32013-03-25 08:52:03 -0700774 uint16_t idle_timeout;
775 uint16_t hard_timeout;
776 uint16_t priority;
777 uint32_t buffer_id;
778 of_port_no_t out_port;
779 uint32_t out_group;
780 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700781 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700782 of_match_t match;
783 list(of_instruction_t) instructions;
784};
785
Rich Lane68ae4d72013-05-09 10:55:19 -0700786struct of_flow_modify {
Rich Lanea06d0c32013-03-25 08:52:03 -0700787 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700788 uint8_t type == 14;
Rich Lanea06d0c32013-03-25 08:52:03 -0700789 uint16_t length;
790 uint32_t xid;
791 uint64_t cookie;
792 uint64_t cookie_mask;
793 uint8_t table_id;
Rich Lane31b87142013-05-09 22:05:42 -0700794 of_fm_cmd_t _command == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -0700795 uint16_t idle_timeout;
796 uint16_t hard_timeout;
797 uint16_t priority;
798 uint32_t buffer_id;
799 of_port_no_t out_port;
800 uint32_t out_group;
801 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700802 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700803 of_match_t match;
804 list(of_instruction_t) instructions;
805};
806
Rich Lane68ae4d72013-05-09 10:55:19 -0700807struct of_flow_modify_strict {
Rich Lanea06d0c32013-03-25 08:52:03 -0700808 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700809 uint8_t type == 14;
Rich Lanea06d0c32013-03-25 08:52:03 -0700810 uint16_t length;
811 uint32_t xid;
812 uint64_t cookie;
813 uint64_t cookie_mask;
814 uint8_t table_id;
Rich Lane31b87142013-05-09 22:05:42 -0700815 of_fm_cmd_t _command == 2;
Rich Lanea06d0c32013-03-25 08:52:03 -0700816 uint16_t idle_timeout;
817 uint16_t hard_timeout;
818 uint16_t priority;
819 uint32_t buffer_id;
820 of_port_no_t out_port;
821 uint32_t out_group;
822 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700823 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700824 of_match_t match;
825 list(of_instruction_t) instructions;
826};
827
Rich Lane68ae4d72013-05-09 10:55:19 -0700828struct of_flow_delete {
Rich Lanea06d0c32013-03-25 08:52:03 -0700829 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700830 uint8_t type == 14;
Rich Lanea06d0c32013-03-25 08:52:03 -0700831 uint16_t length;
832 uint32_t xid;
833 uint64_t cookie;
834 uint64_t cookie_mask;
835 uint8_t table_id;
Rich Lane31b87142013-05-09 22:05:42 -0700836 of_fm_cmd_t _command == 3;
Rich Lanea06d0c32013-03-25 08:52:03 -0700837 uint16_t idle_timeout;
838 uint16_t hard_timeout;
839 uint16_t priority;
840 uint32_t buffer_id;
841 of_port_no_t out_port;
842 uint32_t out_group;
843 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700844 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700845 of_match_t match;
846 list(of_instruction_t) instructions;
847};
848
Rich Lane68ae4d72013-05-09 10:55:19 -0700849struct of_flow_delete_strict {
Rich Lanea06d0c32013-03-25 08:52:03 -0700850 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700851 uint8_t type == 14;
Rich Lanea06d0c32013-03-25 08:52:03 -0700852 uint16_t length;
853 uint32_t xid;
854 uint64_t cookie;
855 uint64_t cookie_mask;
856 uint8_t table_id;
Rich Lane31b87142013-05-09 22:05:42 -0700857 of_fm_cmd_t _command == 4;
Rich Lanea06d0c32013-03-25 08:52:03 -0700858 uint16_t idle_timeout;
859 uint16_t hard_timeout;
860 uint16_t priority;
861 uint32_t buffer_id;
862 of_port_no_t out_port;
863 uint32_t out_group;
864 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700865 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700866 of_match_t match;
867 list(of_instruction_t) instructions;
868};
869
Rich Lane68ae4d72013-05-09 10:55:19 -0700870struct of_bucket {
Rich Lanea06d0c32013-03-25 08:52:03 -0700871 uint16_t len;
872 uint16_t weight;
873 of_port_no_t watch_port;
874 uint32_t watch_group;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700875 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -0700876 list(of_action_t) actions;
877};
878
Rich Lane68ae4d72013-05-09 10:55:19 -0700879struct of_group_mod {
Rich Lanea06d0c32013-03-25 08:52:03 -0700880 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700881 uint8_t type == 15;
Rich Lanea06d0c32013-03-25 08:52:03 -0700882 uint16_t length;
883 uint32_t xid;
884 uint16_t command;
885 uint8_t group_type;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700886 pad(1);
Rich Lanea06d0c32013-03-25 08:52:03 -0700887 uint32_t group_id;
888 list(of_bucket_t) buckets;
889};
890
Rich Lane68ae4d72013-05-09 10:55:19 -0700891struct of_packet_out {
Rich Lanea06d0c32013-03-25 08:52:03 -0700892 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700893 uint8_t type == 13;
Rich Lanea06d0c32013-03-25 08:52:03 -0700894 uint16_t length;
895 uint32_t xid;
896 uint32_t buffer_id;
897 of_port_no_t in_port;
898 uint16_t actions_len;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700899 pad(6);
Rich Lanea06d0c32013-03-25 08:52:03 -0700900 list(of_action_t) actions;
901 of_octets_t data;
902};
903
Rich Lane68ae4d72013-05-09 10:55:19 -0700904struct of_packet_in {
Rich Lanea06d0c32013-03-25 08:52:03 -0700905 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700906 uint8_t type == 10;
Rich Lanea06d0c32013-03-25 08:52:03 -0700907 uint16_t length;
908 uint32_t xid;
909 uint32_t buffer_id;
910 uint16_t total_len;
911 uint8_t reason;
912 uint8_t table_id;
913 of_match_t match;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700914 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -0700915 of_octets_t data; /* FIXME: Ensure total_len gets updated */
916};
917
Rich Lane68ae4d72013-05-09 10:55:19 -0700918struct of_flow_removed {
Rich Lanea06d0c32013-03-25 08:52:03 -0700919 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700920 uint8_t type == 11;
Rich Lanea06d0c32013-03-25 08:52:03 -0700921 uint16_t length;
922 uint32_t xid;
923 uint64_t cookie;
924 uint16_t priority;
925 uint8_t reason;
926 uint8_t table_id;
927 uint32_t duration_sec;
928 uint32_t duration_nsec;
929 uint16_t idle_timeout;
930 uint16_t hard_timeout;
931 uint64_t packet_count;
932 uint64_t byte_count;
933 of_match_t match;
934};
935
Rich Lane68ae4d72013-05-09 10:55:19 -0700936struct of_error_msg {
Rich Lanea06d0c32013-03-25 08:52:03 -0700937 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -0700938 uint8_t type == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -0700939 uint16_t length;
940 uint32_t xid;
941 uint16_t err_type;
942 uint16_t code;
943 of_octets_t data;
944};
945
Rich Lane68ae4d72013-05-09 10:55:19 -0700946// struct of_error_experimenter_msg {
Rich Lanea06d0c32013-03-25 08:52:03 -0700947// uint8_t version;
948// uint8_t type;
949// uint16_t length;
950// uint32_t xid;
951// uint16_t err_type;
952// uint16_t subtype;
953// uint32_t experimenter;
954// of_octets_t data;
955//};
956
957// STATS ENTRIES: flow, table, port, queue, group stats, group desc stats
958// FIXME: Verify disambiguation w/ length in object and entry
959
Rich Lane68ae4d72013-05-09 10:55:19 -0700960struct of_flow_stats_entry {
Rich Lanea06d0c32013-03-25 08:52:03 -0700961 uint16_t length;
962 uint8_t table_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700963 pad(1);
Rich Lanea06d0c32013-03-25 08:52:03 -0700964 uint32_t duration_sec;
965 uint32_t duration_nsec;
966 uint16_t priority;
967 uint16_t idle_timeout;
968 uint16_t hard_timeout;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700969 pad(6);
Rich Lanea06d0c32013-03-25 08:52:03 -0700970 uint64_t cookie;
971 uint64_t packet_count;
972 uint64_t byte_count;
973 of_match_t match;
974 list(of_instruction_t) instructions;
975};
976
Rich Lane68ae4d72013-05-09 10:55:19 -0700977struct of_table_stats_entry {
Rich Lanea06d0c32013-03-25 08:52:03 -0700978 uint8_t table_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700979 pad(7);
Rich Lanea06d0c32013-03-25 08:52:03 -0700980 of_table_name_t name;
981 of_match_bmap_t match;
982 of_wc_bmap_t wildcards;
983 uint32_t write_actions;
984 uint32_t apply_actions;
985 uint64_t write_setfields;
986 uint64_t apply_setfields;
987 uint64_t metadata_match;
988 uint64_t metadata_write;
989 uint32_t instructions;
990 uint32_t config;
991 uint32_t max_entries;
992 uint32_t active_count;
993 uint64_t lookup_count;
994 uint64_t matched_count;
995};
996
Rich Lane68ae4d72013-05-09 10:55:19 -0700997struct of_port_stats_entry {
Rich Lanea06d0c32013-03-25 08:52:03 -0700998 of_port_no_t port_no;
Rich Lanee2af4ee2013-05-09 11:04:06 -0700999 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001000 uint64_t rx_packets;
1001 uint64_t tx_packets;
1002 uint64_t rx_bytes;
1003 uint64_t tx_bytes;
1004 uint64_t rx_dropped;
1005 uint64_t tx_dropped;
1006 uint64_t rx_errors;
1007 uint64_t tx_errors;
1008 uint64_t rx_frame_err;
1009 uint64_t rx_over_err;
1010 uint64_t rx_crc_err;
1011 uint64_t collisions;
1012};
1013
Rich Lane68ae4d72013-05-09 10:55:19 -07001014struct of_queue_stats_entry {
Rich Lanea06d0c32013-03-25 08:52:03 -07001015 of_port_no_t port_no;
1016 uint32_t queue_id;
1017 uint64_t tx_bytes;
1018 uint64_t tx_packets;
1019 uint64_t tx_errors;
1020};
1021
Rich Lane68ae4d72013-05-09 10:55:19 -07001022struct of_bucket_counter {
Rich Lanea06d0c32013-03-25 08:52:03 -07001023 uint64_t packet_count;
1024 uint64_t byte_count;
1025};
1026
Rich Lane68ae4d72013-05-09 10:55:19 -07001027struct of_group_stats_entry {
Rich Lanea06d0c32013-03-25 08:52:03 -07001028 uint16_t length;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001029 pad(2);
Rich Lanea06d0c32013-03-25 08:52:03 -07001030 uint32_t group_id;
1031 uint32_t ref_count;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001032 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001033 uint64_t packet_count;
1034 uint64_t byte_count;
1035 list(of_bucket_counter_t) bucket_stats;
1036};
1037
Rich Lane68ae4d72013-05-09 10:55:19 -07001038struct of_group_desc_stats_entry {
Rich Lanea06d0c32013-03-25 08:52:03 -07001039 uint16_t length;
1040 uint8_t type;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001041 pad(1);
Rich Lanea06d0c32013-03-25 08:52:03 -07001042 uint32_t group_id;
1043 list(of_bucket_t) buckets;
1044};
1045
1046// STATS:
1047// Desc, flow, agg, table, port, queue, group, group_desc, group_feat, experi
1048
Rich Lane68ae4d72013-05-09 10:55:19 -07001049struct of_desc_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001050 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001051 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001052 uint16_t length;
1053 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001054 uint16_t stats_type == 0;
Rich Lanea06d0c32013-03-25 08:52:03 -07001055 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001056 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001057};
1058
Rich Lane68ae4d72013-05-09 10:55:19 -07001059struct of_desc_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001060 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001061 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001062 uint16_t length;
1063 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001064 uint16_t stats_type == 0;
Rich Lanea06d0c32013-03-25 08:52:03 -07001065 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001066 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001067 of_desc_str_t mfr_desc;
1068 of_desc_str_t hw_desc;
1069 of_desc_str_t sw_desc;
1070 of_serial_num_t serial_num;
1071 of_desc_str_t dp_desc;
1072};
1073
Rich Lane68ae4d72013-05-09 10:55:19 -07001074struct of_flow_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001075 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001076 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001077 uint16_t length;
1078 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001079 uint16_t stats_type == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -07001080 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001081 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001082 uint8_t table_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001083 pad(3);
Rich Lanea06d0c32013-03-25 08:52:03 -07001084 of_port_no_t out_port;
1085 uint32_t out_group;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001086 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001087 uint64_t cookie;
1088 uint64_t cookie_mask;
1089 of_match_t match;
1090};
1091
Rich Lane68ae4d72013-05-09 10:55:19 -07001092struct of_flow_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001093 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001094 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001095 uint16_t length;
1096 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001097 uint16_t stats_type == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -07001098 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001099 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001100 list(of_flow_stats_entry_t) entries;
1101};
1102
Rich Lane68ae4d72013-05-09 10:55:19 -07001103struct of_aggregate_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001104 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001105 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001106 uint16_t length;
1107 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001108 uint16_t stats_type == 2;
Rich Lanea06d0c32013-03-25 08:52:03 -07001109 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001110 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001111 uint8_t table_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001112 pad(3);
Rich Lanea06d0c32013-03-25 08:52:03 -07001113 of_port_no_t out_port;
1114 uint32_t out_group;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001115 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001116 uint64_t cookie;
1117 uint64_t cookie_mask;
1118 of_match_t match;
1119};
1120
Rich Lane68ae4d72013-05-09 10:55:19 -07001121struct of_aggregate_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001122 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001123 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001124 uint16_t length;
1125 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001126 uint16_t stats_type == 2;
Rich Lanea06d0c32013-03-25 08:52:03 -07001127 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001128 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001129 uint64_t packet_count;
1130 uint64_t byte_count;
1131 uint32_t flow_count;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001132 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001133};
1134
Rich Lane68ae4d72013-05-09 10:55:19 -07001135struct of_table_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001136 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001137 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001138 uint16_t length;
1139 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001140 uint16_t stats_type == 3;
Rich Lanea06d0c32013-03-25 08:52:03 -07001141 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001142 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001143};
1144
Rich Lane68ae4d72013-05-09 10:55:19 -07001145struct of_table_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001146 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001147 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001148 uint16_t length;
1149 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001150 uint16_t stats_type == 3;
Rich Lanea06d0c32013-03-25 08:52:03 -07001151 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001152 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001153 list(of_table_stats_entry_t) entries;
1154};
1155
Rich Lane68ae4d72013-05-09 10:55:19 -07001156struct of_port_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001157 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001158 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001159 uint16_t length;
1160 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001161 uint16_t stats_type == 4;
Rich Lanea06d0c32013-03-25 08:52:03 -07001162 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001163 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001164 of_port_no_t port_no;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001165 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001166};
1167
Rich Lane68ae4d72013-05-09 10:55:19 -07001168struct of_port_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001169 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001170 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001171 uint16_t length;
1172 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001173 uint16_t stats_type == 4;
Rich Lanea06d0c32013-03-25 08:52:03 -07001174 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001175 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001176 list(of_port_stats_entry_t) entries;
1177};
1178
Rich Lane68ae4d72013-05-09 10:55:19 -07001179struct of_queue_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001180 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001181 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001182 uint16_t length;
1183 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001184 uint16_t stats_type == 5;
Rich Lanea06d0c32013-03-25 08:52:03 -07001185 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001186 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001187 of_port_no_t port_no;
1188 uint32_t queue_id;
1189};
1190
Rich Lane68ae4d72013-05-09 10:55:19 -07001191struct of_queue_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001192 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001193 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001194 uint16_t length;
1195 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001196 uint16_t stats_type == 5;
Rich Lanea06d0c32013-03-25 08:52:03 -07001197 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001198 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001199 list(of_queue_stats_entry_t) entries;
1200};
1201
Rich Lane68ae4d72013-05-09 10:55:19 -07001202struct of_group_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001203 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001204 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001205 uint16_t length;
1206 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001207 uint16_t stats_type == 6;
Rich Lanea06d0c32013-03-25 08:52:03 -07001208 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001209 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001210 uint32_t group_id;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001211 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001212};
1213
Rich Lane68ae4d72013-05-09 10:55:19 -07001214struct of_group_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001215 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001216 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001217 uint16_t length;
1218 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001219 uint16_t stats_type == 6;
Rich Lanea06d0c32013-03-25 08:52:03 -07001220 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001221 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001222 list(of_group_stats_entry_t) entries;
1223};
1224
Rich Lane68ae4d72013-05-09 10:55:19 -07001225struct of_group_desc_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001226 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001227 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001228 uint16_t length;
1229 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001230 uint16_t stats_type == 7;
Rich Lanea06d0c32013-03-25 08:52:03 -07001231 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001232 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001233};
1234
Rich Lane68ae4d72013-05-09 10:55:19 -07001235struct of_group_desc_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001236 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001237 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001238 uint16_t length;
1239 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001240 uint16_t stats_type == 7;
Rich Lanea06d0c32013-03-25 08:52:03 -07001241 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001242 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001243 list(of_group_desc_stats_entry_t) entries;
1244};
1245
Rich Lane68ae4d72013-05-09 10:55:19 -07001246struct of_group_features_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001247 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001248 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001249 uint16_t length;
1250 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001251 uint16_t stats_type == 8;
Rich Lanea06d0c32013-03-25 08:52:03 -07001252 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001253 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001254};
1255
Rich Lane68ae4d72013-05-09 10:55:19 -07001256struct of_group_features_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001257 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001258 uint8_t type == 19;
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 == 8;
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 uint32_t types;
1265 uint32_t capabilities;
1266 uint32_t max_groups_all;
1267 uint32_t max_groups_select;
1268 uint32_t max_groups_indirect;
1269 uint32_t max_groups_ff;
1270 uint32_t actions_all;
1271 uint32_t actions_select;
1272 uint32_t actions_indirect;
1273 uint32_t actions_ff;
1274};
1275
Rich Lane68ae4d72013-05-09 10:55:19 -07001276struct of_experimenter_stats_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001277 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001278 uint8_t type == 18;
Rich Lanea06d0c32013-03-25 08:52:03 -07001279 uint16_t length;
1280 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001281 uint16_t stats_type == 0xffff;
Rich Lanea06d0c32013-03-25 08:52:03 -07001282 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001283 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001284 uint32_t experimenter;
1285 uint32_t subtype;
1286 of_octets_t data;
1287};
1288
Rich Lane68ae4d72013-05-09 10:55:19 -07001289struct of_experimenter_stats_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001290 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001291 uint8_t type == 19;
Rich Lanea06d0c32013-03-25 08:52:03 -07001292 uint16_t length;
1293 uint32_t xid;
Rich Lane31b87142013-05-09 22:05:42 -07001294 uint16_t stats_type == 0xffff;
Rich Lanea06d0c32013-03-25 08:52:03 -07001295 uint16_t flags;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001296 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001297 uint32_t experimenter;
1298 uint32_t subtype;
1299 of_octets_t data;
1300};
1301
1302// END OF STATS OBJECTS
1303
Rich Lane68ae4d72013-05-09 10:55:19 -07001304struct of_queue_prop {
Rich Lanea06d0c32013-03-25 08:52:03 -07001305 uint16_t type;
1306 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001307 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001308};
1309
Rich Lane68ae4d72013-05-09 10:55:19 -07001310struct of_queue_prop_min_rate {
Rich Lane31b87142013-05-09 22:05:42 -07001311 uint16_t type == 1;
Rich Lanea06d0c32013-03-25 08:52:03 -07001312 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001313 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001314 uint16_t rate;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001315 pad(6);
Rich Lanea06d0c32013-03-25 08:52:03 -07001316};
1317
Rich Lane68ae4d72013-05-09 10:55:19 -07001318struct of_queue_prop_max_rate {
Rich Lane31b87142013-05-09 22:05:42 -07001319 uint16_t type == 2;
Rich Lanea06d0c32013-03-25 08:52:03 -07001320 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001321 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001322 uint16_t rate;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001323 pad(6);
Rich Lanea06d0c32013-03-25 08:52:03 -07001324};
1325
Rich Lane68ae4d72013-05-09 10:55:19 -07001326struct of_queue_prop_experimenter {
Rich Lane31b87142013-05-09 22:05:42 -07001327 uint16_t type == 65535;
Rich Lanea06d0c32013-03-25 08:52:03 -07001328 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001329 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001330 uint32_t experimenter;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001331 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001332 of_octets_t data;
1333};
1334
Rich Lane68ae4d72013-05-09 10:55:19 -07001335struct of_packet_queue {
Rich Lanea06d0c32013-03-25 08:52:03 -07001336 uint32_t queue_id;
1337 of_port_no_t port;
1338 uint16_t len;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001339 pad(6);
Rich Lanea06d0c32013-03-25 08:52:03 -07001340 list(of_queue_prop_t) properties;
1341};
1342
Rich Lane68ae4d72013-05-09 10:55:19 -07001343struct of_queue_get_config_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001344 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001345 uint8_t type == 22;
Rich Lanea06d0c32013-03-25 08:52:03 -07001346 uint16_t length;
1347 uint32_t xid;
1348 of_port_no_t port;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001349 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001350};
1351
Rich Lane68ae4d72013-05-09 10:55:19 -07001352struct of_queue_get_config_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001353 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001354 uint8_t type == 23;
Rich Lanea06d0c32013-03-25 08:52:03 -07001355 uint16_t length;
1356 uint32_t xid;
1357 of_port_no_t port;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001358 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001359 list(of_packet_queue_t) queues;
1360};
1361
Rich Lane68ae4d72013-05-09 10:55:19 -07001362struct of_role_request {
Rich Lanea06d0c32013-03-25 08:52:03 -07001363 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001364 uint8_t type == 24;
Rich Lanea06d0c32013-03-25 08:52:03 -07001365 uint16_t length;
1366 uint32_t xid;
1367 uint32_t role;
Rich Lanee2af4ee2013-05-09 11:04:06 -07001368 pad(4);
Rich Lanea06d0c32013-03-25 08:52:03 -07001369 uint64_t generation_id;
1370};
1371
Rich Lane68ae4d72013-05-09 10:55:19 -07001372struct of_role_reply {
Rich Lanea06d0c32013-03-25 08:52:03 -07001373 uint8_t version;
Rich Lane31b87142013-05-09 22:05:42 -07001374 uint8_t type == 25;
Rich Lanea06d0c32013-03-25 08:52:03 -07001375 uint16_t length;
1376 uint32_t xid;
1377 of_octets_t data;
1378};