blob: 391d55a6038d6aaa9186ba21e7588055e7990d9a [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 action
Rich Lane7dcdf022013-12-11 14:45:27 -080013import oxm
Harshmeet Singh1db46332014-10-14 16:29:13 -070014import message
15import instruction
16import common
Rich Lanec2ee4b82013-04-24 17:12:38 -070017import util
18import loxi.generic_util
Rich Lanec2ee4b82013-04-24 17:12:38 -070019
Rich Lane7dcdf022013-12-11 14:45:27 -080020class oxm(loxi.OFObject):
21 subtypes = {}
Rich Laned53156a2013-08-05 17:17:33 -070022
Rich Lane95f7fc92014-01-27 17:08:16 -080023
24 def __init__(self, type_len=None):
25 if type_len != None:
26 self.type_len = type_len
27 else:
28 self.type_len = 0
29 return
30
31 def pack(self):
32 packed = []
33 packed.append(struct.pack("!L", self.type_len))
34 return ''.join(packed)
35
Rich Lane7dcdf022013-12-11 14:45:27 -080036 @staticmethod
37 def unpack(reader):
38 subtype, = reader.peek('!L', 0)
Rich Lane95f7fc92014-01-27 17:08:16 -080039 subclass = oxm.subtypes.get(subtype)
40 if subclass:
41 return subclass.unpack(reader)
42
43 obj = oxm()
44 obj.type_len = reader.read("!L")[0]
45 return obj
46
47 def __eq__(self, other):
48 if type(self) != type(other): return False
49 if self.type_len != other.type_len: return False
50 return True
51
52 def pretty_print(self, q):
53 q.text("oxm {")
54 with q.group():
55 with q.indent(2):
56 q.breakable()
57 q.breakable()
58 q.text('}')
Rich Lanec2ee4b82013-04-24 17:12:38 -070059
Rich Lanec2ee4b82013-04-24 17:12:38 -070060
Rich Lane7dcdf022013-12-11 14:45:27 -080061class arp_op(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -070062 type_len = 2147494402
Rich Lanec2ee4b82013-04-24 17:12:38 -070063
64 def __init__(self, value=None):
65 if value != None:
66 self.value = value
67 else:
68 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -080069 return
Rich Lanec2ee4b82013-04-24 17:12:38 -070070
71 def pack(self):
72 packed = []
73 packed.append(struct.pack("!L", self.type_len))
74 packed.append(struct.pack("!H", self.value))
75 return ''.join(packed)
76
77 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -080078 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -070079 obj = arp_op()
Dan Talaycof6202252013-07-02 01:00:29 -070080 _type_len = reader.read("!L")[0]
81 assert(_type_len == 2147494402)
82 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -070083 return obj
84
85 def __eq__(self, other):
86 if type(self) != type(other): return False
87 if self.value != other.value: return False
88 return True
89
Rich Lanec2ee4b82013-04-24 17:12:38 -070090 def pretty_print(self, q):
91 q.text("arp_op {")
92 with q.group():
93 with q.indent(2):
94 q.breakable()
95 q.text("value = ");
96 q.text("%#x" % self.value)
97 q.breakable()
98 q.text('}')
99
Rich Lane7dcdf022013-12-11 14:45:27 -0800100oxm.subtypes[2147494402] = arp_op
101
102class arp_op_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700103 type_len = 2147494660
Rich Lanec2ee4b82013-04-24 17:12:38 -0700104
105 def __init__(self, value=None, value_mask=None):
106 if value != None:
107 self.value = value
108 else:
109 self.value = 0
110 if value_mask != None:
111 self.value_mask = value_mask
112 else:
113 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800114 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700115
116 def pack(self):
117 packed = []
118 packed.append(struct.pack("!L", self.type_len))
119 packed.append(struct.pack("!H", self.value))
120 packed.append(struct.pack("!H", self.value_mask))
121 return ''.join(packed)
122
123 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800124 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700125 obj = arp_op_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700126 _type_len = reader.read("!L")[0]
127 assert(_type_len == 2147494660)
128 obj.value = reader.read("!H")[0]
129 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700130 return obj
131
132 def __eq__(self, other):
133 if type(self) != type(other): return False
134 if self.value != other.value: return False
135 if self.value_mask != other.value_mask: return False
136 return True
137
Rich Lanec2ee4b82013-04-24 17:12:38 -0700138 def pretty_print(self, q):
139 q.text("arp_op_masked {")
140 with q.group():
141 with q.indent(2):
142 q.breakable()
143 q.text("value = ");
144 q.text("%#x" % self.value)
145 q.text(","); q.breakable()
146 q.text("value_mask = ");
147 q.text("%#x" % self.value_mask)
148 q.breakable()
149 q.text('}')
150
Rich Lane7dcdf022013-12-11 14:45:27 -0800151oxm.subtypes[2147494660] = arp_op_masked
152
153class arp_sha(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700154 type_len = 2147495942
Rich Lanec2ee4b82013-04-24 17:12:38 -0700155
156 def __init__(self, value=None):
157 if value != None:
158 self.value = value
159 else:
160 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800161 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700162
163 def pack(self):
164 packed = []
165 packed.append(struct.pack("!L", self.type_len))
166 packed.append(struct.pack("!6B", *self.value))
167 return ''.join(packed)
168
169 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800170 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700171 obj = arp_sha()
Dan Talaycof6202252013-07-02 01:00:29 -0700172 _type_len = reader.read("!L")[0]
173 assert(_type_len == 2147495942)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700174 obj.value = list(reader.read('!6B'))
175 return obj
176
177 def __eq__(self, other):
178 if type(self) != type(other): return False
179 if self.value != other.value: return False
180 return True
181
Rich Lanec2ee4b82013-04-24 17:12:38 -0700182 def pretty_print(self, q):
183 q.text("arp_sha {")
184 with q.group():
185 with q.indent(2):
186 q.breakable()
187 q.text("value = ");
188 q.text(util.pretty_mac(self.value))
189 q.breakable()
190 q.text('}')
191
Rich Lane7dcdf022013-12-11 14:45:27 -0800192oxm.subtypes[2147495942] = arp_sha
193
194class arp_sha_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700195 type_len = 2147496204
Rich Lanec2ee4b82013-04-24 17:12:38 -0700196
197 def __init__(self, value=None, value_mask=None):
198 if value != None:
199 self.value = value
200 else:
201 self.value = [0,0,0,0,0,0]
202 if value_mask != None:
203 self.value_mask = value_mask
204 else:
205 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800206 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700207
208 def pack(self):
209 packed = []
210 packed.append(struct.pack("!L", self.type_len))
211 packed.append(struct.pack("!6B", *self.value))
212 packed.append(struct.pack("!6B", *self.value_mask))
213 return ''.join(packed)
214
215 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800216 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700217 obj = arp_sha_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700218 _type_len = reader.read("!L")[0]
219 assert(_type_len == 2147496204)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700220 obj.value = list(reader.read('!6B'))
221 obj.value_mask = list(reader.read('!6B'))
222 return obj
223
224 def __eq__(self, other):
225 if type(self) != type(other): return False
226 if self.value != other.value: return False
227 if self.value_mask != other.value_mask: return False
228 return True
229
Rich Lanec2ee4b82013-04-24 17:12:38 -0700230 def pretty_print(self, q):
231 q.text("arp_sha_masked {")
232 with q.group():
233 with q.indent(2):
234 q.breakable()
235 q.text("value = ");
236 q.text(util.pretty_mac(self.value))
237 q.text(","); q.breakable()
238 q.text("value_mask = ");
239 q.text(util.pretty_mac(self.value_mask))
240 q.breakable()
241 q.text('}')
242
Rich Lane7dcdf022013-12-11 14:45:27 -0800243oxm.subtypes[2147496204] = arp_sha_masked
244
245class arp_spa(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700246 type_len = 2147494916
Rich Lanec2ee4b82013-04-24 17:12:38 -0700247
248 def __init__(self, value=None):
249 if value != None:
250 self.value = value
251 else:
252 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800253 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700254
255 def pack(self):
256 packed = []
257 packed.append(struct.pack("!L", self.type_len))
258 packed.append(struct.pack("!L", self.value))
259 return ''.join(packed)
260
261 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800262 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700263 obj = arp_spa()
Dan Talaycof6202252013-07-02 01:00:29 -0700264 _type_len = reader.read("!L")[0]
265 assert(_type_len == 2147494916)
266 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700267 return obj
268
269 def __eq__(self, other):
270 if type(self) != type(other): return False
271 if self.value != other.value: return False
272 return True
273
Rich Lanec2ee4b82013-04-24 17:12:38 -0700274 def pretty_print(self, q):
275 q.text("arp_spa {")
276 with q.group():
277 with q.indent(2):
278 q.breakable()
279 q.text("value = ");
280 q.text("%#x" % self.value)
281 q.breakable()
282 q.text('}')
283
Rich Lane7dcdf022013-12-11 14:45:27 -0800284oxm.subtypes[2147494916] = arp_spa
285
286class arp_spa_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700287 type_len = 2147495176
Rich Lanec2ee4b82013-04-24 17:12:38 -0700288
289 def __init__(self, value=None, value_mask=None):
290 if value != None:
291 self.value = value
292 else:
293 self.value = 0
294 if value_mask != None:
295 self.value_mask = value_mask
296 else:
297 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800298 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700299
300 def pack(self):
301 packed = []
302 packed.append(struct.pack("!L", self.type_len))
303 packed.append(struct.pack("!L", self.value))
304 packed.append(struct.pack("!L", self.value_mask))
305 return ''.join(packed)
306
307 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800308 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700309 obj = arp_spa_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700310 _type_len = reader.read("!L")[0]
311 assert(_type_len == 2147495176)
312 obj.value = reader.read("!L")[0]
313 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700314 return obj
315
316 def __eq__(self, other):
317 if type(self) != type(other): return False
318 if self.value != other.value: return False
319 if self.value_mask != other.value_mask: return False
320 return True
321
Rich Lanec2ee4b82013-04-24 17:12:38 -0700322 def pretty_print(self, q):
323 q.text("arp_spa_masked {")
324 with q.group():
325 with q.indent(2):
326 q.breakable()
327 q.text("value = ");
328 q.text("%#x" % self.value)
329 q.text(","); q.breakable()
330 q.text("value_mask = ");
331 q.text("%#x" % self.value_mask)
332 q.breakable()
333 q.text('}')
334
Rich Lane7dcdf022013-12-11 14:45:27 -0800335oxm.subtypes[2147495176] = arp_spa_masked
336
337class arp_tha(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700338 type_len = 2147496454
Rich Lanec2ee4b82013-04-24 17:12:38 -0700339
340 def __init__(self, value=None):
341 if value != None:
342 self.value = value
343 else:
344 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800345 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700346
347 def pack(self):
348 packed = []
349 packed.append(struct.pack("!L", self.type_len))
350 packed.append(struct.pack("!6B", *self.value))
351 return ''.join(packed)
352
353 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800354 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700355 obj = arp_tha()
Dan Talaycof6202252013-07-02 01:00:29 -0700356 _type_len = reader.read("!L")[0]
357 assert(_type_len == 2147496454)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700358 obj.value = list(reader.read('!6B'))
359 return obj
360
361 def __eq__(self, other):
362 if type(self) != type(other): return False
363 if self.value != other.value: return False
364 return True
365
Rich Lanec2ee4b82013-04-24 17:12:38 -0700366 def pretty_print(self, q):
367 q.text("arp_tha {")
368 with q.group():
369 with q.indent(2):
370 q.breakable()
371 q.text("value = ");
372 q.text(util.pretty_mac(self.value))
373 q.breakable()
374 q.text('}')
375
Rich Lane7dcdf022013-12-11 14:45:27 -0800376oxm.subtypes[2147496454] = arp_tha
377
378class arp_tha_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700379 type_len = 2147496716
Rich Lanec2ee4b82013-04-24 17:12:38 -0700380
381 def __init__(self, value=None, value_mask=None):
382 if value != None:
383 self.value = value
384 else:
385 self.value = [0,0,0,0,0,0]
386 if value_mask != None:
387 self.value_mask = value_mask
388 else:
389 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800390 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700391
392 def pack(self):
393 packed = []
394 packed.append(struct.pack("!L", self.type_len))
395 packed.append(struct.pack("!6B", *self.value))
396 packed.append(struct.pack("!6B", *self.value_mask))
397 return ''.join(packed)
398
399 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800400 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700401 obj = arp_tha_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700402 _type_len = reader.read("!L")[0]
403 assert(_type_len == 2147496716)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700404 obj.value = list(reader.read('!6B'))
405 obj.value_mask = list(reader.read('!6B'))
406 return obj
407
408 def __eq__(self, other):
409 if type(self) != type(other): return False
410 if self.value != other.value: return False
411 if self.value_mask != other.value_mask: return False
412 return True
413
Rich Lanec2ee4b82013-04-24 17:12:38 -0700414 def pretty_print(self, q):
415 q.text("arp_tha_masked {")
416 with q.group():
417 with q.indent(2):
418 q.breakable()
419 q.text("value = ");
420 q.text(util.pretty_mac(self.value))
421 q.text(","); q.breakable()
422 q.text("value_mask = ");
423 q.text(util.pretty_mac(self.value_mask))
424 q.breakable()
425 q.text('}')
426
Rich Lane7dcdf022013-12-11 14:45:27 -0800427oxm.subtypes[2147496716] = arp_tha_masked
428
429class arp_tpa(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700430 type_len = 2147495428
Rich Lanec2ee4b82013-04-24 17:12:38 -0700431
432 def __init__(self, value=None):
433 if value != None:
434 self.value = value
435 else:
436 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800437 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700438
439 def pack(self):
440 packed = []
441 packed.append(struct.pack("!L", self.type_len))
442 packed.append(struct.pack("!L", self.value))
443 return ''.join(packed)
444
445 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800446 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700447 obj = arp_tpa()
Dan Talaycof6202252013-07-02 01:00:29 -0700448 _type_len = reader.read("!L")[0]
449 assert(_type_len == 2147495428)
450 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700451 return obj
452
453 def __eq__(self, other):
454 if type(self) != type(other): return False
455 if self.value != other.value: return False
456 return True
457
Rich Lanec2ee4b82013-04-24 17:12:38 -0700458 def pretty_print(self, q):
459 q.text("arp_tpa {")
460 with q.group():
461 with q.indent(2):
462 q.breakable()
463 q.text("value = ");
464 q.text("%#x" % self.value)
465 q.breakable()
466 q.text('}')
467
Rich Lane7dcdf022013-12-11 14:45:27 -0800468oxm.subtypes[2147495428] = arp_tpa
469
470class arp_tpa_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700471 type_len = 2147495688
Rich Lanec2ee4b82013-04-24 17:12:38 -0700472
473 def __init__(self, value=None, value_mask=None):
474 if value != None:
475 self.value = value
476 else:
477 self.value = 0
478 if value_mask != None:
479 self.value_mask = value_mask
480 else:
481 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800482 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700483
484 def pack(self):
485 packed = []
486 packed.append(struct.pack("!L", self.type_len))
487 packed.append(struct.pack("!L", self.value))
488 packed.append(struct.pack("!L", self.value_mask))
489 return ''.join(packed)
490
491 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800492 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700493 obj = arp_tpa_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700494 _type_len = reader.read("!L")[0]
495 assert(_type_len == 2147495688)
496 obj.value = reader.read("!L")[0]
497 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700498 return obj
499
500 def __eq__(self, other):
501 if type(self) != type(other): return False
502 if self.value != other.value: return False
503 if self.value_mask != other.value_mask: return False
504 return True
505
Rich Lanec2ee4b82013-04-24 17:12:38 -0700506 def pretty_print(self, q):
507 q.text("arp_tpa_masked {")
508 with q.group():
509 with q.indent(2):
510 q.breakable()
511 q.text("value = ");
512 q.text("%#x" % self.value)
513 q.text(","); q.breakable()
514 q.text("value_mask = ");
515 q.text("%#x" % self.value_mask)
516 q.breakable()
517 q.text('}')
518
Rich Lane7dcdf022013-12-11 14:45:27 -0800519oxm.subtypes[2147495688] = arp_tpa_masked
520
Rich Lanec0d05d12014-03-11 18:02:24 -0700521class bsn_egr_port_group_id(oxm):
522 type_len = 200196
523
524 def __init__(self, value=None):
525 if value != None:
526 self.value = value
527 else:
528 self.value = 0
529 return
530
531 def pack(self):
532 packed = []
533 packed.append(struct.pack("!L", self.type_len))
534 packed.append(struct.pack("!L", self.value))
535 return ''.join(packed)
536
537 @staticmethod
538 def unpack(reader):
539 obj = bsn_egr_port_group_id()
540 _type_len = reader.read("!L")[0]
541 assert(_type_len == 200196)
542 obj.value = reader.read("!L")[0]
543 return obj
544
545 def __eq__(self, other):
546 if type(self) != type(other): return False
547 if self.value != other.value: return False
548 return True
549
550 def pretty_print(self, q):
551 q.text("bsn_egr_port_group_id {")
552 with q.group():
553 with q.indent(2):
554 q.breakable()
555 q.text("value = ");
556 q.text("%#x" % self.value)
557 q.breakable()
558 q.text('}')
559
560oxm.subtypes[200196] = bsn_egr_port_group_id
561
562class bsn_egr_port_group_id_masked(oxm):
563 type_len = 200456
564
565 def __init__(self, value=None, value_mask=None):
566 if value != None:
567 self.value = value
568 else:
569 self.value = 0
570 if value_mask != None:
571 self.value_mask = value_mask
572 else:
573 self.value_mask = 0
574 return
575
576 def pack(self):
577 packed = []
578 packed.append(struct.pack("!L", self.type_len))
579 packed.append(struct.pack("!L", self.value))
580 packed.append(struct.pack("!L", self.value_mask))
581 return ''.join(packed)
582
583 @staticmethod
584 def unpack(reader):
585 obj = bsn_egr_port_group_id_masked()
586 _type_len = reader.read("!L")[0]
587 assert(_type_len == 200456)
588 obj.value = reader.read("!L")[0]
589 obj.value_mask = reader.read("!L")[0]
590 return obj
591
592 def __eq__(self, other):
593 if type(self) != type(other): return False
594 if self.value != other.value: return False
595 if self.value_mask != other.value_mask: return False
596 return True
597
598 def pretty_print(self, q):
599 q.text("bsn_egr_port_group_id_masked {")
600 with q.group():
601 with q.indent(2):
602 q.breakable()
603 q.text("value = ");
604 q.text("%#x" % self.value)
605 q.text(","); q.breakable()
606 q.text("value_mask = ");
607 q.text("%#x" % self.value_mask)
608 q.breakable()
609 q.text('}')
610
611oxm.subtypes[200456] = bsn_egr_port_group_id_masked
612
Rich Lane7dcdf022013-12-11 14:45:27 -0800613class bsn_global_vrf_allowed(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800614 type_len = 198145
615
616 def __init__(self, value=None):
617 if value != None:
618 self.value = value
619 else:
620 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800621 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800622
623 def pack(self):
624 packed = []
625 packed.append(struct.pack("!L", self.type_len))
626 packed.append(struct.pack("!B", self.value))
627 return ''.join(packed)
628
629 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800630 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800631 obj = bsn_global_vrf_allowed()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800632 _type_len = reader.read("!L")[0]
633 assert(_type_len == 198145)
634 obj.value = reader.read("!B")[0]
635 return obj
636
637 def __eq__(self, other):
638 if type(self) != type(other): return False
639 if self.value != other.value: return False
640 return True
641
Rich Laned9e3f7b2013-11-04 11:40:43 -0800642 def pretty_print(self, q):
643 q.text("bsn_global_vrf_allowed {")
644 with q.group():
645 with q.indent(2):
646 q.breakable()
647 q.text("value = ");
648 q.text("%#x" % self.value)
649 q.breakable()
650 q.text('}')
651
Rich Lane7dcdf022013-12-11 14:45:27 -0800652oxm.subtypes[198145] = bsn_global_vrf_allowed
653
654class bsn_global_vrf_allowed_masked(oxm):
655 type_len = 198402
Rich Laned9e3f7b2013-11-04 11:40:43 -0800656
657 def __init__(self, value=None, value_mask=None):
658 if value != None:
659 self.value = value
660 else:
661 self.value = 0
662 if value_mask != None:
663 self.value_mask = value_mask
664 else:
665 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800666 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800667
668 def pack(self):
669 packed = []
670 packed.append(struct.pack("!L", self.type_len))
671 packed.append(struct.pack("!B", self.value))
672 packed.append(struct.pack("!B", self.value_mask))
673 return ''.join(packed)
674
675 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800676 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800677 obj = bsn_global_vrf_allowed_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800678 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800679 assert(_type_len == 198402)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800680 obj.value = reader.read("!B")[0]
681 obj.value_mask = reader.read("!B")[0]
682 return obj
683
684 def __eq__(self, other):
685 if type(self) != type(other): return False
686 if self.value != other.value: return False
687 if self.value_mask != other.value_mask: return False
688 return True
689
Rich Laned9e3f7b2013-11-04 11:40:43 -0800690 def pretty_print(self, q):
691 q.text("bsn_global_vrf_allowed_masked {")
692 with q.group():
693 with q.indent(2):
694 q.breakable()
695 q.text("value = ");
696 q.text("%#x" % self.value)
697 q.text(","); q.breakable()
698 q.text("value_mask = ");
699 q.text("%#x" % self.value_mask)
700 q.breakable()
701 q.text('}')
702
Rich Lane7dcdf022013-12-11 14:45:27 -0800703oxm.subtypes[198402] = bsn_global_vrf_allowed_masked
704
705class bsn_in_ports_128(oxm):
706 type_len = 196624
Rich Lane6f4978c2013-10-20 21:33:52 -0700707
708 def __init__(self, value=None):
709 if value != None:
710 self.value = value
711 else:
712 self.value = set()
Rich Lane7dcdf022013-12-11 14:45:27 -0800713 return
Rich Lane6f4978c2013-10-20 21:33:52 -0700714
715 def pack(self):
716 packed = []
717 packed.append(struct.pack("!L", self.type_len))
718 packed.append(util.pack_bitmap_128(self.value))
719 return ''.join(packed)
720
721 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800722 def unpack(reader):
Rich Lane6f4978c2013-10-20 21:33:52 -0700723 obj = bsn_in_ports_128()
Rich Lane6f4978c2013-10-20 21:33:52 -0700724 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800725 assert(_type_len == 196624)
Rich Lane6f4978c2013-10-20 21:33:52 -0700726 obj.value = util.unpack_bitmap_128(reader)
727 return obj
728
729 def __eq__(self, other):
730 if type(self) != type(other): return False
731 if self.value != other.value: return False
732 return True
733
Rich Lane6f4978c2013-10-20 21:33:52 -0700734 def pretty_print(self, q):
735 q.text("bsn_in_ports_128 {")
736 with q.group():
737 with q.indent(2):
738 q.breakable()
739 q.text("value = ");
740 q.pp(self.value)
741 q.breakable()
742 q.text('}')
743
Rich Lane7dcdf022013-12-11 14:45:27 -0800744oxm.subtypes[196624] = bsn_in_ports_128
745
746class bsn_in_ports_128_masked(oxm):
Rich Lane6f4978c2013-10-20 21:33:52 -0700747 type_len = 196896
748
749 def __init__(self, value=None, value_mask=None):
750 if value != None:
751 self.value = value
752 else:
753 self.value = set()
754 if value_mask != None:
755 self.value_mask = value_mask
756 else:
757 self.value_mask = set()
Rich Lane7dcdf022013-12-11 14:45:27 -0800758 return
Rich Lane6f4978c2013-10-20 21:33:52 -0700759
760 def pack(self):
761 packed = []
762 packed.append(struct.pack("!L", self.type_len))
763 packed.append(util.pack_bitmap_128(self.value))
764 packed.append(util.pack_bitmap_128(self.value_mask))
765 return ''.join(packed)
766
767 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800768 def unpack(reader):
Rich Lane6f4978c2013-10-20 21:33:52 -0700769 obj = bsn_in_ports_128_masked()
Rich Lane6f4978c2013-10-20 21:33:52 -0700770 _type_len = reader.read("!L")[0]
771 assert(_type_len == 196896)
772 obj.value = util.unpack_bitmap_128(reader)
773 obj.value_mask = util.unpack_bitmap_128(reader)
774 return obj
775
776 def __eq__(self, other):
777 if type(self) != type(other): return False
778 if self.value != other.value: return False
779 if self.value_mask != other.value_mask: return False
780 return True
781
Rich Lane6f4978c2013-10-20 21:33:52 -0700782 def pretty_print(self, q):
783 q.text("bsn_in_ports_128_masked {")
784 with q.group():
785 with q.indent(2):
786 q.breakable()
787 q.text("value = ");
788 q.pp(self.value)
789 q.text(","); q.breakable()
790 q.text("value_mask = ");
791 q.pp(self.value_mask)
792 q.breakable()
793 q.text('}')
794
Rich Lane7dcdf022013-12-11 14:45:27 -0800795oxm.subtypes[196896] = bsn_in_ports_128_masked
796
797class bsn_l3_dst_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800798 type_len = 199684
799
800 def __init__(self, value=None):
801 if value != None:
802 self.value = value
803 else:
804 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800805 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800806
807 def pack(self):
808 packed = []
809 packed.append(struct.pack("!L", self.type_len))
810 packed.append(struct.pack("!L", self.value))
811 return ''.join(packed)
812
813 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800814 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800815 obj = bsn_l3_dst_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800816 _type_len = reader.read("!L")[0]
817 assert(_type_len == 199684)
818 obj.value = reader.read("!L")[0]
819 return obj
820
821 def __eq__(self, other):
822 if type(self) != type(other): return False
823 if self.value != other.value: return False
824 return True
825
Rich Laned9e3f7b2013-11-04 11:40:43 -0800826 def pretty_print(self, q):
827 q.text("bsn_l3_dst_class_id {")
828 with q.group():
829 with q.indent(2):
830 q.breakable()
831 q.text("value = ");
832 q.text("%#x" % self.value)
833 q.breakable()
834 q.text('}')
835
Rich Lane7dcdf022013-12-11 14:45:27 -0800836oxm.subtypes[199684] = bsn_l3_dst_class_id
837
838class bsn_l3_dst_class_id_masked(oxm):
839 type_len = 199944
Rich Laned9e3f7b2013-11-04 11:40:43 -0800840
841 def __init__(self, value=None, value_mask=None):
842 if value != None:
843 self.value = value
844 else:
845 self.value = 0
846 if value_mask != None:
847 self.value_mask = value_mask
848 else:
849 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800850 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800851
852 def pack(self):
853 packed = []
854 packed.append(struct.pack("!L", self.type_len))
855 packed.append(struct.pack("!L", self.value))
856 packed.append(struct.pack("!L", self.value_mask))
857 return ''.join(packed)
858
859 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800860 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800861 obj = bsn_l3_dst_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800862 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800863 assert(_type_len == 199944)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800864 obj.value = reader.read("!L")[0]
865 obj.value_mask = reader.read("!L")[0]
866 return obj
867
868 def __eq__(self, other):
869 if type(self) != type(other): return False
870 if self.value != other.value: return False
871 if self.value_mask != other.value_mask: return False
872 return True
873
Rich Laned9e3f7b2013-11-04 11:40:43 -0800874 def pretty_print(self, q):
875 q.text("bsn_l3_dst_class_id_masked {")
876 with q.group():
877 with q.indent(2):
878 q.breakable()
879 q.text("value = ");
880 q.text("%#x" % self.value)
881 q.text(","); q.breakable()
882 q.text("value_mask = ");
883 q.text("%#x" % self.value_mask)
884 q.breakable()
885 q.text('}')
886
Rich Lane7dcdf022013-12-11 14:45:27 -0800887oxm.subtypes[199944] = bsn_l3_dst_class_id_masked
888
889class bsn_l3_interface_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800890 type_len = 198660
891
892 def __init__(self, value=None):
893 if value != None:
894 self.value = value
895 else:
896 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800897 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800898
899 def pack(self):
900 packed = []
901 packed.append(struct.pack("!L", self.type_len))
902 packed.append(struct.pack("!L", self.value))
903 return ''.join(packed)
904
905 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800906 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800907 obj = bsn_l3_interface_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800908 _type_len = reader.read("!L")[0]
909 assert(_type_len == 198660)
910 obj.value = reader.read("!L")[0]
911 return obj
912
913 def __eq__(self, other):
914 if type(self) != type(other): return False
915 if self.value != other.value: return False
916 return True
917
Rich Laned9e3f7b2013-11-04 11:40:43 -0800918 def pretty_print(self, q):
919 q.text("bsn_l3_interface_class_id {")
920 with q.group():
921 with q.indent(2):
922 q.breakable()
923 q.text("value = ");
924 q.text("%#x" % self.value)
925 q.breakable()
926 q.text('}')
927
Rich Lane7dcdf022013-12-11 14:45:27 -0800928oxm.subtypes[198660] = bsn_l3_interface_class_id
929
930class bsn_l3_interface_class_id_masked(oxm):
931 type_len = 198920
Rich Laned9e3f7b2013-11-04 11:40:43 -0800932
933 def __init__(self, value=None, value_mask=None):
934 if value != None:
935 self.value = value
936 else:
937 self.value = 0
938 if value_mask != None:
939 self.value_mask = value_mask
940 else:
941 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800942 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800943
944 def pack(self):
945 packed = []
946 packed.append(struct.pack("!L", self.type_len))
947 packed.append(struct.pack("!L", self.value))
948 packed.append(struct.pack("!L", self.value_mask))
949 return ''.join(packed)
950
951 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800952 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800953 obj = bsn_l3_interface_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800954 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800955 assert(_type_len == 198920)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800956 obj.value = reader.read("!L")[0]
957 obj.value_mask = reader.read("!L")[0]
958 return obj
959
960 def __eq__(self, other):
961 if type(self) != type(other): return False
962 if self.value != other.value: return False
963 if self.value_mask != other.value_mask: return False
964 return True
965
Rich Laned9e3f7b2013-11-04 11:40:43 -0800966 def pretty_print(self, q):
967 q.text("bsn_l3_interface_class_id_masked {")
968 with q.group():
969 with q.indent(2):
970 q.breakable()
971 q.text("value = ");
972 q.text("%#x" % self.value)
973 q.text(","); q.breakable()
974 q.text("value_mask = ");
975 q.text("%#x" % self.value_mask)
976 q.breakable()
977 q.text('}')
978
Rich Lane7dcdf022013-12-11 14:45:27 -0800979oxm.subtypes[198920] = bsn_l3_interface_class_id_masked
980
981class bsn_l3_src_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800982 type_len = 199172
983
984 def __init__(self, value=None):
985 if value != None:
986 self.value = value
987 else:
988 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800989 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800990
991 def pack(self):
992 packed = []
993 packed.append(struct.pack("!L", self.type_len))
994 packed.append(struct.pack("!L", self.value))
995 return ''.join(packed)
996
997 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800998 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800999 obj = bsn_l3_src_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001000 _type_len = reader.read("!L")[0]
1001 assert(_type_len == 199172)
1002 obj.value = reader.read("!L")[0]
1003 return obj
1004
1005 def __eq__(self, other):
1006 if type(self) != type(other): return False
1007 if self.value != other.value: return False
1008 return True
1009
Rich Laned9e3f7b2013-11-04 11:40:43 -08001010 def pretty_print(self, q):
1011 q.text("bsn_l3_src_class_id {")
1012 with q.group():
1013 with q.indent(2):
1014 q.breakable()
1015 q.text("value = ");
1016 q.text("%#x" % self.value)
1017 q.breakable()
1018 q.text('}')
1019
Rich Lane7dcdf022013-12-11 14:45:27 -08001020oxm.subtypes[199172] = bsn_l3_src_class_id
1021
1022class bsn_l3_src_class_id_masked(oxm):
1023 type_len = 199432
Rich Laned9e3f7b2013-11-04 11:40:43 -08001024
1025 def __init__(self, value=None, value_mask=None):
1026 if value != None:
1027 self.value = value
1028 else:
1029 self.value = 0
1030 if value_mask != None:
1031 self.value_mask = value_mask
1032 else:
1033 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001034 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001035
1036 def pack(self):
1037 packed = []
1038 packed.append(struct.pack("!L", self.type_len))
1039 packed.append(struct.pack("!L", self.value))
1040 packed.append(struct.pack("!L", self.value_mask))
1041 return ''.join(packed)
1042
1043 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001044 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001045 obj = bsn_l3_src_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001046 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001047 assert(_type_len == 199432)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001048 obj.value = reader.read("!L")[0]
1049 obj.value_mask = reader.read("!L")[0]
1050 return obj
1051
1052 def __eq__(self, other):
1053 if type(self) != type(other): return False
1054 if self.value != other.value: return False
1055 if self.value_mask != other.value_mask: return False
1056 return True
1057
Rich Laned9e3f7b2013-11-04 11:40:43 -08001058 def pretty_print(self, q):
1059 q.text("bsn_l3_src_class_id_masked {")
1060 with q.group():
1061 with q.indent(2):
1062 q.breakable()
1063 q.text("value = ");
1064 q.text("%#x" % self.value)
1065 q.text(","); q.breakable()
1066 q.text("value_mask = ");
1067 q.text("%#x" % self.value_mask)
1068 q.breakable()
1069 q.text('}')
1070
Rich Lane7dcdf022013-12-11 14:45:27 -08001071oxm.subtypes[199432] = bsn_l3_src_class_id_masked
1072
1073class bsn_lag_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001074 type_len = 197124
1075
1076 def __init__(self, value=None):
1077 if value != None:
1078 self.value = value
1079 else:
1080 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001081 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001082
1083 def pack(self):
1084 packed = []
1085 packed.append(struct.pack("!L", self.type_len))
1086 packed.append(struct.pack("!L", self.value))
1087 return ''.join(packed)
1088
1089 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001090 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001091 obj = bsn_lag_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001092 _type_len = reader.read("!L")[0]
1093 assert(_type_len == 197124)
1094 obj.value = reader.read("!L")[0]
1095 return obj
1096
1097 def __eq__(self, other):
1098 if type(self) != type(other): return False
1099 if self.value != other.value: return False
1100 return True
1101
Rich Laned9e3f7b2013-11-04 11:40:43 -08001102 def pretty_print(self, q):
1103 q.text("bsn_lag_id {")
1104 with q.group():
1105 with q.indent(2):
1106 q.breakable()
1107 q.text("value = ");
1108 q.text("%#x" % self.value)
1109 q.breakable()
1110 q.text('}')
1111
Rich Lane7dcdf022013-12-11 14:45:27 -08001112oxm.subtypes[197124] = bsn_lag_id
1113
1114class bsn_lag_id_masked(oxm):
1115 type_len = 197384
Rich Laned9e3f7b2013-11-04 11:40:43 -08001116
1117 def __init__(self, value=None, value_mask=None):
1118 if value != None:
1119 self.value = value
1120 else:
1121 self.value = 0
1122 if value_mask != None:
1123 self.value_mask = value_mask
1124 else:
1125 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001126 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001127
1128 def pack(self):
1129 packed = []
1130 packed.append(struct.pack("!L", self.type_len))
1131 packed.append(struct.pack("!L", self.value))
1132 packed.append(struct.pack("!L", self.value_mask))
1133 return ''.join(packed)
1134
1135 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001136 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001137 obj = bsn_lag_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001138 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001139 assert(_type_len == 197384)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001140 obj.value = reader.read("!L")[0]
1141 obj.value_mask = reader.read("!L")[0]
1142 return obj
1143
1144 def __eq__(self, other):
1145 if type(self) != type(other): return False
1146 if self.value != other.value: return False
1147 if self.value_mask != other.value_mask: return False
1148 return True
1149
Rich Laned9e3f7b2013-11-04 11:40:43 -08001150 def pretty_print(self, q):
1151 q.text("bsn_lag_id_masked {")
1152 with q.group():
1153 with q.indent(2):
1154 q.breakable()
1155 q.text("value = ");
1156 q.text("%#x" % self.value)
1157 q.text(","); q.breakable()
1158 q.text("value_mask = ");
1159 q.text("%#x" % self.value_mask)
1160 q.breakable()
1161 q.text('}')
1162
Rich Lane7dcdf022013-12-11 14:45:27 -08001163oxm.subtypes[197384] = bsn_lag_id_masked
1164
Harshmeet Singhc51f4042014-05-21 13:32:52 -07001165class bsn_tcp_flags(oxm):
1166 type_len = 204802
1167
1168 def __init__(self, value=None):
1169 if value != None:
1170 self.value = value
1171 else:
1172 self.value = 0
1173 return
1174
1175 def pack(self):
1176 packed = []
1177 packed.append(struct.pack("!L", self.type_len))
1178 packed.append(struct.pack("!H", self.value))
1179 return ''.join(packed)
1180
1181 @staticmethod
1182 def unpack(reader):
1183 obj = bsn_tcp_flags()
1184 _type_len = reader.read("!L")[0]
1185 assert(_type_len == 204802)
1186 obj.value = reader.read("!H")[0]
1187 return obj
1188
1189 def __eq__(self, other):
1190 if type(self) != type(other): return False
1191 if self.value != other.value: return False
1192 return True
1193
1194 def pretty_print(self, q):
1195 q.text("bsn_tcp_flags {")
1196 with q.group():
1197 with q.indent(2):
1198 q.breakable()
1199 q.text("value = ");
1200 q.text("%#x" % self.value)
1201 q.breakable()
1202 q.text('}')
1203
1204oxm.subtypes[204802] = bsn_tcp_flags
1205
1206class bsn_tcp_flags_masked(oxm):
1207 type_len = 205060
1208
1209 def __init__(self, value=None, value_mask=None):
1210 if value != None:
1211 self.value = value
1212 else:
1213 self.value = 0
1214 if value_mask != None:
1215 self.value_mask = value_mask
1216 else:
1217 self.value_mask = 0
1218 return
1219
1220 def pack(self):
1221 packed = []
1222 packed.append(struct.pack("!L", self.type_len))
1223 packed.append(struct.pack("!H", self.value))
1224 packed.append(struct.pack("!H", self.value_mask))
1225 return ''.join(packed)
1226
1227 @staticmethod
1228 def unpack(reader):
1229 obj = bsn_tcp_flags_masked()
1230 _type_len = reader.read("!L")[0]
1231 assert(_type_len == 205060)
1232 obj.value = reader.read("!H")[0]
1233 obj.value_mask = reader.read("!H")[0]
1234 return obj
1235
1236 def __eq__(self, other):
1237 if type(self) != type(other): return False
1238 if self.value != other.value: return False
1239 if self.value_mask != other.value_mask: return False
1240 return True
1241
1242 def pretty_print(self, q):
1243 q.text("bsn_tcp_flags_masked {")
1244 with q.group():
1245 with q.indent(2):
1246 q.breakable()
1247 q.text("value = ");
1248 q.text("%#x" % self.value)
1249 q.text(","); q.breakable()
1250 q.text("value_mask = ");
1251 q.text("%#x" % self.value_mask)
1252 q.breakable()
1253 q.text('}')
1254
1255oxm.subtypes[205060] = bsn_tcp_flags_masked
1256
Rich Lane93b33132014-04-21 12:20:58 -07001257class bsn_udf0(oxm):
1258 type_len = 200708
1259
1260 def __init__(self, value=None):
1261 if value != None:
1262 self.value = value
1263 else:
1264 self.value = 0
1265 return
1266
1267 def pack(self):
1268 packed = []
1269 packed.append(struct.pack("!L", self.type_len))
1270 packed.append(struct.pack("!L", self.value))
1271 return ''.join(packed)
1272
1273 @staticmethod
1274 def unpack(reader):
1275 obj = bsn_udf0()
1276 _type_len = reader.read("!L")[0]
1277 assert(_type_len == 200708)
1278 obj.value = reader.read("!L")[0]
1279 return obj
1280
1281 def __eq__(self, other):
1282 if type(self) != type(other): return False
1283 if self.value != other.value: return False
1284 return True
1285
1286 def pretty_print(self, q):
1287 q.text("bsn_udf0 {")
1288 with q.group():
1289 with q.indent(2):
1290 q.breakable()
1291 q.text("value = ");
1292 q.text("%#x" % self.value)
1293 q.breakable()
1294 q.text('}')
1295
1296oxm.subtypes[200708] = bsn_udf0
1297
1298class bsn_udf0_masked(oxm):
1299 type_len = 200968
1300
1301 def __init__(self, value=None, value_mask=None):
1302 if value != None:
1303 self.value = value
1304 else:
1305 self.value = 0
1306 if value_mask != None:
1307 self.value_mask = value_mask
1308 else:
1309 self.value_mask = 0
1310 return
1311
1312 def pack(self):
1313 packed = []
1314 packed.append(struct.pack("!L", self.type_len))
1315 packed.append(struct.pack("!L", self.value))
1316 packed.append(struct.pack("!L", self.value_mask))
1317 return ''.join(packed)
1318
1319 @staticmethod
1320 def unpack(reader):
1321 obj = bsn_udf0_masked()
1322 _type_len = reader.read("!L")[0]
1323 assert(_type_len == 200968)
1324 obj.value = reader.read("!L")[0]
1325 obj.value_mask = reader.read("!L")[0]
1326 return obj
1327
1328 def __eq__(self, other):
1329 if type(self) != type(other): return False
1330 if self.value != other.value: return False
1331 if self.value_mask != other.value_mask: return False
1332 return True
1333
1334 def pretty_print(self, q):
1335 q.text("bsn_udf0_masked {")
1336 with q.group():
1337 with q.indent(2):
1338 q.breakable()
1339 q.text("value = ");
1340 q.text("%#x" % self.value)
1341 q.text(","); q.breakable()
1342 q.text("value_mask = ");
1343 q.text("%#x" % self.value_mask)
1344 q.breakable()
1345 q.text('}')
1346
1347oxm.subtypes[200968] = bsn_udf0_masked
1348
1349class bsn_udf1(oxm):
1350 type_len = 201220
1351
1352 def __init__(self, value=None):
1353 if value != None:
1354 self.value = value
1355 else:
1356 self.value = 0
1357 return
1358
1359 def pack(self):
1360 packed = []
1361 packed.append(struct.pack("!L", self.type_len))
1362 packed.append(struct.pack("!L", self.value))
1363 return ''.join(packed)
1364
1365 @staticmethod
1366 def unpack(reader):
1367 obj = bsn_udf1()
1368 _type_len = reader.read("!L")[0]
1369 assert(_type_len == 201220)
1370 obj.value = reader.read("!L")[0]
1371 return obj
1372
1373 def __eq__(self, other):
1374 if type(self) != type(other): return False
1375 if self.value != other.value: return False
1376 return True
1377
1378 def pretty_print(self, q):
1379 q.text("bsn_udf1 {")
1380 with q.group():
1381 with q.indent(2):
1382 q.breakable()
1383 q.text("value = ");
1384 q.text("%#x" % self.value)
1385 q.breakable()
1386 q.text('}')
1387
1388oxm.subtypes[201220] = bsn_udf1
1389
1390class bsn_udf1_masked(oxm):
1391 type_len = 201480
1392
1393 def __init__(self, value=None, value_mask=None):
1394 if value != None:
1395 self.value = value
1396 else:
1397 self.value = 0
1398 if value_mask != None:
1399 self.value_mask = value_mask
1400 else:
1401 self.value_mask = 0
1402 return
1403
1404 def pack(self):
1405 packed = []
1406 packed.append(struct.pack("!L", self.type_len))
1407 packed.append(struct.pack("!L", self.value))
1408 packed.append(struct.pack("!L", self.value_mask))
1409 return ''.join(packed)
1410
1411 @staticmethod
1412 def unpack(reader):
1413 obj = bsn_udf1_masked()
1414 _type_len = reader.read("!L")[0]
1415 assert(_type_len == 201480)
1416 obj.value = reader.read("!L")[0]
1417 obj.value_mask = reader.read("!L")[0]
1418 return obj
1419
1420 def __eq__(self, other):
1421 if type(self) != type(other): return False
1422 if self.value != other.value: return False
1423 if self.value_mask != other.value_mask: return False
1424 return True
1425
1426 def pretty_print(self, q):
1427 q.text("bsn_udf1_masked {")
1428 with q.group():
1429 with q.indent(2):
1430 q.breakable()
1431 q.text("value = ");
1432 q.text("%#x" % self.value)
1433 q.text(","); q.breakable()
1434 q.text("value_mask = ");
1435 q.text("%#x" % self.value_mask)
1436 q.breakable()
1437 q.text('}')
1438
1439oxm.subtypes[201480] = bsn_udf1_masked
1440
1441class bsn_udf2(oxm):
1442 type_len = 201732
1443
1444 def __init__(self, value=None):
1445 if value != None:
1446 self.value = value
1447 else:
1448 self.value = 0
1449 return
1450
1451 def pack(self):
1452 packed = []
1453 packed.append(struct.pack("!L", self.type_len))
1454 packed.append(struct.pack("!L", self.value))
1455 return ''.join(packed)
1456
1457 @staticmethod
1458 def unpack(reader):
1459 obj = bsn_udf2()
1460 _type_len = reader.read("!L")[0]
1461 assert(_type_len == 201732)
1462 obj.value = reader.read("!L")[0]
1463 return obj
1464
1465 def __eq__(self, other):
1466 if type(self) != type(other): return False
1467 if self.value != other.value: return False
1468 return True
1469
1470 def pretty_print(self, q):
1471 q.text("bsn_udf2 {")
1472 with q.group():
1473 with q.indent(2):
1474 q.breakable()
1475 q.text("value = ");
1476 q.text("%#x" % self.value)
1477 q.breakable()
1478 q.text('}')
1479
1480oxm.subtypes[201732] = bsn_udf2
1481
1482class bsn_udf2_masked(oxm):
1483 type_len = 201992
1484
1485 def __init__(self, value=None, value_mask=None):
1486 if value != None:
1487 self.value = value
1488 else:
1489 self.value = 0
1490 if value_mask != None:
1491 self.value_mask = value_mask
1492 else:
1493 self.value_mask = 0
1494 return
1495
1496 def pack(self):
1497 packed = []
1498 packed.append(struct.pack("!L", self.type_len))
1499 packed.append(struct.pack("!L", self.value))
1500 packed.append(struct.pack("!L", self.value_mask))
1501 return ''.join(packed)
1502
1503 @staticmethod
1504 def unpack(reader):
1505 obj = bsn_udf2_masked()
1506 _type_len = reader.read("!L")[0]
1507 assert(_type_len == 201992)
1508 obj.value = reader.read("!L")[0]
1509 obj.value_mask = reader.read("!L")[0]
1510 return obj
1511
1512 def __eq__(self, other):
1513 if type(self) != type(other): return False
1514 if self.value != other.value: return False
1515 if self.value_mask != other.value_mask: return False
1516 return True
1517
1518 def pretty_print(self, q):
1519 q.text("bsn_udf2_masked {")
1520 with q.group():
1521 with q.indent(2):
1522 q.breakable()
1523 q.text("value = ");
1524 q.text("%#x" % self.value)
1525 q.text(","); q.breakable()
1526 q.text("value_mask = ");
1527 q.text("%#x" % self.value_mask)
1528 q.breakable()
1529 q.text('}')
1530
1531oxm.subtypes[201992] = bsn_udf2_masked
1532
1533class bsn_udf3(oxm):
1534 type_len = 202244
1535
1536 def __init__(self, value=None):
1537 if value != None:
1538 self.value = value
1539 else:
1540 self.value = 0
1541 return
1542
1543 def pack(self):
1544 packed = []
1545 packed.append(struct.pack("!L", self.type_len))
1546 packed.append(struct.pack("!L", self.value))
1547 return ''.join(packed)
1548
1549 @staticmethod
1550 def unpack(reader):
1551 obj = bsn_udf3()
1552 _type_len = reader.read("!L")[0]
1553 assert(_type_len == 202244)
1554 obj.value = reader.read("!L")[0]
1555 return obj
1556
1557 def __eq__(self, other):
1558 if type(self) != type(other): return False
1559 if self.value != other.value: return False
1560 return True
1561
1562 def pretty_print(self, q):
1563 q.text("bsn_udf3 {")
1564 with q.group():
1565 with q.indent(2):
1566 q.breakable()
1567 q.text("value = ");
1568 q.text("%#x" % self.value)
1569 q.breakable()
1570 q.text('}')
1571
1572oxm.subtypes[202244] = bsn_udf3
1573
1574class bsn_udf3_masked(oxm):
1575 type_len = 202504
1576
1577 def __init__(self, value=None, value_mask=None):
1578 if value != None:
1579 self.value = value
1580 else:
1581 self.value = 0
1582 if value_mask != None:
1583 self.value_mask = value_mask
1584 else:
1585 self.value_mask = 0
1586 return
1587
1588 def pack(self):
1589 packed = []
1590 packed.append(struct.pack("!L", self.type_len))
1591 packed.append(struct.pack("!L", self.value))
1592 packed.append(struct.pack("!L", self.value_mask))
1593 return ''.join(packed)
1594
1595 @staticmethod
1596 def unpack(reader):
1597 obj = bsn_udf3_masked()
1598 _type_len = reader.read("!L")[0]
1599 assert(_type_len == 202504)
1600 obj.value = reader.read("!L")[0]
1601 obj.value_mask = reader.read("!L")[0]
1602 return obj
1603
1604 def __eq__(self, other):
1605 if type(self) != type(other): return False
1606 if self.value != other.value: return False
1607 if self.value_mask != other.value_mask: return False
1608 return True
1609
1610 def pretty_print(self, q):
1611 q.text("bsn_udf3_masked {")
1612 with q.group():
1613 with q.indent(2):
1614 q.breakable()
1615 q.text("value = ");
1616 q.text("%#x" % self.value)
1617 q.text(","); q.breakable()
1618 q.text("value_mask = ");
1619 q.text("%#x" % self.value_mask)
1620 q.breakable()
1621 q.text('}')
1622
1623oxm.subtypes[202504] = bsn_udf3_masked
1624
1625class bsn_udf4(oxm):
1626 type_len = 202756
1627
1628 def __init__(self, value=None):
1629 if value != None:
1630 self.value = value
1631 else:
1632 self.value = 0
1633 return
1634
1635 def pack(self):
1636 packed = []
1637 packed.append(struct.pack("!L", self.type_len))
1638 packed.append(struct.pack("!L", self.value))
1639 return ''.join(packed)
1640
1641 @staticmethod
1642 def unpack(reader):
1643 obj = bsn_udf4()
1644 _type_len = reader.read("!L")[0]
1645 assert(_type_len == 202756)
1646 obj.value = reader.read("!L")[0]
1647 return obj
1648
1649 def __eq__(self, other):
1650 if type(self) != type(other): return False
1651 if self.value != other.value: return False
1652 return True
1653
1654 def pretty_print(self, q):
1655 q.text("bsn_udf4 {")
1656 with q.group():
1657 with q.indent(2):
1658 q.breakable()
1659 q.text("value = ");
1660 q.text("%#x" % self.value)
1661 q.breakable()
1662 q.text('}')
1663
1664oxm.subtypes[202756] = bsn_udf4
1665
1666class bsn_udf4_masked(oxm):
1667 type_len = 203016
1668
1669 def __init__(self, value=None, value_mask=None):
1670 if value != None:
1671 self.value = value
1672 else:
1673 self.value = 0
1674 if value_mask != None:
1675 self.value_mask = value_mask
1676 else:
1677 self.value_mask = 0
1678 return
1679
1680 def pack(self):
1681 packed = []
1682 packed.append(struct.pack("!L", self.type_len))
1683 packed.append(struct.pack("!L", self.value))
1684 packed.append(struct.pack("!L", self.value_mask))
1685 return ''.join(packed)
1686
1687 @staticmethod
1688 def unpack(reader):
1689 obj = bsn_udf4_masked()
1690 _type_len = reader.read("!L")[0]
1691 assert(_type_len == 203016)
1692 obj.value = reader.read("!L")[0]
1693 obj.value_mask = reader.read("!L")[0]
1694 return obj
1695
1696 def __eq__(self, other):
1697 if type(self) != type(other): return False
1698 if self.value != other.value: return False
1699 if self.value_mask != other.value_mask: return False
1700 return True
1701
1702 def pretty_print(self, q):
1703 q.text("bsn_udf4_masked {")
1704 with q.group():
1705 with q.indent(2):
1706 q.breakable()
1707 q.text("value = ");
1708 q.text("%#x" % self.value)
1709 q.text(","); q.breakable()
1710 q.text("value_mask = ");
1711 q.text("%#x" % self.value_mask)
1712 q.breakable()
1713 q.text('}')
1714
1715oxm.subtypes[203016] = bsn_udf4_masked
1716
1717class bsn_udf5(oxm):
1718 type_len = 203268
1719
1720 def __init__(self, value=None):
1721 if value != None:
1722 self.value = value
1723 else:
1724 self.value = 0
1725 return
1726
1727 def pack(self):
1728 packed = []
1729 packed.append(struct.pack("!L", self.type_len))
1730 packed.append(struct.pack("!L", self.value))
1731 return ''.join(packed)
1732
1733 @staticmethod
1734 def unpack(reader):
1735 obj = bsn_udf5()
1736 _type_len = reader.read("!L")[0]
1737 assert(_type_len == 203268)
1738 obj.value = reader.read("!L")[0]
1739 return obj
1740
1741 def __eq__(self, other):
1742 if type(self) != type(other): return False
1743 if self.value != other.value: return False
1744 return True
1745
1746 def pretty_print(self, q):
1747 q.text("bsn_udf5 {")
1748 with q.group():
1749 with q.indent(2):
1750 q.breakable()
1751 q.text("value = ");
1752 q.text("%#x" % self.value)
1753 q.breakable()
1754 q.text('}')
1755
1756oxm.subtypes[203268] = bsn_udf5
1757
1758class bsn_udf5_masked(oxm):
1759 type_len = 203528
1760
1761 def __init__(self, value=None, value_mask=None):
1762 if value != None:
1763 self.value = value
1764 else:
1765 self.value = 0
1766 if value_mask != None:
1767 self.value_mask = value_mask
1768 else:
1769 self.value_mask = 0
1770 return
1771
1772 def pack(self):
1773 packed = []
1774 packed.append(struct.pack("!L", self.type_len))
1775 packed.append(struct.pack("!L", self.value))
1776 packed.append(struct.pack("!L", self.value_mask))
1777 return ''.join(packed)
1778
1779 @staticmethod
1780 def unpack(reader):
1781 obj = bsn_udf5_masked()
1782 _type_len = reader.read("!L")[0]
1783 assert(_type_len == 203528)
1784 obj.value = reader.read("!L")[0]
1785 obj.value_mask = reader.read("!L")[0]
1786 return obj
1787
1788 def __eq__(self, other):
1789 if type(self) != type(other): return False
1790 if self.value != other.value: return False
1791 if self.value_mask != other.value_mask: return False
1792 return True
1793
1794 def pretty_print(self, q):
1795 q.text("bsn_udf5_masked {")
1796 with q.group():
1797 with q.indent(2):
1798 q.breakable()
1799 q.text("value = ");
1800 q.text("%#x" % self.value)
1801 q.text(","); q.breakable()
1802 q.text("value_mask = ");
1803 q.text("%#x" % self.value_mask)
1804 q.breakable()
1805 q.text('}')
1806
1807oxm.subtypes[203528] = bsn_udf5_masked
1808
1809class bsn_udf6(oxm):
1810 type_len = 203780
1811
1812 def __init__(self, value=None):
1813 if value != None:
1814 self.value = value
1815 else:
1816 self.value = 0
1817 return
1818
1819 def pack(self):
1820 packed = []
1821 packed.append(struct.pack("!L", self.type_len))
1822 packed.append(struct.pack("!L", self.value))
1823 return ''.join(packed)
1824
1825 @staticmethod
1826 def unpack(reader):
1827 obj = bsn_udf6()
1828 _type_len = reader.read("!L")[0]
1829 assert(_type_len == 203780)
1830 obj.value = reader.read("!L")[0]
1831 return obj
1832
1833 def __eq__(self, other):
1834 if type(self) != type(other): return False
1835 if self.value != other.value: return False
1836 return True
1837
1838 def pretty_print(self, q):
1839 q.text("bsn_udf6 {")
1840 with q.group():
1841 with q.indent(2):
1842 q.breakable()
1843 q.text("value = ");
1844 q.text("%#x" % self.value)
1845 q.breakable()
1846 q.text('}')
1847
1848oxm.subtypes[203780] = bsn_udf6
1849
1850class bsn_udf6_masked(oxm):
1851 type_len = 204040
1852
1853 def __init__(self, value=None, value_mask=None):
1854 if value != None:
1855 self.value = value
1856 else:
1857 self.value = 0
1858 if value_mask != None:
1859 self.value_mask = value_mask
1860 else:
1861 self.value_mask = 0
1862 return
1863
1864 def pack(self):
1865 packed = []
1866 packed.append(struct.pack("!L", self.type_len))
1867 packed.append(struct.pack("!L", self.value))
1868 packed.append(struct.pack("!L", self.value_mask))
1869 return ''.join(packed)
1870
1871 @staticmethod
1872 def unpack(reader):
1873 obj = bsn_udf6_masked()
1874 _type_len = reader.read("!L")[0]
1875 assert(_type_len == 204040)
1876 obj.value = reader.read("!L")[0]
1877 obj.value_mask = reader.read("!L")[0]
1878 return obj
1879
1880 def __eq__(self, other):
1881 if type(self) != type(other): return False
1882 if self.value != other.value: return False
1883 if self.value_mask != other.value_mask: return False
1884 return True
1885
1886 def pretty_print(self, q):
1887 q.text("bsn_udf6_masked {")
1888 with q.group():
1889 with q.indent(2):
1890 q.breakable()
1891 q.text("value = ");
1892 q.text("%#x" % self.value)
1893 q.text(","); q.breakable()
1894 q.text("value_mask = ");
1895 q.text("%#x" % self.value_mask)
1896 q.breakable()
1897 q.text('}')
1898
1899oxm.subtypes[204040] = bsn_udf6_masked
1900
1901class bsn_udf7(oxm):
1902 type_len = 204292
1903
1904 def __init__(self, value=None):
1905 if value != None:
1906 self.value = value
1907 else:
1908 self.value = 0
1909 return
1910
1911 def pack(self):
1912 packed = []
1913 packed.append(struct.pack("!L", self.type_len))
1914 packed.append(struct.pack("!L", self.value))
1915 return ''.join(packed)
1916
1917 @staticmethod
1918 def unpack(reader):
1919 obj = bsn_udf7()
1920 _type_len = reader.read("!L")[0]
1921 assert(_type_len == 204292)
1922 obj.value = reader.read("!L")[0]
1923 return obj
1924
1925 def __eq__(self, other):
1926 if type(self) != type(other): return False
1927 if self.value != other.value: return False
1928 return True
1929
1930 def pretty_print(self, q):
1931 q.text("bsn_udf7 {")
1932 with q.group():
1933 with q.indent(2):
1934 q.breakable()
1935 q.text("value = ");
1936 q.text("%#x" % self.value)
1937 q.breakable()
1938 q.text('}')
1939
1940oxm.subtypes[204292] = bsn_udf7
1941
1942class bsn_udf7_masked(oxm):
1943 type_len = 204552
1944
1945 def __init__(self, value=None, value_mask=None):
1946 if value != None:
1947 self.value = value
1948 else:
1949 self.value = 0
1950 if value_mask != None:
1951 self.value_mask = value_mask
1952 else:
1953 self.value_mask = 0
1954 return
1955
1956 def pack(self):
1957 packed = []
1958 packed.append(struct.pack("!L", self.type_len))
1959 packed.append(struct.pack("!L", self.value))
1960 packed.append(struct.pack("!L", self.value_mask))
1961 return ''.join(packed)
1962
1963 @staticmethod
1964 def unpack(reader):
1965 obj = bsn_udf7_masked()
1966 _type_len = reader.read("!L")[0]
1967 assert(_type_len == 204552)
1968 obj.value = reader.read("!L")[0]
1969 obj.value_mask = reader.read("!L")[0]
1970 return obj
1971
1972 def __eq__(self, other):
1973 if type(self) != type(other): return False
1974 if self.value != other.value: return False
1975 if self.value_mask != other.value_mask: return False
1976 return True
1977
1978 def pretty_print(self, q):
1979 q.text("bsn_udf7_masked {")
1980 with q.group():
1981 with q.indent(2):
1982 q.breakable()
1983 q.text("value = ");
1984 q.text("%#x" % self.value)
1985 q.text(","); q.breakable()
1986 q.text("value_mask = ");
1987 q.text("%#x" % self.value_mask)
1988 q.breakable()
1989 q.text('}')
1990
1991oxm.subtypes[204552] = bsn_udf7_masked
1992
Rich Lane5587ab12014-06-30 11:19:09 -07001993class bsn_vlan_xlate_port_group_id(oxm):
1994 type_len = 205316
1995
1996 def __init__(self, value=None):
1997 if value != None:
1998 self.value = value
1999 else:
2000 self.value = 0
2001 return
2002
2003 def pack(self):
2004 packed = []
2005 packed.append(struct.pack("!L", self.type_len))
2006 packed.append(struct.pack("!L", self.value))
2007 return ''.join(packed)
2008
2009 @staticmethod
2010 def unpack(reader):
2011 obj = bsn_vlan_xlate_port_group_id()
2012 _type_len = reader.read("!L")[0]
2013 assert(_type_len == 205316)
2014 obj.value = reader.read("!L")[0]
2015 return obj
2016
2017 def __eq__(self, other):
2018 if type(self) != type(other): return False
2019 if self.value != other.value: return False
2020 return True
2021
2022 def pretty_print(self, q):
2023 q.text("bsn_vlan_xlate_port_group_id {")
2024 with q.group():
2025 with q.indent(2):
2026 q.breakable()
2027 q.text("value = ");
2028 q.text("%#x" % self.value)
2029 q.breakable()
2030 q.text('}')
2031
2032oxm.subtypes[205316] = bsn_vlan_xlate_port_group_id
2033
2034class bsn_vlan_xlate_port_group_id_masked(oxm):
2035 type_len = 205576
2036
2037 def __init__(self, value=None, value_mask=None):
2038 if value != None:
2039 self.value = value
2040 else:
2041 self.value = 0
2042 if value_mask != None:
2043 self.value_mask = value_mask
2044 else:
2045 self.value_mask = 0
2046 return
2047
2048 def pack(self):
2049 packed = []
2050 packed.append(struct.pack("!L", self.type_len))
2051 packed.append(struct.pack("!L", self.value))
2052 packed.append(struct.pack("!L", self.value_mask))
2053 return ''.join(packed)
2054
2055 @staticmethod
2056 def unpack(reader):
2057 obj = bsn_vlan_xlate_port_group_id_masked()
2058 _type_len = reader.read("!L")[0]
2059 assert(_type_len == 205576)
2060 obj.value = reader.read("!L")[0]
2061 obj.value_mask = reader.read("!L")[0]
2062 return obj
2063
2064 def __eq__(self, other):
2065 if type(self) != type(other): return False
2066 if self.value != other.value: return False
2067 if self.value_mask != other.value_mask: return False
2068 return True
2069
2070 def pretty_print(self, q):
2071 q.text("bsn_vlan_xlate_port_group_id_masked {")
2072 with q.group():
2073 with q.indent(2):
2074 q.breakable()
2075 q.text("value = ");
2076 q.text("%#x" % self.value)
2077 q.text(","); q.breakable()
2078 q.text("value_mask = ");
2079 q.text("%#x" % self.value_mask)
2080 q.breakable()
2081 q.text('}')
2082
2083oxm.subtypes[205576] = bsn_vlan_xlate_port_group_id_masked
2084
Rich Lane7dcdf022013-12-11 14:45:27 -08002085class bsn_vrf(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -08002086 type_len = 197636
2087
2088 def __init__(self, value=None):
2089 if value != None:
2090 self.value = value
2091 else:
2092 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002093 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08002094
2095 def pack(self):
2096 packed = []
2097 packed.append(struct.pack("!L", self.type_len))
2098 packed.append(struct.pack("!L", self.value))
2099 return ''.join(packed)
2100
2101 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002102 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08002103 obj = bsn_vrf()
Rich Laned9e3f7b2013-11-04 11:40:43 -08002104 _type_len = reader.read("!L")[0]
2105 assert(_type_len == 197636)
2106 obj.value = reader.read("!L")[0]
2107 return obj
2108
2109 def __eq__(self, other):
2110 if type(self) != type(other): return False
2111 if self.value != other.value: return False
2112 return True
2113
Rich Laned9e3f7b2013-11-04 11:40:43 -08002114 def pretty_print(self, q):
2115 q.text("bsn_vrf {")
2116 with q.group():
2117 with q.indent(2):
2118 q.breakable()
2119 q.text("value = ");
2120 q.text("%#x" % self.value)
2121 q.breakable()
2122 q.text('}')
2123
Rich Lane7dcdf022013-12-11 14:45:27 -08002124oxm.subtypes[197636] = bsn_vrf
2125
2126class bsn_vrf_masked(oxm):
2127 type_len = 197896
Rich Laned9e3f7b2013-11-04 11:40:43 -08002128
2129 def __init__(self, value=None, value_mask=None):
2130 if value != None:
2131 self.value = value
2132 else:
2133 self.value = 0
2134 if value_mask != None:
2135 self.value_mask = value_mask
2136 else:
2137 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002138 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08002139
2140 def pack(self):
2141 packed = []
2142 packed.append(struct.pack("!L", self.type_len))
2143 packed.append(struct.pack("!L", self.value))
2144 packed.append(struct.pack("!L", self.value_mask))
2145 return ''.join(packed)
2146
2147 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002148 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08002149 obj = bsn_vrf_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08002150 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002151 assert(_type_len == 197896)
Rich Laned9e3f7b2013-11-04 11:40:43 -08002152 obj.value = reader.read("!L")[0]
2153 obj.value_mask = reader.read("!L")[0]
2154 return obj
2155
2156 def __eq__(self, other):
2157 if type(self) != type(other): return False
2158 if self.value != other.value: return False
2159 if self.value_mask != other.value_mask: return False
2160 return True
2161
Rich Laned9e3f7b2013-11-04 11:40:43 -08002162 def pretty_print(self, q):
2163 q.text("bsn_vrf_masked {")
2164 with q.group():
2165 with q.indent(2):
2166 q.breakable()
2167 q.text("value = ");
2168 q.text("%#x" % self.value)
2169 q.text(","); q.breakable()
2170 q.text("value_mask = ");
2171 q.text("%#x" % self.value_mask)
2172 q.breakable()
2173 q.text('}')
2174
Rich Lane7dcdf022013-12-11 14:45:27 -08002175oxm.subtypes[197896] = bsn_vrf_masked
2176
2177class eth_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002178 type_len = 2147485190
Rich Lanec2ee4b82013-04-24 17:12:38 -07002179
2180 def __init__(self, value=None):
2181 if value != None:
2182 self.value = value
2183 else:
2184 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002185 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002186
2187 def pack(self):
2188 packed = []
2189 packed.append(struct.pack("!L", self.type_len))
2190 packed.append(struct.pack("!6B", *self.value))
2191 return ''.join(packed)
2192
2193 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002194 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002195 obj = eth_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07002196 _type_len = reader.read("!L")[0]
2197 assert(_type_len == 2147485190)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002198 obj.value = list(reader.read('!6B'))
2199 return obj
2200
2201 def __eq__(self, other):
2202 if type(self) != type(other): return False
2203 if self.value != other.value: return False
2204 return True
2205
Rich Lanec2ee4b82013-04-24 17:12:38 -07002206 def pretty_print(self, q):
2207 q.text("eth_dst {")
2208 with q.group():
2209 with q.indent(2):
2210 q.breakable()
2211 q.text("value = ");
2212 q.text(util.pretty_mac(self.value))
2213 q.breakable()
2214 q.text('}')
2215
Rich Lane7dcdf022013-12-11 14:45:27 -08002216oxm.subtypes[2147485190] = eth_dst
2217
2218class eth_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002219 type_len = 2147485452
Rich Lanec2ee4b82013-04-24 17:12:38 -07002220
2221 def __init__(self, value=None, value_mask=None):
2222 if value != None:
2223 self.value = value
2224 else:
2225 self.value = [0,0,0,0,0,0]
2226 if value_mask != None:
2227 self.value_mask = value_mask
2228 else:
2229 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002230 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002231
2232 def pack(self):
2233 packed = []
2234 packed.append(struct.pack("!L", self.type_len))
2235 packed.append(struct.pack("!6B", *self.value))
2236 packed.append(struct.pack("!6B", *self.value_mask))
2237 return ''.join(packed)
2238
2239 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002240 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002241 obj = eth_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002242 _type_len = reader.read("!L")[0]
2243 assert(_type_len == 2147485452)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002244 obj.value = list(reader.read('!6B'))
2245 obj.value_mask = list(reader.read('!6B'))
2246 return obj
2247
2248 def __eq__(self, other):
2249 if type(self) != type(other): return False
2250 if self.value != other.value: return False
2251 if self.value_mask != other.value_mask: return False
2252 return True
2253
Rich Lanec2ee4b82013-04-24 17:12:38 -07002254 def pretty_print(self, q):
2255 q.text("eth_dst_masked {")
2256 with q.group():
2257 with q.indent(2):
2258 q.breakable()
2259 q.text("value = ");
2260 q.text(util.pretty_mac(self.value))
2261 q.text(","); q.breakable()
2262 q.text("value_mask = ");
2263 q.text(util.pretty_mac(self.value_mask))
2264 q.breakable()
2265 q.text('}')
2266
Rich Lane7dcdf022013-12-11 14:45:27 -08002267oxm.subtypes[2147485452] = eth_dst_masked
2268
2269class eth_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002270 type_len = 2147485702
Rich Lanec2ee4b82013-04-24 17:12:38 -07002271
2272 def __init__(self, value=None):
2273 if value != None:
2274 self.value = value
2275 else:
2276 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002277 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002278
2279 def pack(self):
2280 packed = []
2281 packed.append(struct.pack("!L", self.type_len))
2282 packed.append(struct.pack("!6B", *self.value))
2283 return ''.join(packed)
2284
2285 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002286 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002287 obj = eth_src()
Dan Talaycof6202252013-07-02 01:00:29 -07002288 _type_len = reader.read("!L")[0]
2289 assert(_type_len == 2147485702)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002290 obj.value = list(reader.read('!6B'))
2291 return obj
2292
2293 def __eq__(self, other):
2294 if type(self) != type(other): return False
2295 if self.value != other.value: return False
2296 return True
2297
Rich Lanec2ee4b82013-04-24 17:12:38 -07002298 def pretty_print(self, q):
2299 q.text("eth_src {")
2300 with q.group():
2301 with q.indent(2):
2302 q.breakable()
2303 q.text("value = ");
2304 q.text(util.pretty_mac(self.value))
2305 q.breakable()
2306 q.text('}')
2307
Rich Lane7dcdf022013-12-11 14:45:27 -08002308oxm.subtypes[2147485702] = eth_src
2309
2310class eth_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002311 type_len = 2147485964
Rich Lanec2ee4b82013-04-24 17:12:38 -07002312
2313 def __init__(self, value=None, value_mask=None):
2314 if value != None:
2315 self.value = value
2316 else:
2317 self.value = [0,0,0,0,0,0]
2318 if value_mask != None:
2319 self.value_mask = value_mask
2320 else:
2321 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002322 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002323
2324 def pack(self):
2325 packed = []
2326 packed.append(struct.pack("!L", self.type_len))
2327 packed.append(struct.pack("!6B", *self.value))
2328 packed.append(struct.pack("!6B", *self.value_mask))
2329 return ''.join(packed)
2330
2331 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002332 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002333 obj = eth_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002334 _type_len = reader.read("!L")[0]
2335 assert(_type_len == 2147485964)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002336 obj.value = list(reader.read('!6B'))
2337 obj.value_mask = list(reader.read('!6B'))
2338 return obj
2339
2340 def __eq__(self, other):
2341 if type(self) != type(other): return False
2342 if self.value != other.value: return False
2343 if self.value_mask != other.value_mask: return False
2344 return True
2345
Rich Lanec2ee4b82013-04-24 17:12:38 -07002346 def pretty_print(self, q):
2347 q.text("eth_src_masked {")
2348 with q.group():
2349 with q.indent(2):
2350 q.breakable()
2351 q.text("value = ");
2352 q.text(util.pretty_mac(self.value))
2353 q.text(","); q.breakable()
2354 q.text("value_mask = ");
2355 q.text(util.pretty_mac(self.value_mask))
2356 q.breakable()
2357 q.text('}')
2358
Rich Lane7dcdf022013-12-11 14:45:27 -08002359oxm.subtypes[2147485964] = eth_src_masked
2360
2361class eth_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002362 type_len = 2147486210
Rich Lanec2ee4b82013-04-24 17:12:38 -07002363
2364 def __init__(self, value=None):
2365 if value != None:
2366 self.value = value
2367 else:
2368 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002369 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002370
2371 def pack(self):
2372 packed = []
2373 packed.append(struct.pack("!L", self.type_len))
2374 packed.append(struct.pack("!H", self.value))
2375 return ''.join(packed)
2376
2377 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002378 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002379 obj = eth_type()
Dan Talaycof6202252013-07-02 01:00:29 -07002380 _type_len = reader.read("!L")[0]
2381 assert(_type_len == 2147486210)
2382 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002383 return obj
2384
2385 def __eq__(self, other):
2386 if type(self) != type(other): return False
2387 if self.value != other.value: return False
2388 return True
2389
Rich Lanec2ee4b82013-04-24 17:12:38 -07002390 def pretty_print(self, q):
2391 q.text("eth_type {")
2392 with q.group():
2393 with q.indent(2):
2394 q.breakable()
2395 q.text("value = ");
2396 q.text("%#x" % self.value)
2397 q.breakable()
2398 q.text('}')
2399
Rich Lane7dcdf022013-12-11 14:45:27 -08002400oxm.subtypes[2147486210] = eth_type
2401
2402class eth_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002403 type_len = 2147486468
Rich Lanec2ee4b82013-04-24 17:12:38 -07002404
2405 def __init__(self, value=None, value_mask=None):
2406 if value != None:
2407 self.value = value
2408 else:
2409 self.value = 0
2410 if value_mask != None:
2411 self.value_mask = value_mask
2412 else:
2413 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002414 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002415
2416 def pack(self):
2417 packed = []
2418 packed.append(struct.pack("!L", self.type_len))
2419 packed.append(struct.pack("!H", self.value))
2420 packed.append(struct.pack("!H", self.value_mask))
2421 return ''.join(packed)
2422
2423 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002424 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002425 obj = eth_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002426 _type_len = reader.read("!L")[0]
2427 assert(_type_len == 2147486468)
2428 obj.value = reader.read("!H")[0]
2429 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002430 return obj
2431
2432 def __eq__(self, other):
2433 if type(self) != type(other): return False
2434 if self.value != other.value: return False
2435 if self.value_mask != other.value_mask: return False
2436 return True
2437
Rich Lanec2ee4b82013-04-24 17:12:38 -07002438 def pretty_print(self, q):
2439 q.text("eth_type_masked {")
2440 with q.group():
2441 with q.indent(2):
2442 q.breakable()
2443 q.text("value = ");
2444 q.text("%#x" % self.value)
2445 q.text(","); q.breakable()
2446 q.text("value_mask = ");
2447 q.text("%#x" % self.value_mask)
2448 q.breakable()
2449 q.text('}')
2450
Rich Lane7dcdf022013-12-11 14:45:27 -08002451oxm.subtypes[2147486468] = eth_type_masked
2452
2453class icmpv4_code(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002454 type_len = 2147493889
Rich Lanec2ee4b82013-04-24 17:12:38 -07002455
2456 def __init__(self, value=None):
2457 if value != None:
2458 self.value = value
2459 else:
2460 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002461 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002462
2463 def pack(self):
2464 packed = []
2465 packed.append(struct.pack("!L", self.type_len))
2466 packed.append(struct.pack("!B", self.value))
2467 return ''.join(packed)
2468
2469 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002470 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002471 obj = icmpv4_code()
Dan Talaycof6202252013-07-02 01:00:29 -07002472 _type_len = reader.read("!L")[0]
2473 assert(_type_len == 2147493889)
2474 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002475 return obj
2476
2477 def __eq__(self, other):
2478 if type(self) != type(other): return False
2479 if self.value != other.value: return False
2480 return True
2481
Rich Lanec2ee4b82013-04-24 17:12:38 -07002482 def pretty_print(self, q):
2483 q.text("icmpv4_code {")
2484 with q.group():
2485 with q.indent(2):
2486 q.breakable()
2487 q.text("value = ");
2488 q.text("%#x" % self.value)
2489 q.breakable()
2490 q.text('}')
2491
Rich Lane7dcdf022013-12-11 14:45:27 -08002492oxm.subtypes[2147493889] = icmpv4_code
2493
2494class icmpv4_code_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002495 type_len = 2147494146
Rich Lanec2ee4b82013-04-24 17:12:38 -07002496
2497 def __init__(self, value=None, value_mask=None):
2498 if value != None:
2499 self.value = value
2500 else:
2501 self.value = 0
2502 if value_mask != None:
2503 self.value_mask = value_mask
2504 else:
2505 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002506 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002507
2508 def pack(self):
2509 packed = []
2510 packed.append(struct.pack("!L", self.type_len))
2511 packed.append(struct.pack("!B", self.value))
2512 packed.append(struct.pack("!B", self.value_mask))
2513 return ''.join(packed)
2514
2515 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002516 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002517 obj = icmpv4_code_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002518 _type_len = reader.read("!L")[0]
2519 assert(_type_len == 2147494146)
2520 obj.value = reader.read("!B")[0]
2521 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002522 return obj
2523
2524 def __eq__(self, other):
2525 if type(self) != type(other): return False
2526 if self.value != other.value: return False
2527 if self.value_mask != other.value_mask: return False
2528 return True
2529
Rich Lanec2ee4b82013-04-24 17:12:38 -07002530 def pretty_print(self, q):
2531 q.text("icmpv4_code_masked {")
2532 with q.group():
2533 with q.indent(2):
2534 q.breakable()
2535 q.text("value = ");
2536 q.text("%#x" % self.value)
2537 q.text(","); q.breakable()
2538 q.text("value_mask = ");
2539 q.text("%#x" % self.value_mask)
2540 q.breakable()
2541 q.text('}')
2542
Rich Lane7dcdf022013-12-11 14:45:27 -08002543oxm.subtypes[2147494146] = icmpv4_code_masked
2544
2545class icmpv4_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002546 type_len = 2147493377
Rich Lanec2ee4b82013-04-24 17:12:38 -07002547
2548 def __init__(self, value=None):
2549 if value != None:
2550 self.value = value
2551 else:
2552 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002553 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002554
2555 def pack(self):
2556 packed = []
2557 packed.append(struct.pack("!L", self.type_len))
2558 packed.append(struct.pack("!B", self.value))
2559 return ''.join(packed)
2560
2561 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002562 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002563 obj = icmpv4_type()
Dan Talaycof6202252013-07-02 01:00:29 -07002564 _type_len = reader.read("!L")[0]
2565 assert(_type_len == 2147493377)
2566 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002567 return obj
2568
2569 def __eq__(self, other):
2570 if type(self) != type(other): return False
2571 if self.value != other.value: return False
2572 return True
2573
Rich Lanec2ee4b82013-04-24 17:12:38 -07002574 def pretty_print(self, q):
2575 q.text("icmpv4_type {")
2576 with q.group():
2577 with q.indent(2):
2578 q.breakable()
2579 q.text("value = ");
2580 q.text("%#x" % self.value)
2581 q.breakable()
2582 q.text('}')
2583
Rich Lane7dcdf022013-12-11 14:45:27 -08002584oxm.subtypes[2147493377] = icmpv4_type
2585
2586class icmpv4_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002587 type_len = 2147493634
Rich Lanec2ee4b82013-04-24 17:12:38 -07002588
2589 def __init__(self, value=None, value_mask=None):
2590 if value != None:
2591 self.value = value
2592 else:
2593 self.value = 0
2594 if value_mask != None:
2595 self.value_mask = value_mask
2596 else:
2597 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002598 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002599
2600 def pack(self):
2601 packed = []
2602 packed.append(struct.pack("!L", self.type_len))
2603 packed.append(struct.pack("!B", self.value))
2604 packed.append(struct.pack("!B", self.value_mask))
2605 return ''.join(packed)
2606
2607 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002608 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002609 obj = icmpv4_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002610 _type_len = reader.read("!L")[0]
2611 assert(_type_len == 2147493634)
2612 obj.value = reader.read("!B")[0]
2613 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002614 return obj
2615
2616 def __eq__(self, other):
2617 if type(self) != type(other): return False
2618 if self.value != other.value: return False
2619 if self.value_mask != other.value_mask: return False
2620 return True
2621
Rich Lanec2ee4b82013-04-24 17:12:38 -07002622 def pretty_print(self, q):
2623 q.text("icmpv4_type_masked {")
2624 with q.group():
2625 with q.indent(2):
2626 q.breakable()
2627 q.text("value = ");
2628 q.text("%#x" % self.value)
2629 q.text(","); q.breakable()
2630 q.text("value_mask = ");
2631 q.text("%#x" % self.value_mask)
2632 q.breakable()
2633 q.text('}')
2634
Rich Lane7dcdf022013-12-11 14:45:27 -08002635oxm.subtypes[2147493634] = icmpv4_type_masked
2636
2637class icmpv6_code(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002638 type_len = 2147499009
Rich Lanec2ee4b82013-04-24 17:12:38 -07002639
2640 def __init__(self, value=None):
2641 if value != None:
2642 self.value = value
2643 else:
2644 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002645 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002646
2647 def pack(self):
2648 packed = []
2649 packed.append(struct.pack("!L", self.type_len))
2650 packed.append(struct.pack("!B", self.value))
2651 return ''.join(packed)
2652
2653 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002654 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002655 obj = icmpv6_code()
Dan Talaycof6202252013-07-02 01:00:29 -07002656 _type_len = reader.read("!L")[0]
2657 assert(_type_len == 2147499009)
2658 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002659 return obj
2660
2661 def __eq__(self, other):
2662 if type(self) != type(other): return False
2663 if self.value != other.value: return False
2664 return True
2665
Rich Lanec2ee4b82013-04-24 17:12:38 -07002666 def pretty_print(self, q):
2667 q.text("icmpv6_code {")
2668 with q.group():
2669 with q.indent(2):
2670 q.breakable()
2671 q.text("value = ");
2672 q.text("%#x" % self.value)
2673 q.breakable()
2674 q.text('}')
2675
Rich Lane7dcdf022013-12-11 14:45:27 -08002676oxm.subtypes[2147499009] = icmpv6_code
2677
2678class icmpv6_code_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002679 type_len = 2147499266
Rich Lanec2ee4b82013-04-24 17:12:38 -07002680
2681 def __init__(self, value=None, value_mask=None):
2682 if value != None:
2683 self.value = value
2684 else:
2685 self.value = 0
2686 if value_mask != None:
2687 self.value_mask = value_mask
2688 else:
2689 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002690 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002691
2692 def pack(self):
2693 packed = []
2694 packed.append(struct.pack("!L", self.type_len))
2695 packed.append(struct.pack("!B", self.value))
2696 packed.append(struct.pack("!B", self.value_mask))
2697 return ''.join(packed)
2698
2699 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002700 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002701 obj = icmpv6_code_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002702 _type_len = reader.read("!L")[0]
2703 assert(_type_len == 2147499266)
2704 obj.value = reader.read("!B")[0]
2705 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002706 return obj
2707
2708 def __eq__(self, other):
2709 if type(self) != type(other): return False
2710 if self.value != other.value: return False
2711 if self.value_mask != other.value_mask: return False
2712 return True
2713
Rich Lanec2ee4b82013-04-24 17:12:38 -07002714 def pretty_print(self, q):
2715 q.text("icmpv6_code_masked {")
2716 with q.group():
2717 with q.indent(2):
2718 q.breakable()
2719 q.text("value = ");
2720 q.text("%#x" % self.value)
2721 q.text(","); q.breakable()
2722 q.text("value_mask = ");
2723 q.text("%#x" % self.value_mask)
2724 q.breakable()
2725 q.text('}')
2726
Rich Lane7dcdf022013-12-11 14:45:27 -08002727oxm.subtypes[2147499266] = icmpv6_code_masked
2728
2729class icmpv6_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002730 type_len = 2147498497
Rich Lanec2ee4b82013-04-24 17:12:38 -07002731
2732 def __init__(self, value=None):
2733 if value != None:
2734 self.value = value
2735 else:
2736 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002737 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002738
2739 def pack(self):
2740 packed = []
2741 packed.append(struct.pack("!L", self.type_len))
2742 packed.append(struct.pack("!B", self.value))
2743 return ''.join(packed)
2744
2745 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002746 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002747 obj = icmpv6_type()
Dan Talaycof6202252013-07-02 01:00:29 -07002748 _type_len = reader.read("!L")[0]
2749 assert(_type_len == 2147498497)
2750 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002751 return obj
2752
2753 def __eq__(self, other):
2754 if type(self) != type(other): return False
2755 if self.value != other.value: return False
2756 return True
2757
Rich Lanec2ee4b82013-04-24 17:12:38 -07002758 def pretty_print(self, q):
2759 q.text("icmpv6_type {")
2760 with q.group():
2761 with q.indent(2):
2762 q.breakable()
2763 q.text("value = ");
2764 q.text("%#x" % self.value)
2765 q.breakable()
2766 q.text('}')
2767
Rich Lane7dcdf022013-12-11 14:45:27 -08002768oxm.subtypes[2147498497] = icmpv6_type
2769
2770class icmpv6_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002771 type_len = 2147498754
Rich Lanec2ee4b82013-04-24 17:12:38 -07002772
2773 def __init__(self, value=None, value_mask=None):
2774 if value != None:
2775 self.value = value
2776 else:
2777 self.value = 0
2778 if value_mask != None:
2779 self.value_mask = value_mask
2780 else:
2781 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002782 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002783
2784 def pack(self):
2785 packed = []
2786 packed.append(struct.pack("!L", self.type_len))
2787 packed.append(struct.pack("!B", self.value))
2788 packed.append(struct.pack("!B", self.value_mask))
2789 return ''.join(packed)
2790
2791 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002792 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002793 obj = icmpv6_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002794 _type_len = reader.read("!L")[0]
2795 assert(_type_len == 2147498754)
2796 obj.value = reader.read("!B")[0]
2797 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002798 return obj
2799
2800 def __eq__(self, other):
2801 if type(self) != type(other): return False
2802 if self.value != other.value: return False
2803 if self.value_mask != other.value_mask: return False
2804 return True
2805
Rich Lanec2ee4b82013-04-24 17:12:38 -07002806 def pretty_print(self, q):
2807 q.text("icmpv6_type_masked {")
2808 with q.group():
2809 with q.indent(2):
2810 q.breakable()
2811 q.text("value = ");
2812 q.text("%#x" % self.value)
2813 q.text(","); q.breakable()
2814 q.text("value_mask = ");
2815 q.text("%#x" % self.value_mask)
2816 q.breakable()
2817 q.text('}')
2818
Rich Lane7dcdf022013-12-11 14:45:27 -08002819oxm.subtypes[2147498754] = icmpv6_type_masked
2820
2821class in_phy_port(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002822 type_len = 2147484164
Rich Lanec2ee4b82013-04-24 17:12:38 -07002823
2824 def __init__(self, value=None):
2825 if value != None:
2826 self.value = value
2827 else:
2828 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002829 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002830
2831 def pack(self):
2832 packed = []
2833 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07002834 packed.append(util.pack_port_no(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002835 return ''.join(packed)
2836
2837 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002838 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002839 obj = in_phy_port()
Dan Talaycof6202252013-07-02 01:00:29 -07002840 _type_len = reader.read("!L")[0]
2841 assert(_type_len == 2147484164)
2842 obj.value = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002843 return obj
2844
2845 def __eq__(self, other):
2846 if type(self) != type(other): return False
2847 if self.value != other.value: return False
2848 return True
2849
Rich Lanec2ee4b82013-04-24 17:12:38 -07002850 def pretty_print(self, q):
2851 q.text("in_phy_port {")
2852 with q.group():
2853 with q.indent(2):
2854 q.breakable()
2855 q.text("value = ");
2856 q.text(util.pretty_port(self.value))
2857 q.breakable()
2858 q.text('}')
2859
Rich Lane7dcdf022013-12-11 14:45:27 -08002860oxm.subtypes[2147484164] = in_phy_port
2861
2862class in_phy_port_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002863 type_len = 2147484424
Rich Lanec2ee4b82013-04-24 17:12:38 -07002864
2865 def __init__(self, value=None, value_mask=None):
2866 if value != None:
2867 self.value = value
2868 else:
2869 self.value = 0
2870 if value_mask != None:
2871 self.value_mask = value_mask
2872 else:
2873 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002874 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002875
2876 def pack(self):
2877 packed = []
2878 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07002879 packed.append(util.pack_port_no(self.value))
2880 packed.append(util.pack_port_no(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002881 return ''.join(packed)
2882
2883 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002884 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002885 obj = in_phy_port_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002886 _type_len = reader.read("!L")[0]
2887 assert(_type_len == 2147484424)
2888 obj.value = util.unpack_port_no(reader)
2889 obj.value_mask = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002890 return obj
2891
2892 def __eq__(self, other):
2893 if type(self) != type(other): return False
2894 if self.value != other.value: return False
2895 if self.value_mask != other.value_mask: return False
2896 return True
2897
Rich Lanec2ee4b82013-04-24 17:12:38 -07002898 def pretty_print(self, q):
2899 q.text("in_phy_port_masked {")
2900 with q.group():
2901 with q.indent(2):
2902 q.breakable()
2903 q.text("value = ");
2904 q.text(util.pretty_port(self.value))
2905 q.text(","); q.breakable()
2906 q.text("value_mask = ");
2907 q.text(util.pretty_port(self.value_mask))
2908 q.breakable()
2909 q.text('}')
2910
Rich Lane7dcdf022013-12-11 14:45:27 -08002911oxm.subtypes[2147484424] = in_phy_port_masked
2912
2913class in_port(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002914 type_len = 2147483652
Rich Lanec2ee4b82013-04-24 17:12:38 -07002915
2916 def __init__(self, value=None):
2917 if value != None:
2918 self.value = value
2919 else:
2920 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002921 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002922
2923 def pack(self):
2924 packed = []
2925 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07002926 packed.append(util.pack_port_no(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002927 return ''.join(packed)
2928
2929 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002930 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002931 obj = in_port()
Dan Talaycof6202252013-07-02 01:00:29 -07002932 _type_len = reader.read("!L")[0]
2933 assert(_type_len == 2147483652)
2934 obj.value = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002935 return obj
2936
2937 def __eq__(self, other):
2938 if type(self) != type(other): return False
2939 if self.value != other.value: return False
2940 return True
2941
Rich Lanec2ee4b82013-04-24 17:12:38 -07002942 def pretty_print(self, q):
2943 q.text("in_port {")
2944 with q.group():
2945 with q.indent(2):
2946 q.breakable()
2947 q.text("value = ");
2948 q.text(util.pretty_port(self.value))
2949 q.breakable()
2950 q.text('}')
2951
Rich Lane7dcdf022013-12-11 14:45:27 -08002952oxm.subtypes[2147483652] = in_port
2953
2954class in_port_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002955 type_len = 2147483912
Rich Lanec2ee4b82013-04-24 17:12:38 -07002956
2957 def __init__(self, value=None, value_mask=None):
2958 if value != None:
2959 self.value = value
2960 else:
2961 self.value = 0
2962 if value_mask != None:
2963 self.value_mask = value_mask
2964 else:
2965 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002966 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002967
2968 def pack(self):
2969 packed = []
2970 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07002971 packed.append(util.pack_port_no(self.value))
2972 packed.append(util.pack_port_no(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002973 return ''.join(packed)
2974
2975 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002976 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002977 obj = in_port_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002978 _type_len = reader.read("!L")[0]
2979 assert(_type_len == 2147483912)
2980 obj.value = util.unpack_port_no(reader)
2981 obj.value_mask = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002982 return obj
2983
2984 def __eq__(self, other):
2985 if type(self) != type(other): return False
2986 if self.value != other.value: return False
2987 if self.value_mask != other.value_mask: return False
2988 return True
2989
Rich Lanec2ee4b82013-04-24 17:12:38 -07002990 def pretty_print(self, q):
2991 q.text("in_port_masked {")
2992 with q.group():
2993 with q.indent(2):
2994 q.breakable()
2995 q.text("value = ");
2996 q.text(util.pretty_port(self.value))
2997 q.text(","); q.breakable()
2998 q.text("value_mask = ");
2999 q.text(util.pretty_port(self.value_mask))
3000 q.breakable()
3001 q.text('}')
3002
Rich Lane7dcdf022013-12-11 14:45:27 -08003003oxm.subtypes[2147483912] = in_port_masked
3004
3005class ip_dscp(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003006 type_len = 2147487745
Rich Lanec2ee4b82013-04-24 17:12:38 -07003007
3008 def __init__(self, value=None):
3009 if value != None:
3010 self.value = value
3011 else:
3012 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003013 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003014
3015 def pack(self):
3016 packed = []
3017 packed.append(struct.pack("!L", self.type_len))
3018 packed.append(struct.pack("!B", self.value))
3019 return ''.join(packed)
3020
3021 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003022 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003023 obj = ip_dscp()
Dan Talaycof6202252013-07-02 01:00:29 -07003024 _type_len = reader.read("!L")[0]
3025 assert(_type_len == 2147487745)
3026 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003027 return obj
3028
3029 def __eq__(self, other):
3030 if type(self) != type(other): return False
3031 if self.value != other.value: return False
3032 return True
3033
Rich Lanec2ee4b82013-04-24 17:12:38 -07003034 def pretty_print(self, q):
3035 q.text("ip_dscp {")
3036 with q.group():
3037 with q.indent(2):
3038 q.breakable()
3039 q.text("value = ");
3040 q.text("%#x" % self.value)
3041 q.breakable()
3042 q.text('}')
3043
Rich Lane7dcdf022013-12-11 14:45:27 -08003044oxm.subtypes[2147487745] = ip_dscp
3045
3046class ip_dscp_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003047 type_len = 2147488002
Rich Lanec2ee4b82013-04-24 17:12:38 -07003048
3049 def __init__(self, value=None, value_mask=None):
3050 if value != None:
3051 self.value = value
3052 else:
3053 self.value = 0
3054 if value_mask != None:
3055 self.value_mask = value_mask
3056 else:
3057 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003058 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003059
3060 def pack(self):
3061 packed = []
3062 packed.append(struct.pack("!L", self.type_len))
3063 packed.append(struct.pack("!B", self.value))
3064 packed.append(struct.pack("!B", self.value_mask))
3065 return ''.join(packed)
3066
3067 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003068 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003069 obj = ip_dscp_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003070 _type_len = reader.read("!L")[0]
3071 assert(_type_len == 2147488002)
3072 obj.value = reader.read("!B")[0]
3073 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003074 return obj
3075
3076 def __eq__(self, other):
3077 if type(self) != type(other): return False
3078 if self.value != other.value: return False
3079 if self.value_mask != other.value_mask: return False
3080 return True
3081
Rich Lanec2ee4b82013-04-24 17:12:38 -07003082 def pretty_print(self, q):
3083 q.text("ip_dscp_masked {")
3084 with q.group():
3085 with q.indent(2):
3086 q.breakable()
3087 q.text("value = ");
3088 q.text("%#x" % self.value)
3089 q.text(","); q.breakable()
3090 q.text("value_mask = ");
3091 q.text("%#x" % self.value_mask)
3092 q.breakable()
3093 q.text('}')
3094
Rich Lane7dcdf022013-12-11 14:45:27 -08003095oxm.subtypes[2147488002] = ip_dscp_masked
3096
3097class ip_ecn(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003098 type_len = 2147488257
Rich Lanec2ee4b82013-04-24 17:12:38 -07003099
3100 def __init__(self, value=None):
3101 if value != None:
3102 self.value = value
3103 else:
3104 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003105 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003106
3107 def pack(self):
3108 packed = []
3109 packed.append(struct.pack("!L", self.type_len))
3110 packed.append(struct.pack("!B", self.value))
3111 return ''.join(packed)
3112
3113 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003114 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003115 obj = ip_ecn()
Dan Talaycof6202252013-07-02 01:00:29 -07003116 _type_len = reader.read("!L")[0]
3117 assert(_type_len == 2147488257)
3118 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003119 return obj
3120
3121 def __eq__(self, other):
3122 if type(self) != type(other): return False
3123 if self.value != other.value: return False
3124 return True
3125
Rich Lanec2ee4b82013-04-24 17:12:38 -07003126 def pretty_print(self, q):
3127 q.text("ip_ecn {")
3128 with q.group():
3129 with q.indent(2):
3130 q.breakable()
3131 q.text("value = ");
3132 q.text("%#x" % self.value)
3133 q.breakable()
3134 q.text('}')
3135
Rich Lane7dcdf022013-12-11 14:45:27 -08003136oxm.subtypes[2147488257] = ip_ecn
3137
3138class ip_ecn_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003139 type_len = 2147488514
Rich Lanec2ee4b82013-04-24 17:12:38 -07003140
3141 def __init__(self, value=None, value_mask=None):
3142 if value != None:
3143 self.value = value
3144 else:
3145 self.value = 0
3146 if value_mask != None:
3147 self.value_mask = value_mask
3148 else:
3149 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003150 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003151
3152 def pack(self):
3153 packed = []
3154 packed.append(struct.pack("!L", self.type_len))
3155 packed.append(struct.pack("!B", self.value))
3156 packed.append(struct.pack("!B", self.value_mask))
3157 return ''.join(packed)
3158
3159 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003160 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003161 obj = ip_ecn_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003162 _type_len = reader.read("!L")[0]
3163 assert(_type_len == 2147488514)
3164 obj.value = reader.read("!B")[0]
3165 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003166 return obj
3167
3168 def __eq__(self, other):
3169 if type(self) != type(other): return False
3170 if self.value != other.value: return False
3171 if self.value_mask != other.value_mask: return False
3172 return True
3173
Rich Lanec2ee4b82013-04-24 17:12:38 -07003174 def pretty_print(self, q):
3175 q.text("ip_ecn_masked {")
3176 with q.group():
3177 with q.indent(2):
3178 q.breakable()
3179 q.text("value = ");
3180 q.text("%#x" % self.value)
3181 q.text(","); q.breakable()
3182 q.text("value_mask = ");
3183 q.text("%#x" % self.value_mask)
3184 q.breakable()
3185 q.text('}')
3186
Rich Lane7dcdf022013-12-11 14:45:27 -08003187oxm.subtypes[2147488514] = ip_ecn_masked
3188
3189class ip_proto(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003190 type_len = 2147488769
Rich Lanec2ee4b82013-04-24 17:12:38 -07003191
3192 def __init__(self, value=None):
3193 if value != None:
3194 self.value = value
3195 else:
3196 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003197 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003198
3199 def pack(self):
3200 packed = []
3201 packed.append(struct.pack("!L", self.type_len))
3202 packed.append(struct.pack("!B", self.value))
3203 return ''.join(packed)
3204
3205 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003206 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003207 obj = ip_proto()
Dan Talaycof6202252013-07-02 01:00:29 -07003208 _type_len = reader.read("!L")[0]
3209 assert(_type_len == 2147488769)
3210 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003211 return obj
3212
3213 def __eq__(self, other):
3214 if type(self) != type(other): return False
3215 if self.value != other.value: return False
3216 return True
3217
Rich Lanec2ee4b82013-04-24 17:12:38 -07003218 def pretty_print(self, q):
3219 q.text("ip_proto {")
3220 with q.group():
3221 with q.indent(2):
3222 q.breakable()
3223 q.text("value = ");
3224 q.text("%#x" % self.value)
3225 q.breakable()
3226 q.text('}')
3227
Rich Lane7dcdf022013-12-11 14:45:27 -08003228oxm.subtypes[2147488769] = ip_proto
3229
3230class ip_proto_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003231 type_len = 2147489026
Rich Lanec2ee4b82013-04-24 17:12:38 -07003232
3233 def __init__(self, value=None, value_mask=None):
3234 if value != None:
3235 self.value = value
3236 else:
3237 self.value = 0
3238 if value_mask != None:
3239 self.value_mask = value_mask
3240 else:
3241 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003242 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003243
3244 def pack(self):
3245 packed = []
3246 packed.append(struct.pack("!L", self.type_len))
3247 packed.append(struct.pack("!B", self.value))
3248 packed.append(struct.pack("!B", self.value_mask))
3249 return ''.join(packed)
3250
3251 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003252 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003253 obj = ip_proto_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003254 _type_len = reader.read("!L")[0]
3255 assert(_type_len == 2147489026)
3256 obj.value = reader.read("!B")[0]
3257 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003258 return obj
3259
3260 def __eq__(self, other):
3261 if type(self) != type(other): return False
3262 if self.value != other.value: return False
3263 if self.value_mask != other.value_mask: return False
3264 return True
3265
Rich Lanec2ee4b82013-04-24 17:12:38 -07003266 def pretty_print(self, q):
3267 q.text("ip_proto_masked {")
3268 with q.group():
3269 with q.indent(2):
3270 q.breakable()
3271 q.text("value = ");
3272 q.text("%#x" % self.value)
3273 q.text(","); q.breakable()
3274 q.text("value_mask = ");
3275 q.text("%#x" % self.value_mask)
3276 q.breakable()
3277 q.text('}')
3278
Rich Lane7dcdf022013-12-11 14:45:27 -08003279oxm.subtypes[2147489026] = ip_proto_masked
3280
3281class ipv4_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003282 type_len = 2147489796
Rich Lanec2ee4b82013-04-24 17:12:38 -07003283
3284 def __init__(self, value=None):
3285 if value != None:
3286 self.value = value
3287 else:
3288 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003289 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003290
3291 def pack(self):
3292 packed = []
3293 packed.append(struct.pack("!L", self.type_len))
3294 packed.append(struct.pack("!L", self.value))
3295 return ''.join(packed)
3296
3297 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003298 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003299 obj = ipv4_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003300 _type_len = reader.read("!L")[0]
3301 assert(_type_len == 2147489796)
3302 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003303 return obj
3304
3305 def __eq__(self, other):
3306 if type(self) != type(other): return False
3307 if self.value != other.value: return False
3308 return True
3309
Rich Lanec2ee4b82013-04-24 17:12:38 -07003310 def pretty_print(self, q):
3311 q.text("ipv4_dst {")
3312 with q.group():
3313 with q.indent(2):
3314 q.breakable()
3315 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07003316 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003317 q.breakable()
3318 q.text('}')
3319
Rich Lane7dcdf022013-12-11 14:45:27 -08003320oxm.subtypes[2147489796] = ipv4_dst
3321
3322class ipv4_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003323 type_len = 2147490056
Rich Lanec2ee4b82013-04-24 17:12:38 -07003324
3325 def __init__(self, value=None, value_mask=None):
3326 if value != None:
3327 self.value = value
3328 else:
3329 self.value = 0
3330 if value_mask != None:
3331 self.value_mask = value_mask
3332 else:
3333 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003334 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003335
3336 def pack(self):
3337 packed = []
3338 packed.append(struct.pack("!L", self.type_len))
3339 packed.append(struct.pack("!L", self.value))
3340 packed.append(struct.pack("!L", self.value_mask))
3341 return ''.join(packed)
3342
3343 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003344 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003345 obj = ipv4_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003346 _type_len = reader.read("!L")[0]
3347 assert(_type_len == 2147490056)
3348 obj.value = reader.read("!L")[0]
3349 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003350 return obj
3351
3352 def __eq__(self, other):
3353 if type(self) != type(other): return False
3354 if self.value != other.value: return False
3355 if self.value_mask != other.value_mask: return False
3356 return True
3357
Rich Lanec2ee4b82013-04-24 17:12:38 -07003358 def pretty_print(self, q):
3359 q.text("ipv4_dst_masked {")
3360 with q.group():
3361 with q.indent(2):
3362 q.breakable()
3363 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07003364 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003365 q.text(","); q.breakable()
3366 q.text("value_mask = ");
Rich Laned53156a2013-08-05 17:17:33 -07003367 q.text(util.pretty_ipv4(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003368 q.breakable()
3369 q.text('}')
3370
Rich Lane7dcdf022013-12-11 14:45:27 -08003371oxm.subtypes[2147490056] = ipv4_dst_masked
3372
3373class ipv4_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003374 type_len = 2147489284
Rich Lanec2ee4b82013-04-24 17:12:38 -07003375
3376 def __init__(self, value=None):
3377 if value != None:
3378 self.value = value
3379 else:
3380 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003381 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003382
3383 def pack(self):
3384 packed = []
3385 packed.append(struct.pack("!L", self.type_len))
3386 packed.append(struct.pack("!L", self.value))
3387 return ''.join(packed)
3388
3389 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003390 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003391 obj = ipv4_src()
Dan Talaycof6202252013-07-02 01:00:29 -07003392 _type_len = reader.read("!L")[0]
3393 assert(_type_len == 2147489284)
3394 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003395 return obj
3396
3397 def __eq__(self, other):
3398 if type(self) != type(other): return False
3399 if self.value != other.value: return False
3400 return True
3401
Rich Lanec2ee4b82013-04-24 17:12:38 -07003402 def pretty_print(self, q):
3403 q.text("ipv4_src {")
3404 with q.group():
3405 with q.indent(2):
3406 q.breakable()
3407 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07003408 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003409 q.breakable()
3410 q.text('}')
3411
Rich Lane7dcdf022013-12-11 14:45:27 -08003412oxm.subtypes[2147489284] = ipv4_src
3413
3414class ipv4_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003415 type_len = 2147489544
Rich Lanec2ee4b82013-04-24 17:12:38 -07003416
3417 def __init__(self, value=None, value_mask=None):
3418 if value != None:
3419 self.value = value
3420 else:
3421 self.value = 0
3422 if value_mask != None:
3423 self.value_mask = value_mask
3424 else:
3425 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003426 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003427
3428 def pack(self):
3429 packed = []
3430 packed.append(struct.pack("!L", self.type_len))
3431 packed.append(struct.pack("!L", self.value))
3432 packed.append(struct.pack("!L", self.value_mask))
3433 return ''.join(packed)
3434
3435 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003436 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003437 obj = ipv4_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003438 _type_len = reader.read("!L")[0]
3439 assert(_type_len == 2147489544)
3440 obj.value = reader.read("!L")[0]
3441 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003442 return obj
3443
3444 def __eq__(self, other):
3445 if type(self) != type(other): return False
3446 if self.value != other.value: return False
3447 if self.value_mask != other.value_mask: return False
3448 return True
3449
Rich Lanec2ee4b82013-04-24 17:12:38 -07003450 def pretty_print(self, q):
3451 q.text("ipv4_src_masked {")
3452 with q.group():
3453 with q.indent(2):
3454 q.breakable()
3455 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07003456 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003457 q.text(","); q.breakable()
3458 q.text("value_mask = ");
Rich Laned53156a2013-08-05 17:17:33 -07003459 q.text(util.pretty_ipv4(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003460 q.breakable()
3461 q.text('}')
3462
Rich Lane7dcdf022013-12-11 14:45:27 -08003463oxm.subtypes[2147489544] = ipv4_src_masked
3464
3465class ipv6_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003466 type_len = 2147497488
Rich Lanec2ee4b82013-04-24 17:12:38 -07003467
3468 def __init__(self, value=None):
3469 if value != None:
3470 self.value = value
3471 else:
3472 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 -08003473 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003474
3475 def pack(self):
3476 packed = []
3477 packed.append(struct.pack("!L", self.type_len))
3478 packed.append(struct.pack("!16s", self.value))
3479 return ''.join(packed)
3480
3481 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003482 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003483 obj = ipv6_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003484 _type_len = reader.read("!L")[0]
3485 assert(_type_len == 2147497488)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003486 obj.value = reader.read('!16s')[0]
3487 return obj
3488
3489 def __eq__(self, other):
3490 if type(self) != type(other): return False
3491 if self.value != other.value: return False
3492 return True
3493
Rich Lanec2ee4b82013-04-24 17:12:38 -07003494 def pretty_print(self, q):
3495 q.text("ipv6_dst {")
3496 with q.group():
3497 with q.indent(2):
3498 q.breakable()
3499 q.text("value = ");
3500 q.pp(self.value)
3501 q.breakable()
3502 q.text('}')
3503
Rich Lane7dcdf022013-12-11 14:45:27 -08003504oxm.subtypes[2147497488] = ipv6_dst
3505
3506class ipv6_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003507 type_len = 2147497760
Rich Lanec2ee4b82013-04-24 17:12:38 -07003508
3509 def __init__(self, value=None, value_mask=None):
3510 if value != None:
3511 self.value = value
3512 else:
3513 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
3514 if value_mask != None:
3515 self.value_mask = value_mask
3516 else:
3517 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 -08003518 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003519
3520 def pack(self):
3521 packed = []
3522 packed.append(struct.pack("!L", self.type_len))
3523 packed.append(struct.pack("!16s", self.value))
3524 packed.append(struct.pack("!16s", self.value_mask))
3525 return ''.join(packed)
3526
3527 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003528 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003529 obj = ipv6_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003530 _type_len = reader.read("!L")[0]
3531 assert(_type_len == 2147497760)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003532 obj.value = reader.read('!16s')[0]
3533 obj.value_mask = reader.read('!16s')[0]
3534 return obj
3535
3536 def __eq__(self, other):
3537 if type(self) != type(other): return False
3538 if self.value != other.value: return False
3539 if self.value_mask != other.value_mask: return False
3540 return True
3541
Rich Lanec2ee4b82013-04-24 17:12:38 -07003542 def pretty_print(self, q):
3543 q.text("ipv6_dst_masked {")
3544 with q.group():
3545 with q.indent(2):
3546 q.breakable()
3547 q.text("value = ");
3548 q.pp(self.value)
3549 q.text(","); q.breakable()
3550 q.text("value_mask = ");
3551 q.pp(self.value_mask)
3552 q.breakable()
3553 q.text('}')
3554
Rich Lane7dcdf022013-12-11 14:45:27 -08003555oxm.subtypes[2147497760] = ipv6_dst_masked
3556
3557class ipv6_flabel(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003558 type_len = 2147497988
Rich Lanec2ee4b82013-04-24 17:12:38 -07003559
3560 def __init__(self, value=None):
3561 if value != None:
3562 self.value = value
3563 else:
3564 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003565 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003566
3567 def pack(self):
3568 packed = []
3569 packed.append(struct.pack("!L", self.type_len))
3570 packed.append(struct.pack("!L", self.value))
3571 return ''.join(packed)
3572
3573 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003574 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003575 obj = ipv6_flabel()
Dan Talaycof6202252013-07-02 01:00:29 -07003576 _type_len = reader.read("!L")[0]
3577 assert(_type_len == 2147497988)
3578 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003579 return obj
3580
3581 def __eq__(self, other):
3582 if type(self) != type(other): return False
3583 if self.value != other.value: return False
3584 return True
3585
Rich Lanec2ee4b82013-04-24 17:12:38 -07003586 def pretty_print(self, q):
3587 q.text("ipv6_flabel {")
3588 with q.group():
3589 with q.indent(2):
3590 q.breakable()
3591 q.text("value = ");
3592 q.text("%#x" % self.value)
3593 q.breakable()
3594 q.text('}')
3595
Rich Lane7dcdf022013-12-11 14:45:27 -08003596oxm.subtypes[2147497988] = ipv6_flabel
3597
3598class ipv6_flabel_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003599 type_len = 2147498248
Rich Lanec2ee4b82013-04-24 17:12:38 -07003600
3601 def __init__(self, value=None, value_mask=None):
3602 if value != None:
3603 self.value = value
3604 else:
3605 self.value = 0
3606 if value_mask != None:
3607 self.value_mask = value_mask
3608 else:
3609 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003610 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003611
3612 def pack(self):
3613 packed = []
3614 packed.append(struct.pack("!L", self.type_len))
3615 packed.append(struct.pack("!L", self.value))
3616 packed.append(struct.pack("!L", self.value_mask))
3617 return ''.join(packed)
3618
3619 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003620 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003621 obj = ipv6_flabel_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003622 _type_len = reader.read("!L")[0]
3623 assert(_type_len == 2147498248)
3624 obj.value = reader.read("!L")[0]
3625 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003626 return obj
3627
3628 def __eq__(self, other):
3629 if type(self) != type(other): return False
3630 if self.value != other.value: return False
3631 if self.value_mask != other.value_mask: return False
3632 return True
3633
Rich Lanec2ee4b82013-04-24 17:12:38 -07003634 def pretty_print(self, q):
3635 q.text("ipv6_flabel_masked {")
3636 with q.group():
3637 with q.indent(2):
3638 q.breakable()
3639 q.text("value = ");
3640 q.text("%#x" % self.value)
3641 q.text(","); q.breakable()
3642 q.text("value_mask = ");
3643 q.text("%#x" % self.value_mask)
3644 q.breakable()
3645 q.text('}')
3646
Rich Lane7dcdf022013-12-11 14:45:27 -08003647oxm.subtypes[2147498248] = ipv6_flabel_masked
3648
3649class ipv6_nd_sll(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003650 type_len = 2147500038
Rich Lanec2ee4b82013-04-24 17:12:38 -07003651
3652 def __init__(self, value=None):
3653 if value != None:
3654 self.value = value
3655 else:
3656 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08003657 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003658
3659 def pack(self):
3660 packed = []
3661 packed.append(struct.pack("!L", self.type_len))
3662 packed.append(struct.pack("!6B", *self.value))
3663 return ''.join(packed)
3664
3665 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003666 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003667 obj = ipv6_nd_sll()
Dan Talaycof6202252013-07-02 01:00:29 -07003668 _type_len = reader.read("!L")[0]
3669 assert(_type_len == 2147500038)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003670 obj.value = list(reader.read('!6B'))
3671 return obj
3672
3673 def __eq__(self, other):
3674 if type(self) != type(other): return False
3675 if self.value != other.value: return False
3676 return True
3677
Rich Lanec2ee4b82013-04-24 17:12:38 -07003678 def pretty_print(self, q):
3679 q.text("ipv6_nd_sll {")
3680 with q.group():
3681 with q.indent(2):
3682 q.breakable()
3683 q.text("value = ");
3684 q.text(util.pretty_mac(self.value))
3685 q.breakable()
3686 q.text('}')
3687
Rich Lane7dcdf022013-12-11 14:45:27 -08003688oxm.subtypes[2147500038] = ipv6_nd_sll
3689
3690class ipv6_nd_sll_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003691 type_len = 2147500300
Rich Lanec2ee4b82013-04-24 17:12:38 -07003692
3693 def __init__(self, value=None, value_mask=None):
3694 if value != None:
3695 self.value = value
3696 else:
3697 self.value = [0,0,0,0,0,0]
3698 if value_mask != None:
3699 self.value_mask = value_mask
3700 else:
3701 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08003702 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003703
3704 def pack(self):
3705 packed = []
3706 packed.append(struct.pack("!L", self.type_len))
3707 packed.append(struct.pack("!6B", *self.value))
3708 packed.append(struct.pack("!6B", *self.value_mask))
3709 return ''.join(packed)
3710
3711 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003712 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003713 obj = ipv6_nd_sll_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003714 _type_len = reader.read("!L")[0]
3715 assert(_type_len == 2147500300)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003716 obj.value = list(reader.read('!6B'))
3717 obj.value_mask = list(reader.read('!6B'))
3718 return obj
3719
3720 def __eq__(self, other):
3721 if type(self) != type(other): return False
3722 if self.value != other.value: return False
3723 if self.value_mask != other.value_mask: return False
3724 return True
3725
Rich Lanec2ee4b82013-04-24 17:12:38 -07003726 def pretty_print(self, q):
3727 q.text("ipv6_nd_sll_masked {")
3728 with q.group():
3729 with q.indent(2):
3730 q.breakable()
3731 q.text("value = ");
3732 q.text(util.pretty_mac(self.value))
3733 q.text(","); q.breakable()
3734 q.text("value_mask = ");
3735 q.text(util.pretty_mac(self.value_mask))
3736 q.breakable()
3737 q.text('}')
3738
Rich Lane7dcdf022013-12-11 14:45:27 -08003739oxm.subtypes[2147500300] = ipv6_nd_sll_masked
3740
3741class ipv6_nd_target(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003742 type_len = 2147499536
Rich Lanec2ee4b82013-04-24 17:12:38 -07003743
3744 def __init__(self, value=None):
3745 if value != None:
3746 self.value = value
3747 else:
3748 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 -08003749 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003750
3751 def pack(self):
3752 packed = []
3753 packed.append(struct.pack("!L", self.type_len))
3754 packed.append(struct.pack("!16s", self.value))
3755 return ''.join(packed)
3756
3757 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003758 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003759 obj = ipv6_nd_target()
Dan Talaycof6202252013-07-02 01:00:29 -07003760 _type_len = reader.read("!L")[0]
3761 assert(_type_len == 2147499536)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003762 obj.value = reader.read('!16s')[0]
3763 return obj
3764
3765 def __eq__(self, other):
3766 if type(self) != type(other): return False
3767 if self.value != other.value: return False
3768 return True
3769
Rich Lanec2ee4b82013-04-24 17:12:38 -07003770 def pretty_print(self, q):
3771 q.text("ipv6_nd_target {")
3772 with q.group():
3773 with q.indent(2):
3774 q.breakable()
3775 q.text("value = ");
3776 q.pp(self.value)
3777 q.breakable()
3778 q.text('}')
3779
Rich Lane7dcdf022013-12-11 14:45:27 -08003780oxm.subtypes[2147499536] = ipv6_nd_target
3781
3782class ipv6_nd_target_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003783 type_len = 2147499808
Rich Lanec2ee4b82013-04-24 17:12:38 -07003784
3785 def __init__(self, value=None, value_mask=None):
3786 if value != None:
3787 self.value = value
3788 else:
3789 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
3790 if value_mask != None:
3791 self.value_mask = value_mask
3792 else:
3793 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 -08003794 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003795
3796 def pack(self):
3797 packed = []
3798 packed.append(struct.pack("!L", self.type_len))
3799 packed.append(struct.pack("!16s", self.value))
3800 packed.append(struct.pack("!16s", self.value_mask))
3801 return ''.join(packed)
3802
3803 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003804 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003805 obj = ipv6_nd_target_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003806 _type_len = reader.read("!L")[0]
3807 assert(_type_len == 2147499808)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003808 obj.value = reader.read('!16s')[0]
3809 obj.value_mask = reader.read('!16s')[0]
3810 return obj
3811
3812 def __eq__(self, other):
3813 if type(self) != type(other): return False
3814 if self.value != other.value: return False
3815 if self.value_mask != other.value_mask: return False
3816 return True
3817
Rich Lanec2ee4b82013-04-24 17:12:38 -07003818 def pretty_print(self, q):
3819 q.text("ipv6_nd_target_masked {")
3820 with q.group():
3821 with q.indent(2):
3822 q.breakable()
3823 q.text("value = ");
3824 q.pp(self.value)
3825 q.text(","); q.breakable()
3826 q.text("value_mask = ");
3827 q.pp(self.value_mask)
3828 q.breakable()
3829 q.text('}')
3830
Rich Lane7dcdf022013-12-11 14:45:27 -08003831oxm.subtypes[2147499808] = ipv6_nd_target_masked
3832
3833class ipv6_nd_tll(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003834 type_len = 2147500550
Rich Lanec2ee4b82013-04-24 17:12:38 -07003835
3836 def __init__(self, value=None):
3837 if value != None:
3838 self.value = value
3839 else:
3840 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08003841 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003842
3843 def pack(self):
3844 packed = []
3845 packed.append(struct.pack("!L", self.type_len))
3846 packed.append(struct.pack("!6B", *self.value))
3847 return ''.join(packed)
3848
3849 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003850 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003851 obj = ipv6_nd_tll()
Dan Talaycof6202252013-07-02 01:00:29 -07003852 _type_len = reader.read("!L")[0]
3853 assert(_type_len == 2147500550)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003854 obj.value = list(reader.read('!6B'))
3855 return obj
3856
3857 def __eq__(self, other):
3858 if type(self) != type(other): return False
3859 if self.value != other.value: return False
3860 return True
3861
Rich Lanec2ee4b82013-04-24 17:12:38 -07003862 def pretty_print(self, q):
3863 q.text("ipv6_nd_tll {")
3864 with q.group():
3865 with q.indent(2):
3866 q.breakable()
3867 q.text("value = ");
3868 q.text(util.pretty_mac(self.value))
3869 q.breakable()
3870 q.text('}')
3871
Rich Lane7dcdf022013-12-11 14:45:27 -08003872oxm.subtypes[2147500550] = ipv6_nd_tll
3873
3874class ipv6_nd_tll_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003875 type_len = 2147500812
Rich Lanec2ee4b82013-04-24 17:12:38 -07003876
3877 def __init__(self, value=None, value_mask=None):
3878 if value != None:
3879 self.value = value
3880 else:
3881 self.value = [0,0,0,0,0,0]
3882 if value_mask != None:
3883 self.value_mask = value_mask
3884 else:
3885 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08003886 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003887
3888 def pack(self):
3889 packed = []
3890 packed.append(struct.pack("!L", self.type_len))
3891 packed.append(struct.pack("!6B", *self.value))
3892 packed.append(struct.pack("!6B", *self.value_mask))
3893 return ''.join(packed)
3894
3895 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003896 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003897 obj = ipv6_nd_tll_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003898 _type_len = reader.read("!L")[0]
3899 assert(_type_len == 2147500812)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003900 obj.value = list(reader.read('!6B'))
3901 obj.value_mask = list(reader.read('!6B'))
3902 return obj
3903
3904 def __eq__(self, other):
3905 if type(self) != type(other): return False
3906 if self.value != other.value: return False
3907 if self.value_mask != other.value_mask: return False
3908 return True
3909
Rich Lanec2ee4b82013-04-24 17:12:38 -07003910 def pretty_print(self, q):
3911 q.text("ipv6_nd_tll_masked {")
3912 with q.group():
3913 with q.indent(2):
3914 q.breakable()
3915 q.text("value = ");
3916 q.text(util.pretty_mac(self.value))
3917 q.text(","); q.breakable()
3918 q.text("value_mask = ");
3919 q.text(util.pretty_mac(self.value_mask))
3920 q.breakable()
3921 q.text('}')
3922
Rich Lane7dcdf022013-12-11 14:45:27 -08003923oxm.subtypes[2147500812] = ipv6_nd_tll_masked
3924
3925class ipv6_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003926 type_len = 2147496976
Rich Lanec2ee4b82013-04-24 17:12:38 -07003927
3928 def __init__(self, value=None):
3929 if value != None:
3930 self.value = value
3931 else:
3932 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 -08003933 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003934
3935 def pack(self):
3936 packed = []
3937 packed.append(struct.pack("!L", self.type_len))
3938 packed.append(struct.pack("!16s", self.value))
3939 return ''.join(packed)
3940
3941 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003942 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003943 obj = ipv6_src()
Dan Talaycof6202252013-07-02 01:00:29 -07003944 _type_len = reader.read("!L")[0]
3945 assert(_type_len == 2147496976)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003946 obj.value = reader.read('!16s')[0]
3947 return obj
3948
3949 def __eq__(self, other):
3950 if type(self) != type(other): return False
3951 if self.value != other.value: return False
3952 return True
3953
Rich Lanec2ee4b82013-04-24 17:12:38 -07003954 def pretty_print(self, q):
3955 q.text("ipv6_src {")
3956 with q.group():
3957 with q.indent(2):
3958 q.breakable()
3959 q.text("value = ");
3960 q.pp(self.value)
3961 q.breakable()
3962 q.text('}')
3963
Rich Lane7dcdf022013-12-11 14:45:27 -08003964oxm.subtypes[2147496976] = ipv6_src
3965
3966class ipv6_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003967 type_len = 2147497248
Rich Lanec2ee4b82013-04-24 17:12:38 -07003968
3969 def __init__(self, value=None, value_mask=None):
3970 if value != None:
3971 self.value = value
3972 else:
3973 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
3974 if value_mask != None:
3975 self.value_mask = value_mask
3976 else:
3977 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 -08003978 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003979
3980 def pack(self):
3981 packed = []
3982 packed.append(struct.pack("!L", self.type_len))
3983 packed.append(struct.pack("!16s", self.value))
3984 packed.append(struct.pack("!16s", self.value_mask))
3985 return ''.join(packed)
3986
3987 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003988 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003989 obj = ipv6_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003990 _type_len = reader.read("!L")[0]
3991 assert(_type_len == 2147497248)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003992 obj.value = reader.read('!16s')[0]
3993 obj.value_mask = reader.read('!16s')[0]
3994 return obj
3995
3996 def __eq__(self, other):
3997 if type(self) != type(other): return False
3998 if self.value != other.value: return False
3999 if self.value_mask != other.value_mask: return False
4000 return True
4001
Rich Lanec2ee4b82013-04-24 17:12:38 -07004002 def pretty_print(self, q):
4003 q.text("ipv6_src_masked {")
4004 with q.group():
4005 with q.indent(2):
4006 q.breakable()
4007 q.text("value = ");
4008 q.pp(self.value)
4009 q.text(","); q.breakable()
4010 q.text("value_mask = ");
4011 q.pp(self.value_mask)
4012 q.breakable()
4013 q.text('}')
4014
Rich Lane7dcdf022013-12-11 14:45:27 -08004015oxm.subtypes[2147497248] = ipv6_src_masked
4016
4017class metadata(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004018 type_len = 2147484680
Rich Lanec2ee4b82013-04-24 17:12:38 -07004019
4020 def __init__(self, value=None):
4021 if value != None:
4022 self.value = value
4023 else:
4024 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004025 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004026
4027 def pack(self):
4028 packed = []
4029 packed.append(struct.pack("!L", self.type_len))
4030 packed.append(struct.pack("!Q", self.value))
4031 return ''.join(packed)
4032
4033 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004034 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004035 obj = metadata()
Dan Talaycof6202252013-07-02 01:00:29 -07004036 _type_len = reader.read("!L")[0]
4037 assert(_type_len == 2147484680)
4038 obj.value = reader.read("!Q")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004039 return obj
4040
4041 def __eq__(self, other):
4042 if type(self) != type(other): return False
4043 if self.value != other.value: return False
4044 return True
4045
Rich Lanec2ee4b82013-04-24 17:12:38 -07004046 def pretty_print(self, q):
4047 q.text("metadata {")
4048 with q.group():
4049 with q.indent(2):
4050 q.breakable()
4051 q.text("value = ");
4052 q.text("%#x" % self.value)
4053 q.breakable()
4054 q.text('}')
4055
Rich Lane7dcdf022013-12-11 14:45:27 -08004056oxm.subtypes[2147484680] = metadata
4057
4058class metadata_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004059 type_len = 2147484944
Rich Lanec2ee4b82013-04-24 17:12:38 -07004060
4061 def __init__(self, value=None, value_mask=None):
4062 if value != None:
4063 self.value = value
4064 else:
4065 self.value = 0
4066 if value_mask != None:
4067 self.value_mask = value_mask
4068 else:
4069 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004070 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004071
4072 def pack(self):
4073 packed = []
4074 packed.append(struct.pack("!L", self.type_len))
4075 packed.append(struct.pack("!Q", self.value))
4076 packed.append(struct.pack("!Q", self.value_mask))
4077 return ''.join(packed)
4078
4079 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004080 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004081 obj = metadata_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004082 _type_len = reader.read("!L")[0]
4083 assert(_type_len == 2147484944)
4084 obj.value = reader.read("!Q")[0]
4085 obj.value_mask = reader.read("!Q")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004086 return obj
4087
4088 def __eq__(self, other):
4089 if type(self) != type(other): return False
4090 if self.value != other.value: return False
4091 if self.value_mask != other.value_mask: return False
4092 return True
4093
Rich Lanec2ee4b82013-04-24 17:12:38 -07004094 def pretty_print(self, q):
4095 q.text("metadata_masked {")
4096 with q.group():
4097 with q.indent(2):
4098 q.breakable()
4099 q.text("value = ");
4100 q.text("%#x" % self.value)
4101 q.text(","); q.breakable()
4102 q.text("value_mask = ");
4103 q.text("%#x" % self.value_mask)
4104 q.breakable()
4105 q.text('}')
4106
Rich Lane7dcdf022013-12-11 14:45:27 -08004107oxm.subtypes[2147484944] = metadata_masked
4108
4109class mpls_label(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004110 type_len = 2147501060
Rich Lanec2ee4b82013-04-24 17:12:38 -07004111
4112 def __init__(self, value=None):
4113 if value != None:
4114 self.value = value
4115 else:
4116 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004117 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004118
4119 def pack(self):
4120 packed = []
4121 packed.append(struct.pack("!L", self.type_len))
4122 packed.append(struct.pack("!L", self.value))
4123 return ''.join(packed)
4124
4125 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004126 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004127 obj = mpls_label()
Dan Talaycof6202252013-07-02 01:00:29 -07004128 _type_len = reader.read("!L")[0]
4129 assert(_type_len == 2147501060)
4130 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004131 return obj
4132
4133 def __eq__(self, other):
4134 if type(self) != type(other): return False
4135 if self.value != other.value: return False
4136 return True
4137
Rich Lanec2ee4b82013-04-24 17:12:38 -07004138 def pretty_print(self, q):
4139 q.text("mpls_label {")
4140 with q.group():
4141 with q.indent(2):
4142 q.breakable()
4143 q.text("value = ");
4144 q.text("%#x" % self.value)
4145 q.breakable()
4146 q.text('}')
4147
Rich Lane7dcdf022013-12-11 14:45:27 -08004148oxm.subtypes[2147501060] = mpls_label
4149
4150class mpls_label_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004151 type_len = 2147501320
Rich Lanec2ee4b82013-04-24 17:12:38 -07004152
4153 def __init__(self, value=None, value_mask=None):
4154 if value != None:
4155 self.value = value
4156 else:
4157 self.value = 0
4158 if value_mask != None:
4159 self.value_mask = value_mask
4160 else:
4161 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004162 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004163
4164 def pack(self):
4165 packed = []
4166 packed.append(struct.pack("!L", self.type_len))
4167 packed.append(struct.pack("!L", self.value))
4168 packed.append(struct.pack("!L", self.value_mask))
4169 return ''.join(packed)
4170
4171 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004172 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004173 obj = mpls_label_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004174 _type_len = reader.read("!L")[0]
4175 assert(_type_len == 2147501320)
4176 obj.value = reader.read("!L")[0]
4177 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004178 return obj
4179
4180 def __eq__(self, other):
4181 if type(self) != type(other): return False
4182 if self.value != other.value: return False
4183 if self.value_mask != other.value_mask: return False
4184 return True
4185
Rich Lanec2ee4b82013-04-24 17:12:38 -07004186 def pretty_print(self, q):
4187 q.text("mpls_label_masked {")
4188 with q.group():
4189 with q.indent(2):
4190 q.breakable()
4191 q.text("value = ");
4192 q.text("%#x" % self.value)
4193 q.text(","); q.breakable()
4194 q.text("value_mask = ");
4195 q.text("%#x" % self.value_mask)
4196 q.breakable()
4197 q.text('}')
4198
Rich Lane7dcdf022013-12-11 14:45:27 -08004199oxm.subtypes[2147501320] = mpls_label_masked
4200
4201class mpls_tc(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004202 type_len = 2147501569
Rich Lanec2ee4b82013-04-24 17:12:38 -07004203
4204 def __init__(self, value=None):
4205 if value != None:
4206 self.value = value
4207 else:
4208 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004209 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004210
4211 def pack(self):
4212 packed = []
4213 packed.append(struct.pack("!L", self.type_len))
4214 packed.append(struct.pack("!B", self.value))
4215 return ''.join(packed)
4216
4217 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004218 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004219 obj = mpls_tc()
Dan Talaycof6202252013-07-02 01:00:29 -07004220 _type_len = reader.read("!L")[0]
4221 assert(_type_len == 2147501569)
4222 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004223 return obj
4224
4225 def __eq__(self, other):
4226 if type(self) != type(other): return False
4227 if self.value != other.value: return False
4228 return True
4229
Rich Lanec2ee4b82013-04-24 17:12:38 -07004230 def pretty_print(self, q):
4231 q.text("mpls_tc {")
4232 with q.group():
4233 with q.indent(2):
4234 q.breakable()
4235 q.text("value = ");
4236 q.text("%#x" % self.value)
4237 q.breakable()
4238 q.text('}')
4239
Rich Lane7dcdf022013-12-11 14:45:27 -08004240oxm.subtypes[2147501569] = mpls_tc
4241
4242class mpls_tc_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004243 type_len = 2147501826
Rich Lanec2ee4b82013-04-24 17:12:38 -07004244
4245 def __init__(self, value=None, value_mask=None):
4246 if value != None:
4247 self.value = value
4248 else:
4249 self.value = 0
4250 if value_mask != None:
4251 self.value_mask = value_mask
4252 else:
4253 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004254 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004255
4256 def pack(self):
4257 packed = []
4258 packed.append(struct.pack("!L", self.type_len))
4259 packed.append(struct.pack("!B", self.value))
4260 packed.append(struct.pack("!B", self.value_mask))
4261 return ''.join(packed)
4262
4263 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004264 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004265 obj = mpls_tc_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004266 _type_len = reader.read("!L")[0]
4267 assert(_type_len == 2147501826)
4268 obj.value = reader.read("!B")[0]
4269 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004270 return obj
4271
4272 def __eq__(self, other):
4273 if type(self) != type(other): return False
4274 if self.value != other.value: return False
4275 if self.value_mask != other.value_mask: return False
4276 return True
4277
Rich Lanec2ee4b82013-04-24 17:12:38 -07004278 def pretty_print(self, q):
4279 q.text("mpls_tc_masked {")
4280 with q.group():
4281 with q.indent(2):
4282 q.breakable()
4283 q.text("value = ");
4284 q.text("%#x" % self.value)
4285 q.text(","); q.breakable()
4286 q.text("value_mask = ");
4287 q.text("%#x" % self.value_mask)
4288 q.breakable()
4289 q.text('}')
4290
Rich Lane7dcdf022013-12-11 14:45:27 -08004291oxm.subtypes[2147501826] = mpls_tc_masked
4292
4293class sctp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004294 type_len = 2147492866
Rich Lanec2ee4b82013-04-24 17:12:38 -07004295
4296 def __init__(self, value=None):
4297 if value != None:
4298 self.value = value
4299 else:
4300 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004301 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004302
4303 def pack(self):
4304 packed = []
4305 packed.append(struct.pack("!L", self.type_len))
4306 packed.append(struct.pack("!H", self.value))
4307 return ''.join(packed)
4308
4309 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004310 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004311 obj = sctp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07004312 _type_len = reader.read("!L")[0]
4313 assert(_type_len == 2147492866)
4314 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004315 return obj
4316
4317 def __eq__(self, other):
4318 if type(self) != type(other): return False
4319 if self.value != other.value: return False
4320 return True
4321
Rich Lanec2ee4b82013-04-24 17:12:38 -07004322 def pretty_print(self, q):
4323 q.text("sctp_dst {")
4324 with q.group():
4325 with q.indent(2):
4326 q.breakable()
4327 q.text("value = ");
4328 q.text("%#x" % self.value)
4329 q.breakable()
4330 q.text('}')
4331
Rich Lane7dcdf022013-12-11 14:45:27 -08004332oxm.subtypes[2147492866] = sctp_dst
4333
4334class sctp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004335 type_len = 2147493124
Rich Lanec2ee4b82013-04-24 17:12:38 -07004336
4337 def __init__(self, value=None, value_mask=None):
4338 if value != None:
4339 self.value = value
4340 else:
4341 self.value = 0
4342 if value_mask != None:
4343 self.value_mask = value_mask
4344 else:
4345 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004346 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004347
4348 def pack(self):
4349 packed = []
4350 packed.append(struct.pack("!L", self.type_len))
4351 packed.append(struct.pack("!H", self.value))
4352 packed.append(struct.pack("!H", self.value_mask))
4353 return ''.join(packed)
4354
4355 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004356 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004357 obj = sctp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004358 _type_len = reader.read("!L")[0]
4359 assert(_type_len == 2147493124)
4360 obj.value = reader.read("!H")[0]
4361 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004362 return obj
4363
4364 def __eq__(self, other):
4365 if type(self) != type(other): return False
4366 if self.value != other.value: return False
4367 if self.value_mask != other.value_mask: return False
4368 return True
4369
Rich Lanec2ee4b82013-04-24 17:12:38 -07004370 def pretty_print(self, q):
4371 q.text("sctp_dst_masked {")
4372 with q.group():
4373 with q.indent(2):
4374 q.breakable()
4375 q.text("value = ");
4376 q.text("%#x" % self.value)
4377 q.text(","); q.breakable()
4378 q.text("value_mask = ");
4379 q.text("%#x" % self.value_mask)
4380 q.breakable()
4381 q.text('}')
4382
Rich Lane7dcdf022013-12-11 14:45:27 -08004383oxm.subtypes[2147493124] = sctp_dst_masked
4384
4385class sctp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004386 type_len = 2147492354
Rich Lanec2ee4b82013-04-24 17:12:38 -07004387
4388 def __init__(self, value=None):
4389 if value != None:
4390 self.value = value
4391 else:
4392 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004393 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004394
4395 def pack(self):
4396 packed = []
4397 packed.append(struct.pack("!L", self.type_len))
4398 packed.append(struct.pack("!H", self.value))
4399 return ''.join(packed)
4400
4401 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004402 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004403 obj = sctp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07004404 _type_len = reader.read("!L")[0]
4405 assert(_type_len == 2147492354)
4406 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004407 return obj
4408
4409 def __eq__(self, other):
4410 if type(self) != type(other): return False
4411 if self.value != other.value: return False
4412 return True
4413
Rich Lanec2ee4b82013-04-24 17:12:38 -07004414 def pretty_print(self, q):
4415 q.text("sctp_src {")
4416 with q.group():
4417 with q.indent(2):
4418 q.breakable()
4419 q.text("value = ");
4420 q.text("%#x" % self.value)
4421 q.breakable()
4422 q.text('}')
4423
Rich Lane7dcdf022013-12-11 14:45:27 -08004424oxm.subtypes[2147492354] = sctp_src
4425
4426class sctp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004427 type_len = 2147492612
Rich Lanec2ee4b82013-04-24 17:12:38 -07004428
4429 def __init__(self, value=None, value_mask=None):
4430 if value != None:
4431 self.value = value
4432 else:
4433 self.value = 0
4434 if value_mask != None:
4435 self.value_mask = value_mask
4436 else:
4437 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004438 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004439
4440 def pack(self):
4441 packed = []
4442 packed.append(struct.pack("!L", self.type_len))
4443 packed.append(struct.pack("!H", self.value))
4444 packed.append(struct.pack("!H", self.value_mask))
4445 return ''.join(packed)
4446
4447 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004448 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004449 obj = sctp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004450 _type_len = reader.read("!L")[0]
4451 assert(_type_len == 2147492612)
4452 obj.value = reader.read("!H")[0]
4453 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004454 return obj
4455
4456 def __eq__(self, other):
4457 if type(self) != type(other): return False
4458 if self.value != other.value: return False
4459 if self.value_mask != other.value_mask: return False
4460 return True
4461
Rich Lanec2ee4b82013-04-24 17:12:38 -07004462 def pretty_print(self, q):
4463 q.text("sctp_src_masked {")
4464 with q.group():
4465 with q.indent(2):
4466 q.breakable()
4467 q.text("value = ");
4468 q.text("%#x" % self.value)
4469 q.text(","); q.breakable()
4470 q.text("value_mask = ");
4471 q.text("%#x" % self.value_mask)
4472 q.breakable()
4473 q.text('}')
4474
Rich Lane7dcdf022013-12-11 14:45:27 -08004475oxm.subtypes[2147492612] = sctp_src_masked
4476
4477class tcp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004478 type_len = 2147490818
Rich Lanec2ee4b82013-04-24 17:12:38 -07004479
4480 def __init__(self, value=None):
4481 if value != None:
4482 self.value = value
4483 else:
4484 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004485 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004486
4487 def pack(self):
4488 packed = []
4489 packed.append(struct.pack("!L", self.type_len))
4490 packed.append(struct.pack("!H", self.value))
4491 return ''.join(packed)
4492
4493 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004494 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004495 obj = tcp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07004496 _type_len = reader.read("!L")[0]
4497 assert(_type_len == 2147490818)
4498 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004499 return obj
4500
4501 def __eq__(self, other):
4502 if type(self) != type(other): return False
4503 if self.value != other.value: return False
4504 return True
4505
Rich Lanec2ee4b82013-04-24 17:12:38 -07004506 def pretty_print(self, q):
4507 q.text("tcp_dst {")
4508 with q.group():
4509 with q.indent(2):
4510 q.breakable()
4511 q.text("value = ");
4512 q.text("%#x" % self.value)
4513 q.breakable()
4514 q.text('}')
4515
Rich Lane7dcdf022013-12-11 14:45:27 -08004516oxm.subtypes[2147490818] = tcp_dst
4517
4518class tcp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004519 type_len = 2147491076
Rich Lanec2ee4b82013-04-24 17:12:38 -07004520
4521 def __init__(self, value=None, value_mask=None):
4522 if value != None:
4523 self.value = value
4524 else:
4525 self.value = 0
4526 if value_mask != None:
4527 self.value_mask = value_mask
4528 else:
4529 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004530 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004531
4532 def pack(self):
4533 packed = []
4534 packed.append(struct.pack("!L", self.type_len))
4535 packed.append(struct.pack("!H", self.value))
4536 packed.append(struct.pack("!H", self.value_mask))
4537 return ''.join(packed)
4538
4539 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004540 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004541 obj = tcp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004542 _type_len = reader.read("!L")[0]
4543 assert(_type_len == 2147491076)
4544 obj.value = reader.read("!H")[0]
4545 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004546 return obj
4547
4548 def __eq__(self, other):
4549 if type(self) != type(other): return False
4550 if self.value != other.value: return False
4551 if self.value_mask != other.value_mask: return False
4552 return True
4553
Rich Lanec2ee4b82013-04-24 17:12:38 -07004554 def pretty_print(self, q):
4555 q.text("tcp_dst_masked {")
4556 with q.group():
4557 with q.indent(2):
4558 q.breakable()
4559 q.text("value = ");
4560 q.text("%#x" % self.value)
4561 q.text(","); q.breakable()
4562 q.text("value_mask = ");
4563 q.text("%#x" % self.value_mask)
4564 q.breakable()
4565 q.text('}')
4566
Rich Lane7dcdf022013-12-11 14:45:27 -08004567oxm.subtypes[2147491076] = tcp_dst_masked
4568
4569class tcp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004570 type_len = 2147490306
Rich Lanec2ee4b82013-04-24 17:12:38 -07004571
4572 def __init__(self, value=None):
4573 if value != None:
4574 self.value = value
4575 else:
4576 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004577 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004578
4579 def pack(self):
4580 packed = []
4581 packed.append(struct.pack("!L", self.type_len))
4582 packed.append(struct.pack("!H", self.value))
4583 return ''.join(packed)
4584
4585 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004586 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004587 obj = tcp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07004588 _type_len = reader.read("!L")[0]
4589 assert(_type_len == 2147490306)
4590 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004591 return obj
4592
4593 def __eq__(self, other):
4594 if type(self) != type(other): return False
4595 if self.value != other.value: return False
4596 return True
4597
Rich Lanec2ee4b82013-04-24 17:12:38 -07004598 def pretty_print(self, q):
4599 q.text("tcp_src {")
4600 with q.group():
4601 with q.indent(2):
4602 q.breakable()
4603 q.text("value = ");
4604 q.text("%#x" % self.value)
4605 q.breakable()
4606 q.text('}')
4607
Rich Lane7dcdf022013-12-11 14:45:27 -08004608oxm.subtypes[2147490306] = tcp_src
4609
4610class tcp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004611 type_len = 2147490564
Rich Lanec2ee4b82013-04-24 17:12:38 -07004612
4613 def __init__(self, value=None, value_mask=None):
4614 if value != None:
4615 self.value = value
4616 else:
4617 self.value = 0
4618 if value_mask != None:
4619 self.value_mask = value_mask
4620 else:
4621 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004622 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004623
4624 def pack(self):
4625 packed = []
4626 packed.append(struct.pack("!L", self.type_len))
4627 packed.append(struct.pack("!H", self.value))
4628 packed.append(struct.pack("!H", self.value_mask))
4629 return ''.join(packed)
4630
4631 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004632 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004633 obj = tcp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004634 _type_len = reader.read("!L")[0]
4635 assert(_type_len == 2147490564)
4636 obj.value = reader.read("!H")[0]
4637 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004638 return obj
4639
4640 def __eq__(self, other):
4641 if type(self) != type(other): return False
4642 if self.value != other.value: return False
4643 if self.value_mask != other.value_mask: return False
4644 return True
4645
Rich Lanec2ee4b82013-04-24 17:12:38 -07004646 def pretty_print(self, q):
4647 q.text("tcp_src_masked {")
4648 with q.group():
4649 with q.indent(2):
4650 q.breakable()
4651 q.text("value = ");
4652 q.text("%#x" % self.value)
4653 q.text(","); q.breakable()
4654 q.text("value_mask = ");
4655 q.text("%#x" % self.value_mask)
4656 q.breakable()
4657 q.text('}')
4658
Rich Lane7dcdf022013-12-11 14:45:27 -08004659oxm.subtypes[2147490564] = tcp_src_masked
4660
4661class udp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004662 type_len = 2147491842
Rich Lanec2ee4b82013-04-24 17:12:38 -07004663
4664 def __init__(self, value=None):
4665 if value != None:
4666 self.value = value
4667 else:
4668 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004669 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004670
4671 def pack(self):
4672 packed = []
4673 packed.append(struct.pack("!L", self.type_len))
4674 packed.append(struct.pack("!H", self.value))
4675 return ''.join(packed)
4676
4677 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004678 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004679 obj = udp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07004680 _type_len = reader.read("!L")[0]
4681 assert(_type_len == 2147491842)
4682 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004683 return obj
4684
4685 def __eq__(self, other):
4686 if type(self) != type(other): return False
4687 if self.value != other.value: return False
4688 return True
4689
Rich Lanec2ee4b82013-04-24 17:12:38 -07004690 def pretty_print(self, q):
4691 q.text("udp_dst {")
4692 with q.group():
4693 with q.indent(2):
4694 q.breakable()
4695 q.text("value = ");
4696 q.text("%#x" % self.value)
4697 q.breakable()
4698 q.text('}')
4699
Rich Lane7dcdf022013-12-11 14:45:27 -08004700oxm.subtypes[2147491842] = udp_dst
4701
4702class udp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004703 type_len = 2147492100
Rich Lanec2ee4b82013-04-24 17:12:38 -07004704
4705 def __init__(self, value=None, value_mask=None):
4706 if value != None:
4707 self.value = value
4708 else:
4709 self.value = 0
4710 if value_mask != None:
4711 self.value_mask = value_mask
4712 else:
4713 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004714 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004715
4716 def pack(self):
4717 packed = []
4718 packed.append(struct.pack("!L", self.type_len))
4719 packed.append(struct.pack("!H", self.value))
4720 packed.append(struct.pack("!H", self.value_mask))
4721 return ''.join(packed)
4722
4723 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004724 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004725 obj = udp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004726 _type_len = reader.read("!L")[0]
4727 assert(_type_len == 2147492100)
4728 obj.value = reader.read("!H")[0]
4729 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004730 return obj
4731
4732 def __eq__(self, other):
4733 if type(self) != type(other): return False
4734 if self.value != other.value: return False
4735 if self.value_mask != other.value_mask: return False
4736 return True
4737
Rich Lanec2ee4b82013-04-24 17:12:38 -07004738 def pretty_print(self, q):
4739 q.text("udp_dst_masked {")
4740 with q.group():
4741 with q.indent(2):
4742 q.breakable()
4743 q.text("value = ");
4744 q.text("%#x" % self.value)
4745 q.text(","); q.breakable()
4746 q.text("value_mask = ");
4747 q.text("%#x" % self.value_mask)
4748 q.breakable()
4749 q.text('}')
4750
Rich Lane7dcdf022013-12-11 14:45:27 -08004751oxm.subtypes[2147492100] = udp_dst_masked
4752
4753class udp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004754 type_len = 2147491330
Rich Lanec2ee4b82013-04-24 17:12:38 -07004755
4756 def __init__(self, value=None):
4757 if value != None:
4758 self.value = value
4759 else:
4760 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004761 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004762
4763 def pack(self):
4764 packed = []
4765 packed.append(struct.pack("!L", self.type_len))
4766 packed.append(struct.pack("!H", self.value))
4767 return ''.join(packed)
4768
4769 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004770 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004771 obj = udp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07004772 _type_len = reader.read("!L")[0]
4773 assert(_type_len == 2147491330)
4774 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004775 return obj
4776
4777 def __eq__(self, other):
4778 if type(self) != type(other): return False
4779 if self.value != other.value: return False
4780 return True
4781
Rich Lanec2ee4b82013-04-24 17:12:38 -07004782 def pretty_print(self, q):
4783 q.text("udp_src {")
4784 with q.group():
4785 with q.indent(2):
4786 q.breakable()
4787 q.text("value = ");
4788 q.text("%#x" % self.value)
4789 q.breakable()
4790 q.text('}')
4791
Rich Lane7dcdf022013-12-11 14:45:27 -08004792oxm.subtypes[2147491330] = udp_src
4793
4794class udp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004795 type_len = 2147491588
Rich Lanec2ee4b82013-04-24 17:12:38 -07004796
4797 def __init__(self, value=None, value_mask=None):
4798 if value != None:
4799 self.value = value
4800 else:
4801 self.value = 0
4802 if value_mask != None:
4803 self.value_mask = value_mask
4804 else:
4805 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004806 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004807
4808 def pack(self):
4809 packed = []
4810 packed.append(struct.pack("!L", self.type_len))
4811 packed.append(struct.pack("!H", self.value))
4812 packed.append(struct.pack("!H", self.value_mask))
4813 return ''.join(packed)
4814
4815 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004816 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004817 obj = udp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004818 _type_len = reader.read("!L")[0]
4819 assert(_type_len == 2147491588)
4820 obj.value = reader.read("!H")[0]
4821 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004822 return obj
4823
4824 def __eq__(self, other):
4825 if type(self) != type(other): return False
4826 if self.value != other.value: return False
4827 if self.value_mask != other.value_mask: return False
4828 return True
4829
Rich Lanec2ee4b82013-04-24 17:12:38 -07004830 def pretty_print(self, q):
4831 q.text("udp_src_masked {")
4832 with q.group():
4833 with q.indent(2):
4834 q.breakable()
4835 q.text("value = ");
4836 q.text("%#x" % self.value)
4837 q.text(","); q.breakable()
4838 q.text("value_mask = ");
4839 q.text("%#x" % self.value_mask)
4840 q.breakable()
4841 q.text('}')
4842
Rich Lane7dcdf022013-12-11 14:45:27 -08004843oxm.subtypes[2147491588] = udp_src_masked
4844
4845class vlan_pcp(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004846 type_len = 2147487233
Rich Lanec2ee4b82013-04-24 17:12:38 -07004847
4848 def __init__(self, value=None):
4849 if value != None:
4850 self.value = value
4851 else:
4852 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004853 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004854
4855 def pack(self):
4856 packed = []
4857 packed.append(struct.pack("!L", self.type_len))
4858 packed.append(struct.pack("!B", self.value))
4859 return ''.join(packed)
4860
4861 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004862 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004863 obj = vlan_pcp()
Dan Talaycof6202252013-07-02 01:00:29 -07004864 _type_len = reader.read("!L")[0]
4865 assert(_type_len == 2147487233)
4866 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004867 return obj
4868
4869 def __eq__(self, other):
4870 if type(self) != type(other): return False
4871 if self.value != other.value: return False
4872 return True
4873
Rich Lanec2ee4b82013-04-24 17:12:38 -07004874 def pretty_print(self, q):
4875 q.text("vlan_pcp {")
4876 with q.group():
4877 with q.indent(2):
4878 q.breakable()
4879 q.text("value = ");
4880 q.text("%#x" % self.value)
4881 q.breakable()
4882 q.text('}')
4883
Rich Lane7dcdf022013-12-11 14:45:27 -08004884oxm.subtypes[2147487233] = vlan_pcp
4885
4886class vlan_pcp_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004887 type_len = 2147487490
Rich Lanec2ee4b82013-04-24 17:12:38 -07004888
4889 def __init__(self, value=None, value_mask=None):
4890 if value != None:
4891 self.value = value
4892 else:
4893 self.value = 0
4894 if value_mask != None:
4895 self.value_mask = value_mask
4896 else:
4897 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004898 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004899
4900 def pack(self):
4901 packed = []
4902 packed.append(struct.pack("!L", self.type_len))
4903 packed.append(struct.pack("!B", self.value))
4904 packed.append(struct.pack("!B", self.value_mask))
4905 return ''.join(packed)
4906
4907 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004908 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004909 obj = vlan_pcp_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004910 _type_len = reader.read("!L")[0]
4911 assert(_type_len == 2147487490)
4912 obj.value = reader.read("!B")[0]
4913 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004914 return obj
4915
4916 def __eq__(self, other):
4917 if type(self) != type(other): return False
4918 if self.value != other.value: return False
4919 if self.value_mask != other.value_mask: return False
4920 return True
4921
Rich Lanec2ee4b82013-04-24 17:12:38 -07004922 def pretty_print(self, q):
4923 q.text("vlan_pcp_masked {")
4924 with q.group():
4925 with q.indent(2):
4926 q.breakable()
4927 q.text("value = ");
4928 q.text("%#x" % self.value)
4929 q.text(","); q.breakable()
4930 q.text("value_mask = ");
4931 q.text("%#x" % self.value_mask)
4932 q.breakable()
4933 q.text('}')
4934
Rich Lane7dcdf022013-12-11 14:45:27 -08004935oxm.subtypes[2147487490] = vlan_pcp_masked
4936
4937class vlan_vid(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004938 type_len = 2147486722
Rich Lanec2ee4b82013-04-24 17:12:38 -07004939
4940 def __init__(self, value=None):
4941 if value != None:
4942 self.value = value
4943 else:
4944 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004945 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004946
4947 def pack(self):
4948 packed = []
4949 packed.append(struct.pack("!L", self.type_len))
4950 packed.append(struct.pack("!H", self.value))
4951 return ''.join(packed)
4952
4953 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004954 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004955 obj = vlan_vid()
Dan Talaycof6202252013-07-02 01:00:29 -07004956 _type_len = reader.read("!L")[0]
4957 assert(_type_len == 2147486722)
4958 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004959 return obj
4960
4961 def __eq__(self, other):
4962 if type(self) != type(other): return False
4963 if self.value != other.value: return False
4964 return True
4965
Rich Lanec2ee4b82013-04-24 17:12:38 -07004966 def pretty_print(self, q):
4967 q.text("vlan_vid {")
4968 with q.group():
4969 with q.indent(2):
4970 q.breakable()
4971 q.text("value = ");
4972 q.text("%#x" % self.value)
4973 q.breakable()
4974 q.text('}')
4975
Rich Lane7dcdf022013-12-11 14:45:27 -08004976oxm.subtypes[2147486722] = vlan_vid
4977
4978class vlan_vid_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004979 type_len = 2147486980
Rich Lanec2ee4b82013-04-24 17:12:38 -07004980
4981 def __init__(self, value=None, value_mask=None):
4982 if value != None:
4983 self.value = value
4984 else:
4985 self.value = 0
4986 if value_mask != None:
4987 self.value_mask = value_mask
4988 else:
4989 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004990 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004991
4992 def pack(self):
4993 packed = []
4994 packed.append(struct.pack("!L", self.type_len))
4995 packed.append(struct.pack("!H", self.value))
4996 packed.append(struct.pack("!H", self.value_mask))
4997 return ''.join(packed)
4998
4999 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005000 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005001 obj = vlan_vid_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07005002 _type_len = reader.read("!L")[0]
5003 assert(_type_len == 2147486980)
5004 obj.value = reader.read("!H")[0]
5005 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005006 return obj
5007
5008 def __eq__(self, other):
5009 if type(self) != type(other): return False
5010 if self.value != other.value: return False
5011 if self.value_mask != other.value_mask: return False
5012 return True
5013
Rich Lanec2ee4b82013-04-24 17:12:38 -07005014 def pretty_print(self, q):
5015 q.text("vlan_vid_masked {")
5016 with q.group():
5017 with q.indent(2):
5018 q.breakable()
5019 q.text("value = ");
5020 q.text("%#x" % self.value)
5021 q.text(","); q.breakable()
5022 q.text("value_mask = ");
5023 q.text("%#x" % self.value_mask)
5024 q.breakable()
5025 q.text('}')
5026
Rich Lane7dcdf022013-12-11 14:45:27 -08005027oxm.subtypes[2147486980] = vlan_vid_masked
Rich Lanec2ee4b82013-04-24 17:12:38 -07005028
Rich Lane7dcdf022013-12-11 14:45:27 -08005029