blob: b18c6fb9e412d54899942027371479558b715485 [file] [log] [blame]
Rich Lane883919c2013-05-09 17:53:18 -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.
27//
28// Also derived from the OpenFlow header files which have these copyrights:
29// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
30// Copyright (c) 2011, 2012 Open Networking Foundation
31
32#version 3
33#version 4
34
35/* TODO fix the C backend to not require this */
36struct of_oxm {
37 uint32_t type_len;
38};
39
40
41struct of_oxm_arp_op {
Rich Lane31b87142013-05-09 22:05:42 -070042 uint32_t type_len == 0x80002a02;
Rich Lane883919c2013-05-09 17:53:18 -070043 uint16_t value;
44};
45
46struct of_oxm_arp_op_masked {
Rich Lane31b87142013-05-09 22:05:42 -070047 uint32_t type_len == 0x80002b04;
Rich Lane883919c2013-05-09 17:53:18 -070048 uint16_t value;
49 uint16_t value_mask;
50};
51
52struct of_oxm_arp_sha {
Rich Lane31b87142013-05-09 22:05:42 -070053 uint32_t type_len == 0x80003006;
Rich Lane883919c2013-05-09 17:53:18 -070054 of_mac_addr_t value;
55};
56
57struct of_oxm_arp_sha_masked {
Rich Lane31b87142013-05-09 22:05:42 -070058 uint32_t type_len == 0x8000310c;
Rich Lane883919c2013-05-09 17:53:18 -070059 of_mac_addr_t value;
60 of_mac_addr_t value_mask;
61};
62
63struct of_oxm_arp_spa {
Rich Lane31b87142013-05-09 22:05:42 -070064 uint32_t type_len == 0x80002c04;
Rich Lane883919c2013-05-09 17:53:18 -070065 uint32_t value;
66};
67
68struct of_oxm_arp_spa_masked {
Rich Lane31b87142013-05-09 22:05:42 -070069 uint32_t type_len == 0x80002d08;
Rich Lane883919c2013-05-09 17:53:18 -070070 uint32_t value;
71 uint32_t value_mask;
72};
73
74struct of_oxm_arp_tha {
Rich Lane31b87142013-05-09 22:05:42 -070075 uint32_t type_len == 0x80003206;
Rich Lane883919c2013-05-09 17:53:18 -070076 of_mac_addr_t value;
77};
78
79struct of_oxm_arp_tha_masked {
Rich Lane31b87142013-05-09 22:05:42 -070080 uint32_t type_len == 0x8000330c;
Rich Lane883919c2013-05-09 17:53:18 -070081 of_mac_addr_t value;
82 of_mac_addr_t value_mask;
83};
84
85struct of_oxm_arp_tpa {
Rich Lane31b87142013-05-09 22:05:42 -070086 uint32_t type_len == 0x80002e04;
Rich Lane883919c2013-05-09 17:53:18 -070087 uint32_t value;
88};
89
90struct of_oxm_arp_tpa_masked {
Rich Lane31b87142013-05-09 22:05:42 -070091 uint32_t type_len == 0x80002f08;
Rich Lane883919c2013-05-09 17:53:18 -070092 uint32_t value;
93 uint32_t value_mask;
94};
95
96struct of_oxm_eth_dst {
Rich Lane31b87142013-05-09 22:05:42 -070097 uint32_t type_len == 0x80000606;
Rich Lane883919c2013-05-09 17:53:18 -070098 of_mac_addr_t value;
99};
100
101struct of_oxm_eth_dst_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700102 uint32_t type_len == 0x8000070c;
Rich Lane883919c2013-05-09 17:53:18 -0700103 of_mac_addr_t value;
104 of_mac_addr_t value_mask;
105};
106
107struct of_oxm_eth_src {
Rich Lane31b87142013-05-09 22:05:42 -0700108 uint32_t type_len == 0x80000806;
Rich Lane883919c2013-05-09 17:53:18 -0700109 of_mac_addr_t value;
110};
111
112struct of_oxm_eth_src_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700113 uint32_t type_len == 0x8000090c;
Rich Lane883919c2013-05-09 17:53:18 -0700114 of_mac_addr_t value;
115 of_mac_addr_t value_mask;
116};
117
118struct of_oxm_eth_type {
Rich Lane31b87142013-05-09 22:05:42 -0700119 uint32_t type_len == 0x80000a02;
Rich Lane883919c2013-05-09 17:53:18 -0700120 uint16_t value;
121};
122
123struct of_oxm_eth_type_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700124 uint32_t type_len == 0x80000b04;
Rich Lane883919c2013-05-09 17:53:18 -0700125 uint16_t value;
126 uint16_t value_mask;
127};
128
129struct of_oxm_icmpv4_code {
Rich Lane31b87142013-05-09 22:05:42 -0700130 uint32_t type_len == 0x80002801;
Rich Lane883919c2013-05-09 17:53:18 -0700131 uint8_t value;
132};
133
134struct of_oxm_icmpv4_code_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700135 uint32_t type_len == 0x80002902;
Rich Lane883919c2013-05-09 17:53:18 -0700136 uint8_t value;
137 uint8_t value_mask;
138};
139
140struct of_oxm_icmpv4_type {
Rich Lane31b87142013-05-09 22:05:42 -0700141 uint32_t type_len == 0x80002601;
Rich Lane883919c2013-05-09 17:53:18 -0700142 uint8_t value;
143};
144
145struct of_oxm_icmpv4_type_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700146 uint32_t type_len == 0x80002702;
Rich Lane883919c2013-05-09 17:53:18 -0700147 uint8_t value;
148 uint8_t value_mask;
149};
150
151struct of_oxm_icmpv6_code {
Rich Lane31b87142013-05-09 22:05:42 -0700152 uint32_t type_len == 0x80003c01;
Rich Lane883919c2013-05-09 17:53:18 -0700153 uint8_t value;
154};
155
156struct of_oxm_icmpv6_code_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700157 uint32_t type_len == 0x80003d02;
Rich Lane883919c2013-05-09 17:53:18 -0700158 uint8_t value;
159 uint8_t value_mask;
160};
161
162struct of_oxm_icmpv6_type {
Rich Lane31b87142013-05-09 22:05:42 -0700163 uint32_t type_len == 0x80003a01;
Rich Lane883919c2013-05-09 17:53:18 -0700164 uint8_t value;
165};
166
167struct of_oxm_icmpv6_type_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700168 uint32_t type_len == 0x80003b02;
Rich Lane883919c2013-05-09 17:53:18 -0700169 uint8_t value;
170 uint8_t value_mask;
171};
172
173struct of_oxm_in_phy_port {
Rich Lane31b87142013-05-09 22:05:42 -0700174 uint32_t type_len == 0x80000204;
Rich Lane883919c2013-05-09 17:53:18 -0700175 of_port_no_t value;
176};
177
178struct of_oxm_in_phy_port_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700179 uint32_t type_len == 0x80000308;
Rich Lane883919c2013-05-09 17:53:18 -0700180 of_port_no_t value;
181 of_port_no_t value_mask;
182};
183
184struct of_oxm_in_port {
Rich Lane31b87142013-05-09 22:05:42 -0700185 uint32_t type_len == 0x80000004;
Rich Lane883919c2013-05-09 17:53:18 -0700186 of_port_no_t value;
187};
188
189struct of_oxm_in_port_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700190 uint32_t type_len == 0x80000108;
Rich Lane883919c2013-05-09 17:53:18 -0700191 of_port_no_t value;
192 of_port_no_t value_mask;
193};
194
195struct of_oxm_ip_dscp {
Rich Lane31b87142013-05-09 22:05:42 -0700196 uint32_t type_len == 0x80001001;
Rich Lane883919c2013-05-09 17:53:18 -0700197 uint8_t value;
198};
199
200struct of_oxm_ip_dscp_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700201 uint32_t type_len == 0x80001102;
Rich Lane883919c2013-05-09 17:53:18 -0700202 uint8_t value;
203 uint8_t value_mask;
204};
205
206struct of_oxm_ip_ecn {
Rich Lane31b87142013-05-09 22:05:42 -0700207 uint32_t type_len == 0x80001201;
Rich Lane883919c2013-05-09 17:53:18 -0700208 uint8_t value;
209};
210
211struct of_oxm_ip_ecn_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700212 uint32_t type_len == 0x80001302;
Rich Lane883919c2013-05-09 17:53:18 -0700213 uint8_t value;
214 uint8_t value_mask;
215};
216
217struct of_oxm_ip_proto {
Rich Lane31b87142013-05-09 22:05:42 -0700218 uint32_t type_len == 0x80001401;
Rich Lane883919c2013-05-09 17:53:18 -0700219 uint8_t value;
220};
221
222struct of_oxm_ip_proto_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700223 uint32_t type_len == 0x80001502;
Rich Lane883919c2013-05-09 17:53:18 -0700224 uint8_t value;
225 uint8_t value_mask;
226};
227
228struct of_oxm_ipv4_dst {
Rich Lane31b87142013-05-09 22:05:42 -0700229 uint32_t type_len == 0x80001804;
Rich Lane883919c2013-05-09 17:53:18 -0700230 uint32_t value;
231};
232
233struct of_oxm_ipv4_dst_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700234 uint32_t type_len == 0x80001908;
Rich Lane883919c2013-05-09 17:53:18 -0700235 uint32_t value;
236 uint32_t value_mask;
237};
238
239struct of_oxm_ipv4_src {
Rich Lane31b87142013-05-09 22:05:42 -0700240 uint32_t type_len == 0x80001604;
Rich Lane883919c2013-05-09 17:53:18 -0700241 uint32_t value;
242};
243
244struct of_oxm_ipv4_src_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700245 uint32_t type_len == 0x80001708;
Rich Lane883919c2013-05-09 17:53:18 -0700246 uint32_t value;
247 uint32_t value_mask;
248};
249
250struct of_oxm_ipv6_dst {
Rich Lane31b87142013-05-09 22:05:42 -0700251 uint32_t type_len == 0x80003610;
Rich Lane883919c2013-05-09 17:53:18 -0700252 of_ipv6_t value;
253};
254
255struct of_oxm_ipv6_dst_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700256 uint32_t type_len == 0x80003720;
Rich Lane883919c2013-05-09 17:53:18 -0700257 of_ipv6_t value;
258 of_ipv6_t value_mask;
259};
260
261struct of_oxm_ipv6_flabel {
Rich Lane31b87142013-05-09 22:05:42 -0700262 uint32_t type_len == 0x80003804;
Rich Lane883919c2013-05-09 17:53:18 -0700263 uint32_t value;
264};
265
266struct of_oxm_ipv6_flabel_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700267 uint32_t type_len == 0x80003908;
Rich Lane883919c2013-05-09 17:53:18 -0700268 uint32_t value;
269 uint32_t value_mask;
270};
271
272struct of_oxm_ipv6_nd_sll {
Rich Lane31b87142013-05-09 22:05:42 -0700273 uint32_t type_len == 0x80004006;
Rich Lane883919c2013-05-09 17:53:18 -0700274 of_mac_addr_t value;
275};
276
277struct of_oxm_ipv6_nd_sll_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700278 uint32_t type_len == 0x8000410c;
Rich Lane883919c2013-05-09 17:53:18 -0700279 of_mac_addr_t value;
280 of_mac_addr_t value_mask;
281};
282
283struct of_oxm_ipv6_nd_target {
Rich Lane31b87142013-05-09 22:05:42 -0700284 uint32_t type_len == 0x80003e10;
Rich Lane883919c2013-05-09 17:53:18 -0700285 of_ipv6_t value;
286};
287
288struct of_oxm_ipv6_nd_target_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700289 uint32_t type_len == 0x80003f20;
Rich Lane883919c2013-05-09 17:53:18 -0700290 of_ipv6_t value;
291 of_ipv6_t value_mask;
292};
293
294struct of_oxm_ipv6_nd_tll {
Rich Lane31b87142013-05-09 22:05:42 -0700295 uint32_t type_len == 0x80004206;
Rich Lane883919c2013-05-09 17:53:18 -0700296 of_mac_addr_t value;
297};
298
299struct of_oxm_ipv6_nd_tll_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700300 uint32_t type_len == 0x8000430c;
Rich Lane883919c2013-05-09 17:53:18 -0700301 of_mac_addr_t value;
302 of_mac_addr_t value_mask;
303};
304
305struct of_oxm_ipv6_src {
Rich Lane31b87142013-05-09 22:05:42 -0700306 uint32_t type_len == 0x80003410;
Rich Lane883919c2013-05-09 17:53:18 -0700307 of_ipv6_t value;
308};
309
310struct of_oxm_ipv6_src_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700311 uint32_t type_len == 0x80003520;
Rich Lane883919c2013-05-09 17:53:18 -0700312 of_ipv6_t value;
313 of_ipv6_t value_mask;
314};
315
316struct of_oxm_metadata {
Rich Lane31b87142013-05-09 22:05:42 -0700317 uint32_t type_len == 0x80000408;
Rich Lane883919c2013-05-09 17:53:18 -0700318 uint64_t value;
319};
320
321struct of_oxm_metadata_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700322 uint32_t type_len == 0x80000510;
Rich Lane883919c2013-05-09 17:53:18 -0700323 uint64_t value;
324 uint64_t value_mask;
325};
326
327struct of_oxm_mpls_label {
Rich Lane31b87142013-05-09 22:05:42 -0700328 uint32_t type_len == 0x80004404;
Rich Lane883919c2013-05-09 17:53:18 -0700329 uint32_t value;
330};
331
332struct of_oxm_mpls_label_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700333 uint32_t type_len == 0x80004508;
Rich Lane883919c2013-05-09 17:53:18 -0700334 uint32_t value;
335 uint32_t value_mask;
336};
337
338struct of_oxm_mpls_tc {
Rich Lane31b87142013-05-09 22:05:42 -0700339 uint32_t type_len == 0x80004601;
Rich Lane883919c2013-05-09 17:53:18 -0700340 uint8_t value;
341};
342
343struct of_oxm_mpls_tc_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700344 uint32_t type_len == 0x80004702;
Rich Lane883919c2013-05-09 17:53:18 -0700345 uint8_t value;
346 uint8_t value_mask;
347};
348
349struct of_oxm_sctp_dst {
Rich Lane31b87142013-05-09 22:05:42 -0700350 uint32_t type_len == 0x80002402;
Rich Lane883919c2013-05-09 17:53:18 -0700351 uint16_t value;
352};
353
354struct of_oxm_sctp_dst_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700355 uint32_t type_len == 0x80002504;
Rich Lane883919c2013-05-09 17:53:18 -0700356 uint16_t value;
357 uint16_t value_mask;
358};
359
360struct of_oxm_sctp_src {
Rich Lane31b87142013-05-09 22:05:42 -0700361 uint32_t type_len == 0x80002202;
Rich Lane883919c2013-05-09 17:53:18 -0700362 uint16_t value;
363};
364
365struct of_oxm_sctp_src_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700366 uint32_t type_len == 0x80002304;
Rich Lane883919c2013-05-09 17:53:18 -0700367 uint16_t value;
368 uint16_t value_mask;
369};
370
371struct of_oxm_tcp_dst {
Rich Lane31b87142013-05-09 22:05:42 -0700372 uint32_t type_len == 0x80001c02;
Rich Lane883919c2013-05-09 17:53:18 -0700373 uint16_t value;
374};
375
376struct of_oxm_tcp_dst_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700377 uint32_t type_len == 0x80001d04;
Rich Lane883919c2013-05-09 17:53:18 -0700378 uint16_t value;
379 uint16_t value_mask;
380};
381
382struct of_oxm_tcp_src {
Rich Lane31b87142013-05-09 22:05:42 -0700383 uint32_t type_len == 0x80001a02;
Rich Lane883919c2013-05-09 17:53:18 -0700384 uint16_t value;
385};
386
387struct of_oxm_tcp_src_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700388 uint32_t type_len == 0x80001b04;
Rich Lane883919c2013-05-09 17:53:18 -0700389 uint16_t value;
390 uint16_t value_mask;
391};
392
393struct of_oxm_udp_dst {
Rich Lane31b87142013-05-09 22:05:42 -0700394 uint32_t type_len == 0x80002002;
Rich Lane883919c2013-05-09 17:53:18 -0700395 uint16_t value;
396};
397
398struct of_oxm_udp_dst_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700399 uint32_t type_len == 0x80002104;
Rich Lane883919c2013-05-09 17:53:18 -0700400 uint16_t value;
401 uint16_t value_mask;
402};
403
404struct of_oxm_udp_src {
Rich Lane31b87142013-05-09 22:05:42 -0700405 uint32_t type_len == 0x80001e02;
Rich Lane883919c2013-05-09 17:53:18 -0700406 uint16_t value;
407};
408
409struct of_oxm_udp_src_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700410 uint32_t type_len == 0x80001f04;
Rich Lane883919c2013-05-09 17:53:18 -0700411 uint16_t value;
412 uint16_t value_mask;
413};
414
415struct of_oxm_vlan_pcp {
Rich Lane31b87142013-05-09 22:05:42 -0700416 uint32_t type_len == 0x80000e01;
Rich Lane883919c2013-05-09 17:53:18 -0700417 uint8_t value;
418};
419
420struct of_oxm_vlan_pcp_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700421 uint32_t type_len == 0x80000f02;
Rich Lane883919c2013-05-09 17:53:18 -0700422 uint8_t value;
423 uint8_t value_mask;
424};
425
426struct of_oxm_vlan_vid {
Rich Lane31b87142013-05-09 22:05:42 -0700427 uint32_t type_len == 0x80000c02;
Rich Lane883919c2013-05-09 17:53:18 -0700428 uint16_t value;
429};
430
431struct of_oxm_vlan_vid_masked {
Rich Lane31b87142013-05-09 22:05:42 -0700432 uint32_t type_len == 0x80000d04;
Rich Lane883919c2013-05-09 17:53:18 -0700433 uint16_t value;
434 uint16_t value_mask;
435};