blob: 978529ad8573d06d75cd3dea86d1456fdad518cd [file] [log] [blame]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001# Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
2# Copyright (c) 2011, 2012 Open Networking Foundation
3# Copyright (c) 2012, 2013 Big Switch Networks, Inc.
Dan Talaycof6202252013-07-02 01:00:29 -07004# See the file LICENSE.pyloxi which should have been included in the source distribution
Rich Lanec2ee4b82013-04-24 17:12:38 -07005
Rich Lane7dcdf022013-12-11 14:45:27 -08006# Automatically generated by LOXI from template module.py
Rich Lanec2ee4b82013-04-24 17:12:38 -07007# Do not modify
8
9import struct
Rich Lane7dcdf022013-12-11 14:45:27 -080010import loxi
Rich Lanec2ee4b82013-04-24 17:12:38 -070011import const
Rich Lane7dcdf022013-12-11 14:45:27 -080012import common
13import action
14import instruction
15import oxm
Rich Lanec2ee4b82013-04-24 17:12:38 -070016import util
17import loxi.generic_util
Rich Lanec2ee4b82013-04-24 17:12:38 -070018
Rich Lane7dcdf022013-12-11 14:45:27 -080019class oxm(loxi.OFObject):
20 subtypes = {}
Rich Laned53156a2013-08-05 17:17:33 -070021
Rich Lane95f7fc92014-01-27 17:08:16 -080022
23 def __init__(self, type_len=None):
24 if type_len != None:
25 self.type_len = type_len
26 else:
27 self.type_len = 0
28 return
29
30 def pack(self):
31 packed = []
32 packed.append(struct.pack("!L", self.type_len))
33 return ''.join(packed)
34
Rich Lane7dcdf022013-12-11 14:45:27 -080035 @staticmethod
36 def unpack(reader):
37 subtype, = reader.peek('!L', 0)
Rich Lane95f7fc92014-01-27 17:08:16 -080038 subclass = oxm.subtypes.get(subtype)
39 if subclass:
40 return subclass.unpack(reader)
41
42 obj = oxm()
43 obj.type_len = reader.read("!L")[0]
44 return obj
45
46 def __eq__(self, other):
47 if type(self) != type(other): return False
48 if self.type_len != other.type_len: return False
49 return True
50
51 def pretty_print(self, q):
52 q.text("oxm {")
53 with q.group():
54 with q.indent(2):
55 q.breakable()
56 q.breakable()
57 q.text('}')
Rich Lanec2ee4b82013-04-24 17:12:38 -070058
Rich Lanec2ee4b82013-04-24 17:12:38 -070059
Rich Lane7dcdf022013-12-11 14:45:27 -080060class arp_op(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -070061 type_len = 2147494402
Rich Lanec2ee4b82013-04-24 17:12:38 -070062
63 def __init__(self, value=None):
64 if value != None:
65 self.value = value
66 else:
67 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -080068 return
Rich Lanec2ee4b82013-04-24 17:12:38 -070069
70 def pack(self):
71 packed = []
72 packed.append(struct.pack("!L", self.type_len))
73 packed.append(struct.pack("!H", self.value))
74 return ''.join(packed)
75
76 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -080077 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -070078 obj = arp_op()
Dan Talaycof6202252013-07-02 01:00:29 -070079 _type_len = reader.read("!L")[0]
80 assert(_type_len == 2147494402)
81 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -070082 return obj
83
84 def __eq__(self, other):
85 if type(self) != type(other): return False
86 if self.value != other.value: return False
87 return True
88
Rich Lanec2ee4b82013-04-24 17:12:38 -070089 def pretty_print(self, q):
90 q.text("arp_op {")
91 with q.group():
92 with q.indent(2):
93 q.breakable()
94 q.text("value = ");
95 q.text("%#x" % self.value)
96 q.breakable()
97 q.text('}')
98
Rich Lane7dcdf022013-12-11 14:45:27 -080099oxm.subtypes[2147494402] = arp_op
100
101class arp_op_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700102 type_len = 2147494660
Rich Lanec2ee4b82013-04-24 17:12:38 -0700103
104 def __init__(self, value=None, value_mask=None):
105 if value != None:
106 self.value = value
107 else:
108 self.value = 0
109 if value_mask != None:
110 self.value_mask = value_mask
111 else:
112 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800113 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700114
115 def pack(self):
116 packed = []
117 packed.append(struct.pack("!L", self.type_len))
118 packed.append(struct.pack("!H", self.value))
119 packed.append(struct.pack("!H", self.value_mask))
120 return ''.join(packed)
121
122 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800123 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700124 obj = arp_op_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700125 _type_len = reader.read("!L")[0]
126 assert(_type_len == 2147494660)
127 obj.value = reader.read("!H")[0]
128 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700129 return obj
130
131 def __eq__(self, other):
132 if type(self) != type(other): return False
133 if self.value != other.value: return False
134 if self.value_mask != other.value_mask: return False
135 return True
136
Rich Lanec2ee4b82013-04-24 17:12:38 -0700137 def pretty_print(self, q):
138 q.text("arp_op_masked {")
139 with q.group():
140 with q.indent(2):
141 q.breakable()
142 q.text("value = ");
143 q.text("%#x" % self.value)
144 q.text(","); q.breakable()
145 q.text("value_mask = ");
146 q.text("%#x" % self.value_mask)
147 q.breakable()
148 q.text('}')
149
Rich Lane7dcdf022013-12-11 14:45:27 -0800150oxm.subtypes[2147494660] = arp_op_masked
151
152class arp_sha(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700153 type_len = 2147495942
Rich Lanec2ee4b82013-04-24 17:12:38 -0700154
155 def __init__(self, value=None):
156 if value != None:
157 self.value = value
158 else:
159 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800160 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700161
162 def pack(self):
163 packed = []
164 packed.append(struct.pack("!L", self.type_len))
165 packed.append(struct.pack("!6B", *self.value))
166 return ''.join(packed)
167
168 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800169 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700170 obj = arp_sha()
Dan Talaycof6202252013-07-02 01:00:29 -0700171 _type_len = reader.read("!L")[0]
172 assert(_type_len == 2147495942)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700173 obj.value = list(reader.read('!6B'))
174 return obj
175
176 def __eq__(self, other):
177 if type(self) != type(other): return False
178 if self.value != other.value: return False
179 return True
180
Rich Lanec2ee4b82013-04-24 17:12:38 -0700181 def pretty_print(self, q):
182 q.text("arp_sha {")
183 with q.group():
184 with q.indent(2):
185 q.breakable()
186 q.text("value = ");
187 q.text(util.pretty_mac(self.value))
188 q.breakable()
189 q.text('}')
190
Rich Lane7dcdf022013-12-11 14:45:27 -0800191oxm.subtypes[2147495942] = arp_sha
192
193class arp_sha_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700194 type_len = 2147496204
Rich Lanec2ee4b82013-04-24 17:12:38 -0700195
196 def __init__(self, value=None, value_mask=None):
197 if value != None:
198 self.value = value
199 else:
200 self.value = [0,0,0,0,0,0]
201 if value_mask != None:
202 self.value_mask = value_mask
203 else:
204 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800205 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700206
207 def pack(self):
208 packed = []
209 packed.append(struct.pack("!L", self.type_len))
210 packed.append(struct.pack("!6B", *self.value))
211 packed.append(struct.pack("!6B", *self.value_mask))
212 return ''.join(packed)
213
214 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800215 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700216 obj = arp_sha_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700217 _type_len = reader.read("!L")[0]
218 assert(_type_len == 2147496204)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700219 obj.value = list(reader.read('!6B'))
220 obj.value_mask = list(reader.read('!6B'))
221 return obj
222
223 def __eq__(self, other):
224 if type(self) != type(other): return False
225 if self.value != other.value: return False
226 if self.value_mask != other.value_mask: return False
227 return True
228
Rich Lanec2ee4b82013-04-24 17:12:38 -0700229 def pretty_print(self, q):
230 q.text("arp_sha_masked {")
231 with q.group():
232 with q.indent(2):
233 q.breakable()
234 q.text("value = ");
235 q.text(util.pretty_mac(self.value))
236 q.text(","); q.breakable()
237 q.text("value_mask = ");
238 q.text(util.pretty_mac(self.value_mask))
239 q.breakable()
240 q.text('}')
241
Rich Lane7dcdf022013-12-11 14:45:27 -0800242oxm.subtypes[2147496204] = arp_sha_masked
243
244class arp_spa(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700245 type_len = 2147494916
Rich Lanec2ee4b82013-04-24 17:12:38 -0700246
247 def __init__(self, value=None):
248 if value != None:
249 self.value = value
250 else:
251 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800252 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700253
254 def pack(self):
255 packed = []
256 packed.append(struct.pack("!L", self.type_len))
257 packed.append(struct.pack("!L", self.value))
258 return ''.join(packed)
259
260 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800261 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700262 obj = arp_spa()
Dan Talaycof6202252013-07-02 01:00:29 -0700263 _type_len = reader.read("!L")[0]
264 assert(_type_len == 2147494916)
265 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700266 return obj
267
268 def __eq__(self, other):
269 if type(self) != type(other): return False
270 if self.value != other.value: return False
271 return True
272
Rich Lanec2ee4b82013-04-24 17:12:38 -0700273 def pretty_print(self, q):
274 q.text("arp_spa {")
275 with q.group():
276 with q.indent(2):
277 q.breakable()
278 q.text("value = ");
279 q.text("%#x" % self.value)
280 q.breakable()
281 q.text('}')
282
Rich Lane7dcdf022013-12-11 14:45:27 -0800283oxm.subtypes[2147494916] = arp_spa
284
285class arp_spa_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700286 type_len = 2147495176
Rich Lanec2ee4b82013-04-24 17:12:38 -0700287
288 def __init__(self, value=None, value_mask=None):
289 if value != None:
290 self.value = value
291 else:
292 self.value = 0
293 if value_mask != None:
294 self.value_mask = value_mask
295 else:
296 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800297 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700298
299 def pack(self):
300 packed = []
301 packed.append(struct.pack("!L", self.type_len))
302 packed.append(struct.pack("!L", self.value))
303 packed.append(struct.pack("!L", self.value_mask))
304 return ''.join(packed)
305
306 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800307 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700308 obj = arp_spa_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700309 _type_len = reader.read("!L")[0]
310 assert(_type_len == 2147495176)
311 obj.value = reader.read("!L")[0]
312 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700313 return obj
314
315 def __eq__(self, other):
316 if type(self) != type(other): return False
317 if self.value != other.value: return False
318 if self.value_mask != other.value_mask: return False
319 return True
320
Rich Lanec2ee4b82013-04-24 17:12:38 -0700321 def pretty_print(self, q):
322 q.text("arp_spa_masked {")
323 with q.group():
324 with q.indent(2):
325 q.breakable()
326 q.text("value = ");
327 q.text("%#x" % self.value)
328 q.text(","); q.breakable()
329 q.text("value_mask = ");
330 q.text("%#x" % self.value_mask)
331 q.breakable()
332 q.text('}')
333
Rich Lane7dcdf022013-12-11 14:45:27 -0800334oxm.subtypes[2147495176] = arp_spa_masked
335
336class arp_tha(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700337 type_len = 2147496454
Rich Lanec2ee4b82013-04-24 17:12:38 -0700338
339 def __init__(self, value=None):
340 if value != None:
341 self.value = value
342 else:
343 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800344 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700345
346 def pack(self):
347 packed = []
348 packed.append(struct.pack("!L", self.type_len))
349 packed.append(struct.pack("!6B", *self.value))
350 return ''.join(packed)
351
352 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800353 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700354 obj = arp_tha()
Dan Talaycof6202252013-07-02 01:00:29 -0700355 _type_len = reader.read("!L")[0]
356 assert(_type_len == 2147496454)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700357 obj.value = list(reader.read('!6B'))
358 return obj
359
360 def __eq__(self, other):
361 if type(self) != type(other): return False
362 if self.value != other.value: return False
363 return True
364
Rich Lanec2ee4b82013-04-24 17:12:38 -0700365 def pretty_print(self, q):
366 q.text("arp_tha {")
367 with q.group():
368 with q.indent(2):
369 q.breakable()
370 q.text("value = ");
371 q.text(util.pretty_mac(self.value))
372 q.breakable()
373 q.text('}')
374
Rich Lane7dcdf022013-12-11 14:45:27 -0800375oxm.subtypes[2147496454] = arp_tha
376
377class arp_tha_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700378 type_len = 2147496716
Rich Lanec2ee4b82013-04-24 17:12:38 -0700379
380 def __init__(self, value=None, value_mask=None):
381 if value != None:
382 self.value = value
383 else:
384 self.value = [0,0,0,0,0,0]
385 if value_mask != None:
386 self.value_mask = value_mask
387 else:
388 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800389 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700390
391 def pack(self):
392 packed = []
393 packed.append(struct.pack("!L", self.type_len))
394 packed.append(struct.pack("!6B", *self.value))
395 packed.append(struct.pack("!6B", *self.value_mask))
396 return ''.join(packed)
397
398 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800399 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700400 obj = arp_tha_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700401 _type_len = reader.read("!L")[0]
402 assert(_type_len == 2147496716)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700403 obj.value = list(reader.read('!6B'))
404 obj.value_mask = list(reader.read('!6B'))
405 return obj
406
407 def __eq__(self, other):
408 if type(self) != type(other): return False
409 if self.value != other.value: return False
410 if self.value_mask != other.value_mask: return False
411 return True
412
Rich Lanec2ee4b82013-04-24 17:12:38 -0700413 def pretty_print(self, q):
414 q.text("arp_tha_masked {")
415 with q.group():
416 with q.indent(2):
417 q.breakable()
418 q.text("value = ");
419 q.text(util.pretty_mac(self.value))
420 q.text(","); q.breakable()
421 q.text("value_mask = ");
422 q.text(util.pretty_mac(self.value_mask))
423 q.breakable()
424 q.text('}')
425
Rich Lane7dcdf022013-12-11 14:45:27 -0800426oxm.subtypes[2147496716] = arp_tha_masked
427
428class arp_tpa(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700429 type_len = 2147495428
Rich Lanec2ee4b82013-04-24 17:12:38 -0700430
431 def __init__(self, value=None):
432 if value != None:
433 self.value = value
434 else:
435 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800436 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700437
438 def pack(self):
439 packed = []
440 packed.append(struct.pack("!L", self.type_len))
441 packed.append(struct.pack("!L", self.value))
442 return ''.join(packed)
443
444 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800445 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700446 obj = arp_tpa()
Dan Talaycof6202252013-07-02 01:00:29 -0700447 _type_len = reader.read("!L")[0]
448 assert(_type_len == 2147495428)
449 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700450 return obj
451
452 def __eq__(self, other):
453 if type(self) != type(other): return False
454 if self.value != other.value: return False
455 return True
456
Rich Lanec2ee4b82013-04-24 17:12:38 -0700457 def pretty_print(self, q):
458 q.text("arp_tpa {")
459 with q.group():
460 with q.indent(2):
461 q.breakable()
462 q.text("value = ");
463 q.text("%#x" % self.value)
464 q.breakable()
465 q.text('}')
466
Rich Lane7dcdf022013-12-11 14:45:27 -0800467oxm.subtypes[2147495428] = arp_tpa
468
469class arp_tpa_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700470 type_len = 2147495688
Rich Lanec2ee4b82013-04-24 17:12:38 -0700471
472 def __init__(self, value=None, value_mask=None):
473 if value != None:
474 self.value = value
475 else:
476 self.value = 0
477 if value_mask != None:
478 self.value_mask = value_mask
479 else:
480 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800481 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700482
483 def pack(self):
484 packed = []
485 packed.append(struct.pack("!L", self.type_len))
486 packed.append(struct.pack("!L", self.value))
487 packed.append(struct.pack("!L", self.value_mask))
488 return ''.join(packed)
489
490 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800491 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700492 obj = arp_tpa_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700493 _type_len = reader.read("!L")[0]
494 assert(_type_len == 2147495688)
495 obj.value = reader.read("!L")[0]
496 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700497 return obj
498
499 def __eq__(self, other):
500 if type(self) != type(other): return False
501 if self.value != other.value: return False
502 if self.value_mask != other.value_mask: return False
503 return True
504
Rich Lanec2ee4b82013-04-24 17:12:38 -0700505 def pretty_print(self, q):
506 q.text("arp_tpa_masked {")
507 with q.group():
508 with q.indent(2):
509 q.breakable()
510 q.text("value = ");
511 q.text("%#x" % self.value)
512 q.text(","); q.breakable()
513 q.text("value_mask = ");
514 q.text("%#x" % self.value_mask)
515 q.breakable()
516 q.text('}')
517
Rich Lane7dcdf022013-12-11 14:45:27 -0800518oxm.subtypes[2147495688] = arp_tpa_masked
519
Rich Lanec0d05d12014-03-11 18:02:24 -0700520class bsn_egr_port_group_id(oxm):
521 type_len = 200196
522
523 def __init__(self, value=None):
524 if value != None:
525 self.value = value
526 else:
527 self.value = 0
528 return
529
530 def pack(self):
531 packed = []
532 packed.append(struct.pack("!L", self.type_len))
533 packed.append(struct.pack("!L", self.value))
534 return ''.join(packed)
535
536 @staticmethod
537 def unpack(reader):
538 obj = bsn_egr_port_group_id()
539 _type_len = reader.read("!L")[0]
540 assert(_type_len == 200196)
541 obj.value = reader.read("!L")[0]
542 return obj
543
544 def __eq__(self, other):
545 if type(self) != type(other): return False
546 if self.value != other.value: return False
547 return True
548
549 def pretty_print(self, q):
550 q.text("bsn_egr_port_group_id {")
551 with q.group():
552 with q.indent(2):
553 q.breakable()
554 q.text("value = ");
555 q.text("%#x" % self.value)
556 q.breakable()
557 q.text('}')
558
559oxm.subtypes[200196] = bsn_egr_port_group_id
560
561class bsn_egr_port_group_id_masked(oxm):
562 type_len = 200456
563
564 def __init__(self, value=None, value_mask=None):
565 if value != None:
566 self.value = value
567 else:
568 self.value = 0
569 if value_mask != None:
570 self.value_mask = value_mask
571 else:
572 self.value_mask = 0
573 return
574
575 def pack(self):
576 packed = []
577 packed.append(struct.pack("!L", self.type_len))
578 packed.append(struct.pack("!L", self.value))
579 packed.append(struct.pack("!L", self.value_mask))
580 return ''.join(packed)
581
582 @staticmethod
583 def unpack(reader):
584 obj = bsn_egr_port_group_id_masked()
585 _type_len = reader.read("!L")[0]
586 assert(_type_len == 200456)
587 obj.value = reader.read("!L")[0]
588 obj.value_mask = reader.read("!L")[0]
589 return obj
590
591 def __eq__(self, other):
592 if type(self) != type(other): return False
593 if self.value != other.value: return False
594 if self.value_mask != other.value_mask: return False
595 return True
596
597 def pretty_print(self, q):
598 q.text("bsn_egr_port_group_id_masked {")
599 with q.group():
600 with q.indent(2):
601 q.breakable()
602 q.text("value = ");
603 q.text("%#x" % self.value)
604 q.text(","); q.breakable()
605 q.text("value_mask = ");
606 q.text("%#x" % self.value_mask)
607 q.breakable()
608 q.text('}')
609
610oxm.subtypes[200456] = bsn_egr_port_group_id_masked
611
Rich Lane7dcdf022013-12-11 14:45:27 -0800612class bsn_global_vrf_allowed(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800613 type_len = 198145
614
615 def __init__(self, value=None):
616 if value != None:
617 self.value = value
618 else:
619 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800620 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800621
622 def pack(self):
623 packed = []
624 packed.append(struct.pack("!L", self.type_len))
625 packed.append(struct.pack("!B", self.value))
626 return ''.join(packed)
627
628 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800629 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800630 obj = bsn_global_vrf_allowed()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800631 _type_len = reader.read("!L")[0]
632 assert(_type_len == 198145)
633 obj.value = reader.read("!B")[0]
634 return obj
635
636 def __eq__(self, other):
637 if type(self) != type(other): return False
638 if self.value != other.value: return False
639 return True
640
Rich Laned9e3f7b2013-11-04 11:40:43 -0800641 def pretty_print(self, q):
642 q.text("bsn_global_vrf_allowed {")
643 with q.group():
644 with q.indent(2):
645 q.breakable()
646 q.text("value = ");
647 q.text("%#x" % self.value)
648 q.breakable()
649 q.text('}')
650
Rich Lane7dcdf022013-12-11 14:45:27 -0800651oxm.subtypes[198145] = bsn_global_vrf_allowed
652
653class bsn_global_vrf_allowed_masked(oxm):
654 type_len = 198402
Rich Laned9e3f7b2013-11-04 11:40:43 -0800655
656 def __init__(self, value=None, value_mask=None):
657 if value != None:
658 self.value = value
659 else:
660 self.value = 0
661 if value_mask != None:
662 self.value_mask = value_mask
663 else:
664 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800665 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800666
667 def pack(self):
668 packed = []
669 packed.append(struct.pack("!L", self.type_len))
670 packed.append(struct.pack("!B", self.value))
671 packed.append(struct.pack("!B", self.value_mask))
672 return ''.join(packed)
673
674 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800675 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800676 obj = bsn_global_vrf_allowed_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800677 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800678 assert(_type_len == 198402)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800679 obj.value = reader.read("!B")[0]
680 obj.value_mask = reader.read("!B")[0]
681 return obj
682
683 def __eq__(self, other):
684 if type(self) != type(other): return False
685 if self.value != other.value: return False
686 if self.value_mask != other.value_mask: return False
687 return True
688
Rich Laned9e3f7b2013-11-04 11:40:43 -0800689 def pretty_print(self, q):
690 q.text("bsn_global_vrf_allowed_masked {")
691 with q.group():
692 with q.indent(2):
693 q.breakable()
694 q.text("value = ");
695 q.text("%#x" % self.value)
696 q.text(","); q.breakable()
697 q.text("value_mask = ");
698 q.text("%#x" % self.value_mask)
699 q.breakable()
700 q.text('}')
701
Rich Lane7dcdf022013-12-11 14:45:27 -0800702oxm.subtypes[198402] = bsn_global_vrf_allowed_masked
703
704class bsn_in_ports_128(oxm):
705 type_len = 196624
Rich Lane6f4978c2013-10-20 21:33:52 -0700706
707 def __init__(self, value=None):
708 if value != None:
709 self.value = value
710 else:
711 self.value = set()
Rich Lane7dcdf022013-12-11 14:45:27 -0800712 return
Rich Lane6f4978c2013-10-20 21:33:52 -0700713
714 def pack(self):
715 packed = []
716 packed.append(struct.pack("!L", self.type_len))
717 packed.append(util.pack_bitmap_128(self.value))
718 return ''.join(packed)
719
720 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800721 def unpack(reader):
Rich Lane6f4978c2013-10-20 21:33:52 -0700722 obj = bsn_in_ports_128()
Rich Lane6f4978c2013-10-20 21:33:52 -0700723 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800724 assert(_type_len == 196624)
Rich Lane6f4978c2013-10-20 21:33:52 -0700725 obj.value = util.unpack_bitmap_128(reader)
726 return obj
727
728 def __eq__(self, other):
729 if type(self) != type(other): return False
730 if self.value != other.value: return False
731 return True
732
Rich Lane6f4978c2013-10-20 21:33:52 -0700733 def pretty_print(self, q):
734 q.text("bsn_in_ports_128 {")
735 with q.group():
736 with q.indent(2):
737 q.breakable()
738 q.text("value = ");
739 q.pp(self.value)
740 q.breakable()
741 q.text('}')
742
Rich Lane7dcdf022013-12-11 14:45:27 -0800743oxm.subtypes[196624] = bsn_in_ports_128
744
745class bsn_in_ports_128_masked(oxm):
Rich Lane6f4978c2013-10-20 21:33:52 -0700746 type_len = 196896
747
748 def __init__(self, value=None, value_mask=None):
749 if value != None:
750 self.value = value
751 else:
752 self.value = set()
753 if value_mask != None:
754 self.value_mask = value_mask
755 else:
756 self.value_mask = set()
Rich Lane7dcdf022013-12-11 14:45:27 -0800757 return
Rich Lane6f4978c2013-10-20 21:33:52 -0700758
759 def pack(self):
760 packed = []
761 packed.append(struct.pack("!L", self.type_len))
762 packed.append(util.pack_bitmap_128(self.value))
763 packed.append(util.pack_bitmap_128(self.value_mask))
764 return ''.join(packed)
765
766 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800767 def unpack(reader):
Rich Lane6f4978c2013-10-20 21:33:52 -0700768 obj = bsn_in_ports_128_masked()
Rich Lane6f4978c2013-10-20 21:33:52 -0700769 _type_len = reader.read("!L")[0]
770 assert(_type_len == 196896)
771 obj.value = util.unpack_bitmap_128(reader)
772 obj.value_mask = util.unpack_bitmap_128(reader)
773 return obj
774
775 def __eq__(self, other):
776 if type(self) != type(other): return False
777 if self.value != other.value: return False
778 if self.value_mask != other.value_mask: return False
779 return True
780
Rich Lane6f4978c2013-10-20 21:33:52 -0700781 def pretty_print(self, q):
782 q.text("bsn_in_ports_128_masked {")
783 with q.group():
784 with q.indent(2):
785 q.breakable()
786 q.text("value = ");
787 q.pp(self.value)
788 q.text(","); q.breakable()
789 q.text("value_mask = ");
790 q.pp(self.value_mask)
791 q.breakable()
792 q.text('}')
793
Rich Lane7dcdf022013-12-11 14:45:27 -0800794oxm.subtypes[196896] = bsn_in_ports_128_masked
795
796class bsn_l3_dst_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800797 type_len = 199684
798
799 def __init__(self, value=None):
800 if value != None:
801 self.value = value
802 else:
803 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800804 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800805
806 def pack(self):
807 packed = []
808 packed.append(struct.pack("!L", self.type_len))
809 packed.append(struct.pack("!L", self.value))
810 return ''.join(packed)
811
812 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800813 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800814 obj = bsn_l3_dst_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800815 _type_len = reader.read("!L")[0]
816 assert(_type_len == 199684)
817 obj.value = reader.read("!L")[0]
818 return obj
819
820 def __eq__(self, other):
821 if type(self) != type(other): return False
822 if self.value != other.value: return False
823 return True
824
Rich Laned9e3f7b2013-11-04 11:40:43 -0800825 def pretty_print(self, q):
826 q.text("bsn_l3_dst_class_id {")
827 with q.group():
828 with q.indent(2):
829 q.breakable()
830 q.text("value = ");
831 q.text("%#x" % self.value)
832 q.breakable()
833 q.text('}')
834
Rich Lane7dcdf022013-12-11 14:45:27 -0800835oxm.subtypes[199684] = bsn_l3_dst_class_id
836
837class bsn_l3_dst_class_id_masked(oxm):
838 type_len = 199944
Rich Laned9e3f7b2013-11-04 11:40:43 -0800839
840 def __init__(self, value=None, value_mask=None):
841 if value != None:
842 self.value = value
843 else:
844 self.value = 0
845 if value_mask != None:
846 self.value_mask = value_mask
847 else:
848 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800849 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800850
851 def pack(self):
852 packed = []
853 packed.append(struct.pack("!L", self.type_len))
854 packed.append(struct.pack("!L", self.value))
855 packed.append(struct.pack("!L", self.value_mask))
856 return ''.join(packed)
857
858 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800859 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800860 obj = bsn_l3_dst_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800861 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800862 assert(_type_len == 199944)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800863 obj.value = reader.read("!L")[0]
864 obj.value_mask = reader.read("!L")[0]
865 return obj
866
867 def __eq__(self, other):
868 if type(self) != type(other): return False
869 if self.value != other.value: return False
870 if self.value_mask != other.value_mask: return False
871 return True
872
Rich Laned9e3f7b2013-11-04 11:40:43 -0800873 def pretty_print(self, q):
874 q.text("bsn_l3_dst_class_id_masked {")
875 with q.group():
876 with q.indent(2):
877 q.breakable()
878 q.text("value = ");
879 q.text("%#x" % self.value)
880 q.text(","); q.breakable()
881 q.text("value_mask = ");
882 q.text("%#x" % self.value_mask)
883 q.breakable()
884 q.text('}')
885
Rich Lane7dcdf022013-12-11 14:45:27 -0800886oxm.subtypes[199944] = bsn_l3_dst_class_id_masked
887
888class bsn_l3_interface_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800889 type_len = 198660
890
891 def __init__(self, value=None):
892 if value != None:
893 self.value = value
894 else:
895 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800896 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800897
898 def pack(self):
899 packed = []
900 packed.append(struct.pack("!L", self.type_len))
901 packed.append(struct.pack("!L", self.value))
902 return ''.join(packed)
903
904 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800905 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800906 obj = bsn_l3_interface_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800907 _type_len = reader.read("!L")[0]
908 assert(_type_len == 198660)
909 obj.value = reader.read("!L")[0]
910 return obj
911
912 def __eq__(self, other):
913 if type(self) != type(other): return False
914 if self.value != other.value: return False
915 return True
916
Rich Laned9e3f7b2013-11-04 11:40:43 -0800917 def pretty_print(self, q):
918 q.text("bsn_l3_interface_class_id {")
919 with q.group():
920 with q.indent(2):
921 q.breakable()
922 q.text("value = ");
923 q.text("%#x" % self.value)
924 q.breakable()
925 q.text('}')
926
Rich Lane7dcdf022013-12-11 14:45:27 -0800927oxm.subtypes[198660] = bsn_l3_interface_class_id
928
929class bsn_l3_interface_class_id_masked(oxm):
930 type_len = 198920
Rich Laned9e3f7b2013-11-04 11:40:43 -0800931
932 def __init__(self, value=None, value_mask=None):
933 if value != None:
934 self.value = value
935 else:
936 self.value = 0
937 if value_mask != None:
938 self.value_mask = value_mask
939 else:
940 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800941 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800942
943 def pack(self):
944 packed = []
945 packed.append(struct.pack("!L", self.type_len))
946 packed.append(struct.pack("!L", self.value))
947 packed.append(struct.pack("!L", self.value_mask))
948 return ''.join(packed)
949
950 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800951 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800952 obj = bsn_l3_interface_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800953 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800954 assert(_type_len == 198920)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800955 obj.value = reader.read("!L")[0]
956 obj.value_mask = reader.read("!L")[0]
957 return obj
958
959 def __eq__(self, other):
960 if type(self) != type(other): return False
961 if self.value != other.value: return False
962 if self.value_mask != other.value_mask: return False
963 return True
964
Rich Laned9e3f7b2013-11-04 11:40:43 -0800965 def pretty_print(self, q):
966 q.text("bsn_l3_interface_class_id_masked {")
967 with q.group():
968 with q.indent(2):
969 q.breakable()
970 q.text("value = ");
971 q.text("%#x" % self.value)
972 q.text(","); q.breakable()
973 q.text("value_mask = ");
974 q.text("%#x" % self.value_mask)
975 q.breakable()
976 q.text('}')
977
Rich Lane7dcdf022013-12-11 14:45:27 -0800978oxm.subtypes[198920] = bsn_l3_interface_class_id_masked
979
980class bsn_l3_src_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800981 type_len = 199172
982
983 def __init__(self, value=None):
984 if value != None:
985 self.value = value
986 else:
987 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800988 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800989
990 def pack(self):
991 packed = []
992 packed.append(struct.pack("!L", self.type_len))
993 packed.append(struct.pack("!L", self.value))
994 return ''.join(packed)
995
996 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800997 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800998 obj = bsn_l3_src_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800999 _type_len = reader.read("!L")[0]
1000 assert(_type_len == 199172)
1001 obj.value = reader.read("!L")[0]
1002 return obj
1003
1004 def __eq__(self, other):
1005 if type(self) != type(other): return False
1006 if self.value != other.value: return False
1007 return True
1008
Rich Laned9e3f7b2013-11-04 11:40:43 -08001009 def pretty_print(self, q):
1010 q.text("bsn_l3_src_class_id {")
1011 with q.group():
1012 with q.indent(2):
1013 q.breakable()
1014 q.text("value = ");
1015 q.text("%#x" % self.value)
1016 q.breakable()
1017 q.text('}')
1018
Rich Lane7dcdf022013-12-11 14:45:27 -08001019oxm.subtypes[199172] = bsn_l3_src_class_id
1020
1021class bsn_l3_src_class_id_masked(oxm):
1022 type_len = 199432
Rich Laned9e3f7b2013-11-04 11:40:43 -08001023
1024 def __init__(self, value=None, value_mask=None):
1025 if value != None:
1026 self.value = value
1027 else:
1028 self.value = 0
1029 if value_mask != None:
1030 self.value_mask = value_mask
1031 else:
1032 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001033 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001034
1035 def pack(self):
1036 packed = []
1037 packed.append(struct.pack("!L", self.type_len))
1038 packed.append(struct.pack("!L", self.value))
1039 packed.append(struct.pack("!L", self.value_mask))
1040 return ''.join(packed)
1041
1042 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001043 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001044 obj = bsn_l3_src_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001045 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001046 assert(_type_len == 199432)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001047 obj.value = reader.read("!L")[0]
1048 obj.value_mask = reader.read("!L")[0]
1049 return obj
1050
1051 def __eq__(self, other):
1052 if type(self) != type(other): return False
1053 if self.value != other.value: return False
1054 if self.value_mask != other.value_mask: return False
1055 return True
1056
Rich Laned9e3f7b2013-11-04 11:40:43 -08001057 def pretty_print(self, q):
1058 q.text("bsn_l3_src_class_id_masked {")
1059 with q.group():
1060 with q.indent(2):
1061 q.breakable()
1062 q.text("value = ");
1063 q.text("%#x" % self.value)
1064 q.text(","); q.breakable()
1065 q.text("value_mask = ");
1066 q.text("%#x" % self.value_mask)
1067 q.breakable()
1068 q.text('}')
1069
Rich Lane7dcdf022013-12-11 14:45:27 -08001070oxm.subtypes[199432] = bsn_l3_src_class_id_masked
1071
1072class bsn_lag_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001073 type_len = 197124
1074
1075 def __init__(self, value=None):
1076 if value != None:
1077 self.value = value
1078 else:
1079 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001080 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001081
1082 def pack(self):
1083 packed = []
1084 packed.append(struct.pack("!L", self.type_len))
1085 packed.append(struct.pack("!L", self.value))
1086 return ''.join(packed)
1087
1088 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001089 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001090 obj = bsn_lag_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001091 _type_len = reader.read("!L")[0]
1092 assert(_type_len == 197124)
1093 obj.value = reader.read("!L")[0]
1094 return obj
1095
1096 def __eq__(self, other):
1097 if type(self) != type(other): return False
1098 if self.value != other.value: return False
1099 return True
1100
Rich Laned9e3f7b2013-11-04 11:40:43 -08001101 def pretty_print(self, q):
1102 q.text("bsn_lag_id {")
1103 with q.group():
1104 with q.indent(2):
1105 q.breakable()
1106 q.text("value = ");
1107 q.text("%#x" % self.value)
1108 q.breakable()
1109 q.text('}')
1110
Rich Lane7dcdf022013-12-11 14:45:27 -08001111oxm.subtypes[197124] = bsn_lag_id
1112
1113class bsn_lag_id_masked(oxm):
1114 type_len = 197384
Rich Laned9e3f7b2013-11-04 11:40:43 -08001115
1116 def __init__(self, value=None, value_mask=None):
1117 if value != None:
1118 self.value = value
1119 else:
1120 self.value = 0
1121 if value_mask != None:
1122 self.value_mask = value_mask
1123 else:
1124 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001125 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001126
1127 def pack(self):
1128 packed = []
1129 packed.append(struct.pack("!L", self.type_len))
1130 packed.append(struct.pack("!L", self.value))
1131 packed.append(struct.pack("!L", self.value_mask))
1132 return ''.join(packed)
1133
1134 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001135 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001136 obj = bsn_lag_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001137 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001138 assert(_type_len == 197384)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001139 obj.value = reader.read("!L")[0]
1140 obj.value_mask = reader.read("!L")[0]
1141 return obj
1142
1143 def __eq__(self, other):
1144 if type(self) != type(other): return False
1145 if self.value != other.value: return False
1146 if self.value_mask != other.value_mask: return False
1147 return True
1148
Rich Laned9e3f7b2013-11-04 11:40:43 -08001149 def pretty_print(self, q):
1150 q.text("bsn_lag_id_masked {")
1151 with q.group():
1152 with q.indent(2):
1153 q.breakable()
1154 q.text("value = ");
1155 q.text("%#x" % self.value)
1156 q.text(","); q.breakable()
1157 q.text("value_mask = ");
1158 q.text("%#x" % self.value_mask)
1159 q.breakable()
1160 q.text('}')
1161
Rich Lane7dcdf022013-12-11 14:45:27 -08001162oxm.subtypes[197384] = bsn_lag_id_masked
1163
Rich Lane93b33132014-04-21 12:20:58 -07001164class bsn_udf0(oxm):
1165 type_len = 200708
1166
1167 def __init__(self, value=None):
1168 if value != None:
1169 self.value = value
1170 else:
1171 self.value = 0
1172 return
1173
1174 def pack(self):
1175 packed = []
1176 packed.append(struct.pack("!L", self.type_len))
1177 packed.append(struct.pack("!L", self.value))
1178 return ''.join(packed)
1179
1180 @staticmethod
1181 def unpack(reader):
1182 obj = bsn_udf0()
1183 _type_len = reader.read("!L")[0]
1184 assert(_type_len == 200708)
1185 obj.value = reader.read("!L")[0]
1186 return obj
1187
1188 def __eq__(self, other):
1189 if type(self) != type(other): return False
1190 if self.value != other.value: return False
1191 return True
1192
1193 def pretty_print(self, q):
1194 q.text("bsn_udf0 {")
1195 with q.group():
1196 with q.indent(2):
1197 q.breakable()
1198 q.text("value = ");
1199 q.text("%#x" % self.value)
1200 q.breakable()
1201 q.text('}')
1202
1203oxm.subtypes[200708] = bsn_udf0
1204
1205class bsn_udf0_masked(oxm):
1206 type_len = 200968
1207
1208 def __init__(self, value=None, value_mask=None):
1209 if value != None:
1210 self.value = value
1211 else:
1212 self.value = 0
1213 if value_mask != None:
1214 self.value_mask = value_mask
1215 else:
1216 self.value_mask = 0
1217 return
1218
1219 def pack(self):
1220 packed = []
1221 packed.append(struct.pack("!L", self.type_len))
1222 packed.append(struct.pack("!L", self.value))
1223 packed.append(struct.pack("!L", self.value_mask))
1224 return ''.join(packed)
1225
1226 @staticmethod
1227 def unpack(reader):
1228 obj = bsn_udf0_masked()
1229 _type_len = reader.read("!L")[0]
1230 assert(_type_len == 200968)
1231 obj.value = reader.read("!L")[0]
1232 obj.value_mask = reader.read("!L")[0]
1233 return obj
1234
1235 def __eq__(self, other):
1236 if type(self) != type(other): return False
1237 if self.value != other.value: return False
1238 if self.value_mask != other.value_mask: return False
1239 return True
1240
1241 def pretty_print(self, q):
1242 q.text("bsn_udf0_masked {")
1243 with q.group():
1244 with q.indent(2):
1245 q.breakable()
1246 q.text("value = ");
1247 q.text("%#x" % self.value)
1248 q.text(","); q.breakable()
1249 q.text("value_mask = ");
1250 q.text("%#x" % self.value_mask)
1251 q.breakable()
1252 q.text('}')
1253
1254oxm.subtypes[200968] = bsn_udf0_masked
1255
1256class bsn_udf1(oxm):
1257 type_len = 201220
1258
1259 def __init__(self, value=None):
1260 if value != None:
1261 self.value = value
1262 else:
1263 self.value = 0
1264 return
1265
1266 def pack(self):
1267 packed = []
1268 packed.append(struct.pack("!L", self.type_len))
1269 packed.append(struct.pack("!L", self.value))
1270 return ''.join(packed)
1271
1272 @staticmethod
1273 def unpack(reader):
1274 obj = bsn_udf1()
1275 _type_len = reader.read("!L")[0]
1276 assert(_type_len == 201220)
1277 obj.value = reader.read("!L")[0]
1278 return obj
1279
1280 def __eq__(self, other):
1281 if type(self) != type(other): return False
1282 if self.value != other.value: return False
1283 return True
1284
1285 def pretty_print(self, q):
1286 q.text("bsn_udf1 {")
1287 with q.group():
1288 with q.indent(2):
1289 q.breakable()
1290 q.text("value = ");
1291 q.text("%#x" % self.value)
1292 q.breakable()
1293 q.text('}')
1294
1295oxm.subtypes[201220] = bsn_udf1
1296
1297class bsn_udf1_masked(oxm):
1298 type_len = 201480
1299
1300 def __init__(self, value=None, value_mask=None):
1301 if value != None:
1302 self.value = value
1303 else:
1304 self.value = 0
1305 if value_mask != None:
1306 self.value_mask = value_mask
1307 else:
1308 self.value_mask = 0
1309 return
1310
1311 def pack(self):
1312 packed = []
1313 packed.append(struct.pack("!L", self.type_len))
1314 packed.append(struct.pack("!L", self.value))
1315 packed.append(struct.pack("!L", self.value_mask))
1316 return ''.join(packed)
1317
1318 @staticmethod
1319 def unpack(reader):
1320 obj = bsn_udf1_masked()
1321 _type_len = reader.read("!L")[0]
1322 assert(_type_len == 201480)
1323 obj.value = reader.read("!L")[0]
1324 obj.value_mask = reader.read("!L")[0]
1325 return obj
1326
1327 def __eq__(self, other):
1328 if type(self) != type(other): return False
1329 if self.value != other.value: return False
1330 if self.value_mask != other.value_mask: return False
1331 return True
1332
1333 def pretty_print(self, q):
1334 q.text("bsn_udf1_masked {")
1335 with q.group():
1336 with q.indent(2):
1337 q.breakable()
1338 q.text("value = ");
1339 q.text("%#x" % self.value)
1340 q.text(","); q.breakable()
1341 q.text("value_mask = ");
1342 q.text("%#x" % self.value_mask)
1343 q.breakable()
1344 q.text('}')
1345
1346oxm.subtypes[201480] = bsn_udf1_masked
1347
1348class bsn_udf2(oxm):
1349 type_len = 201732
1350
1351 def __init__(self, value=None):
1352 if value != None:
1353 self.value = value
1354 else:
1355 self.value = 0
1356 return
1357
1358 def pack(self):
1359 packed = []
1360 packed.append(struct.pack("!L", self.type_len))
1361 packed.append(struct.pack("!L", self.value))
1362 return ''.join(packed)
1363
1364 @staticmethod
1365 def unpack(reader):
1366 obj = bsn_udf2()
1367 _type_len = reader.read("!L")[0]
1368 assert(_type_len == 201732)
1369 obj.value = reader.read("!L")[0]
1370 return obj
1371
1372 def __eq__(self, other):
1373 if type(self) != type(other): return False
1374 if self.value != other.value: return False
1375 return True
1376
1377 def pretty_print(self, q):
1378 q.text("bsn_udf2 {")
1379 with q.group():
1380 with q.indent(2):
1381 q.breakable()
1382 q.text("value = ");
1383 q.text("%#x" % self.value)
1384 q.breakable()
1385 q.text('}')
1386
1387oxm.subtypes[201732] = bsn_udf2
1388
1389class bsn_udf2_masked(oxm):
1390 type_len = 201992
1391
1392 def __init__(self, value=None, value_mask=None):
1393 if value != None:
1394 self.value = value
1395 else:
1396 self.value = 0
1397 if value_mask != None:
1398 self.value_mask = value_mask
1399 else:
1400 self.value_mask = 0
1401 return
1402
1403 def pack(self):
1404 packed = []
1405 packed.append(struct.pack("!L", self.type_len))
1406 packed.append(struct.pack("!L", self.value))
1407 packed.append(struct.pack("!L", self.value_mask))
1408 return ''.join(packed)
1409
1410 @staticmethod
1411 def unpack(reader):
1412 obj = bsn_udf2_masked()
1413 _type_len = reader.read("!L")[0]
1414 assert(_type_len == 201992)
1415 obj.value = reader.read("!L")[0]
1416 obj.value_mask = reader.read("!L")[0]
1417 return obj
1418
1419 def __eq__(self, other):
1420 if type(self) != type(other): return False
1421 if self.value != other.value: return False
1422 if self.value_mask != other.value_mask: return False
1423 return True
1424
1425 def pretty_print(self, q):
1426 q.text("bsn_udf2_masked {")
1427 with q.group():
1428 with q.indent(2):
1429 q.breakable()
1430 q.text("value = ");
1431 q.text("%#x" % self.value)
1432 q.text(","); q.breakable()
1433 q.text("value_mask = ");
1434 q.text("%#x" % self.value_mask)
1435 q.breakable()
1436 q.text('}')
1437
1438oxm.subtypes[201992] = bsn_udf2_masked
1439
1440class bsn_udf3(oxm):
1441 type_len = 202244
1442
1443 def __init__(self, value=None):
1444 if value != None:
1445 self.value = value
1446 else:
1447 self.value = 0
1448 return
1449
1450 def pack(self):
1451 packed = []
1452 packed.append(struct.pack("!L", self.type_len))
1453 packed.append(struct.pack("!L", self.value))
1454 return ''.join(packed)
1455
1456 @staticmethod
1457 def unpack(reader):
1458 obj = bsn_udf3()
1459 _type_len = reader.read("!L")[0]
1460 assert(_type_len == 202244)
1461 obj.value = reader.read("!L")[0]
1462 return obj
1463
1464 def __eq__(self, other):
1465 if type(self) != type(other): return False
1466 if self.value != other.value: return False
1467 return True
1468
1469 def pretty_print(self, q):
1470 q.text("bsn_udf3 {")
1471 with q.group():
1472 with q.indent(2):
1473 q.breakable()
1474 q.text("value = ");
1475 q.text("%#x" % self.value)
1476 q.breakable()
1477 q.text('}')
1478
1479oxm.subtypes[202244] = bsn_udf3
1480
1481class bsn_udf3_masked(oxm):
1482 type_len = 202504
1483
1484 def __init__(self, value=None, value_mask=None):
1485 if value != None:
1486 self.value = value
1487 else:
1488 self.value = 0
1489 if value_mask != None:
1490 self.value_mask = value_mask
1491 else:
1492 self.value_mask = 0
1493 return
1494
1495 def pack(self):
1496 packed = []
1497 packed.append(struct.pack("!L", self.type_len))
1498 packed.append(struct.pack("!L", self.value))
1499 packed.append(struct.pack("!L", self.value_mask))
1500 return ''.join(packed)
1501
1502 @staticmethod
1503 def unpack(reader):
1504 obj = bsn_udf3_masked()
1505 _type_len = reader.read("!L")[0]
1506 assert(_type_len == 202504)
1507 obj.value = reader.read("!L")[0]
1508 obj.value_mask = reader.read("!L")[0]
1509 return obj
1510
1511 def __eq__(self, other):
1512 if type(self) != type(other): return False
1513 if self.value != other.value: return False
1514 if self.value_mask != other.value_mask: return False
1515 return True
1516
1517 def pretty_print(self, q):
1518 q.text("bsn_udf3_masked {")
1519 with q.group():
1520 with q.indent(2):
1521 q.breakable()
1522 q.text("value = ");
1523 q.text("%#x" % self.value)
1524 q.text(","); q.breakable()
1525 q.text("value_mask = ");
1526 q.text("%#x" % self.value_mask)
1527 q.breakable()
1528 q.text('}')
1529
1530oxm.subtypes[202504] = bsn_udf3_masked
1531
1532class bsn_udf4(oxm):
1533 type_len = 202756
1534
1535 def __init__(self, value=None):
1536 if value != None:
1537 self.value = value
1538 else:
1539 self.value = 0
1540 return
1541
1542 def pack(self):
1543 packed = []
1544 packed.append(struct.pack("!L", self.type_len))
1545 packed.append(struct.pack("!L", self.value))
1546 return ''.join(packed)
1547
1548 @staticmethod
1549 def unpack(reader):
1550 obj = bsn_udf4()
1551 _type_len = reader.read("!L")[0]
1552 assert(_type_len == 202756)
1553 obj.value = reader.read("!L")[0]
1554 return obj
1555
1556 def __eq__(self, other):
1557 if type(self) != type(other): return False
1558 if self.value != other.value: return False
1559 return True
1560
1561 def pretty_print(self, q):
1562 q.text("bsn_udf4 {")
1563 with q.group():
1564 with q.indent(2):
1565 q.breakable()
1566 q.text("value = ");
1567 q.text("%#x" % self.value)
1568 q.breakable()
1569 q.text('}')
1570
1571oxm.subtypes[202756] = bsn_udf4
1572
1573class bsn_udf4_masked(oxm):
1574 type_len = 203016
1575
1576 def __init__(self, value=None, value_mask=None):
1577 if value != None:
1578 self.value = value
1579 else:
1580 self.value = 0
1581 if value_mask != None:
1582 self.value_mask = value_mask
1583 else:
1584 self.value_mask = 0
1585 return
1586
1587 def pack(self):
1588 packed = []
1589 packed.append(struct.pack("!L", self.type_len))
1590 packed.append(struct.pack("!L", self.value))
1591 packed.append(struct.pack("!L", self.value_mask))
1592 return ''.join(packed)
1593
1594 @staticmethod
1595 def unpack(reader):
1596 obj = bsn_udf4_masked()
1597 _type_len = reader.read("!L")[0]
1598 assert(_type_len == 203016)
1599 obj.value = reader.read("!L")[0]
1600 obj.value_mask = reader.read("!L")[0]
1601 return obj
1602
1603 def __eq__(self, other):
1604 if type(self) != type(other): return False
1605 if self.value != other.value: return False
1606 if self.value_mask != other.value_mask: return False
1607 return True
1608
1609 def pretty_print(self, q):
1610 q.text("bsn_udf4_masked {")
1611 with q.group():
1612 with q.indent(2):
1613 q.breakable()
1614 q.text("value = ");
1615 q.text("%#x" % self.value)
1616 q.text(","); q.breakable()
1617 q.text("value_mask = ");
1618 q.text("%#x" % self.value_mask)
1619 q.breakable()
1620 q.text('}')
1621
1622oxm.subtypes[203016] = bsn_udf4_masked
1623
1624class bsn_udf5(oxm):
1625 type_len = 203268
1626
1627 def __init__(self, value=None):
1628 if value != None:
1629 self.value = value
1630 else:
1631 self.value = 0
1632 return
1633
1634 def pack(self):
1635 packed = []
1636 packed.append(struct.pack("!L", self.type_len))
1637 packed.append(struct.pack("!L", self.value))
1638 return ''.join(packed)
1639
1640 @staticmethod
1641 def unpack(reader):
1642 obj = bsn_udf5()
1643 _type_len = reader.read("!L")[0]
1644 assert(_type_len == 203268)
1645 obj.value = reader.read("!L")[0]
1646 return obj
1647
1648 def __eq__(self, other):
1649 if type(self) != type(other): return False
1650 if self.value != other.value: return False
1651 return True
1652
1653 def pretty_print(self, q):
1654 q.text("bsn_udf5 {")
1655 with q.group():
1656 with q.indent(2):
1657 q.breakable()
1658 q.text("value = ");
1659 q.text("%#x" % self.value)
1660 q.breakable()
1661 q.text('}')
1662
1663oxm.subtypes[203268] = bsn_udf5
1664
1665class bsn_udf5_masked(oxm):
1666 type_len = 203528
1667
1668 def __init__(self, value=None, value_mask=None):
1669 if value != None:
1670 self.value = value
1671 else:
1672 self.value = 0
1673 if value_mask != None:
1674 self.value_mask = value_mask
1675 else:
1676 self.value_mask = 0
1677 return
1678
1679 def pack(self):
1680 packed = []
1681 packed.append(struct.pack("!L", self.type_len))
1682 packed.append(struct.pack("!L", self.value))
1683 packed.append(struct.pack("!L", self.value_mask))
1684 return ''.join(packed)
1685
1686 @staticmethod
1687 def unpack(reader):
1688 obj = bsn_udf5_masked()
1689 _type_len = reader.read("!L")[0]
1690 assert(_type_len == 203528)
1691 obj.value = reader.read("!L")[0]
1692 obj.value_mask = reader.read("!L")[0]
1693 return obj
1694
1695 def __eq__(self, other):
1696 if type(self) != type(other): return False
1697 if self.value != other.value: return False
1698 if self.value_mask != other.value_mask: return False
1699 return True
1700
1701 def pretty_print(self, q):
1702 q.text("bsn_udf5_masked {")
1703 with q.group():
1704 with q.indent(2):
1705 q.breakable()
1706 q.text("value = ");
1707 q.text("%#x" % self.value)
1708 q.text(","); q.breakable()
1709 q.text("value_mask = ");
1710 q.text("%#x" % self.value_mask)
1711 q.breakable()
1712 q.text('}')
1713
1714oxm.subtypes[203528] = bsn_udf5_masked
1715
1716class bsn_udf6(oxm):
1717 type_len = 203780
1718
1719 def __init__(self, value=None):
1720 if value != None:
1721 self.value = value
1722 else:
1723 self.value = 0
1724 return
1725
1726 def pack(self):
1727 packed = []
1728 packed.append(struct.pack("!L", self.type_len))
1729 packed.append(struct.pack("!L", self.value))
1730 return ''.join(packed)
1731
1732 @staticmethod
1733 def unpack(reader):
1734 obj = bsn_udf6()
1735 _type_len = reader.read("!L")[0]
1736 assert(_type_len == 203780)
1737 obj.value = reader.read("!L")[0]
1738 return obj
1739
1740 def __eq__(self, other):
1741 if type(self) != type(other): return False
1742 if self.value != other.value: return False
1743 return True
1744
1745 def pretty_print(self, q):
1746 q.text("bsn_udf6 {")
1747 with q.group():
1748 with q.indent(2):
1749 q.breakable()
1750 q.text("value = ");
1751 q.text("%#x" % self.value)
1752 q.breakable()
1753 q.text('}')
1754
1755oxm.subtypes[203780] = bsn_udf6
1756
1757class bsn_udf6_masked(oxm):
1758 type_len = 204040
1759
1760 def __init__(self, value=None, value_mask=None):
1761 if value != None:
1762 self.value = value
1763 else:
1764 self.value = 0
1765 if value_mask != None:
1766 self.value_mask = value_mask
1767 else:
1768 self.value_mask = 0
1769 return
1770
1771 def pack(self):
1772 packed = []
1773 packed.append(struct.pack("!L", self.type_len))
1774 packed.append(struct.pack("!L", self.value))
1775 packed.append(struct.pack("!L", self.value_mask))
1776 return ''.join(packed)
1777
1778 @staticmethod
1779 def unpack(reader):
1780 obj = bsn_udf6_masked()
1781 _type_len = reader.read("!L")[0]
1782 assert(_type_len == 204040)
1783 obj.value = reader.read("!L")[0]
1784 obj.value_mask = reader.read("!L")[0]
1785 return obj
1786
1787 def __eq__(self, other):
1788 if type(self) != type(other): return False
1789 if self.value != other.value: return False
1790 if self.value_mask != other.value_mask: return False
1791 return True
1792
1793 def pretty_print(self, q):
1794 q.text("bsn_udf6_masked {")
1795 with q.group():
1796 with q.indent(2):
1797 q.breakable()
1798 q.text("value = ");
1799 q.text("%#x" % self.value)
1800 q.text(","); q.breakable()
1801 q.text("value_mask = ");
1802 q.text("%#x" % self.value_mask)
1803 q.breakable()
1804 q.text('}')
1805
1806oxm.subtypes[204040] = bsn_udf6_masked
1807
1808class bsn_udf7(oxm):
1809 type_len = 204292
1810
1811 def __init__(self, value=None):
1812 if value != None:
1813 self.value = value
1814 else:
1815 self.value = 0
1816 return
1817
1818 def pack(self):
1819 packed = []
1820 packed.append(struct.pack("!L", self.type_len))
1821 packed.append(struct.pack("!L", self.value))
1822 return ''.join(packed)
1823
1824 @staticmethod
1825 def unpack(reader):
1826 obj = bsn_udf7()
1827 _type_len = reader.read("!L")[0]
1828 assert(_type_len == 204292)
1829 obj.value = reader.read("!L")[0]
1830 return obj
1831
1832 def __eq__(self, other):
1833 if type(self) != type(other): return False
1834 if self.value != other.value: return False
1835 return True
1836
1837 def pretty_print(self, q):
1838 q.text("bsn_udf7 {")
1839 with q.group():
1840 with q.indent(2):
1841 q.breakable()
1842 q.text("value = ");
1843 q.text("%#x" % self.value)
1844 q.breakable()
1845 q.text('}')
1846
1847oxm.subtypes[204292] = bsn_udf7
1848
1849class bsn_udf7_masked(oxm):
1850 type_len = 204552
1851
1852 def __init__(self, value=None, value_mask=None):
1853 if value != None:
1854 self.value = value
1855 else:
1856 self.value = 0
1857 if value_mask != None:
1858 self.value_mask = value_mask
1859 else:
1860 self.value_mask = 0
1861 return
1862
1863 def pack(self):
1864 packed = []
1865 packed.append(struct.pack("!L", self.type_len))
1866 packed.append(struct.pack("!L", self.value))
1867 packed.append(struct.pack("!L", self.value_mask))
1868 return ''.join(packed)
1869
1870 @staticmethod
1871 def unpack(reader):
1872 obj = bsn_udf7_masked()
1873 _type_len = reader.read("!L")[0]
1874 assert(_type_len == 204552)
1875 obj.value = reader.read("!L")[0]
1876 obj.value_mask = reader.read("!L")[0]
1877 return obj
1878
1879 def __eq__(self, other):
1880 if type(self) != type(other): return False
1881 if self.value != other.value: return False
1882 if self.value_mask != other.value_mask: return False
1883 return True
1884
1885 def pretty_print(self, q):
1886 q.text("bsn_udf7_masked {")
1887 with q.group():
1888 with q.indent(2):
1889 q.breakable()
1890 q.text("value = ");
1891 q.text("%#x" % self.value)
1892 q.text(","); q.breakable()
1893 q.text("value_mask = ");
1894 q.text("%#x" % self.value_mask)
1895 q.breakable()
1896 q.text('}')
1897
1898oxm.subtypes[204552] = bsn_udf7_masked
1899
Rich Lane7dcdf022013-12-11 14:45:27 -08001900class bsn_vrf(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001901 type_len = 197636
1902
1903 def __init__(self, value=None):
1904 if value != None:
1905 self.value = value
1906 else:
1907 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001908 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001909
1910 def pack(self):
1911 packed = []
1912 packed.append(struct.pack("!L", self.type_len))
1913 packed.append(struct.pack("!L", self.value))
1914 return ''.join(packed)
1915
1916 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001917 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001918 obj = bsn_vrf()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001919 _type_len = reader.read("!L")[0]
1920 assert(_type_len == 197636)
1921 obj.value = reader.read("!L")[0]
1922 return obj
1923
1924 def __eq__(self, other):
1925 if type(self) != type(other): return False
1926 if self.value != other.value: return False
1927 return True
1928
Rich Laned9e3f7b2013-11-04 11:40:43 -08001929 def pretty_print(self, q):
1930 q.text("bsn_vrf {")
1931 with q.group():
1932 with q.indent(2):
1933 q.breakable()
1934 q.text("value = ");
1935 q.text("%#x" % self.value)
1936 q.breakable()
1937 q.text('}')
1938
Rich Lane7dcdf022013-12-11 14:45:27 -08001939oxm.subtypes[197636] = bsn_vrf
1940
1941class bsn_vrf_masked(oxm):
1942 type_len = 197896
Rich Laned9e3f7b2013-11-04 11:40:43 -08001943
1944 def __init__(self, value=None, value_mask=None):
1945 if value != None:
1946 self.value = value
1947 else:
1948 self.value = 0
1949 if value_mask != None:
1950 self.value_mask = value_mask
1951 else:
1952 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001953 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001954
1955 def pack(self):
1956 packed = []
1957 packed.append(struct.pack("!L", self.type_len))
1958 packed.append(struct.pack("!L", self.value))
1959 packed.append(struct.pack("!L", self.value_mask))
1960 return ''.join(packed)
1961
1962 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001963 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001964 obj = bsn_vrf_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001965 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001966 assert(_type_len == 197896)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001967 obj.value = reader.read("!L")[0]
1968 obj.value_mask = reader.read("!L")[0]
1969 return obj
1970
1971 def __eq__(self, other):
1972 if type(self) != type(other): return False
1973 if self.value != other.value: return False
1974 if self.value_mask != other.value_mask: return False
1975 return True
1976
Rich Laned9e3f7b2013-11-04 11:40:43 -08001977 def pretty_print(self, q):
1978 q.text("bsn_vrf_masked {")
1979 with q.group():
1980 with q.indent(2):
1981 q.breakable()
1982 q.text("value = ");
1983 q.text("%#x" % self.value)
1984 q.text(","); q.breakable()
1985 q.text("value_mask = ");
1986 q.text("%#x" % self.value_mask)
1987 q.breakable()
1988 q.text('}')
1989
Rich Lane7dcdf022013-12-11 14:45:27 -08001990oxm.subtypes[197896] = bsn_vrf_masked
1991
1992class eth_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001993 type_len = 2147485190
Rich Lanec2ee4b82013-04-24 17:12:38 -07001994
1995 def __init__(self, value=None):
1996 if value != None:
1997 self.value = value
1998 else:
1999 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002000 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002001
2002 def pack(self):
2003 packed = []
2004 packed.append(struct.pack("!L", self.type_len))
2005 packed.append(struct.pack("!6B", *self.value))
2006 return ''.join(packed)
2007
2008 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002009 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002010 obj = eth_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07002011 _type_len = reader.read("!L")[0]
2012 assert(_type_len == 2147485190)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002013 obj.value = list(reader.read('!6B'))
2014 return obj
2015
2016 def __eq__(self, other):
2017 if type(self) != type(other): return False
2018 if self.value != other.value: return False
2019 return True
2020
Rich Lanec2ee4b82013-04-24 17:12:38 -07002021 def pretty_print(self, q):
2022 q.text("eth_dst {")
2023 with q.group():
2024 with q.indent(2):
2025 q.breakable()
2026 q.text("value = ");
2027 q.text(util.pretty_mac(self.value))
2028 q.breakable()
2029 q.text('}')
2030
Rich Lane7dcdf022013-12-11 14:45:27 -08002031oxm.subtypes[2147485190] = eth_dst
2032
2033class eth_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002034 type_len = 2147485452
Rich Lanec2ee4b82013-04-24 17:12:38 -07002035
2036 def __init__(self, value=None, value_mask=None):
2037 if value != None:
2038 self.value = value
2039 else:
2040 self.value = [0,0,0,0,0,0]
2041 if value_mask != None:
2042 self.value_mask = value_mask
2043 else:
2044 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002045 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002046
2047 def pack(self):
2048 packed = []
2049 packed.append(struct.pack("!L", self.type_len))
2050 packed.append(struct.pack("!6B", *self.value))
2051 packed.append(struct.pack("!6B", *self.value_mask))
2052 return ''.join(packed)
2053
2054 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002055 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002056 obj = eth_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002057 _type_len = reader.read("!L")[0]
2058 assert(_type_len == 2147485452)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002059 obj.value = list(reader.read('!6B'))
2060 obj.value_mask = list(reader.read('!6B'))
2061 return obj
2062
2063 def __eq__(self, other):
2064 if type(self) != type(other): return False
2065 if self.value != other.value: return False
2066 if self.value_mask != other.value_mask: return False
2067 return True
2068
Rich Lanec2ee4b82013-04-24 17:12:38 -07002069 def pretty_print(self, q):
2070 q.text("eth_dst_masked {")
2071 with q.group():
2072 with q.indent(2):
2073 q.breakable()
2074 q.text("value = ");
2075 q.text(util.pretty_mac(self.value))
2076 q.text(","); q.breakable()
2077 q.text("value_mask = ");
2078 q.text(util.pretty_mac(self.value_mask))
2079 q.breakable()
2080 q.text('}')
2081
Rich Lane7dcdf022013-12-11 14:45:27 -08002082oxm.subtypes[2147485452] = eth_dst_masked
2083
2084class eth_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002085 type_len = 2147485702
Rich Lanec2ee4b82013-04-24 17:12:38 -07002086
2087 def __init__(self, value=None):
2088 if value != None:
2089 self.value = value
2090 else:
2091 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002092 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002093
2094 def pack(self):
2095 packed = []
2096 packed.append(struct.pack("!L", self.type_len))
2097 packed.append(struct.pack("!6B", *self.value))
2098 return ''.join(packed)
2099
2100 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002101 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002102 obj = eth_src()
Dan Talaycof6202252013-07-02 01:00:29 -07002103 _type_len = reader.read("!L")[0]
2104 assert(_type_len == 2147485702)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002105 obj.value = list(reader.read('!6B'))
2106 return obj
2107
2108 def __eq__(self, other):
2109 if type(self) != type(other): return False
2110 if self.value != other.value: return False
2111 return True
2112
Rich Lanec2ee4b82013-04-24 17:12:38 -07002113 def pretty_print(self, q):
2114 q.text("eth_src {")
2115 with q.group():
2116 with q.indent(2):
2117 q.breakable()
2118 q.text("value = ");
2119 q.text(util.pretty_mac(self.value))
2120 q.breakable()
2121 q.text('}')
2122
Rich Lane7dcdf022013-12-11 14:45:27 -08002123oxm.subtypes[2147485702] = eth_src
2124
2125class eth_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002126 type_len = 2147485964
Rich Lanec2ee4b82013-04-24 17:12:38 -07002127
2128 def __init__(self, value=None, value_mask=None):
2129 if value != None:
2130 self.value = value
2131 else:
2132 self.value = [0,0,0,0,0,0]
2133 if value_mask != None:
2134 self.value_mask = value_mask
2135 else:
2136 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002137 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002138
2139 def pack(self):
2140 packed = []
2141 packed.append(struct.pack("!L", self.type_len))
2142 packed.append(struct.pack("!6B", *self.value))
2143 packed.append(struct.pack("!6B", *self.value_mask))
2144 return ''.join(packed)
2145
2146 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002147 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002148 obj = eth_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002149 _type_len = reader.read("!L")[0]
2150 assert(_type_len == 2147485964)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002151 obj.value = list(reader.read('!6B'))
2152 obj.value_mask = list(reader.read('!6B'))
2153 return obj
2154
2155 def __eq__(self, other):
2156 if type(self) != type(other): return False
2157 if self.value != other.value: return False
2158 if self.value_mask != other.value_mask: return False
2159 return True
2160
Rich Lanec2ee4b82013-04-24 17:12:38 -07002161 def pretty_print(self, q):
2162 q.text("eth_src_masked {")
2163 with q.group():
2164 with q.indent(2):
2165 q.breakable()
2166 q.text("value = ");
2167 q.text(util.pretty_mac(self.value))
2168 q.text(","); q.breakable()
2169 q.text("value_mask = ");
2170 q.text(util.pretty_mac(self.value_mask))
2171 q.breakable()
2172 q.text('}')
2173
Rich Lane7dcdf022013-12-11 14:45:27 -08002174oxm.subtypes[2147485964] = eth_src_masked
2175
2176class eth_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002177 type_len = 2147486210
Rich Lanec2ee4b82013-04-24 17:12:38 -07002178
2179 def __init__(self, value=None):
2180 if value != None:
2181 self.value = value
2182 else:
2183 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002184 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002185
2186 def pack(self):
2187 packed = []
2188 packed.append(struct.pack("!L", self.type_len))
2189 packed.append(struct.pack("!H", self.value))
2190 return ''.join(packed)
2191
2192 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002193 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002194 obj = eth_type()
Dan Talaycof6202252013-07-02 01:00:29 -07002195 _type_len = reader.read("!L")[0]
2196 assert(_type_len == 2147486210)
2197 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002198 return obj
2199
2200 def __eq__(self, other):
2201 if type(self) != type(other): return False
2202 if self.value != other.value: return False
2203 return True
2204
Rich Lanec2ee4b82013-04-24 17:12:38 -07002205 def pretty_print(self, q):
2206 q.text("eth_type {")
2207 with q.group():
2208 with q.indent(2):
2209 q.breakable()
2210 q.text("value = ");
2211 q.text("%#x" % self.value)
2212 q.breakable()
2213 q.text('}')
2214
Rich Lane7dcdf022013-12-11 14:45:27 -08002215oxm.subtypes[2147486210] = eth_type
2216
2217class eth_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002218 type_len = 2147486468
Rich Lanec2ee4b82013-04-24 17:12:38 -07002219
2220 def __init__(self, value=None, value_mask=None):
2221 if value != None:
2222 self.value = value
2223 else:
2224 self.value = 0
2225 if value_mask != None:
2226 self.value_mask = value_mask
2227 else:
2228 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002229 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002230
2231 def pack(self):
2232 packed = []
2233 packed.append(struct.pack("!L", self.type_len))
2234 packed.append(struct.pack("!H", self.value))
2235 packed.append(struct.pack("!H", self.value_mask))
2236 return ''.join(packed)
2237
2238 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002239 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002240 obj = eth_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002241 _type_len = reader.read("!L")[0]
2242 assert(_type_len == 2147486468)
2243 obj.value = reader.read("!H")[0]
2244 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002245 return obj
2246
2247 def __eq__(self, other):
2248 if type(self) != type(other): return False
2249 if self.value != other.value: return False
2250 if self.value_mask != other.value_mask: return False
2251 return True
2252
Rich Lanec2ee4b82013-04-24 17:12:38 -07002253 def pretty_print(self, q):
2254 q.text("eth_type_masked {")
2255 with q.group():
2256 with q.indent(2):
2257 q.breakable()
2258 q.text("value = ");
2259 q.text("%#x" % self.value)
2260 q.text(","); q.breakable()
2261 q.text("value_mask = ");
2262 q.text("%#x" % self.value_mask)
2263 q.breakable()
2264 q.text('}')
2265
Rich Lane7dcdf022013-12-11 14:45:27 -08002266oxm.subtypes[2147486468] = eth_type_masked
2267
2268class icmpv4_code(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002269 type_len = 2147493889
Rich Lanec2ee4b82013-04-24 17:12:38 -07002270
2271 def __init__(self, value=None):
2272 if value != None:
2273 self.value = value
2274 else:
2275 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002276 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002277
2278 def pack(self):
2279 packed = []
2280 packed.append(struct.pack("!L", self.type_len))
2281 packed.append(struct.pack("!B", self.value))
2282 return ''.join(packed)
2283
2284 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002285 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002286 obj = icmpv4_code()
Dan Talaycof6202252013-07-02 01:00:29 -07002287 _type_len = reader.read("!L")[0]
2288 assert(_type_len == 2147493889)
2289 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002290 return obj
2291
2292 def __eq__(self, other):
2293 if type(self) != type(other): return False
2294 if self.value != other.value: return False
2295 return True
2296
Rich Lanec2ee4b82013-04-24 17:12:38 -07002297 def pretty_print(self, q):
2298 q.text("icmpv4_code {")
2299 with q.group():
2300 with q.indent(2):
2301 q.breakable()
2302 q.text("value = ");
2303 q.text("%#x" % self.value)
2304 q.breakable()
2305 q.text('}')
2306
Rich Lane7dcdf022013-12-11 14:45:27 -08002307oxm.subtypes[2147493889] = icmpv4_code
2308
2309class icmpv4_code_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002310 type_len = 2147494146
Rich Lanec2ee4b82013-04-24 17:12:38 -07002311
2312 def __init__(self, value=None, value_mask=None):
2313 if value != None:
2314 self.value = value
2315 else:
2316 self.value = 0
2317 if value_mask != None:
2318 self.value_mask = value_mask
2319 else:
2320 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002321 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002322
2323 def pack(self):
2324 packed = []
2325 packed.append(struct.pack("!L", self.type_len))
2326 packed.append(struct.pack("!B", self.value))
2327 packed.append(struct.pack("!B", self.value_mask))
2328 return ''.join(packed)
2329
2330 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002331 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002332 obj = icmpv4_code_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002333 _type_len = reader.read("!L")[0]
2334 assert(_type_len == 2147494146)
2335 obj.value = reader.read("!B")[0]
2336 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002337 return obj
2338
2339 def __eq__(self, other):
2340 if type(self) != type(other): return False
2341 if self.value != other.value: return False
2342 if self.value_mask != other.value_mask: return False
2343 return True
2344
Rich Lanec2ee4b82013-04-24 17:12:38 -07002345 def pretty_print(self, q):
2346 q.text("icmpv4_code_masked {")
2347 with q.group():
2348 with q.indent(2):
2349 q.breakable()
2350 q.text("value = ");
2351 q.text("%#x" % self.value)
2352 q.text(","); q.breakable()
2353 q.text("value_mask = ");
2354 q.text("%#x" % self.value_mask)
2355 q.breakable()
2356 q.text('}')
2357
Rich Lane7dcdf022013-12-11 14:45:27 -08002358oxm.subtypes[2147494146] = icmpv4_code_masked
2359
2360class icmpv4_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002361 type_len = 2147493377
Rich Lanec2ee4b82013-04-24 17:12:38 -07002362
2363 def __init__(self, value=None):
2364 if value != None:
2365 self.value = value
2366 else:
2367 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002368 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002369
2370 def pack(self):
2371 packed = []
2372 packed.append(struct.pack("!L", self.type_len))
2373 packed.append(struct.pack("!B", self.value))
2374 return ''.join(packed)
2375
2376 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002377 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002378 obj = icmpv4_type()
Dan Talaycof6202252013-07-02 01:00:29 -07002379 _type_len = reader.read("!L")[0]
2380 assert(_type_len == 2147493377)
2381 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002382 return obj
2383
2384 def __eq__(self, other):
2385 if type(self) != type(other): return False
2386 if self.value != other.value: return False
2387 return True
2388
Rich Lanec2ee4b82013-04-24 17:12:38 -07002389 def pretty_print(self, q):
2390 q.text("icmpv4_type {")
2391 with q.group():
2392 with q.indent(2):
2393 q.breakable()
2394 q.text("value = ");
2395 q.text("%#x" % self.value)
2396 q.breakable()
2397 q.text('}')
2398
Rich Lane7dcdf022013-12-11 14:45:27 -08002399oxm.subtypes[2147493377] = icmpv4_type
2400
2401class icmpv4_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002402 type_len = 2147493634
Rich Lanec2ee4b82013-04-24 17:12:38 -07002403
2404 def __init__(self, value=None, value_mask=None):
2405 if value != None:
2406 self.value = value
2407 else:
2408 self.value = 0
2409 if value_mask != None:
2410 self.value_mask = value_mask
2411 else:
2412 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002413 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002414
2415 def pack(self):
2416 packed = []
2417 packed.append(struct.pack("!L", self.type_len))
2418 packed.append(struct.pack("!B", self.value))
2419 packed.append(struct.pack("!B", self.value_mask))
2420 return ''.join(packed)
2421
2422 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002423 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002424 obj = icmpv4_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002425 _type_len = reader.read("!L")[0]
2426 assert(_type_len == 2147493634)
2427 obj.value = reader.read("!B")[0]
2428 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002429 return obj
2430
2431 def __eq__(self, other):
2432 if type(self) != type(other): return False
2433 if self.value != other.value: return False
2434 if self.value_mask != other.value_mask: return False
2435 return True
2436
Rich Lanec2ee4b82013-04-24 17:12:38 -07002437 def pretty_print(self, q):
2438 q.text("icmpv4_type_masked {")
2439 with q.group():
2440 with q.indent(2):
2441 q.breakable()
2442 q.text("value = ");
2443 q.text("%#x" % self.value)
2444 q.text(","); q.breakable()
2445 q.text("value_mask = ");
2446 q.text("%#x" % self.value_mask)
2447 q.breakable()
2448 q.text('}')
2449
Rich Lane7dcdf022013-12-11 14:45:27 -08002450oxm.subtypes[2147493634] = icmpv4_type_masked
2451
2452class icmpv6_code(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002453 type_len = 2147499009
Rich Lanec2ee4b82013-04-24 17:12:38 -07002454
2455 def __init__(self, value=None):
2456 if value != None:
2457 self.value = value
2458 else:
2459 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002460 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002461
2462 def pack(self):
2463 packed = []
2464 packed.append(struct.pack("!L", self.type_len))
2465 packed.append(struct.pack("!B", self.value))
2466 return ''.join(packed)
2467
2468 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002469 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002470 obj = icmpv6_code()
Dan Talaycof6202252013-07-02 01:00:29 -07002471 _type_len = reader.read("!L")[0]
2472 assert(_type_len == 2147499009)
2473 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002474 return obj
2475
2476 def __eq__(self, other):
2477 if type(self) != type(other): return False
2478 if self.value != other.value: return False
2479 return True
2480
Rich Lanec2ee4b82013-04-24 17:12:38 -07002481 def pretty_print(self, q):
2482 q.text("icmpv6_code {")
2483 with q.group():
2484 with q.indent(2):
2485 q.breakable()
2486 q.text("value = ");
2487 q.text("%#x" % self.value)
2488 q.breakable()
2489 q.text('}')
2490
Rich Lane7dcdf022013-12-11 14:45:27 -08002491oxm.subtypes[2147499009] = icmpv6_code
2492
2493class icmpv6_code_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002494 type_len = 2147499266
Rich Lanec2ee4b82013-04-24 17:12:38 -07002495
2496 def __init__(self, value=None, value_mask=None):
2497 if value != None:
2498 self.value = value
2499 else:
2500 self.value = 0
2501 if value_mask != None:
2502 self.value_mask = value_mask
2503 else:
2504 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002505 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002506
2507 def pack(self):
2508 packed = []
2509 packed.append(struct.pack("!L", self.type_len))
2510 packed.append(struct.pack("!B", self.value))
2511 packed.append(struct.pack("!B", self.value_mask))
2512 return ''.join(packed)
2513
2514 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002515 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002516 obj = icmpv6_code_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002517 _type_len = reader.read("!L")[0]
2518 assert(_type_len == 2147499266)
2519 obj.value = reader.read("!B")[0]
2520 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002521 return obj
2522
2523 def __eq__(self, other):
2524 if type(self) != type(other): return False
2525 if self.value != other.value: return False
2526 if self.value_mask != other.value_mask: return False
2527 return True
2528
Rich Lanec2ee4b82013-04-24 17:12:38 -07002529 def pretty_print(self, q):
2530 q.text("icmpv6_code_masked {")
2531 with q.group():
2532 with q.indent(2):
2533 q.breakable()
2534 q.text("value = ");
2535 q.text("%#x" % self.value)
2536 q.text(","); q.breakable()
2537 q.text("value_mask = ");
2538 q.text("%#x" % self.value_mask)
2539 q.breakable()
2540 q.text('}')
2541
Rich Lane7dcdf022013-12-11 14:45:27 -08002542oxm.subtypes[2147499266] = icmpv6_code_masked
2543
2544class icmpv6_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002545 type_len = 2147498497
Rich Lanec2ee4b82013-04-24 17:12:38 -07002546
2547 def __init__(self, value=None):
2548 if value != None:
2549 self.value = value
2550 else:
2551 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002552 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002553
2554 def pack(self):
2555 packed = []
2556 packed.append(struct.pack("!L", self.type_len))
2557 packed.append(struct.pack("!B", self.value))
2558 return ''.join(packed)
2559
2560 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002561 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002562 obj = icmpv6_type()
Dan Talaycof6202252013-07-02 01:00:29 -07002563 _type_len = reader.read("!L")[0]
2564 assert(_type_len == 2147498497)
2565 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002566 return obj
2567
2568 def __eq__(self, other):
2569 if type(self) != type(other): return False
2570 if self.value != other.value: return False
2571 return True
2572
Rich Lanec2ee4b82013-04-24 17:12:38 -07002573 def pretty_print(self, q):
2574 q.text("icmpv6_type {")
2575 with q.group():
2576 with q.indent(2):
2577 q.breakable()
2578 q.text("value = ");
2579 q.text("%#x" % self.value)
2580 q.breakable()
2581 q.text('}')
2582
Rich Lane7dcdf022013-12-11 14:45:27 -08002583oxm.subtypes[2147498497] = icmpv6_type
2584
2585class icmpv6_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002586 type_len = 2147498754
Rich Lanec2ee4b82013-04-24 17:12:38 -07002587
2588 def __init__(self, value=None, value_mask=None):
2589 if value != None:
2590 self.value = value
2591 else:
2592 self.value = 0
2593 if value_mask != None:
2594 self.value_mask = value_mask
2595 else:
2596 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002597 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002598
2599 def pack(self):
2600 packed = []
2601 packed.append(struct.pack("!L", self.type_len))
2602 packed.append(struct.pack("!B", self.value))
2603 packed.append(struct.pack("!B", self.value_mask))
2604 return ''.join(packed)
2605
2606 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002607 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002608 obj = icmpv6_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002609 _type_len = reader.read("!L")[0]
2610 assert(_type_len == 2147498754)
2611 obj.value = reader.read("!B")[0]
2612 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002613 return obj
2614
2615 def __eq__(self, other):
2616 if type(self) != type(other): return False
2617 if self.value != other.value: return False
2618 if self.value_mask != other.value_mask: return False
2619 return True
2620
Rich Lanec2ee4b82013-04-24 17:12:38 -07002621 def pretty_print(self, q):
2622 q.text("icmpv6_type_masked {")
2623 with q.group():
2624 with q.indent(2):
2625 q.breakable()
2626 q.text("value = ");
2627 q.text("%#x" % self.value)
2628 q.text(","); q.breakable()
2629 q.text("value_mask = ");
2630 q.text("%#x" % self.value_mask)
2631 q.breakable()
2632 q.text('}')
2633
Rich Lane7dcdf022013-12-11 14:45:27 -08002634oxm.subtypes[2147498754] = icmpv6_type_masked
2635
2636class in_phy_port(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002637 type_len = 2147484164
Rich Lanec2ee4b82013-04-24 17:12:38 -07002638
2639 def __init__(self, value=None):
2640 if value != None:
2641 self.value = value
2642 else:
2643 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002644 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002645
2646 def pack(self):
2647 packed = []
2648 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07002649 packed.append(util.pack_port_no(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002650 return ''.join(packed)
2651
2652 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002653 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002654 obj = in_phy_port()
Dan Talaycof6202252013-07-02 01:00:29 -07002655 _type_len = reader.read("!L")[0]
2656 assert(_type_len == 2147484164)
2657 obj.value = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002658 return obj
2659
2660 def __eq__(self, other):
2661 if type(self) != type(other): return False
2662 if self.value != other.value: return False
2663 return True
2664
Rich Lanec2ee4b82013-04-24 17:12:38 -07002665 def pretty_print(self, q):
2666 q.text("in_phy_port {")
2667 with q.group():
2668 with q.indent(2):
2669 q.breakable()
2670 q.text("value = ");
2671 q.text(util.pretty_port(self.value))
2672 q.breakable()
2673 q.text('}')
2674
Rich Lane7dcdf022013-12-11 14:45:27 -08002675oxm.subtypes[2147484164] = in_phy_port
2676
2677class in_phy_port_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002678 type_len = 2147484424
Rich Lanec2ee4b82013-04-24 17:12:38 -07002679
2680 def __init__(self, value=None, value_mask=None):
2681 if value != None:
2682 self.value = value
2683 else:
2684 self.value = 0
2685 if value_mask != None:
2686 self.value_mask = value_mask
2687 else:
2688 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002689 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002690
2691 def pack(self):
2692 packed = []
2693 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07002694 packed.append(util.pack_port_no(self.value))
2695 packed.append(util.pack_port_no(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002696 return ''.join(packed)
2697
2698 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002699 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002700 obj = in_phy_port_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002701 _type_len = reader.read("!L")[0]
2702 assert(_type_len == 2147484424)
2703 obj.value = util.unpack_port_no(reader)
2704 obj.value_mask = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002705 return obj
2706
2707 def __eq__(self, other):
2708 if type(self) != type(other): return False
2709 if self.value != other.value: return False
2710 if self.value_mask != other.value_mask: return False
2711 return True
2712
Rich Lanec2ee4b82013-04-24 17:12:38 -07002713 def pretty_print(self, q):
2714 q.text("in_phy_port_masked {")
2715 with q.group():
2716 with q.indent(2):
2717 q.breakable()
2718 q.text("value = ");
2719 q.text(util.pretty_port(self.value))
2720 q.text(","); q.breakable()
2721 q.text("value_mask = ");
2722 q.text(util.pretty_port(self.value_mask))
2723 q.breakable()
2724 q.text('}')
2725
Rich Lane7dcdf022013-12-11 14:45:27 -08002726oxm.subtypes[2147484424] = in_phy_port_masked
2727
2728class in_port(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002729 type_len = 2147483652
Rich Lanec2ee4b82013-04-24 17:12:38 -07002730
2731 def __init__(self, value=None):
2732 if value != None:
2733 self.value = value
2734 else:
2735 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002736 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002737
2738 def pack(self):
2739 packed = []
2740 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07002741 packed.append(util.pack_port_no(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002742 return ''.join(packed)
2743
2744 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002745 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002746 obj = in_port()
Dan Talaycof6202252013-07-02 01:00:29 -07002747 _type_len = reader.read("!L")[0]
2748 assert(_type_len == 2147483652)
2749 obj.value = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002750 return obj
2751
2752 def __eq__(self, other):
2753 if type(self) != type(other): return False
2754 if self.value != other.value: return False
2755 return True
2756
Rich Lanec2ee4b82013-04-24 17:12:38 -07002757 def pretty_print(self, q):
2758 q.text("in_port {")
2759 with q.group():
2760 with q.indent(2):
2761 q.breakable()
2762 q.text("value = ");
2763 q.text(util.pretty_port(self.value))
2764 q.breakable()
2765 q.text('}')
2766
Rich Lane7dcdf022013-12-11 14:45:27 -08002767oxm.subtypes[2147483652] = in_port
2768
2769class in_port_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002770 type_len = 2147483912
Rich Lanec2ee4b82013-04-24 17:12:38 -07002771
2772 def __init__(self, value=None, value_mask=None):
2773 if value != None:
2774 self.value = value
2775 else:
2776 self.value = 0
2777 if value_mask != None:
2778 self.value_mask = value_mask
2779 else:
2780 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002781 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002782
2783 def pack(self):
2784 packed = []
2785 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07002786 packed.append(util.pack_port_no(self.value))
2787 packed.append(util.pack_port_no(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002788 return ''.join(packed)
2789
2790 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002791 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002792 obj = in_port_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002793 _type_len = reader.read("!L")[0]
2794 assert(_type_len == 2147483912)
2795 obj.value = util.unpack_port_no(reader)
2796 obj.value_mask = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002797 return obj
2798
2799 def __eq__(self, other):
2800 if type(self) != type(other): return False
2801 if self.value != other.value: return False
2802 if self.value_mask != other.value_mask: return False
2803 return True
2804
Rich Lanec2ee4b82013-04-24 17:12:38 -07002805 def pretty_print(self, q):
2806 q.text("in_port_masked {")
2807 with q.group():
2808 with q.indent(2):
2809 q.breakable()
2810 q.text("value = ");
2811 q.text(util.pretty_port(self.value))
2812 q.text(","); q.breakable()
2813 q.text("value_mask = ");
2814 q.text(util.pretty_port(self.value_mask))
2815 q.breakable()
2816 q.text('}')
2817
Rich Lane7dcdf022013-12-11 14:45:27 -08002818oxm.subtypes[2147483912] = in_port_masked
2819
2820class ip_dscp(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002821 type_len = 2147487745
Rich Lanec2ee4b82013-04-24 17:12:38 -07002822
2823 def __init__(self, value=None):
2824 if value != None:
2825 self.value = value
2826 else:
2827 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002828 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002829
2830 def pack(self):
2831 packed = []
2832 packed.append(struct.pack("!L", self.type_len))
2833 packed.append(struct.pack("!B", self.value))
2834 return ''.join(packed)
2835
2836 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002837 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002838 obj = ip_dscp()
Dan Talaycof6202252013-07-02 01:00:29 -07002839 _type_len = reader.read("!L")[0]
2840 assert(_type_len == 2147487745)
2841 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002842 return obj
2843
2844 def __eq__(self, other):
2845 if type(self) != type(other): return False
2846 if self.value != other.value: return False
2847 return True
2848
Rich Lanec2ee4b82013-04-24 17:12:38 -07002849 def pretty_print(self, q):
2850 q.text("ip_dscp {")
2851 with q.group():
2852 with q.indent(2):
2853 q.breakable()
2854 q.text("value = ");
2855 q.text("%#x" % self.value)
2856 q.breakable()
2857 q.text('}')
2858
Rich Lane7dcdf022013-12-11 14:45:27 -08002859oxm.subtypes[2147487745] = ip_dscp
2860
2861class ip_dscp_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002862 type_len = 2147488002
Rich Lanec2ee4b82013-04-24 17:12:38 -07002863
2864 def __init__(self, value=None, value_mask=None):
2865 if value != None:
2866 self.value = value
2867 else:
2868 self.value = 0
2869 if value_mask != None:
2870 self.value_mask = value_mask
2871 else:
2872 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002873 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002874
2875 def pack(self):
2876 packed = []
2877 packed.append(struct.pack("!L", self.type_len))
2878 packed.append(struct.pack("!B", self.value))
2879 packed.append(struct.pack("!B", self.value_mask))
2880 return ''.join(packed)
2881
2882 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002883 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002884 obj = ip_dscp_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002885 _type_len = reader.read("!L")[0]
2886 assert(_type_len == 2147488002)
2887 obj.value = reader.read("!B")[0]
2888 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002889 return obj
2890
2891 def __eq__(self, other):
2892 if type(self) != type(other): return False
2893 if self.value != other.value: return False
2894 if self.value_mask != other.value_mask: return False
2895 return True
2896
Rich Lanec2ee4b82013-04-24 17:12:38 -07002897 def pretty_print(self, q):
2898 q.text("ip_dscp_masked {")
2899 with q.group():
2900 with q.indent(2):
2901 q.breakable()
2902 q.text("value = ");
2903 q.text("%#x" % self.value)
2904 q.text(","); q.breakable()
2905 q.text("value_mask = ");
2906 q.text("%#x" % self.value_mask)
2907 q.breakable()
2908 q.text('}')
2909
Rich Lane7dcdf022013-12-11 14:45:27 -08002910oxm.subtypes[2147488002] = ip_dscp_masked
2911
2912class ip_ecn(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002913 type_len = 2147488257
Rich Lanec2ee4b82013-04-24 17:12:38 -07002914
2915 def __init__(self, value=None):
2916 if value != None:
2917 self.value = value
2918 else:
2919 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002920 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002921
2922 def pack(self):
2923 packed = []
2924 packed.append(struct.pack("!L", self.type_len))
2925 packed.append(struct.pack("!B", self.value))
2926 return ''.join(packed)
2927
2928 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002929 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002930 obj = ip_ecn()
Dan Talaycof6202252013-07-02 01:00:29 -07002931 _type_len = reader.read("!L")[0]
2932 assert(_type_len == 2147488257)
2933 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002934 return obj
2935
2936 def __eq__(self, other):
2937 if type(self) != type(other): return False
2938 if self.value != other.value: return False
2939 return True
2940
Rich Lanec2ee4b82013-04-24 17:12:38 -07002941 def pretty_print(self, q):
2942 q.text("ip_ecn {")
2943 with q.group():
2944 with q.indent(2):
2945 q.breakable()
2946 q.text("value = ");
2947 q.text("%#x" % self.value)
2948 q.breakable()
2949 q.text('}')
2950
Rich Lane7dcdf022013-12-11 14:45:27 -08002951oxm.subtypes[2147488257] = ip_ecn
2952
2953class ip_ecn_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002954 type_len = 2147488514
Rich Lanec2ee4b82013-04-24 17:12:38 -07002955
2956 def __init__(self, value=None, value_mask=None):
2957 if value != None:
2958 self.value = value
2959 else:
2960 self.value = 0
2961 if value_mask != None:
2962 self.value_mask = value_mask
2963 else:
2964 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002965 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002966
2967 def pack(self):
2968 packed = []
2969 packed.append(struct.pack("!L", self.type_len))
2970 packed.append(struct.pack("!B", self.value))
2971 packed.append(struct.pack("!B", self.value_mask))
2972 return ''.join(packed)
2973
2974 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002975 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002976 obj = ip_ecn_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002977 _type_len = reader.read("!L")[0]
2978 assert(_type_len == 2147488514)
2979 obj.value = reader.read("!B")[0]
2980 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002981 return obj
2982
2983 def __eq__(self, other):
2984 if type(self) != type(other): return False
2985 if self.value != other.value: return False
2986 if self.value_mask != other.value_mask: return False
2987 return True
2988
Rich Lanec2ee4b82013-04-24 17:12:38 -07002989 def pretty_print(self, q):
2990 q.text("ip_ecn_masked {")
2991 with q.group():
2992 with q.indent(2):
2993 q.breakable()
2994 q.text("value = ");
2995 q.text("%#x" % self.value)
2996 q.text(","); q.breakable()
2997 q.text("value_mask = ");
2998 q.text("%#x" % self.value_mask)
2999 q.breakable()
3000 q.text('}')
3001
Rich Lane7dcdf022013-12-11 14:45:27 -08003002oxm.subtypes[2147488514] = ip_ecn_masked
3003
3004class ip_proto(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003005 type_len = 2147488769
Rich Lanec2ee4b82013-04-24 17:12:38 -07003006
3007 def __init__(self, value=None):
3008 if value != None:
3009 self.value = value
3010 else:
3011 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003012 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003013
3014 def pack(self):
3015 packed = []
3016 packed.append(struct.pack("!L", self.type_len))
3017 packed.append(struct.pack("!B", self.value))
3018 return ''.join(packed)
3019
3020 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003021 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003022 obj = ip_proto()
Dan Talaycof6202252013-07-02 01:00:29 -07003023 _type_len = reader.read("!L")[0]
3024 assert(_type_len == 2147488769)
3025 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003026 return obj
3027
3028 def __eq__(self, other):
3029 if type(self) != type(other): return False
3030 if self.value != other.value: return False
3031 return True
3032
Rich Lanec2ee4b82013-04-24 17:12:38 -07003033 def pretty_print(self, q):
3034 q.text("ip_proto {")
3035 with q.group():
3036 with q.indent(2):
3037 q.breakable()
3038 q.text("value = ");
3039 q.text("%#x" % self.value)
3040 q.breakable()
3041 q.text('}')
3042
Rich Lane7dcdf022013-12-11 14:45:27 -08003043oxm.subtypes[2147488769] = ip_proto
3044
3045class ip_proto_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003046 type_len = 2147489026
Rich Lanec2ee4b82013-04-24 17:12:38 -07003047
3048 def __init__(self, value=None, value_mask=None):
3049 if value != None:
3050 self.value = value
3051 else:
3052 self.value = 0
3053 if value_mask != None:
3054 self.value_mask = value_mask
3055 else:
3056 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003057 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003058
3059 def pack(self):
3060 packed = []
3061 packed.append(struct.pack("!L", self.type_len))
3062 packed.append(struct.pack("!B", self.value))
3063 packed.append(struct.pack("!B", self.value_mask))
3064 return ''.join(packed)
3065
3066 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003067 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003068 obj = ip_proto_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003069 _type_len = reader.read("!L")[0]
3070 assert(_type_len == 2147489026)
3071 obj.value = reader.read("!B")[0]
3072 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003073 return obj
3074
3075 def __eq__(self, other):
3076 if type(self) != type(other): return False
3077 if self.value != other.value: return False
3078 if self.value_mask != other.value_mask: return False
3079 return True
3080
Rich Lanec2ee4b82013-04-24 17:12:38 -07003081 def pretty_print(self, q):
3082 q.text("ip_proto_masked {")
3083 with q.group():
3084 with q.indent(2):
3085 q.breakable()
3086 q.text("value = ");
3087 q.text("%#x" % self.value)
3088 q.text(","); q.breakable()
3089 q.text("value_mask = ");
3090 q.text("%#x" % self.value_mask)
3091 q.breakable()
3092 q.text('}')
3093
Rich Lane7dcdf022013-12-11 14:45:27 -08003094oxm.subtypes[2147489026] = ip_proto_masked
3095
3096class ipv4_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003097 type_len = 2147489796
Rich Lanec2ee4b82013-04-24 17:12:38 -07003098
3099 def __init__(self, value=None):
3100 if value != None:
3101 self.value = value
3102 else:
3103 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003104 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003105
3106 def pack(self):
3107 packed = []
3108 packed.append(struct.pack("!L", self.type_len))
3109 packed.append(struct.pack("!L", self.value))
3110 return ''.join(packed)
3111
3112 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003113 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003114 obj = ipv4_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003115 _type_len = reader.read("!L")[0]
3116 assert(_type_len == 2147489796)
3117 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003118 return obj
3119
3120 def __eq__(self, other):
3121 if type(self) != type(other): return False
3122 if self.value != other.value: return False
3123 return True
3124
Rich Lanec2ee4b82013-04-24 17:12:38 -07003125 def pretty_print(self, q):
3126 q.text("ipv4_dst {")
3127 with q.group():
3128 with q.indent(2):
3129 q.breakable()
3130 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07003131 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003132 q.breakable()
3133 q.text('}')
3134
Rich Lane7dcdf022013-12-11 14:45:27 -08003135oxm.subtypes[2147489796] = ipv4_dst
3136
3137class ipv4_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003138 type_len = 2147490056
Rich Lanec2ee4b82013-04-24 17:12:38 -07003139
3140 def __init__(self, value=None, value_mask=None):
3141 if value != None:
3142 self.value = value
3143 else:
3144 self.value = 0
3145 if value_mask != None:
3146 self.value_mask = value_mask
3147 else:
3148 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003149 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003150
3151 def pack(self):
3152 packed = []
3153 packed.append(struct.pack("!L", self.type_len))
3154 packed.append(struct.pack("!L", self.value))
3155 packed.append(struct.pack("!L", self.value_mask))
3156 return ''.join(packed)
3157
3158 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003159 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003160 obj = ipv4_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003161 _type_len = reader.read("!L")[0]
3162 assert(_type_len == 2147490056)
3163 obj.value = reader.read("!L")[0]
3164 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003165 return obj
3166
3167 def __eq__(self, other):
3168 if type(self) != type(other): return False
3169 if self.value != other.value: return False
3170 if self.value_mask != other.value_mask: return False
3171 return True
3172
Rich Lanec2ee4b82013-04-24 17:12:38 -07003173 def pretty_print(self, q):
3174 q.text("ipv4_dst_masked {")
3175 with q.group():
3176 with q.indent(2):
3177 q.breakable()
3178 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07003179 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003180 q.text(","); q.breakable()
3181 q.text("value_mask = ");
Rich Laned53156a2013-08-05 17:17:33 -07003182 q.text(util.pretty_ipv4(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003183 q.breakable()
3184 q.text('}')
3185
Rich Lane7dcdf022013-12-11 14:45:27 -08003186oxm.subtypes[2147490056] = ipv4_dst_masked
3187
3188class ipv4_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003189 type_len = 2147489284
Rich Lanec2ee4b82013-04-24 17:12:38 -07003190
3191 def __init__(self, value=None):
3192 if value != None:
3193 self.value = value
3194 else:
3195 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003196 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003197
3198 def pack(self):
3199 packed = []
3200 packed.append(struct.pack("!L", self.type_len))
3201 packed.append(struct.pack("!L", self.value))
3202 return ''.join(packed)
3203
3204 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003205 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003206 obj = ipv4_src()
Dan Talaycof6202252013-07-02 01:00:29 -07003207 _type_len = reader.read("!L")[0]
3208 assert(_type_len == 2147489284)
3209 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003210 return obj
3211
3212 def __eq__(self, other):
3213 if type(self) != type(other): return False
3214 if self.value != other.value: return False
3215 return True
3216
Rich Lanec2ee4b82013-04-24 17:12:38 -07003217 def pretty_print(self, q):
3218 q.text("ipv4_src {")
3219 with q.group():
3220 with q.indent(2):
3221 q.breakable()
3222 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07003223 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003224 q.breakable()
3225 q.text('}')
3226
Rich Lane7dcdf022013-12-11 14:45:27 -08003227oxm.subtypes[2147489284] = ipv4_src
3228
3229class ipv4_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003230 type_len = 2147489544
Rich Lanec2ee4b82013-04-24 17:12:38 -07003231
3232 def __init__(self, value=None, value_mask=None):
3233 if value != None:
3234 self.value = value
3235 else:
3236 self.value = 0
3237 if value_mask != None:
3238 self.value_mask = value_mask
3239 else:
3240 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003241 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003242
3243 def pack(self):
3244 packed = []
3245 packed.append(struct.pack("!L", self.type_len))
3246 packed.append(struct.pack("!L", self.value))
3247 packed.append(struct.pack("!L", self.value_mask))
3248 return ''.join(packed)
3249
3250 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003251 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003252 obj = ipv4_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003253 _type_len = reader.read("!L")[0]
3254 assert(_type_len == 2147489544)
3255 obj.value = reader.read("!L")[0]
3256 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003257 return obj
3258
3259 def __eq__(self, other):
3260 if type(self) != type(other): return False
3261 if self.value != other.value: return False
3262 if self.value_mask != other.value_mask: return False
3263 return True
3264
Rich Lanec2ee4b82013-04-24 17:12:38 -07003265 def pretty_print(self, q):
3266 q.text("ipv4_src_masked {")
3267 with q.group():
3268 with q.indent(2):
3269 q.breakable()
3270 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07003271 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003272 q.text(","); q.breakable()
3273 q.text("value_mask = ");
Rich Laned53156a2013-08-05 17:17:33 -07003274 q.text(util.pretty_ipv4(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003275 q.breakable()
3276 q.text('}')
3277
Rich Lane7dcdf022013-12-11 14:45:27 -08003278oxm.subtypes[2147489544] = ipv4_src_masked
3279
3280class ipv6_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003281 type_len = 2147497488
Rich Lanec2ee4b82013-04-24 17:12:38 -07003282
3283 def __init__(self, value=None):
3284 if value != None:
3285 self.value = value
3286 else:
3287 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Rich Lane7dcdf022013-12-11 14:45:27 -08003288 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003289
3290 def pack(self):
3291 packed = []
3292 packed.append(struct.pack("!L", self.type_len))
3293 packed.append(struct.pack("!16s", self.value))
3294 return ''.join(packed)
3295
3296 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003297 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003298 obj = ipv6_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003299 _type_len = reader.read("!L")[0]
3300 assert(_type_len == 2147497488)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003301 obj.value = reader.read('!16s')[0]
3302 return obj
3303
3304 def __eq__(self, other):
3305 if type(self) != type(other): return False
3306 if self.value != other.value: return False
3307 return True
3308
Rich Lanec2ee4b82013-04-24 17:12:38 -07003309 def pretty_print(self, q):
3310 q.text("ipv6_dst {")
3311 with q.group():
3312 with q.indent(2):
3313 q.breakable()
3314 q.text("value = ");
3315 q.pp(self.value)
3316 q.breakable()
3317 q.text('}')
3318
Rich Lane7dcdf022013-12-11 14:45:27 -08003319oxm.subtypes[2147497488] = ipv6_dst
3320
3321class ipv6_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003322 type_len = 2147497760
Rich Lanec2ee4b82013-04-24 17:12:38 -07003323
3324 def __init__(self, value=None, value_mask=None):
3325 if value != None:
3326 self.value = value
3327 else:
3328 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
3329 if value_mask != None:
3330 self.value_mask = value_mask
3331 else:
3332 self.value_mask = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Rich Lane7dcdf022013-12-11 14:45:27 -08003333 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003334
3335 def pack(self):
3336 packed = []
3337 packed.append(struct.pack("!L", self.type_len))
3338 packed.append(struct.pack("!16s", self.value))
3339 packed.append(struct.pack("!16s", self.value_mask))
3340 return ''.join(packed)
3341
3342 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003343 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003344 obj = ipv6_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003345 _type_len = reader.read("!L")[0]
3346 assert(_type_len == 2147497760)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003347 obj.value = reader.read('!16s')[0]
3348 obj.value_mask = reader.read('!16s')[0]
3349 return obj
3350
3351 def __eq__(self, other):
3352 if type(self) != type(other): return False
3353 if self.value != other.value: return False
3354 if self.value_mask != other.value_mask: return False
3355 return True
3356
Rich Lanec2ee4b82013-04-24 17:12:38 -07003357 def pretty_print(self, q):
3358 q.text("ipv6_dst_masked {")
3359 with q.group():
3360 with q.indent(2):
3361 q.breakable()
3362 q.text("value = ");
3363 q.pp(self.value)
3364 q.text(","); q.breakable()
3365 q.text("value_mask = ");
3366 q.pp(self.value_mask)
3367 q.breakable()
3368 q.text('}')
3369
Rich Lane7dcdf022013-12-11 14:45:27 -08003370oxm.subtypes[2147497760] = ipv6_dst_masked
3371
3372class ipv6_flabel(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003373 type_len = 2147497988
Rich Lanec2ee4b82013-04-24 17:12:38 -07003374
3375 def __init__(self, value=None):
3376 if value != None:
3377 self.value = value
3378 else:
3379 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003380 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003381
3382 def pack(self):
3383 packed = []
3384 packed.append(struct.pack("!L", self.type_len))
3385 packed.append(struct.pack("!L", self.value))
3386 return ''.join(packed)
3387
3388 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003389 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003390 obj = ipv6_flabel()
Dan Talaycof6202252013-07-02 01:00:29 -07003391 _type_len = reader.read("!L")[0]
3392 assert(_type_len == 2147497988)
3393 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003394 return obj
3395
3396 def __eq__(self, other):
3397 if type(self) != type(other): return False
3398 if self.value != other.value: return False
3399 return True
3400
Rich Lanec2ee4b82013-04-24 17:12:38 -07003401 def pretty_print(self, q):
3402 q.text("ipv6_flabel {")
3403 with q.group():
3404 with q.indent(2):
3405 q.breakable()
3406 q.text("value = ");
3407 q.text("%#x" % self.value)
3408 q.breakable()
3409 q.text('}')
3410
Rich Lane7dcdf022013-12-11 14:45:27 -08003411oxm.subtypes[2147497988] = ipv6_flabel
3412
3413class ipv6_flabel_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003414 type_len = 2147498248
Rich Lanec2ee4b82013-04-24 17:12:38 -07003415
3416 def __init__(self, value=None, value_mask=None):
3417 if value != None:
3418 self.value = value
3419 else:
3420 self.value = 0
3421 if value_mask != None:
3422 self.value_mask = value_mask
3423 else:
3424 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003425 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003426
3427 def pack(self):
3428 packed = []
3429 packed.append(struct.pack("!L", self.type_len))
3430 packed.append(struct.pack("!L", self.value))
3431 packed.append(struct.pack("!L", self.value_mask))
3432 return ''.join(packed)
3433
3434 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003435 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003436 obj = ipv6_flabel_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003437 _type_len = reader.read("!L")[0]
3438 assert(_type_len == 2147498248)
3439 obj.value = reader.read("!L")[0]
3440 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003441 return obj
3442
3443 def __eq__(self, other):
3444 if type(self) != type(other): return False
3445 if self.value != other.value: return False
3446 if self.value_mask != other.value_mask: return False
3447 return True
3448
Rich Lanec2ee4b82013-04-24 17:12:38 -07003449 def pretty_print(self, q):
3450 q.text("ipv6_flabel_masked {")
3451 with q.group():
3452 with q.indent(2):
3453 q.breakable()
3454 q.text("value = ");
3455 q.text("%#x" % self.value)
3456 q.text(","); q.breakable()
3457 q.text("value_mask = ");
3458 q.text("%#x" % self.value_mask)
3459 q.breakable()
3460 q.text('}')
3461
Rich Lane7dcdf022013-12-11 14:45:27 -08003462oxm.subtypes[2147498248] = ipv6_flabel_masked
3463
3464class ipv6_nd_sll(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003465 type_len = 2147500038
Rich Lanec2ee4b82013-04-24 17:12:38 -07003466
3467 def __init__(self, value=None):
3468 if value != None:
3469 self.value = value
3470 else:
3471 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08003472 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003473
3474 def pack(self):
3475 packed = []
3476 packed.append(struct.pack("!L", self.type_len))
3477 packed.append(struct.pack("!6B", *self.value))
3478 return ''.join(packed)
3479
3480 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003481 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003482 obj = ipv6_nd_sll()
Dan Talaycof6202252013-07-02 01:00:29 -07003483 _type_len = reader.read("!L")[0]
3484 assert(_type_len == 2147500038)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003485 obj.value = list(reader.read('!6B'))
3486 return obj
3487
3488 def __eq__(self, other):
3489 if type(self) != type(other): return False
3490 if self.value != other.value: return False
3491 return True
3492
Rich Lanec2ee4b82013-04-24 17:12:38 -07003493 def pretty_print(self, q):
3494 q.text("ipv6_nd_sll {")
3495 with q.group():
3496 with q.indent(2):
3497 q.breakable()
3498 q.text("value = ");
3499 q.text(util.pretty_mac(self.value))
3500 q.breakable()
3501 q.text('}')
3502
Rich Lane7dcdf022013-12-11 14:45:27 -08003503oxm.subtypes[2147500038] = ipv6_nd_sll
3504
3505class ipv6_nd_sll_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003506 type_len = 2147500300
Rich Lanec2ee4b82013-04-24 17:12:38 -07003507
3508 def __init__(self, value=None, value_mask=None):
3509 if value != None:
3510 self.value = value
3511 else:
3512 self.value = [0,0,0,0,0,0]
3513 if value_mask != None:
3514 self.value_mask = value_mask
3515 else:
3516 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08003517 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003518
3519 def pack(self):
3520 packed = []
3521 packed.append(struct.pack("!L", self.type_len))
3522 packed.append(struct.pack("!6B", *self.value))
3523 packed.append(struct.pack("!6B", *self.value_mask))
3524 return ''.join(packed)
3525
3526 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003527 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003528 obj = ipv6_nd_sll_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003529 _type_len = reader.read("!L")[0]
3530 assert(_type_len == 2147500300)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003531 obj.value = list(reader.read('!6B'))
3532 obj.value_mask = list(reader.read('!6B'))
3533 return obj
3534
3535 def __eq__(self, other):
3536 if type(self) != type(other): return False
3537 if self.value != other.value: return False
3538 if self.value_mask != other.value_mask: return False
3539 return True
3540
Rich Lanec2ee4b82013-04-24 17:12:38 -07003541 def pretty_print(self, q):
3542 q.text("ipv6_nd_sll_masked {")
3543 with q.group():
3544 with q.indent(2):
3545 q.breakable()
3546 q.text("value = ");
3547 q.text(util.pretty_mac(self.value))
3548 q.text(","); q.breakable()
3549 q.text("value_mask = ");
3550 q.text(util.pretty_mac(self.value_mask))
3551 q.breakable()
3552 q.text('}')
3553
Rich Lane7dcdf022013-12-11 14:45:27 -08003554oxm.subtypes[2147500300] = ipv6_nd_sll_masked
3555
3556class ipv6_nd_target(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003557 type_len = 2147499536
Rich Lanec2ee4b82013-04-24 17:12:38 -07003558
3559 def __init__(self, value=None):
3560 if value != None:
3561 self.value = value
3562 else:
3563 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Rich Lane7dcdf022013-12-11 14:45:27 -08003564 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003565
3566 def pack(self):
3567 packed = []
3568 packed.append(struct.pack("!L", self.type_len))
3569 packed.append(struct.pack("!16s", self.value))
3570 return ''.join(packed)
3571
3572 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003573 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003574 obj = ipv6_nd_target()
Dan Talaycof6202252013-07-02 01:00:29 -07003575 _type_len = reader.read("!L")[0]
3576 assert(_type_len == 2147499536)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003577 obj.value = reader.read('!16s')[0]
3578 return obj
3579
3580 def __eq__(self, other):
3581 if type(self) != type(other): return False
3582 if self.value != other.value: return False
3583 return True
3584
Rich Lanec2ee4b82013-04-24 17:12:38 -07003585 def pretty_print(self, q):
3586 q.text("ipv6_nd_target {")
3587 with q.group():
3588 with q.indent(2):
3589 q.breakable()
3590 q.text("value = ");
3591 q.pp(self.value)
3592 q.breakable()
3593 q.text('}')
3594
Rich Lane7dcdf022013-12-11 14:45:27 -08003595oxm.subtypes[2147499536] = ipv6_nd_target
3596
3597class ipv6_nd_target_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003598 type_len = 2147499808
Rich Lanec2ee4b82013-04-24 17:12:38 -07003599
3600 def __init__(self, value=None, value_mask=None):
3601 if value != None:
3602 self.value = value
3603 else:
3604 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
3605 if value_mask != None:
3606 self.value_mask = value_mask
3607 else:
3608 self.value_mask = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Rich Lane7dcdf022013-12-11 14:45:27 -08003609 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003610
3611 def pack(self):
3612 packed = []
3613 packed.append(struct.pack("!L", self.type_len))
3614 packed.append(struct.pack("!16s", self.value))
3615 packed.append(struct.pack("!16s", self.value_mask))
3616 return ''.join(packed)
3617
3618 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003619 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003620 obj = ipv6_nd_target_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003621 _type_len = reader.read("!L")[0]
3622 assert(_type_len == 2147499808)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003623 obj.value = reader.read('!16s')[0]
3624 obj.value_mask = reader.read('!16s')[0]
3625 return obj
3626
3627 def __eq__(self, other):
3628 if type(self) != type(other): return False
3629 if self.value != other.value: return False
3630 if self.value_mask != other.value_mask: return False
3631 return True
3632
Rich Lanec2ee4b82013-04-24 17:12:38 -07003633 def pretty_print(self, q):
3634 q.text("ipv6_nd_target_masked {")
3635 with q.group():
3636 with q.indent(2):
3637 q.breakable()
3638 q.text("value = ");
3639 q.pp(self.value)
3640 q.text(","); q.breakable()
3641 q.text("value_mask = ");
3642 q.pp(self.value_mask)
3643 q.breakable()
3644 q.text('}')
3645
Rich Lane7dcdf022013-12-11 14:45:27 -08003646oxm.subtypes[2147499808] = ipv6_nd_target_masked
3647
3648class ipv6_nd_tll(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003649 type_len = 2147500550
Rich Lanec2ee4b82013-04-24 17:12:38 -07003650
3651 def __init__(self, value=None):
3652 if value != None:
3653 self.value = value
3654 else:
3655 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08003656 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003657
3658 def pack(self):
3659 packed = []
3660 packed.append(struct.pack("!L", self.type_len))
3661 packed.append(struct.pack("!6B", *self.value))
3662 return ''.join(packed)
3663
3664 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003665 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003666 obj = ipv6_nd_tll()
Dan Talaycof6202252013-07-02 01:00:29 -07003667 _type_len = reader.read("!L")[0]
3668 assert(_type_len == 2147500550)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003669 obj.value = list(reader.read('!6B'))
3670 return obj
3671
3672 def __eq__(self, other):
3673 if type(self) != type(other): return False
3674 if self.value != other.value: return False
3675 return True
3676
Rich Lanec2ee4b82013-04-24 17:12:38 -07003677 def pretty_print(self, q):
3678 q.text("ipv6_nd_tll {")
3679 with q.group():
3680 with q.indent(2):
3681 q.breakable()
3682 q.text("value = ");
3683 q.text(util.pretty_mac(self.value))
3684 q.breakable()
3685 q.text('}')
3686
Rich Lane7dcdf022013-12-11 14:45:27 -08003687oxm.subtypes[2147500550] = ipv6_nd_tll
3688
3689class ipv6_nd_tll_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003690 type_len = 2147500812
Rich Lanec2ee4b82013-04-24 17:12:38 -07003691
3692 def __init__(self, value=None, value_mask=None):
3693 if value != None:
3694 self.value = value
3695 else:
3696 self.value = [0,0,0,0,0,0]
3697 if value_mask != None:
3698 self.value_mask = value_mask
3699 else:
3700 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08003701 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003702
3703 def pack(self):
3704 packed = []
3705 packed.append(struct.pack("!L", self.type_len))
3706 packed.append(struct.pack("!6B", *self.value))
3707 packed.append(struct.pack("!6B", *self.value_mask))
3708 return ''.join(packed)
3709
3710 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003711 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003712 obj = ipv6_nd_tll_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003713 _type_len = reader.read("!L")[0]
3714 assert(_type_len == 2147500812)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003715 obj.value = list(reader.read('!6B'))
3716 obj.value_mask = list(reader.read('!6B'))
3717 return obj
3718
3719 def __eq__(self, other):
3720 if type(self) != type(other): return False
3721 if self.value != other.value: return False
3722 if self.value_mask != other.value_mask: return False
3723 return True
3724
Rich Lanec2ee4b82013-04-24 17:12:38 -07003725 def pretty_print(self, q):
3726 q.text("ipv6_nd_tll_masked {")
3727 with q.group():
3728 with q.indent(2):
3729 q.breakable()
3730 q.text("value = ");
3731 q.text(util.pretty_mac(self.value))
3732 q.text(","); q.breakable()
3733 q.text("value_mask = ");
3734 q.text(util.pretty_mac(self.value_mask))
3735 q.breakable()
3736 q.text('}')
3737
Rich Lane7dcdf022013-12-11 14:45:27 -08003738oxm.subtypes[2147500812] = ipv6_nd_tll_masked
3739
3740class ipv6_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003741 type_len = 2147496976
Rich Lanec2ee4b82013-04-24 17:12:38 -07003742
3743 def __init__(self, value=None):
3744 if value != None:
3745 self.value = value
3746 else:
3747 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Rich Lane7dcdf022013-12-11 14:45:27 -08003748 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003749
3750 def pack(self):
3751 packed = []
3752 packed.append(struct.pack("!L", self.type_len))
3753 packed.append(struct.pack("!16s", self.value))
3754 return ''.join(packed)
3755
3756 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003757 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003758 obj = ipv6_src()
Dan Talaycof6202252013-07-02 01:00:29 -07003759 _type_len = reader.read("!L")[0]
3760 assert(_type_len == 2147496976)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003761 obj.value = reader.read('!16s')[0]
3762 return obj
3763
3764 def __eq__(self, other):
3765 if type(self) != type(other): return False
3766 if self.value != other.value: return False
3767 return True
3768
Rich Lanec2ee4b82013-04-24 17:12:38 -07003769 def pretty_print(self, q):
3770 q.text("ipv6_src {")
3771 with q.group():
3772 with q.indent(2):
3773 q.breakable()
3774 q.text("value = ");
3775 q.pp(self.value)
3776 q.breakable()
3777 q.text('}')
3778
Rich Lane7dcdf022013-12-11 14:45:27 -08003779oxm.subtypes[2147496976] = ipv6_src
3780
3781class ipv6_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003782 type_len = 2147497248
Rich Lanec2ee4b82013-04-24 17:12:38 -07003783
3784 def __init__(self, value=None, value_mask=None):
3785 if value != None:
3786 self.value = value
3787 else:
3788 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
3789 if value_mask != None:
3790 self.value_mask = value_mask
3791 else:
3792 self.value_mask = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Rich Lane7dcdf022013-12-11 14:45:27 -08003793 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003794
3795 def pack(self):
3796 packed = []
3797 packed.append(struct.pack("!L", self.type_len))
3798 packed.append(struct.pack("!16s", self.value))
3799 packed.append(struct.pack("!16s", self.value_mask))
3800 return ''.join(packed)
3801
3802 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003803 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003804 obj = ipv6_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003805 _type_len = reader.read("!L")[0]
3806 assert(_type_len == 2147497248)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003807 obj.value = reader.read('!16s')[0]
3808 obj.value_mask = reader.read('!16s')[0]
3809 return obj
3810
3811 def __eq__(self, other):
3812 if type(self) != type(other): return False
3813 if self.value != other.value: return False
3814 if self.value_mask != other.value_mask: return False
3815 return True
3816
Rich Lanec2ee4b82013-04-24 17:12:38 -07003817 def pretty_print(self, q):
3818 q.text("ipv6_src_masked {")
3819 with q.group():
3820 with q.indent(2):
3821 q.breakable()
3822 q.text("value = ");
3823 q.pp(self.value)
3824 q.text(","); q.breakable()
3825 q.text("value_mask = ");
3826 q.pp(self.value_mask)
3827 q.breakable()
3828 q.text('}')
3829
Rich Lane7dcdf022013-12-11 14:45:27 -08003830oxm.subtypes[2147497248] = ipv6_src_masked
3831
3832class metadata(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003833 type_len = 2147484680
Rich Lanec2ee4b82013-04-24 17:12:38 -07003834
3835 def __init__(self, value=None):
3836 if value != None:
3837 self.value = value
3838 else:
3839 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003840 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003841
3842 def pack(self):
3843 packed = []
3844 packed.append(struct.pack("!L", self.type_len))
3845 packed.append(struct.pack("!Q", self.value))
3846 return ''.join(packed)
3847
3848 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003849 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003850 obj = metadata()
Dan Talaycof6202252013-07-02 01:00:29 -07003851 _type_len = reader.read("!L")[0]
3852 assert(_type_len == 2147484680)
3853 obj.value = reader.read("!Q")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003854 return obj
3855
3856 def __eq__(self, other):
3857 if type(self) != type(other): return False
3858 if self.value != other.value: return False
3859 return True
3860
Rich Lanec2ee4b82013-04-24 17:12:38 -07003861 def pretty_print(self, q):
3862 q.text("metadata {")
3863 with q.group():
3864 with q.indent(2):
3865 q.breakable()
3866 q.text("value = ");
3867 q.text("%#x" % self.value)
3868 q.breakable()
3869 q.text('}')
3870
Rich Lane7dcdf022013-12-11 14:45:27 -08003871oxm.subtypes[2147484680] = metadata
3872
3873class metadata_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003874 type_len = 2147484944
Rich Lanec2ee4b82013-04-24 17:12:38 -07003875
3876 def __init__(self, value=None, value_mask=None):
3877 if value != None:
3878 self.value = value
3879 else:
3880 self.value = 0
3881 if value_mask != None:
3882 self.value_mask = value_mask
3883 else:
3884 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003885 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003886
3887 def pack(self):
3888 packed = []
3889 packed.append(struct.pack("!L", self.type_len))
3890 packed.append(struct.pack("!Q", self.value))
3891 packed.append(struct.pack("!Q", self.value_mask))
3892 return ''.join(packed)
3893
3894 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003895 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003896 obj = metadata_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003897 _type_len = reader.read("!L")[0]
3898 assert(_type_len == 2147484944)
3899 obj.value = reader.read("!Q")[0]
3900 obj.value_mask = reader.read("!Q")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003901 return obj
3902
3903 def __eq__(self, other):
3904 if type(self) != type(other): return False
3905 if self.value != other.value: return False
3906 if self.value_mask != other.value_mask: return False
3907 return True
3908
Rich Lanec2ee4b82013-04-24 17:12:38 -07003909 def pretty_print(self, q):
3910 q.text("metadata_masked {")
3911 with q.group():
3912 with q.indent(2):
3913 q.breakable()
3914 q.text("value = ");
3915 q.text("%#x" % self.value)
3916 q.text(","); q.breakable()
3917 q.text("value_mask = ");
3918 q.text("%#x" % self.value_mask)
3919 q.breakable()
3920 q.text('}')
3921
Rich Lane7dcdf022013-12-11 14:45:27 -08003922oxm.subtypes[2147484944] = metadata_masked
3923
3924class mpls_label(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003925 type_len = 2147501060
Rich Lanec2ee4b82013-04-24 17:12:38 -07003926
3927 def __init__(self, value=None):
3928 if value != None:
3929 self.value = value
3930 else:
3931 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003932 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003933
3934 def pack(self):
3935 packed = []
3936 packed.append(struct.pack("!L", self.type_len))
3937 packed.append(struct.pack("!L", self.value))
3938 return ''.join(packed)
3939
3940 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003941 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003942 obj = mpls_label()
Dan Talaycof6202252013-07-02 01:00:29 -07003943 _type_len = reader.read("!L")[0]
3944 assert(_type_len == 2147501060)
3945 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003946 return obj
3947
3948 def __eq__(self, other):
3949 if type(self) != type(other): return False
3950 if self.value != other.value: return False
3951 return True
3952
Rich Lanec2ee4b82013-04-24 17:12:38 -07003953 def pretty_print(self, q):
3954 q.text("mpls_label {")
3955 with q.group():
3956 with q.indent(2):
3957 q.breakable()
3958 q.text("value = ");
3959 q.text("%#x" % self.value)
3960 q.breakable()
3961 q.text('}')
3962
Rich Lane7dcdf022013-12-11 14:45:27 -08003963oxm.subtypes[2147501060] = mpls_label
3964
3965class mpls_label_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003966 type_len = 2147501320
Rich Lanec2ee4b82013-04-24 17:12:38 -07003967
3968 def __init__(self, value=None, value_mask=None):
3969 if value != None:
3970 self.value = value
3971 else:
3972 self.value = 0
3973 if value_mask != None:
3974 self.value_mask = value_mask
3975 else:
3976 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003977 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003978
3979 def pack(self):
3980 packed = []
3981 packed.append(struct.pack("!L", self.type_len))
3982 packed.append(struct.pack("!L", self.value))
3983 packed.append(struct.pack("!L", self.value_mask))
3984 return ''.join(packed)
3985
3986 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003987 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003988 obj = mpls_label_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003989 _type_len = reader.read("!L")[0]
3990 assert(_type_len == 2147501320)
3991 obj.value = reader.read("!L")[0]
3992 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003993 return obj
3994
3995 def __eq__(self, other):
3996 if type(self) != type(other): return False
3997 if self.value != other.value: return False
3998 if self.value_mask != other.value_mask: return False
3999 return True
4000
Rich Lanec2ee4b82013-04-24 17:12:38 -07004001 def pretty_print(self, q):
4002 q.text("mpls_label_masked {")
4003 with q.group():
4004 with q.indent(2):
4005 q.breakable()
4006 q.text("value = ");
4007 q.text("%#x" % self.value)
4008 q.text(","); q.breakable()
4009 q.text("value_mask = ");
4010 q.text("%#x" % self.value_mask)
4011 q.breakable()
4012 q.text('}')
4013
Rich Lane7dcdf022013-12-11 14:45:27 -08004014oxm.subtypes[2147501320] = mpls_label_masked
4015
4016class mpls_tc(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004017 type_len = 2147501569
Rich Lanec2ee4b82013-04-24 17:12:38 -07004018
4019 def __init__(self, value=None):
4020 if value != None:
4021 self.value = value
4022 else:
4023 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004024 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004025
4026 def pack(self):
4027 packed = []
4028 packed.append(struct.pack("!L", self.type_len))
4029 packed.append(struct.pack("!B", self.value))
4030 return ''.join(packed)
4031
4032 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004033 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004034 obj = mpls_tc()
Dan Talaycof6202252013-07-02 01:00:29 -07004035 _type_len = reader.read("!L")[0]
4036 assert(_type_len == 2147501569)
4037 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004038 return obj
4039
4040 def __eq__(self, other):
4041 if type(self) != type(other): return False
4042 if self.value != other.value: return False
4043 return True
4044
Rich Lanec2ee4b82013-04-24 17:12:38 -07004045 def pretty_print(self, q):
4046 q.text("mpls_tc {")
4047 with q.group():
4048 with q.indent(2):
4049 q.breakable()
4050 q.text("value = ");
4051 q.text("%#x" % self.value)
4052 q.breakable()
4053 q.text('}')
4054
Rich Lane7dcdf022013-12-11 14:45:27 -08004055oxm.subtypes[2147501569] = mpls_tc
4056
4057class mpls_tc_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004058 type_len = 2147501826
Rich Lanec2ee4b82013-04-24 17:12:38 -07004059
4060 def __init__(self, value=None, value_mask=None):
4061 if value != None:
4062 self.value = value
4063 else:
4064 self.value = 0
4065 if value_mask != None:
4066 self.value_mask = value_mask
4067 else:
4068 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004069 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004070
4071 def pack(self):
4072 packed = []
4073 packed.append(struct.pack("!L", self.type_len))
4074 packed.append(struct.pack("!B", self.value))
4075 packed.append(struct.pack("!B", self.value_mask))
4076 return ''.join(packed)
4077
4078 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004079 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004080 obj = mpls_tc_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004081 _type_len = reader.read("!L")[0]
4082 assert(_type_len == 2147501826)
4083 obj.value = reader.read("!B")[0]
4084 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004085 return obj
4086
4087 def __eq__(self, other):
4088 if type(self) != type(other): return False
4089 if self.value != other.value: return False
4090 if self.value_mask != other.value_mask: return False
4091 return True
4092
Rich Lanec2ee4b82013-04-24 17:12:38 -07004093 def pretty_print(self, q):
4094 q.text("mpls_tc_masked {")
4095 with q.group():
4096 with q.indent(2):
4097 q.breakable()
4098 q.text("value = ");
4099 q.text("%#x" % self.value)
4100 q.text(","); q.breakable()
4101 q.text("value_mask = ");
4102 q.text("%#x" % self.value_mask)
4103 q.breakable()
4104 q.text('}')
4105
Rich Lane7dcdf022013-12-11 14:45:27 -08004106oxm.subtypes[2147501826] = mpls_tc_masked
4107
4108class sctp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004109 type_len = 2147492866
Rich Lanec2ee4b82013-04-24 17:12:38 -07004110
4111 def __init__(self, value=None):
4112 if value != None:
4113 self.value = value
4114 else:
4115 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004116 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004117
4118 def pack(self):
4119 packed = []
4120 packed.append(struct.pack("!L", self.type_len))
4121 packed.append(struct.pack("!H", self.value))
4122 return ''.join(packed)
4123
4124 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004125 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004126 obj = sctp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07004127 _type_len = reader.read("!L")[0]
4128 assert(_type_len == 2147492866)
4129 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004130 return obj
4131
4132 def __eq__(self, other):
4133 if type(self) != type(other): return False
4134 if self.value != other.value: return False
4135 return True
4136
Rich Lanec2ee4b82013-04-24 17:12:38 -07004137 def pretty_print(self, q):
4138 q.text("sctp_dst {")
4139 with q.group():
4140 with q.indent(2):
4141 q.breakable()
4142 q.text("value = ");
4143 q.text("%#x" % self.value)
4144 q.breakable()
4145 q.text('}')
4146
Rich Lane7dcdf022013-12-11 14:45:27 -08004147oxm.subtypes[2147492866] = sctp_dst
4148
4149class sctp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004150 type_len = 2147493124
Rich Lanec2ee4b82013-04-24 17:12:38 -07004151
4152 def __init__(self, value=None, value_mask=None):
4153 if value != None:
4154 self.value = value
4155 else:
4156 self.value = 0
4157 if value_mask != None:
4158 self.value_mask = value_mask
4159 else:
4160 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004161 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004162
4163 def pack(self):
4164 packed = []
4165 packed.append(struct.pack("!L", self.type_len))
4166 packed.append(struct.pack("!H", self.value))
4167 packed.append(struct.pack("!H", self.value_mask))
4168 return ''.join(packed)
4169
4170 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004171 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004172 obj = sctp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004173 _type_len = reader.read("!L")[0]
4174 assert(_type_len == 2147493124)
4175 obj.value = reader.read("!H")[0]
4176 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004177 return obj
4178
4179 def __eq__(self, other):
4180 if type(self) != type(other): return False
4181 if self.value != other.value: return False
4182 if self.value_mask != other.value_mask: return False
4183 return True
4184
Rich Lanec2ee4b82013-04-24 17:12:38 -07004185 def pretty_print(self, q):
4186 q.text("sctp_dst_masked {")
4187 with q.group():
4188 with q.indent(2):
4189 q.breakable()
4190 q.text("value = ");
4191 q.text("%#x" % self.value)
4192 q.text(","); q.breakable()
4193 q.text("value_mask = ");
4194 q.text("%#x" % self.value_mask)
4195 q.breakable()
4196 q.text('}')
4197
Rich Lane7dcdf022013-12-11 14:45:27 -08004198oxm.subtypes[2147493124] = sctp_dst_masked
4199
4200class sctp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004201 type_len = 2147492354
Rich Lanec2ee4b82013-04-24 17:12:38 -07004202
4203 def __init__(self, value=None):
4204 if value != None:
4205 self.value = value
4206 else:
4207 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004208 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004209
4210 def pack(self):
4211 packed = []
4212 packed.append(struct.pack("!L", self.type_len))
4213 packed.append(struct.pack("!H", self.value))
4214 return ''.join(packed)
4215
4216 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004217 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004218 obj = sctp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07004219 _type_len = reader.read("!L")[0]
4220 assert(_type_len == 2147492354)
4221 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004222 return obj
4223
4224 def __eq__(self, other):
4225 if type(self) != type(other): return False
4226 if self.value != other.value: return False
4227 return True
4228
Rich Lanec2ee4b82013-04-24 17:12:38 -07004229 def pretty_print(self, q):
4230 q.text("sctp_src {")
4231 with q.group():
4232 with q.indent(2):
4233 q.breakable()
4234 q.text("value = ");
4235 q.text("%#x" % self.value)
4236 q.breakable()
4237 q.text('}')
4238
Rich Lane7dcdf022013-12-11 14:45:27 -08004239oxm.subtypes[2147492354] = sctp_src
4240
4241class sctp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004242 type_len = 2147492612
Rich Lanec2ee4b82013-04-24 17:12:38 -07004243
4244 def __init__(self, value=None, value_mask=None):
4245 if value != None:
4246 self.value = value
4247 else:
4248 self.value = 0
4249 if value_mask != None:
4250 self.value_mask = value_mask
4251 else:
4252 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004253 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004254
4255 def pack(self):
4256 packed = []
4257 packed.append(struct.pack("!L", self.type_len))
4258 packed.append(struct.pack("!H", self.value))
4259 packed.append(struct.pack("!H", self.value_mask))
4260 return ''.join(packed)
4261
4262 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004263 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004264 obj = sctp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004265 _type_len = reader.read("!L")[0]
4266 assert(_type_len == 2147492612)
4267 obj.value = reader.read("!H")[0]
4268 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004269 return obj
4270
4271 def __eq__(self, other):
4272 if type(self) != type(other): return False
4273 if self.value != other.value: return False
4274 if self.value_mask != other.value_mask: return False
4275 return True
4276
Rich Lanec2ee4b82013-04-24 17:12:38 -07004277 def pretty_print(self, q):
4278 q.text("sctp_src_masked {")
4279 with q.group():
4280 with q.indent(2):
4281 q.breakable()
4282 q.text("value = ");
4283 q.text("%#x" % self.value)
4284 q.text(","); q.breakable()
4285 q.text("value_mask = ");
4286 q.text("%#x" % self.value_mask)
4287 q.breakable()
4288 q.text('}')
4289
Rich Lane7dcdf022013-12-11 14:45:27 -08004290oxm.subtypes[2147492612] = sctp_src_masked
4291
4292class tcp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004293 type_len = 2147490818
Rich Lanec2ee4b82013-04-24 17:12:38 -07004294
4295 def __init__(self, value=None):
4296 if value != None:
4297 self.value = value
4298 else:
4299 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004300 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004301
4302 def pack(self):
4303 packed = []
4304 packed.append(struct.pack("!L", self.type_len))
4305 packed.append(struct.pack("!H", self.value))
4306 return ''.join(packed)
4307
4308 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004309 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004310 obj = tcp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07004311 _type_len = reader.read("!L")[0]
4312 assert(_type_len == 2147490818)
4313 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004314 return obj
4315
4316 def __eq__(self, other):
4317 if type(self) != type(other): return False
4318 if self.value != other.value: return False
4319 return True
4320
Rich Lanec2ee4b82013-04-24 17:12:38 -07004321 def pretty_print(self, q):
4322 q.text("tcp_dst {")
4323 with q.group():
4324 with q.indent(2):
4325 q.breakable()
4326 q.text("value = ");
4327 q.text("%#x" % self.value)
4328 q.breakable()
4329 q.text('}')
4330
Rich Lane7dcdf022013-12-11 14:45:27 -08004331oxm.subtypes[2147490818] = tcp_dst
4332
4333class tcp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004334 type_len = 2147491076
Rich Lanec2ee4b82013-04-24 17:12:38 -07004335
4336 def __init__(self, value=None, value_mask=None):
4337 if value != None:
4338 self.value = value
4339 else:
4340 self.value = 0
4341 if value_mask != None:
4342 self.value_mask = value_mask
4343 else:
4344 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004345 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004346
4347 def pack(self):
4348 packed = []
4349 packed.append(struct.pack("!L", self.type_len))
4350 packed.append(struct.pack("!H", self.value))
4351 packed.append(struct.pack("!H", self.value_mask))
4352 return ''.join(packed)
4353
4354 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004355 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004356 obj = tcp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004357 _type_len = reader.read("!L")[0]
4358 assert(_type_len == 2147491076)
4359 obj.value = reader.read("!H")[0]
4360 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004361 return obj
4362
4363 def __eq__(self, other):
4364 if type(self) != type(other): return False
4365 if self.value != other.value: return False
4366 if self.value_mask != other.value_mask: return False
4367 return True
4368
Rich Lanec2ee4b82013-04-24 17:12:38 -07004369 def pretty_print(self, q):
4370 q.text("tcp_dst_masked {")
4371 with q.group():
4372 with q.indent(2):
4373 q.breakable()
4374 q.text("value = ");
4375 q.text("%#x" % self.value)
4376 q.text(","); q.breakable()
4377 q.text("value_mask = ");
4378 q.text("%#x" % self.value_mask)
4379 q.breakable()
4380 q.text('}')
4381
Rich Lane7dcdf022013-12-11 14:45:27 -08004382oxm.subtypes[2147491076] = tcp_dst_masked
4383
4384class tcp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004385 type_len = 2147490306
Rich Lanec2ee4b82013-04-24 17:12:38 -07004386
4387 def __init__(self, value=None):
4388 if value != None:
4389 self.value = value
4390 else:
4391 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004392 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004393
4394 def pack(self):
4395 packed = []
4396 packed.append(struct.pack("!L", self.type_len))
4397 packed.append(struct.pack("!H", self.value))
4398 return ''.join(packed)
4399
4400 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004401 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004402 obj = tcp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07004403 _type_len = reader.read("!L")[0]
4404 assert(_type_len == 2147490306)
4405 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004406 return obj
4407
4408 def __eq__(self, other):
4409 if type(self) != type(other): return False
4410 if self.value != other.value: return False
4411 return True
4412
Rich Lanec2ee4b82013-04-24 17:12:38 -07004413 def pretty_print(self, q):
4414 q.text("tcp_src {")
4415 with q.group():
4416 with q.indent(2):
4417 q.breakable()
4418 q.text("value = ");
4419 q.text("%#x" % self.value)
4420 q.breakable()
4421 q.text('}')
4422
Rich Lane7dcdf022013-12-11 14:45:27 -08004423oxm.subtypes[2147490306] = tcp_src
4424
4425class tcp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004426 type_len = 2147490564
Rich Lanec2ee4b82013-04-24 17:12:38 -07004427
4428 def __init__(self, value=None, value_mask=None):
4429 if value != None:
4430 self.value = value
4431 else:
4432 self.value = 0
4433 if value_mask != None:
4434 self.value_mask = value_mask
4435 else:
4436 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004437 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004438
4439 def pack(self):
4440 packed = []
4441 packed.append(struct.pack("!L", self.type_len))
4442 packed.append(struct.pack("!H", self.value))
4443 packed.append(struct.pack("!H", self.value_mask))
4444 return ''.join(packed)
4445
4446 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004447 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004448 obj = tcp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004449 _type_len = reader.read("!L")[0]
4450 assert(_type_len == 2147490564)
4451 obj.value = reader.read("!H")[0]
4452 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004453 return obj
4454
4455 def __eq__(self, other):
4456 if type(self) != type(other): return False
4457 if self.value != other.value: return False
4458 if self.value_mask != other.value_mask: return False
4459 return True
4460
Rich Lanec2ee4b82013-04-24 17:12:38 -07004461 def pretty_print(self, q):
4462 q.text("tcp_src_masked {")
4463 with q.group():
4464 with q.indent(2):
4465 q.breakable()
4466 q.text("value = ");
4467 q.text("%#x" % self.value)
4468 q.text(","); q.breakable()
4469 q.text("value_mask = ");
4470 q.text("%#x" % self.value_mask)
4471 q.breakable()
4472 q.text('}')
4473
Rich Lane7dcdf022013-12-11 14:45:27 -08004474oxm.subtypes[2147490564] = tcp_src_masked
4475
4476class udp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004477 type_len = 2147491842
Rich Lanec2ee4b82013-04-24 17:12:38 -07004478
4479 def __init__(self, value=None):
4480 if value != None:
4481 self.value = value
4482 else:
4483 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004484 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004485
4486 def pack(self):
4487 packed = []
4488 packed.append(struct.pack("!L", self.type_len))
4489 packed.append(struct.pack("!H", self.value))
4490 return ''.join(packed)
4491
4492 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004493 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004494 obj = udp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07004495 _type_len = reader.read("!L")[0]
4496 assert(_type_len == 2147491842)
4497 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004498 return obj
4499
4500 def __eq__(self, other):
4501 if type(self) != type(other): return False
4502 if self.value != other.value: return False
4503 return True
4504
Rich Lanec2ee4b82013-04-24 17:12:38 -07004505 def pretty_print(self, q):
4506 q.text("udp_dst {")
4507 with q.group():
4508 with q.indent(2):
4509 q.breakable()
4510 q.text("value = ");
4511 q.text("%#x" % self.value)
4512 q.breakable()
4513 q.text('}')
4514
Rich Lane7dcdf022013-12-11 14:45:27 -08004515oxm.subtypes[2147491842] = udp_dst
4516
4517class udp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004518 type_len = 2147492100
Rich Lanec2ee4b82013-04-24 17:12:38 -07004519
4520 def __init__(self, value=None, value_mask=None):
4521 if value != None:
4522 self.value = value
4523 else:
4524 self.value = 0
4525 if value_mask != None:
4526 self.value_mask = value_mask
4527 else:
4528 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004529 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004530
4531 def pack(self):
4532 packed = []
4533 packed.append(struct.pack("!L", self.type_len))
4534 packed.append(struct.pack("!H", self.value))
4535 packed.append(struct.pack("!H", self.value_mask))
4536 return ''.join(packed)
4537
4538 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004539 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004540 obj = udp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004541 _type_len = reader.read("!L")[0]
4542 assert(_type_len == 2147492100)
4543 obj.value = reader.read("!H")[0]
4544 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004545 return obj
4546
4547 def __eq__(self, other):
4548 if type(self) != type(other): return False
4549 if self.value != other.value: return False
4550 if self.value_mask != other.value_mask: return False
4551 return True
4552
Rich Lanec2ee4b82013-04-24 17:12:38 -07004553 def pretty_print(self, q):
4554 q.text("udp_dst_masked {")
4555 with q.group():
4556 with q.indent(2):
4557 q.breakable()
4558 q.text("value = ");
4559 q.text("%#x" % self.value)
4560 q.text(","); q.breakable()
4561 q.text("value_mask = ");
4562 q.text("%#x" % self.value_mask)
4563 q.breakable()
4564 q.text('}')
4565
Rich Lane7dcdf022013-12-11 14:45:27 -08004566oxm.subtypes[2147492100] = udp_dst_masked
4567
4568class udp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004569 type_len = 2147491330
Rich Lanec2ee4b82013-04-24 17:12:38 -07004570
4571 def __init__(self, value=None):
4572 if value != None:
4573 self.value = value
4574 else:
4575 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004576 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004577
4578 def pack(self):
4579 packed = []
4580 packed.append(struct.pack("!L", self.type_len))
4581 packed.append(struct.pack("!H", self.value))
4582 return ''.join(packed)
4583
4584 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004585 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004586 obj = udp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07004587 _type_len = reader.read("!L")[0]
4588 assert(_type_len == 2147491330)
4589 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004590 return obj
4591
4592 def __eq__(self, other):
4593 if type(self) != type(other): return False
4594 if self.value != other.value: return False
4595 return True
4596
Rich Lanec2ee4b82013-04-24 17:12:38 -07004597 def pretty_print(self, q):
4598 q.text("udp_src {")
4599 with q.group():
4600 with q.indent(2):
4601 q.breakable()
4602 q.text("value = ");
4603 q.text("%#x" % self.value)
4604 q.breakable()
4605 q.text('}')
4606
Rich Lane7dcdf022013-12-11 14:45:27 -08004607oxm.subtypes[2147491330] = udp_src
4608
4609class udp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004610 type_len = 2147491588
Rich Lanec2ee4b82013-04-24 17:12:38 -07004611
4612 def __init__(self, value=None, value_mask=None):
4613 if value != None:
4614 self.value = value
4615 else:
4616 self.value = 0
4617 if value_mask != None:
4618 self.value_mask = value_mask
4619 else:
4620 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004621 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004622
4623 def pack(self):
4624 packed = []
4625 packed.append(struct.pack("!L", self.type_len))
4626 packed.append(struct.pack("!H", self.value))
4627 packed.append(struct.pack("!H", self.value_mask))
4628 return ''.join(packed)
4629
4630 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004631 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004632 obj = udp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004633 _type_len = reader.read("!L")[0]
4634 assert(_type_len == 2147491588)
4635 obj.value = reader.read("!H")[0]
4636 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004637 return obj
4638
4639 def __eq__(self, other):
4640 if type(self) != type(other): return False
4641 if self.value != other.value: return False
4642 if self.value_mask != other.value_mask: return False
4643 return True
4644
Rich Lanec2ee4b82013-04-24 17:12:38 -07004645 def pretty_print(self, q):
4646 q.text("udp_src_masked {")
4647 with q.group():
4648 with q.indent(2):
4649 q.breakable()
4650 q.text("value = ");
4651 q.text("%#x" % self.value)
4652 q.text(","); q.breakable()
4653 q.text("value_mask = ");
4654 q.text("%#x" % self.value_mask)
4655 q.breakable()
4656 q.text('}')
4657
Rich Lane7dcdf022013-12-11 14:45:27 -08004658oxm.subtypes[2147491588] = udp_src_masked
4659
4660class vlan_pcp(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004661 type_len = 2147487233
Rich Lanec2ee4b82013-04-24 17:12:38 -07004662
4663 def __init__(self, value=None):
4664 if value != None:
4665 self.value = value
4666 else:
4667 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004668 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004669
4670 def pack(self):
4671 packed = []
4672 packed.append(struct.pack("!L", self.type_len))
4673 packed.append(struct.pack("!B", self.value))
4674 return ''.join(packed)
4675
4676 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004677 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004678 obj = vlan_pcp()
Dan Talaycof6202252013-07-02 01:00:29 -07004679 _type_len = reader.read("!L")[0]
4680 assert(_type_len == 2147487233)
4681 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004682 return obj
4683
4684 def __eq__(self, other):
4685 if type(self) != type(other): return False
4686 if self.value != other.value: return False
4687 return True
4688
Rich Lanec2ee4b82013-04-24 17:12:38 -07004689 def pretty_print(self, q):
4690 q.text("vlan_pcp {")
4691 with q.group():
4692 with q.indent(2):
4693 q.breakable()
4694 q.text("value = ");
4695 q.text("%#x" % self.value)
4696 q.breakable()
4697 q.text('}')
4698
Rich Lane7dcdf022013-12-11 14:45:27 -08004699oxm.subtypes[2147487233] = vlan_pcp
4700
4701class vlan_pcp_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004702 type_len = 2147487490
Rich Lanec2ee4b82013-04-24 17:12:38 -07004703
4704 def __init__(self, value=None, value_mask=None):
4705 if value != None:
4706 self.value = value
4707 else:
4708 self.value = 0
4709 if value_mask != None:
4710 self.value_mask = value_mask
4711 else:
4712 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004713 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004714
4715 def pack(self):
4716 packed = []
4717 packed.append(struct.pack("!L", self.type_len))
4718 packed.append(struct.pack("!B", self.value))
4719 packed.append(struct.pack("!B", self.value_mask))
4720 return ''.join(packed)
4721
4722 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004723 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004724 obj = vlan_pcp_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004725 _type_len = reader.read("!L")[0]
4726 assert(_type_len == 2147487490)
4727 obj.value = reader.read("!B")[0]
4728 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004729 return obj
4730
4731 def __eq__(self, other):
4732 if type(self) != type(other): return False
4733 if self.value != other.value: return False
4734 if self.value_mask != other.value_mask: return False
4735 return True
4736
Rich Lanec2ee4b82013-04-24 17:12:38 -07004737 def pretty_print(self, q):
4738 q.text("vlan_pcp_masked {")
4739 with q.group():
4740 with q.indent(2):
4741 q.breakable()
4742 q.text("value = ");
4743 q.text("%#x" % self.value)
4744 q.text(","); q.breakable()
4745 q.text("value_mask = ");
4746 q.text("%#x" % self.value_mask)
4747 q.breakable()
4748 q.text('}')
4749
Rich Lane7dcdf022013-12-11 14:45:27 -08004750oxm.subtypes[2147487490] = vlan_pcp_masked
4751
4752class vlan_vid(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004753 type_len = 2147486722
Rich Lanec2ee4b82013-04-24 17:12:38 -07004754
4755 def __init__(self, value=None):
4756 if value != None:
4757 self.value = value
4758 else:
4759 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004760 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004761
4762 def pack(self):
4763 packed = []
4764 packed.append(struct.pack("!L", self.type_len))
4765 packed.append(struct.pack("!H", self.value))
4766 return ''.join(packed)
4767
4768 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004769 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004770 obj = vlan_vid()
Dan Talaycof6202252013-07-02 01:00:29 -07004771 _type_len = reader.read("!L")[0]
4772 assert(_type_len == 2147486722)
4773 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004774 return obj
4775
4776 def __eq__(self, other):
4777 if type(self) != type(other): return False
4778 if self.value != other.value: return False
4779 return True
4780
Rich Lanec2ee4b82013-04-24 17:12:38 -07004781 def pretty_print(self, q):
4782 q.text("vlan_vid {")
4783 with q.group():
4784 with q.indent(2):
4785 q.breakable()
4786 q.text("value = ");
4787 q.text("%#x" % self.value)
4788 q.breakable()
4789 q.text('}')
4790
Rich Lane7dcdf022013-12-11 14:45:27 -08004791oxm.subtypes[2147486722] = vlan_vid
4792
4793class vlan_vid_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004794 type_len = 2147486980
Rich Lanec2ee4b82013-04-24 17:12:38 -07004795
4796 def __init__(self, value=None, value_mask=None):
4797 if value != None:
4798 self.value = value
4799 else:
4800 self.value = 0
4801 if value_mask != None:
4802 self.value_mask = value_mask
4803 else:
4804 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004805 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004806
4807 def pack(self):
4808 packed = []
4809 packed.append(struct.pack("!L", self.type_len))
4810 packed.append(struct.pack("!H", self.value))
4811 packed.append(struct.pack("!H", self.value_mask))
4812 return ''.join(packed)
4813
4814 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004815 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004816 obj = vlan_vid_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004817 _type_len = reader.read("!L")[0]
4818 assert(_type_len == 2147486980)
4819 obj.value = reader.read("!H")[0]
4820 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004821 return obj
4822
4823 def __eq__(self, other):
4824 if type(self) != type(other): return False
4825 if self.value != other.value: return False
4826 if self.value_mask != other.value_mask: return False
4827 return True
4828
Rich Lanec2ee4b82013-04-24 17:12:38 -07004829 def pretty_print(self, q):
4830 q.text("vlan_vid_masked {")
4831 with q.group():
4832 with q.indent(2):
4833 q.breakable()
4834 q.text("value = ");
4835 q.text("%#x" % self.value)
4836 q.text(","); q.breakable()
4837 q.text("value_mask = ");
4838 q.text("%#x" % self.value_mask)
4839 q.breakable()
4840 q.text('}')
4841
Rich Lane7dcdf022013-12-11 14:45:27 -08004842oxm.subtypes[2147486980] = vlan_vid_masked
Rich Lanec2ee4b82013-04-24 17:12:38 -07004843
Rich Lane7dcdf022013-12-11 14:45:27 -08004844