blob: f116d1afa73c75c922c84d1a7c00e5a5757c00a3 [file] [log] [blame]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001# Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
2# Copyright (c) 2011, 2012 Open Networking Foundation
3# Copyright (c) 2012, 2013 Big Switch Networks, Inc.
Dan Talaycof6202252013-07-02 01:00:29 -07004# See the file LICENSE.pyloxi which should have been included in the source distribution
Rich Lanec2ee4b82013-04-24 17:12:38 -07005
Rich Lane7dcdf022013-12-11 14:45:27 -08006# Automatically generated by LOXI from template module.py
Rich Lanec2ee4b82013-04-24 17:12:38 -07007# Do not modify
8
9import struct
Rich Lane7dcdf022013-12-11 14:45:27 -080010import loxi
Rich Lanec2ee4b82013-04-24 17:12:38 -070011import const
Rich Lane7dcdf022013-12-11 14:45:27 -080012import common
13import action
14import instruction
15import oxm
Rich Lanec2ee4b82013-04-24 17:12:38 -070016import util
17import loxi.generic_util
Rich Lanec2ee4b82013-04-24 17:12:38 -070018
Rich Lane7dcdf022013-12-11 14:45:27 -080019class oxm(loxi.OFObject):
20 subtypes = {}
Rich Laned53156a2013-08-05 17:17:33 -070021
Rich Lane95f7fc92014-01-27 17:08:16 -080022
23 def __init__(self, type_len=None):
24 if type_len != None:
25 self.type_len = type_len
26 else:
27 self.type_len = 0
28 return
29
30 def pack(self):
31 packed = []
32 packed.append(struct.pack("!L", self.type_len))
33 return ''.join(packed)
34
Rich Lane7dcdf022013-12-11 14:45:27 -080035 @staticmethod
36 def unpack(reader):
37 subtype, = reader.peek('!L', 0)
Rich Lane95f7fc92014-01-27 17:08:16 -080038 subclass = oxm.subtypes.get(subtype)
39 if subclass:
40 return subclass.unpack(reader)
41
42 obj = oxm()
43 obj.type_len = reader.read("!L")[0]
44 return obj
45
46 def __eq__(self, other):
47 if type(self) != type(other): return False
48 if self.type_len != other.type_len: return False
49 return True
50
51 def pretty_print(self, q):
52 q.text("oxm {")
53 with q.group():
54 with q.indent(2):
55 q.breakable()
56 q.breakable()
57 q.text('}')
Rich Lanec2ee4b82013-04-24 17:12:38 -070058
Rich Lanec2ee4b82013-04-24 17:12:38 -070059
Rich Lane7dcdf022013-12-11 14:45:27 -080060class arp_op(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -070061 type_len = 2147494402
Rich Lanec2ee4b82013-04-24 17:12:38 -070062
63 def __init__(self, value=None):
64 if value != None:
65 self.value = value
66 else:
67 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -080068 return
Rich Lanec2ee4b82013-04-24 17:12:38 -070069
70 def pack(self):
71 packed = []
72 packed.append(struct.pack("!L", self.type_len))
73 packed.append(struct.pack("!H", self.value))
74 return ''.join(packed)
75
76 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -080077 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -070078 obj = arp_op()
Dan Talaycof6202252013-07-02 01:00:29 -070079 _type_len = reader.read("!L")[0]
80 assert(_type_len == 2147494402)
81 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -070082 return obj
83
84 def __eq__(self, other):
85 if type(self) != type(other): return False
86 if self.value != other.value: return False
87 return True
88
Rich Lanec2ee4b82013-04-24 17:12:38 -070089 def pretty_print(self, q):
90 q.text("arp_op {")
91 with q.group():
92 with q.indent(2):
93 q.breakable()
94 q.text("value = ");
95 q.text("%#x" % self.value)
96 q.breakable()
97 q.text('}')
98
Rich Lane7dcdf022013-12-11 14:45:27 -080099oxm.subtypes[2147494402] = arp_op
100
101class arp_op_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700102 type_len = 2147494660
Rich Lanec2ee4b82013-04-24 17:12:38 -0700103
104 def __init__(self, value=None, value_mask=None):
105 if value != None:
106 self.value = value
107 else:
108 self.value = 0
109 if value_mask != None:
110 self.value_mask = value_mask
111 else:
112 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800113 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700114
115 def pack(self):
116 packed = []
117 packed.append(struct.pack("!L", self.type_len))
118 packed.append(struct.pack("!H", self.value))
119 packed.append(struct.pack("!H", self.value_mask))
120 return ''.join(packed)
121
122 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800123 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700124 obj = arp_op_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700125 _type_len = reader.read("!L")[0]
126 assert(_type_len == 2147494660)
127 obj.value = reader.read("!H")[0]
128 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700129 return obj
130
131 def __eq__(self, other):
132 if type(self) != type(other): return False
133 if self.value != other.value: return False
134 if self.value_mask != other.value_mask: return False
135 return True
136
Rich Lanec2ee4b82013-04-24 17:12:38 -0700137 def pretty_print(self, q):
138 q.text("arp_op_masked {")
139 with q.group():
140 with q.indent(2):
141 q.breakable()
142 q.text("value = ");
143 q.text("%#x" % self.value)
144 q.text(","); q.breakable()
145 q.text("value_mask = ");
146 q.text("%#x" % self.value_mask)
147 q.breakable()
148 q.text('}')
149
Rich Lane7dcdf022013-12-11 14:45:27 -0800150oxm.subtypes[2147494660] = arp_op_masked
151
152class arp_sha(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700153 type_len = 2147495942
Rich Lanec2ee4b82013-04-24 17:12:38 -0700154
155 def __init__(self, value=None):
156 if value != None:
157 self.value = value
158 else:
159 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800160 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700161
162 def pack(self):
163 packed = []
164 packed.append(struct.pack("!L", self.type_len))
165 packed.append(struct.pack("!6B", *self.value))
166 return ''.join(packed)
167
168 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800169 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700170 obj = arp_sha()
Dan Talaycof6202252013-07-02 01:00:29 -0700171 _type_len = reader.read("!L")[0]
172 assert(_type_len == 2147495942)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700173 obj.value = list(reader.read('!6B'))
174 return obj
175
176 def __eq__(self, other):
177 if type(self) != type(other): return False
178 if self.value != other.value: return False
179 return True
180
Rich Lanec2ee4b82013-04-24 17:12:38 -0700181 def pretty_print(self, q):
182 q.text("arp_sha {")
183 with q.group():
184 with q.indent(2):
185 q.breakable()
186 q.text("value = ");
187 q.text(util.pretty_mac(self.value))
188 q.breakable()
189 q.text('}')
190
Rich Lane7dcdf022013-12-11 14:45:27 -0800191oxm.subtypes[2147495942] = arp_sha
192
193class arp_sha_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700194 type_len = 2147496204
Rich Lanec2ee4b82013-04-24 17:12:38 -0700195
196 def __init__(self, value=None, value_mask=None):
197 if value != None:
198 self.value = value
199 else:
200 self.value = [0,0,0,0,0,0]
201 if value_mask != None:
202 self.value_mask = value_mask
203 else:
204 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800205 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700206
207 def pack(self):
208 packed = []
209 packed.append(struct.pack("!L", self.type_len))
210 packed.append(struct.pack("!6B", *self.value))
211 packed.append(struct.pack("!6B", *self.value_mask))
212 return ''.join(packed)
213
214 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800215 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700216 obj = arp_sha_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700217 _type_len = reader.read("!L")[0]
218 assert(_type_len == 2147496204)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700219 obj.value = list(reader.read('!6B'))
220 obj.value_mask = list(reader.read('!6B'))
221 return obj
222
223 def __eq__(self, other):
224 if type(self) != type(other): return False
225 if self.value != other.value: return False
226 if self.value_mask != other.value_mask: return False
227 return True
228
Rich Lanec2ee4b82013-04-24 17:12:38 -0700229 def pretty_print(self, q):
230 q.text("arp_sha_masked {")
231 with q.group():
232 with q.indent(2):
233 q.breakable()
234 q.text("value = ");
235 q.text(util.pretty_mac(self.value))
236 q.text(","); q.breakable()
237 q.text("value_mask = ");
238 q.text(util.pretty_mac(self.value_mask))
239 q.breakable()
240 q.text('}')
241
Rich Lane7dcdf022013-12-11 14:45:27 -0800242oxm.subtypes[2147496204] = arp_sha_masked
243
244class arp_spa(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700245 type_len = 2147494916
Rich Lanec2ee4b82013-04-24 17:12:38 -0700246
247 def __init__(self, value=None):
248 if value != None:
249 self.value = value
250 else:
251 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800252 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700253
254 def pack(self):
255 packed = []
256 packed.append(struct.pack("!L", self.type_len))
257 packed.append(struct.pack("!L", self.value))
258 return ''.join(packed)
259
260 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800261 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700262 obj = arp_spa()
Dan Talaycof6202252013-07-02 01:00:29 -0700263 _type_len = reader.read("!L")[0]
264 assert(_type_len == 2147494916)
265 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700266 return obj
267
268 def __eq__(self, other):
269 if type(self) != type(other): return False
270 if self.value != other.value: return False
271 return True
272
Rich Lanec2ee4b82013-04-24 17:12:38 -0700273 def pretty_print(self, q):
274 q.text("arp_spa {")
275 with q.group():
276 with q.indent(2):
277 q.breakable()
278 q.text("value = ");
279 q.text("%#x" % self.value)
280 q.breakable()
281 q.text('}')
282
Rich Lane7dcdf022013-12-11 14:45:27 -0800283oxm.subtypes[2147494916] = arp_spa
284
285class arp_spa_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700286 type_len = 2147495176
Rich Lanec2ee4b82013-04-24 17:12:38 -0700287
288 def __init__(self, value=None, value_mask=None):
289 if value != None:
290 self.value = value
291 else:
292 self.value = 0
293 if value_mask != None:
294 self.value_mask = value_mask
295 else:
296 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800297 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700298
299 def pack(self):
300 packed = []
301 packed.append(struct.pack("!L", self.type_len))
302 packed.append(struct.pack("!L", self.value))
303 packed.append(struct.pack("!L", self.value_mask))
304 return ''.join(packed)
305
306 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800307 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700308 obj = arp_spa_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700309 _type_len = reader.read("!L")[0]
310 assert(_type_len == 2147495176)
311 obj.value = reader.read("!L")[0]
312 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700313 return obj
314
315 def __eq__(self, other):
316 if type(self) != type(other): return False
317 if self.value != other.value: return False
318 if self.value_mask != other.value_mask: return False
319 return True
320
Rich Lanec2ee4b82013-04-24 17:12:38 -0700321 def pretty_print(self, q):
322 q.text("arp_spa_masked {")
323 with q.group():
324 with q.indent(2):
325 q.breakable()
326 q.text("value = ");
327 q.text("%#x" % self.value)
328 q.text(","); q.breakable()
329 q.text("value_mask = ");
330 q.text("%#x" % self.value_mask)
331 q.breakable()
332 q.text('}')
333
Rich Lane7dcdf022013-12-11 14:45:27 -0800334oxm.subtypes[2147495176] = arp_spa_masked
335
336class arp_tha(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700337 type_len = 2147496454
Rich Lanec2ee4b82013-04-24 17:12:38 -0700338
339 def __init__(self, value=None):
340 if value != None:
341 self.value = value
342 else:
343 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800344 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700345
346 def pack(self):
347 packed = []
348 packed.append(struct.pack("!L", self.type_len))
349 packed.append(struct.pack("!6B", *self.value))
350 return ''.join(packed)
351
352 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800353 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700354 obj = arp_tha()
Dan Talaycof6202252013-07-02 01:00:29 -0700355 _type_len = reader.read("!L")[0]
356 assert(_type_len == 2147496454)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700357 obj.value = list(reader.read('!6B'))
358 return obj
359
360 def __eq__(self, other):
361 if type(self) != type(other): return False
362 if self.value != other.value: return False
363 return True
364
Rich Lanec2ee4b82013-04-24 17:12:38 -0700365 def pretty_print(self, q):
366 q.text("arp_tha {")
367 with q.group():
368 with q.indent(2):
369 q.breakable()
370 q.text("value = ");
371 q.text(util.pretty_mac(self.value))
372 q.breakable()
373 q.text('}')
374
Rich Lane7dcdf022013-12-11 14:45:27 -0800375oxm.subtypes[2147496454] = arp_tha
376
377class arp_tha_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700378 type_len = 2147496716
Rich Lanec2ee4b82013-04-24 17:12:38 -0700379
380 def __init__(self, value=None, value_mask=None):
381 if value != None:
382 self.value = value
383 else:
384 self.value = [0,0,0,0,0,0]
385 if value_mask != None:
386 self.value_mask = value_mask
387 else:
388 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800389 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700390
391 def pack(self):
392 packed = []
393 packed.append(struct.pack("!L", self.type_len))
394 packed.append(struct.pack("!6B", *self.value))
395 packed.append(struct.pack("!6B", *self.value_mask))
396 return ''.join(packed)
397
398 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800399 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700400 obj = arp_tha_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700401 _type_len = reader.read("!L")[0]
402 assert(_type_len == 2147496716)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700403 obj.value = list(reader.read('!6B'))
404 obj.value_mask = list(reader.read('!6B'))
405 return obj
406
407 def __eq__(self, other):
408 if type(self) != type(other): return False
409 if self.value != other.value: return False
410 if self.value_mask != other.value_mask: return False
411 return True
412
Rich Lanec2ee4b82013-04-24 17:12:38 -0700413 def pretty_print(self, q):
414 q.text("arp_tha_masked {")
415 with q.group():
416 with q.indent(2):
417 q.breakable()
418 q.text("value = ");
419 q.text(util.pretty_mac(self.value))
420 q.text(","); q.breakable()
421 q.text("value_mask = ");
422 q.text(util.pretty_mac(self.value_mask))
423 q.breakable()
424 q.text('}')
425
Rich Lane7dcdf022013-12-11 14:45:27 -0800426oxm.subtypes[2147496716] = arp_tha_masked
427
428class arp_tpa(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700429 type_len = 2147495428
Rich Lanec2ee4b82013-04-24 17:12:38 -0700430
431 def __init__(self, value=None):
432 if value != None:
433 self.value = value
434 else:
435 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800436 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700437
438 def pack(self):
439 packed = []
440 packed.append(struct.pack("!L", self.type_len))
441 packed.append(struct.pack("!L", self.value))
442 return ''.join(packed)
443
444 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800445 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700446 obj = arp_tpa()
Dan Talaycof6202252013-07-02 01:00:29 -0700447 _type_len = reader.read("!L")[0]
448 assert(_type_len == 2147495428)
449 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700450 return obj
451
452 def __eq__(self, other):
453 if type(self) != type(other): return False
454 if self.value != other.value: return False
455 return True
456
Rich Lanec2ee4b82013-04-24 17:12:38 -0700457 def pretty_print(self, q):
458 q.text("arp_tpa {")
459 with q.group():
460 with q.indent(2):
461 q.breakable()
462 q.text("value = ");
463 q.text("%#x" % self.value)
464 q.breakable()
465 q.text('}')
466
Rich Lane7dcdf022013-12-11 14:45:27 -0800467oxm.subtypes[2147495428] = arp_tpa
468
469class arp_tpa_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700470 type_len = 2147495688
Rich Lanec2ee4b82013-04-24 17:12:38 -0700471
472 def __init__(self, value=None, value_mask=None):
473 if value != None:
474 self.value = value
475 else:
476 self.value = 0
477 if value_mask != None:
478 self.value_mask = value_mask
479 else:
480 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800481 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700482
483 def pack(self):
484 packed = []
485 packed.append(struct.pack("!L", self.type_len))
486 packed.append(struct.pack("!L", self.value))
487 packed.append(struct.pack("!L", self.value_mask))
488 return ''.join(packed)
489
490 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800491 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700492 obj = arp_tpa_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700493 _type_len = reader.read("!L")[0]
494 assert(_type_len == 2147495688)
495 obj.value = reader.read("!L")[0]
496 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700497 return obj
498
499 def __eq__(self, other):
500 if type(self) != type(other): return False
501 if self.value != other.value: return False
502 if self.value_mask != other.value_mask: return False
503 return True
504
Rich Lanec2ee4b82013-04-24 17:12:38 -0700505 def pretty_print(self, q):
506 q.text("arp_tpa_masked {")
507 with q.group():
508 with q.indent(2):
509 q.breakable()
510 q.text("value = ");
511 q.text("%#x" % self.value)
512 q.text(","); q.breakable()
513 q.text("value_mask = ");
514 q.text("%#x" % self.value_mask)
515 q.breakable()
516 q.text('}')
517
Rich Lane7dcdf022013-12-11 14:45:27 -0800518oxm.subtypes[2147495688] = arp_tpa_masked
519
520class bsn_global_vrf_allowed(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800521 type_len = 198145
522
523 def __init__(self, value=None):
524 if value != None:
525 self.value = value
526 else:
527 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800528 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800529
530 def pack(self):
531 packed = []
532 packed.append(struct.pack("!L", self.type_len))
533 packed.append(struct.pack("!B", self.value))
534 return ''.join(packed)
535
536 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800537 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800538 obj = bsn_global_vrf_allowed()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800539 _type_len = reader.read("!L")[0]
540 assert(_type_len == 198145)
541 obj.value = reader.read("!B")[0]
542 return obj
543
544 def __eq__(self, other):
545 if type(self) != type(other): return False
546 if self.value != other.value: return False
547 return True
548
Rich Laned9e3f7b2013-11-04 11:40:43 -0800549 def pretty_print(self, q):
550 q.text("bsn_global_vrf_allowed {")
551 with q.group():
552 with q.indent(2):
553 q.breakable()
554 q.text("value = ");
555 q.text("%#x" % self.value)
556 q.breakable()
557 q.text('}')
558
Rich Lane7dcdf022013-12-11 14:45:27 -0800559oxm.subtypes[198145] = bsn_global_vrf_allowed
560
561class bsn_global_vrf_allowed_masked(oxm):
562 type_len = 198402
Rich Laned9e3f7b2013-11-04 11:40:43 -0800563
564 def __init__(self, value=None, value_mask=None):
565 if value != None:
566 self.value = value
567 else:
568 self.value = 0
569 if value_mask != None:
570 self.value_mask = value_mask
571 else:
572 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800573 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800574
575 def pack(self):
576 packed = []
577 packed.append(struct.pack("!L", self.type_len))
578 packed.append(struct.pack("!B", self.value))
579 packed.append(struct.pack("!B", self.value_mask))
580 return ''.join(packed)
581
582 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800583 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800584 obj = bsn_global_vrf_allowed_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800585 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800586 assert(_type_len == 198402)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800587 obj.value = reader.read("!B")[0]
588 obj.value_mask = reader.read("!B")[0]
589 return obj
590
591 def __eq__(self, other):
592 if type(self) != type(other): return False
593 if self.value != other.value: return False
594 if self.value_mask != other.value_mask: return False
595 return True
596
Rich Laned9e3f7b2013-11-04 11:40:43 -0800597 def pretty_print(self, q):
598 q.text("bsn_global_vrf_allowed_masked {")
599 with q.group():
600 with q.indent(2):
601 q.breakable()
602 q.text("value = ");
603 q.text("%#x" % self.value)
604 q.text(","); q.breakable()
605 q.text("value_mask = ");
606 q.text("%#x" % self.value_mask)
607 q.breakable()
608 q.text('}')
609
Rich Lane7dcdf022013-12-11 14:45:27 -0800610oxm.subtypes[198402] = bsn_global_vrf_allowed_masked
611
612class bsn_in_ports_128(oxm):
613 type_len = 196624
Rich Lane6f4978c2013-10-20 21:33:52 -0700614
615 def __init__(self, value=None):
616 if value != None:
617 self.value = value
618 else:
619 self.value = set()
Rich Lane7dcdf022013-12-11 14:45:27 -0800620 return
Rich Lane6f4978c2013-10-20 21:33:52 -0700621
622 def pack(self):
623 packed = []
624 packed.append(struct.pack("!L", self.type_len))
625 packed.append(util.pack_bitmap_128(self.value))
626 return ''.join(packed)
627
628 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800629 def unpack(reader):
Rich Lane6f4978c2013-10-20 21:33:52 -0700630 obj = bsn_in_ports_128()
Rich Lane6f4978c2013-10-20 21:33:52 -0700631 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800632 assert(_type_len == 196624)
Rich Lane6f4978c2013-10-20 21:33:52 -0700633 obj.value = util.unpack_bitmap_128(reader)
634 return obj
635
636 def __eq__(self, other):
637 if type(self) != type(other): return False
638 if self.value != other.value: return False
639 return True
640
Rich Lane6f4978c2013-10-20 21:33:52 -0700641 def pretty_print(self, q):
642 q.text("bsn_in_ports_128 {")
643 with q.group():
644 with q.indent(2):
645 q.breakable()
646 q.text("value = ");
647 q.pp(self.value)
648 q.breakable()
649 q.text('}')
650
Rich Lane7dcdf022013-12-11 14:45:27 -0800651oxm.subtypes[196624] = bsn_in_ports_128
652
653class bsn_in_ports_128_masked(oxm):
Rich Lane6f4978c2013-10-20 21:33:52 -0700654 type_len = 196896
655
656 def __init__(self, value=None, value_mask=None):
657 if value != None:
658 self.value = value
659 else:
660 self.value = set()
661 if value_mask != None:
662 self.value_mask = value_mask
663 else:
664 self.value_mask = set()
Rich Lane7dcdf022013-12-11 14:45:27 -0800665 return
Rich Lane6f4978c2013-10-20 21:33:52 -0700666
667 def pack(self):
668 packed = []
669 packed.append(struct.pack("!L", self.type_len))
670 packed.append(util.pack_bitmap_128(self.value))
671 packed.append(util.pack_bitmap_128(self.value_mask))
672 return ''.join(packed)
673
674 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800675 def unpack(reader):
Rich Lane6f4978c2013-10-20 21:33:52 -0700676 obj = bsn_in_ports_128_masked()
Rich Lane6f4978c2013-10-20 21:33:52 -0700677 _type_len = reader.read("!L")[0]
678 assert(_type_len == 196896)
679 obj.value = util.unpack_bitmap_128(reader)
680 obj.value_mask = util.unpack_bitmap_128(reader)
681 return obj
682
683 def __eq__(self, other):
684 if type(self) != type(other): return False
685 if self.value != other.value: return False
686 if self.value_mask != other.value_mask: return False
687 return True
688
Rich Lane6f4978c2013-10-20 21:33:52 -0700689 def pretty_print(self, q):
690 q.text("bsn_in_ports_128_masked {")
691 with q.group():
692 with q.indent(2):
693 q.breakable()
694 q.text("value = ");
695 q.pp(self.value)
696 q.text(","); q.breakable()
697 q.text("value_mask = ");
698 q.pp(self.value_mask)
699 q.breakable()
700 q.text('}')
701
Rich Lane7dcdf022013-12-11 14:45:27 -0800702oxm.subtypes[196896] = bsn_in_ports_128_masked
703
704class bsn_l3_dst_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800705 type_len = 199684
706
707 def __init__(self, value=None):
708 if value != None:
709 self.value = value
710 else:
711 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800712 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800713
714 def pack(self):
715 packed = []
716 packed.append(struct.pack("!L", self.type_len))
717 packed.append(struct.pack("!L", self.value))
718 return ''.join(packed)
719
720 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800721 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800722 obj = bsn_l3_dst_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800723 _type_len = reader.read("!L")[0]
724 assert(_type_len == 199684)
725 obj.value = reader.read("!L")[0]
726 return obj
727
728 def __eq__(self, other):
729 if type(self) != type(other): return False
730 if self.value != other.value: return False
731 return True
732
Rich Laned9e3f7b2013-11-04 11:40:43 -0800733 def pretty_print(self, q):
734 q.text("bsn_l3_dst_class_id {")
735 with q.group():
736 with q.indent(2):
737 q.breakable()
738 q.text("value = ");
739 q.text("%#x" % self.value)
740 q.breakable()
741 q.text('}')
742
Rich Lane7dcdf022013-12-11 14:45:27 -0800743oxm.subtypes[199684] = bsn_l3_dst_class_id
744
745class bsn_l3_dst_class_id_masked(oxm):
746 type_len = 199944
Rich Laned9e3f7b2013-11-04 11:40:43 -0800747
748 def __init__(self, value=None, value_mask=None):
749 if value != None:
750 self.value = value
751 else:
752 self.value = 0
753 if value_mask != None:
754 self.value_mask = value_mask
755 else:
756 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800757 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800758
759 def pack(self):
760 packed = []
761 packed.append(struct.pack("!L", self.type_len))
762 packed.append(struct.pack("!L", self.value))
763 packed.append(struct.pack("!L", self.value_mask))
764 return ''.join(packed)
765
766 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800767 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800768 obj = bsn_l3_dst_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800769 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800770 assert(_type_len == 199944)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800771 obj.value = reader.read("!L")[0]
772 obj.value_mask = reader.read("!L")[0]
773 return obj
774
775 def __eq__(self, other):
776 if type(self) != type(other): return False
777 if self.value != other.value: return False
778 if self.value_mask != other.value_mask: return False
779 return True
780
Rich Laned9e3f7b2013-11-04 11:40:43 -0800781 def pretty_print(self, q):
782 q.text("bsn_l3_dst_class_id_masked {")
783 with q.group():
784 with q.indent(2):
785 q.breakable()
786 q.text("value = ");
787 q.text("%#x" % self.value)
788 q.text(","); q.breakable()
789 q.text("value_mask = ");
790 q.text("%#x" % self.value_mask)
791 q.breakable()
792 q.text('}')
793
Rich Lane7dcdf022013-12-11 14:45:27 -0800794oxm.subtypes[199944] = bsn_l3_dst_class_id_masked
795
796class bsn_l3_interface_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800797 type_len = 198660
798
799 def __init__(self, value=None):
800 if value != None:
801 self.value = value
802 else:
803 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800804 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800805
806 def pack(self):
807 packed = []
808 packed.append(struct.pack("!L", self.type_len))
809 packed.append(struct.pack("!L", self.value))
810 return ''.join(packed)
811
812 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800813 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800814 obj = bsn_l3_interface_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800815 _type_len = reader.read("!L")[0]
816 assert(_type_len == 198660)
817 obj.value = reader.read("!L")[0]
818 return obj
819
820 def __eq__(self, other):
821 if type(self) != type(other): return False
822 if self.value != other.value: return False
823 return True
824
Rich Laned9e3f7b2013-11-04 11:40:43 -0800825 def pretty_print(self, q):
826 q.text("bsn_l3_interface_class_id {")
827 with q.group():
828 with q.indent(2):
829 q.breakable()
830 q.text("value = ");
831 q.text("%#x" % self.value)
832 q.breakable()
833 q.text('}')
834
Rich Lane7dcdf022013-12-11 14:45:27 -0800835oxm.subtypes[198660] = bsn_l3_interface_class_id
836
837class bsn_l3_interface_class_id_masked(oxm):
838 type_len = 198920
Rich Laned9e3f7b2013-11-04 11:40:43 -0800839
840 def __init__(self, value=None, value_mask=None):
841 if value != None:
842 self.value = value
843 else:
844 self.value = 0
845 if value_mask != None:
846 self.value_mask = value_mask
847 else:
848 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800849 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800850
851 def pack(self):
852 packed = []
853 packed.append(struct.pack("!L", self.type_len))
854 packed.append(struct.pack("!L", self.value))
855 packed.append(struct.pack("!L", self.value_mask))
856 return ''.join(packed)
857
858 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800859 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800860 obj = bsn_l3_interface_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800861 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800862 assert(_type_len == 198920)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800863 obj.value = reader.read("!L")[0]
864 obj.value_mask = reader.read("!L")[0]
865 return obj
866
867 def __eq__(self, other):
868 if type(self) != type(other): return False
869 if self.value != other.value: return False
870 if self.value_mask != other.value_mask: return False
871 return True
872
Rich Laned9e3f7b2013-11-04 11:40:43 -0800873 def pretty_print(self, q):
874 q.text("bsn_l3_interface_class_id_masked {")
875 with q.group():
876 with q.indent(2):
877 q.breakable()
878 q.text("value = ");
879 q.text("%#x" % self.value)
880 q.text(","); q.breakable()
881 q.text("value_mask = ");
882 q.text("%#x" % self.value_mask)
883 q.breakable()
884 q.text('}')
885
Rich Lane7dcdf022013-12-11 14:45:27 -0800886oxm.subtypes[198920] = bsn_l3_interface_class_id_masked
887
888class bsn_l3_src_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800889 type_len = 199172
890
891 def __init__(self, value=None):
892 if value != None:
893 self.value = value
894 else:
895 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800896 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800897
898 def pack(self):
899 packed = []
900 packed.append(struct.pack("!L", self.type_len))
901 packed.append(struct.pack("!L", self.value))
902 return ''.join(packed)
903
904 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800905 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800906 obj = bsn_l3_src_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800907 _type_len = reader.read("!L")[0]
908 assert(_type_len == 199172)
909 obj.value = reader.read("!L")[0]
910 return obj
911
912 def __eq__(self, other):
913 if type(self) != type(other): return False
914 if self.value != other.value: return False
915 return True
916
Rich Laned9e3f7b2013-11-04 11:40:43 -0800917 def pretty_print(self, q):
918 q.text("bsn_l3_src_class_id {")
919 with q.group():
920 with q.indent(2):
921 q.breakable()
922 q.text("value = ");
923 q.text("%#x" % self.value)
924 q.breakable()
925 q.text('}')
926
Rich Lane7dcdf022013-12-11 14:45:27 -0800927oxm.subtypes[199172] = bsn_l3_src_class_id
928
929class bsn_l3_src_class_id_masked(oxm):
930 type_len = 199432
Rich Laned9e3f7b2013-11-04 11:40:43 -0800931
932 def __init__(self, value=None, value_mask=None):
933 if value != None:
934 self.value = value
935 else:
936 self.value = 0
937 if value_mask != None:
938 self.value_mask = value_mask
939 else:
940 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800941 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800942
943 def pack(self):
944 packed = []
945 packed.append(struct.pack("!L", self.type_len))
946 packed.append(struct.pack("!L", self.value))
947 packed.append(struct.pack("!L", self.value_mask))
948 return ''.join(packed)
949
950 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800951 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800952 obj = bsn_l3_src_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800953 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800954 assert(_type_len == 199432)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800955 obj.value = reader.read("!L")[0]
956 obj.value_mask = reader.read("!L")[0]
957 return obj
958
959 def __eq__(self, other):
960 if type(self) != type(other): return False
961 if self.value != other.value: return False
962 if self.value_mask != other.value_mask: return False
963 return True
964
Rich Laned9e3f7b2013-11-04 11:40:43 -0800965 def pretty_print(self, q):
966 q.text("bsn_l3_src_class_id_masked {")
967 with q.group():
968 with q.indent(2):
969 q.breakable()
970 q.text("value = ");
971 q.text("%#x" % self.value)
972 q.text(","); q.breakable()
973 q.text("value_mask = ");
974 q.text("%#x" % self.value_mask)
975 q.breakable()
976 q.text('}')
977
Rich Lane7dcdf022013-12-11 14:45:27 -0800978oxm.subtypes[199432] = bsn_l3_src_class_id_masked
979
980class bsn_lag_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800981 type_len = 197124
982
983 def __init__(self, value=None):
984 if value != None:
985 self.value = value
986 else:
987 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800988 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800989
990 def pack(self):
991 packed = []
992 packed.append(struct.pack("!L", self.type_len))
993 packed.append(struct.pack("!L", self.value))
994 return ''.join(packed)
995
996 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800997 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800998 obj = bsn_lag_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800999 _type_len = reader.read("!L")[0]
1000 assert(_type_len == 197124)
1001 obj.value = reader.read("!L")[0]
1002 return obj
1003
1004 def __eq__(self, other):
1005 if type(self) != type(other): return False
1006 if self.value != other.value: return False
1007 return True
1008
Rich Laned9e3f7b2013-11-04 11:40:43 -08001009 def pretty_print(self, q):
1010 q.text("bsn_lag_id {")
1011 with q.group():
1012 with q.indent(2):
1013 q.breakable()
1014 q.text("value = ");
1015 q.text("%#x" % self.value)
1016 q.breakable()
1017 q.text('}')
1018
Rich Lane7dcdf022013-12-11 14:45:27 -08001019oxm.subtypes[197124] = bsn_lag_id
1020
1021class bsn_lag_id_masked(oxm):
1022 type_len = 197384
Rich Laned9e3f7b2013-11-04 11:40:43 -08001023
1024 def __init__(self, value=None, value_mask=None):
1025 if value != None:
1026 self.value = value
1027 else:
1028 self.value = 0
1029 if value_mask != None:
1030 self.value_mask = value_mask
1031 else:
1032 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001033 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001034
1035 def pack(self):
1036 packed = []
1037 packed.append(struct.pack("!L", self.type_len))
1038 packed.append(struct.pack("!L", self.value))
1039 packed.append(struct.pack("!L", self.value_mask))
1040 return ''.join(packed)
1041
1042 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001043 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001044 obj = bsn_lag_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001045 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001046 assert(_type_len == 197384)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001047 obj.value = reader.read("!L")[0]
1048 obj.value_mask = reader.read("!L")[0]
1049 return obj
1050
1051 def __eq__(self, other):
1052 if type(self) != type(other): return False
1053 if self.value != other.value: return False
1054 if self.value_mask != other.value_mask: return False
1055 return True
1056
Rich Laned9e3f7b2013-11-04 11:40:43 -08001057 def pretty_print(self, q):
1058 q.text("bsn_lag_id_masked {")
1059 with q.group():
1060 with q.indent(2):
1061 q.breakable()
1062 q.text("value = ");
1063 q.text("%#x" % self.value)
1064 q.text(","); q.breakable()
1065 q.text("value_mask = ");
1066 q.text("%#x" % self.value_mask)
1067 q.breakable()
1068 q.text('}')
1069
Rich Lane7dcdf022013-12-11 14:45:27 -08001070oxm.subtypes[197384] = bsn_lag_id_masked
1071
1072class bsn_vrf(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001073 type_len = 197636
1074
1075 def __init__(self, value=None):
1076 if value != None:
1077 self.value = value
1078 else:
1079 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001080 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001081
1082 def pack(self):
1083 packed = []
1084 packed.append(struct.pack("!L", self.type_len))
1085 packed.append(struct.pack("!L", self.value))
1086 return ''.join(packed)
1087
1088 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001089 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001090 obj = bsn_vrf()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001091 _type_len = reader.read("!L")[0]
1092 assert(_type_len == 197636)
1093 obj.value = reader.read("!L")[0]
1094 return obj
1095
1096 def __eq__(self, other):
1097 if type(self) != type(other): return False
1098 if self.value != other.value: return False
1099 return True
1100
Rich Laned9e3f7b2013-11-04 11:40:43 -08001101 def pretty_print(self, q):
1102 q.text("bsn_vrf {")
1103 with q.group():
1104 with q.indent(2):
1105 q.breakable()
1106 q.text("value = ");
1107 q.text("%#x" % self.value)
1108 q.breakable()
1109 q.text('}')
1110
Rich Lane7dcdf022013-12-11 14:45:27 -08001111oxm.subtypes[197636] = bsn_vrf
1112
1113class bsn_vrf_masked(oxm):
1114 type_len = 197896
Rich Laned9e3f7b2013-11-04 11:40:43 -08001115
1116 def __init__(self, value=None, value_mask=None):
1117 if value != None:
1118 self.value = value
1119 else:
1120 self.value = 0
1121 if value_mask != None:
1122 self.value_mask = value_mask
1123 else:
1124 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001125 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001126
1127 def pack(self):
1128 packed = []
1129 packed.append(struct.pack("!L", self.type_len))
1130 packed.append(struct.pack("!L", self.value))
1131 packed.append(struct.pack("!L", self.value_mask))
1132 return ''.join(packed)
1133
1134 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001135 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001136 obj = bsn_vrf_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001137 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001138 assert(_type_len == 197896)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001139 obj.value = reader.read("!L")[0]
1140 obj.value_mask = reader.read("!L")[0]
1141 return obj
1142
1143 def __eq__(self, other):
1144 if type(self) != type(other): return False
1145 if self.value != other.value: return False
1146 if self.value_mask != other.value_mask: return False
1147 return True
1148
Rich Laned9e3f7b2013-11-04 11:40:43 -08001149 def pretty_print(self, q):
1150 q.text("bsn_vrf_masked {")
1151 with q.group():
1152 with q.indent(2):
1153 q.breakable()
1154 q.text("value = ");
1155 q.text("%#x" % self.value)
1156 q.text(","); q.breakable()
1157 q.text("value_mask = ");
1158 q.text("%#x" % self.value_mask)
1159 q.breakable()
1160 q.text('}')
1161
Rich Lane7dcdf022013-12-11 14:45:27 -08001162oxm.subtypes[197896] = bsn_vrf_masked
1163
1164class eth_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001165 type_len = 2147485190
Rich Lanec2ee4b82013-04-24 17:12:38 -07001166
1167 def __init__(self, value=None):
1168 if value != None:
1169 self.value = value
1170 else:
1171 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001172 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001173
1174 def pack(self):
1175 packed = []
1176 packed.append(struct.pack("!L", self.type_len))
1177 packed.append(struct.pack("!6B", *self.value))
1178 return ''.join(packed)
1179
1180 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001181 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001182 obj = eth_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07001183 _type_len = reader.read("!L")[0]
1184 assert(_type_len == 2147485190)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001185 obj.value = list(reader.read('!6B'))
1186 return obj
1187
1188 def __eq__(self, other):
1189 if type(self) != type(other): return False
1190 if self.value != other.value: return False
1191 return True
1192
Rich Lanec2ee4b82013-04-24 17:12:38 -07001193 def pretty_print(self, q):
1194 q.text("eth_dst {")
1195 with q.group():
1196 with q.indent(2):
1197 q.breakable()
1198 q.text("value = ");
1199 q.text(util.pretty_mac(self.value))
1200 q.breakable()
1201 q.text('}')
1202
Rich Lane7dcdf022013-12-11 14:45:27 -08001203oxm.subtypes[2147485190] = eth_dst
1204
1205class eth_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001206 type_len = 2147485452
Rich Lanec2ee4b82013-04-24 17:12:38 -07001207
1208 def __init__(self, value=None, value_mask=None):
1209 if value != None:
1210 self.value = value
1211 else:
1212 self.value = [0,0,0,0,0,0]
1213 if value_mask != None:
1214 self.value_mask = value_mask
1215 else:
1216 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001217 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001218
1219 def pack(self):
1220 packed = []
1221 packed.append(struct.pack("!L", self.type_len))
1222 packed.append(struct.pack("!6B", *self.value))
1223 packed.append(struct.pack("!6B", *self.value_mask))
1224 return ''.join(packed)
1225
1226 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001227 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001228 obj = eth_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001229 _type_len = reader.read("!L")[0]
1230 assert(_type_len == 2147485452)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001231 obj.value = list(reader.read('!6B'))
1232 obj.value_mask = list(reader.read('!6B'))
1233 return obj
1234
1235 def __eq__(self, other):
1236 if type(self) != type(other): return False
1237 if self.value != other.value: return False
1238 if self.value_mask != other.value_mask: return False
1239 return True
1240
Rich Lanec2ee4b82013-04-24 17:12:38 -07001241 def pretty_print(self, q):
1242 q.text("eth_dst_masked {")
1243 with q.group():
1244 with q.indent(2):
1245 q.breakable()
1246 q.text("value = ");
1247 q.text(util.pretty_mac(self.value))
1248 q.text(","); q.breakable()
1249 q.text("value_mask = ");
1250 q.text(util.pretty_mac(self.value_mask))
1251 q.breakable()
1252 q.text('}')
1253
Rich Lane7dcdf022013-12-11 14:45:27 -08001254oxm.subtypes[2147485452] = eth_dst_masked
1255
1256class eth_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001257 type_len = 2147485702
Rich Lanec2ee4b82013-04-24 17:12:38 -07001258
1259 def __init__(self, value=None):
1260 if value != None:
1261 self.value = value
1262 else:
1263 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001264 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001265
1266 def pack(self):
1267 packed = []
1268 packed.append(struct.pack("!L", self.type_len))
1269 packed.append(struct.pack("!6B", *self.value))
1270 return ''.join(packed)
1271
1272 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001273 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001274 obj = eth_src()
Dan Talaycof6202252013-07-02 01:00:29 -07001275 _type_len = reader.read("!L")[0]
1276 assert(_type_len == 2147485702)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001277 obj.value = list(reader.read('!6B'))
1278 return obj
1279
1280 def __eq__(self, other):
1281 if type(self) != type(other): return False
1282 if self.value != other.value: return False
1283 return True
1284
Rich Lanec2ee4b82013-04-24 17:12:38 -07001285 def pretty_print(self, q):
1286 q.text("eth_src {")
1287 with q.group():
1288 with q.indent(2):
1289 q.breakable()
1290 q.text("value = ");
1291 q.text(util.pretty_mac(self.value))
1292 q.breakable()
1293 q.text('}')
1294
Rich Lane7dcdf022013-12-11 14:45:27 -08001295oxm.subtypes[2147485702] = eth_src
1296
1297class eth_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001298 type_len = 2147485964
Rich Lanec2ee4b82013-04-24 17:12:38 -07001299
1300 def __init__(self, value=None, value_mask=None):
1301 if value != None:
1302 self.value = value
1303 else:
1304 self.value = [0,0,0,0,0,0]
1305 if value_mask != None:
1306 self.value_mask = value_mask
1307 else:
1308 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001309 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001310
1311 def pack(self):
1312 packed = []
1313 packed.append(struct.pack("!L", self.type_len))
1314 packed.append(struct.pack("!6B", *self.value))
1315 packed.append(struct.pack("!6B", *self.value_mask))
1316 return ''.join(packed)
1317
1318 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001319 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001320 obj = eth_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001321 _type_len = reader.read("!L")[0]
1322 assert(_type_len == 2147485964)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001323 obj.value = list(reader.read('!6B'))
1324 obj.value_mask = list(reader.read('!6B'))
1325 return obj
1326
1327 def __eq__(self, other):
1328 if type(self) != type(other): return False
1329 if self.value != other.value: return False
1330 if self.value_mask != other.value_mask: return False
1331 return True
1332
Rich Lanec2ee4b82013-04-24 17:12:38 -07001333 def pretty_print(self, q):
1334 q.text("eth_src_masked {")
1335 with q.group():
1336 with q.indent(2):
1337 q.breakable()
1338 q.text("value = ");
1339 q.text(util.pretty_mac(self.value))
1340 q.text(","); q.breakable()
1341 q.text("value_mask = ");
1342 q.text(util.pretty_mac(self.value_mask))
1343 q.breakable()
1344 q.text('}')
1345
Rich Lane7dcdf022013-12-11 14:45:27 -08001346oxm.subtypes[2147485964] = eth_src_masked
1347
1348class eth_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001349 type_len = 2147486210
Rich Lanec2ee4b82013-04-24 17:12:38 -07001350
1351 def __init__(self, value=None):
1352 if value != None:
1353 self.value = value
1354 else:
1355 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001356 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001357
1358 def pack(self):
1359 packed = []
1360 packed.append(struct.pack("!L", self.type_len))
1361 packed.append(struct.pack("!H", self.value))
1362 return ''.join(packed)
1363
1364 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001365 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001366 obj = eth_type()
Dan Talaycof6202252013-07-02 01:00:29 -07001367 _type_len = reader.read("!L")[0]
1368 assert(_type_len == 2147486210)
1369 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001370 return obj
1371
1372 def __eq__(self, other):
1373 if type(self) != type(other): return False
1374 if self.value != other.value: return False
1375 return True
1376
Rich Lanec2ee4b82013-04-24 17:12:38 -07001377 def pretty_print(self, q):
1378 q.text("eth_type {")
1379 with q.group():
1380 with q.indent(2):
1381 q.breakable()
1382 q.text("value = ");
1383 q.text("%#x" % self.value)
1384 q.breakable()
1385 q.text('}')
1386
Rich Lane7dcdf022013-12-11 14:45:27 -08001387oxm.subtypes[2147486210] = eth_type
1388
1389class eth_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001390 type_len = 2147486468
Rich Lanec2ee4b82013-04-24 17:12:38 -07001391
1392 def __init__(self, value=None, value_mask=None):
1393 if value != None:
1394 self.value = value
1395 else:
1396 self.value = 0
1397 if value_mask != None:
1398 self.value_mask = value_mask
1399 else:
1400 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001401 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001402
1403 def pack(self):
1404 packed = []
1405 packed.append(struct.pack("!L", self.type_len))
1406 packed.append(struct.pack("!H", self.value))
1407 packed.append(struct.pack("!H", self.value_mask))
1408 return ''.join(packed)
1409
1410 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001411 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001412 obj = eth_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001413 _type_len = reader.read("!L")[0]
1414 assert(_type_len == 2147486468)
1415 obj.value = reader.read("!H")[0]
1416 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001417 return obj
1418
1419 def __eq__(self, other):
1420 if type(self) != type(other): return False
1421 if self.value != other.value: return False
1422 if self.value_mask != other.value_mask: return False
1423 return True
1424
Rich Lanec2ee4b82013-04-24 17:12:38 -07001425 def pretty_print(self, q):
1426 q.text("eth_type_masked {")
1427 with q.group():
1428 with q.indent(2):
1429 q.breakable()
1430 q.text("value = ");
1431 q.text("%#x" % self.value)
1432 q.text(","); q.breakable()
1433 q.text("value_mask = ");
1434 q.text("%#x" % self.value_mask)
1435 q.breakable()
1436 q.text('}')
1437
Rich Lane7dcdf022013-12-11 14:45:27 -08001438oxm.subtypes[2147486468] = eth_type_masked
1439
1440class icmpv4_code(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001441 type_len = 2147493889
Rich Lanec2ee4b82013-04-24 17:12:38 -07001442
1443 def __init__(self, value=None):
1444 if value != None:
1445 self.value = value
1446 else:
1447 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001448 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001449
1450 def pack(self):
1451 packed = []
1452 packed.append(struct.pack("!L", self.type_len))
1453 packed.append(struct.pack("!B", self.value))
1454 return ''.join(packed)
1455
1456 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001457 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001458 obj = icmpv4_code()
Dan Talaycof6202252013-07-02 01:00:29 -07001459 _type_len = reader.read("!L")[0]
1460 assert(_type_len == 2147493889)
1461 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001462 return obj
1463
1464 def __eq__(self, other):
1465 if type(self) != type(other): return False
1466 if self.value != other.value: return False
1467 return True
1468
Rich Lanec2ee4b82013-04-24 17:12:38 -07001469 def pretty_print(self, q):
1470 q.text("icmpv4_code {")
1471 with q.group():
1472 with q.indent(2):
1473 q.breakable()
1474 q.text("value = ");
1475 q.text("%#x" % self.value)
1476 q.breakable()
1477 q.text('}')
1478
Rich Lane7dcdf022013-12-11 14:45:27 -08001479oxm.subtypes[2147493889] = icmpv4_code
1480
1481class icmpv4_code_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001482 type_len = 2147494146
Rich Lanec2ee4b82013-04-24 17:12:38 -07001483
1484 def __init__(self, value=None, value_mask=None):
1485 if value != None:
1486 self.value = value
1487 else:
1488 self.value = 0
1489 if value_mask != None:
1490 self.value_mask = value_mask
1491 else:
1492 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001493 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001494
1495 def pack(self):
1496 packed = []
1497 packed.append(struct.pack("!L", self.type_len))
1498 packed.append(struct.pack("!B", self.value))
1499 packed.append(struct.pack("!B", self.value_mask))
1500 return ''.join(packed)
1501
1502 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001503 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001504 obj = icmpv4_code_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001505 _type_len = reader.read("!L")[0]
1506 assert(_type_len == 2147494146)
1507 obj.value = reader.read("!B")[0]
1508 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001509 return obj
1510
1511 def __eq__(self, other):
1512 if type(self) != type(other): return False
1513 if self.value != other.value: return False
1514 if self.value_mask != other.value_mask: return False
1515 return True
1516
Rich Lanec2ee4b82013-04-24 17:12:38 -07001517 def pretty_print(self, q):
1518 q.text("icmpv4_code_masked {")
1519 with q.group():
1520 with q.indent(2):
1521 q.breakable()
1522 q.text("value = ");
1523 q.text("%#x" % self.value)
1524 q.text(","); q.breakable()
1525 q.text("value_mask = ");
1526 q.text("%#x" % self.value_mask)
1527 q.breakable()
1528 q.text('}')
1529
Rich Lane7dcdf022013-12-11 14:45:27 -08001530oxm.subtypes[2147494146] = icmpv4_code_masked
1531
1532class icmpv4_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001533 type_len = 2147493377
Rich Lanec2ee4b82013-04-24 17:12:38 -07001534
1535 def __init__(self, value=None):
1536 if value != None:
1537 self.value = value
1538 else:
1539 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001540 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001541
1542 def pack(self):
1543 packed = []
1544 packed.append(struct.pack("!L", self.type_len))
1545 packed.append(struct.pack("!B", self.value))
1546 return ''.join(packed)
1547
1548 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001549 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001550 obj = icmpv4_type()
Dan Talaycof6202252013-07-02 01:00:29 -07001551 _type_len = reader.read("!L")[0]
1552 assert(_type_len == 2147493377)
1553 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001554 return obj
1555
1556 def __eq__(self, other):
1557 if type(self) != type(other): return False
1558 if self.value != other.value: return False
1559 return True
1560
Rich Lanec2ee4b82013-04-24 17:12:38 -07001561 def pretty_print(self, q):
1562 q.text("icmpv4_type {")
1563 with q.group():
1564 with q.indent(2):
1565 q.breakable()
1566 q.text("value = ");
1567 q.text("%#x" % self.value)
1568 q.breakable()
1569 q.text('}')
1570
Rich Lane7dcdf022013-12-11 14:45:27 -08001571oxm.subtypes[2147493377] = icmpv4_type
1572
1573class icmpv4_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001574 type_len = 2147493634
Rich Lanec2ee4b82013-04-24 17:12:38 -07001575
1576 def __init__(self, value=None, value_mask=None):
1577 if value != None:
1578 self.value = value
1579 else:
1580 self.value = 0
1581 if value_mask != None:
1582 self.value_mask = value_mask
1583 else:
1584 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001585 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001586
1587 def pack(self):
1588 packed = []
1589 packed.append(struct.pack("!L", self.type_len))
1590 packed.append(struct.pack("!B", self.value))
1591 packed.append(struct.pack("!B", self.value_mask))
1592 return ''.join(packed)
1593
1594 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001595 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001596 obj = icmpv4_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001597 _type_len = reader.read("!L")[0]
1598 assert(_type_len == 2147493634)
1599 obj.value = reader.read("!B")[0]
1600 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001601 return obj
1602
1603 def __eq__(self, other):
1604 if type(self) != type(other): return False
1605 if self.value != other.value: return False
1606 if self.value_mask != other.value_mask: return False
1607 return True
1608
Rich Lanec2ee4b82013-04-24 17:12:38 -07001609 def pretty_print(self, q):
1610 q.text("icmpv4_type_masked {")
1611 with q.group():
1612 with q.indent(2):
1613 q.breakable()
1614 q.text("value = ");
1615 q.text("%#x" % self.value)
1616 q.text(","); q.breakable()
1617 q.text("value_mask = ");
1618 q.text("%#x" % self.value_mask)
1619 q.breakable()
1620 q.text('}')
1621
Rich Lane7dcdf022013-12-11 14:45:27 -08001622oxm.subtypes[2147493634] = icmpv4_type_masked
1623
1624class icmpv6_code(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001625 type_len = 2147499009
Rich Lanec2ee4b82013-04-24 17:12:38 -07001626
1627 def __init__(self, value=None):
1628 if value != None:
1629 self.value = value
1630 else:
1631 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001632 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001633
1634 def pack(self):
1635 packed = []
1636 packed.append(struct.pack("!L", self.type_len))
1637 packed.append(struct.pack("!B", self.value))
1638 return ''.join(packed)
1639
1640 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001641 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001642 obj = icmpv6_code()
Dan Talaycof6202252013-07-02 01:00:29 -07001643 _type_len = reader.read("!L")[0]
1644 assert(_type_len == 2147499009)
1645 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001646 return obj
1647
1648 def __eq__(self, other):
1649 if type(self) != type(other): return False
1650 if self.value != other.value: return False
1651 return True
1652
Rich Lanec2ee4b82013-04-24 17:12:38 -07001653 def pretty_print(self, q):
1654 q.text("icmpv6_code {")
1655 with q.group():
1656 with q.indent(2):
1657 q.breakable()
1658 q.text("value = ");
1659 q.text("%#x" % self.value)
1660 q.breakable()
1661 q.text('}')
1662
Rich Lane7dcdf022013-12-11 14:45:27 -08001663oxm.subtypes[2147499009] = icmpv6_code
1664
1665class icmpv6_code_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001666 type_len = 2147499266
Rich Lanec2ee4b82013-04-24 17:12:38 -07001667
1668 def __init__(self, value=None, value_mask=None):
1669 if value != None:
1670 self.value = value
1671 else:
1672 self.value = 0
1673 if value_mask != None:
1674 self.value_mask = value_mask
1675 else:
1676 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001677 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001678
1679 def pack(self):
1680 packed = []
1681 packed.append(struct.pack("!L", self.type_len))
1682 packed.append(struct.pack("!B", self.value))
1683 packed.append(struct.pack("!B", self.value_mask))
1684 return ''.join(packed)
1685
1686 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001687 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001688 obj = icmpv6_code_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001689 _type_len = reader.read("!L")[0]
1690 assert(_type_len == 2147499266)
1691 obj.value = reader.read("!B")[0]
1692 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001693 return obj
1694
1695 def __eq__(self, other):
1696 if type(self) != type(other): return False
1697 if self.value != other.value: return False
1698 if self.value_mask != other.value_mask: return False
1699 return True
1700
Rich Lanec2ee4b82013-04-24 17:12:38 -07001701 def pretty_print(self, q):
1702 q.text("icmpv6_code_masked {")
1703 with q.group():
1704 with q.indent(2):
1705 q.breakable()
1706 q.text("value = ");
1707 q.text("%#x" % self.value)
1708 q.text(","); q.breakable()
1709 q.text("value_mask = ");
1710 q.text("%#x" % self.value_mask)
1711 q.breakable()
1712 q.text('}')
1713
Rich Lane7dcdf022013-12-11 14:45:27 -08001714oxm.subtypes[2147499266] = icmpv6_code_masked
1715
1716class icmpv6_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001717 type_len = 2147498497
Rich Lanec2ee4b82013-04-24 17:12:38 -07001718
1719 def __init__(self, value=None):
1720 if value != None:
1721 self.value = value
1722 else:
1723 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001724 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001725
1726 def pack(self):
1727 packed = []
1728 packed.append(struct.pack("!L", self.type_len))
1729 packed.append(struct.pack("!B", self.value))
1730 return ''.join(packed)
1731
1732 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001733 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001734 obj = icmpv6_type()
Dan Talaycof6202252013-07-02 01:00:29 -07001735 _type_len = reader.read("!L")[0]
1736 assert(_type_len == 2147498497)
1737 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001738 return obj
1739
1740 def __eq__(self, other):
1741 if type(self) != type(other): return False
1742 if self.value != other.value: return False
1743 return True
1744
Rich Lanec2ee4b82013-04-24 17:12:38 -07001745 def pretty_print(self, q):
1746 q.text("icmpv6_type {")
1747 with q.group():
1748 with q.indent(2):
1749 q.breakable()
1750 q.text("value = ");
1751 q.text("%#x" % self.value)
1752 q.breakable()
1753 q.text('}')
1754
Rich Lane7dcdf022013-12-11 14:45:27 -08001755oxm.subtypes[2147498497] = icmpv6_type
1756
1757class icmpv6_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001758 type_len = 2147498754
Rich Lanec2ee4b82013-04-24 17:12:38 -07001759
1760 def __init__(self, value=None, value_mask=None):
1761 if value != None:
1762 self.value = value
1763 else:
1764 self.value = 0
1765 if value_mask != None:
1766 self.value_mask = value_mask
1767 else:
1768 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001769 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001770
1771 def pack(self):
1772 packed = []
1773 packed.append(struct.pack("!L", self.type_len))
1774 packed.append(struct.pack("!B", self.value))
1775 packed.append(struct.pack("!B", self.value_mask))
1776 return ''.join(packed)
1777
1778 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001779 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001780 obj = icmpv6_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001781 _type_len = reader.read("!L")[0]
1782 assert(_type_len == 2147498754)
1783 obj.value = reader.read("!B")[0]
1784 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001785 return obj
1786
1787 def __eq__(self, other):
1788 if type(self) != type(other): return False
1789 if self.value != other.value: return False
1790 if self.value_mask != other.value_mask: return False
1791 return True
1792
Rich Lanec2ee4b82013-04-24 17:12:38 -07001793 def pretty_print(self, q):
1794 q.text("icmpv6_type_masked {")
1795 with q.group():
1796 with q.indent(2):
1797 q.breakable()
1798 q.text("value = ");
1799 q.text("%#x" % self.value)
1800 q.text(","); q.breakable()
1801 q.text("value_mask = ");
1802 q.text("%#x" % self.value_mask)
1803 q.breakable()
1804 q.text('}')
1805
Rich Lane7dcdf022013-12-11 14:45:27 -08001806oxm.subtypes[2147498754] = icmpv6_type_masked
1807
1808class in_phy_port(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001809 type_len = 2147484164
Rich Lanec2ee4b82013-04-24 17:12:38 -07001810
1811 def __init__(self, value=None):
1812 if value != None:
1813 self.value = value
1814 else:
1815 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001816 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001817
1818 def pack(self):
1819 packed = []
1820 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07001821 packed.append(util.pack_port_no(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07001822 return ''.join(packed)
1823
1824 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001825 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001826 obj = in_phy_port()
Dan Talaycof6202252013-07-02 01:00:29 -07001827 _type_len = reader.read("!L")[0]
1828 assert(_type_len == 2147484164)
1829 obj.value = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001830 return obj
1831
1832 def __eq__(self, other):
1833 if type(self) != type(other): return False
1834 if self.value != other.value: return False
1835 return True
1836
Rich Lanec2ee4b82013-04-24 17:12:38 -07001837 def pretty_print(self, q):
1838 q.text("in_phy_port {")
1839 with q.group():
1840 with q.indent(2):
1841 q.breakable()
1842 q.text("value = ");
1843 q.text(util.pretty_port(self.value))
1844 q.breakable()
1845 q.text('}')
1846
Rich Lane7dcdf022013-12-11 14:45:27 -08001847oxm.subtypes[2147484164] = in_phy_port
1848
1849class in_phy_port_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001850 type_len = 2147484424
Rich Lanec2ee4b82013-04-24 17:12:38 -07001851
1852 def __init__(self, value=None, value_mask=None):
1853 if value != None:
1854 self.value = value
1855 else:
1856 self.value = 0
1857 if value_mask != None:
1858 self.value_mask = value_mask
1859 else:
1860 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001861 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001862
1863 def pack(self):
1864 packed = []
1865 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07001866 packed.append(util.pack_port_no(self.value))
1867 packed.append(util.pack_port_no(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07001868 return ''.join(packed)
1869
1870 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001871 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001872 obj = in_phy_port_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001873 _type_len = reader.read("!L")[0]
1874 assert(_type_len == 2147484424)
1875 obj.value = util.unpack_port_no(reader)
1876 obj.value_mask = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001877 return obj
1878
1879 def __eq__(self, other):
1880 if type(self) != type(other): return False
1881 if self.value != other.value: return False
1882 if self.value_mask != other.value_mask: return False
1883 return True
1884
Rich Lanec2ee4b82013-04-24 17:12:38 -07001885 def pretty_print(self, q):
1886 q.text("in_phy_port_masked {")
1887 with q.group():
1888 with q.indent(2):
1889 q.breakable()
1890 q.text("value = ");
1891 q.text(util.pretty_port(self.value))
1892 q.text(","); q.breakable()
1893 q.text("value_mask = ");
1894 q.text(util.pretty_port(self.value_mask))
1895 q.breakable()
1896 q.text('}')
1897
Rich Lane7dcdf022013-12-11 14:45:27 -08001898oxm.subtypes[2147484424] = in_phy_port_masked
1899
1900class in_port(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001901 type_len = 2147483652
Rich Lanec2ee4b82013-04-24 17:12:38 -07001902
1903 def __init__(self, value=None):
1904 if value != None:
1905 self.value = value
1906 else:
1907 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001908 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001909
1910 def pack(self):
1911 packed = []
1912 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07001913 packed.append(util.pack_port_no(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07001914 return ''.join(packed)
1915
1916 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001917 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001918 obj = in_port()
Dan Talaycof6202252013-07-02 01:00:29 -07001919 _type_len = reader.read("!L")[0]
1920 assert(_type_len == 2147483652)
1921 obj.value = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001922 return obj
1923
1924 def __eq__(self, other):
1925 if type(self) != type(other): return False
1926 if self.value != other.value: return False
1927 return True
1928
Rich Lanec2ee4b82013-04-24 17:12:38 -07001929 def pretty_print(self, q):
1930 q.text("in_port {")
1931 with q.group():
1932 with q.indent(2):
1933 q.breakable()
1934 q.text("value = ");
1935 q.text(util.pretty_port(self.value))
1936 q.breakable()
1937 q.text('}')
1938
Rich Lane7dcdf022013-12-11 14:45:27 -08001939oxm.subtypes[2147483652] = in_port
1940
1941class in_port_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001942 type_len = 2147483912
Rich Lanec2ee4b82013-04-24 17:12:38 -07001943
1944 def __init__(self, value=None, value_mask=None):
1945 if value != None:
1946 self.value = value
1947 else:
1948 self.value = 0
1949 if value_mask != None:
1950 self.value_mask = value_mask
1951 else:
1952 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001953 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001954
1955 def pack(self):
1956 packed = []
1957 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07001958 packed.append(util.pack_port_no(self.value))
1959 packed.append(util.pack_port_no(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07001960 return ''.join(packed)
1961
1962 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001963 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001964 obj = in_port_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001965 _type_len = reader.read("!L")[0]
1966 assert(_type_len == 2147483912)
1967 obj.value = util.unpack_port_no(reader)
1968 obj.value_mask = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001969 return obj
1970
1971 def __eq__(self, other):
1972 if type(self) != type(other): return False
1973 if self.value != other.value: return False
1974 if self.value_mask != other.value_mask: return False
1975 return True
1976
Rich Lanec2ee4b82013-04-24 17:12:38 -07001977 def pretty_print(self, q):
1978 q.text("in_port_masked {")
1979 with q.group():
1980 with q.indent(2):
1981 q.breakable()
1982 q.text("value = ");
1983 q.text(util.pretty_port(self.value))
1984 q.text(","); q.breakable()
1985 q.text("value_mask = ");
1986 q.text(util.pretty_port(self.value_mask))
1987 q.breakable()
1988 q.text('}')
1989
Rich Lane7dcdf022013-12-11 14:45:27 -08001990oxm.subtypes[2147483912] = in_port_masked
1991
1992class ip_dscp(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001993 type_len = 2147487745
Rich Lanec2ee4b82013-04-24 17:12:38 -07001994
1995 def __init__(self, value=None):
1996 if value != None:
1997 self.value = value
1998 else:
1999 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002000 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002001
2002 def pack(self):
2003 packed = []
2004 packed.append(struct.pack("!L", self.type_len))
2005 packed.append(struct.pack("!B", self.value))
2006 return ''.join(packed)
2007
2008 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002009 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002010 obj = ip_dscp()
Dan Talaycof6202252013-07-02 01:00:29 -07002011 _type_len = reader.read("!L")[0]
2012 assert(_type_len == 2147487745)
2013 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002014 return obj
2015
2016 def __eq__(self, other):
2017 if type(self) != type(other): return False
2018 if self.value != other.value: return False
2019 return True
2020
Rich Lanec2ee4b82013-04-24 17:12:38 -07002021 def pretty_print(self, q):
2022 q.text("ip_dscp {")
2023 with q.group():
2024 with q.indent(2):
2025 q.breakable()
2026 q.text("value = ");
2027 q.text("%#x" % self.value)
2028 q.breakable()
2029 q.text('}')
2030
Rich Lane7dcdf022013-12-11 14:45:27 -08002031oxm.subtypes[2147487745] = ip_dscp
2032
2033class ip_dscp_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002034 type_len = 2147488002
Rich Lanec2ee4b82013-04-24 17:12:38 -07002035
2036 def __init__(self, value=None, value_mask=None):
2037 if value != None:
2038 self.value = value
2039 else:
2040 self.value = 0
2041 if value_mask != None:
2042 self.value_mask = value_mask
2043 else:
2044 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002045 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002046
2047 def pack(self):
2048 packed = []
2049 packed.append(struct.pack("!L", self.type_len))
2050 packed.append(struct.pack("!B", self.value))
2051 packed.append(struct.pack("!B", self.value_mask))
2052 return ''.join(packed)
2053
2054 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002055 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002056 obj = ip_dscp_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002057 _type_len = reader.read("!L")[0]
2058 assert(_type_len == 2147488002)
2059 obj.value = reader.read("!B")[0]
2060 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002061 return obj
2062
2063 def __eq__(self, other):
2064 if type(self) != type(other): return False
2065 if self.value != other.value: return False
2066 if self.value_mask != other.value_mask: return False
2067 return True
2068
Rich Lanec2ee4b82013-04-24 17:12:38 -07002069 def pretty_print(self, q):
2070 q.text("ip_dscp_masked {")
2071 with q.group():
2072 with q.indent(2):
2073 q.breakable()
2074 q.text("value = ");
2075 q.text("%#x" % self.value)
2076 q.text(","); q.breakable()
2077 q.text("value_mask = ");
2078 q.text("%#x" % self.value_mask)
2079 q.breakable()
2080 q.text('}')
2081
Rich Lane7dcdf022013-12-11 14:45:27 -08002082oxm.subtypes[2147488002] = ip_dscp_masked
2083
2084class ip_ecn(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002085 type_len = 2147488257
Rich Lanec2ee4b82013-04-24 17:12:38 -07002086
2087 def __init__(self, value=None):
2088 if value != None:
2089 self.value = value
2090 else:
2091 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002092 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002093
2094 def pack(self):
2095 packed = []
2096 packed.append(struct.pack("!L", self.type_len))
2097 packed.append(struct.pack("!B", self.value))
2098 return ''.join(packed)
2099
2100 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002101 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002102 obj = ip_ecn()
Dan Talaycof6202252013-07-02 01:00:29 -07002103 _type_len = reader.read("!L")[0]
2104 assert(_type_len == 2147488257)
2105 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002106 return obj
2107
2108 def __eq__(self, other):
2109 if type(self) != type(other): return False
2110 if self.value != other.value: return False
2111 return True
2112
Rich Lanec2ee4b82013-04-24 17:12:38 -07002113 def pretty_print(self, q):
2114 q.text("ip_ecn {")
2115 with q.group():
2116 with q.indent(2):
2117 q.breakable()
2118 q.text("value = ");
2119 q.text("%#x" % self.value)
2120 q.breakable()
2121 q.text('}')
2122
Rich Lane7dcdf022013-12-11 14:45:27 -08002123oxm.subtypes[2147488257] = ip_ecn
2124
2125class ip_ecn_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002126 type_len = 2147488514
Rich Lanec2ee4b82013-04-24 17:12:38 -07002127
2128 def __init__(self, value=None, value_mask=None):
2129 if value != None:
2130 self.value = value
2131 else:
2132 self.value = 0
2133 if value_mask != None:
2134 self.value_mask = value_mask
2135 else:
2136 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002137 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002138
2139 def pack(self):
2140 packed = []
2141 packed.append(struct.pack("!L", self.type_len))
2142 packed.append(struct.pack("!B", self.value))
2143 packed.append(struct.pack("!B", self.value_mask))
2144 return ''.join(packed)
2145
2146 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002147 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002148 obj = ip_ecn_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002149 _type_len = reader.read("!L")[0]
2150 assert(_type_len == 2147488514)
2151 obj.value = reader.read("!B")[0]
2152 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002153 return obj
2154
2155 def __eq__(self, other):
2156 if type(self) != type(other): return False
2157 if self.value != other.value: return False
2158 if self.value_mask != other.value_mask: return False
2159 return True
2160
Rich Lanec2ee4b82013-04-24 17:12:38 -07002161 def pretty_print(self, q):
2162 q.text("ip_ecn_masked {")
2163 with q.group():
2164 with q.indent(2):
2165 q.breakable()
2166 q.text("value = ");
2167 q.text("%#x" % self.value)
2168 q.text(","); q.breakable()
2169 q.text("value_mask = ");
2170 q.text("%#x" % self.value_mask)
2171 q.breakable()
2172 q.text('}')
2173
Rich Lane7dcdf022013-12-11 14:45:27 -08002174oxm.subtypes[2147488514] = ip_ecn_masked
2175
2176class ip_proto(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002177 type_len = 2147488769
Rich Lanec2ee4b82013-04-24 17:12:38 -07002178
2179 def __init__(self, value=None):
2180 if value != None:
2181 self.value = value
2182 else:
2183 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002184 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002185
2186 def pack(self):
2187 packed = []
2188 packed.append(struct.pack("!L", self.type_len))
2189 packed.append(struct.pack("!B", self.value))
2190 return ''.join(packed)
2191
2192 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002193 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002194 obj = ip_proto()
Dan Talaycof6202252013-07-02 01:00:29 -07002195 _type_len = reader.read("!L")[0]
2196 assert(_type_len == 2147488769)
2197 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002198 return obj
2199
2200 def __eq__(self, other):
2201 if type(self) != type(other): return False
2202 if self.value != other.value: return False
2203 return True
2204
Rich Lanec2ee4b82013-04-24 17:12:38 -07002205 def pretty_print(self, q):
2206 q.text("ip_proto {")
2207 with q.group():
2208 with q.indent(2):
2209 q.breakable()
2210 q.text("value = ");
2211 q.text("%#x" % self.value)
2212 q.breakable()
2213 q.text('}')
2214
Rich Lane7dcdf022013-12-11 14:45:27 -08002215oxm.subtypes[2147488769] = ip_proto
2216
2217class ip_proto_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002218 type_len = 2147489026
Rich Lanec2ee4b82013-04-24 17:12:38 -07002219
2220 def __init__(self, value=None, value_mask=None):
2221 if value != None:
2222 self.value = value
2223 else:
2224 self.value = 0
2225 if value_mask != None:
2226 self.value_mask = value_mask
2227 else:
2228 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002229 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002230
2231 def pack(self):
2232 packed = []
2233 packed.append(struct.pack("!L", self.type_len))
2234 packed.append(struct.pack("!B", self.value))
2235 packed.append(struct.pack("!B", self.value_mask))
2236 return ''.join(packed)
2237
2238 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002239 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002240 obj = ip_proto_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002241 _type_len = reader.read("!L")[0]
2242 assert(_type_len == 2147489026)
2243 obj.value = reader.read("!B")[0]
2244 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002245 return obj
2246
2247 def __eq__(self, other):
2248 if type(self) != type(other): return False
2249 if self.value != other.value: return False
2250 if self.value_mask != other.value_mask: return False
2251 return True
2252
Rich Lanec2ee4b82013-04-24 17:12:38 -07002253 def pretty_print(self, q):
2254 q.text("ip_proto_masked {")
2255 with q.group():
2256 with q.indent(2):
2257 q.breakable()
2258 q.text("value = ");
2259 q.text("%#x" % self.value)
2260 q.text(","); q.breakable()
2261 q.text("value_mask = ");
2262 q.text("%#x" % self.value_mask)
2263 q.breakable()
2264 q.text('}')
2265
Rich Lane7dcdf022013-12-11 14:45:27 -08002266oxm.subtypes[2147489026] = ip_proto_masked
2267
2268class ipv4_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002269 type_len = 2147489796
Rich Lanec2ee4b82013-04-24 17:12:38 -07002270
2271 def __init__(self, value=None):
2272 if value != None:
2273 self.value = value
2274 else:
2275 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002276 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002277
2278 def pack(self):
2279 packed = []
2280 packed.append(struct.pack("!L", self.type_len))
2281 packed.append(struct.pack("!L", self.value))
2282 return ''.join(packed)
2283
2284 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002285 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002286 obj = ipv4_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07002287 _type_len = reader.read("!L")[0]
2288 assert(_type_len == 2147489796)
2289 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002290 return obj
2291
2292 def __eq__(self, other):
2293 if type(self) != type(other): return False
2294 if self.value != other.value: return False
2295 return True
2296
Rich Lanec2ee4b82013-04-24 17:12:38 -07002297 def pretty_print(self, q):
2298 q.text("ipv4_dst {")
2299 with q.group():
2300 with q.indent(2):
2301 q.breakable()
2302 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07002303 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002304 q.breakable()
2305 q.text('}')
2306
Rich Lane7dcdf022013-12-11 14:45:27 -08002307oxm.subtypes[2147489796] = ipv4_dst
2308
2309class ipv4_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002310 type_len = 2147490056
Rich Lanec2ee4b82013-04-24 17:12:38 -07002311
2312 def __init__(self, value=None, value_mask=None):
2313 if value != None:
2314 self.value = value
2315 else:
2316 self.value = 0
2317 if value_mask != None:
2318 self.value_mask = value_mask
2319 else:
2320 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002321 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002322
2323 def pack(self):
2324 packed = []
2325 packed.append(struct.pack("!L", self.type_len))
2326 packed.append(struct.pack("!L", self.value))
2327 packed.append(struct.pack("!L", self.value_mask))
2328 return ''.join(packed)
2329
2330 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002331 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002332 obj = ipv4_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002333 _type_len = reader.read("!L")[0]
2334 assert(_type_len == 2147490056)
2335 obj.value = reader.read("!L")[0]
2336 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002337 return obj
2338
2339 def __eq__(self, other):
2340 if type(self) != type(other): return False
2341 if self.value != other.value: return False
2342 if self.value_mask != other.value_mask: return False
2343 return True
2344
Rich Lanec2ee4b82013-04-24 17:12:38 -07002345 def pretty_print(self, q):
2346 q.text("ipv4_dst_masked {")
2347 with q.group():
2348 with q.indent(2):
2349 q.breakable()
2350 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07002351 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002352 q.text(","); q.breakable()
2353 q.text("value_mask = ");
Rich Laned53156a2013-08-05 17:17:33 -07002354 q.text(util.pretty_ipv4(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002355 q.breakable()
2356 q.text('}')
2357
Rich Lane7dcdf022013-12-11 14:45:27 -08002358oxm.subtypes[2147490056] = ipv4_dst_masked
2359
2360class ipv4_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002361 type_len = 2147489284
Rich Lanec2ee4b82013-04-24 17:12:38 -07002362
2363 def __init__(self, value=None):
2364 if value != None:
2365 self.value = value
2366 else:
2367 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002368 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002369
2370 def pack(self):
2371 packed = []
2372 packed.append(struct.pack("!L", self.type_len))
2373 packed.append(struct.pack("!L", self.value))
2374 return ''.join(packed)
2375
2376 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002377 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002378 obj = ipv4_src()
Dan Talaycof6202252013-07-02 01:00:29 -07002379 _type_len = reader.read("!L")[0]
2380 assert(_type_len == 2147489284)
2381 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002382 return obj
2383
2384 def __eq__(self, other):
2385 if type(self) != type(other): return False
2386 if self.value != other.value: return False
2387 return True
2388
Rich Lanec2ee4b82013-04-24 17:12:38 -07002389 def pretty_print(self, q):
2390 q.text("ipv4_src {")
2391 with q.group():
2392 with q.indent(2):
2393 q.breakable()
2394 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07002395 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002396 q.breakable()
2397 q.text('}')
2398
Rich Lane7dcdf022013-12-11 14:45:27 -08002399oxm.subtypes[2147489284] = ipv4_src
2400
2401class ipv4_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002402 type_len = 2147489544
Rich Lanec2ee4b82013-04-24 17:12:38 -07002403
2404 def __init__(self, value=None, value_mask=None):
2405 if value != None:
2406 self.value = value
2407 else:
2408 self.value = 0
2409 if value_mask != None:
2410 self.value_mask = value_mask
2411 else:
2412 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002413 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002414
2415 def pack(self):
2416 packed = []
2417 packed.append(struct.pack("!L", self.type_len))
2418 packed.append(struct.pack("!L", self.value))
2419 packed.append(struct.pack("!L", self.value_mask))
2420 return ''.join(packed)
2421
2422 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002423 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002424 obj = ipv4_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002425 _type_len = reader.read("!L")[0]
2426 assert(_type_len == 2147489544)
2427 obj.value = reader.read("!L")[0]
2428 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002429 return obj
2430
2431 def __eq__(self, other):
2432 if type(self) != type(other): return False
2433 if self.value != other.value: return False
2434 if self.value_mask != other.value_mask: return False
2435 return True
2436
Rich Lanec2ee4b82013-04-24 17:12:38 -07002437 def pretty_print(self, q):
2438 q.text("ipv4_src_masked {")
2439 with q.group():
2440 with q.indent(2):
2441 q.breakable()
2442 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07002443 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002444 q.text(","); q.breakable()
2445 q.text("value_mask = ");
Rich Laned53156a2013-08-05 17:17:33 -07002446 q.text(util.pretty_ipv4(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002447 q.breakable()
2448 q.text('}')
2449
Rich Lane7dcdf022013-12-11 14:45:27 -08002450oxm.subtypes[2147489544] = ipv4_src_masked
2451
2452class ipv6_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002453 type_len = 2147497488
Rich Lanec2ee4b82013-04-24 17:12:38 -07002454
2455 def __init__(self, value=None):
2456 if value != None:
2457 self.value = value
2458 else:
2459 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Rich Lane7dcdf022013-12-11 14:45:27 -08002460 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002461
2462 def pack(self):
2463 packed = []
2464 packed.append(struct.pack("!L", self.type_len))
2465 packed.append(struct.pack("!16s", self.value))
2466 return ''.join(packed)
2467
2468 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002469 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002470 obj = ipv6_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07002471 _type_len = reader.read("!L")[0]
2472 assert(_type_len == 2147497488)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002473 obj.value = reader.read('!16s')[0]
2474 return obj
2475
2476 def __eq__(self, other):
2477 if type(self) != type(other): return False
2478 if self.value != other.value: return False
2479 return True
2480
Rich Lanec2ee4b82013-04-24 17:12:38 -07002481 def pretty_print(self, q):
2482 q.text("ipv6_dst {")
2483 with q.group():
2484 with q.indent(2):
2485 q.breakable()
2486 q.text("value = ");
2487 q.pp(self.value)
2488 q.breakable()
2489 q.text('}')
2490
Rich Lane7dcdf022013-12-11 14:45:27 -08002491oxm.subtypes[2147497488] = ipv6_dst
2492
2493class ipv6_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002494 type_len = 2147497760
Rich Lanec2ee4b82013-04-24 17:12:38 -07002495
2496 def __init__(self, value=None, value_mask=None):
2497 if value != None:
2498 self.value = value
2499 else:
2500 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2501 if value_mask != None:
2502 self.value_mask = value_mask
2503 else:
2504 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 -08002505 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002506
2507 def pack(self):
2508 packed = []
2509 packed.append(struct.pack("!L", self.type_len))
2510 packed.append(struct.pack("!16s", self.value))
2511 packed.append(struct.pack("!16s", self.value_mask))
2512 return ''.join(packed)
2513
2514 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002515 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002516 obj = ipv6_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002517 _type_len = reader.read("!L")[0]
2518 assert(_type_len == 2147497760)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002519 obj.value = reader.read('!16s')[0]
2520 obj.value_mask = reader.read('!16s')[0]
2521 return obj
2522
2523 def __eq__(self, other):
2524 if type(self) != type(other): return False
2525 if self.value != other.value: return False
2526 if self.value_mask != other.value_mask: return False
2527 return True
2528
Rich Lanec2ee4b82013-04-24 17:12:38 -07002529 def pretty_print(self, q):
2530 q.text("ipv6_dst_masked {")
2531 with q.group():
2532 with q.indent(2):
2533 q.breakable()
2534 q.text("value = ");
2535 q.pp(self.value)
2536 q.text(","); q.breakable()
2537 q.text("value_mask = ");
2538 q.pp(self.value_mask)
2539 q.breakable()
2540 q.text('}')
2541
Rich Lane7dcdf022013-12-11 14:45:27 -08002542oxm.subtypes[2147497760] = ipv6_dst_masked
2543
2544class ipv6_flabel(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002545 type_len = 2147497988
Rich Lanec2ee4b82013-04-24 17:12:38 -07002546
2547 def __init__(self, value=None):
2548 if value != None:
2549 self.value = value
2550 else:
2551 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002552 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002553
2554 def pack(self):
2555 packed = []
2556 packed.append(struct.pack("!L", self.type_len))
2557 packed.append(struct.pack("!L", self.value))
2558 return ''.join(packed)
2559
2560 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002561 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002562 obj = ipv6_flabel()
Dan Talaycof6202252013-07-02 01:00:29 -07002563 _type_len = reader.read("!L")[0]
2564 assert(_type_len == 2147497988)
2565 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002566 return obj
2567
2568 def __eq__(self, other):
2569 if type(self) != type(other): return False
2570 if self.value != other.value: return False
2571 return True
2572
Rich Lanec2ee4b82013-04-24 17:12:38 -07002573 def pretty_print(self, q):
2574 q.text("ipv6_flabel {")
2575 with q.group():
2576 with q.indent(2):
2577 q.breakable()
2578 q.text("value = ");
2579 q.text("%#x" % self.value)
2580 q.breakable()
2581 q.text('}')
2582
Rich Lane7dcdf022013-12-11 14:45:27 -08002583oxm.subtypes[2147497988] = ipv6_flabel
2584
2585class ipv6_flabel_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002586 type_len = 2147498248
Rich Lanec2ee4b82013-04-24 17:12:38 -07002587
2588 def __init__(self, value=None, value_mask=None):
2589 if value != None:
2590 self.value = value
2591 else:
2592 self.value = 0
2593 if value_mask != None:
2594 self.value_mask = value_mask
2595 else:
2596 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002597 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002598
2599 def pack(self):
2600 packed = []
2601 packed.append(struct.pack("!L", self.type_len))
2602 packed.append(struct.pack("!L", self.value))
2603 packed.append(struct.pack("!L", self.value_mask))
2604 return ''.join(packed)
2605
2606 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002607 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002608 obj = ipv6_flabel_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002609 _type_len = reader.read("!L")[0]
2610 assert(_type_len == 2147498248)
2611 obj.value = reader.read("!L")[0]
2612 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002613 return obj
2614
2615 def __eq__(self, other):
2616 if type(self) != type(other): return False
2617 if self.value != other.value: return False
2618 if self.value_mask != other.value_mask: return False
2619 return True
2620
Rich Lanec2ee4b82013-04-24 17:12:38 -07002621 def pretty_print(self, q):
2622 q.text("ipv6_flabel_masked {")
2623 with q.group():
2624 with q.indent(2):
2625 q.breakable()
2626 q.text("value = ");
2627 q.text("%#x" % self.value)
2628 q.text(","); q.breakable()
2629 q.text("value_mask = ");
2630 q.text("%#x" % self.value_mask)
2631 q.breakable()
2632 q.text('}')
2633
Rich Lane7dcdf022013-12-11 14:45:27 -08002634oxm.subtypes[2147498248] = ipv6_flabel_masked
2635
2636class ipv6_nd_sll(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002637 type_len = 2147500038
Rich Lanec2ee4b82013-04-24 17:12:38 -07002638
2639 def __init__(self, value=None):
2640 if value != None:
2641 self.value = value
2642 else:
2643 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002644 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002645
2646 def pack(self):
2647 packed = []
2648 packed.append(struct.pack("!L", self.type_len))
2649 packed.append(struct.pack("!6B", *self.value))
2650 return ''.join(packed)
2651
2652 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002653 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002654 obj = ipv6_nd_sll()
Dan Talaycof6202252013-07-02 01:00:29 -07002655 _type_len = reader.read("!L")[0]
2656 assert(_type_len == 2147500038)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002657 obj.value = list(reader.read('!6B'))
2658 return obj
2659
2660 def __eq__(self, other):
2661 if type(self) != type(other): return False
2662 if self.value != other.value: return False
2663 return True
2664
Rich Lanec2ee4b82013-04-24 17:12:38 -07002665 def pretty_print(self, q):
2666 q.text("ipv6_nd_sll {")
2667 with q.group():
2668 with q.indent(2):
2669 q.breakable()
2670 q.text("value = ");
2671 q.text(util.pretty_mac(self.value))
2672 q.breakable()
2673 q.text('}')
2674
Rich Lane7dcdf022013-12-11 14:45:27 -08002675oxm.subtypes[2147500038] = ipv6_nd_sll
2676
2677class ipv6_nd_sll_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002678 type_len = 2147500300
Rich Lanec2ee4b82013-04-24 17:12:38 -07002679
2680 def __init__(self, value=None, value_mask=None):
2681 if value != None:
2682 self.value = value
2683 else:
2684 self.value = [0,0,0,0,0,0]
2685 if value_mask != None:
2686 self.value_mask = value_mask
2687 else:
2688 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002689 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002690
2691 def pack(self):
2692 packed = []
2693 packed.append(struct.pack("!L", self.type_len))
2694 packed.append(struct.pack("!6B", *self.value))
2695 packed.append(struct.pack("!6B", *self.value_mask))
2696 return ''.join(packed)
2697
2698 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002699 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002700 obj = ipv6_nd_sll_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002701 _type_len = reader.read("!L")[0]
2702 assert(_type_len == 2147500300)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002703 obj.value = list(reader.read('!6B'))
2704 obj.value_mask = list(reader.read('!6B'))
2705 return obj
2706
2707 def __eq__(self, other):
2708 if type(self) != type(other): return False
2709 if self.value != other.value: return False
2710 if self.value_mask != other.value_mask: return False
2711 return True
2712
Rich Lanec2ee4b82013-04-24 17:12:38 -07002713 def pretty_print(self, q):
2714 q.text("ipv6_nd_sll_masked {")
2715 with q.group():
2716 with q.indent(2):
2717 q.breakable()
2718 q.text("value = ");
2719 q.text(util.pretty_mac(self.value))
2720 q.text(","); q.breakable()
2721 q.text("value_mask = ");
2722 q.text(util.pretty_mac(self.value_mask))
2723 q.breakable()
2724 q.text('}')
2725
Rich Lane7dcdf022013-12-11 14:45:27 -08002726oxm.subtypes[2147500300] = ipv6_nd_sll_masked
2727
2728class ipv6_nd_target(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002729 type_len = 2147499536
Rich Lanec2ee4b82013-04-24 17:12:38 -07002730
2731 def __init__(self, value=None):
2732 if value != None:
2733 self.value = value
2734 else:
2735 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Rich Lane7dcdf022013-12-11 14:45:27 -08002736 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002737
2738 def pack(self):
2739 packed = []
2740 packed.append(struct.pack("!L", self.type_len))
2741 packed.append(struct.pack("!16s", self.value))
2742 return ''.join(packed)
2743
2744 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002745 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002746 obj = ipv6_nd_target()
Dan Talaycof6202252013-07-02 01:00:29 -07002747 _type_len = reader.read("!L")[0]
2748 assert(_type_len == 2147499536)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002749 obj.value = reader.read('!16s')[0]
2750 return obj
2751
2752 def __eq__(self, other):
2753 if type(self) != type(other): return False
2754 if self.value != other.value: return False
2755 return True
2756
Rich Lanec2ee4b82013-04-24 17:12:38 -07002757 def pretty_print(self, q):
2758 q.text("ipv6_nd_target {")
2759 with q.group():
2760 with q.indent(2):
2761 q.breakable()
2762 q.text("value = ");
2763 q.pp(self.value)
2764 q.breakable()
2765 q.text('}')
2766
Rich Lane7dcdf022013-12-11 14:45:27 -08002767oxm.subtypes[2147499536] = ipv6_nd_target
2768
2769class ipv6_nd_target_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002770 type_len = 2147499808
Rich Lanec2ee4b82013-04-24 17:12:38 -07002771
2772 def __init__(self, value=None, value_mask=None):
2773 if value != None:
2774 self.value = value
2775 else:
2776 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2777 if value_mask != None:
2778 self.value_mask = value_mask
2779 else:
2780 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 -08002781 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002782
2783 def pack(self):
2784 packed = []
2785 packed.append(struct.pack("!L", self.type_len))
2786 packed.append(struct.pack("!16s", self.value))
2787 packed.append(struct.pack("!16s", self.value_mask))
2788 return ''.join(packed)
2789
2790 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002791 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002792 obj = ipv6_nd_target_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002793 _type_len = reader.read("!L")[0]
2794 assert(_type_len == 2147499808)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002795 obj.value = reader.read('!16s')[0]
2796 obj.value_mask = reader.read('!16s')[0]
2797 return obj
2798
2799 def __eq__(self, other):
2800 if type(self) != type(other): return False
2801 if self.value != other.value: return False
2802 if self.value_mask != other.value_mask: return False
2803 return True
2804
Rich Lanec2ee4b82013-04-24 17:12:38 -07002805 def pretty_print(self, q):
2806 q.text("ipv6_nd_target_masked {")
2807 with q.group():
2808 with q.indent(2):
2809 q.breakable()
2810 q.text("value = ");
2811 q.pp(self.value)
2812 q.text(","); q.breakable()
2813 q.text("value_mask = ");
2814 q.pp(self.value_mask)
2815 q.breakable()
2816 q.text('}')
2817
Rich Lane7dcdf022013-12-11 14:45:27 -08002818oxm.subtypes[2147499808] = ipv6_nd_target_masked
2819
2820class ipv6_nd_tll(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002821 type_len = 2147500550
Rich Lanec2ee4b82013-04-24 17:12:38 -07002822
2823 def __init__(self, value=None):
2824 if value != None:
2825 self.value = value
2826 else:
2827 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002828 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002829
2830 def pack(self):
2831 packed = []
2832 packed.append(struct.pack("!L", self.type_len))
2833 packed.append(struct.pack("!6B", *self.value))
2834 return ''.join(packed)
2835
2836 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002837 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002838 obj = ipv6_nd_tll()
Dan Talaycof6202252013-07-02 01:00:29 -07002839 _type_len = reader.read("!L")[0]
2840 assert(_type_len == 2147500550)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002841 obj.value = list(reader.read('!6B'))
2842 return obj
2843
2844 def __eq__(self, other):
2845 if type(self) != type(other): return False
2846 if self.value != other.value: return False
2847 return True
2848
Rich Lanec2ee4b82013-04-24 17:12:38 -07002849 def pretty_print(self, q):
2850 q.text("ipv6_nd_tll {")
2851 with q.group():
2852 with q.indent(2):
2853 q.breakable()
2854 q.text("value = ");
2855 q.text(util.pretty_mac(self.value))
2856 q.breakable()
2857 q.text('}')
2858
Rich Lane7dcdf022013-12-11 14:45:27 -08002859oxm.subtypes[2147500550] = ipv6_nd_tll
2860
2861class ipv6_nd_tll_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002862 type_len = 2147500812
Rich Lanec2ee4b82013-04-24 17:12:38 -07002863
2864 def __init__(self, value=None, value_mask=None):
2865 if value != None:
2866 self.value = value
2867 else:
2868 self.value = [0,0,0,0,0,0]
2869 if value_mask != None:
2870 self.value_mask = value_mask
2871 else:
2872 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002873 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002874
2875 def pack(self):
2876 packed = []
2877 packed.append(struct.pack("!L", self.type_len))
2878 packed.append(struct.pack("!6B", *self.value))
2879 packed.append(struct.pack("!6B", *self.value_mask))
2880 return ''.join(packed)
2881
2882 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002883 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002884 obj = ipv6_nd_tll_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002885 _type_len = reader.read("!L")[0]
2886 assert(_type_len == 2147500812)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002887 obj.value = list(reader.read('!6B'))
2888 obj.value_mask = list(reader.read('!6B'))
2889 return obj
2890
2891 def __eq__(self, other):
2892 if type(self) != type(other): return False
2893 if self.value != other.value: return False
2894 if self.value_mask != other.value_mask: return False
2895 return True
2896
Rich Lanec2ee4b82013-04-24 17:12:38 -07002897 def pretty_print(self, q):
2898 q.text("ipv6_nd_tll_masked {")
2899 with q.group():
2900 with q.indent(2):
2901 q.breakable()
2902 q.text("value = ");
2903 q.text(util.pretty_mac(self.value))
2904 q.text(","); q.breakable()
2905 q.text("value_mask = ");
2906 q.text(util.pretty_mac(self.value_mask))
2907 q.breakable()
2908 q.text('}')
2909
Rich Lane7dcdf022013-12-11 14:45:27 -08002910oxm.subtypes[2147500812] = ipv6_nd_tll_masked
2911
2912class ipv6_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002913 type_len = 2147496976
Rich Lanec2ee4b82013-04-24 17:12:38 -07002914
2915 def __init__(self, value=None):
2916 if value != None:
2917 self.value = value
2918 else:
2919 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Rich Lane7dcdf022013-12-11 14:45:27 -08002920 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002921
2922 def pack(self):
2923 packed = []
2924 packed.append(struct.pack("!L", self.type_len))
2925 packed.append(struct.pack("!16s", self.value))
2926 return ''.join(packed)
2927
2928 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002929 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002930 obj = ipv6_src()
Dan Talaycof6202252013-07-02 01:00:29 -07002931 _type_len = reader.read("!L")[0]
2932 assert(_type_len == 2147496976)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002933 obj.value = reader.read('!16s')[0]
2934 return obj
2935
2936 def __eq__(self, other):
2937 if type(self) != type(other): return False
2938 if self.value != other.value: return False
2939 return True
2940
Rich Lanec2ee4b82013-04-24 17:12:38 -07002941 def pretty_print(self, q):
2942 q.text("ipv6_src {")
2943 with q.group():
2944 with q.indent(2):
2945 q.breakable()
2946 q.text("value = ");
2947 q.pp(self.value)
2948 q.breakable()
2949 q.text('}')
2950
Rich Lane7dcdf022013-12-11 14:45:27 -08002951oxm.subtypes[2147496976] = ipv6_src
2952
2953class ipv6_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002954 type_len = 2147497248
Rich Lanec2ee4b82013-04-24 17:12:38 -07002955
2956 def __init__(self, value=None, value_mask=None):
2957 if value != None:
2958 self.value = value
2959 else:
2960 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2961 if value_mask != None:
2962 self.value_mask = value_mask
2963 else:
2964 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 -08002965 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002966
2967 def pack(self):
2968 packed = []
2969 packed.append(struct.pack("!L", self.type_len))
2970 packed.append(struct.pack("!16s", self.value))
2971 packed.append(struct.pack("!16s", self.value_mask))
2972 return ''.join(packed)
2973
2974 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002975 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002976 obj = ipv6_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002977 _type_len = reader.read("!L")[0]
2978 assert(_type_len == 2147497248)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002979 obj.value = reader.read('!16s')[0]
2980 obj.value_mask = reader.read('!16s')[0]
2981 return obj
2982
2983 def __eq__(self, other):
2984 if type(self) != type(other): return False
2985 if self.value != other.value: return False
2986 if self.value_mask != other.value_mask: return False
2987 return True
2988
Rich Lanec2ee4b82013-04-24 17:12:38 -07002989 def pretty_print(self, q):
2990 q.text("ipv6_src_masked {")
2991 with q.group():
2992 with q.indent(2):
2993 q.breakable()
2994 q.text("value = ");
2995 q.pp(self.value)
2996 q.text(","); q.breakable()
2997 q.text("value_mask = ");
2998 q.pp(self.value_mask)
2999 q.breakable()
3000 q.text('}')
3001
Rich Lane7dcdf022013-12-11 14:45:27 -08003002oxm.subtypes[2147497248] = ipv6_src_masked
3003
3004class metadata(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003005 type_len = 2147484680
Rich Lanec2ee4b82013-04-24 17:12:38 -07003006
3007 def __init__(self, value=None):
3008 if value != None:
3009 self.value = value
3010 else:
3011 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003012 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003013
3014 def pack(self):
3015 packed = []
3016 packed.append(struct.pack("!L", self.type_len))
3017 packed.append(struct.pack("!Q", self.value))
3018 return ''.join(packed)
3019
3020 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003021 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003022 obj = metadata()
Dan Talaycof6202252013-07-02 01:00:29 -07003023 _type_len = reader.read("!L")[0]
3024 assert(_type_len == 2147484680)
3025 obj.value = reader.read("!Q")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003026 return obj
3027
3028 def __eq__(self, other):
3029 if type(self) != type(other): return False
3030 if self.value != other.value: return False
3031 return True
3032
Rich Lanec2ee4b82013-04-24 17:12:38 -07003033 def pretty_print(self, q):
3034 q.text("metadata {")
3035 with q.group():
3036 with q.indent(2):
3037 q.breakable()
3038 q.text("value = ");
3039 q.text("%#x" % self.value)
3040 q.breakable()
3041 q.text('}')
3042
Rich Lane7dcdf022013-12-11 14:45:27 -08003043oxm.subtypes[2147484680] = metadata
3044
3045class metadata_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003046 type_len = 2147484944
Rich Lanec2ee4b82013-04-24 17:12:38 -07003047
3048 def __init__(self, value=None, value_mask=None):
3049 if value != None:
3050 self.value = value
3051 else:
3052 self.value = 0
3053 if value_mask != None:
3054 self.value_mask = value_mask
3055 else:
3056 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003057 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003058
3059 def pack(self):
3060 packed = []
3061 packed.append(struct.pack("!L", self.type_len))
3062 packed.append(struct.pack("!Q", self.value))
3063 packed.append(struct.pack("!Q", self.value_mask))
3064 return ''.join(packed)
3065
3066 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003067 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003068 obj = metadata_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003069 _type_len = reader.read("!L")[0]
3070 assert(_type_len == 2147484944)
3071 obj.value = reader.read("!Q")[0]
3072 obj.value_mask = reader.read("!Q")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003073 return obj
3074
3075 def __eq__(self, other):
3076 if type(self) != type(other): return False
3077 if self.value != other.value: return False
3078 if self.value_mask != other.value_mask: return False
3079 return True
3080
Rich Lanec2ee4b82013-04-24 17:12:38 -07003081 def pretty_print(self, q):
3082 q.text("metadata_masked {")
3083 with q.group():
3084 with q.indent(2):
3085 q.breakable()
3086 q.text("value = ");
3087 q.text("%#x" % self.value)
3088 q.text(","); q.breakable()
3089 q.text("value_mask = ");
3090 q.text("%#x" % self.value_mask)
3091 q.breakable()
3092 q.text('}')
3093
Rich Lane7dcdf022013-12-11 14:45:27 -08003094oxm.subtypes[2147484944] = metadata_masked
3095
3096class mpls_label(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003097 type_len = 2147501060
Rich Lanec2ee4b82013-04-24 17:12:38 -07003098
3099 def __init__(self, value=None):
3100 if value != None:
3101 self.value = value
3102 else:
3103 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003104 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003105
3106 def pack(self):
3107 packed = []
3108 packed.append(struct.pack("!L", self.type_len))
3109 packed.append(struct.pack("!L", self.value))
3110 return ''.join(packed)
3111
3112 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003113 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003114 obj = mpls_label()
Dan Talaycof6202252013-07-02 01:00:29 -07003115 _type_len = reader.read("!L")[0]
3116 assert(_type_len == 2147501060)
3117 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003118 return obj
3119
3120 def __eq__(self, other):
3121 if type(self) != type(other): return False
3122 if self.value != other.value: return False
3123 return True
3124
Rich Lanec2ee4b82013-04-24 17:12:38 -07003125 def pretty_print(self, q):
3126 q.text("mpls_label {")
3127 with q.group():
3128 with q.indent(2):
3129 q.breakable()
3130 q.text("value = ");
3131 q.text("%#x" % self.value)
3132 q.breakable()
3133 q.text('}')
3134
Rich Lane7dcdf022013-12-11 14:45:27 -08003135oxm.subtypes[2147501060] = mpls_label
3136
3137class mpls_label_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003138 type_len = 2147501320
Rich Lanec2ee4b82013-04-24 17:12:38 -07003139
3140 def __init__(self, value=None, value_mask=None):
3141 if value != None:
3142 self.value = value
3143 else:
3144 self.value = 0
3145 if value_mask != None:
3146 self.value_mask = value_mask
3147 else:
3148 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003149 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003150
3151 def pack(self):
3152 packed = []
3153 packed.append(struct.pack("!L", self.type_len))
3154 packed.append(struct.pack("!L", self.value))
3155 packed.append(struct.pack("!L", self.value_mask))
3156 return ''.join(packed)
3157
3158 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003159 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003160 obj = mpls_label_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003161 _type_len = reader.read("!L")[0]
3162 assert(_type_len == 2147501320)
3163 obj.value = reader.read("!L")[0]
3164 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003165 return obj
3166
3167 def __eq__(self, other):
3168 if type(self) != type(other): return False
3169 if self.value != other.value: return False
3170 if self.value_mask != other.value_mask: return False
3171 return True
3172
Rich Lanec2ee4b82013-04-24 17:12:38 -07003173 def pretty_print(self, q):
3174 q.text("mpls_label_masked {")
3175 with q.group():
3176 with q.indent(2):
3177 q.breakable()
3178 q.text("value = ");
3179 q.text("%#x" % self.value)
3180 q.text(","); q.breakable()
3181 q.text("value_mask = ");
3182 q.text("%#x" % self.value_mask)
3183 q.breakable()
3184 q.text('}')
3185
Rich Lane7dcdf022013-12-11 14:45:27 -08003186oxm.subtypes[2147501320] = mpls_label_masked
3187
3188class mpls_tc(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003189 type_len = 2147501569
Rich Lanec2ee4b82013-04-24 17:12:38 -07003190
3191 def __init__(self, value=None):
3192 if value != None:
3193 self.value = value
3194 else:
3195 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003196 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003197
3198 def pack(self):
3199 packed = []
3200 packed.append(struct.pack("!L", self.type_len))
3201 packed.append(struct.pack("!B", self.value))
3202 return ''.join(packed)
3203
3204 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003205 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003206 obj = mpls_tc()
Dan Talaycof6202252013-07-02 01:00:29 -07003207 _type_len = reader.read("!L")[0]
3208 assert(_type_len == 2147501569)
3209 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003210 return obj
3211
3212 def __eq__(self, other):
3213 if type(self) != type(other): return False
3214 if self.value != other.value: return False
3215 return True
3216
Rich Lanec2ee4b82013-04-24 17:12:38 -07003217 def pretty_print(self, q):
3218 q.text("mpls_tc {")
3219 with q.group():
3220 with q.indent(2):
3221 q.breakable()
3222 q.text("value = ");
3223 q.text("%#x" % self.value)
3224 q.breakable()
3225 q.text('}')
3226
Rich Lane7dcdf022013-12-11 14:45:27 -08003227oxm.subtypes[2147501569] = mpls_tc
3228
3229class mpls_tc_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003230 type_len = 2147501826
Rich Lanec2ee4b82013-04-24 17:12:38 -07003231
3232 def __init__(self, value=None, value_mask=None):
3233 if value != None:
3234 self.value = value
3235 else:
3236 self.value = 0
3237 if value_mask != None:
3238 self.value_mask = value_mask
3239 else:
3240 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003241 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003242
3243 def pack(self):
3244 packed = []
3245 packed.append(struct.pack("!L", self.type_len))
3246 packed.append(struct.pack("!B", self.value))
3247 packed.append(struct.pack("!B", self.value_mask))
3248 return ''.join(packed)
3249
3250 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003251 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003252 obj = mpls_tc_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003253 _type_len = reader.read("!L")[0]
3254 assert(_type_len == 2147501826)
3255 obj.value = reader.read("!B")[0]
3256 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003257 return obj
3258
3259 def __eq__(self, other):
3260 if type(self) != type(other): return False
3261 if self.value != other.value: return False
3262 if self.value_mask != other.value_mask: return False
3263 return True
3264
Rich Lanec2ee4b82013-04-24 17:12:38 -07003265 def pretty_print(self, q):
3266 q.text("mpls_tc_masked {")
3267 with q.group():
3268 with q.indent(2):
3269 q.breakable()
3270 q.text("value = ");
3271 q.text("%#x" % self.value)
3272 q.text(","); q.breakable()
3273 q.text("value_mask = ");
3274 q.text("%#x" % self.value_mask)
3275 q.breakable()
3276 q.text('}')
3277
Rich Lane7dcdf022013-12-11 14:45:27 -08003278oxm.subtypes[2147501826] = mpls_tc_masked
3279
3280class sctp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003281 type_len = 2147492866
Rich Lanec2ee4b82013-04-24 17:12:38 -07003282
3283 def __init__(self, value=None):
3284 if value != None:
3285 self.value = value
3286 else:
3287 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003288 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003289
3290 def pack(self):
3291 packed = []
3292 packed.append(struct.pack("!L", self.type_len))
3293 packed.append(struct.pack("!H", self.value))
3294 return ''.join(packed)
3295
3296 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003297 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003298 obj = sctp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003299 _type_len = reader.read("!L")[0]
3300 assert(_type_len == 2147492866)
3301 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003302 return obj
3303
3304 def __eq__(self, other):
3305 if type(self) != type(other): return False
3306 if self.value != other.value: return False
3307 return True
3308
Rich Lanec2ee4b82013-04-24 17:12:38 -07003309 def pretty_print(self, q):
3310 q.text("sctp_dst {")
3311 with q.group():
3312 with q.indent(2):
3313 q.breakable()
3314 q.text("value = ");
3315 q.text("%#x" % self.value)
3316 q.breakable()
3317 q.text('}')
3318
Rich Lane7dcdf022013-12-11 14:45:27 -08003319oxm.subtypes[2147492866] = sctp_dst
3320
3321class sctp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003322 type_len = 2147493124
Rich Lanec2ee4b82013-04-24 17:12:38 -07003323
3324 def __init__(self, value=None, value_mask=None):
3325 if value != None:
3326 self.value = value
3327 else:
3328 self.value = 0
3329 if value_mask != None:
3330 self.value_mask = value_mask
3331 else:
3332 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003333 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003334
3335 def pack(self):
3336 packed = []
3337 packed.append(struct.pack("!L", self.type_len))
3338 packed.append(struct.pack("!H", self.value))
3339 packed.append(struct.pack("!H", self.value_mask))
3340 return ''.join(packed)
3341
3342 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003343 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003344 obj = sctp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003345 _type_len = reader.read("!L")[0]
3346 assert(_type_len == 2147493124)
3347 obj.value = reader.read("!H")[0]
3348 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003349 return obj
3350
3351 def __eq__(self, other):
3352 if type(self) != type(other): return False
3353 if self.value != other.value: return False
3354 if self.value_mask != other.value_mask: return False
3355 return True
3356
Rich Lanec2ee4b82013-04-24 17:12:38 -07003357 def pretty_print(self, q):
3358 q.text("sctp_dst_masked {")
3359 with q.group():
3360 with q.indent(2):
3361 q.breakable()
3362 q.text("value = ");
3363 q.text("%#x" % self.value)
3364 q.text(","); q.breakable()
3365 q.text("value_mask = ");
3366 q.text("%#x" % self.value_mask)
3367 q.breakable()
3368 q.text('}')
3369
Rich Lane7dcdf022013-12-11 14:45:27 -08003370oxm.subtypes[2147493124] = sctp_dst_masked
3371
3372class sctp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003373 type_len = 2147492354
Rich Lanec2ee4b82013-04-24 17:12:38 -07003374
3375 def __init__(self, value=None):
3376 if value != None:
3377 self.value = value
3378 else:
3379 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003380 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003381
3382 def pack(self):
3383 packed = []
3384 packed.append(struct.pack("!L", self.type_len))
3385 packed.append(struct.pack("!H", self.value))
3386 return ''.join(packed)
3387
3388 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003389 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003390 obj = sctp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07003391 _type_len = reader.read("!L")[0]
3392 assert(_type_len == 2147492354)
3393 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003394 return obj
3395
3396 def __eq__(self, other):
3397 if type(self) != type(other): return False
3398 if self.value != other.value: return False
3399 return True
3400
Rich Lanec2ee4b82013-04-24 17:12:38 -07003401 def pretty_print(self, q):
3402 q.text("sctp_src {")
3403 with q.group():
3404 with q.indent(2):
3405 q.breakable()
3406 q.text("value = ");
3407 q.text("%#x" % self.value)
3408 q.breakable()
3409 q.text('}')
3410
Rich Lane7dcdf022013-12-11 14:45:27 -08003411oxm.subtypes[2147492354] = sctp_src
3412
3413class sctp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003414 type_len = 2147492612
Rich Lanec2ee4b82013-04-24 17:12:38 -07003415
3416 def __init__(self, value=None, value_mask=None):
3417 if value != None:
3418 self.value = value
3419 else:
3420 self.value = 0
3421 if value_mask != None:
3422 self.value_mask = value_mask
3423 else:
3424 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003425 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003426
3427 def pack(self):
3428 packed = []
3429 packed.append(struct.pack("!L", self.type_len))
3430 packed.append(struct.pack("!H", self.value))
3431 packed.append(struct.pack("!H", self.value_mask))
3432 return ''.join(packed)
3433
3434 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003435 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003436 obj = sctp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003437 _type_len = reader.read("!L")[0]
3438 assert(_type_len == 2147492612)
3439 obj.value = reader.read("!H")[0]
3440 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003441 return obj
3442
3443 def __eq__(self, other):
3444 if type(self) != type(other): return False
3445 if self.value != other.value: return False
3446 if self.value_mask != other.value_mask: return False
3447 return True
3448
Rich Lanec2ee4b82013-04-24 17:12:38 -07003449 def pretty_print(self, q):
3450 q.text("sctp_src_masked {")
3451 with q.group():
3452 with q.indent(2):
3453 q.breakable()
3454 q.text("value = ");
3455 q.text("%#x" % self.value)
3456 q.text(","); q.breakable()
3457 q.text("value_mask = ");
3458 q.text("%#x" % self.value_mask)
3459 q.breakable()
3460 q.text('}')
3461
Rich Lane7dcdf022013-12-11 14:45:27 -08003462oxm.subtypes[2147492612] = sctp_src_masked
3463
3464class tcp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003465 type_len = 2147490818
Rich Lanec2ee4b82013-04-24 17:12:38 -07003466
3467 def __init__(self, value=None):
3468 if value != None:
3469 self.value = value
3470 else:
3471 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003472 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003473
3474 def pack(self):
3475 packed = []
3476 packed.append(struct.pack("!L", self.type_len))
3477 packed.append(struct.pack("!H", self.value))
3478 return ''.join(packed)
3479
3480 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003481 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003482 obj = tcp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003483 _type_len = reader.read("!L")[0]
3484 assert(_type_len == 2147490818)
3485 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003486 return obj
3487
3488 def __eq__(self, other):
3489 if type(self) != type(other): return False
3490 if self.value != other.value: return False
3491 return True
3492
Rich Lanec2ee4b82013-04-24 17:12:38 -07003493 def pretty_print(self, q):
3494 q.text("tcp_dst {")
3495 with q.group():
3496 with q.indent(2):
3497 q.breakable()
3498 q.text("value = ");
3499 q.text("%#x" % self.value)
3500 q.breakable()
3501 q.text('}')
3502
Rich Lane7dcdf022013-12-11 14:45:27 -08003503oxm.subtypes[2147490818] = tcp_dst
3504
3505class tcp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003506 type_len = 2147491076
Rich Lanec2ee4b82013-04-24 17:12:38 -07003507
3508 def __init__(self, value=None, value_mask=None):
3509 if value != None:
3510 self.value = value
3511 else:
3512 self.value = 0
3513 if value_mask != None:
3514 self.value_mask = value_mask
3515 else:
3516 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003517 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003518
3519 def pack(self):
3520 packed = []
3521 packed.append(struct.pack("!L", self.type_len))
3522 packed.append(struct.pack("!H", self.value))
3523 packed.append(struct.pack("!H", self.value_mask))
3524 return ''.join(packed)
3525
3526 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003527 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003528 obj = tcp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003529 _type_len = reader.read("!L")[0]
3530 assert(_type_len == 2147491076)
3531 obj.value = reader.read("!H")[0]
3532 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003533 return obj
3534
3535 def __eq__(self, other):
3536 if type(self) != type(other): return False
3537 if self.value != other.value: return False
3538 if self.value_mask != other.value_mask: return False
3539 return True
3540
Rich Lanec2ee4b82013-04-24 17:12:38 -07003541 def pretty_print(self, q):
3542 q.text("tcp_dst_masked {")
3543 with q.group():
3544 with q.indent(2):
3545 q.breakable()
3546 q.text("value = ");
3547 q.text("%#x" % self.value)
3548 q.text(","); q.breakable()
3549 q.text("value_mask = ");
3550 q.text("%#x" % self.value_mask)
3551 q.breakable()
3552 q.text('}')
3553
Rich Lane7dcdf022013-12-11 14:45:27 -08003554oxm.subtypes[2147491076] = tcp_dst_masked
3555
3556class tcp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003557 type_len = 2147490306
Rich Lanec2ee4b82013-04-24 17:12:38 -07003558
3559 def __init__(self, value=None):
3560 if value != None:
3561 self.value = value
3562 else:
3563 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003564 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003565
3566 def pack(self):
3567 packed = []
3568 packed.append(struct.pack("!L", self.type_len))
3569 packed.append(struct.pack("!H", self.value))
3570 return ''.join(packed)
3571
3572 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003573 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003574 obj = tcp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07003575 _type_len = reader.read("!L")[0]
3576 assert(_type_len == 2147490306)
3577 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003578 return obj
3579
3580 def __eq__(self, other):
3581 if type(self) != type(other): return False
3582 if self.value != other.value: return False
3583 return True
3584
Rich Lanec2ee4b82013-04-24 17:12:38 -07003585 def pretty_print(self, q):
3586 q.text("tcp_src {")
3587 with q.group():
3588 with q.indent(2):
3589 q.breakable()
3590 q.text("value = ");
3591 q.text("%#x" % self.value)
3592 q.breakable()
3593 q.text('}')
3594
Rich Lane7dcdf022013-12-11 14:45:27 -08003595oxm.subtypes[2147490306] = tcp_src
3596
3597class tcp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003598 type_len = 2147490564
Rich Lanec2ee4b82013-04-24 17:12:38 -07003599
3600 def __init__(self, value=None, value_mask=None):
3601 if value != None:
3602 self.value = value
3603 else:
3604 self.value = 0
3605 if value_mask != None:
3606 self.value_mask = value_mask
3607 else:
3608 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003609 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003610
3611 def pack(self):
3612 packed = []
3613 packed.append(struct.pack("!L", self.type_len))
3614 packed.append(struct.pack("!H", self.value))
3615 packed.append(struct.pack("!H", self.value_mask))
3616 return ''.join(packed)
3617
3618 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003619 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003620 obj = tcp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003621 _type_len = reader.read("!L")[0]
3622 assert(_type_len == 2147490564)
3623 obj.value = reader.read("!H")[0]
3624 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003625 return obj
3626
3627 def __eq__(self, other):
3628 if type(self) != type(other): return False
3629 if self.value != other.value: return False
3630 if self.value_mask != other.value_mask: return False
3631 return True
3632
Rich Lanec2ee4b82013-04-24 17:12:38 -07003633 def pretty_print(self, q):
3634 q.text("tcp_src_masked {")
3635 with q.group():
3636 with q.indent(2):
3637 q.breakable()
3638 q.text("value = ");
3639 q.text("%#x" % self.value)
3640 q.text(","); q.breakable()
3641 q.text("value_mask = ");
3642 q.text("%#x" % self.value_mask)
3643 q.breakable()
3644 q.text('}')
3645
Rich Lane7dcdf022013-12-11 14:45:27 -08003646oxm.subtypes[2147490564] = tcp_src_masked
3647
3648class udp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003649 type_len = 2147491842
Rich Lanec2ee4b82013-04-24 17:12:38 -07003650
3651 def __init__(self, value=None):
3652 if value != None:
3653 self.value = value
3654 else:
3655 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003656 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003657
3658 def pack(self):
3659 packed = []
3660 packed.append(struct.pack("!L", self.type_len))
3661 packed.append(struct.pack("!H", self.value))
3662 return ''.join(packed)
3663
3664 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003665 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003666 obj = udp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003667 _type_len = reader.read("!L")[0]
3668 assert(_type_len == 2147491842)
3669 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003670 return obj
3671
3672 def __eq__(self, other):
3673 if type(self) != type(other): return False
3674 if self.value != other.value: return False
3675 return True
3676
Rich Lanec2ee4b82013-04-24 17:12:38 -07003677 def pretty_print(self, q):
3678 q.text("udp_dst {")
3679 with q.group():
3680 with q.indent(2):
3681 q.breakable()
3682 q.text("value = ");
3683 q.text("%#x" % self.value)
3684 q.breakable()
3685 q.text('}')
3686
Rich Lane7dcdf022013-12-11 14:45:27 -08003687oxm.subtypes[2147491842] = udp_dst
3688
3689class udp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003690 type_len = 2147492100
Rich Lanec2ee4b82013-04-24 17:12:38 -07003691
3692 def __init__(self, value=None, value_mask=None):
3693 if value != None:
3694 self.value = value
3695 else:
3696 self.value = 0
3697 if value_mask != None:
3698 self.value_mask = value_mask
3699 else:
3700 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003701 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003702
3703 def pack(self):
3704 packed = []
3705 packed.append(struct.pack("!L", self.type_len))
3706 packed.append(struct.pack("!H", self.value))
3707 packed.append(struct.pack("!H", self.value_mask))
3708 return ''.join(packed)
3709
3710 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003711 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003712 obj = udp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003713 _type_len = reader.read("!L")[0]
3714 assert(_type_len == 2147492100)
3715 obj.value = reader.read("!H")[0]
3716 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003717 return obj
3718
3719 def __eq__(self, other):
3720 if type(self) != type(other): return False
3721 if self.value != other.value: return False
3722 if self.value_mask != other.value_mask: return False
3723 return True
3724
Rich Lanec2ee4b82013-04-24 17:12:38 -07003725 def pretty_print(self, q):
3726 q.text("udp_dst_masked {")
3727 with q.group():
3728 with q.indent(2):
3729 q.breakable()
3730 q.text("value = ");
3731 q.text("%#x" % self.value)
3732 q.text(","); q.breakable()
3733 q.text("value_mask = ");
3734 q.text("%#x" % self.value_mask)
3735 q.breakable()
3736 q.text('}')
3737
Rich Lane7dcdf022013-12-11 14:45:27 -08003738oxm.subtypes[2147492100] = udp_dst_masked
3739
3740class udp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003741 type_len = 2147491330
Rich Lanec2ee4b82013-04-24 17:12:38 -07003742
3743 def __init__(self, value=None):
3744 if value != None:
3745 self.value = value
3746 else:
3747 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003748 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003749
3750 def pack(self):
3751 packed = []
3752 packed.append(struct.pack("!L", self.type_len))
3753 packed.append(struct.pack("!H", self.value))
3754 return ''.join(packed)
3755
3756 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003757 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003758 obj = udp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07003759 _type_len = reader.read("!L")[0]
3760 assert(_type_len == 2147491330)
3761 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003762 return obj
3763
3764 def __eq__(self, other):
3765 if type(self) != type(other): return False
3766 if self.value != other.value: return False
3767 return True
3768
Rich Lanec2ee4b82013-04-24 17:12:38 -07003769 def pretty_print(self, q):
3770 q.text("udp_src {")
3771 with q.group():
3772 with q.indent(2):
3773 q.breakable()
3774 q.text("value = ");
3775 q.text("%#x" % self.value)
3776 q.breakable()
3777 q.text('}')
3778
Rich Lane7dcdf022013-12-11 14:45:27 -08003779oxm.subtypes[2147491330] = udp_src
3780
3781class udp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003782 type_len = 2147491588
Rich Lanec2ee4b82013-04-24 17:12:38 -07003783
3784 def __init__(self, value=None, value_mask=None):
3785 if value != None:
3786 self.value = value
3787 else:
3788 self.value = 0
3789 if value_mask != None:
3790 self.value_mask = value_mask
3791 else:
3792 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003793 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003794
3795 def pack(self):
3796 packed = []
3797 packed.append(struct.pack("!L", self.type_len))
3798 packed.append(struct.pack("!H", self.value))
3799 packed.append(struct.pack("!H", self.value_mask))
3800 return ''.join(packed)
3801
3802 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003803 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003804 obj = udp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003805 _type_len = reader.read("!L")[0]
3806 assert(_type_len == 2147491588)
3807 obj.value = reader.read("!H")[0]
3808 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003809 return obj
3810
3811 def __eq__(self, other):
3812 if type(self) != type(other): return False
3813 if self.value != other.value: return False
3814 if self.value_mask != other.value_mask: return False
3815 return True
3816
Rich Lanec2ee4b82013-04-24 17:12:38 -07003817 def pretty_print(self, q):
3818 q.text("udp_src_masked {")
3819 with q.group():
3820 with q.indent(2):
3821 q.breakable()
3822 q.text("value = ");
3823 q.text("%#x" % self.value)
3824 q.text(","); q.breakable()
3825 q.text("value_mask = ");
3826 q.text("%#x" % self.value_mask)
3827 q.breakable()
3828 q.text('}')
3829
Rich Lane7dcdf022013-12-11 14:45:27 -08003830oxm.subtypes[2147491588] = udp_src_masked
3831
3832class vlan_pcp(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003833 type_len = 2147487233
Rich Lanec2ee4b82013-04-24 17:12:38 -07003834
3835 def __init__(self, value=None):
3836 if value != None:
3837 self.value = value
3838 else:
3839 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003840 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003841
3842 def pack(self):
3843 packed = []
3844 packed.append(struct.pack("!L", self.type_len))
3845 packed.append(struct.pack("!B", self.value))
3846 return ''.join(packed)
3847
3848 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003849 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003850 obj = vlan_pcp()
Dan Talaycof6202252013-07-02 01:00:29 -07003851 _type_len = reader.read("!L")[0]
3852 assert(_type_len == 2147487233)
3853 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003854 return obj
3855
3856 def __eq__(self, other):
3857 if type(self) != type(other): return False
3858 if self.value != other.value: return False
3859 return True
3860
Rich Lanec2ee4b82013-04-24 17:12:38 -07003861 def pretty_print(self, q):
3862 q.text("vlan_pcp {")
3863 with q.group():
3864 with q.indent(2):
3865 q.breakable()
3866 q.text("value = ");
3867 q.text("%#x" % self.value)
3868 q.breakable()
3869 q.text('}')
3870
Rich Lane7dcdf022013-12-11 14:45:27 -08003871oxm.subtypes[2147487233] = vlan_pcp
3872
3873class vlan_pcp_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003874 type_len = 2147487490
Rich Lanec2ee4b82013-04-24 17:12:38 -07003875
3876 def __init__(self, value=None, value_mask=None):
3877 if value != None:
3878 self.value = value
3879 else:
3880 self.value = 0
3881 if value_mask != None:
3882 self.value_mask = value_mask
3883 else:
3884 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003885 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003886
3887 def pack(self):
3888 packed = []
3889 packed.append(struct.pack("!L", self.type_len))
3890 packed.append(struct.pack("!B", self.value))
3891 packed.append(struct.pack("!B", self.value_mask))
3892 return ''.join(packed)
3893
3894 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003895 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003896 obj = vlan_pcp_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003897 _type_len = reader.read("!L")[0]
3898 assert(_type_len == 2147487490)
3899 obj.value = reader.read("!B")[0]
3900 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003901 return obj
3902
3903 def __eq__(self, other):
3904 if type(self) != type(other): return False
3905 if self.value != other.value: return False
3906 if self.value_mask != other.value_mask: return False
3907 return True
3908
Rich Lanec2ee4b82013-04-24 17:12:38 -07003909 def pretty_print(self, q):
3910 q.text("vlan_pcp_masked {")
3911 with q.group():
3912 with q.indent(2):
3913 q.breakable()
3914 q.text("value = ");
3915 q.text("%#x" % self.value)
3916 q.text(","); q.breakable()
3917 q.text("value_mask = ");
3918 q.text("%#x" % self.value_mask)
3919 q.breakable()
3920 q.text('}')
3921
Rich Lane7dcdf022013-12-11 14:45:27 -08003922oxm.subtypes[2147487490] = vlan_pcp_masked
3923
3924class vlan_vid(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003925 type_len = 2147486722
Rich Lanec2ee4b82013-04-24 17:12:38 -07003926
3927 def __init__(self, value=None):
3928 if value != None:
3929 self.value = value
3930 else:
3931 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003932 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003933
3934 def pack(self):
3935 packed = []
3936 packed.append(struct.pack("!L", self.type_len))
3937 packed.append(struct.pack("!H", self.value))
3938 return ''.join(packed)
3939
3940 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003941 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003942 obj = vlan_vid()
Dan Talaycof6202252013-07-02 01:00:29 -07003943 _type_len = reader.read("!L")[0]
3944 assert(_type_len == 2147486722)
3945 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003946 return obj
3947
3948 def __eq__(self, other):
3949 if type(self) != type(other): return False
3950 if self.value != other.value: return False
3951 return True
3952
Rich Lanec2ee4b82013-04-24 17:12:38 -07003953 def pretty_print(self, q):
3954 q.text("vlan_vid {")
3955 with q.group():
3956 with q.indent(2):
3957 q.breakable()
3958 q.text("value = ");
3959 q.text("%#x" % self.value)
3960 q.breakable()
3961 q.text('}')
3962
Rich Lane7dcdf022013-12-11 14:45:27 -08003963oxm.subtypes[2147486722] = vlan_vid
3964
3965class vlan_vid_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003966 type_len = 2147486980
Rich Lanec2ee4b82013-04-24 17:12:38 -07003967
3968 def __init__(self, value=None, value_mask=None):
3969 if value != None:
3970 self.value = value
3971 else:
3972 self.value = 0
3973 if value_mask != None:
3974 self.value_mask = value_mask
3975 else:
3976 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003977 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003978
3979 def pack(self):
3980 packed = []
3981 packed.append(struct.pack("!L", self.type_len))
3982 packed.append(struct.pack("!H", self.value))
3983 packed.append(struct.pack("!H", self.value_mask))
3984 return ''.join(packed)
3985
3986 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003987 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003988 obj = vlan_vid_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003989 _type_len = reader.read("!L")[0]
3990 assert(_type_len == 2147486980)
3991 obj.value = reader.read("!H")[0]
3992 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003993 return obj
3994
3995 def __eq__(self, other):
3996 if type(self) != type(other): return False
3997 if self.value != other.value: return False
3998 if self.value_mask != other.value_mask: return False
3999 return True
4000
Rich Lanec2ee4b82013-04-24 17:12:38 -07004001 def pretty_print(self, q):
4002 q.text("vlan_vid_masked {")
4003 with q.group():
4004 with q.indent(2):
4005 q.breakable()
4006 q.text("value = ");
4007 q.text("%#x" % self.value)
4008 q.text(","); q.breakable()
4009 q.text("value_mask = ");
4010 q.text("%#x" % self.value_mask)
4011 q.breakable()
4012 q.text('}')
4013
Rich Lane7dcdf022013-12-11 14:45:27 -08004014oxm.subtypes[2147486980] = vlan_vid_masked
Rich Lanec2ee4b82013-04-24 17:12:38 -07004015
Rich Lane7dcdf022013-12-11 14:45:27 -08004016