blob: fa4508d5ac6b0e71eb6f5cfd5413d0ae16f849b5 [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
16import action_id
17import instruction_id
18import meter_band
Rich Lane5454b682014-01-14 17:07:36 -080019import bsn_tlv
Rich Lanec2ee4b82013-04-24 17:12:38 -070020import util
21import loxi.generic_util
Rich Lanec2ee4b82013-04-24 17:12:38 -070022
Rich Lane7dcdf022013-12-11 14:45:27 -080023class oxm(loxi.OFObject):
24 subtypes = {}
Rich Laned53156a2013-08-05 17:17:33 -070025
Rich Lane95f7fc92014-01-27 17:08:16 -080026
27 def __init__(self, type_len=None):
28 if type_len != None:
29 self.type_len = type_len
30 else:
31 self.type_len = 0
32 return
33
34 def pack(self):
35 packed = []
36 packed.append(struct.pack("!L", self.type_len))
37 return ''.join(packed)
38
Rich Lane7dcdf022013-12-11 14:45:27 -080039 @staticmethod
40 def unpack(reader):
41 subtype, = reader.peek('!L', 0)
Rich Lane95f7fc92014-01-27 17:08:16 -080042 subclass = oxm.subtypes.get(subtype)
43 if subclass:
44 return subclass.unpack(reader)
45
46 obj = oxm()
47 obj.type_len = reader.read("!L")[0]
48 return obj
49
50 def __eq__(self, other):
51 if type(self) != type(other): return False
52 if self.type_len != other.type_len: return False
53 return True
54
55 def pretty_print(self, q):
56 q.text("oxm {")
57 with q.group():
58 with q.indent(2):
59 q.breakable()
60 q.breakable()
61 q.text('}')
Rich Lanec2ee4b82013-04-24 17:12:38 -070062
Rich Lanec2ee4b82013-04-24 17:12:38 -070063
Rich Lane7dcdf022013-12-11 14:45:27 -080064class arp_op(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -070065 type_len = 2147494402
Rich Lanec2ee4b82013-04-24 17:12:38 -070066
67 def __init__(self, value=None):
68 if value != None:
69 self.value = value
70 else:
71 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -080072 return
Rich Lanec2ee4b82013-04-24 17:12:38 -070073
74 def pack(self):
75 packed = []
76 packed.append(struct.pack("!L", self.type_len))
77 packed.append(struct.pack("!H", self.value))
78 return ''.join(packed)
79
80 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -080081 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -070082 obj = arp_op()
Dan Talaycof6202252013-07-02 01:00:29 -070083 _type_len = reader.read("!L")[0]
84 assert(_type_len == 2147494402)
85 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -070086 return obj
87
88 def __eq__(self, other):
89 if type(self) != type(other): return False
90 if self.value != other.value: return False
91 return True
92
Rich Lanec2ee4b82013-04-24 17:12:38 -070093 def pretty_print(self, q):
94 q.text("arp_op {")
95 with q.group():
96 with q.indent(2):
97 q.breakable()
98 q.text("value = ");
99 q.text("%#x" % self.value)
100 q.breakable()
101 q.text('}')
102
Rich Lane7dcdf022013-12-11 14:45:27 -0800103oxm.subtypes[2147494402] = arp_op
104
105class arp_op_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700106 type_len = 2147494660
Rich Lanec2ee4b82013-04-24 17:12:38 -0700107
108 def __init__(self, value=None, value_mask=None):
109 if value != None:
110 self.value = value
111 else:
112 self.value = 0
113 if value_mask != None:
114 self.value_mask = value_mask
115 else:
116 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800117 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700118
119 def pack(self):
120 packed = []
121 packed.append(struct.pack("!L", self.type_len))
122 packed.append(struct.pack("!H", self.value))
123 packed.append(struct.pack("!H", self.value_mask))
124 return ''.join(packed)
125
126 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800127 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700128 obj = arp_op_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700129 _type_len = reader.read("!L")[0]
130 assert(_type_len == 2147494660)
131 obj.value = reader.read("!H")[0]
132 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700133 return obj
134
135 def __eq__(self, other):
136 if type(self) != type(other): return False
137 if self.value != other.value: return False
138 if self.value_mask != other.value_mask: return False
139 return True
140
Rich Lanec2ee4b82013-04-24 17:12:38 -0700141 def pretty_print(self, q):
142 q.text("arp_op_masked {")
143 with q.group():
144 with q.indent(2):
145 q.breakable()
146 q.text("value = ");
147 q.text("%#x" % self.value)
148 q.text(","); q.breakable()
149 q.text("value_mask = ");
150 q.text("%#x" % self.value_mask)
151 q.breakable()
152 q.text('}')
153
Rich Lane7dcdf022013-12-11 14:45:27 -0800154oxm.subtypes[2147494660] = arp_op_masked
155
156class arp_sha(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700157 type_len = 2147495942
Rich Lanec2ee4b82013-04-24 17:12:38 -0700158
159 def __init__(self, value=None):
160 if value != None:
161 self.value = value
162 else:
163 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800164 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700165
166 def pack(self):
167 packed = []
168 packed.append(struct.pack("!L", self.type_len))
169 packed.append(struct.pack("!6B", *self.value))
170 return ''.join(packed)
171
172 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800173 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700174 obj = arp_sha()
Dan Talaycof6202252013-07-02 01:00:29 -0700175 _type_len = reader.read("!L")[0]
176 assert(_type_len == 2147495942)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700177 obj.value = list(reader.read('!6B'))
178 return obj
179
180 def __eq__(self, other):
181 if type(self) != type(other): return False
182 if self.value != other.value: return False
183 return True
184
Rich Lanec2ee4b82013-04-24 17:12:38 -0700185 def pretty_print(self, q):
186 q.text("arp_sha {")
187 with q.group():
188 with q.indent(2):
189 q.breakable()
190 q.text("value = ");
191 q.text(util.pretty_mac(self.value))
192 q.breakable()
193 q.text('}')
194
Rich Lane7dcdf022013-12-11 14:45:27 -0800195oxm.subtypes[2147495942] = arp_sha
196
197class arp_sha_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700198 type_len = 2147496204
Rich Lanec2ee4b82013-04-24 17:12:38 -0700199
200 def __init__(self, value=None, value_mask=None):
201 if value != None:
202 self.value = value
203 else:
204 self.value = [0,0,0,0,0,0]
205 if value_mask != None:
206 self.value_mask = value_mask
207 else:
208 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800209 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700210
211 def pack(self):
212 packed = []
213 packed.append(struct.pack("!L", self.type_len))
214 packed.append(struct.pack("!6B", *self.value))
215 packed.append(struct.pack("!6B", *self.value_mask))
216 return ''.join(packed)
217
218 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800219 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700220 obj = arp_sha_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700221 _type_len = reader.read("!L")[0]
222 assert(_type_len == 2147496204)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700223 obj.value = list(reader.read('!6B'))
224 obj.value_mask = list(reader.read('!6B'))
225 return obj
226
227 def __eq__(self, other):
228 if type(self) != type(other): return False
229 if self.value != other.value: return False
230 if self.value_mask != other.value_mask: return False
231 return True
232
Rich Lanec2ee4b82013-04-24 17:12:38 -0700233 def pretty_print(self, q):
234 q.text("arp_sha_masked {")
235 with q.group():
236 with q.indent(2):
237 q.breakable()
238 q.text("value = ");
239 q.text(util.pretty_mac(self.value))
240 q.text(","); q.breakable()
241 q.text("value_mask = ");
242 q.text(util.pretty_mac(self.value_mask))
243 q.breakable()
244 q.text('}')
245
Rich Lane7dcdf022013-12-11 14:45:27 -0800246oxm.subtypes[2147496204] = arp_sha_masked
247
248class arp_spa(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700249 type_len = 2147494916
Rich Lanec2ee4b82013-04-24 17:12:38 -0700250
251 def __init__(self, value=None):
252 if value != None:
253 self.value = value
254 else:
255 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800256 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700257
258 def pack(self):
259 packed = []
260 packed.append(struct.pack("!L", self.type_len))
261 packed.append(struct.pack("!L", self.value))
262 return ''.join(packed)
263
264 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800265 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700266 obj = arp_spa()
Dan Talaycof6202252013-07-02 01:00:29 -0700267 _type_len = reader.read("!L")[0]
268 assert(_type_len == 2147494916)
269 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700270 return obj
271
272 def __eq__(self, other):
273 if type(self) != type(other): return False
274 if self.value != other.value: return False
275 return True
276
Rich Lanec2ee4b82013-04-24 17:12:38 -0700277 def pretty_print(self, q):
278 q.text("arp_spa {")
279 with q.group():
280 with q.indent(2):
281 q.breakable()
282 q.text("value = ");
283 q.text("%#x" % self.value)
284 q.breakable()
285 q.text('}')
286
Rich Lane7dcdf022013-12-11 14:45:27 -0800287oxm.subtypes[2147494916] = arp_spa
288
289class arp_spa_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700290 type_len = 2147495176
Rich Lanec2ee4b82013-04-24 17:12:38 -0700291
292 def __init__(self, value=None, value_mask=None):
293 if value != None:
294 self.value = value
295 else:
296 self.value = 0
297 if value_mask != None:
298 self.value_mask = value_mask
299 else:
300 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800301 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700302
303 def pack(self):
304 packed = []
305 packed.append(struct.pack("!L", self.type_len))
306 packed.append(struct.pack("!L", self.value))
307 packed.append(struct.pack("!L", self.value_mask))
308 return ''.join(packed)
309
310 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800311 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700312 obj = arp_spa_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700313 _type_len = reader.read("!L")[0]
314 assert(_type_len == 2147495176)
315 obj.value = reader.read("!L")[0]
316 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700317 return obj
318
319 def __eq__(self, other):
320 if type(self) != type(other): return False
321 if self.value != other.value: return False
322 if self.value_mask != other.value_mask: return False
323 return True
324
Rich Lanec2ee4b82013-04-24 17:12:38 -0700325 def pretty_print(self, q):
326 q.text("arp_spa_masked {")
327 with q.group():
328 with q.indent(2):
329 q.breakable()
330 q.text("value = ");
331 q.text("%#x" % self.value)
332 q.text(","); q.breakable()
333 q.text("value_mask = ");
334 q.text("%#x" % self.value_mask)
335 q.breakable()
336 q.text('}')
337
Rich Lane7dcdf022013-12-11 14:45:27 -0800338oxm.subtypes[2147495176] = arp_spa_masked
339
340class arp_tha(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700341 type_len = 2147496454
Rich Lanec2ee4b82013-04-24 17:12:38 -0700342
343 def __init__(self, value=None):
344 if value != None:
345 self.value = value
346 else:
347 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800348 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700349
350 def pack(self):
351 packed = []
352 packed.append(struct.pack("!L", self.type_len))
353 packed.append(struct.pack("!6B", *self.value))
354 return ''.join(packed)
355
356 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800357 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700358 obj = arp_tha()
Dan Talaycof6202252013-07-02 01:00:29 -0700359 _type_len = reader.read("!L")[0]
360 assert(_type_len == 2147496454)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700361 obj.value = list(reader.read('!6B'))
362 return obj
363
364 def __eq__(self, other):
365 if type(self) != type(other): return False
366 if self.value != other.value: return False
367 return True
368
Rich Lanec2ee4b82013-04-24 17:12:38 -0700369 def pretty_print(self, q):
370 q.text("arp_tha {")
371 with q.group():
372 with q.indent(2):
373 q.breakable()
374 q.text("value = ");
375 q.text(util.pretty_mac(self.value))
376 q.breakable()
377 q.text('}')
378
Rich Lane7dcdf022013-12-11 14:45:27 -0800379oxm.subtypes[2147496454] = arp_tha
380
381class arp_tha_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700382 type_len = 2147496716
Rich Lanec2ee4b82013-04-24 17:12:38 -0700383
384 def __init__(self, value=None, value_mask=None):
385 if value != None:
386 self.value = value
387 else:
388 self.value = [0,0,0,0,0,0]
389 if value_mask != None:
390 self.value_mask = value_mask
391 else:
392 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800393 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700394
395 def pack(self):
396 packed = []
397 packed.append(struct.pack("!L", self.type_len))
398 packed.append(struct.pack("!6B", *self.value))
399 packed.append(struct.pack("!6B", *self.value_mask))
400 return ''.join(packed)
401
402 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800403 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700404 obj = arp_tha_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700405 _type_len = reader.read("!L")[0]
406 assert(_type_len == 2147496716)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700407 obj.value = list(reader.read('!6B'))
408 obj.value_mask = list(reader.read('!6B'))
409 return obj
410
411 def __eq__(self, other):
412 if type(self) != type(other): return False
413 if self.value != other.value: return False
414 if self.value_mask != other.value_mask: return False
415 return True
416
Rich Lanec2ee4b82013-04-24 17:12:38 -0700417 def pretty_print(self, q):
418 q.text("arp_tha_masked {")
419 with q.group():
420 with q.indent(2):
421 q.breakable()
422 q.text("value = ");
423 q.text(util.pretty_mac(self.value))
424 q.text(","); q.breakable()
425 q.text("value_mask = ");
426 q.text(util.pretty_mac(self.value_mask))
427 q.breakable()
428 q.text('}')
429
Rich Lane7dcdf022013-12-11 14:45:27 -0800430oxm.subtypes[2147496716] = arp_tha_masked
431
432class arp_tpa(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700433 type_len = 2147495428
Rich Lanec2ee4b82013-04-24 17:12:38 -0700434
435 def __init__(self, value=None):
436 if value != None:
437 self.value = value
438 else:
439 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800440 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700441
442 def pack(self):
443 packed = []
444 packed.append(struct.pack("!L", self.type_len))
445 packed.append(struct.pack("!L", self.value))
446 return ''.join(packed)
447
448 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800449 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700450 obj = arp_tpa()
Dan Talaycof6202252013-07-02 01:00:29 -0700451 _type_len = reader.read("!L")[0]
452 assert(_type_len == 2147495428)
453 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700454 return obj
455
456 def __eq__(self, other):
457 if type(self) != type(other): return False
458 if self.value != other.value: return False
459 return True
460
Rich Lanec2ee4b82013-04-24 17:12:38 -0700461 def pretty_print(self, q):
462 q.text("arp_tpa {")
463 with q.group():
464 with q.indent(2):
465 q.breakable()
466 q.text("value = ");
467 q.text("%#x" % self.value)
468 q.breakable()
469 q.text('}')
470
Rich Lane7dcdf022013-12-11 14:45:27 -0800471oxm.subtypes[2147495428] = arp_tpa
472
473class arp_tpa_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700474 type_len = 2147495688
Rich Lanec2ee4b82013-04-24 17:12:38 -0700475
476 def __init__(self, value=None, value_mask=None):
477 if value != None:
478 self.value = value
479 else:
480 self.value = 0
481 if value_mask != None:
482 self.value_mask = value_mask
483 else:
484 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800485 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700486
487 def pack(self):
488 packed = []
489 packed.append(struct.pack("!L", self.type_len))
490 packed.append(struct.pack("!L", self.value))
491 packed.append(struct.pack("!L", self.value_mask))
492 return ''.join(packed)
493
494 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800495 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700496 obj = arp_tpa_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700497 _type_len = reader.read("!L")[0]
498 assert(_type_len == 2147495688)
499 obj.value = reader.read("!L")[0]
500 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700501 return obj
502
503 def __eq__(self, other):
504 if type(self) != type(other): return False
505 if self.value != other.value: return False
506 if self.value_mask != other.value_mask: return False
507 return True
508
Rich Lanec2ee4b82013-04-24 17:12:38 -0700509 def pretty_print(self, q):
510 q.text("arp_tpa_masked {")
511 with q.group():
512 with q.indent(2):
513 q.breakable()
514 q.text("value = ");
515 q.text("%#x" % self.value)
516 q.text(","); q.breakable()
517 q.text("value_mask = ");
518 q.text("%#x" % self.value_mask)
519 q.breakable()
520 q.text('}')
521
Rich Lane7dcdf022013-12-11 14:45:27 -0800522oxm.subtypes[2147495688] = arp_tpa_masked
523
Rich Lanec0d05d12014-03-11 18:02:24 -0700524class bsn_egr_port_group_id(oxm):
525 type_len = 200196
526
527 def __init__(self, value=None):
528 if value != None:
529 self.value = value
530 else:
531 self.value = 0
532 return
533
534 def pack(self):
535 packed = []
536 packed.append(struct.pack("!L", self.type_len))
537 packed.append(struct.pack("!L", self.value))
538 return ''.join(packed)
539
540 @staticmethod
541 def unpack(reader):
542 obj = bsn_egr_port_group_id()
543 _type_len = reader.read("!L")[0]
544 assert(_type_len == 200196)
545 obj.value = reader.read("!L")[0]
546 return obj
547
548 def __eq__(self, other):
549 if type(self) != type(other): return False
550 if self.value != other.value: return False
551 return True
552
553 def pretty_print(self, q):
554 q.text("bsn_egr_port_group_id {")
555 with q.group():
556 with q.indent(2):
557 q.breakable()
558 q.text("value = ");
559 q.text("%#x" % self.value)
560 q.breakable()
561 q.text('}')
562
563oxm.subtypes[200196] = bsn_egr_port_group_id
564
565class bsn_egr_port_group_id_masked(oxm):
566 type_len = 200456
567
568 def __init__(self, value=None, value_mask=None):
569 if value != None:
570 self.value = value
571 else:
572 self.value = 0
573 if value_mask != None:
574 self.value_mask = value_mask
575 else:
576 self.value_mask = 0
577 return
578
579 def pack(self):
580 packed = []
581 packed.append(struct.pack("!L", self.type_len))
582 packed.append(struct.pack("!L", self.value))
583 packed.append(struct.pack("!L", self.value_mask))
584 return ''.join(packed)
585
586 @staticmethod
587 def unpack(reader):
588 obj = bsn_egr_port_group_id_masked()
589 _type_len = reader.read("!L")[0]
590 assert(_type_len == 200456)
591 obj.value = reader.read("!L")[0]
592 obj.value_mask = reader.read("!L")[0]
593 return obj
594
595 def __eq__(self, other):
596 if type(self) != type(other): return False
597 if self.value != other.value: return False
598 if self.value_mask != other.value_mask: return False
599 return True
600
601 def pretty_print(self, q):
602 q.text("bsn_egr_port_group_id_masked {")
603 with q.group():
604 with q.indent(2):
605 q.breakable()
606 q.text("value = ");
607 q.text("%#x" % self.value)
608 q.text(","); q.breakable()
609 q.text("value_mask = ");
610 q.text("%#x" % self.value_mask)
611 q.breakable()
612 q.text('}')
613
614oxm.subtypes[200456] = bsn_egr_port_group_id_masked
615
Rich Lane7dcdf022013-12-11 14:45:27 -0800616class bsn_global_vrf_allowed(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800617 type_len = 198145
618
619 def __init__(self, value=None):
620 if value != None:
621 self.value = value
622 else:
623 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800624 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800625
626 def pack(self):
627 packed = []
628 packed.append(struct.pack("!L", self.type_len))
629 packed.append(struct.pack("!B", self.value))
630 return ''.join(packed)
631
632 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800633 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800634 obj = bsn_global_vrf_allowed()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800635 _type_len = reader.read("!L")[0]
636 assert(_type_len == 198145)
637 obj.value = reader.read("!B")[0]
638 return obj
639
640 def __eq__(self, other):
641 if type(self) != type(other): return False
642 if self.value != other.value: return False
643 return True
644
Rich Laned9e3f7b2013-11-04 11:40:43 -0800645 def pretty_print(self, q):
646 q.text("bsn_global_vrf_allowed {")
647 with q.group():
648 with q.indent(2):
649 q.breakable()
650 q.text("value = ");
651 q.text("%#x" % self.value)
652 q.breakable()
653 q.text('}')
654
Rich Lane7dcdf022013-12-11 14:45:27 -0800655oxm.subtypes[198145] = bsn_global_vrf_allowed
656
657class bsn_global_vrf_allowed_masked(oxm):
658 type_len = 198402
Rich Laned9e3f7b2013-11-04 11:40:43 -0800659
660 def __init__(self, value=None, value_mask=None):
661 if value != None:
662 self.value = value
663 else:
664 self.value = 0
665 if value_mask != None:
666 self.value_mask = value_mask
667 else:
668 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800669 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800670
671 def pack(self):
672 packed = []
673 packed.append(struct.pack("!L", self.type_len))
674 packed.append(struct.pack("!B", self.value))
675 packed.append(struct.pack("!B", self.value_mask))
676 return ''.join(packed)
677
678 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800679 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800680 obj = bsn_global_vrf_allowed_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800681 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800682 assert(_type_len == 198402)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800683 obj.value = reader.read("!B")[0]
684 obj.value_mask = reader.read("!B")[0]
685 return obj
686
687 def __eq__(self, other):
688 if type(self) != type(other): return False
689 if self.value != other.value: return False
690 if self.value_mask != other.value_mask: return False
691 return True
692
Rich Laned9e3f7b2013-11-04 11:40:43 -0800693 def pretty_print(self, q):
694 q.text("bsn_global_vrf_allowed_masked {")
695 with q.group():
696 with q.indent(2):
697 q.breakable()
698 q.text("value = ");
699 q.text("%#x" % self.value)
700 q.text(","); q.breakable()
701 q.text("value_mask = ");
702 q.text("%#x" % self.value_mask)
703 q.breakable()
704 q.text('}')
705
Rich Lane7dcdf022013-12-11 14:45:27 -0800706oxm.subtypes[198402] = bsn_global_vrf_allowed_masked
707
708class bsn_in_ports_128(oxm):
709 type_len = 196624
Rich Lane6f4978c2013-10-20 21:33:52 -0700710
711 def __init__(self, value=None):
712 if value != None:
713 self.value = value
714 else:
715 self.value = set()
Rich Lane7dcdf022013-12-11 14:45:27 -0800716 return
Rich Lane6f4978c2013-10-20 21:33:52 -0700717
718 def pack(self):
719 packed = []
720 packed.append(struct.pack("!L", self.type_len))
721 packed.append(util.pack_bitmap_128(self.value))
722 return ''.join(packed)
723
724 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800725 def unpack(reader):
Rich Lane6f4978c2013-10-20 21:33:52 -0700726 obj = bsn_in_ports_128()
Rich Lane6f4978c2013-10-20 21:33:52 -0700727 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800728 assert(_type_len == 196624)
Rich Lane6f4978c2013-10-20 21:33:52 -0700729 obj.value = util.unpack_bitmap_128(reader)
730 return obj
731
732 def __eq__(self, other):
733 if type(self) != type(other): return False
734 if self.value != other.value: return False
735 return True
736
Rich Lane6f4978c2013-10-20 21:33:52 -0700737 def pretty_print(self, q):
738 q.text("bsn_in_ports_128 {")
739 with q.group():
740 with q.indent(2):
741 q.breakable()
742 q.text("value = ");
743 q.pp(self.value)
744 q.breakable()
745 q.text('}')
746
Rich Lane7dcdf022013-12-11 14:45:27 -0800747oxm.subtypes[196624] = bsn_in_ports_128
748
749class bsn_in_ports_128_masked(oxm):
Rich Lane6f4978c2013-10-20 21:33:52 -0700750 type_len = 196896
751
752 def __init__(self, value=None, value_mask=None):
753 if value != None:
754 self.value = value
755 else:
756 self.value = set()
757 if value_mask != None:
758 self.value_mask = value_mask
759 else:
760 self.value_mask = set()
Rich Lane7dcdf022013-12-11 14:45:27 -0800761 return
Rich Lane6f4978c2013-10-20 21:33:52 -0700762
763 def pack(self):
764 packed = []
765 packed.append(struct.pack("!L", self.type_len))
766 packed.append(util.pack_bitmap_128(self.value))
767 packed.append(util.pack_bitmap_128(self.value_mask))
768 return ''.join(packed)
769
770 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800771 def unpack(reader):
Rich Lane6f4978c2013-10-20 21:33:52 -0700772 obj = bsn_in_ports_128_masked()
Rich Lane6f4978c2013-10-20 21:33:52 -0700773 _type_len = reader.read("!L")[0]
774 assert(_type_len == 196896)
775 obj.value = util.unpack_bitmap_128(reader)
776 obj.value_mask = util.unpack_bitmap_128(reader)
777 return obj
778
779 def __eq__(self, other):
780 if type(self) != type(other): return False
781 if self.value != other.value: return False
782 if self.value_mask != other.value_mask: return False
783 return True
784
Rich Lane6f4978c2013-10-20 21:33:52 -0700785 def pretty_print(self, q):
786 q.text("bsn_in_ports_128_masked {")
787 with q.group():
788 with q.indent(2):
789 q.breakable()
790 q.text("value = ");
791 q.pp(self.value)
792 q.text(","); q.breakable()
793 q.text("value_mask = ");
794 q.pp(self.value_mask)
795 q.breakable()
796 q.text('}')
797
Rich Lane7dcdf022013-12-11 14:45:27 -0800798oxm.subtypes[196896] = bsn_in_ports_128_masked
799
800class bsn_l3_dst_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800801 type_len = 199684
802
803 def __init__(self, value=None):
804 if value != None:
805 self.value = value
806 else:
807 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800808 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800809
810 def pack(self):
811 packed = []
812 packed.append(struct.pack("!L", self.type_len))
813 packed.append(struct.pack("!L", self.value))
814 return ''.join(packed)
815
816 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800817 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800818 obj = bsn_l3_dst_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800819 _type_len = reader.read("!L")[0]
820 assert(_type_len == 199684)
821 obj.value = reader.read("!L")[0]
822 return obj
823
824 def __eq__(self, other):
825 if type(self) != type(other): return False
826 if self.value != other.value: return False
827 return True
828
Rich Laned9e3f7b2013-11-04 11:40:43 -0800829 def pretty_print(self, q):
830 q.text("bsn_l3_dst_class_id {")
831 with q.group():
832 with q.indent(2):
833 q.breakable()
834 q.text("value = ");
835 q.text("%#x" % self.value)
836 q.breakable()
837 q.text('}')
838
Rich Lane7dcdf022013-12-11 14:45:27 -0800839oxm.subtypes[199684] = bsn_l3_dst_class_id
840
841class bsn_l3_dst_class_id_masked(oxm):
842 type_len = 199944
Rich Laned9e3f7b2013-11-04 11:40:43 -0800843
844 def __init__(self, value=None, value_mask=None):
845 if value != None:
846 self.value = value
847 else:
848 self.value = 0
849 if value_mask != None:
850 self.value_mask = value_mask
851 else:
852 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800853 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800854
855 def pack(self):
856 packed = []
857 packed.append(struct.pack("!L", self.type_len))
858 packed.append(struct.pack("!L", self.value))
859 packed.append(struct.pack("!L", self.value_mask))
860 return ''.join(packed)
861
862 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800863 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800864 obj = bsn_l3_dst_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800865 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800866 assert(_type_len == 199944)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800867 obj.value = reader.read("!L")[0]
868 obj.value_mask = reader.read("!L")[0]
869 return obj
870
871 def __eq__(self, other):
872 if type(self) != type(other): return False
873 if self.value != other.value: return False
874 if self.value_mask != other.value_mask: return False
875 return True
876
Rich Laned9e3f7b2013-11-04 11:40:43 -0800877 def pretty_print(self, q):
878 q.text("bsn_l3_dst_class_id_masked {")
879 with q.group():
880 with q.indent(2):
881 q.breakable()
882 q.text("value = ");
883 q.text("%#x" % self.value)
884 q.text(","); q.breakable()
885 q.text("value_mask = ");
886 q.text("%#x" % self.value_mask)
887 q.breakable()
888 q.text('}')
889
Rich Lane7dcdf022013-12-11 14:45:27 -0800890oxm.subtypes[199944] = bsn_l3_dst_class_id_masked
891
892class bsn_l3_interface_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800893 type_len = 198660
894
895 def __init__(self, value=None):
896 if value != None:
897 self.value = value
898 else:
899 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800900 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800901
902 def pack(self):
903 packed = []
904 packed.append(struct.pack("!L", self.type_len))
905 packed.append(struct.pack("!L", self.value))
906 return ''.join(packed)
907
908 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800909 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800910 obj = bsn_l3_interface_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800911 _type_len = reader.read("!L")[0]
912 assert(_type_len == 198660)
913 obj.value = reader.read("!L")[0]
914 return obj
915
916 def __eq__(self, other):
917 if type(self) != type(other): return False
918 if self.value != other.value: return False
919 return True
920
Rich Laned9e3f7b2013-11-04 11:40:43 -0800921 def pretty_print(self, q):
922 q.text("bsn_l3_interface_class_id {")
923 with q.group():
924 with q.indent(2):
925 q.breakable()
926 q.text("value = ");
927 q.text("%#x" % self.value)
928 q.breakable()
929 q.text('}')
930
Rich Lane7dcdf022013-12-11 14:45:27 -0800931oxm.subtypes[198660] = bsn_l3_interface_class_id
932
933class bsn_l3_interface_class_id_masked(oxm):
934 type_len = 198920
Rich Laned9e3f7b2013-11-04 11:40:43 -0800935
936 def __init__(self, value=None, value_mask=None):
937 if value != None:
938 self.value = value
939 else:
940 self.value = 0
941 if value_mask != None:
942 self.value_mask = value_mask
943 else:
944 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800945 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800946
947 def pack(self):
948 packed = []
949 packed.append(struct.pack("!L", self.type_len))
950 packed.append(struct.pack("!L", self.value))
951 packed.append(struct.pack("!L", self.value_mask))
952 return ''.join(packed)
953
954 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800955 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800956 obj = bsn_l3_interface_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800957 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800958 assert(_type_len == 198920)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800959 obj.value = reader.read("!L")[0]
960 obj.value_mask = reader.read("!L")[0]
961 return obj
962
963 def __eq__(self, other):
964 if type(self) != type(other): return False
965 if self.value != other.value: return False
966 if self.value_mask != other.value_mask: return False
967 return True
968
Rich Laned9e3f7b2013-11-04 11:40:43 -0800969 def pretty_print(self, q):
970 q.text("bsn_l3_interface_class_id_masked {")
971 with q.group():
972 with q.indent(2):
973 q.breakable()
974 q.text("value = ");
975 q.text("%#x" % self.value)
976 q.text(","); q.breakable()
977 q.text("value_mask = ");
978 q.text("%#x" % self.value_mask)
979 q.breakable()
980 q.text('}')
981
Rich Lane7dcdf022013-12-11 14:45:27 -0800982oxm.subtypes[198920] = bsn_l3_interface_class_id_masked
983
984class bsn_l3_src_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800985 type_len = 199172
986
987 def __init__(self, value=None):
988 if value != None:
989 self.value = value
990 else:
991 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800992 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800993
994 def pack(self):
995 packed = []
996 packed.append(struct.pack("!L", self.type_len))
997 packed.append(struct.pack("!L", self.value))
998 return ''.join(packed)
999
1000 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001001 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001002 obj = bsn_l3_src_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001003 _type_len = reader.read("!L")[0]
1004 assert(_type_len == 199172)
1005 obj.value = reader.read("!L")[0]
1006 return obj
1007
1008 def __eq__(self, other):
1009 if type(self) != type(other): return False
1010 if self.value != other.value: return False
1011 return True
1012
Rich Laned9e3f7b2013-11-04 11:40:43 -08001013 def pretty_print(self, q):
1014 q.text("bsn_l3_src_class_id {")
1015 with q.group():
1016 with q.indent(2):
1017 q.breakable()
1018 q.text("value = ");
1019 q.text("%#x" % self.value)
1020 q.breakable()
1021 q.text('}')
1022
Rich Lane7dcdf022013-12-11 14:45:27 -08001023oxm.subtypes[199172] = bsn_l3_src_class_id
1024
1025class bsn_l3_src_class_id_masked(oxm):
1026 type_len = 199432
Rich Laned9e3f7b2013-11-04 11:40:43 -08001027
1028 def __init__(self, value=None, value_mask=None):
1029 if value != None:
1030 self.value = value
1031 else:
1032 self.value = 0
1033 if value_mask != None:
1034 self.value_mask = value_mask
1035 else:
1036 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001037 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001038
1039 def pack(self):
1040 packed = []
1041 packed.append(struct.pack("!L", self.type_len))
1042 packed.append(struct.pack("!L", self.value))
1043 packed.append(struct.pack("!L", self.value_mask))
1044 return ''.join(packed)
1045
1046 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001047 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001048 obj = bsn_l3_src_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001049 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001050 assert(_type_len == 199432)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001051 obj.value = reader.read("!L")[0]
1052 obj.value_mask = reader.read("!L")[0]
1053 return obj
1054
1055 def __eq__(self, other):
1056 if type(self) != type(other): return False
1057 if self.value != other.value: return False
1058 if self.value_mask != other.value_mask: return False
1059 return True
1060
Rich Laned9e3f7b2013-11-04 11:40:43 -08001061 def pretty_print(self, q):
1062 q.text("bsn_l3_src_class_id_masked {")
1063 with q.group():
1064 with q.indent(2):
1065 q.breakable()
1066 q.text("value = ");
1067 q.text("%#x" % self.value)
1068 q.text(","); q.breakable()
1069 q.text("value_mask = ");
1070 q.text("%#x" % self.value_mask)
1071 q.breakable()
1072 q.text('}')
1073
Rich Lane7dcdf022013-12-11 14:45:27 -08001074oxm.subtypes[199432] = bsn_l3_src_class_id_masked
1075
1076class bsn_lag_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001077 type_len = 197124
1078
1079 def __init__(self, value=None):
1080 if value != None:
1081 self.value = value
1082 else:
1083 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001084 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001085
1086 def pack(self):
1087 packed = []
1088 packed.append(struct.pack("!L", self.type_len))
1089 packed.append(struct.pack("!L", self.value))
1090 return ''.join(packed)
1091
1092 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001093 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001094 obj = bsn_lag_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001095 _type_len = reader.read("!L")[0]
1096 assert(_type_len == 197124)
1097 obj.value = reader.read("!L")[0]
1098 return obj
1099
1100 def __eq__(self, other):
1101 if type(self) != type(other): return False
1102 if self.value != other.value: return False
1103 return True
1104
Rich Laned9e3f7b2013-11-04 11:40:43 -08001105 def pretty_print(self, q):
1106 q.text("bsn_lag_id {")
1107 with q.group():
1108 with q.indent(2):
1109 q.breakable()
1110 q.text("value = ");
1111 q.text("%#x" % self.value)
1112 q.breakable()
1113 q.text('}')
1114
Rich Lane7dcdf022013-12-11 14:45:27 -08001115oxm.subtypes[197124] = bsn_lag_id
1116
1117class bsn_lag_id_masked(oxm):
1118 type_len = 197384
Rich Laned9e3f7b2013-11-04 11:40:43 -08001119
1120 def __init__(self, value=None, value_mask=None):
1121 if value != None:
1122 self.value = value
1123 else:
1124 self.value = 0
1125 if value_mask != None:
1126 self.value_mask = value_mask
1127 else:
1128 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001129 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001130
1131 def pack(self):
1132 packed = []
1133 packed.append(struct.pack("!L", self.type_len))
1134 packed.append(struct.pack("!L", self.value))
1135 packed.append(struct.pack("!L", self.value_mask))
1136 return ''.join(packed)
1137
1138 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001139 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001140 obj = bsn_lag_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001141 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001142 assert(_type_len == 197384)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001143 obj.value = reader.read("!L")[0]
1144 obj.value_mask = reader.read("!L")[0]
1145 return obj
1146
1147 def __eq__(self, other):
1148 if type(self) != type(other): return False
1149 if self.value != other.value: return False
1150 if self.value_mask != other.value_mask: return False
1151 return True
1152
Rich Laned9e3f7b2013-11-04 11:40:43 -08001153 def pretty_print(self, q):
1154 q.text("bsn_lag_id_masked {")
1155 with q.group():
1156 with q.indent(2):
1157 q.breakable()
1158 q.text("value = ");
1159 q.text("%#x" % self.value)
1160 q.text(","); q.breakable()
1161 q.text("value_mask = ");
1162 q.text("%#x" % self.value_mask)
1163 q.breakable()
1164 q.text('}')
1165
Rich Lane7dcdf022013-12-11 14:45:27 -08001166oxm.subtypes[197384] = bsn_lag_id_masked
1167
Harshmeet Singhc51f4042014-05-21 13:32:52 -07001168class bsn_tcp_flags(oxm):
1169 type_len = 204802
1170
1171 def __init__(self, value=None):
1172 if value != None:
1173 self.value = value
1174 else:
1175 self.value = 0
1176 return
1177
1178 def pack(self):
1179 packed = []
1180 packed.append(struct.pack("!L", self.type_len))
1181 packed.append(struct.pack("!H", self.value))
1182 return ''.join(packed)
1183
1184 @staticmethod
1185 def unpack(reader):
1186 obj = bsn_tcp_flags()
1187 _type_len = reader.read("!L")[0]
1188 assert(_type_len == 204802)
1189 obj.value = reader.read("!H")[0]
1190 return obj
1191
1192 def __eq__(self, other):
1193 if type(self) != type(other): return False
1194 if self.value != other.value: return False
1195 return True
1196
1197 def pretty_print(self, q):
1198 q.text("bsn_tcp_flags {")
1199 with q.group():
1200 with q.indent(2):
1201 q.breakable()
1202 q.text("value = ");
1203 q.text("%#x" % self.value)
1204 q.breakable()
1205 q.text('}')
1206
1207oxm.subtypes[204802] = bsn_tcp_flags
1208
1209class bsn_tcp_flags_masked(oxm):
1210 type_len = 205060
1211
1212 def __init__(self, value=None, value_mask=None):
1213 if value != None:
1214 self.value = value
1215 else:
1216 self.value = 0
1217 if value_mask != None:
1218 self.value_mask = value_mask
1219 else:
1220 self.value_mask = 0
1221 return
1222
1223 def pack(self):
1224 packed = []
1225 packed.append(struct.pack("!L", self.type_len))
1226 packed.append(struct.pack("!H", self.value))
1227 packed.append(struct.pack("!H", self.value_mask))
1228 return ''.join(packed)
1229
1230 @staticmethod
1231 def unpack(reader):
1232 obj = bsn_tcp_flags_masked()
1233 _type_len = reader.read("!L")[0]
1234 assert(_type_len == 205060)
1235 obj.value = reader.read("!H")[0]
1236 obj.value_mask = reader.read("!H")[0]
1237 return obj
1238
1239 def __eq__(self, other):
1240 if type(self) != type(other): return False
1241 if self.value != other.value: return False
1242 if self.value_mask != other.value_mask: return False
1243 return True
1244
1245 def pretty_print(self, q):
1246 q.text("bsn_tcp_flags_masked {")
1247 with q.group():
1248 with q.indent(2):
1249 q.breakable()
1250 q.text("value = ");
1251 q.text("%#x" % self.value)
1252 q.text(","); q.breakable()
1253 q.text("value_mask = ");
1254 q.text("%#x" % self.value_mask)
1255 q.breakable()
1256 q.text('}')
1257
1258oxm.subtypes[205060] = bsn_tcp_flags_masked
1259
Rich Lane93b33132014-04-21 12:20:58 -07001260class bsn_udf0(oxm):
1261 type_len = 200708
1262
1263 def __init__(self, value=None):
1264 if value != None:
1265 self.value = value
1266 else:
1267 self.value = 0
1268 return
1269
1270 def pack(self):
1271 packed = []
1272 packed.append(struct.pack("!L", self.type_len))
1273 packed.append(struct.pack("!L", self.value))
1274 return ''.join(packed)
1275
1276 @staticmethod
1277 def unpack(reader):
1278 obj = bsn_udf0()
1279 _type_len = reader.read("!L")[0]
1280 assert(_type_len == 200708)
1281 obj.value = reader.read("!L")[0]
1282 return obj
1283
1284 def __eq__(self, other):
1285 if type(self) != type(other): return False
1286 if self.value != other.value: return False
1287 return True
1288
1289 def pretty_print(self, q):
1290 q.text("bsn_udf0 {")
1291 with q.group():
1292 with q.indent(2):
1293 q.breakable()
1294 q.text("value = ");
1295 q.text("%#x" % self.value)
1296 q.breakable()
1297 q.text('}')
1298
1299oxm.subtypes[200708] = bsn_udf0
1300
1301class bsn_udf0_masked(oxm):
1302 type_len = 200968
1303
1304 def __init__(self, value=None, value_mask=None):
1305 if value != None:
1306 self.value = value
1307 else:
1308 self.value = 0
1309 if value_mask != None:
1310 self.value_mask = value_mask
1311 else:
1312 self.value_mask = 0
1313 return
1314
1315 def pack(self):
1316 packed = []
1317 packed.append(struct.pack("!L", self.type_len))
1318 packed.append(struct.pack("!L", self.value))
1319 packed.append(struct.pack("!L", self.value_mask))
1320 return ''.join(packed)
1321
1322 @staticmethod
1323 def unpack(reader):
1324 obj = bsn_udf0_masked()
1325 _type_len = reader.read("!L")[0]
1326 assert(_type_len == 200968)
1327 obj.value = reader.read("!L")[0]
1328 obj.value_mask = reader.read("!L")[0]
1329 return obj
1330
1331 def __eq__(self, other):
1332 if type(self) != type(other): return False
1333 if self.value != other.value: return False
1334 if self.value_mask != other.value_mask: return False
1335 return True
1336
1337 def pretty_print(self, q):
1338 q.text("bsn_udf0_masked {")
1339 with q.group():
1340 with q.indent(2):
1341 q.breakable()
1342 q.text("value = ");
1343 q.text("%#x" % self.value)
1344 q.text(","); q.breakable()
1345 q.text("value_mask = ");
1346 q.text("%#x" % self.value_mask)
1347 q.breakable()
1348 q.text('}')
1349
1350oxm.subtypes[200968] = bsn_udf0_masked
1351
1352class bsn_udf1(oxm):
1353 type_len = 201220
1354
1355 def __init__(self, value=None):
1356 if value != None:
1357 self.value = value
1358 else:
1359 self.value = 0
1360 return
1361
1362 def pack(self):
1363 packed = []
1364 packed.append(struct.pack("!L", self.type_len))
1365 packed.append(struct.pack("!L", self.value))
1366 return ''.join(packed)
1367
1368 @staticmethod
1369 def unpack(reader):
1370 obj = bsn_udf1()
1371 _type_len = reader.read("!L")[0]
1372 assert(_type_len == 201220)
1373 obj.value = reader.read("!L")[0]
1374 return obj
1375
1376 def __eq__(self, other):
1377 if type(self) != type(other): return False
1378 if self.value != other.value: return False
1379 return True
1380
1381 def pretty_print(self, q):
1382 q.text("bsn_udf1 {")
1383 with q.group():
1384 with q.indent(2):
1385 q.breakable()
1386 q.text("value = ");
1387 q.text("%#x" % self.value)
1388 q.breakable()
1389 q.text('}')
1390
1391oxm.subtypes[201220] = bsn_udf1
1392
1393class bsn_udf1_masked(oxm):
1394 type_len = 201480
1395
1396 def __init__(self, value=None, value_mask=None):
1397 if value != None:
1398 self.value = value
1399 else:
1400 self.value = 0
1401 if value_mask != None:
1402 self.value_mask = value_mask
1403 else:
1404 self.value_mask = 0
1405 return
1406
1407 def pack(self):
1408 packed = []
1409 packed.append(struct.pack("!L", self.type_len))
1410 packed.append(struct.pack("!L", self.value))
1411 packed.append(struct.pack("!L", self.value_mask))
1412 return ''.join(packed)
1413
1414 @staticmethod
1415 def unpack(reader):
1416 obj = bsn_udf1_masked()
1417 _type_len = reader.read("!L")[0]
1418 assert(_type_len == 201480)
1419 obj.value = reader.read("!L")[0]
1420 obj.value_mask = reader.read("!L")[0]
1421 return obj
1422
1423 def __eq__(self, other):
1424 if type(self) != type(other): return False
1425 if self.value != other.value: return False
1426 if self.value_mask != other.value_mask: return False
1427 return True
1428
1429 def pretty_print(self, q):
1430 q.text("bsn_udf1_masked {")
1431 with q.group():
1432 with q.indent(2):
1433 q.breakable()
1434 q.text("value = ");
1435 q.text("%#x" % self.value)
1436 q.text(","); q.breakable()
1437 q.text("value_mask = ");
1438 q.text("%#x" % self.value_mask)
1439 q.breakable()
1440 q.text('}')
1441
1442oxm.subtypes[201480] = bsn_udf1_masked
1443
1444class bsn_udf2(oxm):
1445 type_len = 201732
1446
1447 def __init__(self, value=None):
1448 if value != None:
1449 self.value = value
1450 else:
1451 self.value = 0
1452 return
1453
1454 def pack(self):
1455 packed = []
1456 packed.append(struct.pack("!L", self.type_len))
1457 packed.append(struct.pack("!L", self.value))
1458 return ''.join(packed)
1459
1460 @staticmethod
1461 def unpack(reader):
1462 obj = bsn_udf2()
1463 _type_len = reader.read("!L")[0]
1464 assert(_type_len == 201732)
1465 obj.value = reader.read("!L")[0]
1466 return obj
1467
1468 def __eq__(self, other):
1469 if type(self) != type(other): return False
1470 if self.value != other.value: return False
1471 return True
1472
1473 def pretty_print(self, q):
1474 q.text("bsn_udf2 {")
1475 with q.group():
1476 with q.indent(2):
1477 q.breakable()
1478 q.text("value = ");
1479 q.text("%#x" % self.value)
1480 q.breakable()
1481 q.text('}')
1482
1483oxm.subtypes[201732] = bsn_udf2
1484
1485class bsn_udf2_masked(oxm):
1486 type_len = 201992
1487
1488 def __init__(self, value=None, value_mask=None):
1489 if value != None:
1490 self.value = value
1491 else:
1492 self.value = 0
1493 if value_mask != None:
1494 self.value_mask = value_mask
1495 else:
1496 self.value_mask = 0
1497 return
1498
1499 def pack(self):
1500 packed = []
1501 packed.append(struct.pack("!L", self.type_len))
1502 packed.append(struct.pack("!L", self.value))
1503 packed.append(struct.pack("!L", self.value_mask))
1504 return ''.join(packed)
1505
1506 @staticmethod
1507 def unpack(reader):
1508 obj = bsn_udf2_masked()
1509 _type_len = reader.read("!L")[0]
1510 assert(_type_len == 201992)
1511 obj.value = reader.read("!L")[0]
1512 obj.value_mask = reader.read("!L")[0]
1513 return obj
1514
1515 def __eq__(self, other):
1516 if type(self) != type(other): return False
1517 if self.value != other.value: return False
1518 if self.value_mask != other.value_mask: return False
1519 return True
1520
1521 def pretty_print(self, q):
1522 q.text("bsn_udf2_masked {")
1523 with q.group():
1524 with q.indent(2):
1525 q.breakable()
1526 q.text("value = ");
1527 q.text("%#x" % self.value)
1528 q.text(","); q.breakable()
1529 q.text("value_mask = ");
1530 q.text("%#x" % self.value_mask)
1531 q.breakable()
1532 q.text('}')
1533
1534oxm.subtypes[201992] = bsn_udf2_masked
1535
1536class bsn_udf3(oxm):
1537 type_len = 202244
1538
1539 def __init__(self, value=None):
1540 if value != None:
1541 self.value = value
1542 else:
1543 self.value = 0
1544 return
1545
1546 def pack(self):
1547 packed = []
1548 packed.append(struct.pack("!L", self.type_len))
1549 packed.append(struct.pack("!L", self.value))
1550 return ''.join(packed)
1551
1552 @staticmethod
1553 def unpack(reader):
1554 obj = bsn_udf3()
1555 _type_len = reader.read("!L")[0]
1556 assert(_type_len == 202244)
1557 obj.value = reader.read("!L")[0]
1558 return obj
1559
1560 def __eq__(self, other):
1561 if type(self) != type(other): return False
1562 if self.value != other.value: return False
1563 return True
1564
1565 def pretty_print(self, q):
1566 q.text("bsn_udf3 {")
1567 with q.group():
1568 with q.indent(2):
1569 q.breakable()
1570 q.text("value = ");
1571 q.text("%#x" % self.value)
1572 q.breakable()
1573 q.text('}')
1574
1575oxm.subtypes[202244] = bsn_udf3
1576
1577class bsn_udf3_masked(oxm):
1578 type_len = 202504
1579
1580 def __init__(self, value=None, value_mask=None):
1581 if value != None:
1582 self.value = value
1583 else:
1584 self.value = 0
1585 if value_mask != None:
1586 self.value_mask = value_mask
1587 else:
1588 self.value_mask = 0
1589 return
1590
1591 def pack(self):
1592 packed = []
1593 packed.append(struct.pack("!L", self.type_len))
1594 packed.append(struct.pack("!L", self.value))
1595 packed.append(struct.pack("!L", self.value_mask))
1596 return ''.join(packed)
1597
1598 @staticmethod
1599 def unpack(reader):
1600 obj = bsn_udf3_masked()
1601 _type_len = reader.read("!L")[0]
1602 assert(_type_len == 202504)
1603 obj.value = reader.read("!L")[0]
1604 obj.value_mask = reader.read("!L")[0]
1605 return obj
1606
1607 def __eq__(self, other):
1608 if type(self) != type(other): return False
1609 if self.value != other.value: return False
1610 if self.value_mask != other.value_mask: return False
1611 return True
1612
1613 def pretty_print(self, q):
1614 q.text("bsn_udf3_masked {")
1615 with q.group():
1616 with q.indent(2):
1617 q.breakable()
1618 q.text("value = ");
1619 q.text("%#x" % self.value)
1620 q.text(","); q.breakable()
1621 q.text("value_mask = ");
1622 q.text("%#x" % self.value_mask)
1623 q.breakable()
1624 q.text('}')
1625
1626oxm.subtypes[202504] = bsn_udf3_masked
1627
1628class bsn_udf4(oxm):
1629 type_len = 202756
1630
1631 def __init__(self, value=None):
1632 if value != None:
1633 self.value = value
1634 else:
1635 self.value = 0
1636 return
1637
1638 def pack(self):
1639 packed = []
1640 packed.append(struct.pack("!L", self.type_len))
1641 packed.append(struct.pack("!L", self.value))
1642 return ''.join(packed)
1643
1644 @staticmethod
1645 def unpack(reader):
1646 obj = bsn_udf4()
1647 _type_len = reader.read("!L")[0]
1648 assert(_type_len == 202756)
1649 obj.value = reader.read("!L")[0]
1650 return obj
1651
1652 def __eq__(self, other):
1653 if type(self) != type(other): return False
1654 if self.value != other.value: return False
1655 return True
1656
1657 def pretty_print(self, q):
1658 q.text("bsn_udf4 {")
1659 with q.group():
1660 with q.indent(2):
1661 q.breakable()
1662 q.text("value = ");
1663 q.text("%#x" % self.value)
1664 q.breakable()
1665 q.text('}')
1666
1667oxm.subtypes[202756] = bsn_udf4
1668
1669class bsn_udf4_masked(oxm):
1670 type_len = 203016
1671
1672 def __init__(self, value=None, value_mask=None):
1673 if value != None:
1674 self.value = value
1675 else:
1676 self.value = 0
1677 if value_mask != None:
1678 self.value_mask = value_mask
1679 else:
1680 self.value_mask = 0
1681 return
1682
1683 def pack(self):
1684 packed = []
1685 packed.append(struct.pack("!L", self.type_len))
1686 packed.append(struct.pack("!L", self.value))
1687 packed.append(struct.pack("!L", self.value_mask))
1688 return ''.join(packed)
1689
1690 @staticmethod
1691 def unpack(reader):
1692 obj = bsn_udf4_masked()
1693 _type_len = reader.read("!L")[0]
1694 assert(_type_len == 203016)
1695 obj.value = reader.read("!L")[0]
1696 obj.value_mask = reader.read("!L")[0]
1697 return obj
1698
1699 def __eq__(self, other):
1700 if type(self) != type(other): return False
1701 if self.value != other.value: return False
1702 if self.value_mask != other.value_mask: return False
1703 return True
1704
1705 def pretty_print(self, q):
1706 q.text("bsn_udf4_masked {")
1707 with q.group():
1708 with q.indent(2):
1709 q.breakable()
1710 q.text("value = ");
1711 q.text("%#x" % self.value)
1712 q.text(","); q.breakable()
1713 q.text("value_mask = ");
1714 q.text("%#x" % self.value_mask)
1715 q.breakable()
1716 q.text('}')
1717
1718oxm.subtypes[203016] = bsn_udf4_masked
1719
1720class bsn_udf5(oxm):
1721 type_len = 203268
1722
1723 def __init__(self, value=None):
1724 if value != None:
1725 self.value = value
1726 else:
1727 self.value = 0
1728 return
1729
1730 def pack(self):
1731 packed = []
1732 packed.append(struct.pack("!L", self.type_len))
1733 packed.append(struct.pack("!L", self.value))
1734 return ''.join(packed)
1735
1736 @staticmethod
1737 def unpack(reader):
1738 obj = bsn_udf5()
1739 _type_len = reader.read("!L")[0]
1740 assert(_type_len == 203268)
1741 obj.value = reader.read("!L")[0]
1742 return obj
1743
1744 def __eq__(self, other):
1745 if type(self) != type(other): return False
1746 if self.value != other.value: return False
1747 return True
1748
1749 def pretty_print(self, q):
1750 q.text("bsn_udf5 {")
1751 with q.group():
1752 with q.indent(2):
1753 q.breakable()
1754 q.text("value = ");
1755 q.text("%#x" % self.value)
1756 q.breakable()
1757 q.text('}')
1758
1759oxm.subtypes[203268] = bsn_udf5
1760
1761class bsn_udf5_masked(oxm):
1762 type_len = 203528
1763
1764 def __init__(self, value=None, value_mask=None):
1765 if value != None:
1766 self.value = value
1767 else:
1768 self.value = 0
1769 if value_mask != None:
1770 self.value_mask = value_mask
1771 else:
1772 self.value_mask = 0
1773 return
1774
1775 def pack(self):
1776 packed = []
1777 packed.append(struct.pack("!L", self.type_len))
1778 packed.append(struct.pack("!L", self.value))
1779 packed.append(struct.pack("!L", self.value_mask))
1780 return ''.join(packed)
1781
1782 @staticmethod
1783 def unpack(reader):
1784 obj = bsn_udf5_masked()
1785 _type_len = reader.read("!L")[0]
1786 assert(_type_len == 203528)
1787 obj.value = reader.read("!L")[0]
1788 obj.value_mask = reader.read("!L")[0]
1789 return obj
1790
1791 def __eq__(self, other):
1792 if type(self) != type(other): return False
1793 if self.value != other.value: return False
1794 if self.value_mask != other.value_mask: return False
1795 return True
1796
1797 def pretty_print(self, q):
1798 q.text("bsn_udf5_masked {")
1799 with q.group():
1800 with q.indent(2):
1801 q.breakable()
1802 q.text("value = ");
1803 q.text("%#x" % self.value)
1804 q.text(","); q.breakable()
1805 q.text("value_mask = ");
1806 q.text("%#x" % self.value_mask)
1807 q.breakable()
1808 q.text('}')
1809
1810oxm.subtypes[203528] = bsn_udf5_masked
1811
1812class bsn_udf6(oxm):
1813 type_len = 203780
1814
1815 def __init__(self, value=None):
1816 if value != None:
1817 self.value = value
1818 else:
1819 self.value = 0
1820 return
1821
1822 def pack(self):
1823 packed = []
1824 packed.append(struct.pack("!L", self.type_len))
1825 packed.append(struct.pack("!L", self.value))
1826 return ''.join(packed)
1827
1828 @staticmethod
1829 def unpack(reader):
1830 obj = bsn_udf6()
1831 _type_len = reader.read("!L")[0]
1832 assert(_type_len == 203780)
1833 obj.value = reader.read("!L")[0]
1834 return obj
1835
1836 def __eq__(self, other):
1837 if type(self) != type(other): return False
1838 if self.value != other.value: return False
1839 return True
1840
1841 def pretty_print(self, q):
1842 q.text("bsn_udf6 {")
1843 with q.group():
1844 with q.indent(2):
1845 q.breakable()
1846 q.text("value = ");
1847 q.text("%#x" % self.value)
1848 q.breakable()
1849 q.text('}')
1850
1851oxm.subtypes[203780] = bsn_udf6
1852
1853class bsn_udf6_masked(oxm):
1854 type_len = 204040
1855
1856 def __init__(self, value=None, value_mask=None):
1857 if value != None:
1858 self.value = value
1859 else:
1860 self.value = 0
1861 if value_mask != None:
1862 self.value_mask = value_mask
1863 else:
1864 self.value_mask = 0
1865 return
1866
1867 def pack(self):
1868 packed = []
1869 packed.append(struct.pack("!L", self.type_len))
1870 packed.append(struct.pack("!L", self.value))
1871 packed.append(struct.pack("!L", self.value_mask))
1872 return ''.join(packed)
1873
1874 @staticmethod
1875 def unpack(reader):
1876 obj = bsn_udf6_masked()
1877 _type_len = reader.read("!L")[0]
1878 assert(_type_len == 204040)
1879 obj.value = reader.read("!L")[0]
1880 obj.value_mask = reader.read("!L")[0]
1881 return obj
1882
1883 def __eq__(self, other):
1884 if type(self) != type(other): return False
1885 if self.value != other.value: return False
1886 if self.value_mask != other.value_mask: return False
1887 return True
1888
1889 def pretty_print(self, q):
1890 q.text("bsn_udf6_masked {")
1891 with q.group():
1892 with q.indent(2):
1893 q.breakable()
1894 q.text("value = ");
1895 q.text("%#x" % self.value)
1896 q.text(","); q.breakable()
1897 q.text("value_mask = ");
1898 q.text("%#x" % self.value_mask)
1899 q.breakable()
1900 q.text('}')
1901
1902oxm.subtypes[204040] = bsn_udf6_masked
1903
1904class bsn_udf7(oxm):
1905 type_len = 204292
1906
1907 def __init__(self, value=None):
1908 if value != None:
1909 self.value = value
1910 else:
1911 self.value = 0
1912 return
1913
1914 def pack(self):
1915 packed = []
1916 packed.append(struct.pack("!L", self.type_len))
1917 packed.append(struct.pack("!L", self.value))
1918 return ''.join(packed)
1919
1920 @staticmethod
1921 def unpack(reader):
1922 obj = bsn_udf7()
1923 _type_len = reader.read("!L")[0]
1924 assert(_type_len == 204292)
1925 obj.value = reader.read("!L")[0]
1926 return obj
1927
1928 def __eq__(self, other):
1929 if type(self) != type(other): return False
1930 if self.value != other.value: return False
1931 return True
1932
1933 def pretty_print(self, q):
1934 q.text("bsn_udf7 {")
1935 with q.group():
1936 with q.indent(2):
1937 q.breakable()
1938 q.text("value = ");
1939 q.text("%#x" % self.value)
1940 q.breakable()
1941 q.text('}')
1942
1943oxm.subtypes[204292] = bsn_udf7
1944
1945class bsn_udf7_masked(oxm):
1946 type_len = 204552
1947
1948 def __init__(self, value=None, value_mask=None):
1949 if value != None:
1950 self.value = value
1951 else:
1952 self.value = 0
1953 if value_mask != None:
1954 self.value_mask = value_mask
1955 else:
1956 self.value_mask = 0
1957 return
1958
1959 def pack(self):
1960 packed = []
1961 packed.append(struct.pack("!L", self.type_len))
1962 packed.append(struct.pack("!L", self.value))
1963 packed.append(struct.pack("!L", self.value_mask))
1964 return ''.join(packed)
1965
1966 @staticmethod
1967 def unpack(reader):
1968 obj = bsn_udf7_masked()
1969 _type_len = reader.read("!L")[0]
1970 assert(_type_len == 204552)
1971 obj.value = reader.read("!L")[0]
1972 obj.value_mask = reader.read("!L")[0]
1973 return obj
1974
1975 def __eq__(self, other):
1976 if type(self) != type(other): return False
1977 if self.value != other.value: return False
1978 if self.value_mask != other.value_mask: return False
1979 return True
1980
1981 def pretty_print(self, q):
1982 q.text("bsn_udf7_masked {")
1983 with q.group():
1984 with q.indent(2):
1985 q.breakable()
1986 q.text("value = ");
1987 q.text("%#x" % self.value)
1988 q.text(","); q.breakable()
1989 q.text("value_mask = ");
1990 q.text("%#x" % self.value_mask)
1991 q.breakable()
1992 q.text('}')
1993
1994oxm.subtypes[204552] = bsn_udf7_masked
1995
Rich Lane7dcdf022013-12-11 14:45:27 -08001996class bsn_vrf(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001997 type_len = 197636
1998
1999 def __init__(self, value=None):
2000 if value != None:
2001 self.value = value
2002 else:
2003 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002004 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08002005
2006 def pack(self):
2007 packed = []
2008 packed.append(struct.pack("!L", self.type_len))
2009 packed.append(struct.pack("!L", self.value))
2010 return ''.join(packed)
2011
2012 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002013 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08002014 obj = bsn_vrf()
Rich Laned9e3f7b2013-11-04 11:40:43 -08002015 _type_len = reader.read("!L")[0]
2016 assert(_type_len == 197636)
2017 obj.value = reader.read("!L")[0]
2018 return obj
2019
2020 def __eq__(self, other):
2021 if type(self) != type(other): return False
2022 if self.value != other.value: return False
2023 return True
2024
Rich Laned9e3f7b2013-11-04 11:40:43 -08002025 def pretty_print(self, q):
2026 q.text("bsn_vrf {")
2027 with q.group():
2028 with q.indent(2):
2029 q.breakable()
2030 q.text("value = ");
2031 q.text("%#x" % self.value)
2032 q.breakable()
2033 q.text('}')
2034
Rich Lane7dcdf022013-12-11 14:45:27 -08002035oxm.subtypes[197636] = bsn_vrf
2036
2037class bsn_vrf_masked(oxm):
2038 type_len = 197896
Rich Laned9e3f7b2013-11-04 11:40:43 -08002039
2040 def __init__(self, value=None, value_mask=None):
2041 if value != None:
2042 self.value = value
2043 else:
2044 self.value = 0
2045 if value_mask != None:
2046 self.value_mask = value_mask
2047 else:
2048 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002049 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08002050
2051 def pack(self):
2052 packed = []
2053 packed.append(struct.pack("!L", self.type_len))
2054 packed.append(struct.pack("!L", self.value))
2055 packed.append(struct.pack("!L", self.value_mask))
2056 return ''.join(packed)
2057
2058 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002059 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08002060 obj = bsn_vrf_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08002061 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002062 assert(_type_len == 197896)
Rich Laned9e3f7b2013-11-04 11:40:43 -08002063 obj.value = reader.read("!L")[0]
2064 obj.value_mask = reader.read("!L")[0]
2065 return obj
2066
2067 def __eq__(self, other):
2068 if type(self) != type(other): return False
2069 if self.value != other.value: return False
2070 if self.value_mask != other.value_mask: return False
2071 return True
2072
Rich Laned9e3f7b2013-11-04 11:40:43 -08002073 def pretty_print(self, q):
2074 q.text("bsn_vrf_masked {")
2075 with q.group():
2076 with q.indent(2):
2077 q.breakable()
2078 q.text("value = ");
2079 q.text("%#x" % self.value)
2080 q.text(","); q.breakable()
2081 q.text("value_mask = ");
2082 q.text("%#x" % self.value_mask)
2083 q.breakable()
2084 q.text('}')
2085
Rich Lane7dcdf022013-12-11 14:45:27 -08002086oxm.subtypes[197896] = bsn_vrf_masked
2087
2088class eth_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002089 type_len = 2147485190
Rich Lanec2ee4b82013-04-24 17:12:38 -07002090
2091 def __init__(self, value=None):
2092 if value != None:
2093 self.value = value
2094 else:
2095 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002096 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002097
2098 def pack(self):
2099 packed = []
2100 packed.append(struct.pack("!L", self.type_len))
2101 packed.append(struct.pack("!6B", *self.value))
2102 return ''.join(packed)
2103
2104 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002105 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002106 obj = eth_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07002107 _type_len = reader.read("!L")[0]
2108 assert(_type_len == 2147485190)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002109 obj.value = list(reader.read('!6B'))
2110 return obj
2111
2112 def __eq__(self, other):
2113 if type(self) != type(other): return False
2114 if self.value != other.value: return False
2115 return True
2116
Rich Lanec2ee4b82013-04-24 17:12:38 -07002117 def pretty_print(self, q):
2118 q.text("eth_dst {")
2119 with q.group():
2120 with q.indent(2):
2121 q.breakable()
2122 q.text("value = ");
2123 q.text(util.pretty_mac(self.value))
2124 q.breakable()
2125 q.text('}')
2126
Rich Lane7dcdf022013-12-11 14:45:27 -08002127oxm.subtypes[2147485190] = eth_dst
2128
2129class eth_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002130 type_len = 2147485452
Rich Lanec2ee4b82013-04-24 17:12:38 -07002131
2132 def __init__(self, value=None, value_mask=None):
2133 if value != None:
2134 self.value = value
2135 else:
2136 self.value = [0,0,0,0,0,0]
2137 if value_mask != None:
2138 self.value_mask = value_mask
2139 else:
2140 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002141 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002142
2143 def pack(self):
2144 packed = []
2145 packed.append(struct.pack("!L", self.type_len))
2146 packed.append(struct.pack("!6B", *self.value))
2147 packed.append(struct.pack("!6B", *self.value_mask))
2148 return ''.join(packed)
2149
2150 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002151 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002152 obj = eth_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002153 _type_len = reader.read("!L")[0]
2154 assert(_type_len == 2147485452)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002155 obj.value = list(reader.read('!6B'))
2156 obj.value_mask = list(reader.read('!6B'))
2157 return obj
2158
2159 def __eq__(self, other):
2160 if type(self) != type(other): return False
2161 if self.value != other.value: return False
2162 if self.value_mask != other.value_mask: return False
2163 return True
2164
Rich Lanec2ee4b82013-04-24 17:12:38 -07002165 def pretty_print(self, q):
2166 q.text("eth_dst_masked {")
2167 with q.group():
2168 with q.indent(2):
2169 q.breakable()
2170 q.text("value = ");
2171 q.text(util.pretty_mac(self.value))
2172 q.text(","); q.breakable()
2173 q.text("value_mask = ");
2174 q.text(util.pretty_mac(self.value_mask))
2175 q.breakable()
2176 q.text('}')
2177
Rich Lane7dcdf022013-12-11 14:45:27 -08002178oxm.subtypes[2147485452] = eth_dst_masked
2179
2180class eth_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002181 type_len = 2147485702
Rich Lanec2ee4b82013-04-24 17:12:38 -07002182
2183 def __init__(self, value=None):
2184 if value != None:
2185 self.value = value
2186 else:
2187 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002188 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002189
2190 def pack(self):
2191 packed = []
2192 packed.append(struct.pack("!L", self.type_len))
2193 packed.append(struct.pack("!6B", *self.value))
2194 return ''.join(packed)
2195
2196 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002197 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002198 obj = eth_src()
Dan Talaycof6202252013-07-02 01:00:29 -07002199 _type_len = reader.read("!L")[0]
2200 assert(_type_len == 2147485702)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002201 obj.value = list(reader.read('!6B'))
2202 return obj
2203
2204 def __eq__(self, other):
2205 if type(self) != type(other): return False
2206 if self.value != other.value: return False
2207 return True
2208
Rich Lanec2ee4b82013-04-24 17:12:38 -07002209 def pretty_print(self, q):
2210 q.text("eth_src {")
2211 with q.group():
2212 with q.indent(2):
2213 q.breakable()
2214 q.text("value = ");
2215 q.text(util.pretty_mac(self.value))
2216 q.breakable()
2217 q.text('}')
2218
Rich Lane7dcdf022013-12-11 14:45:27 -08002219oxm.subtypes[2147485702] = eth_src
2220
2221class eth_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002222 type_len = 2147485964
Rich Lanec2ee4b82013-04-24 17:12:38 -07002223
2224 def __init__(self, value=None, value_mask=None):
2225 if value != None:
2226 self.value = value
2227 else:
2228 self.value = [0,0,0,0,0,0]
2229 if value_mask != None:
2230 self.value_mask = value_mask
2231 else:
2232 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002233 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002234
2235 def pack(self):
2236 packed = []
2237 packed.append(struct.pack("!L", self.type_len))
2238 packed.append(struct.pack("!6B", *self.value))
2239 packed.append(struct.pack("!6B", *self.value_mask))
2240 return ''.join(packed)
2241
2242 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002243 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002244 obj = eth_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002245 _type_len = reader.read("!L")[0]
2246 assert(_type_len == 2147485964)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002247 obj.value = list(reader.read('!6B'))
2248 obj.value_mask = list(reader.read('!6B'))
2249 return obj
2250
2251 def __eq__(self, other):
2252 if type(self) != type(other): return False
2253 if self.value != other.value: return False
2254 if self.value_mask != other.value_mask: return False
2255 return True
2256
Rich Lanec2ee4b82013-04-24 17:12:38 -07002257 def pretty_print(self, q):
2258 q.text("eth_src_masked {")
2259 with q.group():
2260 with q.indent(2):
2261 q.breakable()
2262 q.text("value = ");
2263 q.text(util.pretty_mac(self.value))
2264 q.text(","); q.breakable()
2265 q.text("value_mask = ");
2266 q.text(util.pretty_mac(self.value_mask))
2267 q.breakable()
2268 q.text('}')
2269
Rich Lane7dcdf022013-12-11 14:45:27 -08002270oxm.subtypes[2147485964] = eth_src_masked
2271
2272class eth_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002273 type_len = 2147486210
Rich Lanec2ee4b82013-04-24 17:12:38 -07002274
2275 def __init__(self, value=None):
2276 if value != None:
2277 self.value = value
2278 else:
2279 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002280 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002281
2282 def pack(self):
2283 packed = []
2284 packed.append(struct.pack("!L", self.type_len))
2285 packed.append(struct.pack("!H", self.value))
2286 return ''.join(packed)
2287
2288 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002289 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002290 obj = eth_type()
Dan Talaycof6202252013-07-02 01:00:29 -07002291 _type_len = reader.read("!L")[0]
2292 assert(_type_len == 2147486210)
2293 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002294 return obj
2295
2296 def __eq__(self, other):
2297 if type(self) != type(other): return False
2298 if self.value != other.value: return False
2299 return True
2300
Rich Lanec2ee4b82013-04-24 17:12:38 -07002301 def pretty_print(self, q):
2302 q.text("eth_type {")
2303 with q.group():
2304 with q.indent(2):
2305 q.breakable()
2306 q.text("value = ");
2307 q.text("%#x" % self.value)
2308 q.breakable()
2309 q.text('}')
2310
Rich Lane7dcdf022013-12-11 14:45:27 -08002311oxm.subtypes[2147486210] = eth_type
2312
2313class eth_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002314 type_len = 2147486468
Rich Lanec2ee4b82013-04-24 17:12:38 -07002315
2316 def __init__(self, value=None, value_mask=None):
2317 if value != None:
2318 self.value = value
2319 else:
2320 self.value = 0
2321 if value_mask != None:
2322 self.value_mask = value_mask
2323 else:
2324 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002325 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002326
2327 def pack(self):
2328 packed = []
2329 packed.append(struct.pack("!L", self.type_len))
2330 packed.append(struct.pack("!H", self.value))
2331 packed.append(struct.pack("!H", self.value_mask))
2332 return ''.join(packed)
2333
2334 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002335 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002336 obj = eth_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002337 _type_len = reader.read("!L")[0]
2338 assert(_type_len == 2147486468)
2339 obj.value = reader.read("!H")[0]
2340 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002341 return obj
2342
2343 def __eq__(self, other):
2344 if type(self) != type(other): return False
2345 if self.value != other.value: return False
2346 if self.value_mask != other.value_mask: return False
2347 return True
2348
Rich Lanec2ee4b82013-04-24 17:12:38 -07002349 def pretty_print(self, q):
2350 q.text("eth_type_masked {")
2351 with q.group():
2352 with q.indent(2):
2353 q.breakable()
2354 q.text("value = ");
2355 q.text("%#x" % self.value)
2356 q.text(","); q.breakable()
2357 q.text("value_mask = ");
2358 q.text("%#x" % self.value_mask)
2359 q.breakable()
2360 q.text('}')
2361
Rich Lane7dcdf022013-12-11 14:45:27 -08002362oxm.subtypes[2147486468] = eth_type_masked
2363
2364class icmpv4_code(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002365 type_len = 2147493889
Rich Lanec2ee4b82013-04-24 17:12:38 -07002366
2367 def __init__(self, value=None):
2368 if value != None:
2369 self.value = value
2370 else:
2371 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002372 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002373
2374 def pack(self):
2375 packed = []
2376 packed.append(struct.pack("!L", self.type_len))
2377 packed.append(struct.pack("!B", self.value))
2378 return ''.join(packed)
2379
2380 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002381 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002382 obj = icmpv4_code()
Dan Talaycof6202252013-07-02 01:00:29 -07002383 _type_len = reader.read("!L")[0]
2384 assert(_type_len == 2147493889)
2385 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002386 return obj
2387
2388 def __eq__(self, other):
2389 if type(self) != type(other): return False
2390 if self.value != other.value: return False
2391 return True
2392
Rich Lanec2ee4b82013-04-24 17:12:38 -07002393 def pretty_print(self, q):
2394 q.text("icmpv4_code {")
2395 with q.group():
2396 with q.indent(2):
2397 q.breakable()
2398 q.text("value = ");
2399 q.text("%#x" % self.value)
2400 q.breakable()
2401 q.text('}')
2402
Rich Lane7dcdf022013-12-11 14:45:27 -08002403oxm.subtypes[2147493889] = icmpv4_code
2404
2405class icmpv4_code_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002406 type_len = 2147494146
Rich Lanec2ee4b82013-04-24 17:12:38 -07002407
2408 def __init__(self, value=None, value_mask=None):
2409 if value != None:
2410 self.value = value
2411 else:
2412 self.value = 0
2413 if value_mask != None:
2414 self.value_mask = value_mask
2415 else:
2416 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002417 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002418
2419 def pack(self):
2420 packed = []
2421 packed.append(struct.pack("!L", self.type_len))
2422 packed.append(struct.pack("!B", self.value))
2423 packed.append(struct.pack("!B", self.value_mask))
2424 return ''.join(packed)
2425
2426 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002427 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002428 obj = icmpv4_code_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002429 _type_len = reader.read("!L")[0]
2430 assert(_type_len == 2147494146)
2431 obj.value = reader.read("!B")[0]
2432 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002433 return obj
2434
2435 def __eq__(self, other):
2436 if type(self) != type(other): return False
2437 if self.value != other.value: return False
2438 if self.value_mask != other.value_mask: return False
2439 return True
2440
Rich Lanec2ee4b82013-04-24 17:12:38 -07002441 def pretty_print(self, q):
2442 q.text("icmpv4_code_masked {")
2443 with q.group():
2444 with q.indent(2):
2445 q.breakable()
2446 q.text("value = ");
2447 q.text("%#x" % self.value)
2448 q.text(","); q.breakable()
2449 q.text("value_mask = ");
2450 q.text("%#x" % self.value_mask)
2451 q.breakable()
2452 q.text('}')
2453
Rich Lane7dcdf022013-12-11 14:45:27 -08002454oxm.subtypes[2147494146] = icmpv4_code_masked
2455
2456class icmpv4_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002457 type_len = 2147493377
Rich Lanec2ee4b82013-04-24 17:12:38 -07002458
2459 def __init__(self, value=None):
2460 if value != None:
2461 self.value = value
2462 else:
2463 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002464 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002465
2466 def pack(self):
2467 packed = []
2468 packed.append(struct.pack("!L", self.type_len))
2469 packed.append(struct.pack("!B", self.value))
2470 return ''.join(packed)
2471
2472 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002473 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002474 obj = icmpv4_type()
Dan Talaycof6202252013-07-02 01:00:29 -07002475 _type_len = reader.read("!L")[0]
2476 assert(_type_len == 2147493377)
2477 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002478 return obj
2479
2480 def __eq__(self, other):
2481 if type(self) != type(other): return False
2482 if self.value != other.value: return False
2483 return True
2484
Rich Lanec2ee4b82013-04-24 17:12:38 -07002485 def pretty_print(self, q):
2486 q.text("icmpv4_type {")
2487 with q.group():
2488 with q.indent(2):
2489 q.breakable()
2490 q.text("value = ");
2491 q.text("%#x" % self.value)
2492 q.breakable()
2493 q.text('}')
2494
Rich Lane7dcdf022013-12-11 14:45:27 -08002495oxm.subtypes[2147493377] = icmpv4_type
2496
2497class icmpv4_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002498 type_len = 2147493634
Rich Lanec2ee4b82013-04-24 17:12:38 -07002499
2500 def __init__(self, value=None, value_mask=None):
2501 if value != None:
2502 self.value = value
2503 else:
2504 self.value = 0
2505 if value_mask != None:
2506 self.value_mask = value_mask
2507 else:
2508 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002509 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002510
2511 def pack(self):
2512 packed = []
2513 packed.append(struct.pack("!L", self.type_len))
2514 packed.append(struct.pack("!B", self.value))
2515 packed.append(struct.pack("!B", self.value_mask))
2516 return ''.join(packed)
2517
2518 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002519 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002520 obj = icmpv4_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002521 _type_len = reader.read("!L")[0]
2522 assert(_type_len == 2147493634)
2523 obj.value = reader.read("!B")[0]
2524 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002525 return obj
2526
2527 def __eq__(self, other):
2528 if type(self) != type(other): return False
2529 if self.value != other.value: return False
2530 if self.value_mask != other.value_mask: return False
2531 return True
2532
Rich Lanec2ee4b82013-04-24 17:12:38 -07002533 def pretty_print(self, q):
2534 q.text("icmpv4_type_masked {")
2535 with q.group():
2536 with q.indent(2):
2537 q.breakable()
2538 q.text("value = ");
2539 q.text("%#x" % self.value)
2540 q.text(","); q.breakable()
2541 q.text("value_mask = ");
2542 q.text("%#x" % self.value_mask)
2543 q.breakable()
2544 q.text('}')
2545
Rich Lane7dcdf022013-12-11 14:45:27 -08002546oxm.subtypes[2147493634] = icmpv4_type_masked
2547
2548class icmpv6_code(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002549 type_len = 2147499009
Rich Lanec2ee4b82013-04-24 17:12:38 -07002550
2551 def __init__(self, value=None):
2552 if value != None:
2553 self.value = value
2554 else:
2555 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002556 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002557
2558 def pack(self):
2559 packed = []
2560 packed.append(struct.pack("!L", self.type_len))
2561 packed.append(struct.pack("!B", self.value))
2562 return ''.join(packed)
2563
2564 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002565 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002566 obj = icmpv6_code()
Dan Talaycof6202252013-07-02 01:00:29 -07002567 _type_len = reader.read("!L")[0]
2568 assert(_type_len == 2147499009)
2569 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002570 return obj
2571
2572 def __eq__(self, other):
2573 if type(self) != type(other): return False
2574 if self.value != other.value: return False
2575 return True
2576
Rich Lanec2ee4b82013-04-24 17:12:38 -07002577 def pretty_print(self, q):
2578 q.text("icmpv6_code {")
2579 with q.group():
2580 with q.indent(2):
2581 q.breakable()
2582 q.text("value = ");
2583 q.text("%#x" % self.value)
2584 q.breakable()
2585 q.text('}')
2586
Rich Lane7dcdf022013-12-11 14:45:27 -08002587oxm.subtypes[2147499009] = icmpv6_code
2588
2589class icmpv6_code_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002590 type_len = 2147499266
Rich Lanec2ee4b82013-04-24 17:12:38 -07002591
2592 def __init__(self, value=None, value_mask=None):
2593 if value != None:
2594 self.value = value
2595 else:
2596 self.value = 0
2597 if value_mask != None:
2598 self.value_mask = value_mask
2599 else:
2600 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002601 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002602
2603 def pack(self):
2604 packed = []
2605 packed.append(struct.pack("!L", self.type_len))
2606 packed.append(struct.pack("!B", self.value))
2607 packed.append(struct.pack("!B", self.value_mask))
2608 return ''.join(packed)
2609
2610 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002611 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002612 obj = icmpv6_code_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002613 _type_len = reader.read("!L")[0]
2614 assert(_type_len == 2147499266)
2615 obj.value = reader.read("!B")[0]
2616 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002617 return obj
2618
2619 def __eq__(self, other):
2620 if type(self) != type(other): return False
2621 if self.value != other.value: return False
2622 if self.value_mask != other.value_mask: return False
2623 return True
2624
Rich Lanec2ee4b82013-04-24 17:12:38 -07002625 def pretty_print(self, q):
2626 q.text("icmpv6_code_masked {")
2627 with q.group():
2628 with q.indent(2):
2629 q.breakable()
2630 q.text("value = ");
2631 q.text("%#x" % self.value)
2632 q.text(","); q.breakable()
2633 q.text("value_mask = ");
2634 q.text("%#x" % self.value_mask)
2635 q.breakable()
2636 q.text('}')
2637
Rich Lane7dcdf022013-12-11 14:45:27 -08002638oxm.subtypes[2147499266] = icmpv6_code_masked
2639
2640class icmpv6_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002641 type_len = 2147498497
Rich Lanec2ee4b82013-04-24 17:12:38 -07002642
2643 def __init__(self, value=None):
2644 if value != None:
2645 self.value = value
2646 else:
2647 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002648 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002649
2650 def pack(self):
2651 packed = []
2652 packed.append(struct.pack("!L", self.type_len))
2653 packed.append(struct.pack("!B", self.value))
2654 return ''.join(packed)
2655
2656 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002657 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002658 obj = icmpv6_type()
Dan Talaycof6202252013-07-02 01:00:29 -07002659 _type_len = reader.read("!L")[0]
2660 assert(_type_len == 2147498497)
2661 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002662 return obj
2663
2664 def __eq__(self, other):
2665 if type(self) != type(other): return False
2666 if self.value != other.value: return False
2667 return True
2668
Rich Lanec2ee4b82013-04-24 17:12:38 -07002669 def pretty_print(self, q):
2670 q.text("icmpv6_type {")
2671 with q.group():
2672 with q.indent(2):
2673 q.breakable()
2674 q.text("value = ");
2675 q.text("%#x" % self.value)
2676 q.breakable()
2677 q.text('}')
2678
Rich Lane7dcdf022013-12-11 14:45:27 -08002679oxm.subtypes[2147498497] = icmpv6_type
2680
2681class icmpv6_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002682 type_len = 2147498754
Rich Lanec2ee4b82013-04-24 17:12:38 -07002683
2684 def __init__(self, value=None, value_mask=None):
2685 if value != None:
2686 self.value = value
2687 else:
2688 self.value = 0
2689 if value_mask != None:
2690 self.value_mask = value_mask
2691 else:
2692 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002693 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002694
2695 def pack(self):
2696 packed = []
2697 packed.append(struct.pack("!L", self.type_len))
2698 packed.append(struct.pack("!B", self.value))
2699 packed.append(struct.pack("!B", self.value_mask))
2700 return ''.join(packed)
2701
2702 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002703 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002704 obj = icmpv6_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002705 _type_len = reader.read("!L")[0]
2706 assert(_type_len == 2147498754)
2707 obj.value = reader.read("!B")[0]
2708 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002709 return obj
2710
2711 def __eq__(self, other):
2712 if type(self) != type(other): return False
2713 if self.value != other.value: return False
2714 if self.value_mask != other.value_mask: return False
2715 return True
2716
Rich Lanec2ee4b82013-04-24 17:12:38 -07002717 def pretty_print(self, q):
2718 q.text("icmpv6_type_masked {")
2719 with q.group():
2720 with q.indent(2):
2721 q.breakable()
2722 q.text("value = ");
2723 q.text("%#x" % self.value)
2724 q.text(","); q.breakable()
2725 q.text("value_mask = ");
2726 q.text("%#x" % self.value_mask)
2727 q.breakable()
2728 q.text('}')
2729
Rich Lane7dcdf022013-12-11 14:45:27 -08002730oxm.subtypes[2147498754] = icmpv6_type_masked
2731
2732class in_phy_port(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002733 type_len = 2147484164
Rich Lanec2ee4b82013-04-24 17:12:38 -07002734
2735 def __init__(self, value=None):
2736 if value != None:
2737 self.value = value
2738 else:
2739 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002740 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002741
2742 def pack(self):
2743 packed = []
2744 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07002745 packed.append(util.pack_port_no(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002746 return ''.join(packed)
2747
2748 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002749 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002750 obj = in_phy_port()
Dan Talaycof6202252013-07-02 01:00:29 -07002751 _type_len = reader.read("!L")[0]
2752 assert(_type_len == 2147484164)
2753 obj.value = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002754 return obj
2755
2756 def __eq__(self, other):
2757 if type(self) != type(other): return False
2758 if self.value != other.value: return False
2759 return True
2760
Rich Lanec2ee4b82013-04-24 17:12:38 -07002761 def pretty_print(self, q):
2762 q.text("in_phy_port {")
2763 with q.group():
2764 with q.indent(2):
2765 q.breakable()
2766 q.text("value = ");
2767 q.text(util.pretty_port(self.value))
2768 q.breakable()
2769 q.text('}')
2770
Rich Lane7dcdf022013-12-11 14:45:27 -08002771oxm.subtypes[2147484164] = in_phy_port
2772
2773class in_phy_port_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002774 type_len = 2147484424
Rich Lanec2ee4b82013-04-24 17:12:38 -07002775
2776 def __init__(self, value=None, value_mask=None):
2777 if value != None:
2778 self.value = value
2779 else:
2780 self.value = 0
2781 if value_mask != None:
2782 self.value_mask = value_mask
2783 else:
2784 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002785 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002786
2787 def pack(self):
2788 packed = []
2789 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07002790 packed.append(util.pack_port_no(self.value))
2791 packed.append(util.pack_port_no(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002792 return ''.join(packed)
2793
2794 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002795 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002796 obj = in_phy_port_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002797 _type_len = reader.read("!L")[0]
2798 assert(_type_len == 2147484424)
2799 obj.value = util.unpack_port_no(reader)
2800 obj.value_mask = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002801 return obj
2802
2803 def __eq__(self, other):
2804 if type(self) != type(other): return False
2805 if self.value != other.value: return False
2806 if self.value_mask != other.value_mask: return False
2807 return True
2808
Rich Lanec2ee4b82013-04-24 17:12:38 -07002809 def pretty_print(self, q):
2810 q.text("in_phy_port_masked {")
2811 with q.group():
2812 with q.indent(2):
2813 q.breakable()
2814 q.text("value = ");
2815 q.text(util.pretty_port(self.value))
2816 q.text(","); q.breakable()
2817 q.text("value_mask = ");
2818 q.text(util.pretty_port(self.value_mask))
2819 q.breakable()
2820 q.text('}')
2821
Rich Lane7dcdf022013-12-11 14:45:27 -08002822oxm.subtypes[2147484424] = in_phy_port_masked
2823
2824class in_port(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002825 type_len = 2147483652
Rich Lanec2ee4b82013-04-24 17:12:38 -07002826
2827 def __init__(self, value=None):
2828 if value != None:
2829 self.value = value
2830 else:
2831 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002832 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002833
2834 def pack(self):
2835 packed = []
2836 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07002837 packed.append(util.pack_port_no(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002838 return ''.join(packed)
2839
2840 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002841 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002842 obj = in_port()
Dan Talaycof6202252013-07-02 01:00:29 -07002843 _type_len = reader.read("!L")[0]
2844 assert(_type_len == 2147483652)
2845 obj.value = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002846 return obj
2847
2848 def __eq__(self, other):
2849 if type(self) != type(other): return False
2850 if self.value != other.value: return False
2851 return True
2852
Rich Lanec2ee4b82013-04-24 17:12:38 -07002853 def pretty_print(self, q):
2854 q.text("in_port {")
2855 with q.group():
2856 with q.indent(2):
2857 q.breakable()
2858 q.text("value = ");
2859 q.text(util.pretty_port(self.value))
2860 q.breakable()
2861 q.text('}')
2862
Rich Lane7dcdf022013-12-11 14:45:27 -08002863oxm.subtypes[2147483652] = in_port
2864
2865class in_port_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002866 type_len = 2147483912
Rich Lanec2ee4b82013-04-24 17:12:38 -07002867
2868 def __init__(self, value=None, value_mask=None):
2869 if value != None:
2870 self.value = value
2871 else:
2872 self.value = 0
2873 if value_mask != None:
2874 self.value_mask = value_mask
2875 else:
2876 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002877 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002878
2879 def pack(self):
2880 packed = []
2881 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07002882 packed.append(util.pack_port_no(self.value))
2883 packed.append(util.pack_port_no(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002884 return ''.join(packed)
2885
2886 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002887 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002888 obj = in_port_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002889 _type_len = reader.read("!L")[0]
2890 assert(_type_len == 2147483912)
2891 obj.value = util.unpack_port_no(reader)
2892 obj.value_mask = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002893 return obj
2894
2895 def __eq__(self, other):
2896 if type(self) != type(other): return False
2897 if self.value != other.value: return False
2898 if self.value_mask != other.value_mask: return False
2899 return True
2900
Rich Lanec2ee4b82013-04-24 17:12:38 -07002901 def pretty_print(self, q):
2902 q.text("in_port_masked {")
2903 with q.group():
2904 with q.indent(2):
2905 q.breakable()
2906 q.text("value = ");
2907 q.text(util.pretty_port(self.value))
2908 q.text(","); q.breakable()
2909 q.text("value_mask = ");
2910 q.text(util.pretty_port(self.value_mask))
2911 q.breakable()
2912 q.text('}')
2913
Rich Lane7dcdf022013-12-11 14:45:27 -08002914oxm.subtypes[2147483912] = in_port_masked
2915
2916class ip_dscp(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002917 type_len = 2147487745
Rich Lanec2ee4b82013-04-24 17:12:38 -07002918
2919 def __init__(self, value=None):
2920 if value != None:
2921 self.value = value
2922 else:
2923 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002924 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002925
2926 def pack(self):
2927 packed = []
2928 packed.append(struct.pack("!L", self.type_len))
2929 packed.append(struct.pack("!B", self.value))
2930 return ''.join(packed)
2931
2932 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002933 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002934 obj = ip_dscp()
Dan Talaycof6202252013-07-02 01:00:29 -07002935 _type_len = reader.read("!L")[0]
2936 assert(_type_len == 2147487745)
2937 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002938 return obj
2939
2940 def __eq__(self, other):
2941 if type(self) != type(other): return False
2942 if self.value != other.value: return False
2943 return True
2944
Rich Lanec2ee4b82013-04-24 17:12:38 -07002945 def pretty_print(self, q):
2946 q.text("ip_dscp {")
2947 with q.group():
2948 with q.indent(2):
2949 q.breakable()
2950 q.text("value = ");
2951 q.text("%#x" % self.value)
2952 q.breakable()
2953 q.text('}')
2954
Rich Lane7dcdf022013-12-11 14:45:27 -08002955oxm.subtypes[2147487745] = ip_dscp
2956
2957class ip_dscp_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002958 type_len = 2147488002
Rich Lanec2ee4b82013-04-24 17:12:38 -07002959
2960 def __init__(self, value=None, value_mask=None):
2961 if value != None:
2962 self.value = value
2963 else:
2964 self.value = 0
2965 if value_mask != None:
2966 self.value_mask = value_mask
2967 else:
2968 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002969 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002970
2971 def pack(self):
2972 packed = []
2973 packed.append(struct.pack("!L", self.type_len))
2974 packed.append(struct.pack("!B", self.value))
2975 packed.append(struct.pack("!B", self.value_mask))
2976 return ''.join(packed)
2977
2978 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002979 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002980 obj = ip_dscp_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002981 _type_len = reader.read("!L")[0]
2982 assert(_type_len == 2147488002)
2983 obj.value = reader.read("!B")[0]
2984 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002985 return obj
2986
2987 def __eq__(self, other):
2988 if type(self) != type(other): return False
2989 if self.value != other.value: return False
2990 if self.value_mask != other.value_mask: return False
2991 return True
2992
Rich Lanec2ee4b82013-04-24 17:12:38 -07002993 def pretty_print(self, q):
2994 q.text("ip_dscp_masked {")
2995 with q.group():
2996 with q.indent(2):
2997 q.breakable()
2998 q.text("value = ");
2999 q.text("%#x" % self.value)
3000 q.text(","); q.breakable()
3001 q.text("value_mask = ");
3002 q.text("%#x" % self.value_mask)
3003 q.breakable()
3004 q.text('}')
3005
Rich Lane7dcdf022013-12-11 14:45:27 -08003006oxm.subtypes[2147488002] = ip_dscp_masked
3007
3008class ip_ecn(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003009 type_len = 2147488257
Rich Lanec2ee4b82013-04-24 17:12:38 -07003010
3011 def __init__(self, value=None):
3012 if value != None:
3013 self.value = value
3014 else:
3015 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003016 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003017
3018 def pack(self):
3019 packed = []
3020 packed.append(struct.pack("!L", self.type_len))
3021 packed.append(struct.pack("!B", self.value))
3022 return ''.join(packed)
3023
3024 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003025 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003026 obj = ip_ecn()
Dan Talaycof6202252013-07-02 01:00:29 -07003027 _type_len = reader.read("!L")[0]
3028 assert(_type_len == 2147488257)
3029 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003030 return obj
3031
3032 def __eq__(self, other):
3033 if type(self) != type(other): return False
3034 if self.value != other.value: return False
3035 return True
3036
Rich Lanec2ee4b82013-04-24 17:12:38 -07003037 def pretty_print(self, q):
3038 q.text("ip_ecn {")
3039 with q.group():
3040 with q.indent(2):
3041 q.breakable()
3042 q.text("value = ");
3043 q.text("%#x" % self.value)
3044 q.breakable()
3045 q.text('}')
3046
Rich Lane7dcdf022013-12-11 14:45:27 -08003047oxm.subtypes[2147488257] = ip_ecn
3048
3049class ip_ecn_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003050 type_len = 2147488514
Rich Lanec2ee4b82013-04-24 17:12:38 -07003051
3052 def __init__(self, value=None, value_mask=None):
3053 if value != None:
3054 self.value = value
3055 else:
3056 self.value = 0
3057 if value_mask != None:
3058 self.value_mask = value_mask
3059 else:
3060 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003061 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003062
3063 def pack(self):
3064 packed = []
3065 packed.append(struct.pack("!L", self.type_len))
3066 packed.append(struct.pack("!B", self.value))
3067 packed.append(struct.pack("!B", self.value_mask))
3068 return ''.join(packed)
3069
3070 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003071 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003072 obj = ip_ecn_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003073 _type_len = reader.read("!L")[0]
3074 assert(_type_len == 2147488514)
3075 obj.value = reader.read("!B")[0]
3076 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003077 return obj
3078
3079 def __eq__(self, other):
3080 if type(self) != type(other): return False
3081 if self.value != other.value: return False
3082 if self.value_mask != other.value_mask: return False
3083 return True
3084
Rich Lanec2ee4b82013-04-24 17:12:38 -07003085 def pretty_print(self, q):
3086 q.text("ip_ecn_masked {")
3087 with q.group():
3088 with q.indent(2):
3089 q.breakable()
3090 q.text("value = ");
3091 q.text("%#x" % self.value)
3092 q.text(","); q.breakable()
3093 q.text("value_mask = ");
3094 q.text("%#x" % self.value_mask)
3095 q.breakable()
3096 q.text('}')
3097
Rich Lane7dcdf022013-12-11 14:45:27 -08003098oxm.subtypes[2147488514] = ip_ecn_masked
3099
3100class ip_proto(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003101 type_len = 2147488769
Rich Lanec2ee4b82013-04-24 17:12:38 -07003102
3103 def __init__(self, value=None):
3104 if value != None:
3105 self.value = value
3106 else:
3107 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003108 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003109
3110 def pack(self):
3111 packed = []
3112 packed.append(struct.pack("!L", self.type_len))
3113 packed.append(struct.pack("!B", self.value))
3114 return ''.join(packed)
3115
3116 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003117 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003118 obj = ip_proto()
Dan Talaycof6202252013-07-02 01:00:29 -07003119 _type_len = reader.read("!L")[0]
3120 assert(_type_len == 2147488769)
3121 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003122 return obj
3123
3124 def __eq__(self, other):
3125 if type(self) != type(other): return False
3126 if self.value != other.value: return False
3127 return True
3128
Rich Lanec2ee4b82013-04-24 17:12:38 -07003129 def pretty_print(self, q):
3130 q.text("ip_proto {")
3131 with q.group():
3132 with q.indent(2):
3133 q.breakable()
3134 q.text("value = ");
3135 q.text("%#x" % self.value)
3136 q.breakable()
3137 q.text('}')
3138
Rich Lane7dcdf022013-12-11 14:45:27 -08003139oxm.subtypes[2147488769] = ip_proto
3140
3141class ip_proto_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003142 type_len = 2147489026
Rich Lanec2ee4b82013-04-24 17:12:38 -07003143
3144 def __init__(self, value=None, value_mask=None):
3145 if value != None:
3146 self.value = value
3147 else:
3148 self.value = 0
3149 if value_mask != None:
3150 self.value_mask = value_mask
3151 else:
3152 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003153 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003154
3155 def pack(self):
3156 packed = []
3157 packed.append(struct.pack("!L", self.type_len))
3158 packed.append(struct.pack("!B", self.value))
3159 packed.append(struct.pack("!B", self.value_mask))
3160 return ''.join(packed)
3161
3162 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003163 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003164 obj = ip_proto_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003165 _type_len = reader.read("!L")[0]
3166 assert(_type_len == 2147489026)
3167 obj.value = reader.read("!B")[0]
3168 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003169 return obj
3170
3171 def __eq__(self, other):
3172 if type(self) != type(other): return False
3173 if self.value != other.value: return False
3174 if self.value_mask != other.value_mask: return False
3175 return True
3176
Rich Lanec2ee4b82013-04-24 17:12:38 -07003177 def pretty_print(self, q):
3178 q.text("ip_proto_masked {")
3179 with q.group():
3180 with q.indent(2):
3181 q.breakable()
3182 q.text("value = ");
3183 q.text("%#x" % self.value)
3184 q.text(","); q.breakable()
3185 q.text("value_mask = ");
3186 q.text("%#x" % self.value_mask)
3187 q.breakable()
3188 q.text('}')
3189
Rich Lane7dcdf022013-12-11 14:45:27 -08003190oxm.subtypes[2147489026] = ip_proto_masked
3191
3192class ipv4_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003193 type_len = 2147489796
Rich Lanec2ee4b82013-04-24 17:12:38 -07003194
3195 def __init__(self, value=None):
3196 if value != None:
3197 self.value = value
3198 else:
3199 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003200 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003201
3202 def pack(self):
3203 packed = []
3204 packed.append(struct.pack("!L", self.type_len))
3205 packed.append(struct.pack("!L", self.value))
3206 return ''.join(packed)
3207
3208 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003209 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003210 obj = ipv4_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003211 _type_len = reader.read("!L")[0]
3212 assert(_type_len == 2147489796)
3213 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003214 return obj
3215
3216 def __eq__(self, other):
3217 if type(self) != type(other): return False
3218 if self.value != other.value: return False
3219 return True
3220
Rich Lanec2ee4b82013-04-24 17:12:38 -07003221 def pretty_print(self, q):
3222 q.text("ipv4_dst {")
3223 with q.group():
3224 with q.indent(2):
3225 q.breakable()
3226 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07003227 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003228 q.breakable()
3229 q.text('}')
3230
Rich Lane7dcdf022013-12-11 14:45:27 -08003231oxm.subtypes[2147489796] = ipv4_dst
3232
3233class ipv4_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003234 type_len = 2147490056
Rich Lanec2ee4b82013-04-24 17:12:38 -07003235
3236 def __init__(self, value=None, value_mask=None):
3237 if value != None:
3238 self.value = value
3239 else:
3240 self.value = 0
3241 if value_mask != None:
3242 self.value_mask = value_mask
3243 else:
3244 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003245 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003246
3247 def pack(self):
3248 packed = []
3249 packed.append(struct.pack("!L", self.type_len))
3250 packed.append(struct.pack("!L", self.value))
3251 packed.append(struct.pack("!L", self.value_mask))
3252 return ''.join(packed)
3253
3254 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003255 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003256 obj = ipv4_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003257 _type_len = reader.read("!L")[0]
3258 assert(_type_len == 2147490056)
3259 obj.value = reader.read("!L")[0]
3260 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003261 return obj
3262
3263 def __eq__(self, other):
3264 if type(self) != type(other): return False
3265 if self.value != other.value: return False
3266 if self.value_mask != other.value_mask: return False
3267 return True
3268
Rich Lanec2ee4b82013-04-24 17:12:38 -07003269 def pretty_print(self, q):
3270 q.text("ipv4_dst_masked {")
3271 with q.group():
3272 with q.indent(2):
3273 q.breakable()
3274 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07003275 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003276 q.text(","); q.breakable()
3277 q.text("value_mask = ");
Rich Laned53156a2013-08-05 17:17:33 -07003278 q.text(util.pretty_ipv4(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003279 q.breakable()
3280 q.text('}')
3281
Rich Lane7dcdf022013-12-11 14:45:27 -08003282oxm.subtypes[2147490056] = ipv4_dst_masked
3283
3284class ipv4_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003285 type_len = 2147489284
Rich Lanec2ee4b82013-04-24 17:12:38 -07003286
3287 def __init__(self, value=None):
3288 if value != None:
3289 self.value = value
3290 else:
3291 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003292 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003293
3294 def pack(self):
3295 packed = []
3296 packed.append(struct.pack("!L", self.type_len))
3297 packed.append(struct.pack("!L", self.value))
3298 return ''.join(packed)
3299
3300 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003301 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003302 obj = ipv4_src()
Dan Talaycof6202252013-07-02 01:00:29 -07003303 _type_len = reader.read("!L")[0]
3304 assert(_type_len == 2147489284)
3305 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003306 return obj
3307
3308 def __eq__(self, other):
3309 if type(self) != type(other): return False
3310 if self.value != other.value: return False
3311 return True
3312
Rich Lanec2ee4b82013-04-24 17:12:38 -07003313 def pretty_print(self, q):
3314 q.text("ipv4_src {")
3315 with q.group():
3316 with q.indent(2):
3317 q.breakable()
3318 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07003319 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003320 q.breakable()
3321 q.text('}')
3322
Rich Lane7dcdf022013-12-11 14:45:27 -08003323oxm.subtypes[2147489284] = ipv4_src
3324
3325class ipv4_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003326 type_len = 2147489544
Rich Lanec2ee4b82013-04-24 17:12:38 -07003327
3328 def __init__(self, value=None, value_mask=None):
3329 if value != None:
3330 self.value = value
3331 else:
3332 self.value = 0
3333 if value_mask != None:
3334 self.value_mask = value_mask
3335 else:
3336 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003337 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003338
3339 def pack(self):
3340 packed = []
3341 packed.append(struct.pack("!L", self.type_len))
3342 packed.append(struct.pack("!L", self.value))
3343 packed.append(struct.pack("!L", self.value_mask))
3344 return ''.join(packed)
3345
3346 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003347 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003348 obj = ipv4_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003349 _type_len = reader.read("!L")[0]
3350 assert(_type_len == 2147489544)
3351 obj.value = reader.read("!L")[0]
3352 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003353 return obj
3354
3355 def __eq__(self, other):
3356 if type(self) != type(other): return False
3357 if self.value != other.value: return False
3358 if self.value_mask != other.value_mask: return False
3359 return True
3360
Rich Lanec2ee4b82013-04-24 17:12:38 -07003361 def pretty_print(self, q):
3362 q.text("ipv4_src_masked {")
3363 with q.group():
3364 with q.indent(2):
3365 q.breakable()
3366 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07003367 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003368 q.text(","); q.breakable()
3369 q.text("value_mask = ");
Rich Laned53156a2013-08-05 17:17:33 -07003370 q.text(util.pretty_ipv4(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003371 q.breakable()
3372 q.text('}')
3373
Rich Lane7dcdf022013-12-11 14:45:27 -08003374oxm.subtypes[2147489544] = ipv4_src_masked
3375
3376class ipv6_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003377 type_len = 2147497488
Rich Lanec2ee4b82013-04-24 17:12:38 -07003378
3379 def __init__(self, value=None):
3380 if value != None:
3381 self.value = value
3382 else:
3383 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 -08003384 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003385
3386 def pack(self):
3387 packed = []
3388 packed.append(struct.pack("!L", self.type_len))
3389 packed.append(struct.pack("!16s", self.value))
3390 return ''.join(packed)
3391
3392 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003393 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003394 obj = ipv6_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003395 _type_len = reader.read("!L")[0]
3396 assert(_type_len == 2147497488)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003397 obj.value = reader.read('!16s')[0]
3398 return obj
3399
3400 def __eq__(self, other):
3401 if type(self) != type(other): return False
3402 if self.value != other.value: return False
3403 return True
3404
Rich Lanec2ee4b82013-04-24 17:12:38 -07003405 def pretty_print(self, q):
3406 q.text("ipv6_dst {")
3407 with q.group():
3408 with q.indent(2):
3409 q.breakable()
3410 q.text("value = ");
3411 q.pp(self.value)
3412 q.breakable()
3413 q.text('}')
3414
Rich Lane7dcdf022013-12-11 14:45:27 -08003415oxm.subtypes[2147497488] = ipv6_dst
3416
3417class ipv6_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003418 type_len = 2147497760
Rich Lanec2ee4b82013-04-24 17:12:38 -07003419
3420 def __init__(self, value=None, value_mask=None):
3421 if value != None:
3422 self.value = value
3423 else:
3424 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
3425 if value_mask != None:
3426 self.value_mask = value_mask
3427 else:
3428 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 -08003429 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003430
3431 def pack(self):
3432 packed = []
3433 packed.append(struct.pack("!L", self.type_len))
3434 packed.append(struct.pack("!16s", self.value))
3435 packed.append(struct.pack("!16s", self.value_mask))
3436 return ''.join(packed)
3437
3438 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003439 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003440 obj = ipv6_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003441 _type_len = reader.read("!L")[0]
3442 assert(_type_len == 2147497760)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003443 obj.value = reader.read('!16s')[0]
3444 obj.value_mask = reader.read('!16s')[0]
3445 return obj
3446
3447 def __eq__(self, other):
3448 if type(self) != type(other): return False
3449 if self.value != other.value: return False
3450 if self.value_mask != other.value_mask: return False
3451 return True
3452
Rich Lanec2ee4b82013-04-24 17:12:38 -07003453 def pretty_print(self, q):
3454 q.text("ipv6_dst_masked {")
3455 with q.group():
3456 with q.indent(2):
3457 q.breakable()
3458 q.text("value = ");
3459 q.pp(self.value)
3460 q.text(","); q.breakable()
3461 q.text("value_mask = ");
3462 q.pp(self.value_mask)
3463 q.breakable()
3464 q.text('}')
3465
Rich Lane7dcdf022013-12-11 14:45:27 -08003466oxm.subtypes[2147497760] = ipv6_dst_masked
3467
3468class ipv6_flabel(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003469 type_len = 2147497988
Rich Lanec2ee4b82013-04-24 17:12:38 -07003470
3471 def __init__(self, value=None):
3472 if value != None:
3473 self.value = value
3474 else:
3475 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003476 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003477
3478 def pack(self):
3479 packed = []
3480 packed.append(struct.pack("!L", self.type_len))
3481 packed.append(struct.pack("!L", self.value))
3482 return ''.join(packed)
3483
3484 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003485 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003486 obj = ipv6_flabel()
Dan Talaycof6202252013-07-02 01:00:29 -07003487 _type_len = reader.read("!L")[0]
3488 assert(_type_len == 2147497988)
3489 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003490 return obj
3491
3492 def __eq__(self, other):
3493 if type(self) != type(other): return False
3494 if self.value != other.value: return False
3495 return True
3496
Rich Lanec2ee4b82013-04-24 17:12:38 -07003497 def pretty_print(self, q):
3498 q.text("ipv6_flabel {")
3499 with q.group():
3500 with q.indent(2):
3501 q.breakable()
3502 q.text("value = ");
3503 q.text("%#x" % self.value)
3504 q.breakable()
3505 q.text('}')
3506
Rich Lane7dcdf022013-12-11 14:45:27 -08003507oxm.subtypes[2147497988] = ipv6_flabel
3508
3509class ipv6_flabel_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003510 type_len = 2147498248
Rich Lanec2ee4b82013-04-24 17:12:38 -07003511
3512 def __init__(self, value=None, value_mask=None):
3513 if value != None:
3514 self.value = value
3515 else:
3516 self.value = 0
3517 if value_mask != None:
3518 self.value_mask = value_mask
3519 else:
3520 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003521 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003522
3523 def pack(self):
3524 packed = []
3525 packed.append(struct.pack("!L", self.type_len))
3526 packed.append(struct.pack("!L", self.value))
3527 packed.append(struct.pack("!L", self.value_mask))
3528 return ''.join(packed)
3529
3530 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003531 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003532 obj = ipv6_flabel_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003533 _type_len = reader.read("!L")[0]
3534 assert(_type_len == 2147498248)
3535 obj.value = reader.read("!L")[0]
3536 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003537 return obj
3538
3539 def __eq__(self, other):
3540 if type(self) != type(other): return False
3541 if self.value != other.value: return False
3542 if self.value_mask != other.value_mask: return False
3543 return True
3544
Rich Lanec2ee4b82013-04-24 17:12:38 -07003545 def pretty_print(self, q):
3546 q.text("ipv6_flabel_masked {")
3547 with q.group():
3548 with q.indent(2):
3549 q.breakable()
3550 q.text("value = ");
3551 q.text("%#x" % self.value)
3552 q.text(","); q.breakable()
3553 q.text("value_mask = ");
3554 q.text("%#x" % self.value_mask)
3555 q.breakable()
3556 q.text('}')
3557
Rich Lane7dcdf022013-12-11 14:45:27 -08003558oxm.subtypes[2147498248] = ipv6_flabel_masked
3559
3560class ipv6_nd_sll(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003561 type_len = 2147500038
Rich Lanec2ee4b82013-04-24 17:12:38 -07003562
3563 def __init__(self, value=None):
3564 if value != None:
3565 self.value = value
3566 else:
3567 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08003568 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003569
3570 def pack(self):
3571 packed = []
3572 packed.append(struct.pack("!L", self.type_len))
3573 packed.append(struct.pack("!6B", *self.value))
3574 return ''.join(packed)
3575
3576 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003577 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003578 obj = ipv6_nd_sll()
Dan Talaycof6202252013-07-02 01:00:29 -07003579 _type_len = reader.read("!L")[0]
3580 assert(_type_len == 2147500038)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003581 obj.value = list(reader.read('!6B'))
3582 return obj
3583
3584 def __eq__(self, other):
3585 if type(self) != type(other): return False
3586 if self.value != other.value: return False
3587 return True
3588
Rich Lanec2ee4b82013-04-24 17:12:38 -07003589 def pretty_print(self, q):
3590 q.text("ipv6_nd_sll {")
3591 with q.group():
3592 with q.indent(2):
3593 q.breakable()
3594 q.text("value = ");
3595 q.text(util.pretty_mac(self.value))
3596 q.breakable()
3597 q.text('}')
3598
Rich Lane7dcdf022013-12-11 14:45:27 -08003599oxm.subtypes[2147500038] = ipv6_nd_sll
3600
3601class ipv6_nd_sll_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003602 type_len = 2147500300
Rich Lanec2ee4b82013-04-24 17:12:38 -07003603
3604 def __init__(self, value=None, value_mask=None):
3605 if value != None:
3606 self.value = value
3607 else:
3608 self.value = [0,0,0,0,0,0]
3609 if value_mask != None:
3610 self.value_mask = value_mask
3611 else:
3612 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08003613 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003614
3615 def pack(self):
3616 packed = []
3617 packed.append(struct.pack("!L", self.type_len))
3618 packed.append(struct.pack("!6B", *self.value))
3619 packed.append(struct.pack("!6B", *self.value_mask))
3620 return ''.join(packed)
3621
3622 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003623 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003624 obj = ipv6_nd_sll_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003625 _type_len = reader.read("!L")[0]
3626 assert(_type_len == 2147500300)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003627 obj.value = list(reader.read('!6B'))
3628 obj.value_mask = list(reader.read('!6B'))
3629 return obj
3630
3631 def __eq__(self, other):
3632 if type(self) != type(other): return False
3633 if self.value != other.value: return False
3634 if self.value_mask != other.value_mask: return False
3635 return True
3636
Rich Lanec2ee4b82013-04-24 17:12:38 -07003637 def pretty_print(self, q):
3638 q.text("ipv6_nd_sll_masked {")
3639 with q.group():
3640 with q.indent(2):
3641 q.breakable()
3642 q.text("value = ");
3643 q.text(util.pretty_mac(self.value))
3644 q.text(","); q.breakable()
3645 q.text("value_mask = ");
3646 q.text(util.pretty_mac(self.value_mask))
3647 q.breakable()
3648 q.text('}')
3649
Rich Lane7dcdf022013-12-11 14:45:27 -08003650oxm.subtypes[2147500300] = ipv6_nd_sll_masked
3651
3652class ipv6_nd_target(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003653 type_len = 2147499536
Rich Lanec2ee4b82013-04-24 17:12:38 -07003654
3655 def __init__(self, value=None):
3656 if value != None:
3657 self.value = value
3658 else:
3659 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 -08003660 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003661
3662 def pack(self):
3663 packed = []
3664 packed.append(struct.pack("!L", self.type_len))
3665 packed.append(struct.pack("!16s", self.value))
3666 return ''.join(packed)
3667
3668 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003669 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003670 obj = ipv6_nd_target()
Dan Talaycof6202252013-07-02 01:00:29 -07003671 _type_len = reader.read("!L")[0]
3672 assert(_type_len == 2147499536)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003673 obj.value = reader.read('!16s')[0]
3674 return obj
3675
3676 def __eq__(self, other):
3677 if type(self) != type(other): return False
3678 if self.value != other.value: return False
3679 return True
3680
Rich Lanec2ee4b82013-04-24 17:12:38 -07003681 def pretty_print(self, q):
3682 q.text("ipv6_nd_target {")
3683 with q.group():
3684 with q.indent(2):
3685 q.breakable()
3686 q.text("value = ");
3687 q.pp(self.value)
3688 q.breakable()
3689 q.text('}')
3690
Rich Lane7dcdf022013-12-11 14:45:27 -08003691oxm.subtypes[2147499536] = ipv6_nd_target
3692
3693class ipv6_nd_target_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003694 type_len = 2147499808
Rich Lanec2ee4b82013-04-24 17:12:38 -07003695
3696 def __init__(self, value=None, value_mask=None):
3697 if value != None:
3698 self.value = value
3699 else:
3700 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
3701 if value_mask != None:
3702 self.value_mask = value_mask
3703 else:
3704 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 -08003705 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003706
3707 def pack(self):
3708 packed = []
3709 packed.append(struct.pack("!L", self.type_len))
3710 packed.append(struct.pack("!16s", self.value))
3711 packed.append(struct.pack("!16s", self.value_mask))
3712 return ''.join(packed)
3713
3714 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003715 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003716 obj = ipv6_nd_target_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003717 _type_len = reader.read("!L")[0]
3718 assert(_type_len == 2147499808)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003719 obj.value = reader.read('!16s')[0]
3720 obj.value_mask = reader.read('!16s')[0]
3721 return obj
3722
3723 def __eq__(self, other):
3724 if type(self) != type(other): return False
3725 if self.value != other.value: return False
3726 if self.value_mask != other.value_mask: return False
3727 return True
3728
Rich Lanec2ee4b82013-04-24 17:12:38 -07003729 def pretty_print(self, q):
3730 q.text("ipv6_nd_target_masked {")
3731 with q.group():
3732 with q.indent(2):
3733 q.breakable()
3734 q.text("value = ");
3735 q.pp(self.value)
3736 q.text(","); q.breakable()
3737 q.text("value_mask = ");
3738 q.pp(self.value_mask)
3739 q.breakable()
3740 q.text('}')
3741
Rich Lane7dcdf022013-12-11 14:45:27 -08003742oxm.subtypes[2147499808] = ipv6_nd_target_masked
3743
3744class ipv6_nd_tll(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003745 type_len = 2147500550
Rich Lanec2ee4b82013-04-24 17:12:38 -07003746
3747 def __init__(self, value=None):
3748 if value != None:
3749 self.value = value
3750 else:
3751 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08003752 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003753
3754 def pack(self):
3755 packed = []
3756 packed.append(struct.pack("!L", self.type_len))
3757 packed.append(struct.pack("!6B", *self.value))
3758 return ''.join(packed)
3759
3760 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003761 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003762 obj = ipv6_nd_tll()
Dan Talaycof6202252013-07-02 01:00:29 -07003763 _type_len = reader.read("!L")[0]
3764 assert(_type_len == 2147500550)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003765 obj.value = list(reader.read('!6B'))
3766 return obj
3767
3768 def __eq__(self, other):
3769 if type(self) != type(other): return False
3770 if self.value != other.value: return False
3771 return True
3772
Rich Lanec2ee4b82013-04-24 17:12:38 -07003773 def pretty_print(self, q):
3774 q.text("ipv6_nd_tll {")
3775 with q.group():
3776 with q.indent(2):
3777 q.breakable()
3778 q.text("value = ");
3779 q.text(util.pretty_mac(self.value))
3780 q.breakable()
3781 q.text('}')
3782
Rich Lane7dcdf022013-12-11 14:45:27 -08003783oxm.subtypes[2147500550] = ipv6_nd_tll
3784
3785class ipv6_nd_tll_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003786 type_len = 2147500812
Rich Lanec2ee4b82013-04-24 17:12:38 -07003787
3788 def __init__(self, value=None, value_mask=None):
3789 if value != None:
3790 self.value = value
3791 else:
3792 self.value = [0,0,0,0,0,0]
3793 if value_mask != None:
3794 self.value_mask = value_mask
3795 else:
3796 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08003797 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003798
3799 def pack(self):
3800 packed = []
3801 packed.append(struct.pack("!L", self.type_len))
3802 packed.append(struct.pack("!6B", *self.value))
3803 packed.append(struct.pack("!6B", *self.value_mask))
3804 return ''.join(packed)
3805
3806 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003807 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003808 obj = ipv6_nd_tll_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003809 _type_len = reader.read("!L")[0]
3810 assert(_type_len == 2147500812)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003811 obj.value = list(reader.read('!6B'))
3812 obj.value_mask = list(reader.read('!6B'))
3813 return obj
3814
3815 def __eq__(self, other):
3816 if type(self) != type(other): return False
3817 if self.value != other.value: return False
3818 if self.value_mask != other.value_mask: return False
3819 return True
3820
Rich Lanec2ee4b82013-04-24 17:12:38 -07003821 def pretty_print(self, q):
3822 q.text("ipv6_nd_tll_masked {")
3823 with q.group():
3824 with q.indent(2):
3825 q.breakable()
3826 q.text("value = ");
3827 q.text(util.pretty_mac(self.value))
3828 q.text(","); q.breakable()
3829 q.text("value_mask = ");
3830 q.text(util.pretty_mac(self.value_mask))
3831 q.breakable()
3832 q.text('}')
3833
Rich Lane7dcdf022013-12-11 14:45:27 -08003834oxm.subtypes[2147500812] = ipv6_nd_tll_masked
3835
3836class ipv6_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003837 type_len = 2147496976
Rich Lanec2ee4b82013-04-24 17:12:38 -07003838
3839 def __init__(self, value=None):
3840 if value != None:
3841 self.value = value
3842 else:
3843 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 -08003844 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003845
3846 def pack(self):
3847 packed = []
3848 packed.append(struct.pack("!L", self.type_len))
3849 packed.append(struct.pack("!16s", self.value))
3850 return ''.join(packed)
3851
3852 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003853 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003854 obj = ipv6_src()
Dan Talaycof6202252013-07-02 01:00:29 -07003855 _type_len = reader.read("!L")[0]
3856 assert(_type_len == 2147496976)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003857 obj.value = reader.read('!16s')[0]
3858 return obj
3859
3860 def __eq__(self, other):
3861 if type(self) != type(other): return False
3862 if self.value != other.value: return False
3863 return True
3864
Rich Lanec2ee4b82013-04-24 17:12:38 -07003865 def pretty_print(self, q):
3866 q.text("ipv6_src {")
3867 with q.group():
3868 with q.indent(2):
3869 q.breakable()
3870 q.text("value = ");
3871 q.pp(self.value)
3872 q.breakable()
3873 q.text('}')
3874
Rich Lane7dcdf022013-12-11 14:45:27 -08003875oxm.subtypes[2147496976] = ipv6_src
3876
3877class ipv6_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003878 type_len = 2147497248
Rich Lanec2ee4b82013-04-24 17:12:38 -07003879
3880 def __init__(self, value=None, value_mask=None):
3881 if value != None:
3882 self.value = value
3883 else:
3884 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
3885 if value_mask != None:
3886 self.value_mask = value_mask
3887 else:
3888 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 -08003889 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003890
3891 def pack(self):
3892 packed = []
3893 packed.append(struct.pack("!L", self.type_len))
3894 packed.append(struct.pack("!16s", self.value))
3895 packed.append(struct.pack("!16s", self.value_mask))
3896 return ''.join(packed)
3897
3898 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003899 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003900 obj = ipv6_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003901 _type_len = reader.read("!L")[0]
3902 assert(_type_len == 2147497248)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003903 obj.value = reader.read('!16s')[0]
3904 obj.value_mask = reader.read('!16s')[0]
3905 return obj
3906
3907 def __eq__(self, other):
3908 if type(self) != type(other): return False
3909 if self.value != other.value: return False
3910 if self.value_mask != other.value_mask: return False
3911 return True
3912
Rich Lanec2ee4b82013-04-24 17:12:38 -07003913 def pretty_print(self, q):
3914 q.text("ipv6_src_masked {")
3915 with q.group():
3916 with q.indent(2):
3917 q.breakable()
3918 q.text("value = ");
3919 q.pp(self.value)
3920 q.text(","); q.breakable()
3921 q.text("value_mask = ");
3922 q.pp(self.value_mask)
3923 q.breakable()
3924 q.text('}')
3925
Rich Lane7dcdf022013-12-11 14:45:27 -08003926oxm.subtypes[2147497248] = ipv6_src_masked
3927
3928class metadata(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003929 type_len = 2147484680
Rich Lanec2ee4b82013-04-24 17:12:38 -07003930
3931 def __init__(self, value=None):
3932 if value != None:
3933 self.value = value
3934 else:
3935 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003936 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003937
3938 def pack(self):
3939 packed = []
3940 packed.append(struct.pack("!L", self.type_len))
3941 packed.append(struct.pack("!Q", self.value))
3942 return ''.join(packed)
3943
3944 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003945 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003946 obj = metadata()
Dan Talaycof6202252013-07-02 01:00:29 -07003947 _type_len = reader.read("!L")[0]
3948 assert(_type_len == 2147484680)
3949 obj.value = reader.read("!Q")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003950 return obj
3951
3952 def __eq__(self, other):
3953 if type(self) != type(other): return False
3954 if self.value != other.value: return False
3955 return True
3956
Rich Lanec2ee4b82013-04-24 17:12:38 -07003957 def pretty_print(self, q):
3958 q.text("metadata {")
3959 with q.group():
3960 with q.indent(2):
3961 q.breakable()
3962 q.text("value = ");
3963 q.text("%#x" % self.value)
3964 q.breakable()
3965 q.text('}')
3966
Rich Lane7dcdf022013-12-11 14:45:27 -08003967oxm.subtypes[2147484680] = metadata
3968
3969class metadata_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003970 type_len = 2147484944
Rich Lanec2ee4b82013-04-24 17:12:38 -07003971
3972 def __init__(self, value=None, value_mask=None):
3973 if value != None:
3974 self.value = value
3975 else:
3976 self.value = 0
3977 if value_mask != None:
3978 self.value_mask = value_mask
3979 else:
3980 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003981 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003982
3983 def pack(self):
3984 packed = []
3985 packed.append(struct.pack("!L", self.type_len))
3986 packed.append(struct.pack("!Q", self.value))
3987 packed.append(struct.pack("!Q", self.value_mask))
3988 return ''.join(packed)
3989
3990 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003991 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003992 obj = metadata_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003993 _type_len = reader.read("!L")[0]
3994 assert(_type_len == 2147484944)
3995 obj.value = reader.read("!Q")[0]
3996 obj.value_mask = reader.read("!Q")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003997 return obj
3998
3999 def __eq__(self, other):
4000 if type(self) != type(other): return False
4001 if self.value != other.value: return False
4002 if self.value_mask != other.value_mask: return False
4003 return True
4004
Rich Lanec2ee4b82013-04-24 17:12:38 -07004005 def pretty_print(self, q):
4006 q.text("metadata_masked {")
4007 with q.group():
4008 with q.indent(2):
4009 q.breakable()
4010 q.text("value = ");
4011 q.text("%#x" % self.value)
4012 q.text(","); q.breakable()
4013 q.text("value_mask = ");
4014 q.text("%#x" % self.value_mask)
4015 q.breakable()
4016 q.text('}')
4017
Rich Lane7dcdf022013-12-11 14:45:27 -08004018oxm.subtypes[2147484944] = metadata_masked
4019
4020class mpls_label(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004021 type_len = 2147501060
Rich Lanec2ee4b82013-04-24 17:12:38 -07004022
4023 def __init__(self, value=None):
4024 if value != None:
4025 self.value = value
4026 else:
4027 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004028 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004029
4030 def pack(self):
4031 packed = []
4032 packed.append(struct.pack("!L", self.type_len))
4033 packed.append(struct.pack("!L", self.value))
4034 return ''.join(packed)
4035
4036 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004037 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004038 obj = mpls_label()
Dan Talaycof6202252013-07-02 01:00:29 -07004039 _type_len = reader.read("!L")[0]
4040 assert(_type_len == 2147501060)
4041 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004042 return obj
4043
4044 def __eq__(self, other):
4045 if type(self) != type(other): return False
4046 if self.value != other.value: return False
4047 return True
4048
Rich Lanec2ee4b82013-04-24 17:12:38 -07004049 def pretty_print(self, q):
4050 q.text("mpls_label {")
4051 with q.group():
4052 with q.indent(2):
4053 q.breakable()
4054 q.text("value = ");
4055 q.text("%#x" % self.value)
4056 q.breakable()
4057 q.text('}')
4058
Rich Lane7dcdf022013-12-11 14:45:27 -08004059oxm.subtypes[2147501060] = mpls_label
4060
4061class mpls_label_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004062 type_len = 2147501320
Rich Lanec2ee4b82013-04-24 17:12:38 -07004063
4064 def __init__(self, value=None, value_mask=None):
4065 if value != None:
4066 self.value = value
4067 else:
4068 self.value = 0
4069 if value_mask != None:
4070 self.value_mask = value_mask
4071 else:
4072 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004073 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004074
4075 def pack(self):
4076 packed = []
4077 packed.append(struct.pack("!L", self.type_len))
4078 packed.append(struct.pack("!L", self.value))
4079 packed.append(struct.pack("!L", self.value_mask))
4080 return ''.join(packed)
4081
4082 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004083 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004084 obj = mpls_label_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004085 _type_len = reader.read("!L")[0]
4086 assert(_type_len == 2147501320)
4087 obj.value = reader.read("!L")[0]
4088 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004089 return obj
4090
4091 def __eq__(self, other):
4092 if type(self) != type(other): return False
4093 if self.value != other.value: return False
4094 if self.value_mask != other.value_mask: return False
4095 return True
4096
Rich Lanec2ee4b82013-04-24 17:12:38 -07004097 def pretty_print(self, q):
4098 q.text("mpls_label_masked {")
4099 with q.group():
4100 with q.indent(2):
4101 q.breakable()
4102 q.text("value = ");
4103 q.text("%#x" % self.value)
4104 q.text(","); q.breakable()
4105 q.text("value_mask = ");
4106 q.text("%#x" % self.value_mask)
4107 q.breakable()
4108 q.text('}')
4109
Rich Lane7dcdf022013-12-11 14:45:27 -08004110oxm.subtypes[2147501320] = mpls_label_masked
4111
4112class mpls_tc(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004113 type_len = 2147501569
Rich Lanec2ee4b82013-04-24 17:12:38 -07004114
4115 def __init__(self, value=None):
4116 if value != None:
4117 self.value = value
4118 else:
4119 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004120 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004121
4122 def pack(self):
4123 packed = []
4124 packed.append(struct.pack("!L", self.type_len))
4125 packed.append(struct.pack("!B", self.value))
4126 return ''.join(packed)
4127
4128 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004129 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004130 obj = mpls_tc()
Dan Talaycof6202252013-07-02 01:00:29 -07004131 _type_len = reader.read("!L")[0]
4132 assert(_type_len == 2147501569)
4133 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004134 return obj
4135
4136 def __eq__(self, other):
4137 if type(self) != type(other): return False
4138 if self.value != other.value: return False
4139 return True
4140
Rich Lanec2ee4b82013-04-24 17:12:38 -07004141 def pretty_print(self, q):
4142 q.text("mpls_tc {")
4143 with q.group():
4144 with q.indent(2):
4145 q.breakable()
4146 q.text("value = ");
4147 q.text("%#x" % self.value)
4148 q.breakable()
4149 q.text('}')
4150
Rich Lane7dcdf022013-12-11 14:45:27 -08004151oxm.subtypes[2147501569] = mpls_tc
4152
4153class mpls_tc_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004154 type_len = 2147501826
Rich Lanec2ee4b82013-04-24 17:12:38 -07004155
4156 def __init__(self, value=None, value_mask=None):
4157 if value != None:
4158 self.value = value
4159 else:
4160 self.value = 0
4161 if value_mask != None:
4162 self.value_mask = value_mask
4163 else:
4164 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004165 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004166
4167 def pack(self):
4168 packed = []
4169 packed.append(struct.pack("!L", self.type_len))
4170 packed.append(struct.pack("!B", self.value))
4171 packed.append(struct.pack("!B", self.value_mask))
4172 return ''.join(packed)
4173
4174 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004175 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004176 obj = mpls_tc_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004177 _type_len = reader.read("!L")[0]
4178 assert(_type_len == 2147501826)
4179 obj.value = reader.read("!B")[0]
4180 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004181 return obj
4182
4183 def __eq__(self, other):
4184 if type(self) != type(other): return False
4185 if self.value != other.value: return False
4186 if self.value_mask != other.value_mask: return False
4187 return True
4188
Rich Lanec2ee4b82013-04-24 17:12:38 -07004189 def pretty_print(self, q):
4190 q.text("mpls_tc_masked {")
4191 with q.group():
4192 with q.indent(2):
4193 q.breakable()
4194 q.text("value = ");
4195 q.text("%#x" % self.value)
4196 q.text(","); q.breakable()
4197 q.text("value_mask = ");
4198 q.text("%#x" % self.value_mask)
4199 q.breakable()
4200 q.text('}')
4201
Rich Lane7dcdf022013-12-11 14:45:27 -08004202oxm.subtypes[2147501826] = mpls_tc_masked
4203
4204class sctp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004205 type_len = 2147492866
Rich Lanec2ee4b82013-04-24 17:12:38 -07004206
4207 def __init__(self, value=None):
4208 if value != None:
4209 self.value = value
4210 else:
4211 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004212 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004213
4214 def pack(self):
4215 packed = []
4216 packed.append(struct.pack("!L", self.type_len))
4217 packed.append(struct.pack("!H", self.value))
4218 return ''.join(packed)
4219
4220 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004221 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004222 obj = sctp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07004223 _type_len = reader.read("!L")[0]
4224 assert(_type_len == 2147492866)
4225 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004226 return obj
4227
4228 def __eq__(self, other):
4229 if type(self) != type(other): return False
4230 if self.value != other.value: return False
4231 return True
4232
Rich Lanec2ee4b82013-04-24 17:12:38 -07004233 def pretty_print(self, q):
4234 q.text("sctp_dst {")
4235 with q.group():
4236 with q.indent(2):
4237 q.breakable()
4238 q.text("value = ");
4239 q.text("%#x" % self.value)
4240 q.breakable()
4241 q.text('}')
4242
Rich Lane7dcdf022013-12-11 14:45:27 -08004243oxm.subtypes[2147492866] = sctp_dst
4244
4245class sctp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004246 type_len = 2147493124
Rich Lanec2ee4b82013-04-24 17:12:38 -07004247
4248 def __init__(self, value=None, value_mask=None):
4249 if value != None:
4250 self.value = value
4251 else:
4252 self.value = 0
4253 if value_mask != None:
4254 self.value_mask = value_mask
4255 else:
4256 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004257 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004258
4259 def pack(self):
4260 packed = []
4261 packed.append(struct.pack("!L", self.type_len))
4262 packed.append(struct.pack("!H", self.value))
4263 packed.append(struct.pack("!H", self.value_mask))
4264 return ''.join(packed)
4265
4266 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004267 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004268 obj = sctp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004269 _type_len = reader.read("!L")[0]
4270 assert(_type_len == 2147493124)
4271 obj.value = reader.read("!H")[0]
4272 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004273 return obj
4274
4275 def __eq__(self, other):
4276 if type(self) != type(other): return False
4277 if self.value != other.value: return False
4278 if self.value_mask != other.value_mask: return False
4279 return True
4280
Rich Lanec2ee4b82013-04-24 17:12:38 -07004281 def pretty_print(self, q):
4282 q.text("sctp_dst_masked {")
4283 with q.group():
4284 with q.indent(2):
4285 q.breakable()
4286 q.text("value = ");
4287 q.text("%#x" % self.value)
4288 q.text(","); q.breakable()
4289 q.text("value_mask = ");
4290 q.text("%#x" % self.value_mask)
4291 q.breakable()
4292 q.text('}')
4293
Rich Lane7dcdf022013-12-11 14:45:27 -08004294oxm.subtypes[2147493124] = sctp_dst_masked
4295
4296class sctp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004297 type_len = 2147492354
Rich Lanec2ee4b82013-04-24 17:12:38 -07004298
4299 def __init__(self, value=None):
4300 if value != None:
4301 self.value = value
4302 else:
4303 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004304 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004305
4306 def pack(self):
4307 packed = []
4308 packed.append(struct.pack("!L", self.type_len))
4309 packed.append(struct.pack("!H", self.value))
4310 return ''.join(packed)
4311
4312 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004313 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004314 obj = sctp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07004315 _type_len = reader.read("!L")[0]
4316 assert(_type_len == 2147492354)
4317 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004318 return obj
4319
4320 def __eq__(self, other):
4321 if type(self) != type(other): return False
4322 if self.value != other.value: return False
4323 return True
4324
Rich Lanec2ee4b82013-04-24 17:12:38 -07004325 def pretty_print(self, q):
4326 q.text("sctp_src {")
4327 with q.group():
4328 with q.indent(2):
4329 q.breakable()
4330 q.text("value = ");
4331 q.text("%#x" % self.value)
4332 q.breakable()
4333 q.text('}')
4334
Rich Lane7dcdf022013-12-11 14:45:27 -08004335oxm.subtypes[2147492354] = sctp_src
4336
4337class sctp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004338 type_len = 2147492612
Rich Lanec2ee4b82013-04-24 17:12:38 -07004339
4340 def __init__(self, value=None, value_mask=None):
4341 if value != None:
4342 self.value = value
4343 else:
4344 self.value = 0
4345 if value_mask != None:
4346 self.value_mask = value_mask
4347 else:
4348 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004349 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004350
4351 def pack(self):
4352 packed = []
4353 packed.append(struct.pack("!L", self.type_len))
4354 packed.append(struct.pack("!H", self.value))
4355 packed.append(struct.pack("!H", self.value_mask))
4356 return ''.join(packed)
4357
4358 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004359 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004360 obj = sctp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004361 _type_len = reader.read("!L")[0]
4362 assert(_type_len == 2147492612)
4363 obj.value = reader.read("!H")[0]
4364 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004365 return obj
4366
4367 def __eq__(self, other):
4368 if type(self) != type(other): return False
4369 if self.value != other.value: return False
4370 if self.value_mask != other.value_mask: return False
4371 return True
4372
Rich Lanec2ee4b82013-04-24 17:12:38 -07004373 def pretty_print(self, q):
4374 q.text("sctp_src_masked {")
4375 with q.group():
4376 with q.indent(2):
4377 q.breakable()
4378 q.text("value = ");
4379 q.text("%#x" % self.value)
4380 q.text(","); q.breakable()
4381 q.text("value_mask = ");
4382 q.text("%#x" % self.value_mask)
4383 q.breakable()
4384 q.text('}')
4385
Rich Lane7dcdf022013-12-11 14:45:27 -08004386oxm.subtypes[2147492612] = sctp_src_masked
4387
4388class tcp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004389 type_len = 2147490818
Rich Lanec2ee4b82013-04-24 17:12:38 -07004390
4391 def __init__(self, value=None):
4392 if value != None:
4393 self.value = value
4394 else:
4395 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004396 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004397
4398 def pack(self):
4399 packed = []
4400 packed.append(struct.pack("!L", self.type_len))
4401 packed.append(struct.pack("!H", self.value))
4402 return ''.join(packed)
4403
4404 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004405 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004406 obj = tcp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07004407 _type_len = reader.read("!L")[0]
4408 assert(_type_len == 2147490818)
4409 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004410 return obj
4411
4412 def __eq__(self, other):
4413 if type(self) != type(other): return False
4414 if self.value != other.value: return False
4415 return True
4416
Rich Lanec2ee4b82013-04-24 17:12:38 -07004417 def pretty_print(self, q):
4418 q.text("tcp_dst {")
4419 with q.group():
4420 with q.indent(2):
4421 q.breakable()
4422 q.text("value = ");
4423 q.text("%#x" % self.value)
4424 q.breakable()
4425 q.text('}')
4426
Rich Lane7dcdf022013-12-11 14:45:27 -08004427oxm.subtypes[2147490818] = tcp_dst
4428
4429class tcp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004430 type_len = 2147491076
Rich Lanec2ee4b82013-04-24 17:12:38 -07004431
4432 def __init__(self, value=None, value_mask=None):
4433 if value != None:
4434 self.value = value
4435 else:
4436 self.value = 0
4437 if value_mask != None:
4438 self.value_mask = value_mask
4439 else:
4440 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004441 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004442
4443 def pack(self):
4444 packed = []
4445 packed.append(struct.pack("!L", self.type_len))
4446 packed.append(struct.pack("!H", self.value))
4447 packed.append(struct.pack("!H", self.value_mask))
4448 return ''.join(packed)
4449
4450 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004451 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004452 obj = tcp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004453 _type_len = reader.read("!L")[0]
4454 assert(_type_len == 2147491076)
4455 obj.value = reader.read("!H")[0]
4456 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004457 return obj
4458
4459 def __eq__(self, other):
4460 if type(self) != type(other): return False
4461 if self.value != other.value: return False
4462 if self.value_mask != other.value_mask: return False
4463 return True
4464
Rich Lanec2ee4b82013-04-24 17:12:38 -07004465 def pretty_print(self, q):
4466 q.text("tcp_dst_masked {")
4467 with q.group():
4468 with q.indent(2):
4469 q.breakable()
4470 q.text("value = ");
4471 q.text("%#x" % self.value)
4472 q.text(","); q.breakable()
4473 q.text("value_mask = ");
4474 q.text("%#x" % self.value_mask)
4475 q.breakable()
4476 q.text('}')
4477
Rich Lane7dcdf022013-12-11 14:45:27 -08004478oxm.subtypes[2147491076] = tcp_dst_masked
4479
4480class tcp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004481 type_len = 2147490306
Rich Lanec2ee4b82013-04-24 17:12:38 -07004482
4483 def __init__(self, value=None):
4484 if value != None:
4485 self.value = value
4486 else:
4487 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004488 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004489
4490 def pack(self):
4491 packed = []
4492 packed.append(struct.pack("!L", self.type_len))
4493 packed.append(struct.pack("!H", self.value))
4494 return ''.join(packed)
4495
4496 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004497 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004498 obj = tcp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07004499 _type_len = reader.read("!L")[0]
4500 assert(_type_len == 2147490306)
4501 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004502 return obj
4503
4504 def __eq__(self, other):
4505 if type(self) != type(other): return False
4506 if self.value != other.value: return False
4507 return True
4508
Rich Lanec2ee4b82013-04-24 17:12:38 -07004509 def pretty_print(self, q):
4510 q.text("tcp_src {")
4511 with q.group():
4512 with q.indent(2):
4513 q.breakable()
4514 q.text("value = ");
4515 q.text("%#x" % self.value)
4516 q.breakable()
4517 q.text('}')
4518
Rich Lane7dcdf022013-12-11 14:45:27 -08004519oxm.subtypes[2147490306] = tcp_src
4520
4521class tcp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004522 type_len = 2147490564
Rich Lanec2ee4b82013-04-24 17:12:38 -07004523
4524 def __init__(self, value=None, value_mask=None):
4525 if value != None:
4526 self.value = value
4527 else:
4528 self.value = 0
4529 if value_mask != None:
4530 self.value_mask = value_mask
4531 else:
4532 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004533 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004534
4535 def pack(self):
4536 packed = []
4537 packed.append(struct.pack("!L", self.type_len))
4538 packed.append(struct.pack("!H", self.value))
4539 packed.append(struct.pack("!H", self.value_mask))
4540 return ''.join(packed)
4541
4542 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004543 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004544 obj = tcp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004545 _type_len = reader.read("!L")[0]
4546 assert(_type_len == 2147490564)
4547 obj.value = reader.read("!H")[0]
4548 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004549 return obj
4550
4551 def __eq__(self, other):
4552 if type(self) != type(other): return False
4553 if self.value != other.value: return False
4554 if self.value_mask != other.value_mask: return False
4555 return True
4556
Rich Lanec2ee4b82013-04-24 17:12:38 -07004557 def pretty_print(self, q):
4558 q.text("tcp_src_masked {")
4559 with q.group():
4560 with q.indent(2):
4561 q.breakable()
4562 q.text("value = ");
4563 q.text("%#x" % self.value)
4564 q.text(","); q.breakable()
4565 q.text("value_mask = ");
4566 q.text("%#x" % self.value_mask)
4567 q.breakable()
4568 q.text('}')
4569
Rich Lane7dcdf022013-12-11 14:45:27 -08004570oxm.subtypes[2147490564] = tcp_src_masked
4571
4572class udp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004573 type_len = 2147491842
Rich Lanec2ee4b82013-04-24 17:12:38 -07004574
4575 def __init__(self, value=None):
4576 if value != None:
4577 self.value = value
4578 else:
4579 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004580 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004581
4582 def pack(self):
4583 packed = []
4584 packed.append(struct.pack("!L", self.type_len))
4585 packed.append(struct.pack("!H", self.value))
4586 return ''.join(packed)
4587
4588 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004589 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004590 obj = udp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07004591 _type_len = reader.read("!L")[0]
4592 assert(_type_len == 2147491842)
4593 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004594 return obj
4595
4596 def __eq__(self, other):
4597 if type(self) != type(other): return False
4598 if self.value != other.value: return False
4599 return True
4600
Rich Lanec2ee4b82013-04-24 17:12:38 -07004601 def pretty_print(self, q):
4602 q.text("udp_dst {")
4603 with q.group():
4604 with q.indent(2):
4605 q.breakable()
4606 q.text("value = ");
4607 q.text("%#x" % self.value)
4608 q.breakable()
4609 q.text('}')
4610
Rich Lane7dcdf022013-12-11 14:45:27 -08004611oxm.subtypes[2147491842] = udp_dst
4612
4613class udp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004614 type_len = 2147492100
Rich Lanec2ee4b82013-04-24 17:12:38 -07004615
4616 def __init__(self, value=None, value_mask=None):
4617 if value != None:
4618 self.value = value
4619 else:
4620 self.value = 0
4621 if value_mask != None:
4622 self.value_mask = value_mask
4623 else:
4624 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004625 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004626
4627 def pack(self):
4628 packed = []
4629 packed.append(struct.pack("!L", self.type_len))
4630 packed.append(struct.pack("!H", self.value))
4631 packed.append(struct.pack("!H", self.value_mask))
4632 return ''.join(packed)
4633
4634 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004635 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004636 obj = udp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004637 _type_len = reader.read("!L")[0]
4638 assert(_type_len == 2147492100)
4639 obj.value = reader.read("!H")[0]
4640 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004641 return obj
4642
4643 def __eq__(self, other):
4644 if type(self) != type(other): return False
4645 if self.value != other.value: return False
4646 if self.value_mask != other.value_mask: return False
4647 return True
4648
Rich Lanec2ee4b82013-04-24 17:12:38 -07004649 def pretty_print(self, q):
4650 q.text("udp_dst_masked {")
4651 with q.group():
4652 with q.indent(2):
4653 q.breakable()
4654 q.text("value = ");
4655 q.text("%#x" % self.value)
4656 q.text(","); q.breakable()
4657 q.text("value_mask = ");
4658 q.text("%#x" % self.value_mask)
4659 q.breakable()
4660 q.text('}')
4661
Rich Lane7dcdf022013-12-11 14:45:27 -08004662oxm.subtypes[2147492100] = udp_dst_masked
4663
4664class udp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004665 type_len = 2147491330
Rich Lanec2ee4b82013-04-24 17:12:38 -07004666
4667 def __init__(self, value=None):
4668 if value != None:
4669 self.value = value
4670 else:
4671 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004672 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004673
4674 def pack(self):
4675 packed = []
4676 packed.append(struct.pack("!L", self.type_len))
4677 packed.append(struct.pack("!H", self.value))
4678 return ''.join(packed)
4679
4680 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004681 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004682 obj = udp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07004683 _type_len = reader.read("!L")[0]
4684 assert(_type_len == 2147491330)
4685 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004686 return obj
4687
4688 def __eq__(self, other):
4689 if type(self) != type(other): return False
4690 if self.value != other.value: return False
4691 return True
4692
Rich Lanec2ee4b82013-04-24 17:12:38 -07004693 def pretty_print(self, q):
4694 q.text("udp_src {")
4695 with q.group():
4696 with q.indent(2):
4697 q.breakable()
4698 q.text("value = ");
4699 q.text("%#x" % self.value)
4700 q.breakable()
4701 q.text('}')
4702
Rich Lane7dcdf022013-12-11 14:45:27 -08004703oxm.subtypes[2147491330] = udp_src
4704
4705class udp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004706 type_len = 2147491588
Rich Lanec2ee4b82013-04-24 17:12:38 -07004707
4708 def __init__(self, value=None, value_mask=None):
4709 if value != None:
4710 self.value = value
4711 else:
4712 self.value = 0
4713 if value_mask != None:
4714 self.value_mask = value_mask
4715 else:
4716 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004717 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004718
4719 def pack(self):
4720 packed = []
4721 packed.append(struct.pack("!L", self.type_len))
4722 packed.append(struct.pack("!H", self.value))
4723 packed.append(struct.pack("!H", self.value_mask))
4724 return ''.join(packed)
4725
4726 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004727 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004728 obj = udp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004729 _type_len = reader.read("!L")[0]
4730 assert(_type_len == 2147491588)
4731 obj.value = reader.read("!H")[0]
4732 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004733 return obj
4734
4735 def __eq__(self, other):
4736 if type(self) != type(other): return False
4737 if self.value != other.value: return False
4738 if self.value_mask != other.value_mask: return False
4739 return True
4740
Rich Lanec2ee4b82013-04-24 17:12:38 -07004741 def pretty_print(self, q):
4742 q.text("udp_src_masked {")
4743 with q.group():
4744 with q.indent(2):
4745 q.breakable()
4746 q.text("value = ");
4747 q.text("%#x" % self.value)
4748 q.text(","); q.breakable()
4749 q.text("value_mask = ");
4750 q.text("%#x" % self.value_mask)
4751 q.breakable()
4752 q.text('}')
4753
Rich Lane7dcdf022013-12-11 14:45:27 -08004754oxm.subtypes[2147491588] = udp_src_masked
4755
4756class vlan_pcp(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004757 type_len = 2147487233
Rich Lanec2ee4b82013-04-24 17:12:38 -07004758
4759 def __init__(self, value=None):
4760 if value != None:
4761 self.value = value
4762 else:
4763 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004764 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004765
4766 def pack(self):
4767 packed = []
4768 packed.append(struct.pack("!L", self.type_len))
4769 packed.append(struct.pack("!B", self.value))
4770 return ''.join(packed)
4771
4772 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004773 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004774 obj = vlan_pcp()
Dan Talaycof6202252013-07-02 01:00:29 -07004775 _type_len = reader.read("!L")[0]
4776 assert(_type_len == 2147487233)
4777 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004778 return obj
4779
4780 def __eq__(self, other):
4781 if type(self) != type(other): return False
4782 if self.value != other.value: return False
4783 return True
4784
Rich Lanec2ee4b82013-04-24 17:12:38 -07004785 def pretty_print(self, q):
4786 q.text("vlan_pcp {")
4787 with q.group():
4788 with q.indent(2):
4789 q.breakable()
4790 q.text("value = ");
4791 q.text("%#x" % self.value)
4792 q.breakable()
4793 q.text('}')
4794
Rich Lane7dcdf022013-12-11 14:45:27 -08004795oxm.subtypes[2147487233] = vlan_pcp
4796
4797class vlan_pcp_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004798 type_len = 2147487490
Rich Lanec2ee4b82013-04-24 17:12:38 -07004799
4800 def __init__(self, value=None, value_mask=None):
4801 if value != None:
4802 self.value = value
4803 else:
4804 self.value = 0
4805 if value_mask != None:
4806 self.value_mask = value_mask
4807 else:
4808 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004809 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004810
4811 def pack(self):
4812 packed = []
4813 packed.append(struct.pack("!L", self.type_len))
4814 packed.append(struct.pack("!B", self.value))
4815 packed.append(struct.pack("!B", self.value_mask))
4816 return ''.join(packed)
4817
4818 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004819 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004820 obj = vlan_pcp_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004821 _type_len = reader.read("!L")[0]
4822 assert(_type_len == 2147487490)
4823 obj.value = reader.read("!B")[0]
4824 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004825 return obj
4826
4827 def __eq__(self, other):
4828 if type(self) != type(other): return False
4829 if self.value != other.value: return False
4830 if self.value_mask != other.value_mask: return False
4831 return True
4832
Rich Lanec2ee4b82013-04-24 17:12:38 -07004833 def pretty_print(self, q):
4834 q.text("vlan_pcp_masked {")
4835 with q.group():
4836 with q.indent(2):
4837 q.breakable()
4838 q.text("value = ");
4839 q.text("%#x" % self.value)
4840 q.text(","); q.breakable()
4841 q.text("value_mask = ");
4842 q.text("%#x" % self.value_mask)
4843 q.breakable()
4844 q.text('}')
4845
Rich Lane7dcdf022013-12-11 14:45:27 -08004846oxm.subtypes[2147487490] = vlan_pcp_masked
4847
4848class vlan_vid(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004849 type_len = 2147486722
Rich Lanec2ee4b82013-04-24 17:12:38 -07004850
4851 def __init__(self, value=None):
4852 if value != None:
4853 self.value = value
4854 else:
4855 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004856 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004857
4858 def pack(self):
4859 packed = []
4860 packed.append(struct.pack("!L", self.type_len))
4861 packed.append(struct.pack("!H", self.value))
4862 return ''.join(packed)
4863
4864 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004865 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004866 obj = vlan_vid()
Dan Talaycof6202252013-07-02 01:00:29 -07004867 _type_len = reader.read("!L")[0]
4868 assert(_type_len == 2147486722)
4869 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004870 return obj
4871
4872 def __eq__(self, other):
4873 if type(self) != type(other): return False
4874 if self.value != other.value: return False
4875 return True
4876
Rich Lanec2ee4b82013-04-24 17:12:38 -07004877 def pretty_print(self, q):
4878 q.text("vlan_vid {")
4879 with q.group():
4880 with q.indent(2):
4881 q.breakable()
4882 q.text("value = ");
4883 q.text("%#x" % self.value)
4884 q.breakable()
4885 q.text('}')
4886
Rich Lane7dcdf022013-12-11 14:45:27 -08004887oxm.subtypes[2147486722] = vlan_vid
4888
4889class vlan_vid_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004890 type_len = 2147486980
Rich Lanec2ee4b82013-04-24 17:12:38 -07004891
4892 def __init__(self, value=None, value_mask=None):
4893 if value != None:
4894 self.value = value
4895 else:
4896 self.value = 0
4897 if value_mask != None:
4898 self.value_mask = value_mask
4899 else:
4900 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004901 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004902
4903 def pack(self):
4904 packed = []
4905 packed.append(struct.pack("!L", self.type_len))
4906 packed.append(struct.pack("!H", self.value))
4907 packed.append(struct.pack("!H", self.value_mask))
4908 return ''.join(packed)
4909
4910 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004911 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004912 obj = vlan_vid_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004913 _type_len = reader.read("!L")[0]
4914 assert(_type_len == 2147486980)
4915 obj.value = reader.read("!H")[0]
4916 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004917 return obj
4918
4919 def __eq__(self, other):
4920 if type(self) != type(other): return False
4921 if self.value != other.value: return False
4922 if self.value_mask != other.value_mask: return False
4923 return True
4924
Rich Lanec2ee4b82013-04-24 17:12:38 -07004925 def pretty_print(self, q):
4926 q.text("vlan_vid_masked {")
4927 with q.group():
4928 with q.indent(2):
4929 q.breakable()
4930 q.text("value = ");
4931 q.text("%#x" % self.value)
4932 q.text(","); q.breakable()
4933 q.text("value_mask = ");
4934 q.text("%#x" % self.value_mask)
4935 q.breakable()
4936 q.text('}')
4937
Rich Lane7dcdf022013-12-11 14:45:27 -08004938oxm.subtypes[2147486980] = vlan_vid_masked
Rich Lanec2ee4b82013-04-24 17:12:38 -07004939
Rich Lane7dcdf022013-12-11 14:45:27 -08004940