blob: 18701ea8a2998b76a74b85b3d972663ce1d0ed8b [file] [log] [blame]
Rich Lane1ac43002013-12-03 12:56:35 -08001// Copyright 2013, Big Switch Networks, Inc.
2//
3// LoxiGen is licensed under the Eclipse Public License,
4// version 1.0 (EPL), with the following special exception:
5//
6// LOXI Exception
7//
8// As a special exception to the terms of the EPL, you may
9// distribute libraries generated by LoxiGen (LoxiGen Libraries)
10// under the terms of your choice, provided that copyright and
11// licensing notices generated by LoxiGen are not altered or removed
12// from the LoxiGen Libraries and the notice provided below is (i)
13// included in the LoxiGen Libraries, if distributed in source code
14// form and (ii) included in any documentation for the LoxiGen
15// Libraries, if distributed in binary form.
16//
17// Notice: "Copyright 2013, Big Switch Networks, Inc.
18// This library was generated by the LoxiGen Compiler."
19//
20// You may not use this file except in compliance with the EPL or
21// LOXI Exception. You may obtain a copy of the EPL at:
22//
23// http://www.eclipse.org/legal/epl-v10.html
24//
25// Unless required by applicable law or agreed to in writing,
26// software distributed under the License is distributed on an "AS
27// IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
28// express or implied. See the EPL for the specific language
29// governing permissions and limitations under the EPL.
30
31#version 4
Rich Lane4b1d8f42014-10-31 15:25:14 -070032#version 5
Rich Lane1ac43002013-12-03 12:56:35 -080033
34struct of_bsn_tlv_port : of_bsn_tlv {
35 uint16_t type == 0;
36 uint16_t length;
37 of_port_no_t value;
38};
39
40struct of_bsn_tlv_mac : of_bsn_tlv {
41 uint16_t type == 1;
42 uint16_t length;
43 of_mac_addr_t value;
44};
45
46struct of_bsn_tlv_rx_packets : of_bsn_tlv {
47 uint16_t type == 2;
48 uint16_t length;
49 uint64_t value;
50};
51
52struct of_bsn_tlv_tx_packets : of_bsn_tlv {
53 uint16_t type == 3;
54 uint16_t length;
55 uint64_t value;
56};
Rich Lanee052b082014-01-03 16:43:15 -080057
58struct of_bsn_tlv_ipv4 : of_bsn_tlv {
59 uint16_t type == 4;
60 uint16_t length;
61 of_ipv4_t value;
62};
63
64struct of_bsn_tlv_idle_time : of_bsn_tlv {
65 uint16_t type == 5;
66 uint16_t length;
67 uint64_t value; /* Milliseconds */
68};
69
70struct of_bsn_tlv_vlan_vid : of_bsn_tlv {
71 uint16_t type == 6;
72 uint16_t length;
73 uint16_t value;
74};
75
76struct of_bsn_tlv_idle_notification : of_bsn_tlv {
77 uint16_t type == 7;
78 uint16_t length;
79};
Rich Lanea1258452014-01-24 14:25:00 -080080
81struct of_bsn_tlv_idle_timeout : of_bsn_tlv {
82 uint16_t type == 8;
83 uint16_t length;
84 uint32_t value; /* Milliseconds */
85};
86
87struct of_bsn_tlv_unicast_query_timeout : of_bsn_tlv {
88 uint16_t type == 9;
89 uint16_t length;
90 uint32_t value; /* Milliseconds */
91};
92
93struct of_bsn_tlv_broadcast_query_timeout : of_bsn_tlv {
94 uint16_t type == 10;
95 uint16_t length;
96 uint32_t value; /* Milliseconds */
97};
98
99struct of_bsn_tlv_request_packets : of_bsn_tlv {
100 uint16_t type == 11;
101 uint16_t length;
102 uint64_t value;
103};
104
105struct of_bsn_tlv_reply_packets : of_bsn_tlv {
106 uint16_t type == 12;
107 uint16_t length;
108 uint64_t value;
109};
110
111struct of_bsn_tlv_miss_packets : of_bsn_tlv {
112 uint16_t type == 13;
113 uint16_t length;
114 uint64_t value;
115};
Duc Pham9d29ed02014-01-30 16:23:16 -0800116
117struct of_bsn_tlv_circuit_id : of_bsn_tlv {
118 uint16_t type == 14;
119 uint16_t length;
120 of_octets_t value;
121};
Rich Lane5151f772014-03-20 15:32:33 -0700122
123struct of_bsn_tlv_udf_id : of_bsn_tlv {
124 uint16_t type == 15;
125 uint16_t length;
126 uint16_t value;
127};
128
129enum ofp_bsn_udf_anchor(wire_type=uint16_t) {
130 OFP_BSN_UDF_ANCHOR_PACKET_START = 0,
131 OFP_BSN_UDF_ANCHOR_L3_HEADER_START = 1,
132 OFP_BSN_UDF_ANCHOR_L4_HEADER_START = 2,
133};
134
135struct of_bsn_tlv_udf_anchor : of_bsn_tlv {
136 uint16_t type == 16;
137 uint16_t length;
138 enum ofp_bsn_udf_anchor value;
139};
140
141struct of_bsn_tlv_udf_offset : of_bsn_tlv {
142 uint16_t type == 17;
143 uint16_t length;
144 uint16_t value;
145};
146
147struct of_bsn_tlv_udf_length : of_bsn_tlv {
148 uint16_t type == 18;
149 uint16_t length;
150 uint16_t value;
151};
Duc Phamd07e6372014-04-01 17:54:15 -0700152
Duc Phamabe23a42014-04-02 10:39:34 -0700153struct of_bsn_tlv_vrf : of_bsn_tlv {
Duc Phamd07e6372014-04-01 17:54:15 -0700154 uint16_t type == 19;
155 uint16_t length;
Duc Pham48f997f2014-04-02 14:48:19 -0700156 uint32_t value;
Duc Phamd07e6372014-04-01 17:54:15 -0700157};
Duc Pham11b1b9d2014-05-07 16:56:59 -0700158
159struct of_bsn_tlv_queue_id : of_bsn_tlv {
160 uint16_t type == 20;
161 uint16_t length;
162 uint32_t value;
163};
164
165struct of_bsn_tlv_queue_weight : of_bsn_tlv {
166 uint16_t type == 21;
167 uint16_t length;
168 uint32_t value;
169};
Wilson Ng60e38ab2014-05-20 19:24:12 -0700170
Wilson Ng7c45cd52014-05-21 10:45:27 -0700171struct of_bsn_tlv_crc_enabled : of_bsn_tlv {
Wilson Ng60e38ab2014-05-20 19:24:12 -0700172 uint16_t type == 22;
173 uint16_t length;
Wilson Ng7c45cd52014-05-21 10:45:27 -0700174 uint8_t value;
Wilson Ng60e38ab2014-05-20 19:24:12 -0700175};
Rich Lane85b94e82014-09-24 13:24:53 -0700176
177struct of_bsn_tlv_external_ip : of_bsn_tlv {
178 uint16_t type == 23;
179 uint16_t length;
180 of_ipv4_t value;
181};
182
183struct of_bsn_tlv_external_mac : of_bsn_tlv {
184 uint16_t type == 24;
185 uint16_t length;
186 of_mac_addr_t value;
187};
188
189struct of_bsn_tlv_external_netmask : of_bsn_tlv {
190 uint16_t type == 25;
191 uint16_t length;
192 of_ipv4_t value;
193};
194
195struct of_bsn_tlv_external_gateway_ip : of_bsn_tlv {
196 uint16_t type == 26;
197 uint16_t length;
198 of_ipv4_t value;
199};
200
201struct of_bsn_tlv_internal_mac : of_bsn_tlv {
202 uint16_t type == 27;
203 uint16_t length;
204 of_mac_addr_t value;
205};
206
207struct of_bsn_tlv_internal_gateway_mac : of_bsn_tlv {
208 uint16_t type == 28;
209 uint16_t length;
210 of_mac_addr_t value;
211};
Rich Laneb9ccfa12014-10-01 16:25:12 -0700212
213struct of_bsn_tlv_external_gateway_mac : of_bsn_tlv {
214 uint16_t type == 29;
215 uint16_t length;
216 of_mac_addr_t value;
217};
Harshmeet Singhde7aed92014-10-06 13:09:40 -0700218
219struct of_bsn_tlv_sampling_rate : of_bsn_tlv {
220 uint16_t type == 30;
221 uint16_t length;
222 uint32_t value;
223};
224
225struct of_bsn_tlv_header_size : of_bsn_tlv {
226 uint16_t type == 31;
227 uint16_t length;
228 uint32_t value; /* bytes */
229};
230
231struct of_bsn_tlv_eth_src : of_bsn_tlv {
232 uint16_t type == 32;
233 uint16_t length;
234 of_mac_addr_t value;
235};
236
237struct of_bsn_tlv_eth_dst : of_bsn_tlv {
238 uint16_t type == 33;
239 uint16_t length;
240 of_mac_addr_t value;
241};
242
243struct of_bsn_tlv_ipv4_src : of_bsn_tlv {
244 uint16_t type == 34;
245 uint16_t length;
246 of_ipv4_t value;
247};
248
249struct of_bsn_tlv_ipv4_dst : of_bsn_tlv {
250 uint16_t type == 35;
251 uint16_t length;
252 of_ipv4_t value;
253};
254
255struct of_bsn_tlv_udp_src : of_bsn_tlv {
256 uint16_t type == 36;
257 uint16_t length;
258 uint16_t value;
259};
260
261struct of_bsn_tlv_udp_dst : of_bsn_tlv {
262 uint16_t type == 37;
263 uint16_t length;
264 uint16_t value;
265};
266
267struct of_bsn_tlv_sub_agent_id : of_bsn_tlv {
268 uint16_t type == 38;
269 uint16_t length;
270 uint32_t value;
271};
272
273struct of_bsn_tlv_tx_bytes : of_bsn_tlv {
274 uint16_t type == 39;
275 uint16_t length;
276 uint64_t value;
277};
Harshmeet Singhc1f2a392014-10-10 18:15:11 -0700278
Harshmeet Singh23fb16a2014-10-14 12:32:46 -0700279struct of_bsn_tlv_actor_system_priority: of_bsn_tlv {
Harshmeet Singhc1f2a392014-10-10 18:15:11 -0700280 uint16_t type == 40;
281 uint16_t length;
282 uint16_t value;
283};
284
Harshmeet Singh23fb16a2014-10-14 12:32:46 -0700285struct of_bsn_tlv_actor_system_mac: of_bsn_tlv {
Harshmeet Singhc1f2a392014-10-10 18:15:11 -0700286 uint16_t type == 41;
287 uint16_t length;
288 of_mac_addr_t value;
289};
290
Harshmeet Singh23fb16a2014-10-14 12:32:46 -0700291struct of_bsn_tlv_actor_port_priority: of_bsn_tlv {
Harshmeet Singhc1f2a392014-10-10 18:15:11 -0700292 uint16_t type == 42;
293 uint16_t length;
294 uint16_t value;
295};
296
Harshmeet Singh23fb16a2014-10-14 12:32:46 -0700297struct of_bsn_tlv_actor_port_num: of_bsn_tlv {
Harshmeet Singhc1f2a392014-10-10 18:15:11 -0700298 uint16_t type == 43;
299 uint16_t length;
300 uint16_t value;
301};
302
Harshmeet Singh23fb16a2014-10-14 12:32:46 -0700303struct of_bsn_tlv_actor_key: of_bsn_tlv {
Harshmeet Singhc1f2a392014-10-10 18:15:11 -0700304 uint16_t type == 44;
305 uint16_t length;
306 uint16_t value;
307};
308
309struct of_bsn_tlv_convergence_status: of_bsn_tlv {
310 uint16_t type == 45;
311 uint16_t length;
312 uint8_t value;
313};
Harshmeet Singh23fb16a2014-10-14 12:32:46 -0700314
315struct of_bsn_tlv_partner_system_priority: of_bsn_tlv {
316 uint16_t type == 47;
317 uint16_t length;
318 uint16_t value;
319};
320
321struct of_bsn_tlv_partner_system_mac: of_bsn_tlv {
322 uint16_t type == 48;
323 uint16_t length;
324 of_mac_addr_t value;
325};
326
327struct of_bsn_tlv_partner_port_priority: of_bsn_tlv {
328 uint16_t type == 49;
329 uint16_t length;
330 uint16_t value;
331};
332
333struct of_bsn_tlv_partner_port_num: of_bsn_tlv {
334 uint16_t type == 50;
335 uint16_t length;
336 uint16_t value;
337};
338
339struct of_bsn_tlv_partner_key: of_bsn_tlv {
340 uint16_t type == 51;
341 uint16_t length;
342 uint16_t value;
343};
Rich Lane991b9ff2014-10-17 12:30:44 -0700344
345struct of_bsn_tlv_name : of_bsn_tlv {
346 uint16_t type == 52;
347 uint16_t length;
348 of_octets_t value; /* UTF-8 encoded. Not null terminated. */
349};
Harshmeet Singh24ab88f2014-10-27 15:28:27 -0700350
Harshmeet Singh79135622014-10-27 16:11:14 -0700351enum ofp_bsn_lacp_state(wire_type=uint8_t, bitmask=True) {
352 OFP_BSN_LACP_STATE_ACTIVITY = 0x01,
353 OFP_BSN_LACP_STATE_TIMEOUT = 0x02,
354 OFP_BSN_LACP_STATE_AGGREGATION = 0x04,
355 OFP_BSN_LACP_STATE_SYNCHRONIZATION = 0x08,
356 OFP_BSN_LACP_STATE_COLLECTING = 0x10,
357 OFP_BSN_LACP_STATE_DISTRIBUTING = 0x20,
358 OFP_BSN_LACP_STATE_DEFAULTED = 0x40,
359 OFP_BSN_LACP_STATE_EXPIRED = 0x80,
360};
361
Harshmeet Singh24ab88f2014-10-27 15:28:27 -0700362struct of_bsn_tlv_actor_state: of_bsn_tlv {
363 uint16_t type == 53;
364 uint16_t length;
Harshmeet Singh79135622014-10-27 16:11:14 -0700365 enum ofp_bsn_lacp_state value;
Harshmeet Singh24ab88f2014-10-27 15:28:27 -0700366};
367
368struct of_bsn_tlv_partner_state: of_bsn_tlv {
369 uint16_t type == 54;
370 uint16_t length;
Harshmeet Singh79135622014-10-27 16:11:14 -0700371 enum ofp_bsn_lacp_state value;
Harshmeet Singh24ab88f2014-10-27 15:28:27 -0700372};
Rich Laned353d242014-11-05 10:11:19 -0800373
374struct of_bsn_tlv_data : of_bsn_tlv {
375 uint16_t type == 55;
376 uint16_t length;
377 of_octets_t value;
378};
Wilson Ng453c73a2014-11-05 11:35:36 -0800379
Wilson Ng6e6da302014-11-05 11:57:47 -0800380struct of_bsn_tlv_mac_mask : of_bsn_tlv {
Wilson Ng453c73a2014-11-05 11:35:36 -0800381 uint16_t type == 56;
382 uint16_t length;
383 of_mac_addr_t value;
384};
385
Wilson Ng6e6da302014-11-05 11:57:47 -0800386struct of_bsn_tlv_priority : of_bsn_tlv {
Wilson Ng453c73a2014-11-05 11:35:36 -0800387 uint16_t type == 57;
388 uint16_t length;
Wilson Ng0a2406a2014-11-05 14:01:51 -0800389 uint32_t value;
Wilson Ng453c73a2014-11-05 11:35:36 -0800390};
Harshmeet Singh6086fee2014-11-20 11:03:46 -0800391
392struct of_bsn_tlv_interval : of_bsn_tlv {
393 uint16_t type == 58;
394 uint16_t length;
Harshmeet Singhc717bc02014-11-20 12:51:38 -0800395 uint32_t value; /* Milliseconds */
Harshmeet Singh6086fee2014-11-20 11:03:46 -0800396};
Rich Lane4cf08bd2014-12-03 12:47:00 -0800397
398/* A reference to an entry in another gentable */
399struct of_bsn_tlv_reference : of_bsn_tlv {
400 uint16_t type == 59;
401 uint16_t length;
402 uint16_t table_id;
403 list(of_bsn_tlv_t) key;
404};
Rich Lane37632bc2014-12-05 15:01:22 -0800405
Harshmeet Singhdbe49822014-12-04 14:49:24 -0800406struct of_bsn_tlv_ipv4_netmask : of_bsn_tlv {
407 uint16_t type == 60;
408 uint16_t length;
409 of_ipv4_t value;
410};
Wilson Ngc68f5d02014-12-04 15:59:28 -0800411
412struct of_bsn_tlv_mpls_label : of_bsn_tlv {
413 uint16_t type == 61;
414 uint16_t length;
415 uint32_t value;
416};
417
418struct of_bsn_tlv_mpls_control_word : of_bsn_tlv {
419 uint16_t type == 62;
420 uint16_t length;
421 uint8_t value;
422};
423
424struct of_bsn_tlv_mpls_sequenced : of_bsn_tlv {
425 uint16_t type == 63;
426 uint16_t length;
427 uint8_t value;
428};
Rich Lane2eace7d2014-12-17 11:32:50 -0800429
430struct of_bsn_tlv_bucket : of_bsn_tlv {
431 uint16_t type == 64;
432 uint16_t length;
433 list(of_bsn_tlv_t) value;
434};
Rich Lanec0df60f2015-01-12 17:44:17 -0800435
436struct of_bsn_tlv_tcp_src : of_bsn_tlv {
437 uint16_t type == 65;
438 uint16_t length;
439 uint16_t value;
440};
441
442struct of_bsn_tlv_tcp_dst : of_bsn_tlv {
443 uint16_t type == 66;
444 uint16_t length;
445 uint16_t value;
446};
447
448struct of_bsn_tlv_ip_proto : of_bsn_tlv {
449 uint16_t type == 67;
450 uint16_t length;
451 uint8_t value;
452};
453
454struct of_bsn_tlv_icmp_type : of_bsn_tlv {
455 uint16_t type == 68;
456 uint16_t length;
457 uint8_t value;
458};
459
460struct of_bsn_tlv_icmp_code : of_bsn_tlv {
461 uint16_t type == 69;
462 uint16_t length;
463 uint8_t value;
464};
465
466struct of_bsn_tlv_icmp_id : of_bsn_tlv {
467 uint16_t type == 70;
468 uint16_t length;
469 uint16_t value;
470};
Rich Lane8ec889f2015-01-21 15:54:14 -0800471
472struct of_bsn_tlv_rx_bytes : of_bsn_tlv {
473 uint16_t type == 71;
474 uint16_t length;
475 uint64_t value;
476};
Harshmeet Singhbda83b62015-04-02 12:42:47 -0700477
478struct of_bsn_tlv_vlan_pcp : of_bsn_tlv {
479 uint16_t type == 72;
480 uint16_t length;
481 uint8_t value;
482};