blob: cf8c59ffb6f4384927b55df52437ba96d25b79e2 [file] [log] [blame]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001# Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
2# Copyright (c) 2011, 2012 Open Networking Foundation
3# Copyright (c) 2012, 2013 Big Switch Networks, Inc.
Dan Talaycof6202252013-07-02 01:00:29 -07004# See the file LICENSE.pyloxi which should have been included in the source distribution
Rich Lanec2ee4b82013-04-24 17:12:38 -07005
Rich Lane7dcdf022013-12-11 14:45:27 -08006# Automatically generated by LOXI from template module.py
Rich Lanec2ee4b82013-04-24 17:12:38 -07007# Do not modify
8
9import struct
Rich Lane7dcdf022013-12-11 14:45:27 -080010import loxi
Rich Lanec2ee4b82013-04-24 17:12:38 -070011import const
Harshmeet Singh1db46332014-10-14 16:29:13 -070012import bsn_tlv
13import meter_band
Rich Lane7dcdf022013-12-11 14:45:27 -080014import instruction
15import oxm
Harshmeet Singh1db46332014-10-14 16:29:13 -070016import common
Rich Lane7dcdf022013-12-11 14:45:27 -080017import instruction_id
Harshmeet Singh1db46332014-10-14 16:29:13 -070018import action
19import message
20import action_id
Rich Lanec2ee4b82013-04-24 17:12:38 -070021import util
22import loxi.generic_util
Rich Lanec2ee4b82013-04-24 17:12:38 -070023
Rich Lane7dcdf022013-12-11 14:45:27 -080024class oxm(loxi.OFObject):
25 subtypes = {}
Rich Laned53156a2013-08-05 17:17:33 -070026
Rich Lane95f7fc92014-01-27 17:08:16 -080027
28 def __init__(self, type_len=None):
29 if type_len != None:
30 self.type_len = type_len
31 else:
32 self.type_len = 0
33 return
34
35 def pack(self):
36 packed = []
37 packed.append(struct.pack("!L", self.type_len))
38 return ''.join(packed)
39
Rich Lane7dcdf022013-12-11 14:45:27 -080040 @staticmethod
41 def unpack(reader):
42 subtype, = reader.peek('!L', 0)
Rich Lane95f7fc92014-01-27 17:08:16 -080043 subclass = oxm.subtypes.get(subtype)
44 if subclass:
45 return subclass.unpack(reader)
46
47 obj = oxm()
48 obj.type_len = reader.read("!L")[0]
49 return obj
50
51 def __eq__(self, other):
52 if type(self) != type(other): return False
53 if self.type_len != other.type_len: return False
54 return True
55
56 def pretty_print(self, q):
57 q.text("oxm {")
58 with q.group():
59 with q.indent(2):
60 q.breakable()
61 q.breakable()
62 q.text('}')
Rich Lanec2ee4b82013-04-24 17:12:38 -070063
Rich Lanec2ee4b82013-04-24 17:12:38 -070064
Rich Lane7dcdf022013-12-11 14:45:27 -080065class arp_op(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -070066 type_len = 2147494402
Rich Lanec2ee4b82013-04-24 17:12:38 -070067
68 def __init__(self, value=None):
69 if value != None:
70 self.value = value
71 else:
72 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -080073 return
Rich Lanec2ee4b82013-04-24 17:12:38 -070074
75 def pack(self):
76 packed = []
77 packed.append(struct.pack("!L", self.type_len))
78 packed.append(struct.pack("!H", self.value))
79 return ''.join(packed)
80
81 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -080082 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -070083 obj = arp_op()
Dan Talaycof6202252013-07-02 01:00:29 -070084 _type_len = reader.read("!L")[0]
85 assert(_type_len == 2147494402)
86 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -070087 return obj
88
89 def __eq__(self, other):
90 if type(self) != type(other): return False
91 if self.value != other.value: return False
92 return True
93
Rich Lanec2ee4b82013-04-24 17:12:38 -070094 def pretty_print(self, q):
95 q.text("arp_op {")
96 with q.group():
97 with q.indent(2):
98 q.breakable()
99 q.text("value = ");
100 q.text("%#x" % self.value)
101 q.breakable()
102 q.text('}')
103
Rich Lane7dcdf022013-12-11 14:45:27 -0800104oxm.subtypes[2147494402] = arp_op
105
106class arp_op_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700107 type_len = 2147494660
Rich Lanec2ee4b82013-04-24 17:12:38 -0700108
109 def __init__(self, value=None, value_mask=None):
110 if value != None:
111 self.value = value
112 else:
113 self.value = 0
114 if value_mask != None:
115 self.value_mask = value_mask
116 else:
117 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800118 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700119
120 def pack(self):
121 packed = []
122 packed.append(struct.pack("!L", self.type_len))
123 packed.append(struct.pack("!H", self.value))
124 packed.append(struct.pack("!H", self.value_mask))
125 return ''.join(packed)
126
127 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800128 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700129 obj = arp_op_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700130 _type_len = reader.read("!L")[0]
131 assert(_type_len == 2147494660)
132 obj.value = reader.read("!H")[0]
133 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700134 return obj
135
136 def __eq__(self, other):
137 if type(self) != type(other): return False
138 if self.value != other.value: return False
139 if self.value_mask != other.value_mask: return False
140 return True
141
Rich Lanec2ee4b82013-04-24 17:12:38 -0700142 def pretty_print(self, q):
143 q.text("arp_op_masked {")
144 with q.group():
145 with q.indent(2):
146 q.breakable()
147 q.text("value = ");
148 q.text("%#x" % self.value)
149 q.text(","); q.breakable()
150 q.text("value_mask = ");
151 q.text("%#x" % self.value_mask)
152 q.breakable()
153 q.text('}')
154
Rich Lane7dcdf022013-12-11 14:45:27 -0800155oxm.subtypes[2147494660] = arp_op_masked
156
157class arp_sha(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700158 type_len = 2147495942
Rich Lanec2ee4b82013-04-24 17:12:38 -0700159
160 def __init__(self, value=None):
161 if value != None:
162 self.value = value
163 else:
164 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800165 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700166
167 def pack(self):
168 packed = []
169 packed.append(struct.pack("!L", self.type_len))
170 packed.append(struct.pack("!6B", *self.value))
171 return ''.join(packed)
172
173 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800174 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700175 obj = arp_sha()
Dan Talaycof6202252013-07-02 01:00:29 -0700176 _type_len = reader.read("!L")[0]
177 assert(_type_len == 2147495942)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700178 obj.value = list(reader.read('!6B'))
179 return obj
180
181 def __eq__(self, other):
182 if type(self) != type(other): return False
183 if self.value != other.value: return False
184 return True
185
Rich Lanec2ee4b82013-04-24 17:12:38 -0700186 def pretty_print(self, q):
187 q.text("arp_sha {")
188 with q.group():
189 with q.indent(2):
190 q.breakable()
191 q.text("value = ");
192 q.text(util.pretty_mac(self.value))
193 q.breakable()
194 q.text('}')
195
Rich Lane7dcdf022013-12-11 14:45:27 -0800196oxm.subtypes[2147495942] = arp_sha
197
198class arp_sha_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700199 type_len = 2147496204
Rich Lanec2ee4b82013-04-24 17:12:38 -0700200
201 def __init__(self, value=None, value_mask=None):
202 if value != None:
203 self.value = value
204 else:
205 self.value = [0,0,0,0,0,0]
206 if value_mask != None:
207 self.value_mask = value_mask
208 else:
209 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800210 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700211
212 def pack(self):
213 packed = []
214 packed.append(struct.pack("!L", self.type_len))
215 packed.append(struct.pack("!6B", *self.value))
216 packed.append(struct.pack("!6B", *self.value_mask))
217 return ''.join(packed)
218
219 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800220 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700221 obj = arp_sha_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700222 _type_len = reader.read("!L")[0]
223 assert(_type_len == 2147496204)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700224 obj.value = list(reader.read('!6B'))
225 obj.value_mask = list(reader.read('!6B'))
226 return obj
227
228 def __eq__(self, other):
229 if type(self) != type(other): return False
230 if self.value != other.value: return False
231 if self.value_mask != other.value_mask: return False
232 return True
233
Rich Lanec2ee4b82013-04-24 17:12:38 -0700234 def pretty_print(self, q):
235 q.text("arp_sha_masked {")
236 with q.group():
237 with q.indent(2):
238 q.breakable()
239 q.text("value = ");
240 q.text(util.pretty_mac(self.value))
241 q.text(","); q.breakable()
242 q.text("value_mask = ");
243 q.text(util.pretty_mac(self.value_mask))
244 q.breakable()
245 q.text('}')
246
Rich Lane7dcdf022013-12-11 14:45:27 -0800247oxm.subtypes[2147496204] = arp_sha_masked
248
249class arp_spa(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700250 type_len = 2147494916
Rich Lanec2ee4b82013-04-24 17:12:38 -0700251
252 def __init__(self, value=None):
253 if value != None:
254 self.value = value
255 else:
256 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800257 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700258
259 def pack(self):
260 packed = []
261 packed.append(struct.pack("!L", self.type_len))
262 packed.append(struct.pack("!L", self.value))
263 return ''.join(packed)
264
265 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800266 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700267 obj = arp_spa()
Dan Talaycof6202252013-07-02 01:00:29 -0700268 _type_len = reader.read("!L")[0]
269 assert(_type_len == 2147494916)
270 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700271 return obj
272
273 def __eq__(self, other):
274 if type(self) != type(other): return False
275 if self.value != other.value: return False
276 return True
277
Rich Lanec2ee4b82013-04-24 17:12:38 -0700278 def pretty_print(self, q):
279 q.text("arp_spa {")
280 with q.group():
281 with q.indent(2):
282 q.breakable()
283 q.text("value = ");
284 q.text("%#x" % self.value)
285 q.breakable()
286 q.text('}')
287
Rich Lane7dcdf022013-12-11 14:45:27 -0800288oxm.subtypes[2147494916] = arp_spa
289
290class arp_spa_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700291 type_len = 2147495176
Rich Lanec2ee4b82013-04-24 17:12:38 -0700292
293 def __init__(self, value=None, value_mask=None):
294 if value != None:
295 self.value = value
296 else:
297 self.value = 0
298 if value_mask != None:
299 self.value_mask = value_mask
300 else:
301 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800302 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700303
304 def pack(self):
305 packed = []
306 packed.append(struct.pack("!L", self.type_len))
307 packed.append(struct.pack("!L", self.value))
308 packed.append(struct.pack("!L", self.value_mask))
309 return ''.join(packed)
310
311 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800312 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700313 obj = arp_spa_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700314 _type_len = reader.read("!L")[0]
315 assert(_type_len == 2147495176)
316 obj.value = reader.read("!L")[0]
317 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700318 return obj
319
320 def __eq__(self, other):
321 if type(self) != type(other): return False
322 if self.value != other.value: return False
323 if self.value_mask != other.value_mask: return False
324 return True
325
Rich Lanec2ee4b82013-04-24 17:12:38 -0700326 def pretty_print(self, q):
327 q.text("arp_spa_masked {")
328 with q.group():
329 with q.indent(2):
330 q.breakable()
331 q.text("value = ");
332 q.text("%#x" % self.value)
333 q.text(","); q.breakable()
334 q.text("value_mask = ");
335 q.text("%#x" % self.value_mask)
336 q.breakable()
337 q.text('}')
338
Rich Lane7dcdf022013-12-11 14:45:27 -0800339oxm.subtypes[2147495176] = arp_spa_masked
340
341class arp_tha(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700342 type_len = 2147496454
Rich Lanec2ee4b82013-04-24 17:12:38 -0700343
344 def __init__(self, value=None):
345 if value != None:
346 self.value = value
347 else:
348 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800349 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700350
351 def pack(self):
352 packed = []
353 packed.append(struct.pack("!L", self.type_len))
354 packed.append(struct.pack("!6B", *self.value))
355 return ''.join(packed)
356
357 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800358 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700359 obj = arp_tha()
Dan Talaycof6202252013-07-02 01:00:29 -0700360 _type_len = reader.read("!L")[0]
361 assert(_type_len == 2147496454)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700362 obj.value = list(reader.read('!6B'))
363 return obj
364
365 def __eq__(self, other):
366 if type(self) != type(other): return False
367 if self.value != other.value: return False
368 return True
369
Rich Lanec2ee4b82013-04-24 17:12:38 -0700370 def pretty_print(self, q):
371 q.text("arp_tha {")
372 with q.group():
373 with q.indent(2):
374 q.breakable()
375 q.text("value = ");
376 q.text(util.pretty_mac(self.value))
377 q.breakable()
378 q.text('}')
379
Rich Lane7dcdf022013-12-11 14:45:27 -0800380oxm.subtypes[2147496454] = arp_tha
381
382class arp_tha_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700383 type_len = 2147496716
Rich Lanec2ee4b82013-04-24 17:12:38 -0700384
385 def __init__(self, value=None, value_mask=None):
386 if value != None:
387 self.value = value
388 else:
389 self.value = [0,0,0,0,0,0]
390 if value_mask != None:
391 self.value_mask = value_mask
392 else:
393 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800394 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700395
396 def pack(self):
397 packed = []
398 packed.append(struct.pack("!L", self.type_len))
399 packed.append(struct.pack("!6B", *self.value))
400 packed.append(struct.pack("!6B", *self.value_mask))
401 return ''.join(packed)
402
403 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800404 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700405 obj = arp_tha_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700406 _type_len = reader.read("!L")[0]
407 assert(_type_len == 2147496716)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700408 obj.value = list(reader.read('!6B'))
409 obj.value_mask = list(reader.read('!6B'))
410 return obj
411
412 def __eq__(self, other):
413 if type(self) != type(other): return False
414 if self.value != other.value: return False
415 if self.value_mask != other.value_mask: return False
416 return True
417
Rich Lanec2ee4b82013-04-24 17:12:38 -0700418 def pretty_print(self, q):
419 q.text("arp_tha_masked {")
420 with q.group():
421 with q.indent(2):
422 q.breakable()
423 q.text("value = ");
424 q.text(util.pretty_mac(self.value))
425 q.text(","); q.breakable()
426 q.text("value_mask = ");
427 q.text(util.pretty_mac(self.value_mask))
428 q.breakable()
429 q.text('}')
430
Rich Lane7dcdf022013-12-11 14:45:27 -0800431oxm.subtypes[2147496716] = arp_tha_masked
432
433class arp_tpa(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700434 type_len = 2147495428
Rich Lanec2ee4b82013-04-24 17:12:38 -0700435
436 def __init__(self, value=None):
437 if value != None:
438 self.value = value
439 else:
440 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800441 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700442
443 def pack(self):
444 packed = []
445 packed.append(struct.pack("!L", self.type_len))
446 packed.append(struct.pack("!L", self.value))
447 return ''.join(packed)
448
449 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800450 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700451 obj = arp_tpa()
Dan Talaycof6202252013-07-02 01:00:29 -0700452 _type_len = reader.read("!L")[0]
453 assert(_type_len == 2147495428)
454 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700455 return obj
456
457 def __eq__(self, other):
458 if type(self) != type(other): return False
459 if self.value != other.value: return False
460 return True
461
Rich Lanec2ee4b82013-04-24 17:12:38 -0700462 def pretty_print(self, q):
463 q.text("arp_tpa {")
464 with q.group():
465 with q.indent(2):
466 q.breakable()
467 q.text("value = ");
468 q.text("%#x" % self.value)
469 q.breakable()
470 q.text('}')
471
Rich Lane7dcdf022013-12-11 14:45:27 -0800472oxm.subtypes[2147495428] = arp_tpa
473
474class arp_tpa_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700475 type_len = 2147495688
Rich Lanec2ee4b82013-04-24 17:12:38 -0700476
477 def __init__(self, value=None, value_mask=None):
478 if value != None:
479 self.value = value
480 else:
481 self.value = 0
482 if value_mask != None:
483 self.value_mask = value_mask
484 else:
485 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800486 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700487
488 def pack(self):
489 packed = []
490 packed.append(struct.pack("!L", self.type_len))
491 packed.append(struct.pack("!L", self.value))
492 packed.append(struct.pack("!L", self.value_mask))
493 return ''.join(packed)
494
495 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800496 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700497 obj = arp_tpa_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700498 _type_len = reader.read("!L")[0]
499 assert(_type_len == 2147495688)
500 obj.value = reader.read("!L")[0]
501 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700502 return obj
503
504 def __eq__(self, other):
505 if type(self) != type(other): return False
506 if self.value != other.value: return False
507 if self.value_mask != other.value_mask: return False
508 return True
509
Rich Lanec2ee4b82013-04-24 17:12:38 -0700510 def pretty_print(self, q):
511 q.text("arp_tpa_masked {")
512 with q.group():
513 with q.indent(2):
514 q.breakable()
515 q.text("value = ");
516 q.text("%#x" % self.value)
517 q.text(","); q.breakable()
518 q.text("value_mask = ");
519 q.text("%#x" % self.value_mask)
520 q.breakable()
521 q.text('}')
522
Rich Lane7dcdf022013-12-11 14:45:27 -0800523oxm.subtypes[2147495688] = arp_tpa_masked
524
Rich Lanec0d05d12014-03-11 18:02:24 -0700525class bsn_egr_port_group_id(oxm):
526 type_len = 200196
527
528 def __init__(self, value=None):
529 if value != None:
530 self.value = value
531 else:
532 self.value = 0
533 return
534
535 def pack(self):
536 packed = []
537 packed.append(struct.pack("!L", self.type_len))
538 packed.append(struct.pack("!L", self.value))
539 return ''.join(packed)
540
541 @staticmethod
542 def unpack(reader):
543 obj = bsn_egr_port_group_id()
544 _type_len = reader.read("!L")[0]
545 assert(_type_len == 200196)
546 obj.value = reader.read("!L")[0]
547 return obj
548
549 def __eq__(self, other):
550 if type(self) != type(other): return False
551 if self.value != other.value: return False
552 return True
553
554 def pretty_print(self, q):
555 q.text("bsn_egr_port_group_id {")
556 with q.group():
557 with q.indent(2):
558 q.breakable()
559 q.text("value = ");
560 q.text("%#x" % self.value)
561 q.breakable()
562 q.text('}')
563
564oxm.subtypes[200196] = bsn_egr_port_group_id
565
566class bsn_egr_port_group_id_masked(oxm):
567 type_len = 200456
568
569 def __init__(self, value=None, value_mask=None):
570 if value != None:
571 self.value = value
572 else:
573 self.value = 0
574 if value_mask != None:
575 self.value_mask = value_mask
576 else:
577 self.value_mask = 0
578 return
579
580 def pack(self):
581 packed = []
582 packed.append(struct.pack("!L", self.type_len))
583 packed.append(struct.pack("!L", self.value))
584 packed.append(struct.pack("!L", self.value_mask))
585 return ''.join(packed)
586
587 @staticmethod
588 def unpack(reader):
589 obj = bsn_egr_port_group_id_masked()
590 _type_len = reader.read("!L")[0]
591 assert(_type_len == 200456)
592 obj.value = reader.read("!L")[0]
593 obj.value_mask = reader.read("!L")[0]
594 return obj
595
596 def __eq__(self, other):
597 if type(self) != type(other): return False
598 if self.value != other.value: return False
599 if self.value_mask != other.value_mask: return False
600 return True
601
602 def pretty_print(self, q):
603 q.text("bsn_egr_port_group_id_masked {")
604 with q.group():
605 with q.indent(2):
606 q.breakable()
607 q.text("value = ");
608 q.text("%#x" % self.value)
609 q.text(","); q.breakable()
610 q.text("value_mask = ");
611 q.text("%#x" % self.value_mask)
612 q.breakable()
613 q.text('}')
614
615oxm.subtypes[200456] = bsn_egr_port_group_id_masked
616
Rich Lane7dcdf022013-12-11 14:45:27 -0800617class bsn_global_vrf_allowed(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800618 type_len = 198145
619
620 def __init__(self, value=None):
621 if value != None:
622 self.value = value
623 else:
624 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800625 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800626
627 def pack(self):
628 packed = []
629 packed.append(struct.pack("!L", self.type_len))
630 packed.append(struct.pack("!B", self.value))
631 return ''.join(packed)
632
633 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800634 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800635 obj = bsn_global_vrf_allowed()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800636 _type_len = reader.read("!L")[0]
637 assert(_type_len == 198145)
638 obj.value = reader.read("!B")[0]
639 return obj
640
641 def __eq__(self, other):
642 if type(self) != type(other): return False
643 if self.value != other.value: return False
644 return True
645
Rich Laned9e3f7b2013-11-04 11:40:43 -0800646 def pretty_print(self, q):
647 q.text("bsn_global_vrf_allowed {")
648 with q.group():
649 with q.indent(2):
650 q.breakable()
651 q.text("value = ");
652 q.text("%#x" % self.value)
653 q.breakable()
654 q.text('}')
655
Rich Lane7dcdf022013-12-11 14:45:27 -0800656oxm.subtypes[198145] = bsn_global_vrf_allowed
657
658class bsn_global_vrf_allowed_masked(oxm):
659 type_len = 198402
Rich Laned9e3f7b2013-11-04 11:40:43 -0800660
661 def __init__(self, value=None, value_mask=None):
662 if value != None:
663 self.value = value
664 else:
665 self.value = 0
666 if value_mask != None:
667 self.value_mask = value_mask
668 else:
669 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800670 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800671
672 def pack(self):
673 packed = []
674 packed.append(struct.pack("!L", self.type_len))
675 packed.append(struct.pack("!B", self.value))
676 packed.append(struct.pack("!B", self.value_mask))
677 return ''.join(packed)
678
679 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800680 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800681 obj = bsn_global_vrf_allowed_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800682 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800683 assert(_type_len == 198402)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800684 obj.value = reader.read("!B")[0]
685 obj.value_mask = reader.read("!B")[0]
686 return obj
687
688 def __eq__(self, other):
689 if type(self) != type(other): return False
690 if self.value != other.value: return False
691 if self.value_mask != other.value_mask: return False
692 return True
693
Rich Laned9e3f7b2013-11-04 11:40:43 -0800694 def pretty_print(self, q):
695 q.text("bsn_global_vrf_allowed_masked {")
696 with q.group():
697 with q.indent(2):
698 q.breakable()
699 q.text("value = ");
700 q.text("%#x" % self.value)
701 q.text(","); q.breakable()
702 q.text("value_mask = ");
703 q.text("%#x" % self.value_mask)
704 q.breakable()
705 q.text('}')
706
Rich Lane7dcdf022013-12-11 14:45:27 -0800707oxm.subtypes[198402] = bsn_global_vrf_allowed_masked
708
709class bsn_in_ports_128(oxm):
710 type_len = 196624
Rich Lane6f4978c2013-10-20 21:33:52 -0700711
712 def __init__(self, value=None):
713 if value != None:
714 self.value = value
715 else:
716 self.value = set()
Rich Lane7dcdf022013-12-11 14:45:27 -0800717 return
Rich Lane6f4978c2013-10-20 21:33:52 -0700718
719 def pack(self):
720 packed = []
721 packed.append(struct.pack("!L", self.type_len))
722 packed.append(util.pack_bitmap_128(self.value))
723 return ''.join(packed)
724
725 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800726 def unpack(reader):
Rich Lane6f4978c2013-10-20 21:33:52 -0700727 obj = bsn_in_ports_128()
Rich Lane6f4978c2013-10-20 21:33:52 -0700728 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800729 assert(_type_len == 196624)
Rich Lane6f4978c2013-10-20 21:33:52 -0700730 obj.value = util.unpack_bitmap_128(reader)
731 return obj
732
733 def __eq__(self, other):
734 if type(self) != type(other): return False
735 if self.value != other.value: return False
736 return True
737
Rich Lane6f4978c2013-10-20 21:33:52 -0700738 def pretty_print(self, q):
739 q.text("bsn_in_ports_128 {")
740 with q.group():
741 with q.indent(2):
742 q.breakable()
743 q.text("value = ");
744 q.pp(self.value)
745 q.breakable()
746 q.text('}')
747
Rich Lane7dcdf022013-12-11 14:45:27 -0800748oxm.subtypes[196624] = bsn_in_ports_128
749
750class bsn_in_ports_128_masked(oxm):
Rich Lane6f4978c2013-10-20 21:33:52 -0700751 type_len = 196896
752
753 def __init__(self, value=None, value_mask=None):
754 if value != None:
755 self.value = value
756 else:
757 self.value = set()
758 if value_mask != None:
759 self.value_mask = value_mask
760 else:
761 self.value_mask = set()
Rich Lane7dcdf022013-12-11 14:45:27 -0800762 return
Rich Lane6f4978c2013-10-20 21:33:52 -0700763
764 def pack(self):
765 packed = []
766 packed.append(struct.pack("!L", self.type_len))
767 packed.append(util.pack_bitmap_128(self.value))
768 packed.append(util.pack_bitmap_128(self.value_mask))
769 return ''.join(packed)
770
771 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800772 def unpack(reader):
Rich Lane6f4978c2013-10-20 21:33:52 -0700773 obj = bsn_in_ports_128_masked()
Rich Lane6f4978c2013-10-20 21:33:52 -0700774 _type_len = reader.read("!L")[0]
775 assert(_type_len == 196896)
776 obj.value = util.unpack_bitmap_128(reader)
777 obj.value_mask = util.unpack_bitmap_128(reader)
778 return obj
779
780 def __eq__(self, other):
781 if type(self) != type(other): return False
782 if self.value != other.value: return False
783 if self.value_mask != other.value_mask: return False
784 return True
785
Rich Lane6f4978c2013-10-20 21:33:52 -0700786 def pretty_print(self, q):
787 q.text("bsn_in_ports_128_masked {")
788 with q.group():
789 with q.indent(2):
790 q.breakable()
791 q.text("value = ");
792 q.pp(self.value)
793 q.text(","); q.breakable()
794 q.text("value_mask = ");
795 q.pp(self.value_mask)
796 q.breakable()
797 q.text('}')
798
Rich Lane7dcdf022013-12-11 14:45:27 -0800799oxm.subtypes[196896] = bsn_in_ports_128_masked
800
Rich Lane474324f2015-01-14 15:22:56 -0800801class bsn_in_ports_512(oxm):
802 type_len = 206400
803
804 def __init__(self, value=None):
805 if value != None:
806 self.value = value
807 else:
808 self.value = set()
809 return
810
811 def pack(self):
812 packed = []
813 packed.append(struct.pack("!L", self.type_len))
814 packed.append(util.pack_bitmap_512(self.value))
815 return ''.join(packed)
816
817 @staticmethod
818 def unpack(reader):
819 obj = bsn_in_ports_512()
820 _type_len = reader.read("!L")[0]
821 assert(_type_len == 206400)
822 obj.value = util.unpack_bitmap_512(reader)
823 return obj
824
825 def __eq__(self, other):
826 if type(self) != type(other): return False
827 if self.value != other.value: return False
828 return True
829
830 def pretty_print(self, q):
831 q.text("bsn_in_ports_512 {")
832 with q.group():
833 with q.indent(2):
834 q.breakable()
835 q.text("value = ");
836 q.pp(self.value)
837 q.breakable()
838 q.text('}')
839
840oxm.subtypes[206400] = bsn_in_ports_512
841
842class bsn_in_ports_512_masked(oxm):
843 type_len = 206720
844
845 def __init__(self, value=None, value_mask=None):
846 if value != None:
847 self.value = value
848 else:
849 self.value = set()
850 if value_mask != None:
851 self.value_mask = value_mask
852 else:
853 self.value_mask = set()
854 return
855
856 def pack(self):
857 packed = []
858 packed.append(struct.pack("!L", self.type_len))
859 packed.append(util.pack_bitmap_512(self.value))
860 packed.append(util.pack_bitmap_512(self.value_mask))
861 return ''.join(packed)
862
863 @staticmethod
864 def unpack(reader):
865 obj = bsn_in_ports_512_masked()
866 _type_len = reader.read("!L")[0]
867 assert(_type_len == 206720)
868 obj.value = util.unpack_bitmap_512(reader)
869 obj.value_mask = util.unpack_bitmap_512(reader)
870 return obj
871
872 def __eq__(self, other):
873 if type(self) != type(other): return False
874 if self.value != other.value: return False
875 if self.value_mask != other.value_mask: return False
876 return True
877
878 def pretty_print(self, q):
879 q.text("bsn_in_ports_512_masked {")
880 with q.group():
881 with q.indent(2):
882 q.breakable()
883 q.text("value = ");
884 q.pp(self.value)
885 q.text(","); q.breakable()
886 q.text("value_mask = ");
887 q.pp(self.value_mask)
888 q.breakable()
889 q.text('}')
890
891oxm.subtypes[206720] = bsn_in_ports_512_masked
892
Rich Laneccd32ed2014-11-10 17:48:24 -0800893class bsn_l2_cache_hit(oxm):
894 type_len = 205825
895
896 def __init__(self, value=None):
897 if value != None:
898 self.value = value
899 else:
900 self.value = 0
901 return
902
903 def pack(self):
904 packed = []
905 packed.append(struct.pack("!L", self.type_len))
906 packed.append(struct.pack("!B", self.value))
907 return ''.join(packed)
908
909 @staticmethod
910 def unpack(reader):
911 obj = bsn_l2_cache_hit()
912 _type_len = reader.read("!L")[0]
913 assert(_type_len == 205825)
914 obj.value = reader.read("!B")[0]
915 return obj
916
917 def __eq__(self, other):
918 if type(self) != type(other): return False
919 if self.value != other.value: return False
920 return True
921
922 def pretty_print(self, q):
923 q.text("bsn_l2_cache_hit {")
924 with q.group():
925 with q.indent(2):
926 q.breakable()
927 q.text("value = ");
928 q.text("%#x" % self.value)
929 q.breakable()
930 q.text('}')
931
932oxm.subtypes[205825] = bsn_l2_cache_hit
933
934class bsn_l2_cache_hit_masked(oxm):
935 type_len = 206082
936
937 def __init__(self, value=None, value_mask=None):
938 if value != None:
939 self.value = value
940 else:
941 self.value = 0
942 if value_mask != None:
943 self.value_mask = value_mask
944 else:
945 self.value_mask = 0
946 return
947
948 def pack(self):
949 packed = []
950 packed.append(struct.pack("!L", self.type_len))
951 packed.append(struct.pack("!B", self.value))
952 packed.append(struct.pack("!B", self.value_mask))
953 return ''.join(packed)
954
955 @staticmethod
956 def unpack(reader):
957 obj = bsn_l2_cache_hit_masked()
958 _type_len = reader.read("!L")[0]
959 assert(_type_len == 206082)
960 obj.value = reader.read("!B")[0]
961 obj.value_mask = reader.read("!B")[0]
962 return obj
963
964 def __eq__(self, other):
965 if type(self) != type(other): return False
966 if self.value != other.value: return False
967 if self.value_mask != other.value_mask: return False
968 return True
969
970 def pretty_print(self, q):
971 q.text("bsn_l2_cache_hit_masked {")
972 with q.group():
973 with q.indent(2):
974 q.breakable()
975 q.text("value = ");
976 q.text("%#x" % self.value)
977 q.text(","); q.breakable()
978 q.text("value_mask = ");
979 q.text("%#x" % self.value_mask)
980 q.breakable()
981 q.text('}')
982
983oxm.subtypes[206082] = bsn_l2_cache_hit_masked
984
Rich Lane7dcdf022013-12-11 14:45:27 -0800985class bsn_l3_dst_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800986 type_len = 199684
987
988 def __init__(self, value=None):
989 if value != None:
990 self.value = value
991 else:
992 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800993 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800994
995 def pack(self):
996 packed = []
997 packed.append(struct.pack("!L", self.type_len))
998 packed.append(struct.pack("!L", self.value))
999 return ''.join(packed)
1000
1001 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001002 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001003 obj = bsn_l3_dst_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001004 _type_len = reader.read("!L")[0]
1005 assert(_type_len == 199684)
1006 obj.value = reader.read("!L")[0]
1007 return obj
1008
1009 def __eq__(self, other):
1010 if type(self) != type(other): return False
1011 if self.value != other.value: return False
1012 return True
1013
Rich Laned9e3f7b2013-11-04 11:40:43 -08001014 def pretty_print(self, q):
1015 q.text("bsn_l3_dst_class_id {")
1016 with q.group():
1017 with q.indent(2):
1018 q.breakable()
1019 q.text("value = ");
1020 q.text("%#x" % self.value)
1021 q.breakable()
1022 q.text('}')
1023
Rich Lane7dcdf022013-12-11 14:45:27 -08001024oxm.subtypes[199684] = bsn_l3_dst_class_id
1025
1026class bsn_l3_dst_class_id_masked(oxm):
1027 type_len = 199944
Rich Laned9e3f7b2013-11-04 11:40:43 -08001028
1029 def __init__(self, value=None, value_mask=None):
1030 if value != None:
1031 self.value = value
1032 else:
1033 self.value = 0
1034 if value_mask != None:
1035 self.value_mask = value_mask
1036 else:
1037 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001038 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001039
1040 def pack(self):
1041 packed = []
1042 packed.append(struct.pack("!L", self.type_len))
1043 packed.append(struct.pack("!L", self.value))
1044 packed.append(struct.pack("!L", self.value_mask))
1045 return ''.join(packed)
1046
1047 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001048 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001049 obj = bsn_l3_dst_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001050 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001051 assert(_type_len == 199944)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001052 obj.value = reader.read("!L")[0]
1053 obj.value_mask = reader.read("!L")[0]
1054 return obj
1055
1056 def __eq__(self, other):
1057 if type(self) != type(other): return False
1058 if self.value != other.value: return False
1059 if self.value_mask != other.value_mask: return False
1060 return True
1061
Rich Laned9e3f7b2013-11-04 11:40:43 -08001062 def pretty_print(self, q):
1063 q.text("bsn_l3_dst_class_id_masked {")
1064 with q.group():
1065 with q.indent(2):
1066 q.breakable()
1067 q.text("value = ");
1068 q.text("%#x" % self.value)
1069 q.text(","); q.breakable()
1070 q.text("value_mask = ");
1071 q.text("%#x" % self.value_mask)
1072 q.breakable()
1073 q.text('}')
1074
Rich Lane7dcdf022013-12-11 14:45:27 -08001075oxm.subtypes[199944] = bsn_l3_dst_class_id_masked
1076
1077class bsn_l3_interface_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001078 type_len = 198660
1079
1080 def __init__(self, value=None):
1081 if value != None:
1082 self.value = value
1083 else:
1084 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001085 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001086
1087 def pack(self):
1088 packed = []
1089 packed.append(struct.pack("!L", self.type_len))
1090 packed.append(struct.pack("!L", self.value))
1091 return ''.join(packed)
1092
1093 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001094 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001095 obj = bsn_l3_interface_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001096 _type_len = reader.read("!L")[0]
1097 assert(_type_len == 198660)
1098 obj.value = reader.read("!L")[0]
1099 return obj
1100
1101 def __eq__(self, other):
1102 if type(self) != type(other): return False
1103 if self.value != other.value: return False
1104 return True
1105
Rich Laned9e3f7b2013-11-04 11:40:43 -08001106 def pretty_print(self, q):
1107 q.text("bsn_l3_interface_class_id {")
1108 with q.group():
1109 with q.indent(2):
1110 q.breakable()
1111 q.text("value = ");
1112 q.text("%#x" % self.value)
1113 q.breakable()
1114 q.text('}')
1115
Rich Lane7dcdf022013-12-11 14:45:27 -08001116oxm.subtypes[198660] = bsn_l3_interface_class_id
1117
1118class bsn_l3_interface_class_id_masked(oxm):
1119 type_len = 198920
Rich Laned9e3f7b2013-11-04 11:40:43 -08001120
1121 def __init__(self, value=None, value_mask=None):
1122 if value != None:
1123 self.value = value
1124 else:
1125 self.value = 0
1126 if value_mask != None:
1127 self.value_mask = value_mask
1128 else:
1129 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001130 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001131
1132 def pack(self):
1133 packed = []
1134 packed.append(struct.pack("!L", self.type_len))
1135 packed.append(struct.pack("!L", self.value))
1136 packed.append(struct.pack("!L", self.value_mask))
1137 return ''.join(packed)
1138
1139 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001140 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001141 obj = bsn_l3_interface_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001142 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001143 assert(_type_len == 198920)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001144 obj.value = reader.read("!L")[0]
1145 obj.value_mask = reader.read("!L")[0]
1146 return obj
1147
1148 def __eq__(self, other):
1149 if type(self) != type(other): return False
1150 if self.value != other.value: return False
1151 if self.value_mask != other.value_mask: return False
1152 return True
1153
Rich Laned9e3f7b2013-11-04 11:40:43 -08001154 def pretty_print(self, q):
1155 q.text("bsn_l3_interface_class_id_masked {")
1156 with q.group():
1157 with q.indent(2):
1158 q.breakable()
1159 q.text("value = ");
1160 q.text("%#x" % self.value)
1161 q.text(","); q.breakable()
1162 q.text("value_mask = ");
1163 q.text("%#x" % self.value_mask)
1164 q.breakable()
1165 q.text('}')
1166
Rich Lane7dcdf022013-12-11 14:45:27 -08001167oxm.subtypes[198920] = bsn_l3_interface_class_id_masked
1168
1169class bsn_l3_src_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001170 type_len = 199172
1171
1172 def __init__(self, value=None):
1173 if value != None:
1174 self.value = value
1175 else:
1176 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001177 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001178
1179 def pack(self):
1180 packed = []
1181 packed.append(struct.pack("!L", self.type_len))
1182 packed.append(struct.pack("!L", self.value))
1183 return ''.join(packed)
1184
1185 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001186 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001187 obj = bsn_l3_src_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001188 _type_len = reader.read("!L")[0]
1189 assert(_type_len == 199172)
1190 obj.value = reader.read("!L")[0]
1191 return obj
1192
1193 def __eq__(self, other):
1194 if type(self) != type(other): return False
1195 if self.value != other.value: return False
1196 return True
1197
Rich Laned9e3f7b2013-11-04 11:40:43 -08001198 def pretty_print(self, q):
1199 q.text("bsn_l3_src_class_id {")
1200 with q.group():
1201 with q.indent(2):
1202 q.breakable()
1203 q.text("value = ");
1204 q.text("%#x" % self.value)
1205 q.breakable()
1206 q.text('}')
1207
Rich Lane7dcdf022013-12-11 14:45:27 -08001208oxm.subtypes[199172] = bsn_l3_src_class_id
1209
1210class bsn_l3_src_class_id_masked(oxm):
1211 type_len = 199432
Rich Laned9e3f7b2013-11-04 11:40:43 -08001212
1213 def __init__(self, value=None, value_mask=None):
1214 if value != None:
1215 self.value = value
1216 else:
1217 self.value = 0
1218 if value_mask != None:
1219 self.value_mask = value_mask
1220 else:
1221 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001222 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001223
1224 def pack(self):
1225 packed = []
1226 packed.append(struct.pack("!L", self.type_len))
1227 packed.append(struct.pack("!L", self.value))
1228 packed.append(struct.pack("!L", self.value_mask))
1229 return ''.join(packed)
1230
1231 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001232 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001233 obj = bsn_l3_src_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001234 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001235 assert(_type_len == 199432)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001236 obj.value = reader.read("!L")[0]
1237 obj.value_mask = reader.read("!L")[0]
1238 return obj
1239
1240 def __eq__(self, other):
1241 if type(self) != type(other): return False
1242 if self.value != other.value: return False
1243 if self.value_mask != other.value_mask: return False
1244 return True
1245
Rich Laned9e3f7b2013-11-04 11:40:43 -08001246 def pretty_print(self, q):
1247 q.text("bsn_l3_src_class_id_masked {")
1248 with q.group():
1249 with q.indent(2):
1250 q.breakable()
1251 q.text("value = ");
1252 q.text("%#x" % self.value)
1253 q.text(","); q.breakable()
1254 q.text("value_mask = ");
1255 q.text("%#x" % self.value_mask)
1256 q.breakable()
1257 q.text('}')
1258
Rich Lane7dcdf022013-12-11 14:45:27 -08001259oxm.subtypes[199432] = bsn_l3_src_class_id_masked
1260
1261class bsn_lag_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001262 type_len = 197124
1263
1264 def __init__(self, value=None):
1265 if value != None:
1266 self.value = value
1267 else:
1268 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001269 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001270
1271 def pack(self):
1272 packed = []
1273 packed.append(struct.pack("!L", self.type_len))
1274 packed.append(struct.pack("!L", self.value))
1275 return ''.join(packed)
1276
1277 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001278 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001279 obj = bsn_lag_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001280 _type_len = reader.read("!L")[0]
1281 assert(_type_len == 197124)
1282 obj.value = reader.read("!L")[0]
1283 return obj
1284
1285 def __eq__(self, other):
1286 if type(self) != type(other): return False
1287 if self.value != other.value: return False
1288 return True
1289
Rich Laned9e3f7b2013-11-04 11:40:43 -08001290 def pretty_print(self, q):
1291 q.text("bsn_lag_id {")
1292 with q.group():
1293 with q.indent(2):
1294 q.breakable()
1295 q.text("value = ");
1296 q.text("%#x" % self.value)
1297 q.breakable()
1298 q.text('}')
1299
Rich Lane7dcdf022013-12-11 14:45:27 -08001300oxm.subtypes[197124] = bsn_lag_id
1301
1302class bsn_lag_id_masked(oxm):
1303 type_len = 197384
Rich Laned9e3f7b2013-11-04 11:40:43 -08001304
1305 def __init__(self, value=None, value_mask=None):
1306 if value != None:
1307 self.value = value
1308 else:
1309 self.value = 0
1310 if value_mask != None:
1311 self.value_mask = value_mask
1312 else:
1313 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001314 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001315
1316 def pack(self):
1317 packed = []
1318 packed.append(struct.pack("!L", self.type_len))
1319 packed.append(struct.pack("!L", self.value))
1320 packed.append(struct.pack("!L", self.value_mask))
1321 return ''.join(packed)
1322
1323 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001324 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001325 obj = bsn_lag_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001326 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001327 assert(_type_len == 197384)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001328 obj.value = reader.read("!L")[0]
1329 obj.value_mask = reader.read("!L")[0]
1330 return obj
1331
1332 def __eq__(self, other):
1333 if type(self) != type(other): return False
1334 if self.value != other.value: return False
1335 if self.value_mask != other.value_mask: return False
1336 return True
1337
Rich Laned9e3f7b2013-11-04 11:40:43 -08001338 def pretty_print(self, q):
1339 q.text("bsn_lag_id_masked {")
1340 with q.group():
1341 with q.indent(2):
1342 q.breakable()
1343 q.text("value = ");
1344 q.text("%#x" % self.value)
1345 q.text(","); q.breakable()
1346 q.text("value_mask = ");
1347 q.text("%#x" % self.value_mask)
1348 q.breakable()
1349 q.text('}')
1350
Rich Lane7dcdf022013-12-11 14:45:27 -08001351oxm.subtypes[197384] = bsn_lag_id_masked
1352
Harshmeet Singhc51f4042014-05-21 13:32:52 -07001353class bsn_tcp_flags(oxm):
1354 type_len = 204802
1355
1356 def __init__(self, value=None):
1357 if value != None:
1358 self.value = value
1359 else:
1360 self.value = 0
1361 return
1362
1363 def pack(self):
1364 packed = []
1365 packed.append(struct.pack("!L", self.type_len))
1366 packed.append(struct.pack("!H", self.value))
1367 return ''.join(packed)
1368
1369 @staticmethod
1370 def unpack(reader):
1371 obj = bsn_tcp_flags()
1372 _type_len = reader.read("!L")[0]
1373 assert(_type_len == 204802)
1374 obj.value = reader.read("!H")[0]
1375 return obj
1376
1377 def __eq__(self, other):
1378 if type(self) != type(other): return False
1379 if self.value != other.value: return False
1380 return True
1381
1382 def pretty_print(self, q):
1383 q.text("bsn_tcp_flags {")
1384 with q.group():
1385 with q.indent(2):
1386 q.breakable()
1387 q.text("value = ");
1388 q.text("%#x" % self.value)
1389 q.breakable()
1390 q.text('}')
1391
1392oxm.subtypes[204802] = bsn_tcp_flags
1393
1394class bsn_tcp_flags_masked(oxm):
1395 type_len = 205060
1396
1397 def __init__(self, value=None, value_mask=None):
1398 if value != None:
1399 self.value = value
1400 else:
1401 self.value = 0
1402 if value_mask != None:
1403 self.value_mask = value_mask
1404 else:
1405 self.value_mask = 0
1406 return
1407
1408 def pack(self):
1409 packed = []
1410 packed.append(struct.pack("!L", self.type_len))
1411 packed.append(struct.pack("!H", self.value))
1412 packed.append(struct.pack("!H", self.value_mask))
1413 return ''.join(packed)
1414
1415 @staticmethod
1416 def unpack(reader):
1417 obj = bsn_tcp_flags_masked()
1418 _type_len = reader.read("!L")[0]
1419 assert(_type_len == 205060)
1420 obj.value = reader.read("!H")[0]
1421 obj.value_mask = reader.read("!H")[0]
1422 return obj
1423
1424 def __eq__(self, other):
1425 if type(self) != type(other): return False
1426 if self.value != other.value: return False
1427 if self.value_mask != other.value_mask: return False
1428 return True
1429
1430 def pretty_print(self, q):
1431 q.text("bsn_tcp_flags_masked {")
1432 with q.group():
1433 with q.indent(2):
1434 q.breakable()
1435 q.text("value = ");
1436 q.text("%#x" % self.value)
1437 q.text(","); q.breakable()
1438 q.text("value_mask = ");
1439 q.text("%#x" % self.value_mask)
1440 q.breakable()
1441 q.text('}')
1442
1443oxm.subtypes[205060] = bsn_tcp_flags_masked
1444
Rich Lane93b33132014-04-21 12:20:58 -07001445class bsn_udf0(oxm):
1446 type_len = 200708
1447
1448 def __init__(self, value=None):
1449 if value != None:
1450 self.value = value
1451 else:
1452 self.value = 0
1453 return
1454
1455 def pack(self):
1456 packed = []
1457 packed.append(struct.pack("!L", self.type_len))
1458 packed.append(struct.pack("!L", self.value))
1459 return ''.join(packed)
1460
1461 @staticmethod
1462 def unpack(reader):
1463 obj = bsn_udf0()
1464 _type_len = reader.read("!L")[0]
1465 assert(_type_len == 200708)
1466 obj.value = reader.read("!L")[0]
1467 return obj
1468
1469 def __eq__(self, other):
1470 if type(self) != type(other): return False
1471 if self.value != other.value: return False
1472 return True
1473
1474 def pretty_print(self, q):
1475 q.text("bsn_udf0 {")
1476 with q.group():
1477 with q.indent(2):
1478 q.breakable()
1479 q.text("value = ");
1480 q.text("%#x" % self.value)
1481 q.breakable()
1482 q.text('}')
1483
1484oxm.subtypes[200708] = bsn_udf0
1485
1486class bsn_udf0_masked(oxm):
1487 type_len = 200968
1488
1489 def __init__(self, value=None, value_mask=None):
1490 if value != None:
1491 self.value = value
1492 else:
1493 self.value = 0
1494 if value_mask != None:
1495 self.value_mask = value_mask
1496 else:
1497 self.value_mask = 0
1498 return
1499
1500 def pack(self):
1501 packed = []
1502 packed.append(struct.pack("!L", self.type_len))
1503 packed.append(struct.pack("!L", self.value))
1504 packed.append(struct.pack("!L", self.value_mask))
1505 return ''.join(packed)
1506
1507 @staticmethod
1508 def unpack(reader):
1509 obj = bsn_udf0_masked()
1510 _type_len = reader.read("!L")[0]
1511 assert(_type_len == 200968)
1512 obj.value = reader.read("!L")[0]
1513 obj.value_mask = reader.read("!L")[0]
1514 return obj
1515
1516 def __eq__(self, other):
1517 if type(self) != type(other): return False
1518 if self.value != other.value: return False
1519 if self.value_mask != other.value_mask: return False
1520 return True
1521
1522 def pretty_print(self, q):
1523 q.text("bsn_udf0_masked {")
1524 with q.group():
1525 with q.indent(2):
1526 q.breakable()
1527 q.text("value = ");
1528 q.text("%#x" % self.value)
1529 q.text(","); q.breakable()
1530 q.text("value_mask = ");
1531 q.text("%#x" % self.value_mask)
1532 q.breakable()
1533 q.text('}')
1534
1535oxm.subtypes[200968] = bsn_udf0_masked
1536
1537class bsn_udf1(oxm):
1538 type_len = 201220
1539
1540 def __init__(self, value=None):
1541 if value != None:
1542 self.value = value
1543 else:
1544 self.value = 0
1545 return
1546
1547 def pack(self):
1548 packed = []
1549 packed.append(struct.pack("!L", self.type_len))
1550 packed.append(struct.pack("!L", self.value))
1551 return ''.join(packed)
1552
1553 @staticmethod
1554 def unpack(reader):
1555 obj = bsn_udf1()
1556 _type_len = reader.read("!L")[0]
1557 assert(_type_len == 201220)
1558 obj.value = reader.read("!L")[0]
1559 return obj
1560
1561 def __eq__(self, other):
1562 if type(self) != type(other): return False
1563 if self.value != other.value: return False
1564 return True
1565
1566 def pretty_print(self, q):
1567 q.text("bsn_udf1 {")
1568 with q.group():
1569 with q.indent(2):
1570 q.breakable()
1571 q.text("value = ");
1572 q.text("%#x" % self.value)
1573 q.breakable()
1574 q.text('}')
1575
1576oxm.subtypes[201220] = bsn_udf1
1577
1578class bsn_udf1_masked(oxm):
1579 type_len = 201480
1580
1581 def __init__(self, value=None, value_mask=None):
1582 if value != None:
1583 self.value = value
1584 else:
1585 self.value = 0
1586 if value_mask != None:
1587 self.value_mask = value_mask
1588 else:
1589 self.value_mask = 0
1590 return
1591
1592 def pack(self):
1593 packed = []
1594 packed.append(struct.pack("!L", self.type_len))
1595 packed.append(struct.pack("!L", self.value))
1596 packed.append(struct.pack("!L", self.value_mask))
1597 return ''.join(packed)
1598
1599 @staticmethod
1600 def unpack(reader):
1601 obj = bsn_udf1_masked()
1602 _type_len = reader.read("!L")[0]
1603 assert(_type_len == 201480)
1604 obj.value = reader.read("!L")[0]
1605 obj.value_mask = reader.read("!L")[0]
1606 return obj
1607
1608 def __eq__(self, other):
1609 if type(self) != type(other): return False
1610 if self.value != other.value: return False
1611 if self.value_mask != other.value_mask: return False
1612 return True
1613
1614 def pretty_print(self, q):
1615 q.text("bsn_udf1_masked {")
1616 with q.group():
1617 with q.indent(2):
1618 q.breakable()
1619 q.text("value = ");
1620 q.text("%#x" % self.value)
1621 q.text(","); q.breakable()
1622 q.text("value_mask = ");
1623 q.text("%#x" % self.value_mask)
1624 q.breakable()
1625 q.text('}')
1626
1627oxm.subtypes[201480] = bsn_udf1_masked
1628
1629class bsn_udf2(oxm):
1630 type_len = 201732
1631
1632 def __init__(self, value=None):
1633 if value != None:
1634 self.value = value
1635 else:
1636 self.value = 0
1637 return
1638
1639 def pack(self):
1640 packed = []
1641 packed.append(struct.pack("!L", self.type_len))
1642 packed.append(struct.pack("!L", self.value))
1643 return ''.join(packed)
1644
1645 @staticmethod
1646 def unpack(reader):
1647 obj = bsn_udf2()
1648 _type_len = reader.read("!L")[0]
1649 assert(_type_len == 201732)
1650 obj.value = reader.read("!L")[0]
1651 return obj
1652
1653 def __eq__(self, other):
1654 if type(self) != type(other): return False
1655 if self.value != other.value: return False
1656 return True
1657
1658 def pretty_print(self, q):
1659 q.text("bsn_udf2 {")
1660 with q.group():
1661 with q.indent(2):
1662 q.breakable()
1663 q.text("value = ");
1664 q.text("%#x" % self.value)
1665 q.breakable()
1666 q.text('}')
1667
1668oxm.subtypes[201732] = bsn_udf2
1669
1670class bsn_udf2_masked(oxm):
1671 type_len = 201992
1672
1673 def __init__(self, value=None, value_mask=None):
1674 if value != None:
1675 self.value = value
1676 else:
1677 self.value = 0
1678 if value_mask != None:
1679 self.value_mask = value_mask
1680 else:
1681 self.value_mask = 0
1682 return
1683
1684 def pack(self):
1685 packed = []
1686 packed.append(struct.pack("!L", self.type_len))
1687 packed.append(struct.pack("!L", self.value))
1688 packed.append(struct.pack("!L", self.value_mask))
1689 return ''.join(packed)
1690
1691 @staticmethod
1692 def unpack(reader):
1693 obj = bsn_udf2_masked()
1694 _type_len = reader.read("!L")[0]
1695 assert(_type_len == 201992)
1696 obj.value = reader.read("!L")[0]
1697 obj.value_mask = reader.read("!L")[0]
1698 return obj
1699
1700 def __eq__(self, other):
1701 if type(self) != type(other): return False
1702 if self.value != other.value: return False
1703 if self.value_mask != other.value_mask: return False
1704 return True
1705
1706 def pretty_print(self, q):
1707 q.text("bsn_udf2_masked {")
1708 with q.group():
1709 with q.indent(2):
1710 q.breakable()
1711 q.text("value = ");
1712 q.text("%#x" % self.value)
1713 q.text(","); q.breakable()
1714 q.text("value_mask = ");
1715 q.text("%#x" % self.value_mask)
1716 q.breakable()
1717 q.text('}')
1718
1719oxm.subtypes[201992] = bsn_udf2_masked
1720
1721class bsn_udf3(oxm):
1722 type_len = 202244
1723
1724 def __init__(self, value=None):
1725 if value != None:
1726 self.value = value
1727 else:
1728 self.value = 0
1729 return
1730
1731 def pack(self):
1732 packed = []
1733 packed.append(struct.pack("!L", self.type_len))
1734 packed.append(struct.pack("!L", self.value))
1735 return ''.join(packed)
1736
1737 @staticmethod
1738 def unpack(reader):
1739 obj = bsn_udf3()
1740 _type_len = reader.read("!L")[0]
1741 assert(_type_len == 202244)
1742 obj.value = reader.read("!L")[0]
1743 return obj
1744
1745 def __eq__(self, other):
1746 if type(self) != type(other): return False
1747 if self.value != other.value: return False
1748 return True
1749
1750 def pretty_print(self, q):
1751 q.text("bsn_udf3 {")
1752 with q.group():
1753 with q.indent(2):
1754 q.breakable()
1755 q.text("value = ");
1756 q.text("%#x" % self.value)
1757 q.breakable()
1758 q.text('}')
1759
1760oxm.subtypes[202244] = bsn_udf3
1761
1762class bsn_udf3_masked(oxm):
1763 type_len = 202504
1764
1765 def __init__(self, value=None, value_mask=None):
1766 if value != None:
1767 self.value = value
1768 else:
1769 self.value = 0
1770 if value_mask != None:
1771 self.value_mask = value_mask
1772 else:
1773 self.value_mask = 0
1774 return
1775
1776 def pack(self):
1777 packed = []
1778 packed.append(struct.pack("!L", self.type_len))
1779 packed.append(struct.pack("!L", self.value))
1780 packed.append(struct.pack("!L", self.value_mask))
1781 return ''.join(packed)
1782
1783 @staticmethod
1784 def unpack(reader):
1785 obj = bsn_udf3_masked()
1786 _type_len = reader.read("!L")[0]
1787 assert(_type_len == 202504)
1788 obj.value = reader.read("!L")[0]
1789 obj.value_mask = reader.read("!L")[0]
1790 return obj
1791
1792 def __eq__(self, other):
1793 if type(self) != type(other): return False
1794 if self.value != other.value: return False
1795 if self.value_mask != other.value_mask: return False
1796 return True
1797
1798 def pretty_print(self, q):
1799 q.text("bsn_udf3_masked {")
1800 with q.group():
1801 with q.indent(2):
1802 q.breakable()
1803 q.text("value = ");
1804 q.text("%#x" % self.value)
1805 q.text(","); q.breakable()
1806 q.text("value_mask = ");
1807 q.text("%#x" % self.value_mask)
1808 q.breakable()
1809 q.text('}')
1810
1811oxm.subtypes[202504] = bsn_udf3_masked
1812
1813class bsn_udf4(oxm):
1814 type_len = 202756
1815
1816 def __init__(self, value=None):
1817 if value != None:
1818 self.value = value
1819 else:
1820 self.value = 0
1821 return
1822
1823 def pack(self):
1824 packed = []
1825 packed.append(struct.pack("!L", self.type_len))
1826 packed.append(struct.pack("!L", self.value))
1827 return ''.join(packed)
1828
1829 @staticmethod
1830 def unpack(reader):
1831 obj = bsn_udf4()
1832 _type_len = reader.read("!L")[0]
1833 assert(_type_len == 202756)
1834 obj.value = reader.read("!L")[0]
1835 return obj
1836
1837 def __eq__(self, other):
1838 if type(self) != type(other): return False
1839 if self.value != other.value: return False
1840 return True
1841
1842 def pretty_print(self, q):
1843 q.text("bsn_udf4 {")
1844 with q.group():
1845 with q.indent(2):
1846 q.breakable()
1847 q.text("value = ");
1848 q.text("%#x" % self.value)
1849 q.breakable()
1850 q.text('}')
1851
1852oxm.subtypes[202756] = bsn_udf4
1853
1854class bsn_udf4_masked(oxm):
1855 type_len = 203016
1856
1857 def __init__(self, value=None, value_mask=None):
1858 if value != None:
1859 self.value = value
1860 else:
1861 self.value = 0
1862 if value_mask != None:
1863 self.value_mask = value_mask
1864 else:
1865 self.value_mask = 0
1866 return
1867
1868 def pack(self):
1869 packed = []
1870 packed.append(struct.pack("!L", self.type_len))
1871 packed.append(struct.pack("!L", self.value))
1872 packed.append(struct.pack("!L", self.value_mask))
1873 return ''.join(packed)
1874
1875 @staticmethod
1876 def unpack(reader):
1877 obj = bsn_udf4_masked()
1878 _type_len = reader.read("!L")[0]
1879 assert(_type_len == 203016)
1880 obj.value = reader.read("!L")[0]
1881 obj.value_mask = reader.read("!L")[0]
1882 return obj
1883
1884 def __eq__(self, other):
1885 if type(self) != type(other): return False
1886 if self.value != other.value: return False
1887 if self.value_mask != other.value_mask: return False
1888 return True
1889
1890 def pretty_print(self, q):
1891 q.text("bsn_udf4_masked {")
1892 with q.group():
1893 with q.indent(2):
1894 q.breakable()
1895 q.text("value = ");
1896 q.text("%#x" % self.value)
1897 q.text(","); q.breakable()
1898 q.text("value_mask = ");
1899 q.text("%#x" % self.value_mask)
1900 q.breakable()
1901 q.text('}')
1902
1903oxm.subtypes[203016] = bsn_udf4_masked
1904
1905class bsn_udf5(oxm):
1906 type_len = 203268
1907
1908 def __init__(self, value=None):
1909 if value != None:
1910 self.value = value
1911 else:
1912 self.value = 0
1913 return
1914
1915 def pack(self):
1916 packed = []
1917 packed.append(struct.pack("!L", self.type_len))
1918 packed.append(struct.pack("!L", self.value))
1919 return ''.join(packed)
1920
1921 @staticmethod
1922 def unpack(reader):
1923 obj = bsn_udf5()
1924 _type_len = reader.read("!L")[0]
1925 assert(_type_len == 203268)
1926 obj.value = reader.read("!L")[0]
1927 return obj
1928
1929 def __eq__(self, other):
1930 if type(self) != type(other): return False
1931 if self.value != other.value: return False
1932 return True
1933
1934 def pretty_print(self, q):
1935 q.text("bsn_udf5 {")
1936 with q.group():
1937 with q.indent(2):
1938 q.breakable()
1939 q.text("value = ");
1940 q.text("%#x" % self.value)
1941 q.breakable()
1942 q.text('}')
1943
1944oxm.subtypes[203268] = bsn_udf5
1945
1946class bsn_udf5_masked(oxm):
1947 type_len = 203528
1948
1949 def __init__(self, value=None, value_mask=None):
1950 if value != None:
1951 self.value = value
1952 else:
1953 self.value = 0
1954 if value_mask != None:
1955 self.value_mask = value_mask
1956 else:
1957 self.value_mask = 0
1958 return
1959
1960 def pack(self):
1961 packed = []
1962 packed.append(struct.pack("!L", self.type_len))
1963 packed.append(struct.pack("!L", self.value))
1964 packed.append(struct.pack("!L", self.value_mask))
1965 return ''.join(packed)
1966
1967 @staticmethod
1968 def unpack(reader):
1969 obj = bsn_udf5_masked()
1970 _type_len = reader.read("!L")[0]
1971 assert(_type_len == 203528)
1972 obj.value = reader.read("!L")[0]
1973 obj.value_mask = reader.read("!L")[0]
1974 return obj
1975
1976 def __eq__(self, other):
1977 if type(self) != type(other): return False
1978 if self.value != other.value: return False
1979 if self.value_mask != other.value_mask: return False
1980 return True
1981
1982 def pretty_print(self, q):
1983 q.text("bsn_udf5_masked {")
1984 with q.group():
1985 with q.indent(2):
1986 q.breakable()
1987 q.text("value = ");
1988 q.text("%#x" % self.value)
1989 q.text(","); q.breakable()
1990 q.text("value_mask = ");
1991 q.text("%#x" % self.value_mask)
1992 q.breakable()
1993 q.text('}')
1994
1995oxm.subtypes[203528] = bsn_udf5_masked
1996
1997class bsn_udf6(oxm):
1998 type_len = 203780
1999
2000 def __init__(self, value=None):
2001 if value != None:
2002 self.value = value
2003 else:
2004 self.value = 0
2005 return
2006
2007 def pack(self):
2008 packed = []
2009 packed.append(struct.pack("!L", self.type_len))
2010 packed.append(struct.pack("!L", self.value))
2011 return ''.join(packed)
2012
2013 @staticmethod
2014 def unpack(reader):
2015 obj = bsn_udf6()
2016 _type_len = reader.read("!L")[0]
2017 assert(_type_len == 203780)
2018 obj.value = reader.read("!L")[0]
2019 return obj
2020
2021 def __eq__(self, other):
2022 if type(self) != type(other): return False
2023 if self.value != other.value: return False
2024 return True
2025
2026 def pretty_print(self, q):
2027 q.text("bsn_udf6 {")
2028 with q.group():
2029 with q.indent(2):
2030 q.breakable()
2031 q.text("value = ");
2032 q.text("%#x" % self.value)
2033 q.breakable()
2034 q.text('}')
2035
2036oxm.subtypes[203780] = bsn_udf6
2037
2038class bsn_udf6_masked(oxm):
2039 type_len = 204040
2040
2041 def __init__(self, value=None, value_mask=None):
2042 if value != None:
2043 self.value = value
2044 else:
2045 self.value = 0
2046 if value_mask != None:
2047 self.value_mask = value_mask
2048 else:
2049 self.value_mask = 0
2050 return
2051
2052 def pack(self):
2053 packed = []
2054 packed.append(struct.pack("!L", self.type_len))
2055 packed.append(struct.pack("!L", self.value))
2056 packed.append(struct.pack("!L", self.value_mask))
2057 return ''.join(packed)
2058
2059 @staticmethod
2060 def unpack(reader):
2061 obj = bsn_udf6_masked()
2062 _type_len = reader.read("!L")[0]
2063 assert(_type_len == 204040)
2064 obj.value = reader.read("!L")[0]
2065 obj.value_mask = reader.read("!L")[0]
2066 return obj
2067
2068 def __eq__(self, other):
2069 if type(self) != type(other): return False
2070 if self.value != other.value: return False
2071 if self.value_mask != other.value_mask: return False
2072 return True
2073
2074 def pretty_print(self, q):
2075 q.text("bsn_udf6_masked {")
2076 with q.group():
2077 with q.indent(2):
2078 q.breakable()
2079 q.text("value = ");
2080 q.text("%#x" % self.value)
2081 q.text(","); q.breakable()
2082 q.text("value_mask = ");
2083 q.text("%#x" % self.value_mask)
2084 q.breakable()
2085 q.text('}')
2086
2087oxm.subtypes[204040] = bsn_udf6_masked
2088
2089class bsn_udf7(oxm):
2090 type_len = 204292
2091
2092 def __init__(self, value=None):
2093 if value != None:
2094 self.value = value
2095 else:
2096 self.value = 0
2097 return
2098
2099 def pack(self):
2100 packed = []
2101 packed.append(struct.pack("!L", self.type_len))
2102 packed.append(struct.pack("!L", self.value))
2103 return ''.join(packed)
2104
2105 @staticmethod
2106 def unpack(reader):
2107 obj = bsn_udf7()
2108 _type_len = reader.read("!L")[0]
2109 assert(_type_len == 204292)
2110 obj.value = reader.read("!L")[0]
2111 return obj
2112
2113 def __eq__(self, other):
2114 if type(self) != type(other): return False
2115 if self.value != other.value: return False
2116 return True
2117
2118 def pretty_print(self, q):
2119 q.text("bsn_udf7 {")
2120 with q.group():
2121 with q.indent(2):
2122 q.breakable()
2123 q.text("value = ");
2124 q.text("%#x" % self.value)
2125 q.breakable()
2126 q.text('}')
2127
2128oxm.subtypes[204292] = bsn_udf7
2129
2130class bsn_udf7_masked(oxm):
2131 type_len = 204552
2132
2133 def __init__(self, value=None, value_mask=None):
2134 if value != None:
2135 self.value = value
2136 else:
2137 self.value = 0
2138 if value_mask != None:
2139 self.value_mask = value_mask
2140 else:
2141 self.value_mask = 0
2142 return
2143
2144 def pack(self):
2145 packed = []
2146 packed.append(struct.pack("!L", self.type_len))
2147 packed.append(struct.pack("!L", self.value))
2148 packed.append(struct.pack("!L", self.value_mask))
2149 return ''.join(packed)
2150
2151 @staticmethod
2152 def unpack(reader):
2153 obj = bsn_udf7_masked()
2154 _type_len = reader.read("!L")[0]
2155 assert(_type_len == 204552)
2156 obj.value = reader.read("!L")[0]
2157 obj.value_mask = reader.read("!L")[0]
2158 return obj
2159
2160 def __eq__(self, other):
2161 if type(self) != type(other): return False
2162 if self.value != other.value: return False
2163 if self.value_mask != other.value_mask: return False
2164 return True
2165
2166 def pretty_print(self, q):
2167 q.text("bsn_udf7_masked {")
2168 with q.group():
2169 with q.indent(2):
2170 q.breakable()
2171 q.text("value = ");
2172 q.text("%#x" % self.value)
2173 q.text(","); q.breakable()
2174 q.text("value_mask = ");
2175 q.text("%#x" % self.value_mask)
2176 q.breakable()
2177 q.text('}')
2178
2179oxm.subtypes[204552] = bsn_udf7_masked
2180
Rich Lane5587ab12014-06-30 11:19:09 -07002181class bsn_vlan_xlate_port_group_id(oxm):
2182 type_len = 205316
2183
2184 def __init__(self, value=None):
2185 if value != None:
2186 self.value = value
2187 else:
2188 self.value = 0
2189 return
2190
2191 def pack(self):
2192 packed = []
2193 packed.append(struct.pack("!L", self.type_len))
2194 packed.append(struct.pack("!L", self.value))
2195 return ''.join(packed)
2196
2197 @staticmethod
2198 def unpack(reader):
2199 obj = bsn_vlan_xlate_port_group_id()
2200 _type_len = reader.read("!L")[0]
2201 assert(_type_len == 205316)
2202 obj.value = reader.read("!L")[0]
2203 return obj
2204
2205 def __eq__(self, other):
2206 if type(self) != type(other): return False
2207 if self.value != other.value: return False
2208 return True
2209
2210 def pretty_print(self, q):
2211 q.text("bsn_vlan_xlate_port_group_id {")
2212 with q.group():
2213 with q.indent(2):
2214 q.breakable()
2215 q.text("value = ");
2216 q.text("%#x" % self.value)
2217 q.breakable()
2218 q.text('}')
2219
2220oxm.subtypes[205316] = bsn_vlan_xlate_port_group_id
2221
2222class bsn_vlan_xlate_port_group_id_masked(oxm):
2223 type_len = 205576
2224
2225 def __init__(self, value=None, value_mask=None):
2226 if value != None:
2227 self.value = value
2228 else:
2229 self.value = 0
2230 if value_mask != None:
2231 self.value_mask = value_mask
2232 else:
2233 self.value_mask = 0
2234 return
2235
2236 def pack(self):
2237 packed = []
2238 packed.append(struct.pack("!L", self.type_len))
2239 packed.append(struct.pack("!L", self.value))
2240 packed.append(struct.pack("!L", self.value_mask))
2241 return ''.join(packed)
2242
2243 @staticmethod
2244 def unpack(reader):
2245 obj = bsn_vlan_xlate_port_group_id_masked()
2246 _type_len = reader.read("!L")[0]
2247 assert(_type_len == 205576)
2248 obj.value = reader.read("!L")[0]
2249 obj.value_mask = reader.read("!L")[0]
2250 return obj
2251
2252 def __eq__(self, other):
2253 if type(self) != type(other): return False
2254 if self.value != other.value: return False
2255 if self.value_mask != other.value_mask: return False
2256 return True
2257
2258 def pretty_print(self, q):
2259 q.text("bsn_vlan_xlate_port_group_id_masked {")
2260 with q.group():
2261 with q.indent(2):
2262 q.breakable()
2263 q.text("value = ");
2264 q.text("%#x" % self.value)
2265 q.text(","); q.breakable()
2266 q.text("value_mask = ");
2267 q.text("%#x" % self.value_mask)
2268 q.breakable()
2269 q.text('}')
2270
2271oxm.subtypes[205576] = bsn_vlan_xlate_port_group_id_masked
2272
Rich Lane7dcdf022013-12-11 14:45:27 -08002273class bsn_vrf(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -08002274 type_len = 197636
2275
2276 def __init__(self, value=None):
2277 if value != None:
2278 self.value = value
2279 else:
2280 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002281 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08002282
2283 def pack(self):
2284 packed = []
2285 packed.append(struct.pack("!L", self.type_len))
2286 packed.append(struct.pack("!L", self.value))
2287 return ''.join(packed)
2288
2289 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002290 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08002291 obj = bsn_vrf()
Rich Laned9e3f7b2013-11-04 11:40:43 -08002292 _type_len = reader.read("!L")[0]
2293 assert(_type_len == 197636)
2294 obj.value = reader.read("!L")[0]
2295 return obj
2296
2297 def __eq__(self, other):
2298 if type(self) != type(other): return False
2299 if self.value != other.value: return False
2300 return True
2301
Rich Laned9e3f7b2013-11-04 11:40:43 -08002302 def pretty_print(self, q):
2303 q.text("bsn_vrf {")
2304 with q.group():
2305 with q.indent(2):
2306 q.breakable()
2307 q.text("value = ");
2308 q.text("%#x" % self.value)
2309 q.breakable()
2310 q.text('}')
2311
Rich Lane7dcdf022013-12-11 14:45:27 -08002312oxm.subtypes[197636] = bsn_vrf
2313
2314class bsn_vrf_masked(oxm):
2315 type_len = 197896
Rich Laned9e3f7b2013-11-04 11:40:43 -08002316
2317 def __init__(self, value=None, value_mask=None):
2318 if value != None:
2319 self.value = value
2320 else:
2321 self.value = 0
2322 if value_mask != None:
2323 self.value_mask = value_mask
2324 else:
2325 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002326 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08002327
2328 def pack(self):
2329 packed = []
2330 packed.append(struct.pack("!L", self.type_len))
2331 packed.append(struct.pack("!L", self.value))
2332 packed.append(struct.pack("!L", self.value_mask))
2333 return ''.join(packed)
2334
2335 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002336 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08002337 obj = bsn_vrf_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08002338 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002339 assert(_type_len == 197896)
Rich Laned9e3f7b2013-11-04 11:40:43 -08002340 obj.value = reader.read("!L")[0]
2341 obj.value_mask = reader.read("!L")[0]
2342 return obj
2343
2344 def __eq__(self, other):
2345 if type(self) != type(other): return False
2346 if self.value != other.value: return False
2347 if self.value_mask != other.value_mask: return False
2348 return True
2349
Rich Laned9e3f7b2013-11-04 11:40:43 -08002350 def pretty_print(self, q):
2351 q.text("bsn_vrf_masked {")
2352 with q.group():
2353 with q.indent(2):
2354 q.breakable()
2355 q.text("value = ");
2356 q.text("%#x" % self.value)
2357 q.text(","); q.breakable()
2358 q.text("value_mask = ");
2359 q.text("%#x" % self.value_mask)
2360 q.breakable()
2361 q.text('}')
2362
Rich Lane7dcdf022013-12-11 14:45:27 -08002363oxm.subtypes[197896] = bsn_vrf_masked
2364
2365class eth_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002366 type_len = 2147485190
Rich Lanec2ee4b82013-04-24 17:12:38 -07002367
2368 def __init__(self, value=None):
2369 if value != None:
2370 self.value = value
2371 else:
2372 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002373 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002374
2375 def pack(self):
2376 packed = []
2377 packed.append(struct.pack("!L", self.type_len))
2378 packed.append(struct.pack("!6B", *self.value))
2379 return ''.join(packed)
2380
2381 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002382 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002383 obj = eth_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07002384 _type_len = reader.read("!L")[0]
2385 assert(_type_len == 2147485190)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002386 obj.value = list(reader.read('!6B'))
2387 return obj
2388
2389 def __eq__(self, other):
2390 if type(self) != type(other): return False
2391 if self.value != other.value: return False
2392 return True
2393
Rich Lanec2ee4b82013-04-24 17:12:38 -07002394 def pretty_print(self, q):
2395 q.text("eth_dst {")
2396 with q.group():
2397 with q.indent(2):
2398 q.breakable()
2399 q.text("value = ");
2400 q.text(util.pretty_mac(self.value))
2401 q.breakable()
2402 q.text('}')
2403
Rich Lane7dcdf022013-12-11 14:45:27 -08002404oxm.subtypes[2147485190] = eth_dst
2405
2406class eth_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002407 type_len = 2147485452
Rich Lanec2ee4b82013-04-24 17:12:38 -07002408
2409 def __init__(self, value=None, value_mask=None):
2410 if value != None:
2411 self.value = value
2412 else:
2413 self.value = [0,0,0,0,0,0]
2414 if value_mask != None:
2415 self.value_mask = value_mask
2416 else:
2417 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002418 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002419
2420 def pack(self):
2421 packed = []
2422 packed.append(struct.pack("!L", self.type_len))
2423 packed.append(struct.pack("!6B", *self.value))
2424 packed.append(struct.pack("!6B", *self.value_mask))
2425 return ''.join(packed)
2426
2427 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002428 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002429 obj = eth_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002430 _type_len = reader.read("!L")[0]
2431 assert(_type_len == 2147485452)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002432 obj.value = list(reader.read('!6B'))
2433 obj.value_mask = list(reader.read('!6B'))
2434 return obj
2435
2436 def __eq__(self, other):
2437 if type(self) != type(other): return False
2438 if self.value != other.value: return False
2439 if self.value_mask != other.value_mask: return False
2440 return True
2441
Rich Lanec2ee4b82013-04-24 17:12:38 -07002442 def pretty_print(self, q):
2443 q.text("eth_dst_masked {")
2444 with q.group():
2445 with q.indent(2):
2446 q.breakable()
2447 q.text("value = ");
2448 q.text(util.pretty_mac(self.value))
2449 q.text(","); q.breakable()
2450 q.text("value_mask = ");
2451 q.text(util.pretty_mac(self.value_mask))
2452 q.breakable()
2453 q.text('}')
2454
Rich Lane7dcdf022013-12-11 14:45:27 -08002455oxm.subtypes[2147485452] = eth_dst_masked
2456
2457class eth_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002458 type_len = 2147485702
Rich Lanec2ee4b82013-04-24 17:12:38 -07002459
2460 def __init__(self, value=None):
2461 if value != None:
2462 self.value = value
2463 else:
2464 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002465 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002466
2467 def pack(self):
2468 packed = []
2469 packed.append(struct.pack("!L", self.type_len))
2470 packed.append(struct.pack("!6B", *self.value))
2471 return ''.join(packed)
2472
2473 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002474 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002475 obj = eth_src()
Dan Talaycof6202252013-07-02 01:00:29 -07002476 _type_len = reader.read("!L")[0]
2477 assert(_type_len == 2147485702)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002478 obj.value = list(reader.read('!6B'))
2479 return obj
2480
2481 def __eq__(self, other):
2482 if type(self) != type(other): return False
2483 if self.value != other.value: return False
2484 return True
2485
Rich Lanec2ee4b82013-04-24 17:12:38 -07002486 def pretty_print(self, q):
2487 q.text("eth_src {")
2488 with q.group():
2489 with q.indent(2):
2490 q.breakable()
2491 q.text("value = ");
2492 q.text(util.pretty_mac(self.value))
2493 q.breakable()
2494 q.text('}')
2495
Rich Lane7dcdf022013-12-11 14:45:27 -08002496oxm.subtypes[2147485702] = eth_src
2497
2498class eth_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002499 type_len = 2147485964
Rich Lanec2ee4b82013-04-24 17:12:38 -07002500
2501 def __init__(self, value=None, value_mask=None):
2502 if value != None:
2503 self.value = value
2504 else:
2505 self.value = [0,0,0,0,0,0]
2506 if value_mask != None:
2507 self.value_mask = value_mask
2508 else:
2509 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002510 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002511
2512 def pack(self):
2513 packed = []
2514 packed.append(struct.pack("!L", self.type_len))
2515 packed.append(struct.pack("!6B", *self.value))
2516 packed.append(struct.pack("!6B", *self.value_mask))
2517 return ''.join(packed)
2518
2519 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002520 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002521 obj = eth_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002522 _type_len = reader.read("!L")[0]
2523 assert(_type_len == 2147485964)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002524 obj.value = list(reader.read('!6B'))
2525 obj.value_mask = list(reader.read('!6B'))
2526 return obj
2527
2528 def __eq__(self, other):
2529 if type(self) != type(other): return False
2530 if self.value != other.value: return False
2531 if self.value_mask != other.value_mask: return False
2532 return True
2533
Rich Lanec2ee4b82013-04-24 17:12:38 -07002534 def pretty_print(self, q):
2535 q.text("eth_src_masked {")
2536 with q.group():
2537 with q.indent(2):
2538 q.breakable()
2539 q.text("value = ");
2540 q.text(util.pretty_mac(self.value))
2541 q.text(","); q.breakable()
2542 q.text("value_mask = ");
2543 q.text(util.pretty_mac(self.value_mask))
2544 q.breakable()
2545 q.text('}')
2546
Rich Lane7dcdf022013-12-11 14:45:27 -08002547oxm.subtypes[2147485964] = eth_src_masked
2548
2549class eth_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002550 type_len = 2147486210
Rich Lanec2ee4b82013-04-24 17:12:38 -07002551
2552 def __init__(self, value=None):
2553 if value != None:
2554 self.value = value
2555 else:
2556 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002557 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002558
2559 def pack(self):
2560 packed = []
2561 packed.append(struct.pack("!L", self.type_len))
2562 packed.append(struct.pack("!H", self.value))
2563 return ''.join(packed)
2564
2565 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002566 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002567 obj = eth_type()
Dan Talaycof6202252013-07-02 01:00:29 -07002568 _type_len = reader.read("!L")[0]
2569 assert(_type_len == 2147486210)
2570 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002571 return obj
2572
2573 def __eq__(self, other):
2574 if type(self) != type(other): return False
2575 if self.value != other.value: return False
2576 return True
2577
Rich Lanec2ee4b82013-04-24 17:12:38 -07002578 def pretty_print(self, q):
2579 q.text("eth_type {")
2580 with q.group():
2581 with q.indent(2):
2582 q.breakable()
2583 q.text("value = ");
2584 q.text("%#x" % self.value)
2585 q.breakable()
2586 q.text('}')
2587
Rich Lane7dcdf022013-12-11 14:45:27 -08002588oxm.subtypes[2147486210] = eth_type
2589
2590class eth_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002591 type_len = 2147486468
Rich Lanec2ee4b82013-04-24 17:12:38 -07002592
2593 def __init__(self, value=None, value_mask=None):
2594 if value != None:
2595 self.value = value
2596 else:
2597 self.value = 0
2598 if value_mask != None:
2599 self.value_mask = value_mask
2600 else:
2601 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002602 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002603
2604 def pack(self):
2605 packed = []
2606 packed.append(struct.pack("!L", self.type_len))
2607 packed.append(struct.pack("!H", self.value))
2608 packed.append(struct.pack("!H", self.value_mask))
2609 return ''.join(packed)
2610
2611 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002612 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002613 obj = eth_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002614 _type_len = reader.read("!L")[0]
2615 assert(_type_len == 2147486468)
2616 obj.value = reader.read("!H")[0]
2617 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002618 return obj
2619
2620 def __eq__(self, other):
2621 if type(self) != type(other): return False
2622 if self.value != other.value: return False
2623 if self.value_mask != other.value_mask: return False
2624 return True
2625
Rich Lanec2ee4b82013-04-24 17:12:38 -07002626 def pretty_print(self, q):
2627 q.text("eth_type_masked {")
2628 with q.group():
2629 with q.indent(2):
2630 q.breakable()
2631 q.text("value = ");
2632 q.text("%#x" % self.value)
2633 q.text(","); q.breakable()
2634 q.text("value_mask = ");
2635 q.text("%#x" % self.value_mask)
2636 q.breakable()
2637 q.text('}')
2638
Rich Lane7dcdf022013-12-11 14:45:27 -08002639oxm.subtypes[2147486468] = eth_type_masked
2640
2641class icmpv4_code(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002642 type_len = 2147493889
Rich Lanec2ee4b82013-04-24 17:12:38 -07002643
2644 def __init__(self, value=None):
2645 if value != None:
2646 self.value = value
2647 else:
2648 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002649 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002650
2651 def pack(self):
2652 packed = []
2653 packed.append(struct.pack("!L", self.type_len))
2654 packed.append(struct.pack("!B", self.value))
2655 return ''.join(packed)
2656
2657 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002658 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002659 obj = icmpv4_code()
Dan Talaycof6202252013-07-02 01:00:29 -07002660 _type_len = reader.read("!L")[0]
2661 assert(_type_len == 2147493889)
2662 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002663 return obj
2664
2665 def __eq__(self, other):
2666 if type(self) != type(other): return False
2667 if self.value != other.value: return False
2668 return True
2669
Rich Lanec2ee4b82013-04-24 17:12:38 -07002670 def pretty_print(self, q):
2671 q.text("icmpv4_code {")
2672 with q.group():
2673 with q.indent(2):
2674 q.breakable()
2675 q.text("value = ");
2676 q.text("%#x" % self.value)
2677 q.breakable()
2678 q.text('}')
2679
Rich Lane7dcdf022013-12-11 14:45:27 -08002680oxm.subtypes[2147493889] = icmpv4_code
2681
2682class icmpv4_code_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002683 type_len = 2147494146
Rich Lanec2ee4b82013-04-24 17:12:38 -07002684
2685 def __init__(self, value=None, value_mask=None):
2686 if value != None:
2687 self.value = value
2688 else:
2689 self.value = 0
2690 if value_mask != None:
2691 self.value_mask = value_mask
2692 else:
2693 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002694 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002695
2696 def pack(self):
2697 packed = []
2698 packed.append(struct.pack("!L", self.type_len))
2699 packed.append(struct.pack("!B", self.value))
2700 packed.append(struct.pack("!B", self.value_mask))
2701 return ''.join(packed)
2702
2703 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002704 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002705 obj = icmpv4_code_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002706 _type_len = reader.read("!L")[0]
2707 assert(_type_len == 2147494146)
2708 obj.value = reader.read("!B")[0]
2709 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002710 return obj
2711
2712 def __eq__(self, other):
2713 if type(self) != type(other): return False
2714 if self.value != other.value: return False
2715 if self.value_mask != other.value_mask: return False
2716 return True
2717
Rich Lanec2ee4b82013-04-24 17:12:38 -07002718 def pretty_print(self, q):
2719 q.text("icmpv4_code_masked {")
2720 with q.group():
2721 with q.indent(2):
2722 q.breakable()
2723 q.text("value = ");
2724 q.text("%#x" % self.value)
2725 q.text(","); q.breakable()
2726 q.text("value_mask = ");
2727 q.text("%#x" % self.value_mask)
2728 q.breakable()
2729 q.text('}')
2730
Rich Lane7dcdf022013-12-11 14:45:27 -08002731oxm.subtypes[2147494146] = icmpv4_code_masked
2732
2733class icmpv4_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002734 type_len = 2147493377
Rich Lanec2ee4b82013-04-24 17:12:38 -07002735
2736 def __init__(self, value=None):
2737 if value != None:
2738 self.value = value
2739 else:
2740 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002741 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002742
2743 def pack(self):
2744 packed = []
2745 packed.append(struct.pack("!L", self.type_len))
2746 packed.append(struct.pack("!B", self.value))
2747 return ''.join(packed)
2748
2749 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002750 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002751 obj = icmpv4_type()
Dan Talaycof6202252013-07-02 01:00:29 -07002752 _type_len = reader.read("!L")[0]
2753 assert(_type_len == 2147493377)
2754 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002755 return obj
2756
2757 def __eq__(self, other):
2758 if type(self) != type(other): return False
2759 if self.value != other.value: return False
2760 return True
2761
Rich Lanec2ee4b82013-04-24 17:12:38 -07002762 def pretty_print(self, q):
2763 q.text("icmpv4_type {")
2764 with q.group():
2765 with q.indent(2):
2766 q.breakable()
2767 q.text("value = ");
2768 q.text("%#x" % self.value)
2769 q.breakable()
2770 q.text('}')
2771
Rich Lane7dcdf022013-12-11 14:45:27 -08002772oxm.subtypes[2147493377] = icmpv4_type
2773
2774class icmpv4_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002775 type_len = 2147493634
Rich Lanec2ee4b82013-04-24 17:12:38 -07002776
2777 def __init__(self, value=None, value_mask=None):
2778 if value != None:
2779 self.value = value
2780 else:
2781 self.value = 0
2782 if value_mask != None:
2783 self.value_mask = value_mask
2784 else:
2785 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002786 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002787
2788 def pack(self):
2789 packed = []
2790 packed.append(struct.pack("!L", self.type_len))
2791 packed.append(struct.pack("!B", self.value))
2792 packed.append(struct.pack("!B", self.value_mask))
2793 return ''.join(packed)
2794
2795 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002796 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002797 obj = icmpv4_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002798 _type_len = reader.read("!L")[0]
2799 assert(_type_len == 2147493634)
2800 obj.value = reader.read("!B")[0]
2801 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002802 return obj
2803
2804 def __eq__(self, other):
2805 if type(self) != type(other): return False
2806 if self.value != other.value: return False
2807 if self.value_mask != other.value_mask: return False
2808 return True
2809
Rich Lanec2ee4b82013-04-24 17:12:38 -07002810 def pretty_print(self, q):
2811 q.text("icmpv4_type_masked {")
2812 with q.group():
2813 with q.indent(2):
2814 q.breakable()
2815 q.text("value = ");
2816 q.text("%#x" % self.value)
2817 q.text(","); q.breakable()
2818 q.text("value_mask = ");
2819 q.text("%#x" % self.value_mask)
2820 q.breakable()
2821 q.text('}')
2822
Rich Lane7dcdf022013-12-11 14:45:27 -08002823oxm.subtypes[2147493634] = icmpv4_type_masked
2824
2825class icmpv6_code(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002826 type_len = 2147499009
Rich Lanec2ee4b82013-04-24 17:12:38 -07002827
2828 def __init__(self, value=None):
2829 if value != None:
2830 self.value = value
2831 else:
2832 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002833 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002834
2835 def pack(self):
2836 packed = []
2837 packed.append(struct.pack("!L", self.type_len))
2838 packed.append(struct.pack("!B", self.value))
2839 return ''.join(packed)
2840
2841 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002842 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002843 obj = icmpv6_code()
Dan Talaycof6202252013-07-02 01:00:29 -07002844 _type_len = reader.read("!L")[0]
2845 assert(_type_len == 2147499009)
2846 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002847 return obj
2848
2849 def __eq__(self, other):
2850 if type(self) != type(other): return False
2851 if self.value != other.value: return False
2852 return True
2853
Rich Lanec2ee4b82013-04-24 17:12:38 -07002854 def pretty_print(self, q):
2855 q.text("icmpv6_code {")
2856 with q.group():
2857 with q.indent(2):
2858 q.breakable()
2859 q.text("value = ");
2860 q.text("%#x" % self.value)
2861 q.breakable()
2862 q.text('}')
2863
Rich Lane7dcdf022013-12-11 14:45:27 -08002864oxm.subtypes[2147499009] = icmpv6_code
2865
2866class icmpv6_code_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002867 type_len = 2147499266
Rich Lanec2ee4b82013-04-24 17:12:38 -07002868
2869 def __init__(self, value=None, value_mask=None):
2870 if value != None:
2871 self.value = value
2872 else:
2873 self.value = 0
2874 if value_mask != None:
2875 self.value_mask = value_mask
2876 else:
2877 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002878 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002879
2880 def pack(self):
2881 packed = []
2882 packed.append(struct.pack("!L", self.type_len))
2883 packed.append(struct.pack("!B", self.value))
2884 packed.append(struct.pack("!B", self.value_mask))
2885 return ''.join(packed)
2886
2887 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002888 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002889 obj = icmpv6_code_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002890 _type_len = reader.read("!L")[0]
2891 assert(_type_len == 2147499266)
2892 obj.value = reader.read("!B")[0]
2893 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002894 return obj
2895
2896 def __eq__(self, other):
2897 if type(self) != type(other): return False
2898 if self.value != other.value: return False
2899 if self.value_mask != other.value_mask: return False
2900 return True
2901
Rich Lanec2ee4b82013-04-24 17:12:38 -07002902 def pretty_print(self, q):
2903 q.text("icmpv6_code_masked {")
2904 with q.group():
2905 with q.indent(2):
2906 q.breakable()
2907 q.text("value = ");
2908 q.text("%#x" % self.value)
2909 q.text(","); q.breakable()
2910 q.text("value_mask = ");
2911 q.text("%#x" % self.value_mask)
2912 q.breakable()
2913 q.text('}')
2914
Rich Lane7dcdf022013-12-11 14:45:27 -08002915oxm.subtypes[2147499266] = icmpv6_code_masked
2916
2917class icmpv6_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002918 type_len = 2147498497
Rich Lanec2ee4b82013-04-24 17:12:38 -07002919
2920 def __init__(self, value=None):
2921 if value != None:
2922 self.value = value
2923 else:
2924 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002925 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002926
2927 def pack(self):
2928 packed = []
2929 packed.append(struct.pack("!L", self.type_len))
2930 packed.append(struct.pack("!B", self.value))
2931 return ''.join(packed)
2932
2933 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002934 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002935 obj = icmpv6_type()
Dan Talaycof6202252013-07-02 01:00:29 -07002936 _type_len = reader.read("!L")[0]
2937 assert(_type_len == 2147498497)
2938 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002939 return obj
2940
2941 def __eq__(self, other):
2942 if type(self) != type(other): return False
2943 if self.value != other.value: return False
2944 return True
2945
Rich Lanec2ee4b82013-04-24 17:12:38 -07002946 def pretty_print(self, q):
2947 q.text("icmpv6_type {")
2948 with q.group():
2949 with q.indent(2):
2950 q.breakable()
2951 q.text("value = ");
2952 q.text("%#x" % self.value)
2953 q.breakable()
2954 q.text('}')
2955
Rich Lane7dcdf022013-12-11 14:45:27 -08002956oxm.subtypes[2147498497] = icmpv6_type
2957
2958class icmpv6_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002959 type_len = 2147498754
Rich Lanec2ee4b82013-04-24 17:12:38 -07002960
2961 def __init__(self, value=None, value_mask=None):
2962 if value != None:
2963 self.value = value
2964 else:
2965 self.value = 0
2966 if value_mask != None:
2967 self.value_mask = value_mask
2968 else:
2969 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002970 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002971
2972 def pack(self):
2973 packed = []
2974 packed.append(struct.pack("!L", self.type_len))
2975 packed.append(struct.pack("!B", self.value))
2976 packed.append(struct.pack("!B", self.value_mask))
2977 return ''.join(packed)
2978
2979 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002980 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002981 obj = icmpv6_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002982 _type_len = reader.read("!L")[0]
2983 assert(_type_len == 2147498754)
2984 obj.value = reader.read("!B")[0]
2985 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002986 return obj
2987
2988 def __eq__(self, other):
2989 if type(self) != type(other): return False
2990 if self.value != other.value: return False
2991 if self.value_mask != other.value_mask: return False
2992 return True
2993
Rich Lanec2ee4b82013-04-24 17:12:38 -07002994 def pretty_print(self, q):
2995 q.text("icmpv6_type_masked {")
2996 with q.group():
2997 with q.indent(2):
2998 q.breakable()
2999 q.text("value = ");
3000 q.text("%#x" % self.value)
3001 q.text(","); q.breakable()
3002 q.text("value_mask = ");
3003 q.text("%#x" % self.value_mask)
3004 q.breakable()
3005 q.text('}')
3006
Rich Lane7dcdf022013-12-11 14:45:27 -08003007oxm.subtypes[2147498754] = icmpv6_type_masked
3008
3009class in_phy_port(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003010 type_len = 2147484164
Rich Lanec2ee4b82013-04-24 17:12:38 -07003011
3012 def __init__(self, value=None):
3013 if value != None:
3014 self.value = value
3015 else:
3016 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003017 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003018
3019 def pack(self):
3020 packed = []
3021 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07003022 packed.append(util.pack_port_no(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003023 return ''.join(packed)
3024
3025 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003026 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003027 obj = in_phy_port()
Dan Talaycof6202252013-07-02 01:00:29 -07003028 _type_len = reader.read("!L")[0]
3029 assert(_type_len == 2147484164)
3030 obj.value = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003031 return obj
3032
3033 def __eq__(self, other):
3034 if type(self) != type(other): return False
3035 if self.value != other.value: return False
3036 return True
3037
Rich Lanec2ee4b82013-04-24 17:12:38 -07003038 def pretty_print(self, q):
3039 q.text("in_phy_port {")
3040 with q.group():
3041 with q.indent(2):
3042 q.breakable()
3043 q.text("value = ");
3044 q.text(util.pretty_port(self.value))
3045 q.breakable()
3046 q.text('}')
3047
Rich Lane7dcdf022013-12-11 14:45:27 -08003048oxm.subtypes[2147484164] = in_phy_port
3049
3050class in_phy_port_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003051 type_len = 2147484424
Rich Lanec2ee4b82013-04-24 17:12:38 -07003052
3053 def __init__(self, value=None, value_mask=None):
3054 if value != None:
3055 self.value = value
3056 else:
3057 self.value = 0
3058 if value_mask != None:
3059 self.value_mask = value_mask
3060 else:
3061 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003062 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003063
3064 def pack(self):
3065 packed = []
3066 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07003067 packed.append(util.pack_port_no(self.value))
3068 packed.append(util.pack_port_no(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003069 return ''.join(packed)
3070
3071 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003072 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003073 obj = in_phy_port_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003074 _type_len = reader.read("!L")[0]
3075 assert(_type_len == 2147484424)
3076 obj.value = util.unpack_port_no(reader)
3077 obj.value_mask = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003078 return obj
3079
3080 def __eq__(self, other):
3081 if type(self) != type(other): return False
3082 if self.value != other.value: return False
3083 if self.value_mask != other.value_mask: return False
3084 return True
3085
Rich Lanec2ee4b82013-04-24 17:12:38 -07003086 def pretty_print(self, q):
3087 q.text("in_phy_port_masked {")
3088 with q.group():
3089 with q.indent(2):
3090 q.breakable()
3091 q.text("value = ");
3092 q.text(util.pretty_port(self.value))
3093 q.text(","); q.breakable()
3094 q.text("value_mask = ");
3095 q.text(util.pretty_port(self.value_mask))
3096 q.breakable()
3097 q.text('}')
3098
Rich Lane7dcdf022013-12-11 14:45:27 -08003099oxm.subtypes[2147484424] = in_phy_port_masked
3100
3101class in_port(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003102 type_len = 2147483652
Rich Lanec2ee4b82013-04-24 17:12:38 -07003103
3104 def __init__(self, value=None):
3105 if value != None:
3106 self.value = value
3107 else:
3108 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003109 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003110
3111 def pack(self):
3112 packed = []
3113 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07003114 packed.append(util.pack_port_no(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003115 return ''.join(packed)
3116
3117 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003118 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003119 obj = in_port()
Dan Talaycof6202252013-07-02 01:00:29 -07003120 _type_len = reader.read("!L")[0]
3121 assert(_type_len == 2147483652)
3122 obj.value = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003123 return obj
3124
3125 def __eq__(self, other):
3126 if type(self) != type(other): return False
3127 if self.value != other.value: return False
3128 return True
3129
Rich Lanec2ee4b82013-04-24 17:12:38 -07003130 def pretty_print(self, q):
3131 q.text("in_port {")
3132 with q.group():
3133 with q.indent(2):
3134 q.breakable()
3135 q.text("value = ");
3136 q.text(util.pretty_port(self.value))
3137 q.breakable()
3138 q.text('}')
3139
Rich Lane7dcdf022013-12-11 14:45:27 -08003140oxm.subtypes[2147483652] = in_port
3141
3142class in_port_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003143 type_len = 2147483912
Rich Lanec2ee4b82013-04-24 17:12:38 -07003144
3145 def __init__(self, value=None, value_mask=None):
3146 if value != None:
3147 self.value = value
3148 else:
3149 self.value = 0
3150 if value_mask != None:
3151 self.value_mask = value_mask
3152 else:
3153 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003154 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003155
3156 def pack(self):
3157 packed = []
3158 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07003159 packed.append(util.pack_port_no(self.value))
3160 packed.append(util.pack_port_no(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003161 return ''.join(packed)
3162
3163 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003164 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003165 obj = in_port_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003166 _type_len = reader.read("!L")[0]
3167 assert(_type_len == 2147483912)
3168 obj.value = util.unpack_port_no(reader)
3169 obj.value_mask = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003170 return obj
3171
3172 def __eq__(self, other):
3173 if type(self) != type(other): return False
3174 if self.value != other.value: return False
3175 if self.value_mask != other.value_mask: return False
3176 return True
3177
Rich Lanec2ee4b82013-04-24 17:12:38 -07003178 def pretty_print(self, q):
3179 q.text("in_port_masked {")
3180 with q.group():
3181 with q.indent(2):
3182 q.breakable()
3183 q.text("value = ");
3184 q.text(util.pretty_port(self.value))
3185 q.text(","); q.breakable()
3186 q.text("value_mask = ");
3187 q.text(util.pretty_port(self.value_mask))
3188 q.breakable()
3189 q.text('}')
3190
Rich Lane7dcdf022013-12-11 14:45:27 -08003191oxm.subtypes[2147483912] = in_port_masked
3192
3193class ip_dscp(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003194 type_len = 2147487745
Rich Lanec2ee4b82013-04-24 17:12:38 -07003195
3196 def __init__(self, value=None):
3197 if value != None:
3198 self.value = value
3199 else:
3200 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003201 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003202
3203 def pack(self):
3204 packed = []
3205 packed.append(struct.pack("!L", self.type_len))
3206 packed.append(struct.pack("!B", self.value))
3207 return ''.join(packed)
3208
3209 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003210 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003211 obj = ip_dscp()
Dan Talaycof6202252013-07-02 01:00:29 -07003212 _type_len = reader.read("!L")[0]
3213 assert(_type_len == 2147487745)
3214 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003215 return obj
3216
3217 def __eq__(self, other):
3218 if type(self) != type(other): return False
3219 if self.value != other.value: return False
3220 return True
3221
Rich Lanec2ee4b82013-04-24 17:12:38 -07003222 def pretty_print(self, q):
3223 q.text("ip_dscp {")
3224 with q.group():
3225 with q.indent(2):
3226 q.breakable()
3227 q.text("value = ");
3228 q.text("%#x" % self.value)
3229 q.breakable()
3230 q.text('}')
3231
Rich Lane7dcdf022013-12-11 14:45:27 -08003232oxm.subtypes[2147487745] = ip_dscp
3233
3234class ip_dscp_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003235 type_len = 2147488002
Rich Lanec2ee4b82013-04-24 17:12:38 -07003236
3237 def __init__(self, value=None, value_mask=None):
3238 if value != None:
3239 self.value = value
3240 else:
3241 self.value = 0
3242 if value_mask != None:
3243 self.value_mask = value_mask
3244 else:
3245 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003246 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003247
3248 def pack(self):
3249 packed = []
3250 packed.append(struct.pack("!L", self.type_len))
3251 packed.append(struct.pack("!B", self.value))
3252 packed.append(struct.pack("!B", self.value_mask))
3253 return ''.join(packed)
3254
3255 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003256 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003257 obj = ip_dscp_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003258 _type_len = reader.read("!L")[0]
3259 assert(_type_len == 2147488002)
3260 obj.value = reader.read("!B")[0]
3261 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003262 return obj
3263
3264 def __eq__(self, other):
3265 if type(self) != type(other): return False
3266 if self.value != other.value: return False
3267 if self.value_mask != other.value_mask: return False
3268 return True
3269
Rich Lanec2ee4b82013-04-24 17:12:38 -07003270 def pretty_print(self, q):
3271 q.text("ip_dscp_masked {")
3272 with q.group():
3273 with q.indent(2):
3274 q.breakable()
3275 q.text("value = ");
3276 q.text("%#x" % self.value)
3277 q.text(","); q.breakable()
3278 q.text("value_mask = ");
3279 q.text("%#x" % self.value_mask)
3280 q.breakable()
3281 q.text('}')
3282
Rich Lane7dcdf022013-12-11 14:45:27 -08003283oxm.subtypes[2147488002] = ip_dscp_masked
3284
3285class ip_ecn(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003286 type_len = 2147488257
Rich Lanec2ee4b82013-04-24 17:12:38 -07003287
3288 def __init__(self, value=None):
3289 if value != None:
3290 self.value = value
3291 else:
3292 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003293 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003294
3295 def pack(self):
3296 packed = []
3297 packed.append(struct.pack("!L", self.type_len))
3298 packed.append(struct.pack("!B", self.value))
3299 return ''.join(packed)
3300
3301 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003302 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003303 obj = ip_ecn()
Dan Talaycof6202252013-07-02 01:00:29 -07003304 _type_len = reader.read("!L")[0]
3305 assert(_type_len == 2147488257)
3306 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003307 return obj
3308
3309 def __eq__(self, other):
3310 if type(self) != type(other): return False
3311 if self.value != other.value: return False
3312 return True
3313
Rich Lanec2ee4b82013-04-24 17:12:38 -07003314 def pretty_print(self, q):
3315 q.text("ip_ecn {")
3316 with q.group():
3317 with q.indent(2):
3318 q.breakable()
3319 q.text("value = ");
3320 q.text("%#x" % self.value)
3321 q.breakable()
3322 q.text('}')
3323
Rich Lane7dcdf022013-12-11 14:45:27 -08003324oxm.subtypes[2147488257] = ip_ecn
3325
3326class ip_ecn_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003327 type_len = 2147488514
Rich Lanec2ee4b82013-04-24 17:12:38 -07003328
3329 def __init__(self, value=None, value_mask=None):
3330 if value != None:
3331 self.value = value
3332 else:
3333 self.value = 0
3334 if value_mask != None:
3335 self.value_mask = value_mask
3336 else:
3337 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003338 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003339
3340 def pack(self):
3341 packed = []
3342 packed.append(struct.pack("!L", self.type_len))
3343 packed.append(struct.pack("!B", self.value))
3344 packed.append(struct.pack("!B", self.value_mask))
3345 return ''.join(packed)
3346
3347 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003348 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003349 obj = ip_ecn_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003350 _type_len = reader.read("!L")[0]
3351 assert(_type_len == 2147488514)
3352 obj.value = reader.read("!B")[0]
3353 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003354 return obj
3355
3356 def __eq__(self, other):
3357 if type(self) != type(other): return False
3358 if self.value != other.value: return False
3359 if self.value_mask != other.value_mask: return False
3360 return True
3361
Rich Lanec2ee4b82013-04-24 17:12:38 -07003362 def pretty_print(self, q):
3363 q.text("ip_ecn_masked {")
3364 with q.group():
3365 with q.indent(2):
3366 q.breakable()
3367 q.text("value = ");
3368 q.text("%#x" % self.value)
3369 q.text(","); q.breakable()
3370 q.text("value_mask = ");
3371 q.text("%#x" % self.value_mask)
3372 q.breakable()
3373 q.text('}')
3374
Rich Lane7dcdf022013-12-11 14:45:27 -08003375oxm.subtypes[2147488514] = ip_ecn_masked
3376
3377class ip_proto(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003378 type_len = 2147488769
Rich Lanec2ee4b82013-04-24 17:12:38 -07003379
3380 def __init__(self, value=None):
3381 if value != None:
3382 self.value = value
3383 else:
3384 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003385 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003386
3387 def pack(self):
3388 packed = []
3389 packed.append(struct.pack("!L", self.type_len))
3390 packed.append(struct.pack("!B", self.value))
3391 return ''.join(packed)
3392
3393 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003394 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003395 obj = ip_proto()
Dan Talaycof6202252013-07-02 01:00:29 -07003396 _type_len = reader.read("!L")[0]
3397 assert(_type_len == 2147488769)
3398 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003399 return obj
3400
3401 def __eq__(self, other):
3402 if type(self) != type(other): return False
3403 if self.value != other.value: return False
3404 return True
3405
Rich Lanec2ee4b82013-04-24 17:12:38 -07003406 def pretty_print(self, q):
3407 q.text("ip_proto {")
3408 with q.group():
3409 with q.indent(2):
3410 q.breakable()
3411 q.text("value = ");
3412 q.text("%#x" % self.value)
3413 q.breakable()
3414 q.text('}')
3415
Rich Lane7dcdf022013-12-11 14:45:27 -08003416oxm.subtypes[2147488769] = ip_proto
3417
3418class ip_proto_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003419 type_len = 2147489026
Rich Lanec2ee4b82013-04-24 17:12:38 -07003420
3421 def __init__(self, value=None, value_mask=None):
3422 if value != None:
3423 self.value = value
3424 else:
3425 self.value = 0
3426 if value_mask != None:
3427 self.value_mask = value_mask
3428 else:
3429 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003430 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003431
3432 def pack(self):
3433 packed = []
3434 packed.append(struct.pack("!L", self.type_len))
3435 packed.append(struct.pack("!B", self.value))
3436 packed.append(struct.pack("!B", self.value_mask))
3437 return ''.join(packed)
3438
3439 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003440 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003441 obj = ip_proto_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003442 _type_len = reader.read("!L")[0]
3443 assert(_type_len == 2147489026)
3444 obj.value = reader.read("!B")[0]
3445 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003446 return obj
3447
3448 def __eq__(self, other):
3449 if type(self) != type(other): return False
3450 if self.value != other.value: return False
3451 if self.value_mask != other.value_mask: return False
3452 return True
3453
Rich Lanec2ee4b82013-04-24 17:12:38 -07003454 def pretty_print(self, q):
3455 q.text("ip_proto_masked {")
3456 with q.group():
3457 with q.indent(2):
3458 q.breakable()
3459 q.text("value = ");
3460 q.text("%#x" % self.value)
3461 q.text(","); q.breakable()
3462 q.text("value_mask = ");
3463 q.text("%#x" % self.value_mask)
3464 q.breakable()
3465 q.text('}')
3466
Rich Lane7dcdf022013-12-11 14:45:27 -08003467oxm.subtypes[2147489026] = ip_proto_masked
3468
3469class ipv4_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003470 type_len = 2147489796
Rich Lanec2ee4b82013-04-24 17:12:38 -07003471
3472 def __init__(self, value=None):
3473 if value != None:
3474 self.value = value
3475 else:
3476 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003477 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003478
3479 def pack(self):
3480 packed = []
3481 packed.append(struct.pack("!L", self.type_len))
3482 packed.append(struct.pack("!L", self.value))
3483 return ''.join(packed)
3484
3485 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003486 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003487 obj = ipv4_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003488 _type_len = reader.read("!L")[0]
3489 assert(_type_len == 2147489796)
3490 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003491 return obj
3492
3493 def __eq__(self, other):
3494 if type(self) != type(other): return False
3495 if self.value != other.value: return False
3496 return True
3497
Rich Lanec2ee4b82013-04-24 17:12:38 -07003498 def pretty_print(self, q):
3499 q.text("ipv4_dst {")
3500 with q.group():
3501 with q.indent(2):
3502 q.breakable()
3503 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07003504 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003505 q.breakable()
3506 q.text('}')
3507
Rich Lane7dcdf022013-12-11 14:45:27 -08003508oxm.subtypes[2147489796] = ipv4_dst
3509
3510class ipv4_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003511 type_len = 2147490056
Rich Lanec2ee4b82013-04-24 17:12:38 -07003512
3513 def __init__(self, value=None, value_mask=None):
3514 if value != None:
3515 self.value = value
3516 else:
3517 self.value = 0
3518 if value_mask != None:
3519 self.value_mask = value_mask
3520 else:
3521 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003522 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003523
3524 def pack(self):
3525 packed = []
3526 packed.append(struct.pack("!L", self.type_len))
3527 packed.append(struct.pack("!L", self.value))
3528 packed.append(struct.pack("!L", self.value_mask))
3529 return ''.join(packed)
3530
3531 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003532 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003533 obj = ipv4_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003534 _type_len = reader.read("!L")[0]
3535 assert(_type_len == 2147490056)
3536 obj.value = reader.read("!L")[0]
3537 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003538 return obj
3539
3540 def __eq__(self, other):
3541 if type(self) != type(other): return False
3542 if self.value != other.value: return False
3543 if self.value_mask != other.value_mask: return False
3544 return True
3545
Rich Lanec2ee4b82013-04-24 17:12:38 -07003546 def pretty_print(self, q):
3547 q.text("ipv4_dst_masked {")
3548 with q.group():
3549 with q.indent(2):
3550 q.breakable()
3551 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07003552 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003553 q.text(","); q.breakable()
3554 q.text("value_mask = ");
Rich Laned53156a2013-08-05 17:17:33 -07003555 q.text(util.pretty_ipv4(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003556 q.breakable()
3557 q.text('}')
3558
Rich Lane7dcdf022013-12-11 14:45:27 -08003559oxm.subtypes[2147490056] = ipv4_dst_masked
3560
3561class ipv4_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003562 type_len = 2147489284
Rich Lanec2ee4b82013-04-24 17:12:38 -07003563
3564 def __init__(self, value=None):
3565 if value != None:
3566 self.value = value
3567 else:
3568 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003569 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003570
3571 def pack(self):
3572 packed = []
3573 packed.append(struct.pack("!L", self.type_len))
3574 packed.append(struct.pack("!L", self.value))
3575 return ''.join(packed)
3576
3577 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003578 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003579 obj = ipv4_src()
Dan Talaycof6202252013-07-02 01:00:29 -07003580 _type_len = reader.read("!L")[0]
3581 assert(_type_len == 2147489284)
3582 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003583 return obj
3584
3585 def __eq__(self, other):
3586 if type(self) != type(other): return False
3587 if self.value != other.value: return False
3588 return True
3589
Rich Lanec2ee4b82013-04-24 17:12:38 -07003590 def pretty_print(self, q):
3591 q.text("ipv4_src {")
3592 with q.group():
3593 with q.indent(2):
3594 q.breakable()
3595 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07003596 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003597 q.breakable()
3598 q.text('}')
3599
Rich Lane7dcdf022013-12-11 14:45:27 -08003600oxm.subtypes[2147489284] = ipv4_src
3601
3602class ipv4_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003603 type_len = 2147489544
Rich Lanec2ee4b82013-04-24 17:12:38 -07003604
3605 def __init__(self, value=None, value_mask=None):
3606 if value != None:
3607 self.value = value
3608 else:
3609 self.value = 0
3610 if value_mask != None:
3611 self.value_mask = value_mask
3612 else:
3613 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003614 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003615
3616 def pack(self):
3617 packed = []
3618 packed.append(struct.pack("!L", self.type_len))
3619 packed.append(struct.pack("!L", self.value))
3620 packed.append(struct.pack("!L", self.value_mask))
3621 return ''.join(packed)
3622
3623 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003624 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003625 obj = ipv4_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003626 _type_len = reader.read("!L")[0]
3627 assert(_type_len == 2147489544)
3628 obj.value = reader.read("!L")[0]
3629 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003630 return obj
3631
3632 def __eq__(self, other):
3633 if type(self) != type(other): return False
3634 if self.value != other.value: return False
3635 if self.value_mask != other.value_mask: return False
3636 return True
3637
Rich Lanec2ee4b82013-04-24 17:12:38 -07003638 def pretty_print(self, q):
3639 q.text("ipv4_src_masked {")
3640 with q.group():
3641 with q.indent(2):
3642 q.breakable()
3643 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07003644 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003645 q.text(","); q.breakable()
3646 q.text("value_mask = ");
Rich Laned53156a2013-08-05 17:17:33 -07003647 q.text(util.pretty_ipv4(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003648 q.breakable()
3649 q.text('}')
3650
Rich Lane7dcdf022013-12-11 14:45:27 -08003651oxm.subtypes[2147489544] = ipv4_src_masked
3652
3653class ipv6_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003654 type_len = 2147497488
Rich Lanec2ee4b82013-04-24 17:12:38 -07003655
3656 def __init__(self, value=None):
3657 if value != None:
3658 self.value = value
3659 else:
3660 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Rich Lane7dcdf022013-12-11 14:45:27 -08003661 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003662
3663 def pack(self):
3664 packed = []
3665 packed.append(struct.pack("!L", self.type_len))
3666 packed.append(struct.pack("!16s", self.value))
3667 return ''.join(packed)
3668
3669 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003670 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003671 obj = ipv6_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003672 _type_len = reader.read("!L")[0]
3673 assert(_type_len == 2147497488)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003674 obj.value = reader.read('!16s')[0]
3675 return obj
3676
3677 def __eq__(self, other):
3678 if type(self) != type(other): return False
3679 if self.value != other.value: return False
3680 return True
3681
Rich Lanec2ee4b82013-04-24 17:12:38 -07003682 def pretty_print(self, q):
3683 q.text("ipv6_dst {")
3684 with q.group():
3685 with q.indent(2):
3686 q.breakable()
3687 q.text("value = ");
3688 q.pp(self.value)
3689 q.breakable()
3690 q.text('}')
3691
Rich Lane7dcdf022013-12-11 14:45:27 -08003692oxm.subtypes[2147497488] = ipv6_dst
3693
3694class ipv6_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003695 type_len = 2147497760
Rich Lanec2ee4b82013-04-24 17:12:38 -07003696
3697 def __init__(self, value=None, value_mask=None):
3698 if value != None:
3699 self.value = value
3700 else:
3701 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
3702 if value_mask != None:
3703 self.value_mask = value_mask
3704 else:
3705 self.value_mask = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Rich Lane7dcdf022013-12-11 14:45:27 -08003706 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003707
3708 def pack(self):
3709 packed = []
3710 packed.append(struct.pack("!L", self.type_len))
3711 packed.append(struct.pack("!16s", self.value))
3712 packed.append(struct.pack("!16s", self.value_mask))
3713 return ''.join(packed)
3714
3715 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003716 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003717 obj = ipv6_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003718 _type_len = reader.read("!L")[0]
3719 assert(_type_len == 2147497760)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003720 obj.value = reader.read('!16s')[0]
3721 obj.value_mask = reader.read('!16s')[0]
3722 return obj
3723
3724 def __eq__(self, other):
3725 if type(self) != type(other): return False
3726 if self.value != other.value: return False
3727 if self.value_mask != other.value_mask: return False
3728 return True
3729
Rich Lanec2ee4b82013-04-24 17:12:38 -07003730 def pretty_print(self, q):
3731 q.text("ipv6_dst_masked {")
3732 with q.group():
3733 with q.indent(2):
3734 q.breakable()
3735 q.text("value = ");
3736 q.pp(self.value)
3737 q.text(","); q.breakable()
3738 q.text("value_mask = ");
3739 q.pp(self.value_mask)
3740 q.breakable()
3741 q.text('}')
3742
Rich Lane7dcdf022013-12-11 14:45:27 -08003743oxm.subtypes[2147497760] = ipv6_dst_masked
3744
Rich Laneccd32ed2014-11-10 17:48:24 -08003745class ipv6_exthdr(oxm):
3746 type_len = 2147503618
3747
3748 def __init__(self, value=None):
3749 if value != None:
3750 self.value = value
3751 else:
3752 self.value = 0
3753 return
3754
3755 def pack(self):
3756 packed = []
3757 packed.append(struct.pack("!L", self.type_len))
3758 packed.append(struct.pack("!H", self.value))
3759 return ''.join(packed)
3760
3761 @staticmethod
3762 def unpack(reader):
3763 obj = ipv6_exthdr()
3764 _type_len = reader.read("!L")[0]
3765 assert(_type_len == 2147503618)
3766 obj.value = reader.read("!H")[0]
3767 return obj
3768
3769 def __eq__(self, other):
3770 if type(self) != type(other): return False
3771 if self.value != other.value: return False
3772 return True
3773
3774 def pretty_print(self, q):
3775 q.text("ipv6_exthdr {")
3776 with q.group():
3777 with q.indent(2):
3778 q.breakable()
3779 q.text("value = ");
3780 q.text("%#x" % self.value)
3781 q.breakable()
3782 q.text('}')
3783
3784oxm.subtypes[2147503618] = ipv6_exthdr
3785
3786class ipv6_exthdr_masked(oxm):
3787 type_len = 2147503876
3788
3789 def __init__(self, value=None, value_mask=None):
3790 if value != None:
3791 self.value = value
3792 else:
3793 self.value = 0
3794 if value_mask != None:
3795 self.value_mask = value_mask
3796 else:
3797 self.value_mask = 0
3798 return
3799
3800 def pack(self):
3801 packed = []
3802 packed.append(struct.pack("!L", self.type_len))
3803 packed.append(struct.pack("!H", self.value))
3804 packed.append(struct.pack("!H", self.value_mask))
3805 return ''.join(packed)
3806
3807 @staticmethod
3808 def unpack(reader):
3809 obj = ipv6_exthdr_masked()
3810 _type_len = reader.read("!L")[0]
3811 assert(_type_len == 2147503876)
3812 obj.value = reader.read("!H")[0]
3813 obj.value_mask = reader.read("!H")[0]
3814 return obj
3815
3816 def __eq__(self, other):
3817 if type(self) != type(other): return False
3818 if self.value != other.value: return False
3819 if self.value_mask != other.value_mask: return False
3820 return True
3821
3822 def pretty_print(self, q):
3823 q.text("ipv6_exthdr_masked {")
3824 with q.group():
3825 with q.indent(2):
3826 q.breakable()
3827 q.text("value = ");
3828 q.text("%#x" % self.value)
3829 q.text(","); q.breakable()
3830 q.text("value_mask = ");
3831 q.text("%#x" % self.value_mask)
3832 q.breakable()
3833 q.text('}')
3834
3835oxm.subtypes[2147503876] = ipv6_exthdr_masked
3836
Rich Lane7dcdf022013-12-11 14:45:27 -08003837class ipv6_flabel(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003838 type_len = 2147497988
Rich Lanec2ee4b82013-04-24 17:12:38 -07003839
3840 def __init__(self, value=None):
3841 if value != None:
3842 self.value = value
3843 else:
3844 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003845 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003846
3847 def pack(self):
3848 packed = []
3849 packed.append(struct.pack("!L", self.type_len))
3850 packed.append(struct.pack("!L", self.value))
3851 return ''.join(packed)
3852
3853 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003854 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003855 obj = ipv6_flabel()
Dan Talaycof6202252013-07-02 01:00:29 -07003856 _type_len = reader.read("!L")[0]
3857 assert(_type_len == 2147497988)
3858 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003859 return obj
3860
3861 def __eq__(self, other):
3862 if type(self) != type(other): return False
3863 if self.value != other.value: return False
3864 return True
3865
Rich Lanec2ee4b82013-04-24 17:12:38 -07003866 def pretty_print(self, q):
3867 q.text("ipv6_flabel {")
3868 with q.group():
3869 with q.indent(2):
3870 q.breakable()
3871 q.text("value = ");
3872 q.text("%#x" % self.value)
3873 q.breakable()
3874 q.text('}')
3875
Rich Lane7dcdf022013-12-11 14:45:27 -08003876oxm.subtypes[2147497988] = ipv6_flabel
3877
3878class ipv6_flabel_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003879 type_len = 2147498248
Rich Lanec2ee4b82013-04-24 17:12:38 -07003880
3881 def __init__(self, value=None, value_mask=None):
3882 if value != None:
3883 self.value = value
3884 else:
3885 self.value = 0
3886 if value_mask != None:
3887 self.value_mask = value_mask
3888 else:
3889 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003890 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003891
3892 def pack(self):
3893 packed = []
3894 packed.append(struct.pack("!L", self.type_len))
3895 packed.append(struct.pack("!L", self.value))
3896 packed.append(struct.pack("!L", self.value_mask))
3897 return ''.join(packed)
3898
3899 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003900 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003901 obj = ipv6_flabel_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003902 _type_len = reader.read("!L")[0]
3903 assert(_type_len == 2147498248)
3904 obj.value = reader.read("!L")[0]
3905 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003906 return obj
3907
3908 def __eq__(self, other):
3909 if type(self) != type(other): return False
3910 if self.value != other.value: return False
3911 if self.value_mask != other.value_mask: return False
3912 return True
3913
Rich Lanec2ee4b82013-04-24 17:12:38 -07003914 def pretty_print(self, q):
3915 q.text("ipv6_flabel_masked {")
3916 with q.group():
3917 with q.indent(2):
3918 q.breakable()
3919 q.text("value = ");
3920 q.text("%#x" % self.value)
3921 q.text(","); q.breakable()
3922 q.text("value_mask = ");
3923 q.text("%#x" % self.value_mask)
3924 q.breakable()
3925 q.text('}')
3926
Rich Lane7dcdf022013-12-11 14:45:27 -08003927oxm.subtypes[2147498248] = ipv6_flabel_masked
3928
3929class ipv6_nd_sll(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003930 type_len = 2147500038
Rich Lanec2ee4b82013-04-24 17:12:38 -07003931
3932 def __init__(self, value=None):
3933 if value != None:
3934 self.value = value
3935 else:
3936 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08003937 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003938
3939 def pack(self):
3940 packed = []
3941 packed.append(struct.pack("!L", self.type_len))
3942 packed.append(struct.pack("!6B", *self.value))
3943 return ''.join(packed)
3944
3945 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003946 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003947 obj = ipv6_nd_sll()
Dan Talaycof6202252013-07-02 01:00:29 -07003948 _type_len = reader.read("!L")[0]
3949 assert(_type_len == 2147500038)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003950 obj.value = list(reader.read('!6B'))
3951 return obj
3952
3953 def __eq__(self, other):
3954 if type(self) != type(other): return False
3955 if self.value != other.value: return False
3956 return True
3957
Rich Lanec2ee4b82013-04-24 17:12:38 -07003958 def pretty_print(self, q):
3959 q.text("ipv6_nd_sll {")
3960 with q.group():
3961 with q.indent(2):
3962 q.breakable()
3963 q.text("value = ");
3964 q.text(util.pretty_mac(self.value))
3965 q.breakable()
3966 q.text('}')
3967
Rich Lane7dcdf022013-12-11 14:45:27 -08003968oxm.subtypes[2147500038] = ipv6_nd_sll
3969
3970class ipv6_nd_sll_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003971 type_len = 2147500300
Rich Lanec2ee4b82013-04-24 17:12:38 -07003972
3973 def __init__(self, value=None, value_mask=None):
3974 if value != None:
3975 self.value = value
3976 else:
3977 self.value = [0,0,0,0,0,0]
3978 if value_mask != None:
3979 self.value_mask = value_mask
3980 else:
3981 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08003982 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003983
3984 def pack(self):
3985 packed = []
3986 packed.append(struct.pack("!L", self.type_len))
3987 packed.append(struct.pack("!6B", *self.value))
3988 packed.append(struct.pack("!6B", *self.value_mask))
3989 return ''.join(packed)
3990
3991 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003992 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003993 obj = ipv6_nd_sll_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003994 _type_len = reader.read("!L")[0]
3995 assert(_type_len == 2147500300)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003996 obj.value = list(reader.read('!6B'))
3997 obj.value_mask = list(reader.read('!6B'))
3998 return obj
3999
4000 def __eq__(self, other):
4001 if type(self) != type(other): return False
4002 if self.value != other.value: return False
4003 if self.value_mask != other.value_mask: return False
4004 return True
4005
Rich Lanec2ee4b82013-04-24 17:12:38 -07004006 def pretty_print(self, q):
4007 q.text("ipv6_nd_sll_masked {")
4008 with q.group():
4009 with q.indent(2):
4010 q.breakable()
4011 q.text("value = ");
4012 q.text(util.pretty_mac(self.value))
4013 q.text(","); q.breakable()
4014 q.text("value_mask = ");
4015 q.text(util.pretty_mac(self.value_mask))
4016 q.breakable()
4017 q.text('}')
4018
Rich Lane7dcdf022013-12-11 14:45:27 -08004019oxm.subtypes[2147500300] = ipv6_nd_sll_masked
4020
4021class ipv6_nd_target(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004022 type_len = 2147499536
Rich Lanec2ee4b82013-04-24 17:12:38 -07004023
4024 def __init__(self, value=None):
4025 if value != None:
4026 self.value = value
4027 else:
4028 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Rich Lane7dcdf022013-12-11 14:45:27 -08004029 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004030
4031 def pack(self):
4032 packed = []
4033 packed.append(struct.pack("!L", self.type_len))
4034 packed.append(struct.pack("!16s", self.value))
4035 return ''.join(packed)
4036
4037 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004038 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004039 obj = ipv6_nd_target()
Dan Talaycof6202252013-07-02 01:00:29 -07004040 _type_len = reader.read("!L")[0]
4041 assert(_type_len == 2147499536)
Rich Lanec2ee4b82013-04-24 17:12:38 -07004042 obj.value = reader.read('!16s')[0]
4043 return obj
4044
4045 def __eq__(self, other):
4046 if type(self) != type(other): return False
4047 if self.value != other.value: return False
4048 return True
4049
Rich Lanec2ee4b82013-04-24 17:12:38 -07004050 def pretty_print(self, q):
4051 q.text("ipv6_nd_target {")
4052 with q.group():
4053 with q.indent(2):
4054 q.breakable()
4055 q.text("value = ");
4056 q.pp(self.value)
4057 q.breakable()
4058 q.text('}')
4059
Rich Lane7dcdf022013-12-11 14:45:27 -08004060oxm.subtypes[2147499536] = ipv6_nd_target
4061
4062class ipv6_nd_target_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004063 type_len = 2147499808
Rich Lanec2ee4b82013-04-24 17:12:38 -07004064
4065 def __init__(self, value=None, value_mask=None):
4066 if value != None:
4067 self.value = value
4068 else:
4069 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
4070 if value_mask != None:
4071 self.value_mask = value_mask
4072 else:
4073 self.value_mask = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Rich Lane7dcdf022013-12-11 14:45:27 -08004074 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004075
4076 def pack(self):
4077 packed = []
4078 packed.append(struct.pack("!L", self.type_len))
4079 packed.append(struct.pack("!16s", self.value))
4080 packed.append(struct.pack("!16s", self.value_mask))
4081 return ''.join(packed)
4082
4083 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004084 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004085 obj = ipv6_nd_target_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004086 _type_len = reader.read("!L")[0]
4087 assert(_type_len == 2147499808)
Rich Lanec2ee4b82013-04-24 17:12:38 -07004088 obj.value = reader.read('!16s')[0]
4089 obj.value_mask = reader.read('!16s')[0]
4090 return obj
4091
4092 def __eq__(self, other):
4093 if type(self) != type(other): return False
4094 if self.value != other.value: return False
4095 if self.value_mask != other.value_mask: return False
4096 return True
4097
Rich Lanec2ee4b82013-04-24 17:12:38 -07004098 def pretty_print(self, q):
4099 q.text("ipv6_nd_target_masked {")
4100 with q.group():
4101 with q.indent(2):
4102 q.breakable()
4103 q.text("value = ");
4104 q.pp(self.value)
4105 q.text(","); q.breakable()
4106 q.text("value_mask = ");
4107 q.pp(self.value_mask)
4108 q.breakable()
4109 q.text('}')
4110
Rich Lane7dcdf022013-12-11 14:45:27 -08004111oxm.subtypes[2147499808] = ipv6_nd_target_masked
4112
4113class ipv6_nd_tll(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004114 type_len = 2147500550
Rich Lanec2ee4b82013-04-24 17:12:38 -07004115
4116 def __init__(self, value=None):
4117 if value != None:
4118 self.value = value
4119 else:
4120 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08004121 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004122
4123 def pack(self):
4124 packed = []
4125 packed.append(struct.pack("!L", self.type_len))
4126 packed.append(struct.pack("!6B", *self.value))
4127 return ''.join(packed)
4128
4129 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004130 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004131 obj = ipv6_nd_tll()
Dan Talaycof6202252013-07-02 01:00:29 -07004132 _type_len = reader.read("!L")[0]
4133 assert(_type_len == 2147500550)
Rich Lanec2ee4b82013-04-24 17:12:38 -07004134 obj.value = list(reader.read('!6B'))
4135 return obj
4136
4137 def __eq__(self, other):
4138 if type(self) != type(other): return False
4139 if self.value != other.value: return False
4140 return True
4141
Rich Lanec2ee4b82013-04-24 17:12:38 -07004142 def pretty_print(self, q):
4143 q.text("ipv6_nd_tll {")
4144 with q.group():
4145 with q.indent(2):
4146 q.breakable()
4147 q.text("value = ");
4148 q.text(util.pretty_mac(self.value))
4149 q.breakable()
4150 q.text('}')
4151
Rich Lane7dcdf022013-12-11 14:45:27 -08004152oxm.subtypes[2147500550] = ipv6_nd_tll
4153
4154class ipv6_nd_tll_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004155 type_len = 2147500812
Rich Lanec2ee4b82013-04-24 17:12:38 -07004156
4157 def __init__(self, value=None, value_mask=None):
4158 if value != None:
4159 self.value = value
4160 else:
4161 self.value = [0,0,0,0,0,0]
4162 if value_mask != None:
4163 self.value_mask = value_mask
4164 else:
4165 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08004166 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004167
4168 def pack(self):
4169 packed = []
4170 packed.append(struct.pack("!L", self.type_len))
4171 packed.append(struct.pack("!6B", *self.value))
4172 packed.append(struct.pack("!6B", *self.value_mask))
4173 return ''.join(packed)
4174
4175 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004176 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004177 obj = ipv6_nd_tll_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004178 _type_len = reader.read("!L")[0]
4179 assert(_type_len == 2147500812)
Rich Lanec2ee4b82013-04-24 17:12:38 -07004180 obj.value = list(reader.read('!6B'))
4181 obj.value_mask = list(reader.read('!6B'))
4182 return obj
4183
4184 def __eq__(self, other):
4185 if type(self) != type(other): return False
4186 if self.value != other.value: return False
4187 if self.value_mask != other.value_mask: return False
4188 return True
4189
Rich Lanec2ee4b82013-04-24 17:12:38 -07004190 def pretty_print(self, q):
4191 q.text("ipv6_nd_tll_masked {")
4192 with q.group():
4193 with q.indent(2):
4194 q.breakable()
4195 q.text("value = ");
4196 q.text(util.pretty_mac(self.value))
4197 q.text(","); q.breakable()
4198 q.text("value_mask = ");
4199 q.text(util.pretty_mac(self.value_mask))
4200 q.breakable()
4201 q.text('}')
4202
Rich Lane7dcdf022013-12-11 14:45:27 -08004203oxm.subtypes[2147500812] = ipv6_nd_tll_masked
4204
4205class ipv6_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004206 type_len = 2147496976
Rich Lanec2ee4b82013-04-24 17:12:38 -07004207
4208 def __init__(self, value=None):
4209 if value != None:
4210 self.value = value
4211 else:
4212 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Rich Lane7dcdf022013-12-11 14:45:27 -08004213 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004214
4215 def pack(self):
4216 packed = []
4217 packed.append(struct.pack("!L", self.type_len))
4218 packed.append(struct.pack("!16s", self.value))
4219 return ''.join(packed)
4220
4221 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004222 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004223 obj = ipv6_src()
Dan Talaycof6202252013-07-02 01:00:29 -07004224 _type_len = reader.read("!L")[0]
4225 assert(_type_len == 2147496976)
Rich Lanec2ee4b82013-04-24 17:12:38 -07004226 obj.value = reader.read('!16s')[0]
4227 return obj
4228
4229 def __eq__(self, other):
4230 if type(self) != type(other): return False
4231 if self.value != other.value: return False
4232 return True
4233
Rich Lanec2ee4b82013-04-24 17:12:38 -07004234 def pretty_print(self, q):
4235 q.text("ipv6_src {")
4236 with q.group():
4237 with q.indent(2):
4238 q.breakable()
4239 q.text("value = ");
4240 q.pp(self.value)
4241 q.breakable()
4242 q.text('}')
4243
Rich Lane7dcdf022013-12-11 14:45:27 -08004244oxm.subtypes[2147496976] = ipv6_src
4245
4246class ipv6_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004247 type_len = 2147497248
Rich Lanec2ee4b82013-04-24 17:12:38 -07004248
4249 def __init__(self, value=None, value_mask=None):
4250 if value != None:
4251 self.value = value
4252 else:
4253 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
4254 if value_mask != None:
4255 self.value_mask = value_mask
4256 else:
4257 self.value_mask = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Rich Lane7dcdf022013-12-11 14:45:27 -08004258 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004259
4260 def pack(self):
4261 packed = []
4262 packed.append(struct.pack("!L", self.type_len))
4263 packed.append(struct.pack("!16s", self.value))
4264 packed.append(struct.pack("!16s", self.value_mask))
4265 return ''.join(packed)
4266
4267 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004268 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004269 obj = ipv6_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004270 _type_len = reader.read("!L")[0]
4271 assert(_type_len == 2147497248)
Rich Lanec2ee4b82013-04-24 17:12:38 -07004272 obj.value = reader.read('!16s')[0]
4273 obj.value_mask = reader.read('!16s')[0]
4274 return obj
4275
4276 def __eq__(self, other):
4277 if type(self) != type(other): return False
4278 if self.value != other.value: return False
4279 if self.value_mask != other.value_mask: return False
4280 return True
4281
Rich Lanec2ee4b82013-04-24 17:12:38 -07004282 def pretty_print(self, q):
4283 q.text("ipv6_src_masked {")
4284 with q.group():
4285 with q.indent(2):
4286 q.breakable()
4287 q.text("value = ");
4288 q.pp(self.value)
4289 q.text(","); q.breakable()
4290 q.text("value_mask = ");
4291 q.pp(self.value_mask)
4292 q.breakable()
4293 q.text('}')
4294
Rich Lane7dcdf022013-12-11 14:45:27 -08004295oxm.subtypes[2147497248] = ipv6_src_masked
4296
4297class metadata(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004298 type_len = 2147484680
Rich Lanec2ee4b82013-04-24 17:12:38 -07004299
4300 def __init__(self, value=None):
4301 if value != None:
4302 self.value = value
4303 else:
4304 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004305 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004306
4307 def pack(self):
4308 packed = []
4309 packed.append(struct.pack("!L", self.type_len))
4310 packed.append(struct.pack("!Q", self.value))
4311 return ''.join(packed)
4312
4313 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004314 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004315 obj = metadata()
Dan Talaycof6202252013-07-02 01:00:29 -07004316 _type_len = reader.read("!L")[0]
4317 assert(_type_len == 2147484680)
4318 obj.value = reader.read("!Q")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004319 return obj
4320
4321 def __eq__(self, other):
4322 if type(self) != type(other): return False
4323 if self.value != other.value: return False
4324 return True
4325
Rich Lanec2ee4b82013-04-24 17:12:38 -07004326 def pretty_print(self, q):
4327 q.text("metadata {")
4328 with q.group():
4329 with q.indent(2):
4330 q.breakable()
4331 q.text("value = ");
4332 q.text("%#x" % self.value)
4333 q.breakable()
4334 q.text('}')
4335
Rich Lane7dcdf022013-12-11 14:45:27 -08004336oxm.subtypes[2147484680] = metadata
4337
4338class metadata_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004339 type_len = 2147484944
Rich Lanec2ee4b82013-04-24 17:12:38 -07004340
4341 def __init__(self, value=None, value_mask=None):
4342 if value != None:
4343 self.value = value
4344 else:
4345 self.value = 0
4346 if value_mask != None:
4347 self.value_mask = value_mask
4348 else:
4349 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004350 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004351
4352 def pack(self):
4353 packed = []
4354 packed.append(struct.pack("!L", self.type_len))
4355 packed.append(struct.pack("!Q", self.value))
4356 packed.append(struct.pack("!Q", self.value_mask))
4357 return ''.join(packed)
4358
4359 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004360 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004361 obj = metadata_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004362 _type_len = reader.read("!L")[0]
4363 assert(_type_len == 2147484944)
4364 obj.value = reader.read("!Q")[0]
4365 obj.value_mask = reader.read("!Q")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004366 return obj
4367
4368 def __eq__(self, other):
4369 if type(self) != type(other): return False
4370 if self.value != other.value: return False
4371 if self.value_mask != other.value_mask: return False
4372 return True
4373
Rich Lanec2ee4b82013-04-24 17:12:38 -07004374 def pretty_print(self, q):
4375 q.text("metadata_masked {")
4376 with q.group():
4377 with q.indent(2):
4378 q.breakable()
4379 q.text("value = ");
4380 q.text("%#x" % self.value)
4381 q.text(","); q.breakable()
4382 q.text("value_mask = ");
4383 q.text("%#x" % self.value_mask)
4384 q.breakable()
4385 q.text('}')
4386
Rich Lane7dcdf022013-12-11 14:45:27 -08004387oxm.subtypes[2147484944] = metadata_masked
4388
Harshmeet Singh1db46332014-10-14 16:29:13 -07004389class mpls_bos(oxm):
4390 type_len = 2147502081
4391
4392 def __init__(self, value=None):
4393 if value != None:
4394 self.value = value
4395 else:
4396 self.value = 0
4397 return
4398
4399 def pack(self):
4400 packed = []
4401 packed.append(struct.pack("!L", self.type_len))
4402 packed.append(struct.pack("!B", self.value))
4403 return ''.join(packed)
4404
4405 @staticmethod
4406 def unpack(reader):
4407 obj = mpls_bos()
4408 _type_len = reader.read("!L")[0]
4409 assert(_type_len == 2147502081)
4410 obj.value = reader.read("!B")[0]
4411 return obj
4412
4413 def __eq__(self, other):
4414 if type(self) != type(other): return False
4415 if self.value != other.value: return False
4416 return True
4417
4418 def pretty_print(self, q):
4419 q.text("mpls_bos {")
4420 with q.group():
4421 with q.indent(2):
4422 q.breakable()
4423 q.text("value = ");
4424 q.text("%#x" % self.value)
4425 q.breakable()
4426 q.text('}')
4427
4428oxm.subtypes[2147502081] = mpls_bos
4429
4430class mpls_bos_masked(oxm):
4431 type_len = 2147502338
4432
4433 def __init__(self, value=None, value_mask=None):
4434 if value != None:
4435 self.value = value
4436 else:
4437 self.value = 0
4438 if value_mask != None:
4439 self.value_mask = value_mask
4440 else:
4441 self.value_mask = 0
4442 return
4443
4444 def pack(self):
4445 packed = []
4446 packed.append(struct.pack("!L", self.type_len))
4447 packed.append(struct.pack("!B", self.value))
4448 packed.append(struct.pack("!B", self.value_mask))
4449 return ''.join(packed)
4450
4451 @staticmethod
4452 def unpack(reader):
4453 obj = mpls_bos_masked()
4454 _type_len = reader.read("!L")[0]
4455 assert(_type_len == 2147502338)
4456 obj.value = reader.read("!B")[0]
4457 obj.value_mask = reader.read("!B")[0]
4458 return obj
4459
4460 def __eq__(self, other):
4461 if type(self) != type(other): return False
4462 if self.value != other.value: return False
4463 if self.value_mask != other.value_mask: return False
4464 return True
4465
4466 def pretty_print(self, q):
4467 q.text("mpls_bos_masked {")
4468 with q.group():
4469 with q.indent(2):
4470 q.breakable()
4471 q.text("value = ");
4472 q.text("%#x" % self.value)
4473 q.text(","); q.breakable()
4474 q.text("value_mask = ");
4475 q.text("%#x" % self.value_mask)
4476 q.breakable()
4477 q.text('}')
4478
4479oxm.subtypes[2147502338] = mpls_bos_masked
4480
Rich Lane7dcdf022013-12-11 14:45:27 -08004481class mpls_label(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004482 type_len = 2147501060
Rich Lanec2ee4b82013-04-24 17:12:38 -07004483
4484 def __init__(self, value=None):
4485 if value != None:
4486 self.value = value
4487 else:
4488 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004489 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004490
4491 def pack(self):
4492 packed = []
4493 packed.append(struct.pack("!L", self.type_len))
4494 packed.append(struct.pack("!L", self.value))
4495 return ''.join(packed)
4496
4497 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004498 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004499 obj = mpls_label()
Dan Talaycof6202252013-07-02 01:00:29 -07004500 _type_len = reader.read("!L")[0]
4501 assert(_type_len == 2147501060)
4502 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004503 return obj
4504
4505 def __eq__(self, other):
4506 if type(self) != type(other): return False
4507 if self.value != other.value: return False
4508 return True
4509
Rich Lanec2ee4b82013-04-24 17:12:38 -07004510 def pretty_print(self, q):
4511 q.text("mpls_label {")
4512 with q.group():
4513 with q.indent(2):
4514 q.breakable()
4515 q.text("value = ");
4516 q.text("%#x" % self.value)
4517 q.breakable()
4518 q.text('}')
4519
Rich Lane7dcdf022013-12-11 14:45:27 -08004520oxm.subtypes[2147501060] = mpls_label
4521
4522class mpls_label_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004523 type_len = 2147501320
Rich Lanec2ee4b82013-04-24 17:12:38 -07004524
4525 def __init__(self, value=None, value_mask=None):
4526 if value != None:
4527 self.value = value
4528 else:
4529 self.value = 0
4530 if value_mask != None:
4531 self.value_mask = value_mask
4532 else:
4533 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004534 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004535
4536 def pack(self):
4537 packed = []
4538 packed.append(struct.pack("!L", self.type_len))
4539 packed.append(struct.pack("!L", self.value))
4540 packed.append(struct.pack("!L", self.value_mask))
4541 return ''.join(packed)
4542
4543 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004544 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004545 obj = mpls_label_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004546 _type_len = reader.read("!L")[0]
4547 assert(_type_len == 2147501320)
4548 obj.value = reader.read("!L")[0]
4549 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004550 return obj
4551
4552 def __eq__(self, other):
4553 if type(self) != type(other): return False
4554 if self.value != other.value: return False
4555 if self.value_mask != other.value_mask: return False
4556 return True
4557
Rich Lanec2ee4b82013-04-24 17:12:38 -07004558 def pretty_print(self, q):
4559 q.text("mpls_label_masked {")
4560 with q.group():
4561 with q.indent(2):
4562 q.breakable()
4563 q.text("value = ");
4564 q.text("%#x" % self.value)
4565 q.text(","); q.breakable()
4566 q.text("value_mask = ");
4567 q.text("%#x" % self.value_mask)
4568 q.breakable()
4569 q.text('}')
4570
Rich Lane7dcdf022013-12-11 14:45:27 -08004571oxm.subtypes[2147501320] = mpls_label_masked
4572
4573class mpls_tc(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004574 type_len = 2147501569
Rich Lanec2ee4b82013-04-24 17:12:38 -07004575
4576 def __init__(self, value=None):
4577 if value != None:
4578 self.value = value
4579 else:
4580 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004581 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004582
4583 def pack(self):
4584 packed = []
4585 packed.append(struct.pack("!L", self.type_len))
4586 packed.append(struct.pack("!B", self.value))
4587 return ''.join(packed)
4588
4589 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004590 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004591 obj = mpls_tc()
Dan Talaycof6202252013-07-02 01:00:29 -07004592 _type_len = reader.read("!L")[0]
4593 assert(_type_len == 2147501569)
4594 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004595 return obj
4596
4597 def __eq__(self, other):
4598 if type(self) != type(other): return False
4599 if self.value != other.value: return False
4600 return True
4601
Rich Lanec2ee4b82013-04-24 17:12:38 -07004602 def pretty_print(self, q):
4603 q.text("mpls_tc {")
4604 with q.group():
4605 with q.indent(2):
4606 q.breakable()
4607 q.text("value = ");
4608 q.text("%#x" % self.value)
4609 q.breakable()
4610 q.text('}')
4611
Rich Lane7dcdf022013-12-11 14:45:27 -08004612oxm.subtypes[2147501569] = mpls_tc
4613
4614class mpls_tc_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004615 type_len = 2147501826
Rich Lanec2ee4b82013-04-24 17:12:38 -07004616
4617 def __init__(self, value=None, value_mask=None):
4618 if value != None:
4619 self.value = value
4620 else:
4621 self.value = 0
4622 if value_mask != None:
4623 self.value_mask = value_mask
4624 else:
4625 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004626 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004627
4628 def pack(self):
4629 packed = []
4630 packed.append(struct.pack("!L", self.type_len))
4631 packed.append(struct.pack("!B", self.value))
4632 packed.append(struct.pack("!B", self.value_mask))
4633 return ''.join(packed)
4634
4635 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004636 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004637 obj = mpls_tc_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004638 _type_len = reader.read("!L")[0]
4639 assert(_type_len == 2147501826)
4640 obj.value = reader.read("!B")[0]
4641 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004642 return obj
4643
4644 def __eq__(self, other):
4645 if type(self) != type(other): return False
4646 if self.value != other.value: return False
4647 if self.value_mask != other.value_mask: return False
4648 return True
4649
Rich Lanec2ee4b82013-04-24 17:12:38 -07004650 def pretty_print(self, q):
4651 q.text("mpls_tc_masked {")
4652 with q.group():
4653 with q.indent(2):
4654 q.breakable()
4655 q.text("value = ");
4656 q.text("%#x" % self.value)
4657 q.text(","); q.breakable()
4658 q.text("value_mask = ");
4659 q.text("%#x" % self.value_mask)
4660 q.breakable()
4661 q.text('}')
4662
Rich Lane7dcdf022013-12-11 14:45:27 -08004663oxm.subtypes[2147501826] = mpls_tc_masked
4664
4665class sctp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004666 type_len = 2147492866
Rich Lanec2ee4b82013-04-24 17:12:38 -07004667
4668 def __init__(self, value=None):
4669 if value != None:
4670 self.value = value
4671 else:
4672 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004673 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004674
4675 def pack(self):
4676 packed = []
4677 packed.append(struct.pack("!L", self.type_len))
4678 packed.append(struct.pack("!H", self.value))
4679 return ''.join(packed)
4680
4681 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004682 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004683 obj = sctp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07004684 _type_len = reader.read("!L")[0]
4685 assert(_type_len == 2147492866)
4686 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004687 return obj
4688
4689 def __eq__(self, other):
4690 if type(self) != type(other): return False
4691 if self.value != other.value: return False
4692 return True
4693
Rich Lanec2ee4b82013-04-24 17:12:38 -07004694 def pretty_print(self, q):
4695 q.text("sctp_dst {")
4696 with q.group():
4697 with q.indent(2):
4698 q.breakable()
4699 q.text("value = ");
4700 q.text("%#x" % self.value)
4701 q.breakable()
4702 q.text('}')
4703
Rich Lane7dcdf022013-12-11 14:45:27 -08004704oxm.subtypes[2147492866] = sctp_dst
4705
4706class sctp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004707 type_len = 2147493124
Rich Lanec2ee4b82013-04-24 17:12:38 -07004708
4709 def __init__(self, value=None, value_mask=None):
4710 if value != None:
4711 self.value = value
4712 else:
4713 self.value = 0
4714 if value_mask != None:
4715 self.value_mask = value_mask
4716 else:
4717 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004718 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004719
4720 def pack(self):
4721 packed = []
4722 packed.append(struct.pack("!L", self.type_len))
4723 packed.append(struct.pack("!H", self.value))
4724 packed.append(struct.pack("!H", self.value_mask))
4725 return ''.join(packed)
4726
4727 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004728 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004729 obj = sctp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004730 _type_len = reader.read("!L")[0]
4731 assert(_type_len == 2147493124)
4732 obj.value = reader.read("!H")[0]
4733 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004734 return obj
4735
4736 def __eq__(self, other):
4737 if type(self) != type(other): return False
4738 if self.value != other.value: return False
4739 if self.value_mask != other.value_mask: return False
4740 return True
4741
Rich Lanec2ee4b82013-04-24 17:12:38 -07004742 def pretty_print(self, q):
4743 q.text("sctp_dst_masked {")
4744 with q.group():
4745 with q.indent(2):
4746 q.breakable()
4747 q.text("value = ");
4748 q.text("%#x" % self.value)
4749 q.text(","); q.breakable()
4750 q.text("value_mask = ");
4751 q.text("%#x" % self.value_mask)
4752 q.breakable()
4753 q.text('}')
4754
Rich Lane7dcdf022013-12-11 14:45:27 -08004755oxm.subtypes[2147493124] = sctp_dst_masked
4756
4757class sctp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004758 type_len = 2147492354
Rich Lanec2ee4b82013-04-24 17:12:38 -07004759
4760 def __init__(self, value=None):
4761 if value != None:
4762 self.value = value
4763 else:
4764 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004765 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004766
4767 def pack(self):
4768 packed = []
4769 packed.append(struct.pack("!L", self.type_len))
4770 packed.append(struct.pack("!H", self.value))
4771 return ''.join(packed)
4772
4773 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004774 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004775 obj = sctp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07004776 _type_len = reader.read("!L")[0]
4777 assert(_type_len == 2147492354)
4778 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004779 return obj
4780
4781 def __eq__(self, other):
4782 if type(self) != type(other): return False
4783 if self.value != other.value: return False
4784 return True
4785
Rich Lanec2ee4b82013-04-24 17:12:38 -07004786 def pretty_print(self, q):
4787 q.text("sctp_src {")
4788 with q.group():
4789 with q.indent(2):
4790 q.breakable()
4791 q.text("value = ");
4792 q.text("%#x" % self.value)
4793 q.breakable()
4794 q.text('}')
4795
Rich Lane7dcdf022013-12-11 14:45:27 -08004796oxm.subtypes[2147492354] = sctp_src
4797
4798class sctp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004799 type_len = 2147492612
Rich Lanec2ee4b82013-04-24 17:12:38 -07004800
4801 def __init__(self, value=None, value_mask=None):
4802 if value != None:
4803 self.value = value
4804 else:
4805 self.value = 0
4806 if value_mask != None:
4807 self.value_mask = value_mask
4808 else:
4809 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004810 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004811
4812 def pack(self):
4813 packed = []
4814 packed.append(struct.pack("!L", self.type_len))
4815 packed.append(struct.pack("!H", self.value))
4816 packed.append(struct.pack("!H", self.value_mask))
4817 return ''.join(packed)
4818
4819 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004820 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004821 obj = sctp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004822 _type_len = reader.read("!L")[0]
4823 assert(_type_len == 2147492612)
4824 obj.value = reader.read("!H")[0]
4825 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004826 return obj
4827
4828 def __eq__(self, other):
4829 if type(self) != type(other): return False
4830 if self.value != other.value: return False
4831 if self.value_mask != other.value_mask: return False
4832 return True
4833
Rich Lanec2ee4b82013-04-24 17:12:38 -07004834 def pretty_print(self, q):
4835 q.text("sctp_src_masked {")
4836 with q.group():
4837 with q.indent(2):
4838 q.breakable()
4839 q.text("value = ");
4840 q.text("%#x" % self.value)
4841 q.text(","); q.breakable()
4842 q.text("value_mask = ");
4843 q.text("%#x" % self.value_mask)
4844 q.breakable()
4845 q.text('}')
4846
Rich Lane7dcdf022013-12-11 14:45:27 -08004847oxm.subtypes[2147492612] = sctp_src_masked
4848
4849class tcp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004850 type_len = 2147490818
Rich Lanec2ee4b82013-04-24 17:12:38 -07004851
4852 def __init__(self, value=None):
4853 if value != None:
4854 self.value = value
4855 else:
4856 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004857 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004858
4859 def pack(self):
4860 packed = []
4861 packed.append(struct.pack("!L", self.type_len))
4862 packed.append(struct.pack("!H", self.value))
4863 return ''.join(packed)
4864
4865 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004866 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004867 obj = tcp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07004868 _type_len = reader.read("!L")[0]
4869 assert(_type_len == 2147490818)
4870 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004871 return obj
4872
4873 def __eq__(self, other):
4874 if type(self) != type(other): return False
4875 if self.value != other.value: return False
4876 return True
4877
Rich Lanec2ee4b82013-04-24 17:12:38 -07004878 def pretty_print(self, q):
4879 q.text("tcp_dst {")
4880 with q.group():
4881 with q.indent(2):
4882 q.breakable()
4883 q.text("value = ");
4884 q.text("%#x" % self.value)
4885 q.breakable()
4886 q.text('}')
4887
Rich Lane7dcdf022013-12-11 14:45:27 -08004888oxm.subtypes[2147490818] = tcp_dst
4889
4890class tcp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004891 type_len = 2147491076
Rich Lanec2ee4b82013-04-24 17:12:38 -07004892
4893 def __init__(self, value=None, value_mask=None):
4894 if value != None:
4895 self.value = value
4896 else:
4897 self.value = 0
4898 if value_mask != None:
4899 self.value_mask = value_mask
4900 else:
4901 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004902 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004903
4904 def pack(self):
4905 packed = []
4906 packed.append(struct.pack("!L", self.type_len))
4907 packed.append(struct.pack("!H", self.value))
4908 packed.append(struct.pack("!H", self.value_mask))
4909 return ''.join(packed)
4910
4911 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004912 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004913 obj = tcp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004914 _type_len = reader.read("!L")[0]
4915 assert(_type_len == 2147491076)
4916 obj.value = reader.read("!H")[0]
4917 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004918 return obj
4919
4920 def __eq__(self, other):
4921 if type(self) != type(other): return False
4922 if self.value != other.value: return False
4923 if self.value_mask != other.value_mask: return False
4924 return True
4925
Rich Lanec2ee4b82013-04-24 17:12:38 -07004926 def pretty_print(self, q):
4927 q.text("tcp_dst_masked {")
4928 with q.group():
4929 with q.indent(2):
4930 q.breakable()
4931 q.text("value = ");
4932 q.text("%#x" % self.value)
4933 q.text(","); q.breakable()
4934 q.text("value_mask = ");
4935 q.text("%#x" % self.value_mask)
4936 q.breakable()
4937 q.text('}')
4938
Rich Lane7dcdf022013-12-11 14:45:27 -08004939oxm.subtypes[2147491076] = tcp_dst_masked
4940
4941class tcp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004942 type_len = 2147490306
Rich Lanec2ee4b82013-04-24 17:12:38 -07004943
4944 def __init__(self, value=None):
4945 if value != None:
4946 self.value = value
4947 else:
4948 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004949 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004950
4951 def pack(self):
4952 packed = []
4953 packed.append(struct.pack("!L", self.type_len))
4954 packed.append(struct.pack("!H", self.value))
4955 return ''.join(packed)
4956
4957 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004958 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004959 obj = tcp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07004960 _type_len = reader.read("!L")[0]
4961 assert(_type_len == 2147490306)
4962 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004963 return obj
4964
4965 def __eq__(self, other):
4966 if type(self) != type(other): return False
4967 if self.value != other.value: return False
4968 return True
4969
Rich Lanec2ee4b82013-04-24 17:12:38 -07004970 def pretty_print(self, q):
4971 q.text("tcp_src {")
4972 with q.group():
4973 with q.indent(2):
4974 q.breakable()
4975 q.text("value = ");
4976 q.text("%#x" % self.value)
4977 q.breakable()
4978 q.text('}')
4979
Rich Lane7dcdf022013-12-11 14:45:27 -08004980oxm.subtypes[2147490306] = tcp_src
4981
4982class tcp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004983 type_len = 2147490564
Rich Lanec2ee4b82013-04-24 17:12:38 -07004984
4985 def __init__(self, value=None, value_mask=None):
4986 if value != None:
4987 self.value = value
4988 else:
4989 self.value = 0
4990 if value_mask != None:
4991 self.value_mask = value_mask
4992 else:
4993 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004994 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004995
4996 def pack(self):
4997 packed = []
4998 packed.append(struct.pack("!L", self.type_len))
4999 packed.append(struct.pack("!H", self.value))
5000 packed.append(struct.pack("!H", self.value_mask))
5001 return ''.join(packed)
5002
5003 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005004 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005005 obj = tcp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07005006 _type_len = reader.read("!L")[0]
5007 assert(_type_len == 2147490564)
5008 obj.value = reader.read("!H")[0]
5009 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005010 return obj
5011
5012 def __eq__(self, other):
5013 if type(self) != type(other): return False
5014 if self.value != other.value: return False
5015 if self.value_mask != other.value_mask: return False
5016 return True
5017
Rich Lanec2ee4b82013-04-24 17:12:38 -07005018 def pretty_print(self, q):
5019 q.text("tcp_src_masked {")
5020 with q.group():
5021 with q.indent(2):
5022 q.breakable()
5023 q.text("value = ");
5024 q.text("%#x" % self.value)
5025 q.text(","); q.breakable()
5026 q.text("value_mask = ");
5027 q.text("%#x" % self.value_mask)
5028 q.breakable()
5029 q.text('}')
5030
Rich Lane7dcdf022013-12-11 14:45:27 -08005031oxm.subtypes[2147490564] = tcp_src_masked
5032
Rich Lane5587ab12014-06-30 11:19:09 -07005033class tunnel_id(oxm):
5034 type_len = 2147503112
5035
5036 def __init__(self, value=None):
5037 if value != None:
5038 self.value = value
5039 else:
5040 self.value = 0
5041 return
5042
5043 def pack(self):
5044 packed = []
5045 packed.append(struct.pack("!L", self.type_len))
5046 packed.append(struct.pack("!Q", self.value))
5047 return ''.join(packed)
5048
5049 @staticmethod
5050 def unpack(reader):
5051 obj = tunnel_id()
5052 _type_len = reader.read("!L")[0]
5053 assert(_type_len == 2147503112)
5054 obj.value = reader.read("!Q")[0]
5055 return obj
5056
5057 def __eq__(self, other):
5058 if type(self) != type(other): return False
5059 if self.value != other.value: return False
5060 return True
5061
5062 def pretty_print(self, q):
5063 q.text("tunnel_id {")
5064 with q.group():
5065 with q.indent(2):
5066 q.breakable()
5067 q.text("value = ");
5068 q.text("%#x" % self.value)
5069 q.breakable()
5070 q.text('}')
5071
5072oxm.subtypes[2147503112] = tunnel_id
5073
5074class tunnel_id_masked(oxm):
5075 type_len = 2147503376
5076
5077 def __init__(self, value=None, value_mask=None):
5078 if value != None:
5079 self.value = value
5080 else:
5081 self.value = 0
5082 if value_mask != None:
5083 self.value_mask = value_mask
5084 else:
5085 self.value_mask = 0
5086 return
5087
5088 def pack(self):
5089 packed = []
5090 packed.append(struct.pack("!L", self.type_len))
5091 packed.append(struct.pack("!Q", self.value))
5092 packed.append(struct.pack("!Q", self.value_mask))
5093 return ''.join(packed)
5094
5095 @staticmethod
5096 def unpack(reader):
5097 obj = tunnel_id_masked()
5098 _type_len = reader.read("!L")[0]
5099 assert(_type_len == 2147503376)
5100 obj.value = reader.read("!Q")[0]
5101 obj.value_mask = reader.read("!Q")[0]
5102 return obj
5103
5104 def __eq__(self, other):
5105 if type(self) != type(other): return False
5106 if self.value != other.value: return False
5107 if self.value_mask != other.value_mask: return False
5108 return True
5109
5110 def pretty_print(self, q):
5111 q.text("tunnel_id_masked {")
5112 with q.group():
5113 with q.indent(2):
5114 q.breakable()
5115 q.text("value = ");
5116 q.text("%#x" % self.value)
5117 q.text(","); q.breakable()
5118 q.text("value_mask = ");
5119 q.text("%#x" % self.value_mask)
5120 q.breakable()
5121 q.text('}')
5122
5123oxm.subtypes[2147503376] = tunnel_id_masked
5124
Harshmeet Singh301f7172014-12-08 13:07:29 -08005125class tunnel_ipv4_dst(oxm):
5126 type_len = 81924
5127
5128 def __init__(self, value=None):
5129 if value != None:
5130 self.value = value
5131 else:
5132 self.value = 0
5133 return
5134
5135 def pack(self):
5136 packed = []
5137 packed.append(struct.pack("!L", self.type_len))
5138 packed.append(struct.pack("!L", self.value))
5139 return ''.join(packed)
5140
5141 @staticmethod
5142 def unpack(reader):
5143 obj = tunnel_ipv4_dst()
5144 _type_len = reader.read("!L")[0]
5145 assert(_type_len == 81924)
5146 obj.value = reader.read("!L")[0]
5147 return obj
5148
5149 def __eq__(self, other):
5150 if type(self) != type(other): return False
5151 if self.value != other.value: return False
5152 return True
5153
5154 def pretty_print(self, q):
5155 q.text("tunnel_ipv4_dst {")
5156 with q.group():
5157 with q.indent(2):
5158 q.breakable()
5159 q.text("value = ");
5160 q.text(util.pretty_ipv4(self.value))
5161 q.breakable()
5162 q.text('}')
5163
5164oxm.subtypes[81924] = tunnel_ipv4_dst
5165
5166class tunnel_ipv4_dst_masked(oxm):
5167 type_len = 82184
5168
5169 def __init__(self, value=None, value_mask=None):
5170 if value != None:
5171 self.value = value
5172 else:
5173 self.value = 0
5174 if value_mask != None:
5175 self.value_mask = value_mask
5176 else:
5177 self.value_mask = 0
5178 return
5179
5180 def pack(self):
5181 packed = []
5182 packed.append(struct.pack("!L", self.type_len))
5183 packed.append(struct.pack("!L", self.value))
5184 packed.append(struct.pack("!L", self.value_mask))
5185 return ''.join(packed)
5186
5187 @staticmethod
5188 def unpack(reader):
5189 obj = tunnel_ipv4_dst_masked()
5190 _type_len = reader.read("!L")[0]
5191 assert(_type_len == 82184)
5192 obj.value = reader.read("!L")[0]
5193 obj.value_mask = reader.read("!L")[0]
5194 return obj
5195
5196 def __eq__(self, other):
5197 if type(self) != type(other): return False
5198 if self.value != other.value: return False
5199 if self.value_mask != other.value_mask: return False
5200 return True
5201
5202 def pretty_print(self, q):
5203 q.text("tunnel_ipv4_dst_masked {")
5204 with q.group():
5205 with q.indent(2):
5206 q.breakable()
5207 q.text("value = ");
5208 q.text(util.pretty_ipv4(self.value))
5209 q.text(","); q.breakable()
5210 q.text("value_mask = ");
5211 q.text(util.pretty_ipv4(self.value_mask))
5212 q.breakable()
5213 q.text('}')
5214
5215oxm.subtypes[82184] = tunnel_ipv4_dst_masked
5216
5217class tunnel_ipv4_src(oxm):
5218 type_len = 81412
5219
5220 def __init__(self, value=None):
5221 if value != None:
5222 self.value = value
5223 else:
5224 self.value = 0
5225 return
5226
5227 def pack(self):
5228 packed = []
5229 packed.append(struct.pack("!L", self.type_len))
5230 packed.append(struct.pack("!L", self.value))
5231 return ''.join(packed)
5232
5233 @staticmethod
5234 def unpack(reader):
5235 obj = tunnel_ipv4_src()
5236 _type_len = reader.read("!L")[0]
5237 assert(_type_len == 81412)
5238 obj.value = reader.read("!L")[0]
5239 return obj
5240
5241 def __eq__(self, other):
5242 if type(self) != type(other): return False
5243 if self.value != other.value: return False
5244 return True
5245
5246 def pretty_print(self, q):
5247 q.text("tunnel_ipv4_src {")
5248 with q.group():
5249 with q.indent(2):
5250 q.breakable()
5251 q.text("value = ");
5252 q.text(util.pretty_ipv4(self.value))
5253 q.breakable()
5254 q.text('}')
5255
5256oxm.subtypes[81412] = tunnel_ipv4_src
5257
5258class tunnel_ipv4_src_masked(oxm):
5259 type_len = 81672
5260
5261 def __init__(self, value=None, value_mask=None):
5262 if value != None:
5263 self.value = value
5264 else:
5265 self.value = 0
5266 if value_mask != None:
5267 self.value_mask = value_mask
5268 else:
5269 self.value_mask = 0
5270 return
5271
5272 def pack(self):
5273 packed = []
5274 packed.append(struct.pack("!L", self.type_len))
5275 packed.append(struct.pack("!L", self.value))
5276 packed.append(struct.pack("!L", self.value_mask))
5277 return ''.join(packed)
5278
5279 @staticmethod
5280 def unpack(reader):
5281 obj = tunnel_ipv4_src_masked()
5282 _type_len = reader.read("!L")[0]
5283 assert(_type_len == 81672)
5284 obj.value = reader.read("!L")[0]
5285 obj.value_mask = reader.read("!L")[0]
5286 return obj
5287
5288 def __eq__(self, other):
5289 if type(self) != type(other): return False
5290 if self.value != other.value: return False
5291 if self.value_mask != other.value_mask: return False
5292 return True
5293
5294 def pretty_print(self, q):
5295 q.text("tunnel_ipv4_src_masked {")
5296 with q.group():
5297 with q.indent(2):
5298 q.breakable()
5299 q.text("value = ");
5300 q.text(util.pretty_ipv4(self.value))
5301 q.text(","); q.breakable()
5302 q.text("value_mask = ");
5303 q.text(util.pretty_ipv4(self.value_mask))
5304 q.breakable()
5305 q.text('}')
5306
5307oxm.subtypes[81672] = tunnel_ipv4_src_masked
5308
Rich Lane7dcdf022013-12-11 14:45:27 -08005309class udp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07005310 type_len = 2147491842
Rich Lanec2ee4b82013-04-24 17:12:38 -07005311
5312 def __init__(self, value=None):
5313 if value != None:
5314 self.value = value
5315 else:
5316 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005317 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005318
5319 def pack(self):
5320 packed = []
5321 packed.append(struct.pack("!L", self.type_len))
5322 packed.append(struct.pack("!H", self.value))
5323 return ''.join(packed)
5324
5325 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005326 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005327 obj = udp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07005328 _type_len = reader.read("!L")[0]
5329 assert(_type_len == 2147491842)
5330 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005331 return obj
5332
5333 def __eq__(self, other):
5334 if type(self) != type(other): return False
5335 if self.value != other.value: return False
5336 return True
5337
Rich Lanec2ee4b82013-04-24 17:12:38 -07005338 def pretty_print(self, q):
5339 q.text("udp_dst {")
5340 with q.group():
5341 with q.indent(2):
5342 q.breakable()
5343 q.text("value = ");
5344 q.text("%#x" % self.value)
5345 q.breakable()
5346 q.text('}')
5347
Rich Lane7dcdf022013-12-11 14:45:27 -08005348oxm.subtypes[2147491842] = udp_dst
5349
5350class udp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07005351 type_len = 2147492100
Rich Lanec2ee4b82013-04-24 17:12:38 -07005352
5353 def __init__(self, value=None, value_mask=None):
5354 if value != None:
5355 self.value = value
5356 else:
5357 self.value = 0
5358 if value_mask != None:
5359 self.value_mask = value_mask
5360 else:
5361 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005362 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005363
5364 def pack(self):
5365 packed = []
5366 packed.append(struct.pack("!L", self.type_len))
5367 packed.append(struct.pack("!H", self.value))
5368 packed.append(struct.pack("!H", self.value_mask))
5369 return ''.join(packed)
5370
5371 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005372 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005373 obj = udp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07005374 _type_len = reader.read("!L")[0]
5375 assert(_type_len == 2147492100)
5376 obj.value = reader.read("!H")[0]
5377 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005378 return obj
5379
5380 def __eq__(self, other):
5381 if type(self) != type(other): return False
5382 if self.value != other.value: return False
5383 if self.value_mask != other.value_mask: return False
5384 return True
5385
Rich Lanec2ee4b82013-04-24 17:12:38 -07005386 def pretty_print(self, q):
5387 q.text("udp_dst_masked {")
5388 with q.group():
5389 with q.indent(2):
5390 q.breakable()
5391 q.text("value = ");
5392 q.text("%#x" % self.value)
5393 q.text(","); q.breakable()
5394 q.text("value_mask = ");
5395 q.text("%#x" % self.value_mask)
5396 q.breakable()
5397 q.text('}')
5398
Rich Lane7dcdf022013-12-11 14:45:27 -08005399oxm.subtypes[2147492100] = udp_dst_masked
5400
5401class udp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07005402 type_len = 2147491330
Rich Lanec2ee4b82013-04-24 17:12:38 -07005403
5404 def __init__(self, value=None):
5405 if value != None:
5406 self.value = value
5407 else:
5408 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005409 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005410
5411 def pack(self):
5412 packed = []
5413 packed.append(struct.pack("!L", self.type_len))
5414 packed.append(struct.pack("!H", self.value))
5415 return ''.join(packed)
5416
5417 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005418 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005419 obj = udp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07005420 _type_len = reader.read("!L")[0]
5421 assert(_type_len == 2147491330)
5422 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005423 return obj
5424
5425 def __eq__(self, other):
5426 if type(self) != type(other): return False
5427 if self.value != other.value: return False
5428 return True
5429
Rich Lanec2ee4b82013-04-24 17:12:38 -07005430 def pretty_print(self, q):
5431 q.text("udp_src {")
5432 with q.group():
5433 with q.indent(2):
5434 q.breakable()
5435 q.text("value = ");
5436 q.text("%#x" % self.value)
5437 q.breakable()
5438 q.text('}')
5439
Rich Lane7dcdf022013-12-11 14:45:27 -08005440oxm.subtypes[2147491330] = udp_src
5441
5442class udp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07005443 type_len = 2147491588
Rich Lanec2ee4b82013-04-24 17:12:38 -07005444
5445 def __init__(self, value=None, value_mask=None):
5446 if value != None:
5447 self.value = value
5448 else:
5449 self.value = 0
5450 if value_mask != None:
5451 self.value_mask = value_mask
5452 else:
5453 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005454 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005455
5456 def pack(self):
5457 packed = []
5458 packed.append(struct.pack("!L", self.type_len))
5459 packed.append(struct.pack("!H", self.value))
5460 packed.append(struct.pack("!H", self.value_mask))
5461 return ''.join(packed)
5462
5463 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005464 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005465 obj = udp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07005466 _type_len = reader.read("!L")[0]
5467 assert(_type_len == 2147491588)
5468 obj.value = reader.read("!H")[0]
5469 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005470 return obj
5471
5472 def __eq__(self, other):
5473 if type(self) != type(other): return False
5474 if self.value != other.value: return False
5475 if self.value_mask != other.value_mask: return False
5476 return True
5477
Rich Lanec2ee4b82013-04-24 17:12:38 -07005478 def pretty_print(self, q):
5479 q.text("udp_src_masked {")
5480 with q.group():
5481 with q.indent(2):
5482 q.breakable()
5483 q.text("value = ");
5484 q.text("%#x" % self.value)
5485 q.text(","); q.breakable()
5486 q.text("value_mask = ");
5487 q.text("%#x" % self.value_mask)
5488 q.breakable()
5489 q.text('}')
5490
Rich Lane7dcdf022013-12-11 14:45:27 -08005491oxm.subtypes[2147491588] = udp_src_masked
5492
5493class vlan_pcp(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07005494 type_len = 2147487233
Rich Lanec2ee4b82013-04-24 17:12:38 -07005495
5496 def __init__(self, value=None):
5497 if value != None:
5498 self.value = value
5499 else:
5500 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005501 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005502
5503 def pack(self):
5504 packed = []
5505 packed.append(struct.pack("!L", self.type_len))
5506 packed.append(struct.pack("!B", self.value))
5507 return ''.join(packed)
5508
5509 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005510 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005511 obj = vlan_pcp()
Dan Talaycof6202252013-07-02 01:00:29 -07005512 _type_len = reader.read("!L")[0]
5513 assert(_type_len == 2147487233)
5514 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005515 return obj
5516
5517 def __eq__(self, other):
5518 if type(self) != type(other): return False
5519 if self.value != other.value: return False
5520 return True
5521
Rich Lanec2ee4b82013-04-24 17:12:38 -07005522 def pretty_print(self, q):
5523 q.text("vlan_pcp {")
5524 with q.group():
5525 with q.indent(2):
5526 q.breakable()
5527 q.text("value = ");
5528 q.text("%#x" % self.value)
5529 q.breakable()
5530 q.text('}')
5531
Rich Lane7dcdf022013-12-11 14:45:27 -08005532oxm.subtypes[2147487233] = vlan_pcp
5533
5534class vlan_pcp_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07005535 type_len = 2147487490
Rich Lanec2ee4b82013-04-24 17:12:38 -07005536
5537 def __init__(self, value=None, value_mask=None):
5538 if value != None:
5539 self.value = value
5540 else:
5541 self.value = 0
5542 if value_mask != None:
5543 self.value_mask = value_mask
5544 else:
5545 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005546 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005547
5548 def pack(self):
5549 packed = []
5550 packed.append(struct.pack("!L", self.type_len))
5551 packed.append(struct.pack("!B", self.value))
5552 packed.append(struct.pack("!B", self.value_mask))
5553 return ''.join(packed)
5554
5555 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005556 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005557 obj = vlan_pcp_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07005558 _type_len = reader.read("!L")[0]
5559 assert(_type_len == 2147487490)
5560 obj.value = reader.read("!B")[0]
5561 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005562 return obj
5563
5564 def __eq__(self, other):
5565 if type(self) != type(other): return False
5566 if self.value != other.value: return False
5567 if self.value_mask != other.value_mask: return False
5568 return True
5569
Rich Lanec2ee4b82013-04-24 17:12:38 -07005570 def pretty_print(self, q):
5571 q.text("vlan_pcp_masked {")
5572 with q.group():
5573 with q.indent(2):
5574 q.breakable()
5575 q.text("value = ");
5576 q.text("%#x" % self.value)
5577 q.text(","); q.breakable()
5578 q.text("value_mask = ");
5579 q.text("%#x" % self.value_mask)
5580 q.breakable()
5581 q.text('}')
5582
Rich Lane7dcdf022013-12-11 14:45:27 -08005583oxm.subtypes[2147487490] = vlan_pcp_masked
5584
5585class vlan_vid(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07005586 type_len = 2147486722
Rich Lanec2ee4b82013-04-24 17:12:38 -07005587
5588 def __init__(self, value=None):
5589 if value != None:
5590 self.value = value
5591 else:
5592 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005593 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005594
5595 def pack(self):
5596 packed = []
5597 packed.append(struct.pack("!L", self.type_len))
5598 packed.append(struct.pack("!H", self.value))
5599 return ''.join(packed)
5600
5601 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005602 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005603 obj = vlan_vid()
Dan Talaycof6202252013-07-02 01:00:29 -07005604 _type_len = reader.read("!L")[0]
5605 assert(_type_len == 2147486722)
5606 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005607 return obj
5608
5609 def __eq__(self, other):
5610 if type(self) != type(other): return False
5611 if self.value != other.value: return False
5612 return True
5613
Rich Lanec2ee4b82013-04-24 17:12:38 -07005614 def pretty_print(self, q):
5615 q.text("vlan_vid {")
5616 with q.group():
5617 with q.indent(2):
5618 q.breakable()
5619 q.text("value = ");
5620 q.text("%#x" % self.value)
5621 q.breakable()
5622 q.text('}')
5623
Rich Lane7dcdf022013-12-11 14:45:27 -08005624oxm.subtypes[2147486722] = vlan_vid
5625
5626class vlan_vid_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07005627 type_len = 2147486980
Rich Lanec2ee4b82013-04-24 17:12:38 -07005628
5629 def __init__(self, value=None, value_mask=None):
5630 if value != None:
5631 self.value = value
5632 else:
5633 self.value = 0
5634 if value_mask != None:
5635 self.value_mask = value_mask
5636 else:
5637 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005638 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005639
5640 def pack(self):
5641 packed = []
5642 packed.append(struct.pack("!L", self.type_len))
5643 packed.append(struct.pack("!H", self.value))
5644 packed.append(struct.pack("!H", self.value_mask))
5645 return ''.join(packed)
5646
5647 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005648 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005649 obj = vlan_vid_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07005650 _type_len = reader.read("!L")[0]
5651 assert(_type_len == 2147486980)
5652 obj.value = reader.read("!H")[0]
5653 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005654 return obj
5655
5656 def __eq__(self, other):
5657 if type(self) != type(other): return False
5658 if self.value != other.value: return False
5659 if self.value_mask != other.value_mask: return False
5660 return True
5661
Rich Lanec2ee4b82013-04-24 17:12:38 -07005662 def pretty_print(self, q):
5663 q.text("vlan_vid_masked {")
5664 with q.group():
5665 with q.indent(2):
5666 q.breakable()
5667 q.text("value = ");
5668 q.text("%#x" % self.value)
5669 q.text(","); q.breakable()
5670 q.text("value_mask = ");
5671 q.text("%#x" % self.value_mask)
5672 q.breakable()
5673 q.text('}')
5674
Rich Lane7dcdf022013-12-11 14:45:27 -08005675oxm.subtypes[2147486980] = vlan_vid_masked
Rich Lanec2ee4b82013-04-24 17:12:38 -07005676
Rich Lane7dcdf022013-12-11 14:45:27 -08005677