blob: d446ebed753a13ce0e5b225d66731a9bc562b862 [file] [log] [blame]
Stephane Barbarie6e1bd502018-11-05 22:44:45 -05001# Copyright 2017-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14# Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
15# Copyright (c) 2011, 2012 Open Networking Foundation
16# Copyright (c) 2012, 2013 Big Switch Networks, Inc.
17# See the file LICENSE.pyloxi which should have been included in the source distribution
18
19# Automatically generated by LOXI from template module.py
20# Do not modify
21
22import struct
23import loxi
24import util
25import loxi.generic_util
26
27import sys
28ofp = sys.modules['loxi.of14']
29
30class oxm(loxi.OFObject):
31 subtypes = {}
32
33
34 def __init__(self, type_len=None):
35 if type_len != None:
36 self.type_len = type_len
37 else:
38 self.type_len = 0
39 return
40
41 def pack(self):
42 packed = []
43 packed.append(struct.pack("!L", self.type_len))
44 return ''.join(packed)
45
46 @staticmethod
47 def unpack(reader):
48 subtype, = reader.peek('!L', 0)
49 subclass = oxm.subtypes.get(subtype)
50 if subclass:
51 return subclass.unpack(reader)
52
53 obj = oxm()
54 obj.type_len = reader.read("!L")[0]
55 return obj
56
57 def __eq__(self, other):
58 if type(self) != type(other): return False
59 if self.type_len != other.type_len: return False
60 return True
61
62 def pretty_print(self, q):
63 q.text("oxm {")
64 with q.group():
65 with q.indent(2):
66 q.breakable()
67 q.breakable()
68 q.text('}')
69
70
71class arp_op(oxm):
72 type_len = 2147494402
73
74 def __init__(self, value=None):
75 if value != None:
76 self.value = value
77 else:
78 self.value = 0
79 return
80
81 def pack(self):
82 packed = []
83 packed.append(struct.pack("!L", self.type_len))
84 packed.append(struct.pack("!H", self.value))
85 return ''.join(packed)
86
87 @staticmethod
88 def unpack(reader):
89 obj = arp_op()
90 _type_len = reader.read("!L")[0]
91 assert(_type_len == 2147494402)
92 obj.value = reader.read("!H")[0]
93 return obj
94
95 def __eq__(self, other):
96 if type(self) != type(other): return False
97 if self.value != other.value: return False
98 return True
99
100 def pretty_print(self, q):
101 q.text("arp_op {")
102 with q.group():
103 with q.indent(2):
104 q.breakable()
105 q.text("value = ");
106 q.text("%#x" % self.value)
107 q.breakable()
108 q.text('}')
109
110oxm.subtypes[2147494402] = arp_op
111
112class arp_op_masked(oxm):
113 type_len = 2147494660
114
115 def __init__(self, value=None, value_mask=None):
116 if value != None:
117 self.value = value
118 else:
119 self.value = 0
120 if value_mask != None:
121 self.value_mask = value_mask
122 else:
123 self.value_mask = 0
124 return
125
126 def pack(self):
127 packed = []
128 packed.append(struct.pack("!L", self.type_len))
129 packed.append(struct.pack("!H", self.value))
130 packed.append(struct.pack("!H", self.value_mask))
131 return ''.join(packed)
132
133 @staticmethod
134 def unpack(reader):
135 obj = arp_op_masked()
136 _type_len = reader.read("!L")[0]
137 assert(_type_len == 2147494660)
138 obj.value = reader.read("!H")[0]
139 obj.value_mask = reader.read("!H")[0]
140 return obj
141
142 def __eq__(self, other):
143 if type(self) != type(other): return False
144 if self.value != other.value: return False
145 if self.value_mask != other.value_mask: return False
146 return True
147
148 def pretty_print(self, q):
149 q.text("arp_op_masked {")
150 with q.group():
151 with q.indent(2):
152 q.breakable()
153 q.text("value = ");
154 q.text("%#x" % self.value)
155 q.text(","); q.breakable()
156 q.text("value_mask = ");
157 q.text("%#x" % self.value_mask)
158 q.breakable()
159 q.text('}')
160
161oxm.subtypes[2147494660] = arp_op_masked
162
163class arp_sha(oxm):
164 type_len = 2147495942
165
166 def __init__(self, value=None):
167 if value != None:
168 self.value = value
169 else:
170 self.value = [0,0,0,0,0,0]
171 return
172
173 def pack(self):
174 packed = []
175 packed.append(struct.pack("!L", self.type_len))
176 packed.append(struct.pack("!6B", *self.value))
177 return ''.join(packed)
178
179 @staticmethod
180 def unpack(reader):
181 obj = arp_sha()
182 _type_len = reader.read("!L")[0]
183 assert(_type_len == 2147495942)
184 obj.value = list(reader.read('!6B'))
185 return obj
186
187 def __eq__(self, other):
188 if type(self) != type(other): return False
189 if self.value != other.value: return False
190 return True
191
192 def pretty_print(self, q):
193 q.text("arp_sha {")
194 with q.group():
195 with q.indent(2):
196 q.breakable()
197 q.text("value = ");
198 q.text(util.pretty_mac(self.value))
199 q.breakable()
200 q.text('}')
201
202oxm.subtypes[2147495942] = arp_sha
203
204class arp_sha_masked(oxm):
205 type_len = 2147496204
206
207 def __init__(self, value=None, value_mask=None):
208 if value != None:
209 self.value = value
210 else:
211 self.value = [0,0,0,0,0,0]
212 if value_mask != None:
213 self.value_mask = value_mask
214 else:
215 self.value_mask = [0,0,0,0,0,0]
216 return
217
218 def pack(self):
219 packed = []
220 packed.append(struct.pack("!L", self.type_len))
221 packed.append(struct.pack("!6B", *self.value))
222 packed.append(struct.pack("!6B", *self.value_mask))
223 return ''.join(packed)
224
225 @staticmethod
226 def unpack(reader):
227 obj = arp_sha_masked()
228 _type_len = reader.read("!L")[0]
229 assert(_type_len == 2147496204)
230 obj.value = list(reader.read('!6B'))
231 obj.value_mask = list(reader.read('!6B'))
232 return obj
233
234 def __eq__(self, other):
235 if type(self) != type(other): return False
236 if self.value != other.value: return False
237 if self.value_mask != other.value_mask: return False
238 return True
239
240 def pretty_print(self, q):
241 q.text("arp_sha_masked {")
242 with q.group():
243 with q.indent(2):
244 q.breakable()
245 q.text("value = ");
246 q.text(util.pretty_mac(self.value))
247 q.text(","); q.breakable()
248 q.text("value_mask = ");
249 q.text(util.pretty_mac(self.value_mask))
250 q.breakable()
251 q.text('}')
252
253oxm.subtypes[2147496204] = arp_sha_masked
254
255class arp_spa(oxm):
256 type_len = 2147494916
257
258 def __init__(self, value=None):
259 if value != None:
260 self.value = value
261 else:
262 self.value = 0
263 return
264
265 def pack(self):
266 packed = []
267 packed.append(struct.pack("!L", self.type_len))
268 packed.append(struct.pack("!L", self.value))
269 return ''.join(packed)
270
271 @staticmethod
272 def unpack(reader):
273 obj = arp_spa()
274 _type_len = reader.read("!L")[0]
275 assert(_type_len == 2147494916)
276 obj.value = reader.read("!L")[0]
277 return obj
278
279 def __eq__(self, other):
280 if type(self) != type(other): return False
281 if self.value != other.value: return False
282 return True
283
284 def pretty_print(self, q):
285 q.text("arp_spa {")
286 with q.group():
287 with q.indent(2):
288 q.breakable()
289 q.text("value = ");
290 q.text("%#x" % self.value)
291 q.breakable()
292 q.text('}')
293
294oxm.subtypes[2147494916] = arp_spa
295
296class arp_spa_masked(oxm):
297 type_len = 2147495176
298
299 def __init__(self, value=None, value_mask=None):
300 if value != None:
301 self.value = value
302 else:
303 self.value = 0
304 if value_mask != None:
305 self.value_mask = value_mask
306 else:
307 self.value_mask = 0
308 return
309
310 def pack(self):
311 packed = []
312 packed.append(struct.pack("!L", self.type_len))
313 packed.append(struct.pack("!L", self.value))
314 packed.append(struct.pack("!L", self.value_mask))
315 return ''.join(packed)
316
317 @staticmethod
318 def unpack(reader):
319 obj = arp_spa_masked()
320 _type_len = reader.read("!L")[0]
321 assert(_type_len == 2147495176)
322 obj.value = reader.read("!L")[0]
323 obj.value_mask = reader.read("!L")[0]
324 return obj
325
326 def __eq__(self, other):
327 if type(self) != type(other): return False
328 if self.value != other.value: return False
329 if self.value_mask != other.value_mask: return False
330 return True
331
332 def pretty_print(self, q):
333 q.text("arp_spa_masked {")
334 with q.group():
335 with q.indent(2):
336 q.breakable()
337 q.text("value = ");
338 q.text("%#x" % self.value)
339 q.text(","); q.breakable()
340 q.text("value_mask = ");
341 q.text("%#x" % self.value_mask)
342 q.breakable()
343 q.text('}')
344
345oxm.subtypes[2147495176] = arp_spa_masked
346
347class arp_tha(oxm):
348 type_len = 2147496454
349
350 def __init__(self, value=None):
351 if value != None:
352 self.value = value
353 else:
354 self.value = [0,0,0,0,0,0]
355 return
356
357 def pack(self):
358 packed = []
359 packed.append(struct.pack("!L", self.type_len))
360 packed.append(struct.pack("!6B", *self.value))
361 return ''.join(packed)
362
363 @staticmethod
364 def unpack(reader):
365 obj = arp_tha()
366 _type_len = reader.read("!L")[0]
367 assert(_type_len == 2147496454)
368 obj.value = list(reader.read('!6B'))
369 return obj
370
371 def __eq__(self, other):
372 if type(self) != type(other): return False
373 if self.value != other.value: return False
374 return True
375
376 def pretty_print(self, q):
377 q.text("arp_tha {")
378 with q.group():
379 with q.indent(2):
380 q.breakable()
381 q.text("value = ");
382 q.text(util.pretty_mac(self.value))
383 q.breakable()
384 q.text('}')
385
386oxm.subtypes[2147496454] = arp_tha
387
388class arp_tha_masked(oxm):
389 type_len = 2147496716
390
391 def __init__(self, value=None, value_mask=None):
392 if value != None:
393 self.value = value
394 else:
395 self.value = [0,0,0,0,0,0]
396 if value_mask != None:
397 self.value_mask = value_mask
398 else:
399 self.value_mask = [0,0,0,0,0,0]
400 return
401
402 def pack(self):
403 packed = []
404 packed.append(struct.pack("!L", self.type_len))
405 packed.append(struct.pack("!6B", *self.value))
406 packed.append(struct.pack("!6B", *self.value_mask))
407 return ''.join(packed)
408
409 @staticmethod
410 def unpack(reader):
411 obj = arp_tha_masked()
412 _type_len = reader.read("!L")[0]
413 assert(_type_len == 2147496716)
414 obj.value = list(reader.read('!6B'))
415 obj.value_mask = list(reader.read('!6B'))
416 return obj
417
418 def __eq__(self, other):
419 if type(self) != type(other): return False
420 if self.value != other.value: return False
421 if self.value_mask != other.value_mask: return False
422 return True
423
424 def pretty_print(self, q):
425 q.text("arp_tha_masked {")
426 with q.group():
427 with q.indent(2):
428 q.breakable()
429 q.text("value = ");
430 q.text(util.pretty_mac(self.value))
431 q.text(","); q.breakable()
432 q.text("value_mask = ");
433 q.text(util.pretty_mac(self.value_mask))
434 q.breakable()
435 q.text('}')
436
437oxm.subtypes[2147496716] = arp_tha_masked
438
439class arp_tpa(oxm):
440 type_len = 2147495428
441
442 def __init__(self, value=None):
443 if value != None:
444 self.value = value
445 else:
446 self.value = 0
447 return
448
449 def pack(self):
450 packed = []
451 packed.append(struct.pack("!L", self.type_len))
452 packed.append(struct.pack("!L", self.value))
453 return ''.join(packed)
454
455 @staticmethod
456 def unpack(reader):
457 obj = arp_tpa()
458 _type_len = reader.read("!L")[0]
459 assert(_type_len == 2147495428)
460 obj.value = reader.read("!L")[0]
461 return obj
462
463 def __eq__(self, other):
464 if type(self) != type(other): return False
465 if self.value != other.value: return False
466 return True
467
468 def pretty_print(self, q):
469 q.text("arp_tpa {")
470 with q.group():
471 with q.indent(2):
472 q.breakable()
473 q.text("value = ");
474 q.text("%#x" % self.value)
475 q.breakable()
476 q.text('}')
477
478oxm.subtypes[2147495428] = arp_tpa
479
480class arp_tpa_masked(oxm):
481 type_len = 2147495688
482
483 def __init__(self, value=None, value_mask=None):
484 if value != None:
485 self.value = value
486 else:
487 self.value = 0
488 if value_mask != None:
489 self.value_mask = value_mask
490 else:
491 self.value_mask = 0
492 return
493
494 def pack(self):
495 packed = []
496 packed.append(struct.pack("!L", self.type_len))
497 packed.append(struct.pack("!L", self.value))
498 packed.append(struct.pack("!L", self.value_mask))
499 return ''.join(packed)
500
501 @staticmethod
502 def unpack(reader):
503 obj = arp_tpa_masked()
504 _type_len = reader.read("!L")[0]
505 assert(_type_len == 2147495688)
506 obj.value = reader.read("!L")[0]
507 obj.value_mask = reader.read("!L")[0]
508 return obj
509
510 def __eq__(self, other):
511 if type(self) != type(other): return False
512 if self.value != other.value: return False
513 if self.value_mask != other.value_mask: return False
514 return True
515
516 def pretty_print(self, q):
517 q.text("arp_tpa_masked {")
518 with q.group():
519 with q.indent(2):
520 q.breakable()
521 q.text("value = ");
522 q.text("%#x" % self.value)
523 q.text(","); q.breakable()
524 q.text("value_mask = ");
525 q.text("%#x" % self.value_mask)
526 q.breakable()
527 q.text('}')
528
529oxm.subtypes[2147495688] = arp_tpa_masked
530
531class bsn_egr_port_group_id(oxm):
532 type_len = 200196
533
534 def __init__(self, value=None):
535 if value != None:
536 self.value = value
537 else:
538 self.value = 0
539 return
540
541 def pack(self):
542 packed = []
543 packed.append(struct.pack("!L", self.type_len))
544 packed.append(struct.pack("!L", self.value))
545 return ''.join(packed)
546
547 @staticmethod
548 def unpack(reader):
549 obj = bsn_egr_port_group_id()
550 _type_len = reader.read("!L")[0]
551 assert(_type_len == 200196)
552 obj.value = reader.read("!L")[0]
553 return obj
554
555 def __eq__(self, other):
556 if type(self) != type(other): return False
557 if self.value != other.value: return False
558 return True
559
560 def pretty_print(self, q):
561 q.text("bsn_egr_port_group_id {")
562 with q.group():
563 with q.indent(2):
564 q.breakable()
565 q.text("value = ");
566 q.text("%#x" % self.value)
567 q.breakable()
568 q.text('}')
569
570oxm.subtypes[200196] = bsn_egr_port_group_id
571
572class bsn_egr_port_group_id_masked(oxm):
573 type_len = 200456
574
575 def __init__(self, value=None, value_mask=None):
576 if value != None:
577 self.value = value
578 else:
579 self.value = 0
580 if value_mask != None:
581 self.value_mask = value_mask
582 else:
583 self.value_mask = 0
584 return
585
586 def pack(self):
587 packed = []
588 packed.append(struct.pack("!L", self.type_len))
589 packed.append(struct.pack("!L", self.value))
590 packed.append(struct.pack("!L", self.value_mask))
591 return ''.join(packed)
592
593 @staticmethod
594 def unpack(reader):
595 obj = bsn_egr_port_group_id_masked()
596 _type_len = reader.read("!L")[0]
597 assert(_type_len == 200456)
598 obj.value = reader.read("!L")[0]
599 obj.value_mask = reader.read("!L")[0]
600 return obj
601
602 def __eq__(self, other):
603 if type(self) != type(other): return False
604 if self.value != other.value: return False
605 if self.value_mask != other.value_mask: return False
606 return True
607
608 def pretty_print(self, q):
609 q.text("bsn_egr_port_group_id_masked {")
610 with q.group():
611 with q.indent(2):
612 q.breakable()
613 q.text("value = ");
614 q.text("%#x" % self.value)
615 q.text(","); q.breakable()
616 q.text("value_mask = ");
617 q.text("%#x" % self.value_mask)
618 q.breakable()
619 q.text('}')
620
621oxm.subtypes[200456] = bsn_egr_port_group_id_masked
622
623class bsn_in_ports_128(oxm):
624 type_len = 196624
625
626 def __init__(self, value=None):
627 if value != None:
628 self.value = value
629 else:
630 self.value = set()
631 return
632
633 def pack(self):
634 packed = []
635 packed.append(struct.pack("!L", self.type_len))
636 packed.append(util.pack_bitmap_128(self.value))
637 return ''.join(packed)
638
639 @staticmethod
640 def unpack(reader):
641 obj = bsn_in_ports_128()
642 _type_len = reader.read("!L")[0]
643 assert(_type_len == 196624)
644 obj.value = util.unpack_bitmap_128(reader)
645 return obj
646
647 def __eq__(self, other):
648 if type(self) != type(other): return False
649 if self.value != other.value: return False
650 return True
651
652 def pretty_print(self, q):
653 q.text("bsn_in_ports_128 {")
654 with q.group():
655 with q.indent(2):
656 q.breakable()
657 q.text("value = ");
658 q.pp(self.value)
659 q.breakable()
660 q.text('}')
661
662oxm.subtypes[196624] = bsn_in_ports_128
663
664class bsn_in_ports_128_masked(oxm):
665 type_len = 196896
666
667 def __init__(self, value=None, value_mask=None):
668 if value != None:
669 self.value = value
670 else:
671 self.value = set()
672 if value_mask != None:
673 self.value_mask = value_mask
674 else:
675 self.value_mask = set()
676 return
677
678 def pack(self):
679 packed = []
680 packed.append(struct.pack("!L", self.type_len))
681 packed.append(util.pack_bitmap_128(self.value))
682 packed.append(util.pack_bitmap_128(self.value_mask))
683 return ''.join(packed)
684
685 @staticmethod
686 def unpack(reader):
687 obj = bsn_in_ports_128_masked()
688 _type_len = reader.read("!L")[0]
689 assert(_type_len == 196896)
690 obj.value = util.unpack_bitmap_128(reader)
691 obj.value_mask = util.unpack_bitmap_128(reader)
692 return obj
693
694 def __eq__(self, other):
695 if type(self) != type(other): return False
696 if self.value != other.value: return False
697 if self.value_mask != other.value_mask: return False
698 return True
699
700 def pretty_print(self, q):
701 q.text("bsn_in_ports_128_masked {")
702 with q.group():
703 with q.indent(2):
704 q.breakable()
705 q.text("value = ");
706 q.pp(self.value)
707 q.text(","); q.breakable()
708 q.text("value_mask = ");
709 q.pp(self.value_mask)
710 q.breakable()
711 q.text('}')
712
713oxm.subtypes[196896] = bsn_in_ports_128_masked
714
715class bsn_in_ports_512(oxm):
716 type_len = 206400
717
718 def __init__(self, value=None):
719 if value != None:
720 self.value = value
721 else:
722 self.value = set()
723 return
724
725 def pack(self):
726 packed = []
727 packed.append(struct.pack("!L", self.type_len))
728 packed.append(util.pack_bitmap_512(self.value))
729 return ''.join(packed)
730
731 @staticmethod
732 def unpack(reader):
733 obj = bsn_in_ports_512()
734 _type_len = reader.read("!L")[0]
735 assert(_type_len == 206400)
736 obj.value = util.unpack_bitmap_512(reader)
737 return obj
738
739 def __eq__(self, other):
740 if type(self) != type(other): return False
741 if self.value != other.value: return False
742 return True
743
744 def pretty_print(self, q):
745 q.text("bsn_in_ports_512 {")
746 with q.group():
747 with q.indent(2):
748 q.breakable()
749 q.text("value = ");
750 q.pp(self.value)
751 q.breakable()
752 q.text('}')
753
754oxm.subtypes[206400] = bsn_in_ports_512
755
756class bsn_in_ports_512_masked(oxm):
757 type_len = 206720
758
759 def __init__(self, value=None, value_mask=None):
760 if value != None:
761 self.value = value
762 else:
763 self.value = set()
764 if value_mask != None:
765 self.value_mask = value_mask
766 else:
767 self.value_mask = set()
768 return
769
770 def pack(self):
771 packed = []
772 packed.append(struct.pack("!L", self.type_len))
773 packed.append(util.pack_bitmap_512(self.value))
774 packed.append(util.pack_bitmap_512(self.value_mask))
775 return ''.join(packed)
776
777 @staticmethod
778 def unpack(reader):
779 obj = bsn_in_ports_512_masked()
780 _type_len = reader.read("!L")[0]
781 assert(_type_len == 206720)
782 obj.value = util.unpack_bitmap_512(reader)
783 obj.value_mask = util.unpack_bitmap_512(reader)
784 return obj
785
786 def __eq__(self, other):
787 if type(self) != type(other): return False
788 if self.value != other.value: return False
789 if self.value_mask != other.value_mask: return False
790 return True
791
792 def pretty_print(self, q):
793 q.text("bsn_in_ports_512_masked {")
794 with q.group():
795 with q.indent(2):
796 q.breakable()
797 q.text("value = ");
798 q.pp(self.value)
799 q.text(","); q.breakable()
800 q.text("value_mask = ");
801 q.pp(self.value_mask)
802 q.breakable()
803 q.text('}')
804
805oxm.subtypes[206720] = bsn_in_ports_512_masked
806
807class bsn_ingress_port_group_id(oxm):
808 type_len = 206852
809
810 def __init__(self, value=None):
811 if value != None:
812 self.value = value
813 else:
814 self.value = 0
815 return
816
817 def pack(self):
818 packed = []
819 packed.append(struct.pack("!L", self.type_len))
820 packed.append(struct.pack("!L", self.value))
821 return ''.join(packed)
822
823 @staticmethod
824 def unpack(reader):
825 obj = bsn_ingress_port_group_id()
826 _type_len = reader.read("!L")[0]
827 assert(_type_len == 206852)
828 obj.value = reader.read("!L")[0]
829 return obj
830
831 def __eq__(self, other):
832 if type(self) != type(other): return False
833 if self.value != other.value: return False
834 return True
835
836 def pretty_print(self, q):
837 q.text("bsn_ingress_port_group_id {")
838 with q.group():
839 with q.indent(2):
840 q.breakable()
841 q.text("value = ");
842 q.text("%#x" % self.value)
843 q.breakable()
844 q.text('}')
845
846oxm.subtypes[206852] = bsn_ingress_port_group_id
847
848class bsn_ingress_port_group_id_masked(oxm):
849 type_len = 207112
850
851 def __init__(self, value=None, value_mask=None):
852 if value != None:
853 self.value = value
854 else:
855 self.value = 0
856 if value_mask != None:
857 self.value_mask = value_mask
858 else:
859 self.value_mask = 0
860 return
861
862 def pack(self):
863 packed = []
864 packed.append(struct.pack("!L", self.type_len))
865 packed.append(struct.pack("!L", self.value))
866 packed.append(struct.pack("!L", self.value_mask))
867 return ''.join(packed)
868
869 @staticmethod
870 def unpack(reader):
871 obj = bsn_ingress_port_group_id_masked()
872 _type_len = reader.read("!L")[0]
873 assert(_type_len == 207112)
874 obj.value = reader.read("!L")[0]
875 obj.value_mask = reader.read("!L")[0]
876 return obj
877
878 def __eq__(self, other):
879 if type(self) != type(other): return False
880 if self.value != other.value: return False
881 if self.value_mask != other.value_mask: return False
882 return True
883
884 def pretty_print(self, q):
885 q.text("bsn_ingress_port_group_id_masked {")
886 with q.group():
887 with q.indent(2):
888 q.breakable()
889 q.text("value = ");
890 q.text("%#x" % self.value)
891 q.text(","); q.breakable()
892 q.text("value_mask = ");
893 q.text("%#x" % self.value_mask)
894 q.breakable()
895 q.text('}')
896
897oxm.subtypes[207112] = bsn_ingress_port_group_id_masked
898
899class bsn_inner_eth_dst(oxm):
900 type_len = 207878
901
902 def __init__(self, value=None):
903 if value != None:
904 self.value = value
905 else:
906 self.value = [0,0,0,0,0,0]
907 return
908
909 def pack(self):
910 packed = []
911 packed.append(struct.pack("!L", self.type_len))
912 packed.append(struct.pack("!6B", *self.value))
913 return ''.join(packed)
914
915 @staticmethod
916 def unpack(reader):
917 obj = bsn_inner_eth_dst()
918 _type_len = reader.read("!L")[0]
919 assert(_type_len == 207878)
920 obj.value = list(reader.read('!6B'))
921 return obj
922
923 def __eq__(self, other):
924 if type(self) != type(other): return False
925 if self.value != other.value: return False
926 return True
927
928 def pretty_print(self, q):
929 q.text("bsn_inner_eth_dst {")
930 with q.group():
931 with q.indent(2):
932 q.breakable()
933 q.text("value = ");
934 q.text(util.pretty_mac(self.value))
935 q.breakable()
936 q.text('}')
937
938oxm.subtypes[207878] = bsn_inner_eth_dst
939
940class bsn_inner_eth_dst_masked(oxm):
941 type_len = 208140
942
943 def __init__(self, value=None, value_mask=None):
944 if value != None:
945 self.value = value
946 else:
947 self.value = [0,0,0,0,0,0]
948 if value_mask != None:
949 self.value_mask = value_mask
950 else:
951 self.value_mask = [0,0,0,0,0,0]
952 return
953
954 def pack(self):
955 packed = []
956 packed.append(struct.pack("!L", self.type_len))
957 packed.append(struct.pack("!6B", *self.value))
958 packed.append(struct.pack("!6B", *self.value_mask))
959 return ''.join(packed)
960
961 @staticmethod
962 def unpack(reader):
963 obj = bsn_inner_eth_dst_masked()
964 _type_len = reader.read("!L")[0]
965 assert(_type_len == 208140)
966 obj.value = list(reader.read('!6B'))
967 obj.value_mask = list(reader.read('!6B'))
968 return obj
969
970 def __eq__(self, other):
971 if type(self) != type(other): return False
972 if self.value != other.value: return False
973 if self.value_mask != other.value_mask: return False
974 return True
975
976 def pretty_print(self, q):
977 q.text("bsn_inner_eth_dst_masked {")
978 with q.group():
979 with q.indent(2):
980 q.breakable()
981 q.text("value = ");
982 q.text(util.pretty_mac(self.value))
983 q.text(","); q.breakable()
984 q.text("value_mask = ");
985 q.text(util.pretty_mac(self.value_mask))
986 q.breakable()
987 q.text('}')
988
989oxm.subtypes[208140] = bsn_inner_eth_dst_masked
990
991class bsn_inner_eth_src(oxm):
992 type_len = 208390
993
994 def __init__(self, value=None):
995 if value != None:
996 self.value = value
997 else:
998 self.value = [0,0,0,0,0,0]
999 return
1000
1001 def pack(self):
1002 packed = []
1003 packed.append(struct.pack("!L", self.type_len))
1004 packed.append(struct.pack("!6B", *self.value))
1005 return ''.join(packed)
1006
1007 @staticmethod
1008 def unpack(reader):
1009 obj = bsn_inner_eth_src()
1010 _type_len = reader.read("!L")[0]
1011 assert(_type_len == 208390)
1012 obj.value = list(reader.read('!6B'))
1013 return obj
1014
1015 def __eq__(self, other):
1016 if type(self) != type(other): return False
1017 if self.value != other.value: return False
1018 return True
1019
1020 def pretty_print(self, q):
1021 q.text("bsn_inner_eth_src {")
1022 with q.group():
1023 with q.indent(2):
1024 q.breakable()
1025 q.text("value = ");
1026 q.text(util.pretty_mac(self.value))
1027 q.breakable()
1028 q.text('}')
1029
1030oxm.subtypes[208390] = bsn_inner_eth_src
1031
1032class bsn_inner_eth_src_masked(oxm):
1033 type_len = 208652
1034
1035 def __init__(self, value=None, value_mask=None):
1036 if value != None:
1037 self.value = value
1038 else:
1039 self.value = [0,0,0,0,0,0]
1040 if value_mask != None:
1041 self.value_mask = value_mask
1042 else:
1043 self.value_mask = [0,0,0,0,0,0]
1044 return
1045
1046 def pack(self):
1047 packed = []
1048 packed.append(struct.pack("!L", self.type_len))
1049 packed.append(struct.pack("!6B", *self.value))
1050 packed.append(struct.pack("!6B", *self.value_mask))
1051 return ''.join(packed)
1052
1053 @staticmethod
1054 def unpack(reader):
1055 obj = bsn_inner_eth_src_masked()
1056 _type_len = reader.read("!L")[0]
1057 assert(_type_len == 208652)
1058 obj.value = list(reader.read('!6B'))
1059 obj.value_mask = list(reader.read('!6B'))
1060 return obj
1061
1062 def __eq__(self, other):
1063 if type(self) != type(other): return False
1064 if self.value != other.value: return False
1065 if self.value_mask != other.value_mask: return False
1066 return True
1067
1068 def pretty_print(self, q):
1069 q.text("bsn_inner_eth_src_masked {")
1070 with q.group():
1071 with q.indent(2):
1072 q.breakable()
1073 q.text("value = ");
1074 q.text(util.pretty_mac(self.value))
1075 q.text(","); q.breakable()
1076 q.text("value_mask = ");
1077 q.text(util.pretty_mac(self.value_mask))
1078 q.breakable()
1079 q.text('}')
1080
1081oxm.subtypes[208652] = bsn_inner_eth_src_masked
1082
1083class bsn_inner_vlan_vid(oxm):
1084 type_len = 208898
1085
1086 def __init__(self, value=None):
1087 if value != None:
1088 self.value = value
1089 else:
1090 self.value = 0
1091 return
1092
1093 def pack(self):
1094 packed = []
1095 packed.append(struct.pack("!L", self.type_len))
1096 packed.append(struct.pack("!H", self.value))
1097 return ''.join(packed)
1098
1099 @staticmethod
1100 def unpack(reader):
1101 obj = bsn_inner_vlan_vid()
1102 _type_len = reader.read("!L")[0]
1103 assert(_type_len == 208898)
1104 obj.value = reader.read("!H")[0]
1105 return obj
1106
1107 def __eq__(self, other):
1108 if type(self) != type(other): return False
1109 if self.value != other.value: return False
1110 return True
1111
1112 def pretty_print(self, q):
1113 q.text("bsn_inner_vlan_vid {")
1114 with q.group():
1115 with q.indent(2):
1116 q.breakable()
1117 q.text("value = ");
1118 q.text("%#x" % self.value)
1119 q.breakable()
1120 q.text('}')
1121
1122oxm.subtypes[208898] = bsn_inner_vlan_vid
1123
1124class bsn_inner_vlan_vid_masked(oxm):
1125 type_len = 209156
1126
1127 def __init__(self, value=None, value_mask=None):
1128 if value != None:
1129 self.value = value
1130 else:
1131 self.value = 0
1132 if value_mask != None:
1133 self.value_mask = value_mask
1134 else:
1135 self.value_mask = 0
1136 return
1137
1138 def pack(self):
1139 packed = []
1140 packed.append(struct.pack("!L", self.type_len))
1141 packed.append(struct.pack("!H", self.value))
1142 packed.append(struct.pack("!H", self.value_mask))
1143 return ''.join(packed)
1144
1145 @staticmethod
1146 def unpack(reader):
1147 obj = bsn_inner_vlan_vid_masked()
1148 _type_len = reader.read("!L")[0]
1149 assert(_type_len == 209156)
1150 obj.value = reader.read("!H")[0]
1151 obj.value_mask = reader.read("!H")[0]
1152 return obj
1153
1154 def __eq__(self, other):
1155 if type(self) != type(other): return False
1156 if self.value != other.value: return False
1157 if self.value_mask != other.value_mask: return False
1158 return True
1159
1160 def pretty_print(self, q):
1161 q.text("bsn_inner_vlan_vid_masked {")
1162 with q.group():
1163 with q.indent(2):
1164 q.breakable()
1165 q.text("value = ");
1166 q.text("%#x" % self.value)
1167 q.text(","); q.breakable()
1168 q.text("value_mask = ");
1169 q.text("%#x" % self.value_mask)
1170 q.breakable()
1171 q.text('}')
1172
1173oxm.subtypes[209156] = bsn_inner_vlan_vid_masked
1174
1175class bsn_l2_cache_hit(oxm):
1176 type_len = 205825
1177
1178 def __init__(self, value=None):
1179 if value != None:
1180 self.value = value
1181 else:
1182 self.value = 0
1183 return
1184
1185 def pack(self):
1186 packed = []
1187 packed.append(struct.pack("!L", self.type_len))
1188 packed.append(struct.pack("!B", self.value))
1189 return ''.join(packed)
1190
1191 @staticmethod
1192 def unpack(reader):
1193 obj = bsn_l2_cache_hit()
1194 _type_len = reader.read("!L")[0]
1195 assert(_type_len == 205825)
1196 obj.value = reader.read("!B")[0]
1197 return obj
1198
1199 def __eq__(self, other):
1200 if type(self) != type(other): return False
1201 if self.value != other.value: return False
1202 return True
1203
1204 def pretty_print(self, q):
1205 q.text("bsn_l2_cache_hit {")
1206 with q.group():
1207 with q.indent(2):
1208 q.breakable()
1209 q.text("value = ");
1210 q.text("%#x" % self.value)
1211 q.breakable()
1212 q.text('}')
1213
1214oxm.subtypes[205825] = bsn_l2_cache_hit
1215
1216class bsn_l2_cache_hit_masked(oxm):
1217 type_len = 206082
1218
1219 def __init__(self, value=None, value_mask=None):
1220 if value != None:
1221 self.value = value
1222 else:
1223 self.value = 0
1224 if value_mask != None:
1225 self.value_mask = value_mask
1226 else:
1227 self.value_mask = 0
1228 return
1229
1230 def pack(self):
1231 packed = []
1232 packed.append(struct.pack("!L", self.type_len))
1233 packed.append(struct.pack("!B", self.value))
1234 packed.append(struct.pack("!B", self.value_mask))
1235 return ''.join(packed)
1236
1237 @staticmethod
1238 def unpack(reader):
1239 obj = bsn_l2_cache_hit_masked()
1240 _type_len = reader.read("!L")[0]
1241 assert(_type_len == 206082)
1242 obj.value = reader.read("!B")[0]
1243 obj.value_mask = reader.read("!B")[0]
1244 return obj
1245
1246 def __eq__(self, other):
1247 if type(self) != type(other): return False
1248 if self.value != other.value: return False
1249 if self.value_mask != other.value_mask: return False
1250 return True
1251
1252 def pretty_print(self, q):
1253 q.text("bsn_l2_cache_hit_masked {")
1254 with q.group():
1255 with q.indent(2):
1256 q.breakable()
1257 q.text("value = ");
1258 q.text("%#x" % self.value)
1259 q.text(","); q.breakable()
1260 q.text("value_mask = ");
1261 q.text("%#x" % self.value_mask)
1262 q.breakable()
1263 q.text('}')
1264
1265oxm.subtypes[206082] = bsn_l2_cache_hit_masked
1266
1267class bsn_l3_interface_class_id(oxm):
1268 type_len = 198660
1269
1270 def __init__(self, value=None):
1271 if value != None:
1272 self.value = value
1273 else:
1274 self.value = 0
1275 return
1276
1277 def pack(self):
1278 packed = []
1279 packed.append(struct.pack("!L", self.type_len))
1280 packed.append(struct.pack("!L", self.value))
1281 return ''.join(packed)
1282
1283 @staticmethod
1284 def unpack(reader):
1285 obj = bsn_l3_interface_class_id()
1286 _type_len = reader.read("!L")[0]
1287 assert(_type_len == 198660)
1288 obj.value = reader.read("!L")[0]
1289 return obj
1290
1291 def __eq__(self, other):
1292 if type(self) != type(other): return False
1293 if self.value != other.value: return False
1294 return True
1295
1296 def pretty_print(self, q):
1297 q.text("bsn_l3_interface_class_id {")
1298 with q.group():
1299 with q.indent(2):
1300 q.breakable()
1301 q.text("value = ");
1302 q.text("%#x" % self.value)
1303 q.breakable()
1304 q.text('}')
1305
1306oxm.subtypes[198660] = bsn_l3_interface_class_id
1307
1308class bsn_l3_interface_class_id_masked(oxm):
1309 type_len = 198920
1310
1311 def __init__(self, value=None, value_mask=None):
1312 if value != None:
1313 self.value = value
1314 else:
1315 self.value = 0
1316 if value_mask != None:
1317 self.value_mask = value_mask
1318 else:
1319 self.value_mask = 0
1320 return
1321
1322 def pack(self):
1323 packed = []
1324 packed.append(struct.pack("!L", self.type_len))
1325 packed.append(struct.pack("!L", self.value))
1326 packed.append(struct.pack("!L", self.value_mask))
1327 return ''.join(packed)
1328
1329 @staticmethod
1330 def unpack(reader):
1331 obj = bsn_l3_interface_class_id_masked()
1332 _type_len = reader.read("!L")[0]
1333 assert(_type_len == 198920)
1334 obj.value = reader.read("!L")[0]
1335 obj.value_mask = reader.read("!L")[0]
1336 return obj
1337
1338 def __eq__(self, other):
1339 if type(self) != type(other): return False
1340 if self.value != other.value: return False
1341 if self.value_mask != other.value_mask: return False
1342 return True
1343
1344 def pretty_print(self, q):
1345 q.text("bsn_l3_interface_class_id_masked {")
1346 with q.group():
1347 with q.indent(2):
1348 q.breakable()
1349 q.text("value = ");
1350 q.text("%#x" % self.value)
1351 q.text(","); q.breakable()
1352 q.text("value_mask = ");
1353 q.text("%#x" % self.value_mask)
1354 q.breakable()
1355 q.text('}')
1356
1357oxm.subtypes[198920] = bsn_l3_interface_class_id_masked
1358
1359class bsn_l3_src_class_id(oxm):
1360 type_len = 199172
1361
1362 def __init__(self, value=None):
1363 if value != None:
1364 self.value = value
1365 else:
1366 self.value = 0
1367 return
1368
1369 def pack(self):
1370 packed = []
1371 packed.append(struct.pack("!L", self.type_len))
1372 packed.append(struct.pack("!L", self.value))
1373 return ''.join(packed)
1374
1375 @staticmethod
1376 def unpack(reader):
1377 obj = bsn_l3_src_class_id()
1378 _type_len = reader.read("!L")[0]
1379 assert(_type_len == 199172)
1380 obj.value = reader.read("!L")[0]
1381 return obj
1382
1383 def __eq__(self, other):
1384 if type(self) != type(other): return False
1385 if self.value != other.value: return False
1386 return True
1387
1388 def pretty_print(self, q):
1389 q.text("bsn_l3_src_class_id {")
1390 with q.group():
1391 with q.indent(2):
1392 q.breakable()
1393 q.text("value = ");
1394 q.text("%#x" % self.value)
1395 q.breakable()
1396 q.text('}')
1397
1398oxm.subtypes[199172] = bsn_l3_src_class_id
1399
1400class bsn_l3_src_class_id_masked(oxm):
1401 type_len = 199432
1402
1403 def __init__(self, value=None, value_mask=None):
1404 if value != None:
1405 self.value = value
1406 else:
1407 self.value = 0
1408 if value_mask != None:
1409 self.value_mask = value_mask
1410 else:
1411 self.value_mask = 0
1412 return
1413
1414 def pack(self):
1415 packed = []
1416 packed.append(struct.pack("!L", self.type_len))
1417 packed.append(struct.pack("!L", self.value))
1418 packed.append(struct.pack("!L", self.value_mask))
1419 return ''.join(packed)
1420
1421 @staticmethod
1422 def unpack(reader):
1423 obj = bsn_l3_src_class_id_masked()
1424 _type_len = reader.read("!L")[0]
1425 assert(_type_len == 199432)
1426 obj.value = reader.read("!L")[0]
1427 obj.value_mask = reader.read("!L")[0]
1428 return obj
1429
1430 def __eq__(self, other):
1431 if type(self) != type(other): return False
1432 if self.value != other.value: return False
1433 if self.value_mask != other.value_mask: return False
1434 return True
1435
1436 def pretty_print(self, q):
1437 q.text("bsn_l3_src_class_id_masked {")
1438 with q.group():
1439 with q.indent(2):
1440 q.breakable()
1441 q.text("value = ");
1442 q.text("%#x" % self.value)
1443 q.text(","); q.breakable()
1444 q.text("value_mask = ");
1445 q.text("%#x" % self.value_mask)
1446 q.breakable()
1447 q.text('}')
1448
1449oxm.subtypes[199432] = bsn_l3_src_class_id_masked
1450
1451class bsn_lag_id(oxm):
1452 type_len = 197124
1453
1454 def __init__(self, value=None):
1455 if value != None:
1456 self.value = value
1457 else:
1458 self.value = 0
1459 return
1460
1461 def pack(self):
1462 packed = []
1463 packed.append(struct.pack("!L", self.type_len))
1464 packed.append(struct.pack("!L", self.value))
1465 return ''.join(packed)
1466
1467 @staticmethod
1468 def unpack(reader):
1469 obj = bsn_lag_id()
1470 _type_len = reader.read("!L")[0]
1471 assert(_type_len == 197124)
1472 obj.value = reader.read("!L")[0]
1473 return obj
1474
1475 def __eq__(self, other):
1476 if type(self) != type(other): return False
1477 if self.value != other.value: return False
1478 return True
1479
1480 def pretty_print(self, q):
1481 q.text("bsn_lag_id {")
1482 with q.group():
1483 with q.indent(2):
1484 q.breakable()
1485 q.text("value = ");
1486 q.text("%#x" % self.value)
1487 q.breakable()
1488 q.text('}')
1489
1490oxm.subtypes[197124] = bsn_lag_id
1491
1492class bsn_lag_id_masked(oxm):
1493 type_len = 197384
1494
1495 def __init__(self, value=None, value_mask=None):
1496 if value != None:
1497 self.value = value
1498 else:
1499 self.value = 0
1500 if value_mask != None:
1501 self.value_mask = value_mask
1502 else:
1503 self.value_mask = 0
1504 return
1505
1506 def pack(self):
1507 packed = []
1508 packed.append(struct.pack("!L", self.type_len))
1509 packed.append(struct.pack("!L", self.value))
1510 packed.append(struct.pack("!L", self.value_mask))
1511 return ''.join(packed)
1512
1513 @staticmethod
1514 def unpack(reader):
1515 obj = bsn_lag_id_masked()
1516 _type_len = reader.read("!L")[0]
1517 assert(_type_len == 197384)
1518 obj.value = reader.read("!L")[0]
1519 obj.value_mask = reader.read("!L")[0]
1520 return obj
1521
1522 def __eq__(self, other):
1523 if type(self) != type(other): return False
1524 if self.value != other.value: return False
1525 if self.value_mask != other.value_mask: return False
1526 return True
1527
1528 def pretty_print(self, q):
1529 q.text("bsn_lag_id_masked {")
1530 with q.group():
1531 with q.indent(2):
1532 q.breakable()
1533 q.text("value = ");
1534 q.text("%#x" % self.value)
1535 q.text(","); q.breakable()
1536 q.text("value_mask = ");
1537 q.text("%#x" % self.value_mask)
1538 q.breakable()
1539 q.text('}')
1540
1541oxm.subtypes[197384] = bsn_lag_id_masked
1542
1543class bsn_tcp_flags(oxm):
1544 type_len = 204802
1545
1546 def __init__(self, value=None):
1547 if value != None:
1548 self.value = value
1549 else:
1550 self.value = 0
1551 return
1552
1553 def pack(self):
1554 packed = []
1555 packed.append(struct.pack("!L", self.type_len))
1556 packed.append(struct.pack("!H", self.value))
1557 return ''.join(packed)
1558
1559 @staticmethod
1560 def unpack(reader):
1561 obj = bsn_tcp_flags()
1562 _type_len = reader.read("!L")[0]
1563 assert(_type_len == 204802)
1564 obj.value = reader.read("!H")[0]
1565 return obj
1566
1567 def __eq__(self, other):
1568 if type(self) != type(other): return False
1569 if self.value != other.value: return False
1570 return True
1571
1572 def pretty_print(self, q):
1573 q.text("bsn_tcp_flags {")
1574 with q.group():
1575 with q.indent(2):
1576 q.breakable()
1577 q.text("value = ");
1578 q.text("%#x" % self.value)
1579 q.breakable()
1580 q.text('}')
1581
1582oxm.subtypes[204802] = bsn_tcp_flags
1583
1584class bsn_tcp_flags_masked(oxm):
1585 type_len = 205060
1586
1587 def __init__(self, value=None, value_mask=None):
1588 if value != None:
1589 self.value = value
1590 else:
1591 self.value = 0
1592 if value_mask != None:
1593 self.value_mask = value_mask
1594 else:
1595 self.value_mask = 0
1596 return
1597
1598 def pack(self):
1599 packed = []
1600 packed.append(struct.pack("!L", self.type_len))
1601 packed.append(struct.pack("!H", self.value))
1602 packed.append(struct.pack("!H", self.value_mask))
1603 return ''.join(packed)
1604
1605 @staticmethod
1606 def unpack(reader):
1607 obj = bsn_tcp_flags_masked()
1608 _type_len = reader.read("!L")[0]
1609 assert(_type_len == 205060)
1610 obj.value = reader.read("!H")[0]
1611 obj.value_mask = reader.read("!H")[0]
1612 return obj
1613
1614 def __eq__(self, other):
1615 if type(self) != type(other): return False
1616 if self.value != other.value: return False
1617 if self.value_mask != other.value_mask: return False
1618 return True
1619
1620 def pretty_print(self, q):
1621 q.text("bsn_tcp_flags_masked {")
1622 with q.group():
1623 with q.indent(2):
1624 q.breakable()
1625 q.text("value = ");
1626 q.text("%#x" % self.value)
1627 q.text(","); q.breakable()
1628 q.text("value_mask = ");
1629 q.text("%#x" % self.value_mask)
1630 q.breakable()
1631 q.text('}')
1632
1633oxm.subtypes[205060] = bsn_tcp_flags_masked
1634
1635class bsn_udf0(oxm):
1636 type_len = 200708
1637
1638 def __init__(self, value=None):
1639 if value != None:
1640 self.value = value
1641 else:
1642 self.value = 0
1643 return
1644
1645 def pack(self):
1646 packed = []
1647 packed.append(struct.pack("!L", self.type_len))
1648 packed.append(struct.pack("!L", self.value))
1649 return ''.join(packed)
1650
1651 @staticmethod
1652 def unpack(reader):
1653 obj = bsn_udf0()
1654 _type_len = reader.read("!L")[0]
1655 assert(_type_len == 200708)
1656 obj.value = reader.read("!L")[0]
1657 return obj
1658
1659 def __eq__(self, other):
1660 if type(self) != type(other): return False
1661 if self.value != other.value: return False
1662 return True
1663
1664 def pretty_print(self, q):
1665 q.text("bsn_udf0 {")
1666 with q.group():
1667 with q.indent(2):
1668 q.breakable()
1669 q.text("value = ");
1670 q.text("%#x" % self.value)
1671 q.breakable()
1672 q.text('}')
1673
1674oxm.subtypes[200708] = bsn_udf0
1675
1676class bsn_udf0_masked(oxm):
1677 type_len = 200968
1678
1679 def __init__(self, value=None, value_mask=None):
1680 if value != None:
1681 self.value = value
1682 else:
1683 self.value = 0
1684 if value_mask != None:
1685 self.value_mask = value_mask
1686 else:
1687 self.value_mask = 0
1688 return
1689
1690 def pack(self):
1691 packed = []
1692 packed.append(struct.pack("!L", self.type_len))
1693 packed.append(struct.pack("!L", self.value))
1694 packed.append(struct.pack("!L", self.value_mask))
1695 return ''.join(packed)
1696
1697 @staticmethod
1698 def unpack(reader):
1699 obj = bsn_udf0_masked()
1700 _type_len = reader.read("!L")[0]
1701 assert(_type_len == 200968)
1702 obj.value = reader.read("!L")[0]
1703 obj.value_mask = reader.read("!L")[0]
1704 return obj
1705
1706 def __eq__(self, other):
1707 if type(self) != type(other): return False
1708 if self.value != other.value: return False
1709 if self.value_mask != other.value_mask: return False
1710 return True
1711
1712 def pretty_print(self, q):
1713 q.text("bsn_udf0_masked {")
1714 with q.group():
1715 with q.indent(2):
1716 q.breakable()
1717 q.text("value = ");
1718 q.text("%#x" % self.value)
1719 q.text(","); q.breakable()
1720 q.text("value_mask = ");
1721 q.text("%#x" % self.value_mask)
1722 q.breakable()
1723 q.text('}')
1724
1725oxm.subtypes[200968] = bsn_udf0_masked
1726
1727class bsn_udf1(oxm):
1728 type_len = 201220
1729
1730 def __init__(self, value=None):
1731 if value != None:
1732 self.value = value
1733 else:
1734 self.value = 0
1735 return
1736
1737 def pack(self):
1738 packed = []
1739 packed.append(struct.pack("!L", self.type_len))
1740 packed.append(struct.pack("!L", self.value))
1741 return ''.join(packed)
1742
1743 @staticmethod
1744 def unpack(reader):
1745 obj = bsn_udf1()
1746 _type_len = reader.read("!L")[0]
1747 assert(_type_len == 201220)
1748 obj.value = reader.read("!L")[0]
1749 return obj
1750
1751 def __eq__(self, other):
1752 if type(self) != type(other): return False
1753 if self.value != other.value: return False
1754 return True
1755
1756 def pretty_print(self, q):
1757 q.text("bsn_udf1 {")
1758 with q.group():
1759 with q.indent(2):
1760 q.breakable()
1761 q.text("value = ");
1762 q.text("%#x" % self.value)
1763 q.breakable()
1764 q.text('}')
1765
1766oxm.subtypes[201220] = bsn_udf1
1767
1768class bsn_udf1_masked(oxm):
1769 type_len = 201480
1770
1771 def __init__(self, value=None, value_mask=None):
1772 if value != None:
1773 self.value = value
1774 else:
1775 self.value = 0
1776 if value_mask != None:
1777 self.value_mask = value_mask
1778 else:
1779 self.value_mask = 0
1780 return
1781
1782 def pack(self):
1783 packed = []
1784 packed.append(struct.pack("!L", self.type_len))
1785 packed.append(struct.pack("!L", self.value))
1786 packed.append(struct.pack("!L", self.value_mask))
1787 return ''.join(packed)
1788
1789 @staticmethod
1790 def unpack(reader):
1791 obj = bsn_udf1_masked()
1792 _type_len = reader.read("!L")[0]
1793 assert(_type_len == 201480)
1794 obj.value = reader.read("!L")[0]
1795 obj.value_mask = reader.read("!L")[0]
1796 return obj
1797
1798 def __eq__(self, other):
1799 if type(self) != type(other): return False
1800 if self.value != other.value: return False
1801 if self.value_mask != other.value_mask: return False
1802 return True
1803
1804 def pretty_print(self, q):
1805 q.text("bsn_udf1_masked {")
1806 with q.group():
1807 with q.indent(2):
1808 q.breakable()
1809 q.text("value = ");
1810 q.text("%#x" % self.value)
1811 q.text(","); q.breakable()
1812 q.text("value_mask = ");
1813 q.text("%#x" % self.value_mask)
1814 q.breakable()
1815 q.text('}')
1816
1817oxm.subtypes[201480] = bsn_udf1_masked
1818
1819class bsn_udf2(oxm):
1820 type_len = 201732
1821
1822 def __init__(self, value=None):
1823 if value != None:
1824 self.value = value
1825 else:
1826 self.value = 0
1827 return
1828
1829 def pack(self):
1830 packed = []
1831 packed.append(struct.pack("!L", self.type_len))
1832 packed.append(struct.pack("!L", self.value))
1833 return ''.join(packed)
1834
1835 @staticmethod
1836 def unpack(reader):
1837 obj = bsn_udf2()
1838 _type_len = reader.read("!L")[0]
1839 assert(_type_len == 201732)
1840 obj.value = reader.read("!L")[0]
1841 return obj
1842
1843 def __eq__(self, other):
1844 if type(self) != type(other): return False
1845 if self.value != other.value: return False
1846 return True
1847
1848 def pretty_print(self, q):
1849 q.text("bsn_udf2 {")
1850 with q.group():
1851 with q.indent(2):
1852 q.breakable()
1853 q.text("value = ");
1854 q.text("%#x" % self.value)
1855 q.breakable()
1856 q.text('}')
1857
1858oxm.subtypes[201732] = bsn_udf2
1859
1860class bsn_udf2_masked(oxm):
1861 type_len = 201992
1862
1863 def __init__(self, value=None, value_mask=None):
1864 if value != None:
1865 self.value = value
1866 else:
1867 self.value = 0
1868 if value_mask != None:
1869 self.value_mask = value_mask
1870 else:
1871 self.value_mask = 0
1872 return
1873
1874 def pack(self):
1875 packed = []
1876 packed.append(struct.pack("!L", self.type_len))
1877 packed.append(struct.pack("!L", self.value))
1878 packed.append(struct.pack("!L", self.value_mask))
1879 return ''.join(packed)
1880
1881 @staticmethod
1882 def unpack(reader):
1883 obj = bsn_udf2_masked()
1884 _type_len = reader.read("!L")[0]
1885 assert(_type_len == 201992)
1886 obj.value = reader.read("!L")[0]
1887 obj.value_mask = reader.read("!L")[0]
1888 return obj
1889
1890 def __eq__(self, other):
1891 if type(self) != type(other): return False
1892 if self.value != other.value: return False
1893 if self.value_mask != other.value_mask: return False
1894 return True
1895
1896 def pretty_print(self, q):
1897 q.text("bsn_udf2_masked {")
1898 with q.group():
1899 with q.indent(2):
1900 q.breakable()
1901 q.text("value = ");
1902 q.text("%#x" % self.value)
1903 q.text(","); q.breakable()
1904 q.text("value_mask = ");
1905 q.text("%#x" % self.value_mask)
1906 q.breakable()
1907 q.text('}')
1908
1909oxm.subtypes[201992] = bsn_udf2_masked
1910
1911class bsn_udf3(oxm):
1912 type_len = 202244
1913
1914 def __init__(self, value=None):
1915 if value != None:
1916 self.value = value
1917 else:
1918 self.value = 0
1919 return
1920
1921 def pack(self):
1922 packed = []
1923 packed.append(struct.pack("!L", self.type_len))
1924 packed.append(struct.pack("!L", self.value))
1925 return ''.join(packed)
1926
1927 @staticmethod
1928 def unpack(reader):
1929 obj = bsn_udf3()
1930 _type_len = reader.read("!L")[0]
1931 assert(_type_len == 202244)
1932 obj.value = reader.read("!L")[0]
1933 return obj
1934
1935 def __eq__(self, other):
1936 if type(self) != type(other): return False
1937 if self.value != other.value: return False
1938 return True
1939
1940 def pretty_print(self, q):
1941 q.text("bsn_udf3 {")
1942 with q.group():
1943 with q.indent(2):
1944 q.breakable()
1945 q.text("value = ");
1946 q.text("%#x" % self.value)
1947 q.breakable()
1948 q.text('}')
1949
1950oxm.subtypes[202244] = bsn_udf3
1951
1952class bsn_udf3_masked(oxm):
1953 type_len = 202504
1954
1955 def __init__(self, value=None, value_mask=None):
1956 if value != None:
1957 self.value = value
1958 else:
1959 self.value = 0
1960 if value_mask != None:
1961 self.value_mask = value_mask
1962 else:
1963 self.value_mask = 0
1964 return
1965
1966 def pack(self):
1967 packed = []
1968 packed.append(struct.pack("!L", self.type_len))
1969 packed.append(struct.pack("!L", self.value))
1970 packed.append(struct.pack("!L", self.value_mask))
1971 return ''.join(packed)
1972
1973 @staticmethod
1974 def unpack(reader):
1975 obj = bsn_udf3_masked()
1976 _type_len = reader.read("!L")[0]
1977 assert(_type_len == 202504)
1978 obj.value = reader.read("!L")[0]
1979 obj.value_mask = reader.read("!L")[0]
1980 return obj
1981
1982 def __eq__(self, other):
1983 if type(self) != type(other): return False
1984 if self.value != other.value: return False
1985 if self.value_mask != other.value_mask: return False
1986 return True
1987
1988 def pretty_print(self, q):
1989 q.text("bsn_udf3_masked {")
1990 with q.group():
1991 with q.indent(2):
1992 q.breakable()
1993 q.text("value = ");
1994 q.text("%#x" % self.value)
1995 q.text(","); q.breakable()
1996 q.text("value_mask = ");
1997 q.text("%#x" % self.value_mask)
1998 q.breakable()
1999 q.text('}')
2000
2001oxm.subtypes[202504] = bsn_udf3_masked
2002
2003class bsn_udf4(oxm):
2004 type_len = 202756
2005
2006 def __init__(self, value=None):
2007 if value != None:
2008 self.value = value
2009 else:
2010 self.value = 0
2011 return
2012
2013 def pack(self):
2014 packed = []
2015 packed.append(struct.pack("!L", self.type_len))
2016 packed.append(struct.pack("!L", self.value))
2017 return ''.join(packed)
2018
2019 @staticmethod
2020 def unpack(reader):
2021 obj = bsn_udf4()
2022 _type_len = reader.read("!L")[0]
2023 assert(_type_len == 202756)
2024 obj.value = reader.read("!L")[0]
2025 return obj
2026
2027 def __eq__(self, other):
2028 if type(self) != type(other): return False
2029 if self.value != other.value: return False
2030 return True
2031
2032 def pretty_print(self, q):
2033 q.text("bsn_udf4 {")
2034 with q.group():
2035 with q.indent(2):
2036 q.breakable()
2037 q.text("value = ");
2038 q.text("%#x" % self.value)
2039 q.breakable()
2040 q.text('}')
2041
2042oxm.subtypes[202756] = bsn_udf4
2043
2044class bsn_udf4_masked(oxm):
2045 type_len = 203016
2046
2047 def __init__(self, value=None, value_mask=None):
2048 if value != None:
2049 self.value = value
2050 else:
2051 self.value = 0
2052 if value_mask != None:
2053 self.value_mask = value_mask
2054 else:
2055 self.value_mask = 0
2056 return
2057
2058 def pack(self):
2059 packed = []
2060 packed.append(struct.pack("!L", self.type_len))
2061 packed.append(struct.pack("!L", self.value))
2062 packed.append(struct.pack("!L", self.value_mask))
2063 return ''.join(packed)
2064
2065 @staticmethod
2066 def unpack(reader):
2067 obj = bsn_udf4_masked()
2068 _type_len = reader.read("!L")[0]
2069 assert(_type_len == 203016)
2070 obj.value = reader.read("!L")[0]
2071 obj.value_mask = reader.read("!L")[0]
2072 return obj
2073
2074 def __eq__(self, other):
2075 if type(self) != type(other): return False
2076 if self.value != other.value: return False
2077 if self.value_mask != other.value_mask: return False
2078 return True
2079
2080 def pretty_print(self, q):
2081 q.text("bsn_udf4_masked {")
2082 with q.group():
2083 with q.indent(2):
2084 q.breakable()
2085 q.text("value = ");
2086 q.text("%#x" % self.value)
2087 q.text(","); q.breakable()
2088 q.text("value_mask = ");
2089 q.text("%#x" % self.value_mask)
2090 q.breakable()
2091 q.text('}')
2092
2093oxm.subtypes[203016] = bsn_udf4_masked
2094
2095class bsn_udf5(oxm):
2096 type_len = 203268
2097
2098 def __init__(self, value=None):
2099 if value != None:
2100 self.value = value
2101 else:
2102 self.value = 0
2103 return
2104
2105 def pack(self):
2106 packed = []
2107 packed.append(struct.pack("!L", self.type_len))
2108 packed.append(struct.pack("!L", self.value))
2109 return ''.join(packed)
2110
2111 @staticmethod
2112 def unpack(reader):
2113 obj = bsn_udf5()
2114 _type_len = reader.read("!L")[0]
2115 assert(_type_len == 203268)
2116 obj.value = reader.read("!L")[0]
2117 return obj
2118
2119 def __eq__(self, other):
2120 if type(self) != type(other): return False
2121 if self.value != other.value: return False
2122 return True
2123
2124 def pretty_print(self, q):
2125 q.text("bsn_udf5 {")
2126 with q.group():
2127 with q.indent(2):
2128 q.breakable()
2129 q.text("value = ");
2130 q.text("%#x" % self.value)
2131 q.breakable()
2132 q.text('}')
2133
2134oxm.subtypes[203268] = bsn_udf5
2135
2136class bsn_udf5_masked(oxm):
2137 type_len = 203528
2138
2139 def __init__(self, value=None, value_mask=None):
2140 if value != None:
2141 self.value = value
2142 else:
2143 self.value = 0
2144 if value_mask != None:
2145 self.value_mask = value_mask
2146 else:
2147 self.value_mask = 0
2148 return
2149
2150 def pack(self):
2151 packed = []
2152 packed.append(struct.pack("!L", self.type_len))
2153 packed.append(struct.pack("!L", self.value))
2154 packed.append(struct.pack("!L", self.value_mask))
2155 return ''.join(packed)
2156
2157 @staticmethod
2158 def unpack(reader):
2159 obj = bsn_udf5_masked()
2160 _type_len = reader.read("!L")[0]
2161 assert(_type_len == 203528)
2162 obj.value = reader.read("!L")[0]
2163 obj.value_mask = reader.read("!L")[0]
2164 return obj
2165
2166 def __eq__(self, other):
2167 if type(self) != type(other): return False
2168 if self.value != other.value: return False
2169 if self.value_mask != other.value_mask: return False
2170 return True
2171
2172 def pretty_print(self, q):
2173 q.text("bsn_udf5_masked {")
2174 with q.group():
2175 with q.indent(2):
2176 q.breakable()
2177 q.text("value = ");
2178 q.text("%#x" % self.value)
2179 q.text(","); q.breakable()
2180 q.text("value_mask = ");
2181 q.text("%#x" % self.value_mask)
2182 q.breakable()
2183 q.text('}')
2184
2185oxm.subtypes[203528] = bsn_udf5_masked
2186
2187class bsn_udf6(oxm):
2188 type_len = 203780
2189
2190 def __init__(self, value=None):
2191 if value != None:
2192 self.value = value
2193 else:
2194 self.value = 0
2195 return
2196
2197 def pack(self):
2198 packed = []
2199 packed.append(struct.pack("!L", self.type_len))
2200 packed.append(struct.pack("!L", self.value))
2201 return ''.join(packed)
2202
2203 @staticmethod
2204 def unpack(reader):
2205 obj = bsn_udf6()
2206 _type_len = reader.read("!L")[0]
2207 assert(_type_len == 203780)
2208 obj.value = reader.read("!L")[0]
2209 return obj
2210
2211 def __eq__(self, other):
2212 if type(self) != type(other): return False
2213 if self.value != other.value: return False
2214 return True
2215
2216 def pretty_print(self, q):
2217 q.text("bsn_udf6 {")
2218 with q.group():
2219 with q.indent(2):
2220 q.breakable()
2221 q.text("value = ");
2222 q.text("%#x" % self.value)
2223 q.breakable()
2224 q.text('}')
2225
2226oxm.subtypes[203780] = bsn_udf6
2227
2228class bsn_udf6_masked(oxm):
2229 type_len = 204040
2230
2231 def __init__(self, value=None, value_mask=None):
2232 if value != None:
2233 self.value = value
2234 else:
2235 self.value = 0
2236 if value_mask != None:
2237 self.value_mask = value_mask
2238 else:
2239 self.value_mask = 0
2240 return
2241
2242 def pack(self):
2243 packed = []
2244 packed.append(struct.pack("!L", self.type_len))
2245 packed.append(struct.pack("!L", self.value))
2246 packed.append(struct.pack("!L", self.value_mask))
2247 return ''.join(packed)
2248
2249 @staticmethod
2250 def unpack(reader):
2251 obj = bsn_udf6_masked()
2252 _type_len = reader.read("!L")[0]
2253 assert(_type_len == 204040)
2254 obj.value = reader.read("!L")[0]
2255 obj.value_mask = reader.read("!L")[0]
2256 return obj
2257
2258 def __eq__(self, other):
2259 if type(self) != type(other): return False
2260 if self.value != other.value: return False
2261 if self.value_mask != other.value_mask: return False
2262 return True
2263
2264 def pretty_print(self, q):
2265 q.text("bsn_udf6_masked {")
2266 with q.group():
2267 with q.indent(2):
2268 q.breakable()
2269 q.text("value = ");
2270 q.text("%#x" % self.value)
2271 q.text(","); q.breakable()
2272 q.text("value_mask = ");
2273 q.text("%#x" % self.value_mask)
2274 q.breakable()
2275 q.text('}')
2276
2277oxm.subtypes[204040] = bsn_udf6_masked
2278
2279class bsn_udf7(oxm):
2280 type_len = 204292
2281
2282 def __init__(self, value=None):
2283 if value != None:
2284 self.value = value
2285 else:
2286 self.value = 0
2287 return
2288
2289 def pack(self):
2290 packed = []
2291 packed.append(struct.pack("!L", self.type_len))
2292 packed.append(struct.pack("!L", self.value))
2293 return ''.join(packed)
2294
2295 @staticmethod
2296 def unpack(reader):
2297 obj = bsn_udf7()
2298 _type_len = reader.read("!L")[0]
2299 assert(_type_len == 204292)
2300 obj.value = reader.read("!L")[0]
2301 return obj
2302
2303 def __eq__(self, other):
2304 if type(self) != type(other): return False
2305 if self.value != other.value: return False
2306 return True
2307
2308 def pretty_print(self, q):
2309 q.text("bsn_udf7 {")
2310 with q.group():
2311 with q.indent(2):
2312 q.breakable()
2313 q.text("value = ");
2314 q.text("%#x" % self.value)
2315 q.breakable()
2316 q.text('}')
2317
2318oxm.subtypes[204292] = bsn_udf7
2319
2320class bsn_udf7_masked(oxm):
2321 type_len = 204552
2322
2323 def __init__(self, value=None, value_mask=None):
2324 if value != None:
2325 self.value = value
2326 else:
2327 self.value = 0
2328 if value_mask != None:
2329 self.value_mask = value_mask
2330 else:
2331 self.value_mask = 0
2332 return
2333
2334 def pack(self):
2335 packed = []
2336 packed.append(struct.pack("!L", self.type_len))
2337 packed.append(struct.pack("!L", self.value))
2338 packed.append(struct.pack("!L", self.value_mask))
2339 return ''.join(packed)
2340
2341 @staticmethod
2342 def unpack(reader):
2343 obj = bsn_udf7_masked()
2344 _type_len = reader.read("!L")[0]
2345 assert(_type_len == 204552)
2346 obj.value = reader.read("!L")[0]
2347 obj.value_mask = reader.read("!L")[0]
2348 return obj
2349
2350 def __eq__(self, other):
2351 if type(self) != type(other): return False
2352 if self.value != other.value: return False
2353 if self.value_mask != other.value_mask: return False
2354 return True
2355
2356 def pretty_print(self, q):
2357 q.text("bsn_udf7_masked {")
2358 with q.group():
2359 with q.indent(2):
2360 q.breakable()
2361 q.text("value = ");
2362 q.text("%#x" % self.value)
2363 q.text(","); q.breakable()
2364 q.text("value_mask = ");
2365 q.text("%#x" % self.value_mask)
2366 q.breakable()
2367 q.text('}')
2368
2369oxm.subtypes[204552] = bsn_udf7_masked
2370
2371class bsn_vfi(oxm):
2372 type_len = 209410
2373
2374 def __init__(self, value=None):
2375 if value != None:
2376 self.value = value
2377 else:
2378 self.value = 0
2379 return
2380
2381 def pack(self):
2382 packed = []
2383 packed.append(struct.pack("!L", self.type_len))
2384 packed.append(struct.pack("!H", self.value))
2385 return ''.join(packed)
2386
2387 @staticmethod
2388 def unpack(reader):
2389 obj = bsn_vfi()
2390 _type_len = reader.read("!L")[0]
2391 assert(_type_len == 209410)
2392 obj.value = reader.read("!H")[0]
2393 return obj
2394
2395 def __eq__(self, other):
2396 if type(self) != type(other): return False
2397 if self.value != other.value: return False
2398 return True
2399
2400 def pretty_print(self, q):
2401 q.text("bsn_vfi {")
2402 with q.group():
2403 with q.indent(2):
2404 q.breakable()
2405 q.text("value = ");
2406 q.text("%#x" % self.value)
2407 q.breakable()
2408 q.text('}')
2409
2410oxm.subtypes[209410] = bsn_vfi
2411
2412class bsn_vfi_masked(oxm):
2413 type_len = 209668
2414
2415 def __init__(self, value=None, value_mask=None):
2416 if value != None:
2417 self.value = value
2418 else:
2419 self.value = 0
2420 if value_mask != None:
2421 self.value_mask = value_mask
2422 else:
2423 self.value_mask = 0
2424 return
2425
2426 def pack(self):
2427 packed = []
2428 packed.append(struct.pack("!L", self.type_len))
2429 packed.append(struct.pack("!H", self.value))
2430 packed.append(struct.pack("!H", self.value_mask))
2431 return ''.join(packed)
2432
2433 @staticmethod
2434 def unpack(reader):
2435 obj = bsn_vfi_masked()
2436 _type_len = reader.read("!L")[0]
2437 assert(_type_len == 209668)
2438 obj.value = reader.read("!H")[0]
2439 obj.value_mask = reader.read("!H")[0]
2440 return obj
2441
2442 def __eq__(self, other):
2443 if type(self) != type(other): return False
2444 if self.value != other.value: return False
2445 if self.value_mask != other.value_mask: return False
2446 return True
2447
2448 def pretty_print(self, q):
2449 q.text("bsn_vfi_masked {")
2450 with q.group():
2451 with q.indent(2):
2452 q.breakable()
2453 q.text("value = ");
2454 q.text("%#x" % self.value)
2455 q.text(","); q.breakable()
2456 q.text("value_mask = ");
2457 q.text("%#x" % self.value_mask)
2458 q.breakable()
2459 q.text('}')
2460
2461oxm.subtypes[209668] = bsn_vfi_masked
2462
2463class bsn_vlan_xlate_port_group_id(oxm):
2464 type_len = 205316
2465
2466 def __init__(self, value=None):
2467 if value != None:
2468 self.value = value
2469 else:
2470 self.value = 0
2471 return
2472
2473 def pack(self):
2474 packed = []
2475 packed.append(struct.pack("!L", self.type_len))
2476 packed.append(struct.pack("!L", self.value))
2477 return ''.join(packed)
2478
2479 @staticmethod
2480 def unpack(reader):
2481 obj = bsn_vlan_xlate_port_group_id()
2482 _type_len = reader.read("!L")[0]
2483 assert(_type_len == 205316)
2484 obj.value = reader.read("!L")[0]
2485 return obj
2486
2487 def __eq__(self, other):
2488 if type(self) != type(other): return False
2489 if self.value != other.value: return False
2490 return True
2491
2492 def pretty_print(self, q):
2493 q.text("bsn_vlan_xlate_port_group_id {")
2494 with q.group():
2495 with q.indent(2):
2496 q.breakable()
2497 q.text("value = ");
2498 q.text("%#x" % self.value)
2499 q.breakable()
2500 q.text('}')
2501
2502oxm.subtypes[205316] = bsn_vlan_xlate_port_group_id
2503
2504class bsn_vlan_xlate_port_group_id_masked(oxm):
2505 type_len = 205576
2506
2507 def __init__(self, value=None, value_mask=None):
2508 if value != None:
2509 self.value = value
2510 else:
2511 self.value = 0
2512 if value_mask != None:
2513 self.value_mask = value_mask
2514 else:
2515 self.value_mask = 0
2516 return
2517
2518 def pack(self):
2519 packed = []
2520 packed.append(struct.pack("!L", self.type_len))
2521 packed.append(struct.pack("!L", self.value))
2522 packed.append(struct.pack("!L", self.value_mask))
2523 return ''.join(packed)
2524
2525 @staticmethod
2526 def unpack(reader):
2527 obj = bsn_vlan_xlate_port_group_id_masked()
2528 _type_len = reader.read("!L")[0]
2529 assert(_type_len == 205576)
2530 obj.value = reader.read("!L")[0]
2531 obj.value_mask = reader.read("!L")[0]
2532 return obj
2533
2534 def __eq__(self, other):
2535 if type(self) != type(other): return False
2536 if self.value != other.value: return False
2537 if self.value_mask != other.value_mask: return False
2538 return True
2539
2540 def pretty_print(self, q):
2541 q.text("bsn_vlan_xlate_port_group_id_masked {")
2542 with q.group():
2543 with q.indent(2):
2544 q.breakable()
2545 q.text("value = ");
2546 q.text("%#x" % self.value)
2547 q.text(","); q.breakable()
2548 q.text("value_mask = ");
2549 q.text("%#x" % self.value_mask)
2550 q.breakable()
2551 q.text('}')
2552
2553oxm.subtypes[205576] = bsn_vlan_xlate_port_group_id_masked
2554
2555class bsn_vrf(oxm):
2556 type_len = 197636
2557
2558 def __init__(self, value=None):
2559 if value != None:
2560 self.value = value
2561 else:
2562 self.value = 0
2563 return
2564
2565 def pack(self):
2566 packed = []
2567 packed.append(struct.pack("!L", self.type_len))
2568 packed.append(struct.pack("!L", self.value))
2569 return ''.join(packed)
2570
2571 @staticmethod
2572 def unpack(reader):
2573 obj = bsn_vrf()
2574 _type_len = reader.read("!L")[0]
2575 assert(_type_len == 197636)
2576 obj.value = reader.read("!L")[0]
2577 return obj
2578
2579 def __eq__(self, other):
2580 if type(self) != type(other): return False
2581 if self.value != other.value: return False
2582 return True
2583
2584 def pretty_print(self, q):
2585 q.text("bsn_vrf {")
2586 with q.group():
2587 with q.indent(2):
2588 q.breakable()
2589 q.text("value = ");
2590 q.text("%#x" % self.value)
2591 q.breakable()
2592 q.text('}')
2593
2594oxm.subtypes[197636] = bsn_vrf
2595
2596class bsn_vrf_masked(oxm):
2597 type_len = 197896
2598
2599 def __init__(self, value=None, value_mask=None):
2600 if value != None:
2601 self.value = value
2602 else:
2603 self.value = 0
2604 if value_mask != None:
2605 self.value_mask = value_mask
2606 else:
2607 self.value_mask = 0
2608 return
2609
2610 def pack(self):
2611 packed = []
2612 packed.append(struct.pack("!L", self.type_len))
2613 packed.append(struct.pack("!L", self.value))
2614 packed.append(struct.pack("!L", self.value_mask))
2615 return ''.join(packed)
2616
2617 @staticmethod
2618 def unpack(reader):
2619 obj = bsn_vrf_masked()
2620 _type_len = reader.read("!L")[0]
2621 assert(_type_len == 197896)
2622 obj.value = reader.read("!L")[0]
2623 obj.value_mask = reader.read("!L")[0]
2624 return obj
2625
2626 def __eq__(self, other):
2627 if type(self) != type(other): return False
2628 if self.value != other.value: return False
2629 if self.value_mask != other.value_mask: return False
2630 return True
2631
2632 def pretty_print(self, q):
2633 q.text("bsn_vrf_masked {")
2634 with q.group():
2635 with q.indent(2):
2636 q.breakable()
2637 q.text("value = ");
2638 q.text("%#x" % self.value)
2639 q.text(","); q.breakable()
2640 q.text("value_mask = ");
2641 q.text("%#x" % self.value_mask)
2642 q.breakable()
2643 q.text('}')
2644
2645oxm.subtypes[197896] = bsn_vrf_masked
2646
2647class bsn_vxlan_network_id(oxm):
2648 type_len = 207364
2649
2650 def __init__(self, value=None):
2651 if value != None:
2652 self.value = value
2653 else:
2654 self.value = 0
2655 return
2656
2657 def pack(self):
2658 packed = []
2659 packed.append(struct.pack("!L", self.type_len))
2660 packed.append(struct.pack("!L", self.value))
2661 return ''.join(packed)
2662
2663 @staticmethod
2664 def unpack(reader):
2665 obj = bsn_vxlan_network_id()
2666 _type_len = reader.read("!L")[0]
2667 assert(_type_len == 207364)
2668 obj.value = reader.read("!L")[0]
2669 return obj
2670
2671 def __eq__(self, other):
2672 if type(self) != type(other): return False
2673 if self.value != other.value: return False
2674 return True
2675
2676 def pretty_print(self, q):
2677 q.text("bsn_vxlan_network_id {")
2678 with q.group():
2679 with q.indent(2):
2680 q.breakable()
2681 q.text("value = ");
2682 q.text("%#x" % self.value)
2683 q.breakable()
2684 q.text('}')
2685
2686oxm.subtypes[207364] = bsn_vxlan_network_id
2687
2688class bsn_vxlan_network_id_masked(oxm):
2689 type_len = 207624
2690
2691 def __init__(self, value=None, value_mask=None):
2692 if value != None:
2693 self.value = value
2694 else:
2695 self.value = 0
2696 if value_mask != None:
2697 self.value_mask = value_mask
2698 else:
2699 self.value_mask = 0
2700 return
2701
2702 def pack(self):
2703 packed = []
2704 packed.append(struct.pack("!L", self.type_len))
2705 packed.append(struct.pack("!L", self.value))
2706 packed.append(struct.pack("!L", self.value_mask))
2707 return ''.join(packed)
2708
2709 @staticmethod
2710 def unpack(reader):
2711 obj = bsn_vxlan_network_id_masked()
2712 _type_len = reader.read("!L")[0]
2713 assert(_type_len == 207624)
2714 obj.value = reader.read("!L")[0]
2715 obj.value_mask = reader.read("!L")[0]
2716 return obj
2717
2718 def __eq__(self, other):
2719 if type(self) != type(other): return False
2720 if self.value != other.value: return False
2721 if self.value_mask != other.value_mask: return False
2722 return True
2723
2724 def pretty_print(self, q):
2725 q.text("bsn_vxlan_network_id_masked {")
2726 with q.group():
2727 with q.indent(2):
2728 q.breakable()
2729 q.text("value = ");
2730 q.text("%#x" % self.value)
2731 q.text(","); q.breakable()
2732 q.text("value_mask = ");
2733 q.text("%#x" % self.value_mask)
2734 q.breakable()
2735 q.text('}')
2736
2737oxm.subtypes[207624] = bsn_vxlan_network_id_masked
2738
2739class eth_dst(oxm):
2740 type_len = 2147485190
2741
2742 def __init__(self, value=None):
2743 if value != None:
2744 self.value = value
2745 else:
2746 self.value = [0,0,0,0,0,0]
2747 return
2748
2749 def pack(self):
2750 packed = []
2751 packed.append(struct.pack("!L", self.type_len))
2752 packed.append(struct.pack("!6B", *self.value))
2753 return ''.join(packed)
2754
2755 @staticmethod
2756 def unpack(reader):
2757 obj = eth_dst()
2758 _type_len = reader.read("!L")[0]
2759 assert(_type_len == 2147485190)
2760 obj.value = list(reader.read('!6B'))
2761 return obj
2762
2763 def __eq__(self, other):
2764 if type(self) != type(other): return False
2765 if self.value != other.value: return False
2766 return True
2767
2768 def pretty_print(self, q):
2769 q.text("eth_dst {")
2770 with q.group():
2771 with q.indent(2):
2772 q.breakable()
2773 q.text("value = ");
2774 q.text(util.pretty_mac(self.value))
2775 q.breakable()
2776 q.text('}')
2777
2778oxm.subtypes[2147485190] = eth_dst
2779
2780class eth_dst_masked(oxm):
2781 type_len = 2147485452
2782
2783 def __init__(self, value=None, value_mask=None):
2784 if value != None:
2785 self.value = value
2786 else:
2787 self.value = [0,0,0,0,0,0]
2788 if value_mask != None:
2789 self.value_mask = value_mask
2790 else:
2791 self.value_mask = [0,0,0,0,0,0]
2792 return
2793
2794 def pack(self):
2795 packed = []
2796 packed.append(struct.pack("!L", self.type_len))
2797 packed.append(struct.pack("!6B", *self.value))
2798 packed.append(struct.pack("!6B", *self.value_mask))
2799 return ''.join(packed)
2800
2801 @staticmethod
2802 def unpack(reader):
2803 obj = eth_dst_masked()
2804 _type_len = reader.read("!L")[0]
2805 assert(_type_len == 2147485452)
2806 obj.value = list(reader.read('!6B'))
2807 obj.value_mask = list(reader.read('!6B'))
2808 return obj
2809
2810 def __eq__(self, other):
2811 if type(self) != type(other): return False
2812 if self.value != other.value: return False
2813 if self.value_mask != other.value_mask: return False
2814 return True
2815
2816 def pretty_print(self, q):
2817 q.text("eth_dst_masked {")
2818 with q.group():
2819 with q.indent(2):
2820 q.breakable()
2821 q.text("value = ");
2822 q.text(util.pretty_mac(self.value))
2823 q.text(","); q.breakable()
2824 q.text("value_mask = ");
2825 q.text(util.pretty_mac(self.value_mask))
2826 q.breakable()
2827 q.text('}')
2828
2829oxm.subtypes[2147485452] = eth_dst_masked
2830
2831class eth_src(oxm):
2832 type_len = 2147485702
2833
2834 def __init__(self, value=None):
2835 if value != None:
2836 self.value = value
2837 else:
2838 self.value = [0,0,0,0,0,0]
2839 return
2840
2841 def pack(self):
2842 packed = []
2843 packed.append(struct.pack("!L", self.type_len))
2844 packed.append(struct.pack("!6B", *self.value))
2845 return ''.join(packed)
2846
2847 @staticmethod
2848 def unpack(reader):
2849 obj = eth_src()
2850 _type_len = reader.read("!L")[0]
2851 assert(_type_len == 2147485702)
2852 obj.value = list(reader.read('!6B'))
2853 return obj
2854
2855 def __eq__(self, other):
2856 if type(self) != type(other): return False
2857 if self.value != other.value: return False
2858 return True
2859
2860 def pretty_print(self, q):
2861 q.text("eth_src {")
2862 with q.group():
2863 with q.indent(2):
2864 q.breakable()
2865 q.text("value = ");
2866 q.text(util.pretty_mac(self.value))
2867 q.breakable()
2868 q.text('}')
2869
2870oxm.subtypes[2147485702] = eth_src
2871
2872class eth_src_masked(oxm):
2873 type_len = 2147485964
2874
2875 def __init__(self, value=None, value_mask=None):
2876 if value != None:
2877 self.value = value
2878 else:
2879 self.value = [0,0,0,0,0,0]
2880 if value_mask != None:
2881 self.value_mask = value_mask
2882 else:
2883 self.value_mask = [0,0,0,0,0,0]
2884 return
2885
2886 def pack(self):
2887 packed = []
2888 packed.append(struct.pack("!L", self.type_len))
2889 packed.append(struct.pack("!6B", *self.value))
2890 packed.append(struct.pack("!6B", *self.value_mask))
2891 return ''.join(packed)
2892
2893 @staticmethod
2894 def unpack(reader):
2895 obj = eth_src_masked()
2896 _type_len = reader.read("!L")[0]
2897 assert(_type_len == 2147485964)
2898 obj.value = list(reader.read('!6B'))
2899 obj.value_mask = list(reader.read('!6B'))
2900 return obj
2901
2902 def __eq__(self, other):
2903 if type(self) != type(other): return False
2904 if self.value != other.value: return False
2905 if self.value_mask != other.value_mask: return False
2906 return True
2907
2908 def pretty_print(self, q):
2909 q.text("eth_src_masked {")
2910 with q.group():
2911 with q.indent(2):
2912 q.breakable()
2913 q.text("value = ");
2914 q.text(util.pretty_mac(self.value))
2915 q.text(","); q.breakable()
2916 q.text("value_mask = ");
2917 q.text(util.pretty_mac(self.value_mask))
2918 q.breakable()
2919 q.text('}')
2920
2921oxm.subtypes[2147485964] = eth_src_masked
2922
2923class eth_type(oxm):
2924 type_len = 2147486210
2925
2926 def __init__(self, value=None):
2927 if value != None:
2928 self.value = value
2929 else:
2930 self.value = 0
2931 return
2932
2933 def pack(self):
2934 packed = []
2935 packed.append(struct.pack("!L", self.type_len))
2936 packed.append(struct.pack("!H", self.value))
2937 return ''.join(packed)
2938
2939 @staticmethod
2940 def unpack(reader):
2941 obj = eth_type()
2942 _type_len = reader.read("!L")[0]
2943 assert(_type_len == 2147486210)
2944 obj.value = reader.read("!H")[0]
2945 return obj
2946
2947 def __eq__(self, other):
2948 if type(self) != type(other): return False
2949 if self.value != other.value: return False
2950 return True
2951
2952 def pretty_print(self, q):
2953 q.text("eth_type {")
2954 with q.group():
2955 with q.indent(2):
2956 q.breakable()
2957 q.text("value = ");
2958 q.text("%#x" % self.value)
2959 q.breakable()
2960 q.text('}')
2961
2962oxm.subtypes[2147486210] = eth_type
2963
2964class eth_type_masked(oxm):
2965 type_len = 2147486468
2966
2967 def __init__(self, value=None, value_mask=None):
2968 if value != None:
2969 self.value = value
2970 else:
2971 self.value = 0
2972 if value_mask != None:
2973 self.value_mask = value_mask
2974 else:
2975 self.value_mask = 0
2976 return
2977
2978 def pack(self):
2979 packed = []
2980 packed.append(struct.pack("!L", self.type_len))
2981 packed.append(struct.pack("!H", self.value))
2982 packed.append(struct.pack("!H", self.value_mask))
2983 return ''.join(packed)
2984
2985 @staticmethod
2986 def unpack(reader):
2987 obj = eth_type_masked()
2988 _type_len = reader.read("!L")[0]
2989 assert(_type_len == 2147486468)
2990 obj.value = reader.read("!H")[0]
2991 obj.value_mask = reader.read("!H")[0]
2992 return obj
2993
2994 def __eq__(self, other):
2995 if type(self) != type(other): return False
2996 if self.value != other.value: return False
2997 if self.value_mask != other.value_mask: return False
2998 return True
2999
3000 def pretty_print(self, q):
3001 q.text("eth_type_masked {")
3002 with q.group():
3003 with q.indent(2):
3004 q.breakable()
3005 q.text("value = ");
3006 q.text("%#x" % self.value)
3007 q.text(","); q.breakable()
3008 q.text("value_mask = ");
3009 q.text("%#x" % self.value_mask)
3010 q.breakable()
3011 q.text('}')
3012
3013oxm.subtypes[2147486468] = eth_type_masked
3014
3015class icmpv4_code(oxm):
3016 type_len = 2147493889
3017
3018 def __init__(self, value=None):
3019 if value != None:
3020 self.value = value
3021 else:
3022 self.value = 0
3023 return
3024
3025 def pack(self):
3026 packed = []
3027 packed.append(struct.pack("!L", self.type_len))
3028 packed.append(struct.pack("!B", self.value))
3029 return ''.join(packed)
3030
3031 @staticmethod
3032 def unpack(reader):
3033 obj = icmpv4_code()
3034 _type_len = reader.read("!L")[0]
3035 assert(_type_len == 2147493889)
3036 obj.value = reader.read("!B")[0]
3037 return obj
3038
3039 def __eq__(self, other):
3040 if type(self) != type(other): return False
3041 if self.value != other.value: return False
3042 return True
3043
3044 def pretty_print(self, q):
3045 q.text("icmpv4_code {")
3046 with q.group():
3047 with q.indent(2):
3048 q.breakable()
3049 q.text("value = ");
3050 q.text("%#x" % self.value)
3051 q.breakable()
3052 q.text('}')
3053
3054oxm.subtypes[2147493889] = icmpv4_code
3055
3056class icmpv4_code_masked(oxm):
3057 type_len = 2147494146
3058
3059 def __init__(self, value=None, value_mask=None):
3060 if value != None:
3061 self.value = value
3062 else:
3063 self.value = 0
3064 if value_mask != None:
3065 self.value_mask = value_mask
3066 else:
3067 self.value_mask = 0
3068 return
3069
3070 def pack(self):
3071 packed = []
3072 packed.append(struct.pack("!L", self.type_len))
3073 packed.append(struct.pack("!B", self.value))
3074 packed.append(struct.pack("!B", self.value_mask))
3075 return ''.join(packed)
3076
3077 @staticmethod
3078 def unpack(reader):
3079 obj = icmpv4_code_masked()
3080 _type_len = reader.read("!L")[0]
3081 assert(_type_len == 2147494146)
3082 obj.value = reader.read("!B")[0]
3083 obj.value_mask = reader.read("!B")[0]
3084 return obj
3085
3086 def __eq__(self, other):
3087 if type(self) != type(other): return False
3088 if self.value != other.value: return False
3089 if self.value_mask != other.value_mask: return False
3090 return True
3091
3092 def pretty_print(self, q):
3093 q.text("icmpv4_code_masked {")
3094 with q.group():
3095 with q.indent(2):
3096 q.breakable()
3097 q.text("value = ");
3098 q.text("%#x" % self.value)
3099 q.text(","); q.breakable()
3100 q.text("value_mask = ");
3101 q.text("%#x" % self.value_mask)
3102 q.breakable()
3103 q.text('}')
3104
3105oxm.subtypes[2147494146] = icmpv4_code_masked
3106
3107class icmpv4_type(oxm):
3108 type_len = 2147493377
3109
3110 def __init__(self, value=None):
3111 if value != None:
3112 self.value = value
3113 else:
3114 self.value = 0
3115 return
3116
3117 def pack(self):
3118 packed = []
3119 packed.append(struct.pack("!L", self.type_len))
3120 packed.append(struct.pack("!B", self.value))
3121 return ''.join(packed)
3122
3123 @staticmethod
3124 def unpack(reader):
3125 obj = icmpv4_type()
3126 _type_len = reader.read("!L")[0]
3127 assert(_type_len == 2147493377)
3128 obj.value = reader.read("!B")[0]
3129 return obj
3130
3131 def __eq__(self, other):
3132 if type(self) != type(other): return False
3133 if self.value != other.value: return False
3134 return True
3135
3136 def pretty_print(self, q):
3137 q.text("icmpv4_type {")
3138 with q.group():
3139 with q.indent(2):
3140 q.breakable()
3141 q.text("value = ");
3142 q.text("%#x" % self.value)
3143 q.breakable()
3144 q.text('}')
3145
3146oxm.subtypes[2147493377] = icmpv4_type
3147
3148class icmpv4_type_masked(oxm):
3149 type_len = 2147493634
3150
3151 def __init__(self, value=None, value_mask=None):
3152 if value != None:
3153 self.value = value
3154 else:
3155 self.value = 0
3156 if value_mask != None:
3157 self.value_mask = value_mask
3158 else:
3159 self.value_mask = 0
3160 return
3161
3162 def pack(self):
3163 packed = []
3164 packed.append(struct.pack("!L", self.type_len))
3165 packed.append(struct.pack("!B", self.value))
3166 packed.append(struct.pack("!B", self.value_mask))
3167 return ''.join(packed)
3168
3169 @staticmethod
3170 def unpack(reader):
3171 obj = icmpv4_type_masked()
3172 _type_len = reader.read("!L")[0]
3173 assert(_type_len == 2147493634)
3174 obj.value = reader.read("!B")[0]
3175 obj.value_mask = reader.read("!B")[0]
3176 return obj
3177
3178 def __eq__(self, other):
3179 if type(self) != type(other): return False
3180 if self.value != other.value: return False
3181 if self.value_mask != other.value_mask: return False
3182 return True
3183
3184 def pretty_print(self, q):
3185 q.text("icmpv4_type_masked {")
3186 with q.group():
3187 with q.indent(2):
3188 q.breakable()
3189 q.text("value = ");
3190 q.text("%#x" % self.value)
3191 q.text(","); q.breakable()
3192 q.text("value_mask = ");
3193 q.text("%#x" % self.value_mask)
3194 q.breakable()
3195 q.text('}')
3196
3197oxm.subtypes[2147493634] = icmpv4_type_masked
3198
3199class icmpv6_code(oxm):
3200 type_len = 2147499009
3201
3202 def __init__(self, value=None):
3203 if value != None:
3204 self.value = value
3205 else:
3206 self.value = 0
3207 return
3208
3209 def pack(self):
3210 packed = []
3211 packed.append(struct.pack("!L", self.type_len))
3212 packed.append(struct.pack("!B", self.value))
3213 return ''.join(packed)
3214
3215 @staticmethod
3216 def unpack(reader):
3217 obj = icmpv6_code()
3218 _type_len = reader.read("!L")[0]
3219 assert(_type_len == 2147499009)
3220 obj.value = reader.read("!B")[0]
3221 return obj
3222
3223 def __eq__(self, other):
3224 if type(self) != type(other): return False
3225 if self.value != other.value: return False
3226 return True
3227
3228 def pretty_print(self, q):
3229 q.text("icmpv6_code {")
3230 with q.group():
3231 with q.indent(2):
3232 q.breakable()
3233 q.text("value = ");
3234 q.text("%#x" % self.value)
3235 q.breakable()
3236 q.text('}')
3237
3238oxm.subtypes[2147499009] = icmpv6_code
3239
3240class icmpv6_code_masked(oxm):
3241 type_len = 2147499266
3242
3243 def __init__(self, value=None, value_mask=None):
3244 if value != None:
3245 self.value = value
3246 else:
3247 self.value = 0
3248 if value_mask != None:
3249 self.value_mask = value_mask
3250 else:
3251 self.value_mask = 0
3252 return
3253
3254 def pack(self):
3255 packed = []
3256 packed.append(struct.pack("!L", self.type_len))
3257 packed.append(struct.pack("!B", self.value))
3258 packed.append(struct.pack("!B", self.value_mask))
3259 return ''.join(packed)
3260
3261 @staticmethod
3262 def unpack(reader):
3263 obj = icmpv6_code_masked()
3264 _type_len = reader.read("!L")[0]
3265 assert(_type_len == 2147499266)
3266 obj.value = reader.read("!B")[0]
3267 obj.value_mask = reader.read("!B")[0]
3268 return obj
3269
3270 def __eq__(self, other):
3271 if type(self) != type(other): return False
3272 if self.value != other.value: return False
3273 if self.value_mask != other.value_mask: return False
3274 return True
3275
3276 def pretty_print(self, q):
3277 q.text("icmpv6_code_masked {")
3278 with q.group():
3279 with q.indent(2):
3280 q.breakable()
3281 q.text("value = ");
3282 q.text("%#x" % self.value)
3283 q.text(","); q.breakable()
3284 q.text("value_mask = ");
3285 q.text("%#x" % self.value_mask)
3286 q.breakable()
3287 q.text('}')
3288
3289oxm.subtypes[2147499266] = icmpv6_code_masked
3290
3291class icmpv6_type(oxm):
3292 type_len = 2147498497
3293
3294 def __init__(self, value=None):
3295 if value != None:
3296 self.value = value
3297 else:
3298 self.value = 0
3299 return
3300
3301 def pack(self):
3302 packed = []
3303 packed.append(struct.pack("!L", self.type_len))
3304 packed.append(struct.pack("!B", self.value))
3305 return ''.join(packed)
3306
3307 @staticmethod
3308 def unpack(reader):
3309 obj = icmpv6_type()
3310 _type_len = reader.read("!L")[0]
3311 assert(_type_len == 2147498497)
3312 obj.value = reader.read("!B")[0]
3313 return obj
3314
3315 def __eq__(self, other):
3316 if type(self) != type(other): return False
3317 if self.value != other.value: return False
3318 return True
3319
3320 def pretty_print(self, q):
3321 q.text("icmpv6_type {")
3322 with q.group():
3323 with q.indent(2):
3324 q.breakable()
3325 q.text("value = ");
3326 q.text("%#x" % self.value)
3327 q.breakable()
3328 q.text('}')
3329
3330oxm.subtypes[2147498497] = icmpv6_type
3331
3332class icmpv6_type_masked(oxm):
3333 type_len = 2147498754
3334
3335 def __init__(self, value=None, value_mask=None):
3336 if value != None:
3337 self.value = value
3338 else:
3339 self.value = 0
3340 if value_mask != None:
3341 self.value_mask = value_mask
3342 else:
3343 self.value_mask = 0
3344 return
3345
3346 def pack(self):
3347 packed = []
3348 packed.append(struct.pack("!L", self.type_len))
3349 packed.append(struct.pack("!B", self.value))
3350 packed.append(struct.pack("!B", self.value_mask))
3351 return ''.join(packed)
3352
3353 @staticmethod
3354 def unpack(reader):
3355 obj = icmpv6_type_masked()
3356 _type_len = reader.read("!L")[0]
3357 assert(_type_len == 2147498754)
3358 obj.value = reader.read("!B")[0]
3359 obj.value_mask = reader.read("!B")[0]
3360 return obj
3361
3362 def __eq__(self, other):
3363 if type(self) != type(other): return False
3364 if self.value != other.value: return False
3365 if self.value_mask != other.value_mask: return False
3366 return True
3367
3368 def pretty_print(self, q):
3369 q.text("icmpv6_type_masked {")
3370 with q.group():
3371 with q.indent(2):
3372 q.breakable()
3373 q.text("value = ");
3374 q.text("%#x" % self.value)
3375 q.text(","); q.breakable()
3376 q.text("value_mask = ");
3377 q.text("%#x" % self.value_mask)
3378 q.breakable()
3379 q.text('}')
3380
3381oxm.subtypes[2147498754] = icmpv6_type_masked
3382
3383class in_phy_port(oxm):
3384 type_len = 2147484164
3385
3386 def __init__(self, value=None):
3387 if value != None:
3388 self.value = value
3389 else:
3390 self.value = 0
3391 return
3392
3393 def pack(self):
3394 packed = []
3395 packed.append(struct.pack("!L", self.type_len))
3396 packed.append(util.pack_port_no(self.value))
3397 return ''.join(packed)
3398
3399 @staticmethod
3400 def unpack(reader):
3401 obj = in_phy_port()
3402 _type_len = reader.read("!L")[0]
3403 assert(_type_len == 2147484164)
3404 obj.value = util.unpack_port_no(reader)
3405 return obj
3406
3407 def __eq__(self, other):
3408 if type(self) != type(other): return False
3409 if self.value != other.value: return False
3410 return True
3411
3412 def pretty_print(self, q):
3413 q.text("in_phy_port {")
3414 with q.group():
3415 with q.indent(2):
3416 q.breakable()
3417 q.text("value = ");
3418 q.text(util.pretty_port(self.value))
3419 q.breakable()
3420 q.text('}')
3421
3422oxm.subtypes[2147484164] = in_phy_port
3423
3424class in_phy_port_masked(oxm):
3425 type_len = 2147484424
3426
3427 def __init__(self, value=None, value_mask=None):
3428 if value != None:
3429 self.value = value
3430 else:
3431 self.value = 0
3432 if value_mask != None:
3433 self.value_mask = value_mask
3434 else:
3435 self.value_mask = 0
3436 return
3437
3438 def pack(self):
3439 packed = []
3440 packed.append(struct.pack("!L", self.type_len))
3441 packed.append(util.pack_port_no(self.value))
3442 packed.append(util.pack_port_no(self.value_mask))
3443 return ''.join(packed)
3444
3445 @staticmethod
3446 def unpack(reader):
3447 obj = in_phy_port_masked()
3448 _type_len = reader.read("!L")[0]
3449 assert(_type_len == 2147484424)
3450 obj.value = util.unpack_port_no(reader)
3451 obj.value_mask = util.unpack_port_no(reader)
3452 return obj
3453
3454 def __eq__(self, other):
3455 if type(self) != type(other): return False
3456 if self.value != other.value: return False
3457 if self.value_mask != other.value_mask: return False
3458 return True
3459
3460 def pretty_print(self, q):
3461 q.text("in_phy_port_masked {")
3462 with q.group():
3463 with q.indent(2):
3464 q.breakable()
3465 q.text("value = ");
3466 q.text(util.pretty_port(self.value))
3467 q.text(","); q.breakable()
3468 q.text("value_mask = ");
3469 q.text(util.pretty_port(self.value_mask))
3470 q.breakable()
3471 q.text('}')
3472
3473oxm.subtypes[2147484424] = in_phy_port_masked
3474
3475class in_port(oxm):
3476 type_len = 2147483652
3477
3478 def __init__(self, value=None):
3479 if value != None:
3480 self.value = value
3481 else:
3482 self.value = 0
3483 return
3484
3485 def pack(self):
3486 packed = []
3487 packed.append(struct.pack("!L", self.type_len))
3488 packed.append(util.pack_port_no(self.value))
3489 return ''.join(packed)
3490
3491 @staticmethod
3492 def unpack(reader):
3493 obj = in_port()
3494 _type_len = reader.read("!L")[0]
3495 assert(_type_len == 2147483652)
3496 obj.value = util.unpack_port_no(reader)
3497 return obj
3498
3499 def __eq__(self, other):
3500 if type(self) != type(other): return False
3501 if self.value != other.value: return False
3502 return True
3503
3504 def pretty_print(self, q):
3505 q.text("in_port {")
3506 with q.group():
3507 with q.indent(2):
3508 q.breakable()
3509 q.text("value = ");
3510 q.text(util.pretty_port(self.value))
3511 q.breakable()
3512 q.text('}')
3513
3514oxm.subtypes[2147483652] = in_port
3515
3516class in_port_masked(oxm):
3517 type_len = 2147483912
3518
3519 def __init__(self, value=None, value_mask=None):
3520 if value != None:
3521 self.value = value
3522 else:
3523 self.value = 0
3524 if value_mask != None:
3525 self.value_mask = value_mask
3526 else:
3527 self.value_mask = 0
3528 return
3529
3530 def pack(self):
3531 packed = []
3532 packed.append(struct.pack("!L", self.type_len))
3533 packed.append(util.pack_port_no(self.value))
3534 packed.append(util.pack_port_no(self.value_mask))
3535 return ''.join(packed)
3536
3537 @staticmethod
3538 def unpack(reader):
3539 obj = in_port_masked()
3540 _type_len = reader.read("!L")[0]
3541 assert(_type_len == 2147483912)
3542 obj.value = util.unpack_port_no(reader)
3543 obj.value_mask = util.unpack_port_no(reader)
3544 return obj
3545
3546 def __eq__(self, other):
3547 if type(self) != type(other): return False
3548 if self.value != other.value: return False
3549 if self.value_mask != other.value_mask: return False
3550 return True
3551
3552 def pretty_print(self, q):
3553 q.text("in_port_masked {")
3554 with q.group():
3555 with q.indent(2):
3556 q.breakable()
3557 q.text("value = ");
3558 q.text(util.pretty_port(self.value))
3559 q.text(","); q.breakable()
3560 q.text("value_mask = ");
3561 q.text(util.pretty_port(self.value_mask))
3562 q.breakable()
3563 q.text('}')
3564
3565oxm.subtypes[2147483912] = in_port_masked
3566
3567class ip_dscp(oxm):
3568 type_len = 2147487745
3569
3570 def __init__(self, value=None):
3571 if value != None:
3572 self.value = value
3573 else:
3574 self.value = 0
3575 return
3576
3577 def pack(self):
3578 packed = []
3579 packed.append(struct.pack("!L", self.type_len))
3580 packed.append(struct.pack("!B", self.value))
3581 return ''.join(packed)
3582
3583 @staticmethod
3584 def unpack(reader):
3585 obj = ip_dscp()
3586 _type_len = reader.read("!L")[0]
3587 assert(_type_len == 2147487745)
3588 obj.value = reader.read("!B")[0]
3589 return obj
3590
3591 def __eq__(self, other):
3592 if type(self) != type(other): return False
3593 if self.value != other.value: return False
3594 return True
3595
3596 def pretty_print(self, q):
3597 q.text("ip_dscp {")
3598 with q.group():
3599 with q.indent(2):
3600 q.breakable()
3601 q.text("value = ");
3602 q.text("%#x" % self.value)
3603 q.breakable()
3604 q.text('}')
3605
3606oxm.subtypes[2147487745] = ip_dscp
3607
3608class ip_dscp_masked(oxm):
3609 type_len = 2147488002
3610
3611 def __init__(self, value=None, value_mask=None):
3612 if value != None:
3613 self.value = value
3614 else:
3615 self.value = 0
3616 if value_mask != None:
3617 self.value_mask = value_mask
3618 else:
3619 self.value_mask = 0
3620 return
3621
3622 def pack(self):
3623 packed = []
3624 packed.append(struct.pack("!L", self.type_len))
3625 packed.append(struct.pack("!B", self.value))
3626 packed.append(struct.pack("!B", self.value_mask))
3627 return ''.join(packed)
3628
3629 @staticmethod
3630 def unpack(reader):
3631 obj = ip_dscp_masked()
3632 _type_len = reader.read("!L")[0]
3633 assert(_type_len == 2147488002)
3634 obj.value = reader.read("!B")[0]
3635 obj.value_mask = reader.read("!B")[0]
3636 return obj
3637
3638 def __eq__(self, other):
3639 if type(self) != type(other): return False
3640 if self.value != other.value: return False
3641 if self.value_mask != other.value_mask: return False
3642 return True
3643
3644 def pretty_print(self, q):
3645 q.text("ip_dscp_masked {")
3646 with q.group():
3647 with q.indent(2):
3648 q.breakable()
3649 q.text("value = ");
3650 q.text("%#x" % self.value)
3651 q.text(","); q.breakable()
3652 q.text("value_mask = ");
3653 q.text("%#x" % self.value_mask)
3654 q.breakable()
3655 q.text('}')
3656
3657oxm.subtypes[2147488002] = ip_dscp_masked
3658
3659class ip_ecn(oxm):
3660 type_len = 2147488257
3661
3662 def __init__(self, value=None):
3663 if value != None:
3664 self.value = value
3665 else:
3666 self.value = 0
3667 return
3668
3669 def pack(self):
3670 packed = []
3671 packed.append(struct.pack("!L", self.type_len))
3672 packed.append(struct.pack("!B", self.value))
3673 return ''.join(packed)
3674
3675 @staticmethod
3676 def unpack(reader):
3677 obj = ip_ecn()
3678 _type_len = reader.read("!L")[0]
3679 assert(_type_len == 2147488257)
3680 obj.value = reader.read("!B")[0]
3681 return obj
3682
3683 def __eq__(self, other):
3684 if type(self) != type(other): return False
3685 if self.value != other.value: return False
3686 return True
3687
3688 def pretty_print(self, q):
3689 q.text("ip_ecn {")
3690 with q.group():
3691 with q.indent(2):
3692 q.breakable()
3693 q.text("value = ");
3694 q.text("%#x" % self.value)
3695 q.breakable()
3696 q.text('}')
3697
3698oxm.subtypes[2147488257] = ip_ecn
3699
3700class ip_ecn_masked(oxm):
3701 type_len = 2147488514
3702
3703 def __init__(self, value=None, value_mask=None):
3704 if value != None:
3705 self.value = value
3706 else:
3707 self.value = 0
3708 if value_mask != None:
3709 self.value_mask = value_mask
3710 else:
3711 self.value_mask = 0
3712 return
3713
3714 def pack(self):
3715 packed = []
3716 packed.append(struct.pack("!L", self.type_len))
3717 packed.append(struct.pack("!B", self.value))
3718 packed.append(struct.pack("!B", self.value_mask))
3719 return ''.join(packed)
3720
3721 @staticmethod
3722 def unpack(reader):
3723 obj = ip_ecn_masked()
3724 _type_len = reader.read("!L")[0]
3725 assert(_type_len == 2147488514)
3726 obj.value = reader.read("!B")[0]
3727 obj.value_mask = reader.read("!B")[0]
3728 return obj
3729
3730 def __eq__(self, other):
3731 if type(self) != type(other): return False
3732 if self.value != other.value: return False
3733 if self.value_mask != other.value_mask: return False
3734 return True
3735
3736 def pretty_print(self, q):
3737 q.text("ip_ecn_masked {")
3738 with q.group():
3739 with q.indent(2):
3740 q.breakable()
3741 q.text("value = ");
3742 q.text("%#x" % self.value)
3743 q.text(","); q.breakable()
3744 q.text("value_mask = ");
3745 q.text("%#x" % self.value_mask)
3746 q.breakable()
3747 q.text('}')
3748
3749oxm.subtypes[2147488514] = ip_ecn_masked
3750
3751class ip_proto(oxm):
3752 type_len = 2147488769
3753
3754 def __init__(self, value=None):
3755 if value != None:
3756 self.value = value
3757 else:
3758 self.value = 0
3759 return
3760
3761 def pack(self):
3762 packed = []
3763 packed.append(struct.pack("!L", self.type_len))
3764 packed.append(struct.pack("!B", self.value))
3765 return ''.join(packed)
3766
3767 @staticmethod
3768 def unpack(reader):
3769 obj = ip_proto()
3770 _type_len = reader.read("!L")[0]
3771 assert(_type_len == 2147488769)
3772 obj.value = reader.read("!B")[0]
3773 return obj
3774
3775 def __eq__(self, other):
3776 if type(self) != type(other): return False
3777 if self.value != other.value: return False
3778 return True
3779
3780 def pretty_print(self, q):
3781 q.text("ip_proto {")
3782 with q.group():
3783 with q.indent(2):
3784 q.breakable()
3785 q.text("value = ");
3786 q.text("%#x" % self.value)
3787 q.breakable()
3788 q.text('}')
3789
3790oxm.subtypes[2147488769] = ip_proto
3791
3792class ip_proto_masked(oxm):
3793 type_len = 2147489026
3794
3795 def __init__(self, value=None, value_mask=None):
3796 if value != None:
3797 self.value = value
3798 else:
3799 self.value = 0
3800 if value_mask != None:
3801 self.value_mask = value_mask
3802 else:
3803 self.value_mask = 0
3804 return
3805
3806 def pack(self):
3807 packed = []
3808 packed.append(struct.pack("!L", self.type_len))
3809 packed.append(struct.pack("!B", self.value))
3810 packed.append(struct.pack("!B", self.value_mask))
3811 return ''.join(packed)
3812
3813 @staticmethod
3814 def unpack(reader):
3815 obj = ip_proto_masked()
3816 _type_len = reader.read("!L")[0]
3817 assert(_type_len == 2147489026)
3818 obj.value = reader.read("!B")[0]
3819 obj.value_mask = reader.read("!B")[0]
3820 return obj
3821
3822 def __eq__(self, other):
3823 if type(self) != type(other): return False
3824 if self.value != other.value: return False
3825 if self.value_mask != other.value_mask: return False
3826 return True
3827
3828 def pretty_print(self, q):
3829 q.text("ip_proto_masked {")
3830 with q.group():
3831 with q.indent(2):
3832 q.breakable()
3833 q.text("value = ");
3834 q.text("%#x" % self.value)
3835 q.text(","); q.breakable()
3836 q.text("value_mask = ");
3837 q.text("%#x" % self.value_mask)
3838 q.breakable()
3839 q.text('}')
3840
3841oxm.subtypes[2147489026] = ip_proto_masked
3842
3843class ipv4_dst(oxm):
3844 type_len = 2147489796
3845
3846 def __init__(self, value=None):
3847 if value != None:
3848 self.value = value
3849 else:
3850 self.value = 0
3851 return
3852
3853 def pack(self):
3854 packed = []
3855 packed.append(struct.pack("!L", self.type_len))
3856 packed.append(struct.pack("!L", self.value))
3857 return ''.join(packed)
3858
3859 @staticmethod
3860 def unpack(reader):
3861 obj = ipv4_dst()
3862 _type_len = reader.read("!L")[0]
3863 assert(_type_len == 2147489796)
3864 obj.value = reader.read("!L")[0]
3865 return obj
3866
3867 def __eq__(self, other):
3868 if type(self) != type(other): return False
3869 if self.value != other.value: return False
3870 return True
3871
3872 def pretty_print(self, q):
3873 q.text("ipv4_dst {")
3874 with q.group():
3875 with q.indent(2):
3876 q.breakable()
3877 q.text("value = ");
3878 q.text(util.pretty_ipv4(self.value))
3879 q.breakable()
3880 q.text('}')
3881
3882oxm.subtypes[2147489796] = ipv4_dst
3883
3884class ipv4_dst_masked(oxm):
3885 type_len = 2147490056
3886
3887 def __init__(self, value=None, value_mask=None):
3888 if value != None:
3889 self.value = value
3890 else:
3891 self.value = 0
3892 if value_mask != None:
3893 self.value_mask = value_mask
3894 else:
3895 self.value_mask = 0
3896 return
3897
3898 def pack(self):
3899 packed = []
3900 packed.append(struct.pack("!L", self.type_len))
3901 packed.append(struct.pack("!L", self.value))
3902 packed.append(struct.pack("!L", self.value_mask))
3903 return ''.join(packed)
3904
3905 @staticmethod
3906 def unpack(reader):
3907 obj = ipv4_dst_masked()
3908 _type_len = reader.read("!L")[0]
3909 assert(_type_len == 2147490056)
3910 obj.value = reader.read("!L")[0]
3911 obj.value_mask = reader.read("!L")[0]
3912 return obj
3913
3914 def __eq__(self, other):
3915 if type(self) != type(other): return False
3916 if self.value != other.value: return False
3917 if self.value_mask != other.value_mask: return False
3918 return True
3919
3920 def pretty_print(self, q):
3921 q.text("ipv4_dst_masked {")
3922 with q.group():
3923 with q.indent(2):
3924 q.breakable()
3925 q.text("value = ");
3926 q.text(util.pretty_ipv4(self.value))
3927 q.text(","); q.breakable()
3928 q.text("value_mask = ");
3929 q.text(util.pretty_ipv4(self.value_mask))
3930 q.breakable()
3931 q.text('}')
3932
3933oxm.subtypes[2147490056] = ipv4_dst_masked
3934
3935class ipv4_src(oxm):
3936 type_len = 2147489284
3937
3938 def __init__(self, value=None):
3939 if value != None:
3940 self.value = value
3941 else:
3942 self.value = 0
3943 return
3944
3945 def pack(self):
3946 packed = []
3947 packed.append(struct.pack("!L", self.type_len))
3948 packed.append(struct.pack("!L", self.value))
3949 return ''.join(packed)
3950
3951 @staticmethod
3952 def unpack(reader):
3953 obj = ipv4_src()
3954 _type_len = reader.read("!L")[0]
3955 assert(_type_len == 2147489284)
3956 obj.value = reader.read("!L")[0]
3957 return obj
3958
3959 def __eq__(self, other):
3960 if type(self) != type(other): return False
3961 if self.value != other.value: return False
3962 return True
3963
3964 def pretty_print(self, q):
3965 q.text("ipv4_src {")
3966 with q.group():
3967 with q.indent(2):
3968 q.breakable()
3969 q.text("value = ");
3970 q.text(util.pretty_ipv4(self.value))
3971 q.breakable()
3972 q.text('}')
3973
3974oxm.subtypes[2147489284] = ipv4_src
3975
3976class ipv4_src_masked(oxm):
3977 type_len = 2147489544
3978
3979 def __init__(self, value=None, value_mask=None):
3980 if value != None:
3981 self.value = value
3982 else:
3983 self.value = 0
3984 if value_mask != None:
3985 self.value_mask = value_mask
3986 else:
3987 self.value_mask = 0
3988 return
3989
3990 def pack(self):
3991 packed = []
3992 packed.append(struct.pack("!L", self.type_len))
3993 packed.append(struct.pack("!L", self.value))
3994 packed.append(struct.pack("!L", self.value_mask))
3995 return ''.join(packed)
3996
3997 @staticmethod
3998 def unpack(reader):
3999 obj = ipv4_src_masked()
4000 _type_len = reader.read("!L")[0]
4001 assert(_type_len == 2147489544)
4002 obj.value = reader.read("!L")[0]
4003 obj.value_mask = reader.read("!L")[0]
4004 return obj
4005
4006 def __eq__(self, other):
4007 if type(self) != type(other): return False
4008 if self.value != other.value: return False
4009 if self.value_mask != other.value_mask: return False
4010 return True
4011
4012 def pretty_print(self, q):
4013 q.text("ipv4_src_masked {")
4014 with q.group():
4015 with q.indent(2):
4016 q.breakable()
4017 q.text("value = ");
4018 q.text(util.pretty_ipv4(self.value))
4019 q.text(","); q.breakable()
4020 q.text("value_mask = ");
4021 q.text(util.pretty_ipv4(self.value_mask))
4022 q.breakable()
4023 q.text('}')
4024
4025oxm.subtypes[2147489544] = ipv4_src_masked
4026
4027class ipv6_dst(oxm):
4028 type_len = 2147497488
4029
4030 def __init__(self, value=None):
4031 if value != None:
4032 self.value = value
4033 else:
4034 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
4035 return
4036
4037 def pack(self):
4038 packed = []
4039 packed.append(struct.pack("!L", self.type_len))
4040 packed.append(struct.pack("!16s", self.value))
4041 return ''.join(packed)
4042
4043 @staticmethod
4044 def unpack(reader):
4045 obj = ipv6_dst()
4046 _type_len = reader.read("!L")[0]
4047 assert(_type_len == 2147497488)
4048 obj.value = reader.read('!16s')[0]
4049 return obj
4050
4051 def __eq__(self, other):
4052 if type(self) != type(other): return False
4053 if self.value != other.value: return False
4054 return True
4055
4056 def pretty_print(self, q):
4057 q.text("ipv6_dst {")
4058 with q.group():
4059 with q.indent(2):
4060 q.breakable()
4061 q.text("value = ");
4062 q.pp(self.value)
4063 q.breakable()
4064 q.text('}')
4065
4066oxm.subtypes[2147497488] = ipv6_dst
4067
4068class ipv6_dst_masked(oxm):
4069 type_len = 2147497760
4070
4071 def __init__(self, value=None, value_mask=None):
4072 if value != None:
4073 self.value = value
4074 else:
4075 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
4076 if value_mask != None:
4077 self.value_mask = value_mask
4078 else:
4079 self.value_mask = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
4080 return
4081
4082 def pack(self):
4083 packed = []
4084 packed.append(struct.pack("!L", self.type_len))
4085 packed.append(struct.pack("!16s", self.value))
4086 packed.append(struct.pack("!16s", self.value_mask))
4087 return ''.join(packed)
4088
4089 @staticmethod
4090 def unpack(reader):
4091 obj = ipv6_dst_masked()
4092 _type_len = reader.read("!L")[0]
4093 assert(_type_len == 2147497760)
4094 obj.value = reader.read('!16s')[0]
4095 obj.value_mask = reader.read('!16s')[0]
4096 return obj
4097
4098 def __eq__(self, other):
4099 if type(self) != type(other): return False
4100 if self.value != other.value: return False
4101 if self.value_mask != other.value_mask: return False
4102 return True
4103
4104 def pretty_print(self, q):
4105 q.text("ipv6_dst_masked {")
4106 with q.group():
4107 with q.indent(2):
4108 q.breakable()
4109 q.text("value = ");
4110 q.pp(self.value)
4111 q.text(","); q.breakable()
4112 q.text("value_mask = ");
4113 q.pp(self.value_mask)
4114 q.breakable()
4115 q.text('}')
4116
4117oxm.subtypes[2147497760] = ipv6_dst_masked
4118
4119class ipv6_exthdr(oxm):
4120 type_len = 2147503618
4121
4122 def __init__(self, value=None):
4123 if value != None:
4124 self.value = value
4125 else:
4126 self.value = 0
4127 return
4128
4129 def pack(self):
4130 packed = []
4131 packed.append(struct.pack("!L", self.type_len))
4132 packed.append(struct.pack("!H", self.value))
4133 return ''.join(packed)
4134
4135 @staticmethod
4136 def unpack(reader):
4137 obj = ipv6_exthdr()
4138 _type_len = reader.read("!L")[0]
4139 assert(_type_len == 2147503618)
4140 obj.value = reader.read("!H")[0]
4141 return obj
4142
4143 def __eq__(self, other):
4144 if type(self) != type(other): return False
4145 if self.value != other.value: return False
4146 return True
4147
4148 def pretty_print(self, q):
4149 q.text("ipv6_exthdr {")
4150 with q.group():
4151 with q.indent(2):
4152 q.breakable()
4153 q.text("value = ");
4154 q.text("%#x" % self.value)
4155 q.breakable()
4156 q.text('}')
4157
4158oxm.subtypes[2147503618] = ipv6_exthdr
4159
4160class ipv6_exthdr_masked(oxm):
4161 type_len = 2147503876
4162
4163 def __init__(self, value=None, value_mask=None):
4164 if value != None:
4165 self.value = value
4166 else:
4167 self.value = 0
4168 if value_mask != None:
4169 self.value_mask = value_mask
4170 else:
4171 self.value_mask = 0
4172 return
4173
4174 def pack(self):
4175 packed = []
4176 packed.append(struct.pack("!L", self.type_len))
4177 packed.append(struct.pack("!H", self.value))
4178 packed.append(struct.pack("!H", self.value_mask))
4179 return ''.join(packed)
4180
4181 @staticmethod
4182 def unpack(reader):
4183 obj = ipv6_exthdr_masked()
4184 _type_len = reader.read("!L")[0]
4185 assert(_type_len == 2147503876)
4186 obj.value = reader.read("!H")[0]
4187 obj.value_mask = reader.read("!H")[0]
4188 return obj
4189
4190 def __eq__(self, other):
4191 if type(self) != type(other): return False
4192 if self.value != other.value: return False
4193 if self.value_mask != other.value_mask: return False
4194 return True
4195
4196 def pretty_print(self, q):
4197 q.text("ipv6_exthdr_masked {")
4198 with q.group():
4199 with q.indent(2):
4200 q.breakable()
4201 q.text("value = ");
4202 q.text("%#x" % self.value)
4203 q.text(","); q.breakable()
4204 q.text("value_mask = ");
4205 q.text("%#x" % self.value_mask)
4206 q.breakable()
4207 q.text('}')
4208
4209oxm.subtypes[2147503876] = ipv6_exthdr_masked
4210
4211class ipv6_flabel(oxm):
4212 type_len = 2147497988
4213
4214 def __init__(self, value=None):
4215 if value != None:
4216 self.value = value
4217 else:
4218 self.value = 0
4219 return
4220
4221 def pack(self):
4222 packed = []
4223 packed.append(struct.pack("!L", self.type_len))
4224 packed.append(struct.pack("!L", self.value))
4225 return ''.join(packed)
4226
4227 @staticmethod
4228 def unpack(reader):
4229 obj = ipv6_flabel()
4230 _type_len = reader.read("!L")[0]
4231 assert(_type_len == 2147497988)
4232 obj.value = reader.read("!L")[0]
4233 return obj
4234
4235 def __eq__(self, other):
4236 if type(self) != type(other): return False
4237 if self.value != other.value: return False
4238 return True
4239
4240 def pretty_print(self, q):
4241 q.text("ipv6_flabel {")
4242 with q.group():
4243 with q.indent(2):
4244 q.breakable()
4245 q.text("value = ");
4246 q.text("%#x" % self.value)
4247 q.breakable()
4248 q.text('}')
4249
4250oxm.subtypes[2147497988] = ipv6_flabel
4251
4252class ipv6_flabel_masked(oxm):
4253 type_len = 2147498248
4254
4255 def __init__(self, value=None, value_mask=None):
4256 if value != None:
4257 self.value = value
4258 else:
4259 self.value = 0
4260 if value_mask != None:
4261 self.value_mask = value_mask
4262 else:
4263 self.value_mask = 0
4264 return
4265
4266 def pack(self):
4267 packed = []
4268 packed.append(struct.pack("!L", self.type_len))
4269 packed.append(struct.pack("!L", self.value))
4270 packed.append(struct.pack("!L", self.value_mask))
4271 return ''.join(packed)
4272
4273 @staticmethod
4274 def unpack(reader):
4275 obj = ipv6_flabel_masked()
4276 _type_len = reader.read("!L")[0]
4277 assert(_type_len == 2147498248)
4278 obj.value = reader.read("!L")[0]
4279 obj.value_mask = reader.read("!L")[0]
4280 return obj
4281
4282 def __eq__(self, other):
4283 if type(self) != type(other): return False
4284 if self.value != other.value: return False
4285 if self.value_mask != other.value_mask: return False
4286 return True
4287
4288 def pretty_print(self, q):
4289 q.text("ipv6_flabel_masked {")
4290 with q.group():
4291 with q.indent(2):
4292 q.breakable()
4293 q.text("value = ");
4294 q.text("%#x" % self.value)
4295 q.text(","); q.breakable()
4296 q.text("value_mask = ");
4297 q.text("%#x" % self.value_mask)
4298 q.breakable()
4299 q.text('}')
4300
4301oxm.subtypes[2147498248] = ipv6_flabel_masked
4302
4303class ipv6_nd_sll(oxm):
4304 type_len = 2147500038
4305
4306 def __init__(self, value=None):
4307 if value != None:
4308 self.value = value
4309 else:
4310 self.value = [0,0,0,0,0,0]
4311 return
4312
4313 def pack(self):
4314 packed = []
4315 packed.append(struct.pack("!L", self.type_len))
4316 packed.append(struct.pack("!6B", *self.value))
4317 return ''.join(packed)
4318
4319 @staticmethod
4320 def unpack(reader):
4321 obj = ipv6_nd_sll()
4322 _type_len = reader.read("!L")[0]
4323 assert(_type_len == 2147500038)
4324 obj.value = list(reader.read('!6B'))
4325 return obj
4326
4327 def __eq__(self, other):
4328 if type(self) != type(other): return False
4329 if self.value != other.value: return False
4330 return True
4331
4332 def pretty_print(self, q):
4333 q.text("ipv6_nd_sll {")
4334 with q.group():
4335 with q.indent(2):
4336 q.breakable()
4337 q.text("value = ");
4338 q.text(util.pretty_mac(self.value))
4339 q.breakable()
4340 q.text('}')
4341
4342oxm.subtypes[2147500038] = ipv6_nd_sll
4343
4344class ipv6_nd_sll_masked(oxm):
4345 type_len = 2147500300
4346
4347 def __init__(self, value=None, value_mask=None):
4348 if value != None:
4349 self.value = value
4350 else:
4351 self.value = [0,0,0,0,0,0]
4352 if value_mask != None:
4353 self.value_mask = value_mask
4354 else:
4355 self.value_mask = [0,0,0,0,0,0]
4356 return
4357
4358 def pack(self):
4359 packed = []
4360 packed.append(struct.pack("!L", self.type_len))
4361 packed.append(struct.pack("!6B", *self.value))
4362 packed.append(struct.pack("!6B", *self.value_mask))
4363 return ''.join(packed)
4364
4365 @staticmethod
4366 def unpack(reader):
4367 obj = ipv6_nd_sll_masked()
4368 _type_len = reader.read("!L")[0]
4369 assert(_type_len == 2147500300)
4370 obj.value = list(reader.read('!6B'))
4371 obj.value_mask = list(reader.read('!6B'))
4372 return obj
4373
4374 def __eq__(self, other):
4375 if type(self) != type(other): return False
4376 if self.value != other.value: return False
4377 if self.value_mask != other.value_mask: return False
4378 return True
4379
4380 def pretty_print(self, q):
4381 q.text("ipv6_nd_sll_masked {")
4382 with q.group():
4383 with q.indent(2):
4384 q.breakable()
4385 q.text("value = ");
4386 q.text(util.pretty_mac(self.value))
4387 q.text(","); q.breakable()
4388 q.text("value_mask = ");
4389 q.text(util.pretty_mac(self.value_mask))
4390 q.breakable()
4391 q.text('}')
4392
4393oxm.subtypes[2147500300] = ipv6_nd_sll_masked
4394
4395class ipv6_nd_target(oxm):
4396 type_len = 2147499536
4397
4398 def __init__(self, value=None):
4399 if value != None:
4400 self.value = value
4401 else:
4402 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
4403 return
4404
4405 def pack(self):
4406 packed = []
4407 packed.append(struct.pack("!L", self.type_len))
4408 packed.append(struct.pack("!16s", self.value))
4409 return ''.join(packed)
4410
4411 @staticmethod
4412 def unpack(reader):
4413 obj = ipv6_nd_target()
4414 _type_len = reader.read("!L")[0]
4415 assert(_type_len == 2147499536)
4416 obj.value = reader.read('!16s')[0]
4417 return obj
4418
4419 def __eq__(self, other):
4420 if type(self) != type(other): return False
4421 if self.value != other.value: return False
4422 return True
4423
4424 def pretty_print(self, q):
4425 q.text("ipv6_nd_target {")
4426 with q.group():
4427 with q.indent(2):
4428 q.breakable()
4429 q.text("value = ");
4430 q.pp(self.value)
4431 q.breakable()
4432 q.text('}')
4433
4434oxm.subtypes[2147499536] = ipv6_nd_target
4435
4436class ipv6_nd_target_masked(oxm):
4437 type_len = 2147499808
4438
4439 def __init__(self, value=None, value_mask=None):
4440 if value != None:
4441 self.value = value
4442 else:
4443 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
4444 if value_mask != None:
4445 self.value_mask = value_mask
4446 else:
4447 self.value_mask = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
4448 return
4449
4450 def pack(self):
4451 packed = []
4452 packed.append(struct.pack("!L", self.type_len))
4453 packed.append(struct.pack("!16s", self.value))
4454 packed.append(struct.pack("!16s", self.value_mask))
4455 return ''.join(packed)
4456
4457 @staticmethod
4458 def unpack(reader):
4459 obj = ipv6_nd_target_masked()
4460 _type_len = reader.read("!L")[0]
4461 assert(_type_len == 2147499808)
4462 obj.value = reader.read('!16s')[0]
4463 obj.value_mask = reader.read('!16s')[0]
4464 return obj
4465
4466 def __eq__(self, other):
4467 if type(self) != type(other): return False
4468 if self.value != other.value: return False
4469 if self.value_mask != other.value_mask: return False
4470 return True
4471
4472 def pretty_print(self, q):
4473 q.text("ipv6_nd_target_masked {")
4474 with q.group():
4475 with q.indent(2):
4476 q.breakable()
4477 q.text("value = ");
4478 q.pp(self.value)
4479 q.text(","); q.breakable()
4480 q.text("value_mask = ");
4481 q.pp(self.value_mask)
4482 q.breakable()
4483 q.text('}')
4484
4485oxm.subtypes[2147499808] = ipv6_nd_target_masked
4486
4487class ipv6_nd_tll(oxm):
4488 type_len = 2147500550
4489
4490 def __init__(self, value=None):
4491 if value != None:
4492 self.value = value
4493 else:
4494 self.value = [0,0,0,0,0,0]
4495 return
4496
4497 def pack(self):
4498 packed = []
4499 packed.append(struct.pack("!L", self.type_len))
4500 packed.append(struct.pack("!6B", *self.value))
4501 return ''.join(packed)
4502
4503 @staticmethod
4504 def unpack(reader):
4505 obj = ipv6_nd_tll()
4506 _type_len = reader.read("!L")[0]
4507 assert(_type_len == 2147500550)
4508 obj.value = list(reader.read('!6B'))
4509 return obj
4510
4511 def __eq__(self, other):
4512 if type(self) != type(other): return False
4513 if self.value != other.value: return False
4514 return True
4515
4516 def pretty_print(self, q):
4517 q.text("ipv6_nd_tll {")
4518 with q.group():
4519 with q.indent(2):
4520 q.breakable()
4521 q.text("value = ");
4522 q.text(util.pretty_mac(self.value))
4523 q.breakable()
4524 q.text('}')
4525
4526oxm.subtypes[2147500550] = ipv6_nd_tll
4527
4528class ipv6_nd_tll_masked(oxm):
4529 type_len = 2147500812
4530
4531 def __init__(self, value=None, value_mask=None):
4532 if value != None:
4533 self.value = value
4534 else:
4535 self.value = [0,0,0,0,0,0]
4536 if value_mask != None:
4537 self.value_mask = value_mask
4538 else:
4539 self.value_mask = [0,0,0,0,0,0]
4540 return
4541
4542 def pack(self):
4543 packed = []
4544 packed.append(struct.pack("!L", self.type_len))
4545 packed.append(struct.pack("!6B", *self.value))
4546 packed.append(struct.pack("!6B", *self.value_mask))
4547 return ''.join(packed)
4548
4549 @staticmethod
4550 def unpack(reader):
4551 obj = ipv6_nd_tll_masked()
4552 _type_len = reader.read("!L")[0]
4553 assert(_type_len == 2147500812)
4554 obj.value = list(reader.read('!6B'))
4555 obj.value_mask = list(reader.read('!6B'))
4556 return obj
4557
4558 def __eq__(self, other):
4559 if type(self) != type(other): return False
4560 if self.value != other.value: return False
4561 if self.value_mask != other.value_mask: return False
4562 return True
4563
4564 def pretty_print(self, q):
4565 q.text("ipv6_nd_tll_masked {")
4566 with q.group():
4567 with q.indent(2):
4568 q.breakable()
4569 q.text("value = ");
4570 q.text(util.pretty_mac(self.value))
4571 q.text(","); q.breakable()
4572 q.text("value_mask = ");
4573 q.text(util.pretty_mac(self.value_mask))
4574 q.breakable()
4575 q.text('}')
4576
4577oxm.subtypes[2147500812] = ipv6_nd_tll_masked
4578
4579class ipv6_src(oxm):
4580 type_len = 2147496976
4581
4582 def __init__(self, value=None):
4583 if value != None:
4584 self.value = value
4585 else:
4586 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
4587 return
4588
4589 def pack(self):
4590 packed = []
4591 packed.append(struct.pack("!L", self.type_len))
4592 packed.append(struct.pack("!16s", self.value))
4593 return ''.join(packed)
4594
4595 @staticmethod
4596 def unpack(reader):
4597 obj = ipv6_src()
4598 _type_len = reader.read("!L")[0]
4599 assert(_type_len == 2147496976)
4600 obj.value = reader.read('!16s')[0]
4601 return obj
4602
4603 def __eq__(self, other):
4604 if type(self) != type(other): return False
4605 if self.value != other.value: return False
4606 return True
4607
4608 def pretty_print(self, q):
4609 q.text("ipv6_src {")
4610 with q.group():
4611 with q.indent(2):
4612 q.breakable()
4613 q.text("value = ");
4614 q.pp(self.value)
4615 q.breakable()
4616 q.text('}')
4617
4618oxm.subtypes[2147496976] = ipv6_src
4619
4620class ipv6_src_masked(oxm):
4621 type_len = 2147497248
4622
4623 def __init__(self, value=None, value_mask=None):
4624 if value != None:
4625 self.value = value
4626 else:
4627 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
4628 if value_mask != None:
4629 self.value_mask = value_mask
4630 else:
4631 self.value_mask = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
4632 return
4633
4634 def pack(self):
4635 packed = []
4636 packed.append(struct.pack("!L", self.type_len))
4637 packed.append(struct.pack("!16s", self.value))
4638 packed.append(struct.pack("!16s", self.value_mask))
4639 return ''.join(packed)
4640
4641 @staticmethod
4642 def unpack(reader):
4643 obj = ipv6_src_masked()
4644 _type_len = reader.read("!L")[0]
4645 assert(_type_len == 2147497248)
4646 obj.value = reader.read('!16s')[0]
4647 obj.value_mask = reader.read('!16s')[0]
4648 return obj
4649
4650 def __eq__(self, other):
4651 if type(self) != type(other): return False
4652 if self.value != other.value: return False
4653 if self.value_mask != other.value_mask: return False
4654 return True
4655
4656 def pretty_print(self, q):
4657 q.text("ipv6_src_masked {")
4658 with q.group():
4659 with q.indent(2):
4660 q.breakable()
4661 q.text("value = ");
4662 q.pp(self.value)
4663 q.text(","); q.breakable()
4664 q.text("value_mask = ");
4665 q.pp(self.value_mask)
4666 q.breakable()
4667 q.text('}')
4668
4669oxm.subtypes[2147497248] = ipv6_src_masked
4670
4671class metadata(oxm):
4672 type_len = 2147484680
4673
4674 def __init__(self, value=None):
4675 if value != None:
4676 self.value = value
4677 else:
4678 self.value = 0
4679 return
4680
4681 def pack(self):
4682 packed = []
4683 packed.append(struct.pack("!L", self.type_len))
4684 packed.append(struct.pack("!Q", self.value))
4685 return ''.join(packed)
4686
4687 @staticmethod
4688 def unpack(reader):
4689 obj = metadata()
4690 _type_len = reader.read("!L")[0]
4691 assert(_type_len == 2147484680)
4692 obj.value = reader.read("!Q")[0]
4693 return obj
4694
4695 def __eq__(self, other):
4696 if type(self) != type(other): return False
4697 if self.value != other.value: return False
4698 return True
4699
4700 def pretty_print(self, q):
4701 q.text("metadata {")
4702 with q.group():
4703 with q.indent(2):
4704 q.breakable()
4705 q.text("value = ");
4706 q.text("%#x" % self.value)
4707 q.breakable()
4708 q.text('}')
4709
4710oxm.subtypes[2147484680] = metadata
4711
4712class metadata_masked(oxm):
4713 type_len = 2147484944
4714
4715 def __init__(self, value=None, value_mask=None):
4716 if value != None:
4717 self.value = value
4718 else:
4719 self.value = 0
4720 if value_mask != None:
4721 self.value_mask = value_mask
4722 else:
4723 self.value_mask = 0
4724 return
4725
4726 def pack(self):
4727 packed = []
4728 packed.append(struct.pack("!L", self.type_len))
4729 packed.append(struct.pack("!Q", self.value))
4730 packed.append(struct.pack("!Q", self.value_mask))
4731 return ''.join(packed)
4732
4733 @staticmethod
4734 def unpack(reader):
4735 obj = metadata_masked()
4736 _type_len = reader.read("!L")[0]
4737 assert(_type_len == 2147484944)
4738 obj.value = reader.read("!Q")[0]
4739 obj.value_mask = reader.read("!Q")[0]
4740 return obj
4741
4742 def __eq__(self, other):
4743 if type(self) != type(other): return False
4744 if self.value != other.value: return False
4745 if self.value_mask != other.value_mask: return False
4746 return True
4747
4748 def pretty_print(self, q):
4749 q.text("metadata_masked {")
4750 with q.group():
4751 with q.indent(2):
4752 q.breakable()
4753 q.text("value = ");
4754 q.text("%#x" % self.value)
4755 q.text(","); q.breakable()
4756 q.text("value_mask = ");
4757 q.text("%#x" % self.value_mask)
4758 q.breakable()
4759 q.text('}')
4760
4761oxm.subtypes[2147484944] = metadata_masked
4762
4763class mpls_bos(oxm):
4764 type_len = 2147502081
4765
4766 def __init__(self, value=None):
4767 if value != None:
4768 self.value = value
4769 else:
4770 self.value = 0
4771 return
4772
4773 def pack(self):
4774 packed = []
4775 packed.append(struct.pack("!L", self.type_len))
4776 packed.append(struct.pack("!B", self.value))
4777 return ''.join(packed)
4778
4779 @staticmethod
4780 def unpack(reader):
4781 obj = mpls_bos()
4782 _type_len = reader.read("!L")[0]
4783 assert(_type_len == 2147502081)
4784 obj.value = reader.read("!B")[0]
4785 return obj
4786
4787 def __eq__(self, other):
4788 if type(self) != type(other): return False
4789 if self.value != other.value: return False
4790 return True
4791
4792 def pretty_print(self, q):
4793 q.text("mpls_bos {")
4794 with q.group():
4795 with q.indent(2):
4796 q.breakable()
4797 q.text("value = ");
4798 q.text("%#x" % self.value)
4799 q.breakable()
4800 q.text('}')
4801
4802oxm.subtypes[2147502081] = mpls_bos
4803
4804class mpls_bos_masked(oxm):
4805 type_len = 2147502338
4806
4807 def __init__(self, value=None, value_mask=None):
4808 if value != None:
4809 self.value = value
4810 else:
4811 self.value = 0
4812 if value_mask != None:
4813 self.value_mask = value_mask
4814 else:
4815 self.value_mask = 0
4816 return
4817
4818 def pack(self):
4819 packed = []
4820 packed.append(struct.pack("!L", self.type_len))
4821 packed.append(struct.pack("!B", self.value))
4822 packed.append(struct.pack("!B", self.value_mask))
4823 return ''.join(packed)
4824
4825 @staticmethod
4826 def unpack(reader):
4827 obj = mpls_bos_masked()
4828 _type_len = reader.read("!L")[0]
4829 assert(_type_len == 2147502338)
4830 obj.value = reader.read("!B")[0]
4831 obj.value_mask = reader.read("!B")[0]
4832 return obj
4833
4834 def __eq__(self, other):
4835 if type(self) != type(other): return False
4836 if self.value != other.value: return False
4837 if self.value_mask != other.value_mask: return False
4838 return True
4839
4840 def pretty_print(self, q):
4841 q.text("mpls_bos_masked {")
4842 with q.group():
4843 with q.indent(2):
4844 q.breakable()
4845 q.text("value = ");
4846 q.text("%#x" % self.value)
4847 q.text(","); q.breakable()
4848 q.text("value_mask = ");
4849 q.text("%#x" % self.value_mask)
4850 q.breakable()
4851 q.text('}')
4852
4853oxm.subtypes[2147502338] = mpls_bos_masked
4854
4855class mpls_label(oxm):
4856 type_len = 2147501060
4857
4858 def __init__(self, value=None):
4859 if value != None:
4860 self.value = value
4861 else:
4862 self.value = 0
4863 return
4864
4865 def pack(self):
4866 packed = []
4867 packed.append(struct.pack("!L", self.type_len))
4868 packed.append(struct.pack("!L", self.value))
4869 return ''.join(packed)
4870
4871 @staticmethod
4872 def unpack(reader):
4873 obj = mpls_label()
4874 _type_len = reader.read("!L")[0]
4875 assert(_type_len == 2147501060)
4876 obj.value = reader.read("!L")[0]
4877 return obj
4878
4879 def __eq__(self, other):
4880 if type(self) != type(other): return False
4881 if self.value != other.value: return False
4882 return True
4883
4884 def pretty_print(self, q):
4885 q.text("mpls_label {")
4886 with q.group():
4887 with q.indent(2):
4888 q.breakable()
4889 q.text("value = ");
4890 q.text("%#x" % self.value)
4891 q.breakable()
4892 q.text('}')
4893
4894oxm.subtypes[2147501060] = mpls_label
4895
4896class mpls_label_masked(oxm):
4897 type_len = 2147501320
4898
4899 def __init__(self, value=None, value_mask=None):
4900 if value != None:
4901 self.value = value
4902 else:
4903 self.value = 0
4904 if value_mask != None:
4905 self.value_mask = value_mask
4906 else:
4907 self.value_mask = 0
4908 return
4909
4910 def pack(self):
4911 packed = []
4912 packed.append(struct.pack("!L", self.type_len))
4913 packed.append(struct.pack("!L", self.value))
4914 packed.append(struct.pack("!L", self.value_mask))
4915 return ''.join(packed)
4916
4917 @staticmethod
4918 def unpack(reader):
4919 obj = mpls_label_masked()
4920 _type_len = reader.read("!L")[0]
4921 assert(_type_len == 2147501320)
4922 obj.value = reader.read("!L")[0]
4923 obj.value_mask = reader.read("!L")[0]
4924 return obj
4925
4926 def __eq__(self, other):
4927 if type(self) != type(other): return False
4928 if self.value != other.value: return False
4929 if self.value_mask != other.value_mask: return False
4930 return True
4931
4932 def pretty_print(self, q):
4933 q.text("mpls_label_masked {")
4934 with q.group():
4935 with q.indent(2):
4936 q.breakable()
4937 q.text("value = ");
4938 q.text("%#x" % self.value)
4939 q.text(","); q.breakable()
4940 q.text("value_mask = ");
4941 q.text("%#x" % self.value_mask)
4942 q.breakable()
4943 q.text('}')
4944
4945oxm.subtypes[2147501320] = mpls_label_masked
4946
4947class mpls_tc(oxm):
4948 type_len = 2147501569
4949
4950 def __init__(self, value=None):
4951 if value != None:
4952 self.value = value
4953 else:
4954 self.value = 0
4955 return
4956
4957 def pack(self):
4958 packed = []
4959 packed.append(struct.pack("!L", self.type_len))
4960 packed.append(struct.pack("!B", self.value))
4961 return ''.join(packed)
4962
4963 @staticmethod
4964 def unpack(reader):
4965 obj = mpls_tc()
4966 _type_len = reader.read("!L")[0]
4967 assert(_type_len == 2147501569)
4968 obj.value = reader.read("!B")[0]
4969 return obj
4970
4971 def __eq__(self, other):
4972 if type(self) != type(other): return False
4973 if self.value != other.value: return False
4974 return True
4975
4976 def pretty_print(self, q):
4977 q.text("mpls_tc {")
4978 with q.group():
4979 with q.indent(2):
4980 q.breakable()
4981 q.text("value = ");
4982 q.text("%#x" % self.value)
4983 q.breakable()
4984 q.text('}')
4985
4986oxm.subtypes[2147501569] = mpls_tc
4987
4988class mpls_tc_masked(oxm):
4989 type_len = 2147501826
4990
4991 def __init__(self, value=None, value_mask=None):
4992 if value != None:
4993 self.value = value
4994 else:
4995 self.value = 0
4996 if value_mask != None:
4997 self.value_mask = value_mask
4998 else:
4999 self.value_mask = 0
5000 return
5001
5002 def pack(self):
5003 packed = []
5004 packed.append(struct.pack("!L", self.type_len))
5005 packed.append(struct.pack("!B", self.value))
5006 packed.append(struct.pack("!B", self.value_mask))
5007 return ''.join(packed)
5008
5009 @staticmethod
5010 def unpack(reader):
5011 obj = mpls_tc_masked()
5012 _type_len = reader.read("!L")[0]
5013 assert(_type_len == 2147501826)
5014 obj.value = reader.read("!B")[0]
5015 obj.value_mask = reader.read("!B")[0]
5016 return obj
5017
5018 def __eq__(self, other):
5019 if type(self) != type(other): return False
5020 if self.value != other.value: return False
5021 if self.value_mask != other.value_mask: return False
5022 return True
5023
5024 def pretty_print(self, q):
5025 q.text("mpls_tc_masked {")
5026 with q.group():
5027 with q.indent(2):
5028 q.breakable()
5029 q.text("value = ");
5030 q.text("%#x" % self.value)
5031 q.text(","); q.breakable()
5032 q.text("value_mask = ");
5033 q.text("%#x" % self.value_mask)
5034 q.breakable()
5035 q.text('}')
5036
5037oxm.subtypes[2147501826] = mpls_tc_masked
5038
5039class pbb_uca(oxm):
5040 type_len = 2147504641
5041
5042 def __init__(self, value=None):
5043 if value != None:
5044 self.value = value
5045 else:
5046 self.value = 0
5047 return
5048
5049 def pack(self):
5050 packed = []
5051 packed.append(struct.pack("!L", self.type_len))
5052 packed.append(struct.pack("!B", self.value))
5053 return ''.join(packed)
5054
5055 @staticmethod
5056 def unpack(reader):
5057 obj = pbb_uca()
5058 _type_len = reader.read("!L")[0]
5059 assert(_type_len == 2147504641)
5060 obj.value = reader.read("!B")[0]
5061 return obj
5062
5063 def __eq__(self, other):
5064 if type(self) != type(other): return False
5065 if self.value != other.value: return False
5066 return True
5067
5068 def pretty_print(self, q):
5069 q.text("pbb_uca {")
5070 with q.group():
5071 with q.indent(2):
5072 q.breakable()
5073 q.text("value = ");
5074 q.text("%#x" % self.value)
5075 q.breakable()
5076 q.text('}')
5077
5078oxm.subtypes[2147504641] = pbb_uca
5079
5080class pbb_uca_masked(oxm):
5081 type_len = 2147504898
5082
5083 def __init__(self, value=None, value_mask=None):
5084 if value != None:
5085 self.value = value
5086 else:
5087 self.value = 0
5088 if value_mask != None:
5089 self.value_mask = value_mask
5090 else:
5091 self.value_mask = 0
5092 return
5093
5094 def pack(self):
5095 packed = []
5096 packed.append(struct.pack("!L", self.type_len))
5097 packed.append(struct.pack("!B", self.value))
5098 packed.append(struct.pack("!B", self.value_mask))
5099 return ''.join(packed)
5100
5101 @staticmethod
5102 def unpack(reader):
5103 obj = pbb_uca_masked()
5104 _type_len = reader.read("!L")[0]
5105 assert(_type_len == 2147504898)
5106 obj.value = reader.read("!B")[0]
5107 obj.value_mask = reader.read("!B")[0]
5108 return obj
5109
5110 def __eq__(self, other):
5111 if type(self) != type(other): return False
5112 if self.value != other.value: return False
5113 if self.value_mask != other.value_mask: return False
5114 return True
5115
5116 def pretty_print(self, q):
5117 q.text("pbb_uca_masked {")
5118 with q.group():
5119 with q.indent(2):
5120 q.breakable()
5121 q.text("value = ");
5122 q.text("%#x" % self.value)
5123 q.text(","); q.breakable()
5124 q.text("value_mask = ");
5125 q.text("%#x" % self.value_mask)
5126 q.breakable()
5127 q.text('}')
5128
5129oxm.subtypes[2147504898] = pbb_uca_masked
5130
5131class sctp_dst(oxm):
5132 type_len = 2147492866
5133
5134 def __init__(self, value=None):
5135 if value != None:
5136 self.value = value
5137 else:
5138 self.value = 0
5139 return
5140
5141 def pack(self):
5142 packed = []
5143 packed.append(struct.pack("!L", self.type_len))
5144 packed.append(struct.pack("!H", self.value))
5145 return ''.join(packed)
5146
5147 @staticmethod
5148 def unpack(reader):
5149 obj = sctp_dst()
5150 _type_len = reader.read("!L")[0]
5151 assert(_type_len == 2147492866)
5152 obj.value = reader.read("!H")[0]
5153 return obj
5154
5155 def __eq__(self, other):
5156 if type(self) != type(other): return False
5157 if self.value != other.value: return False
5158 return True
5159
5160 def pretty_print(self, q):
5161 q.text("sctp_dst {")
5162 with q.group():
5163 with q.indent(2):
5164 q.breakable()
5165 q.text("value = ");
5166 q.text("%#x" % self.value)
5167 q.breakable()
5168 q.text('}')
5169
5170oxm.subtypes[2147492866] = sctp_dst
5171
5172class sctp_dst_masked(oxm):
5173 type_len = 2147493124
5174
5175 def __init__(self, value=None, value_mask=None):
5176 if value != None:
5177 self.value = value
5178 else:
5179 self.value = 0
5180 if value_mask != None:
5181 self.value_mask = value_mask
5182 else:
5183 self.value_mask = 0
5184 return
5185
5186 def pack(self):
5187 packed = []
5188 packed.append(struct.pack("!L", self.type_len))
5189 packed.append(struct.pack("!H", self.value))
5190 packed.append(struct.pack("!H", self.value_mask))
5191 return ''.join(packed)
5192
5193 @staticmethod
5194 def unpack(reader):
5195 obj = sctp_dst_masked()
5196 _type_len = reader.read("!L")[0]
5197 assert(_type_len == 2147493124)
5198 obj.value = reader.read("!H")[0]
5199 obj.value_mask = reader.read("!H")[0]
5200 return obj
5201
5202 def __eq__(self, other):
5203 if type(self) != type(other): return False
5204 if self.value != other.value: return False
5205 if self.value_mask != other.value_mask: return False
5206 return True
5207
5208 def pretty_print(self, q):
5209 q.text("sctp_dst_masked {")
5210 with q.group():
5211 with q.indent(2):
5212 q.breakable()
5213 q.text("value = ");
5214 q.text("%#x" % self.value)
5215 q.text(","); q.breakable()
5216 q.text("value_mask = ");
5217 q.text("%#x" % self.value_mask)
5218 q.breakable()
5219 q.text('}')
5220
5221oxm.subtypes[2147493124] = sctp_dst_masked
5222
5223class sctp_src(oxm):
5224 type_len = 2147492354
5225
5226 def __init__(self, value=None):
5227 if value != None:
5228 self.value = value
5229 else:
5230 self.value = 0
5231 return
5232
5233 def pack(self):
5234 packed = []
5235 packed.append(struct.pack("!L", self.type_len))
5236 packed.append(struct.pack("!H", self.value))
5237 return ''.join(packed)
5238
5239 @staticmethod
5240 def unpack(reader):
5241 obj = sctp_src()
5242 _type_len = reader.read("!L")[0]
5243 assert(_type_len == 2147492354)
5244 obj.value = reader.read("!H")[0]
5245 return obj
5246
5247 def __eq__(self, other):
5248 if type(self) != type(other): return False
5249 if self.value != other.value: return False
5250 return True
5251
5252 def pretty_print(self, q):
5253 q.text("sctp_src {")
5254 with q.group():
5255 with q.indent(2):
5256 q.breakable()
5257 q.text("value = ");
5258 q.text("%#x" % self.value)
5259 q.breakable()
5260 q.text('}')
5261
5262oxm.subtypes[2147492354] = sctp_src
5263
5264class sctp_src_masked(oxm):
5265 type_len = 2147492612
5266
5267 def __init__(self, value=None, value_mask=None):
5268 if value != None:
5269 self.value = value
5270 else:
5271 self.value = 0
5272 if value_mask != None:
5273 self.value_mask = value_mask
5274 else:
5275 self.value_mask = 0
5276 return
5277
5278 def pack(self):
5279 packed = []
5280 packed.append(struct.pack("!L", self.type_len))
5281 packed.append(struct.pack("!H", self.value))
5282 packed.append(struct.pack("!H", self.value_mask))
5283 return ''.join(packed)
5284
5285 @staticmethod
5286 def unpack(reader):
5287 obj = sctp_src_masked()
5288 _type_len = reader.read("!L")[0]
5289 assert(_type_len == 2147492612)
5290 obj.value = reader.read("!H")[0]
5291 obj.value_mask = reader.read("!H")[0]
5292 return obj
5293
5294 def __eq__(self, other):
5295 if type(self) != type(other): return False
5296 if self.value != other.value: return False
5297 if self.value_mask != other.value_mask: return False
5298 return True
5299
5300 def pretty_print(self, q):
5301 q.text("sctp_src_masked {")
5302 with q.group():
5303 with q.indent(2):
5304 q.breakable()
5305 q.text("value = ");
5306 q.text("%#x" % self.value)
5307 q.text(","); q.breakable()
5308 q.text("value_mask = ");
5309 q.text("%#x" % self.value_mask)
5310 q.breakable()
5311 q.text('}')
5312
5313oxm.subtypes[2147492612] = sctp_src_masked
5314
5315class tcp_dst(oxm):
5316 type_len = 2147490818
5317
5318 def __init__(self, value=None):
5319 if value != None:
5320 self.value = value
5321 else:
5322 self.value = 0
5323 return
5324
5325 def pack(self):
5326 packed = []
5327 packed.append(struct.pack("!L", self.type_len))
5328 packed.append(struct.pack("!H", self.value))
5329 return ''.join(packed)
5330
5331 @staticmethod
5332 def unpack(reader):
5333 obj = tcp_dst()
5334 _type_len = reader.read("!L")[0]
5335 assert(_type_len == 2147490818)
5336 obj.value = reader.read("!H")[0]
5337 return obj
5338
5339 def __eq__(self, other):
5340 if type(self) != type(other): return False
5341 if self.value != other.value: return False
5342 return True
5343
5344 def pretty_print(self, q):
5345 q.text("tcp_dst {")
5346 with q.group():
5347 with q.indent(2):
5348 q.breakable()
5349 q.text("value = ");
5350 q.text("%#x" % self.value)
5351 q.breakable()
5352 q.text('}')
5353
5354oxm.subtypes[2147490818] = tcp_dst
5355
5356class tcp_dst_masked(oxm):
5357 type_len = 2147491076
5358
5359 def __init__(self, value=None, value_mask=None):
5360 if value != None:
5361 self.value = value
5362 else:
5363 self.value = 0
5364 if value_mask != None:
5365 self.value_mask = value_mask
5366 else:
5367 self.value_mask = 0
5368 return
5369
5370 def pack(self):
5371 packed = []
5372 packed.append(struct.pack("!L", self.type_len))
5373 packed.append(struct.pack("!H", self.value))
5374 packed.append(struct.pack("!H", self.value_mask))
5375 return ''.join(packed)
5376
5377 @staticmethod
5378 def unpack(reader):
5379 obj = tcp_dst_masked()
5380 _type_len = reader.read("!L")[0]
5381 assert(_type_len == 2147491076)
5382 obj.value = reader.read("!H")[0]
5383 obj.value_mask = reader.read("!H")[0]
5384 return obj
5385
5386 def __eq__(self, other):
5387 if type(self) != type(other): return False
5388 if self.value != other.value: return False
5389 if self.value_mask != other.value_mask: return False
5390 return True
5391
5392 def pretty_print(self, q):
5393 q.text("tcp_dst_masked {")
5394 with q.group():
5395 with q.indent(2):
5396 q.breakable()
5397 q.text("value = ");
5398 q.text("%#x" % self.value)
5399 q.text(","); q.breakable()
5400 q.text("value_mask = ");
5401 q.text("%#x" % self.value_mask)
5402 q.breakable()
5403 q.text('}')
5404
5405oxm.subtypes[2147491076] = tcp_dst_masked
5406
5407class tcp_src(oxm):
5408 type_len = 2147490306
5409
5410 def __init__(self, value=None):
5411 if value != None:
5412 self.value = value
5413 else:
5414 self.value = 0
5415 return
5416
5417 def pack(self):
5418 packed = []
5419 packed.append(struct.pack("!L", self.type_len))
5420 packed.append(struct.pack("!H", self.value))
5421 return ''.join(packed)
5422
5423 @staticmethod
5424 def unpack(reader):
5425 obj = tcp_src()
5426 _type_len = reader.read("!L")[0]
5427 assert(_type_len == 2147490306)
5428 obj.value = reader.read("!H")[0]
5429 return obj
5430
5431 def __eq__(self, other):
5432 if type(self) != type(other): return False
5433 if self.value != other.value: return False
5434 return True
5435
5436 def pretty_print(self, q):
5437 q.text("tcp_src {")
5438 with q.group():
5439 with q.indent(2):
5440 q.breakable()
5441 q.text("value = ");
5442 q.text("%#x" % self.value)
5443 q.breakable()
5444 q.text('}')
5445
5446oxm.subtypes[2147490306] = tcp_src
5447
5448class tcp_src_masked(oxm):
5449 type_len = 2147490564
5450
5451 def __init__(self, value=None, value_mask=None):
5452 if value != None:
5453 self.value = value
5454 else:
5455 self.value = 0
5456 if value_mask != None:
5457 self.value_mask = value_mask
5458 else:
5459 self.value_mask = 0
5460 return
5461
5462 def pack(self):
5463 packed = []
5464 packed.append(struct.pack("!L", self.type_len))
5465 packed.append(struct.pack("!H", self.value))
5466 packed.append(struct.pack("!H", self.value_mask))
5467 return ''.join(packed)
5468
5469 @staticmethod
5470 def unpack(reader):
5471 obj = tcp_src_masked()
5472 _type_len = reader.read("!L")[0]
5473 assert(_type_len == 2147490564)
5474 obj.value = reader.read("!H")[0]
5475 obj.value_mask = reader.read("!H")[0]
5476 return obj
5477
5478 def __eq__(self, other):
5479 if type(self) != type(other): return False
5480 if self.value != other.value: return False
5481 if self.value_mask != other.value_mask: return False
5482 return True
5483
5484 def pretty_print(self, q):
5485 q.text("tcp_src_masked {")
5486 with q.group():
5487 with q.indent(2):
5488 q.breakable()
5489 q.text("value = ");
5490 q.text("%#x" % self.value)
5491 q.text(","); q.breakable()
5492 q.text("value_mask = ");
5493 q.text("%#x" % self.value_mask)
5494 q.breakable()
5495 q.text('}')
5496
5497oxm.subtypes[2147490564] = tcp_src_masked
5498
5499class tunnel_id(oxm):
5500 type_len = 2147503112
5501
5502 def __init__(self, value=None):
5503 if value != None:
5504 self.value = value
5505 else:
5506 self.value = 0
5507 return
5508
5509 def pack(self):
5510 packed = []
5511 packed.append(struct.pack("!L", self.type_len))
5512 packed.append(struct.pack("!Q", self.value))
5513 return ''.join(packed)
5514
5515 @staticmethod
5516 def unpack(reader):
5517 obj = tunnel_id()
5518 _type_len = reader.read("!L")[0]
5519 assert(_type_len == 2147503112)
5520 obj.value = reader.read("!Q")[0]
5521 return obj
5522
5523 def __eq__(self, other):
5524 if type(self) != type(other): return False
5525 if self.value != other.value: return False
5526 return True
5527
5528 def pretty_print(self, q):
5529 q.text("tunnel_id {")
5530 with q.group():
5531 with q.indent(2):
5532 q.breakable()
5533 q.text("value = ");
5534 q.text("%#x" % self.value)
5535 q.breakable()
5536 q.text('}')
5537
5538oxm.subtypes[2147503112] = tunnel_id
5539
5540class tunnel_id_masked(oxm):
5541 type_len = 2147503376
5542
5543 def __init__(self, value=None, value_mask=None):
5544 if value != None:
5545 self.value = value
5546 else:
5547 self.value = 0
5548 if value_mask != None:
5549 self.value_mask = value_mask
5550 else:
5551 self.value_mask = 0
5552 return
5553
5554 def pack(self):
5555 packed = []
5556 packed.append(struct.pack("!L", self.type_len))
5557 packed.append(struct.pack("!Q", self.value))
5558 packed.append(struct.pack("!Q", self.value_mask))
5559 return ''.join(packed)
5560
5561 @staticmethod
5562 def unpack(reader):
5563 obj = tunnel_id_masked()
5564 _type_len = reader.read("!L")[0]
5565 assert(_type_len == 2147503376)
5566 obj.value = reader.read("!Q")[0]
5567 obj.value_mask = reader.read("!Q")[0]
5568 return obj
5569
5570 def __eq__(self, other):
5571 if type(self) != type(other): return False
5572 if self.value != other.value: return False
5573 if self.value_mask != other.value_mask: return False
5574 return True
5575
5576 def pretty_print(self, q):
5577 q.text("tunnel_id_masked {")
5578 with q.group():
5579 with q.indent(2):
5580 q.breakable()
5581 q.text("value = ");
5582 q.text("%#x" % self.value)
5583 q.text(","); q.breakable()
5584 q.text("value_mask = ");
5585 q.text("%#x" % self.value_mask)
5586 q.breakable()
5587 q.text('}')
5588
5589oxm.subtypes[2147503376] = tunnel_id_masked
5590
5591class tunnel_ipv4_dst(oxm):
5592 type_len = 81924
5593
5594 def __init__(self, value=None):
5595 if value != None:
5596 self.value = value
5597 else:
5598 self.value = 0
5599 return
5600
5601 def pack(self):
5602 packed = []
5603 packed.append(struct.pack("!L", self.type_len))
5604 packed.append(struct.pack("!L", self.value))
5605 return ''.join(packed)
5606
5607 @staticmethod
5608 def unpack(reader):
5609 obj = tunnel_ipv4_dst()
5610 _type_len = reader.read("!L")[0]
5611 assert(_type_len == 81924)
5612 obj.value = reader.read("!L")[0]
5613 return obj
5614
5615 def __eq__(self, other):
5616 if type(self) != type(other): return False
5617 if self.value != other.value: return False
5618 return True
5619
5620 def pretty_print(self, q):
5621 q.text("tunnel_ipv4_dst {")
5622 with q.group():
5623 with q.indent(2):
5624 q.breakable()
5625 q.text("value = ");
5626 q.text(util.pretty_ipv4(self.value))
5627 q.breakable()
5628 q.text('}')
5629
5630oxm.subtypes[81924] = tunnel_ipv4_dst
5631
5632class tunnel_ipv4_dst_masked(oxm):
5633 type_len = 82184
5634
5635 def __init__(self, value=None, value_mask=None):
5636 if value != None:
5637 self.value = value
5638 else:
5639 self.value = 0
5640 if value_mask != None:
5641 self.value_mask = value_mask
5642 else:
5643 self.value_mask = 0
5644 return
5645
5646 def pack(self):
5647 packed = []
5648 packed.append(struct.pack("!L", self.type_len))
5649 packed.append(struct.pack("!L", self.value))
5650 packed.append(struct.pack("!L", self.value_mask))
5651 return ''.join(packed)
5652
5653 @staticmethod
5654 def unpack(reader):
5655 obj = tunnel_ipv4_dst_masked()
5656 _type_len = reader.read("!L")[0]
5657 assert(_type_len == 82184)
5658 obj.value = reader.read("!L")[0]
5659 obj.value_mask = reader.read("!L")[0]
5660 return obj
5661
5662 def __eq__(self, other):
5663 if type(self) != type(other): return False
5664 if self.value != other.value: return False
5665 if self.value_mask != other.value_mask: return False
5666 return True
5667
5668 def pretty_print(self, q):
5669 q.text("tunnel_ipv4_dst_masked {")
5670 with q.group():
5671 with q.indent(2):
5672 q.breakable()
5673 q.text("value = ");
5674 q.text(util.pretty_ipv4(self.value))
5675 q.text(","); q.breakable()
5676 q.text("value_mask = ");
5677 q.text(util.pretty_ipv4(self.value_mask))
5678 q.breakable()
5679 q.text('}')
5680
5681oxm.subtypes[82184] = tunnel_ipv4_dst_masked
5682
5683class tunnel_ipv4_src(oxm):
5684 type_len = 81412
5685
5686 def __init__(self, value=None):
5687 if value != None:
5688 self.value = value
5689 else:
5690 self.value = 0
5691 return
5692
5693 def pack(self):
5694 packed = []
5695 packed.append(struct.pack("!L", self.type_len))
5696 packed.append(struct.pack("!L", self.value))
5697 return ''.join(packed)
5698
5699 @staticmethod
5700 def unpack(reader):
5701 obj = tunnel_ipv4_src()
5702 _type_len = reader.read("!L")[0]
5703 assert(_type_len == 81412)
5704 obj.value = reader.read("!L")[0]
5705 return obj
5706
5707 def __eq__(self, other):
5708 if type(self) != type(other): return False
5709 if self.value != other.value: return False
5710 return True
5711
5712 def pretty_print(self, q):
5713 q.text("tunnel_ipv4_src {")
5714 with q.group():
5715 with q.indent(2):
5716 q.breakable()
5717 q.text("value = ");
5718 q.text(util.pretty_ipv4(self.value))
5719 q.breakable()
5720 q.text('}')
5721
5722oxm.subtypes[81412] = tunnel_ipv4_src
5723
5724class tunnel_ipv4_src_masked(oxm):
5725 type_len = 81672
5726
5727 def __init__(self, value=None, value_mask=None):
5728 if value != None:
5729 self.value = value
5730 else:
5731 self.value = 0
5732 if value_mask != None:
5733 self.value_mask = value_mask
5734 else:
5735 self.value_mask = 0
5736 return
5737
5738 def pack(self):
5739 packed = []
5740 packed.append(struct.pack("!L", self.type_len))
5741 packed.append(struct.pack("!L", self.value))
5742 packed.append(struct.pack("!L", self.value_mask))
5743 return ''.join(packed)
5744
5745 @staticmethod
5746 def unpack(reader):
5747 obj = tunnel_ipv4_src_masked()
5748 _type_len = reader.read("!L")[0]
5749 assert(_type_len == 81672)
5750 obj.value = reader.read("!L")[0]
5751 obj.value_mask = reader.read("!L")[0]
5752 return obj
5753
5754 def __eq__(self, other):
5755 if type(self) != type(other): return False
5756 if self.value != other.value: return False
5757 if self.value_mask != other.value_mask: return False
5758 return True
5759
5760 def pretty_print(self, q):
5761 q.text("tunnel_ipv4_src_masked {")
5762 with q.group():
5763 with q.indent(2):
5764 q.breakable()
5765 q.text("value = ");
5766 q.text(util.pretty_ipv4(self.value))
5767 q.text(","); q.breakable()
5768 q.text("value_mask = ");
5769 q.text(util.pretty_ipv4(self.value_mask))
5770 q.breakable()
5771 q.text('}')
5772
5773oxm.subtypes[81672] = tunnel_ipv4_src_masked
5774
5775class udp_dst(oxm):
5776 type_len = 2147491842
5777
5778 def __init__(self, value=None):
5779 if value != None:
5780 self.value = value
5781 else:
5782 self.value = 0
5783 return
5784
5785 def pack(self):
5786 packed = []
5787 packed.append(struct.pack("!L", self.type_len))
5788 packed.append(struct.pack("!H", self.value))
5789 return ''.join(packed)
5790
5791 @staticmethod
5792 def unpack(reader):
5793 obj = udp_dst()
5794 _type_len = reader.read("!L")[0]
5795 assert(_type_len == 2147491842)
5796 obj.value = reader.read("!H")[0]
5797 return obj
5798
5799 def __eq__(self, other):
5800 if type(self) != type(other): return False
5801 if self.value != other.value: return False
5802 return True
5803
5804 def pretty_print(self, q):
5805 q.text("udp_dst {")
5806 with q.group():
5807 with q.indent(2):
5808 q.breakable()
5809 q.text("value = ");
5810 q.text("%#x" % self.value)
5811 q.breakable()
5812 q.text('}')
5813
5814oxm.subtypes[2147491842] = udp_dst
5815
5816class udp_dst_masked(oxm):
5817 type_len = 2147492100
5818
5819 def __init__(self, value=None, value_mask=None):
5820 if value != None:
5821 self.value = value
5822 else:
5823 self.value = 0
5824 if value_mask != None:
5825 self.value_mask = value_mask
5826 else:
5827 self.value_mask = 0
5828 return
5829
5830 def pack(self):
5831 packed = []
5832 packed.append(struct.pack("!L", self.type_len))
5833 packed.append(struct.pack("!H", self.value))
5834 packed.append(struct.pack("!H", self.value_mask))
5835 return ''.join(packed)
5836
5837 @staticmethod
5838 def unpack(reader):
5839 obj = udp_dst_masked()
5840 _type_len = reader.read("!L")[0]
5841 assert(_type_len == 2147492100)
5842 obj.value = reader.read("!H")[0]
5843 obj.value_mask = reader.read("!H")[0]
5844 return obj
5845
5846 def __eq__(self, other):
5847 if type(self) != type(other): return False
5848 if self.value != other.value: return False
5849 if self.value_mask != other.value_mask: return False
5850 return True
5851
5852 def pretty_print(self, q):
5853 q.text("udp_dst_masked {")
5854 with q.group():
5855 with q.indent(2):
5856 q.breakable()
5857 q.text("value = ");
5858 q.text("%#x" % self.value)
5859 q.text(","); q.breakable()
5860 q.text("value_mask = ");
5861 q.text("%#x" % self.value_mask)
5862 q.breakable()
5863 q.text('}')
5864
5865oxm.subtypes[2147492100] = udp_dst_masked
5866
5867class udp_src(oxm):
5868 type_len = 2147491330
5869
5870 def __init__(self, value=None):
5871 if value != None:
5872 self.value = value
5873 else:
5874 self.value = 0
5875 return
5876
5877 def pack(self):
5878 packed = []
5879 packed.append(struct.pack("!L", self.type_len))
5880 packed.append(struct.pack("!H", self.value))
5881 return ''.join(packed)
5882
5883 @staticmethod
5884 def unpack(reader):
5885 obj = udp_src()
5886 _type_len = reader.read("!L")[0]
5887 assert(_type_len == 2147491330)
5888 obj.value = reader.read("!H")[0]
5889 return obj
5890
5891 def __eq__(self, other):
5892 if type(self) != type(other): return False
5893 if self.value != other.value: return False
5894 return True
5895
5896 def pretty_print(self, q):
5897 q.text("udp_src {")
5898 with q.group():
5899 with q.indent(2):
5900 q.breakable()
5901 q.text("value = ");
5902 q.text("%#x" % self.value)
5903 q.breakable()
5904 q.text('}')
5905
5906oxm.subtypes[2147491330] = udp_src
5907
5908class udp_src_masked(oxm):
5909 type_len = 2147491588
5910
5911 def __init__(self, value=None, value_mask=None):
5912 if value != None:
5913 self.value = value
5914 else:
5915 self.value = 0
5916 if value_mask != None:
5917 self.value_mask = value_mask
5918 else:
5919 self.value_mask = 0
5920 return
5921
5922 def pack(self):
5923 packed = []
5924 packed.append(struct.pack("!L", self.type_len))
5925 packed.append(struct.pack("!H", self.value))
5926 packed.append(struct.pack("!H", self.value_mask))
5927 return ''.join(packed)
5928
5929 @staticmethod
5930 def unpack(reader):
5931 obj = udp_src_masked()
5932 _type_len = reader.read("!L")[0]
5933 assert(_type_len == 2147491588)
5934 obj.value = reader.read("!H")[0]
5935 obj.value_mask = reader.read("!H")[0]
5936 return obj
5937
5938 def __eq__(self, other):
5939 if type(self) != type(other): return False
5940 if self.value != other.value: return False
5941 if self.value_mask != other.value_mask: return False
5942 return True
5943
5944 def pretty_print(self, q):
5945 q.text("udp_src_masked {")
5946 with q.group():
5947 with q.indent(2):
5948 q.breakable()
5949 q.text("value = ");
5950 q.text("%#x" % self.value)
5951 q.text(","); q.breakable()
5952 q.text("value_mask = ");
5953 q.text("%#x" % self.value_mask)
5954 q.breakable()
5955 q.text('}')
5956
5957oxm.subtypes[2147491588] = udp_src_masked
5958
5959class vlan_pcp(oxm):
5960 type_len = 2147487233
5961
5962 def __init__(self, value=None):
5963 if value != None:
5964 self.value = value
5965 else:
5966 self.value = 0
5967 return
5968
5969 def pack(self):
5970 packed = []
5971 packed.append(struct.pack("!L", self.type_len))
5972 packed.append(struct.pack("!B", self.value))
5973 return ''.join(packed)
5974
5975 @staticmethod
5976 def unpack(reader):
5977 obj = vlan_pcp()
5978 _type_len = reader.read("!L")[0]
5979 assert(_type_len == 2147487233)
5980 obj.value = reader.read("!B")[0]
5981 return obj
5982
5983 def __eq__(self, other):
5984 if type(self) != type(other): return False
5985 if self.value != other.value: return False
5986 return True
5987
5988 def pretty_print(self, q):
5989 q.text("vlan_pcp {")
5990 with q.group():
5991 with q.indent(2):
5992 q.breakable()
5993 q.text("value = ");
5994 q.text("%#x" % self.value)
5995 q.breakable()
5996 q.text('}')
5997
5998oxm.subtypes[2147487233] = vlan_pcp
5999
6000class vlan_pcp_masked(oxm):
6001 type_len = 2147487490
6002
6003 def __init__(self, value=None, value_mask=None):
6004 if value != None:
6005 self.value = value
6006 else:
6007 self.value = 0
6008 if value_mask != None:
6009 self.value_mask = value_mask
6010 else:
6011 self.value_mask = 0
6012 return
6013
6014 def pack(self):
6015 packed = []
6016 packed.append(struct.pack("!L", self.type_len))
6017 packed.append(struct.pack("!B", self.value))
6018 packed.append(struct.pack("!B", self.value_mask))
6019 return ''.join(packed)
6020
6021 @staticmethod
6022 def unpack(reader):
6023 obj = vlan_pcp_masked()
6024 _type_len = reader.read("!L")[0]
6025 assert(_type_len == 2147487490)
6026 obj.value = reader.read("!B")[0]
6027 obj.value_mask = reader.read("!B")[0]
6028 return obj
6029
6030 def __eq__(self, other):
6031 if type(self) != type(other): return False
6032 if self.value != other.value: return False
6033 if self.value_mask != other.value_mask: return False
6034 return True
6035
6036 def pretty_print(self, q):
6037 q.text("vlan_pcp_masked {")
6038 with q.group():
6039 with q.indent(2):
6040 q.breakable()
6041 q.text("value = ");
6042 q.text("%#x" % self.value)
6043 q.text(","); q.breakable()
6044 q.text("value_mask = ");
6045 q.text("%#x" % self.value_mask)
6046 q.breakable()
6047 q.text('}')
6048
6049oxm.subtypes[2147487490] = vlan_pcp_masked
6050
6051class vlan_vid(oxm):
6052 type_len = 2147486722
6053
6054 def __init__(self, value=None):
6055 if value != None:
6056 self.value = value
6057 else:
6058 self.value = 0
6059 return
6060
6061 def pack(self):
6062 packed = []
6063 packed.append(struct.pack("!L", self.type_len))
6064 packed.append(struct.pack("!H", self.value))
6065 return ''.join(packed)
6066
6067 @staticmethod
6068 def unpack(reader):
6069 obj = vlan_vid()
6070 _type_len = reader.read("!L")[0]
6071 assert(_type_len == 2147486722)
6072 obj.value = reader.read("!H")[0]
6073 return obj
6074
6075 def __eq__(self, other):
6076 if type(self) != type(other): return False
6077 if self.value != other.value: return False
6078 return True
6079
6080 def pretty_print(self, q):
6081 q.text("vlan_vid {")
6082 with q.group():
6083 with q.indent(2):
6084 q.breakable()
6085 q.text("value = ");
6086 q.text("%#x" % self.value)
6087 q.breakable()
6088 q.text('}')
6089
6090oxm.subtypes[2147486722] = vlan_vid
6091
6092class vlan_vid_masked(oxm):
6093 type_len = 2147486980
6094
6095 def __init__(self, value=None, value_mask=None):
6096 if value != None:
6097 self.value = value
6098 else:
6099 self.value = 0
6100 if value_mask != None:
6101 self.value_mask = value_mask
6102 else:
6103 self.value_mask = 0
6104 return
6105
6106 def pack(self):
6107 packed = []
6108 packed.append(struct.pack("!L", self.type_len))
6109 packed.append(struct.pack("!H", self.value))
6110 packed.append(struct.pack("!H", self.value_mask))
6111 return ''.join(packed)
6112
6113 @staticmethod
6114 def unpack(reader):
6115 obj = vlan_vid_masked()
6116 _type_len = reader.read("!L")[0]
6117 assert(_type_len == 2147486980)
6118 obj.value = reader.read("!H")[0]
6119 obj.value_mask = reader.read("!H")[0]
6120 return obj
6121
6122 def __eq__(self, other):
6123 if type(self) != type(other): return False
6124 if self.value != other.value: return False
6125 if self.value_mask != other.value_mask: return False
6126 return True
6127
6128 def pretty_print(self, q):
6129 q.text("vlan_vid_masked {")
6130 with q.group():
6131 with q.indent(2):
6132 q.breakable()
6133 q.text("value = ");
6134 q.text("%#x" % self.value)
6135 q.text(","); q.breakable()
6136 q.text("value_mask = ");
6137 q.text("%#x" % self.value_mask)
6138 q.breakable()
6139 q.text('}')
6140
6141oxm.subtypes[2147486980] = vlan_vid_masked
6142
6143