blob: a717a3397efbd880e6d9906cb3d1b647df0bbf6e [file] [log] [blame]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001# Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
2# Copyright (c) 2011, 2012 Open Networking Foundation
3# Copyright (c) 2012, 2013 Big Switch Networks, Inc.
Dan Talaycof6202252013-07-02 01:00:29 -07004# See the file LICENSE.pyloxi which should have been included in the source distribution
Rich Lanec2ee4b82013-04-24 17:12:38 -07005
Rich Lane7dcdf022013-12-11 14:45:27 -08006# Automatically generated by LOXI from template module.py
Rich Lanec2ee4b82013-04-24 17:12:38 -07007# Do not modify
8
9import struct
Rich Lane7dcdf022013-12-11 14:45:27 -080010import loxi
Rich Lanec2ee4b82013-04-24 17:12:38 -070011import const
Rich Lane7dcdf022013-12-11 14:45:27 -080012import common
13import action
14import instruction
15import oxm
16import action_id
17import instruction_id
18import meter_band
Rich Lane5454b682014-01-14 17:07:36 -080019import bsn_tlv
Rich Lanec2ee4b82013-04-24 17:12:38 -070020import util
21import loxi.generic_util
Rich Lanec2ee4b82013-04-24 17:12:38 -070022
Rich Lane7dcdf022013-12-11 14:45:27 -080023class oxm(loxi.OFObject):
24 subtypes = {}
Rich Laned53156a2013-08-05 17:17:33 -070025
Rich Lane7dcdf022013-12-11 14:45:27 -080026 @staticmethod
27 def unpack(reader):
28 subtype, = reader.peek('!L', 0)
29 try:
30 subclass = oxm.subtypes[subtype]
31 except KeyError:
32 raise loxi.ProtocolError("unknown oxm subtype %#x" % subtype)
33 return subclass.unpack(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -070034
Rich Lanec2ee4b82013-04-24 17:12:38 -070035
Rich Lane7dcdf022013-12-11 14:45:27 -080036class arp_op(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -070037 type_len = 2147494402
Rich Lanec2ee4b82013-04-24 17:12:38 -070038
39 def __init__(self, value=None):
40 if value != None:
41 self.value = value
42 else:
43 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -080044 return
Rich Lanec2ee4b82013-04-24 17:12:38 -070045
46 def pack(self):
47 packed = []
48 packed.append(struct.pack("!L", self.type_len))
49 packed.append(struct.pack("!H", self.value))
50 return ''.join(packed)
51
52 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -080053 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -070054 obj = arp_op()
Dan Talaycof6202252013-07-02 01:00:29 -070055 _type_len = reader.read("!L")[0]
56 assert(_type_len == 2147494402)
57 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -070058 return obj
59
60 def __eq__(self, other):
61 if type(self) != type(other): return False
62 if self.value != other.value: return False
63 return True
64
Rich Lanec2ee4b82013-04-24 17:12:38 -070065 def pretty_print(self, q):
66 q.text("arp_op {")
67 with q.group():
68 with q.indent(2):
69 q.breakable()
70 q.text("value = ");
71 q.text("%#x" % self.value)
72 q.breakable()
73 q.text('}')
74
Rich Lane7dcdf022013-12-11 14:45:27 -080075oxm.subtypes[2147494402] = arp_op
76
77class arp_op_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -070078 type_len = 2147494660
Rich Lanec2ee4b82013-04-24 17:12:38 -070079
80 def __init__(self, value=None, value_mask=None):
81 if value != None:
82 self.value = value
83 else:
84 self.value = 0
85 if value_mask != None:
86 self.value_mask = value_mask
87 else:
88 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -080089 return
Rich Lanec2ee4b82013-04-24 17:12:38 -070090
91 def pack(self):
92 packed = []
93 packed.append(struct.pack("!L", self.type_len))
94 packed.append(struct.pack("!H", self.value))
95 packed.append(struct.pack("!H", self.value_mask))
96 return ''.join(packed)
97
98 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -080099 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700100 obj = arp_op_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700101 _type_len = reader.read("!L")[0]
102 assert(_type_len == 2147494660)
103 obj.value = reader.read("!H")[0]
104 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700105 return obj
106
107 def __eq__(self, other):
108 if type(self) != type(other): return False
109 if self.value != other.value: return False
110 if self.value_mask != other.value_mask: return False
111 return True
112
Rich Lanec2ee4b82013-04-24 17:12:38 -0700113 def pretty_print(self, q):
114 q.text("arp_op_masked {")
115 with q.group():
116 with q.indent(2):
117 q.breakable()
118 q.text("value = ");
119 q.text("%#x" % self.value)
120 q.text(","); q.breakable()
121 q.text("value_mask = ");
122 q.text("%#x" % self.value_mask)
123 q.breakable()
124 q.text('}')
125
Rich Lane7dcdf022013-12-11 14:45:27 -0800126oxm.subtypes[2147494660] = arp_op_masked
127
128class arp_sha(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700129 type_len = 2147495942
Rich Lanec2ee4b82013-04-24 17:12:38 -0700130
131 def __init__(self, value=None):
132 if value != None:
133 self.value = value
134 else:
135 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800136 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700137
138 def pack(self):
139 packed = []
140 packed.append(struct.pack("!L", self.type_len))
141 packed.append(struct.pack("!6B", *self.value))
142 return ''.join(packed)
143
144 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800145 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700146 obj = arp_sha()
Dan Talaycof6202252013-07-02 01:00:29 -0700147 _type_len = reader.read("!L")[0]
148 assert(_type_len == 2147495942)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700149 obj.value = list(reader.read('!6B'))
150 return obj
151
152 def __eq__(self, other):
153 if type(self) != type(other): return False
154 if self.value != other.value: return False
155 return True
156
Rich Lanec2ee4b82013-04-24 17:12:38 -0700157 def pretty_print(self, q):
158 q.text("arp_sha {")
159 with q.group():
160 with q.indent(2):
161 q.breakable()
162 q.text("value = ");
163 q.text(util.pretty_mac(self.value))
164 q.breakable()
165 q.text('}')
166
Rich Lane7dcdf022013-12-11 14:45:27 -0800167oxm.subtypes[2147495942] = arp_sha
168
169class arp_sha_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700170 type_len = 2147496204
Rich Lanec2ee4b82013-04-24 17:12:38 -0700171
172 def __init__(self, value=None, value_mask=None):
173 if value != None:
174 self.value = value
175 else:
176 self.value = [0,0,0,0,0,0]
177 if value_mask != None:
178 self.value_mask = value_mask
179 else:
180 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800181 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700182
183 def pack(self):
184 packed = []
185 packed.append(struct.pack("!L", self.type_len))
186 packed.append(struct.pack("!6B", *self.value))
187 packed.append(struct.pack("!6B", *self.value_mask))
188 return ''.join(packed)
189
190 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800191 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700192 obj = arp_sha_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700193 _type_len = reader.read("!L")[0]
194 assert(_type_len == 2147496204)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700195 obj.value = list(reader.read('!6B'))
196 obj.value_mask = list(reader.read('!6B'))
197 return obj
198
199 def __eq__(self, other):
200 if type(self) != type(other): return False
201 if self.value != other.value: return False
202 if self.value_mask != other.value_mask: return False
203 return True
204
Rich Lanec2ee4b82013-04-24 17:12:38 -0700205 def pretty_print(self, q):
206 q.text("arp_sha_masked {")
207 with q.group():
208 with q.indent(2):
209 q.breakable()
210 q.text("value = ");
211 q.text(util.pretty_mac(self.value))
212 q.text(","); q.breakable()
213 q.text("value_mask = ");
214 q.text(util.pretty_mac(self.value_mask))
215 q.breakable()
216 q.text('}')
217
Rich Lane7dcdf022013-12-11 14:45:27 -0800218oxm.subtypes[2147496204] = arp_sha_masked
219
220class arp_spa(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700221 type_len = 2147494916
Rich Lanec2ee4b82013-04-24 17:12:38 -0700222
223 def __init__(self, value=None):
224 if value != None:
225 self.value = value
226 else:
227 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800228 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700229
230 def pack(self):
231 packed = []
232 packed.append(struct.pack("!L", self.type_len))
233 packed.append(struct.pack("!L", self.value))
234 return ''.join(packed)
235
236 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800237 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700238 obj = arp_spa()
Dan Talaycof6202252013-07-02 01:00:29 -0700239 _type_len = reader.read("!L")[0]
240 assert(_type_len == 2147494916)
241 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700242 return obj
243
244 def __eq__(self, other):
245 if type(self) != type(other): return False
246 if self.value != other.value: return False
247 return True
248
Rich Lanec2ee4b82013-04-24 17:12:38 -0700249 def pretty_print(self, q):
250 q.text("arp_spa {")
251 with q.group():
252 with q.indent(2):
253 q.breakable()
254 q.text("value = ");
255 q.text("%#x" % self.value)
256 q.breakable()
257 q.text('}')
258
Rich Lane7dcdf022013-12-11 14:45:27 -0800259oxm.subtypes[2147494916] = arp_spa
260
261class arp_spa_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700262 type_len = 2147495176
Rich Lanec2ee4b82013-04-24 17:12:38 -0700263
264 def __init__(self, value=None, value_mask=None):
265 if value != None:
266 self.value = value
267 else:
268 self.value = 0
269 if value_mask != None:
270 self.value_mask = value_mask
271 else:
272 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800273 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700274
275 def pack(self):
276 packed = []
277 packed.append(struct.pack("!L", self.type_len))
278 packed.append(struct.pack("!L", self.value))
279 packed.append(struct.pack("!L", self.value_mask))
280 return ''.join(packed)
281
282 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800283 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700284 obj = arp_spa_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700285 _type_len = reader.read("!L")[0]
286 assert(_type_len == 2147495176)
287 obj.value = reader.read("!L")[0]
288 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700289 return obj
290
291 def __eq__(self, other):
292 if type(self) != type(other): return False
293 if self.value != other.value: return False
294 if self.value_mask != other.value_mask: return False
295 return True
296
Rich Lanec2ee4b82013-04-24 17:12:38 -0700297 def pretty_print(self, q):
298 q.text("arp_spa_masked {")
299 with q.group():
300 with q.indent(2):
301 q.breakable()
302 q.text("value = ");
303 q.text("%#x" % self.value)
304 q.text(","); q.breakable()
305 q.text("value_mask = ");
306 q.text("%#x" % self.value_mask)
307 q.breakable()
308 q.text('}')
309
Rich Lane7dcdf022013-12-11 14:45:27 -0800310oxm.subtypes[2147495176] = arp_spa_masked
311
312class arp_tha(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700313 type_len = 2147496454
Rich Lanec2ee4b82013-04-24 17:12:38 -0700314
315 def __init__(self, value=None):
316 if value != None:
317 self.value = value
318 else:
319 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800320 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700321
322 def pack(self):
323 packed = []
324 packed.append(struct.pack("!L", self.type_len))
325 packed.append(struct.pack("!6B", *self.value))
326 return ''.join(packed)
327
328 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800329 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700330 obj = arp_tha()
Dan Talaycof6202252013-07-02 01:00:29 -0700331 _type_len = reader.read("!L")[0]
332 assert(_type_len == 2147496454)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700333 obj.value = list(reader.read('!6B'))
334 return obj
335
336 def __eq__(self, other):
337 if type(self) != type(other): return False
338 if self.value != other.value: return False
339 return True
340
Rich Lanec2ee4b82013-04-24 17:12:38 -0700341 def pretty_print(self, q):
342 q.text("arp_tha {")
343 with q.group():
344 with q.indent(2):
345 q.breakable()
346 q.text("value = ");
347 q.text(util.pretty_mac(self.value))
348 q.breakable()
349 q.text('}')
350
Rich Lane7dcdf022013-12-11 14:45:27 -0800351oxm.subtypes[2147496454] = arp_tha
352
353class arp_tha_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700354 type_len = 2147496716
Rich Lanec2ee4b82013-04-24 17:12:38 -0700355
356 def __init__(self, value=None, value_mask=None):
357 if value != None:
358 self.value = value
359 else:
360 self.value = [0,0,0,0,0,0]
361 if value_mask != None:
362 self.value_mask = value_mask
363 else:
364 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800365 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700366
367 def pack(self):
368 packed = []
369 packed.append(struct.pack("!L", self.type_len))
370 packed.append(struct.pack("!6B", *self.value))
371 packed.append(struct.pack("!6B", *self.value_mask))
372 return ''.join(packed)
373
374 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800375 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700376 obj = arp_tha_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700377 _type_len = reader.read("!L")[0]
378 assert(_type_len == 2147496716)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700379 obj.value = list(reader.read('!6B'))
380 obj.value_mask = list(reader.read('!6B'))
381 return obj
382
383 def __eq__(self, other):
384 if type(self) != type(other): return False
385 if self.value != other.value: return False
386 if self.value_mask != other.value_mask: return False
387 return True
388
Rich Lanec2ee4b82013-04-24 17:12:38 -0700389 def pretty_print(self, q):
390 q.text("arp_tha_masked {")
391 with q.group():
392 with q.indent(2):
393 q.breakable()
394 q.text("value = ");
395 q.text(util.pretty_mac(self.value))
396 q.text(","); q.breakable()
397 q.text("value_mask = ");
398 q.text(util.pretty_mac(self.value_mask))
399 q.breakable()
400 q.text('}')
401
Rich Lane7dcdf022013-12-11 14:45:27 -0800402oxm.subtypes[2147496716] = arp_tha_masked
403
404class arp_tpa(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700405 type_len = 2147495428
Rich Lanec2ee4b82013-04-24 17:12:38 -0700406
407 def __init__(self, value=None):
408 if value != None:
409 self.value = value
410 else:
411 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800412 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700413
414 def pack(self):
415 packed = []
416 packed.append(struct.pack("!L", self.type_len))
417 packed.append(struct.pack("!L", self.value))
418 return ''.join(packed)
419
420 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800421 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700422 obj = arp_tpa()
Dan Talaycof6202252013-07-02 01:00:29 -0700423 _type_len = reader.read("!L")[0]
424 assert(_type_len == 2147495428)
425 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700426 return obj
427
428 def __eq__(self, other):
429 if type(self) != type(other): return False
430 if self.value != other.value: return False
431 return True
432
Rich Lanec2ee4b82013-04-24 17:12:38 -0700433 def pretty_print(self, q):
434 q.text("arp_tpa {")
435 with q.group():
436 with q.indent(2):
437 q.breakable()
438 q.text("value = ");
439 q.text("%#x" % self.value)
440 q.breakable()
441 q.text('}')
442
Rich Lane7dcdf022013-12-11 14:45:27 -0800443oxm.subtypes[2147495428] = arp_tpa
444
445class arp_tpa_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700446 type_len = 2147495688
Rich Lanec2ee4b82013-04-24 17:12:38 -0700447
448 def __init__(self, value=None, value_mask=None):
449 if value != None:
450 self.value = value
451 else:
452 self.value = 0
453 if value_mask != None:
454 self.value_mask = value_mask
455 else:
456 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800457 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700458
459 def pack(self):
460 packed = []
461 packed.append(struct.pack("!L", self.type_len))
462 packed.append(struct.pack("!L", self.value))
463 packed.append(struct.pack("!L", self.value_mask))
464 return ''.join(packed)
465
466 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800467 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700468 obj = arp_tpa_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700469 _type_len = reader.read("!L")[0]
470 assert(_type_len == 2147495688)
471 obj.value = reader.read("!L")[0]
472 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700473 return obj
474
475 def __eq__(self, other):
476 if type(self) != type(other): return False
477 if self.value != other.value: return False
478 if self.value_mask != other.value_mask: return False
479 return True
480
Rich Lanec2ee4b82013-04-24 17:12:38 -0700481 def pretty_print(self, q):
482 q.text("arp_tpa_masked {")
483 with q.group():
484 with q.indent(2):
485 q.breakable()
486 q.text("value = ");
487 q.text("%#x" % self.value)
488 q.text(","); q.breakable()
489 q.text("value_mask = ");
490 q.text("%#x" % self.value_mask)
491 q.breakable()
492 q.text('}')
493
Rich Lane7dcdf022013-12-11 14:45:27 -0800494oxm.subtypes[2147495688] = arp_tpa_masked
495
496class bsn_global_vrf_allowed(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800497 type_len = 198145
498
499 def __init__(self, value=None):
500 if value != None:
501 self.value = value
502 else:
503 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800504 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800505
506 def pack(self):
507 packed = []
508 packed.append(struct.pack("!L", self.type_len))
509 packed.append(struct.pack("!B", self.value))
510 return ''.join(packed)
511
512 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800513 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800514 obj = bsn_global_vrf_allowed()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800515 _type_len = reader.read("!L")[0]
516 assert(_type_len == 198145)
517 obj.value = reader.read("!B")[0]
518 return obj
519
520 def __eq__(self, other):
521 if type(self) != type(other): return False
522 if self.value != other.value: return False
523 return True
524
Rich Laned9e3f7b2013-11-04 11:40:43 -0800525 def pretty_print(self, q):
526 q.text("bsn_global_vrf_allowed {")
527 with q.group():
528 with q.indent(2):
529 q.breakable()
530 q.text("value = ");
531 q.text("%#x" % self.value)
532 q.breakable()
533 q.text('}')
534
Rich Lane7dcdf022013-12-11 14:45:27 -0800535oxm.subtypes[198145] = bsn_global_vrf_allowed
536
537class bsn_global_vrf_allowed_masked(oxm):
538 type_len = 198402
Rich Laned9e3f7b2013-11-04 11:40:43 -0800539
540 def __init__(self, value=None, value_mask=None):
541 if value != None:
542 self.value = value
543 else:
544 self.value = 0
545 if value_mask != None:
546 self.value_mask = value_mask
547 else:
548 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800549 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800550
551 def pack(self):
552 packed = []
553 packed.append(struct.pack("!L", self.type_len))
554 packed.append(struct.pack("!B", self.value))
555 packed.append(struct.pack("!B", self.value_mask))
556 return ''.join(packed)
557
558 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800559 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800560 obj = bsn_global_vrf_allowed_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800561 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800562 assert(_type_len == 198402)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800563 obj.value = reader.read("!B")[0]
564 obj.value_mask = reader.read("!B")[0]
565 return obj
566
567 def __eq__(self, other):
568 if type(self) != type(other): return False
569 if self.value != other.value: return False
570 if self.value_mask != other.value_mask: return False
571 return True
572
Rich Laned9e3f7b2013-11-04 11:40:43 -0800573 def pretty_print(self, q):
574 q.text("bsn_global_vrf_allowed_masked {")
575 with q.group():
576 with q.indent(2):
577 q.breakable()
578 q.text("value = ");
579 q.text("%#x" % self.value)
580 q.text(","); q.breakable()
581 q.text("value_mask = ");
582 q.text("%#x" % self.value_mask)
583 q.breakable()
584 q.text('}')
585
Rich Lane7dcdf022013-12-11 14:45:27 -0800586oxm.subtypes[198402] = bsn_global_vrf_allowed_masked
587
588class bsn_in_ports_128(oxm):
589 type_len = 196624
Rich Lane6f4978c2013-10-20 21:33:52 -0700590
591 def __init__(self, value=None):
592 if value != None:
593 self.value = value
594 else:
595 self.value = set()
Rich Lane7dcdf022013-12-11 14:45:27 -0800596 return
Rich Lane6f4978c2013-10-20 21:33:52 -0700597
598 def pack(self):
599 packed = []
600 packed.append(struct.pack("!L", self.type_len))
601 packed.append(util.pack_bitmap_128(self.value))
602 return ''.join(packed)
603
604 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800605 def unpack(reader):
Rich Lane6f4978c2013-10-20 21:33:52 -0700606 obj = bsn_in_ports_128()
Rich Lane6f4978c2013-10-20 21:33:52 -0700607 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800608 assert(_type_len == 196624)
Rich Lane6f4978c2013-10-20 21:33:52 -0700609 obj.value = util.unpack_bitmap_128(reader)
610 return obj
611
612 def __eq__(self, other):
613 if type(self) != type(other): return False
614 if self.value != other.value: return False
615 return True
616
Rich Lane6f4978c2013-10-20 21:33:52 -0700617 def pretty_print(self, q):
618 q.text("bsn_in_ports_128 {")
619 with q.group():
620 with q.indent(2):
621 q.breakable()
622 q.text("value = ");
623 q.pp(self.value)
624 q.breakable()
625 q.text('}')
626
Rich Lane7dcdf022013-12-11 14:45:27 -0800627oxm.subtypes[196624] = bsn_in_ports_128
628
629class bsn_in_ports_128_masked(oxm):
Rich Lane6f4978c2013-10-20 21:33:52 -0700630 type_len = 196896
631
632 def __init__(self, value=None, value_mask=None):
633 if value != None:
634 self.value = value
635 else:
636 self.value = set()
637 if value_mask != None:
638 self.value_mask = value_mask
639 else:
640 self.value_mask = set()
Rich Lane7dcdf022013-12-11 14:45:27 -0800641 return
Rich Lane6f4978c2013-10-20 21:33:52 -0700642
643 def pack(self):
644 packed = []
645 packed.append(struct.pack("!L", self.type_len))
646 packed.append(util.pack_bitmap_128(self.value))
647 packed.append(util.pack_bitmap_128(self.value_mask))
648 return ''.join(packed)
649
650 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800651 def unpack(reader):
Rich Lane6f4978c2013-10-20 21:33:52 -0700652 obj = bsn_in_ports_128_masked()
Rich Lane6f4978c2013-10-20 21:33:52 -0700653 _type_len = reader.read("!L")[0]
654 assert(_type_len == 196896)
655 obj.value = util.unpack_bitmap_128(reader)
656 obj.value_mask = util.unpack_bitmap_128(reader)
657 return obj
658
659 def __eq__(self, other):
660 if type(self) != type(other): return False
661 if self.value != other.value: return False
662 if self.value_mask != other.value_mask: return False
663 return True
664
Rich Lane6f4978c2013-10-20 21:33:52 -0700665 def pretty_print(self, q):
666 q.text("bsn_in_ports_128_masked {")
667 with q.group():
668 with q.indent(2):
669 q.breakable()
670 q.text("value = ");
671 q.pp(self.value)
672 q.text(","); q.breakable()
673 q.text("value_mask = ");
674 q.pp(self.value_mask)
675 q.breakable()
676 q.text('}')
677
Rich Lane7dcdf022013-12-11 14:45:27 -0800678oxm.subtypes[196896] = bsn_in_ports_128_masked
679
680class bsn_l3_dst_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800681 type_len = 199684
682
683 def __init__(self, value=None):
684 if value != None:
685 self.value = value
686 else:
687 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800688 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800689
690 def pack(self):
691 packed = []
692 packed.append(struct.pack("!L", self.type_len))
693 packed.append(struct.pack("!L", self.value))
694 return ''.join(packed)
695
696 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800697 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800698 obj = bsn_l3_dst_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800699 _type_len = reader.read("!L")[0]
700 assert(_type_len == 199684)
701 obj.value = reader.read("!L")[0]
702 return obj
703
704 def __eq__(self, other):
705 if type(self) != type(other): return False
706 if self.value != other.value: return False
707 return True
708
Rich Laned9e3f7b2013-11-04 11:40:43 -0800709 def pretty_print(self, q):
710 q.text("bsn_l3_dst_class_id {")
711 with q.group():
712 with q.indent(2):
713 q.breakable()
714 q.text("value = ");
715 q.text("%#x" % self.value)
716 q.breakable()
717 q.text('}')
718
Rich Lane7dcdf022013-12-11 14:45:27 -0800719oxm.subtypes[199684] = bsn_l3_dst_class_id
720
721class bsn_l3_dst_class_id_masked(oxm):
722 type_len = 199944
Rich Laned9e3f7b2013-11-04 11:40:43 -0800723
724 def __init__(self, value=None, value_mask=None):
725 if value != None:
726 self.value = value
727 else:
728 self.value = 0
729 if value_mask != None:
730 self.value_mask = value_mask
731 else:
732 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800733 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800734
735 def pack(self):
736 packed = []
737 packed.append(struct.pack("!L", self.type_len))
738 packed.append(struct.pack("!L", self.value))
739 packed.append(struct.pack("!L", self.value_mask))
740 return ''.join(packed)
741
742 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800743 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800744 obj = bsn_l3_dst_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800745 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800746 assert(_type_len == 199944)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800747 obj.value = reader.read("!L")[0]
748 obj.value_mask = reader.read("!L")[0]
749 return obj
750
751 def __eq__(self, other):
752 if type(self) != type(other): return False
753 if self.value != other.value: return False
754 if self.value_mask != other.value_mask: return False
755 return True
756
Rich Laned9e3f7b2013-11-04 11:40:43 -0800757 def pretty_print(self, q):
758 q.text("bsn_l3_dst_class_id_masked {")
759 with q.group():
760 with q.indent(2):
761 q.breakable()
762 q.text("value = ");
763 q.text("%#x" % self.value)
764 q.text(","); q.breakable()
765 q.text("value_mask = ");
766 q.text("%#x" % self.value_mask)
767 q.breakable()
768 q.text('}')
769
Rich Lane7dcdf022013-12-11 14:45:27 -0800770oxm.subtypes[199944] = bsn_l3_dst_class_id_masked
771
772class bsn_l3_interface_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800773 type_len = 198660
774
775 def __init__(self, value=None):
776 if value != None:
777 self.value = value
778 else:
779 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800780 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800781
782 def pack(self):
783 packed = []
784 packed.append(struct.pack("!L", self.type_len))
785 packed.append(struct.pack("!L", self.value))
786 return ''.join(packed)
787
788 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800789 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800790 obj = bsn_l3_interface_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800791 _type_len = reader.read("!L")[0]
792 assert(_type_len == 198660)
793 obj.value = reader.read("!L")[0]
794 return obj
795
796 def __eq__(self, other):
797 if type(self) != type(other): return False
798 if self.value != other.value: return False
799 return True
800
Rich Laned9e3f7b2013-11-04 11:40:43 -0800801 def pretty_print(self, q):
802 q.text("bsn_l3_interface_class_id {")
803 with q.group():
804 with q.indent(2):
805 q.breakable()
806 q.text("value = ");
807 q.text("%#x" % self.value)
808 q.breakable()
809 q.text('}')
810
Rich Lane7dcdf022013-12-11 14:45:27 -0800811oxm.subtypes[198660] = bsn_l3_interface_class_id
812
813class bsn_l3_interface_class_id_masked(oxm):
814 type_len = 198920
Rich Laned9e3f7b2013-11-04 11:40:43 -0800815
816 def __init__(self, value=None, value_mask=None):
817 if value != None:
818 self.value = value
819 else:
820 self.value = 0
821 if value_mask != None:
822 self.value_mask = value_mask
823 else:
824 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800825 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800826
827 def pack(self):
828 packed = []
829 packed.append(struct.pack("!L", self.type_len))
830 packed.append(struct.pack("!L", self.value))
831 packed.append(struct.pack("!L", self.value_mask))
832 return ''.join(packed)
833
834 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800835 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800836 obj = bsn_l3_interface_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800837 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800838 assert(_type_len == 198920)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800839 obj.value = reader.read("!L")[0]
840 obj.value_mask = reader.read("!L")[0]
841 return obj
842
843 def __eq__(self, other):
844 if type(self) != type(other): return False
845 if self.value != other.value: return False
846 if self.value_mask != other.value_mask: return False
847 return True
848
Rich Laned9e3f7b2013-11-04 11:40:43 -0800849 def pretty_print(self, q):
850 q.text("bsn_l3_interface_class_id_masked {")
851 with q.group():
852 with q.indent(2):
853 q.breakable()
854 q.text("value = ");
855 q.text("%#x" % self.value)
856 q.text(","); q.breakable()
857 q.text("value_mask = ");
858 q.text("%#x" % self.value_mask)
859 q.breakable()
860 q.text('}')
861
Rich Lane7dcdf022013-12-11 14:45:27 -0800862oxm.subtypes[198920] = bsn_l3_interface_class_id_masked
863
864class bsn_l3_src_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800865 type_len = 199172
866
867 def __init__(self, value=None):
868 if value != None:
869 self.value = value
870 else:
871 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800872 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800873
874 def pack(self):
875 packed = []
876 packed.append(struct.pack("!L", self.type_len))
877 packed.append(struct.pack("!L", self.value))
878 return ''.join(packed)
879
880 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800881 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800882 obj = bsn_l3_src_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800883 _type_len = reader.read("!L")[0]
884 assert(_type_len == 199172)
885 obj.value = reader.read("!L")[0]
886 return obj
887
888 def __eq__(self, other):
889 if type(self) != type(other): return False
890 if self.value != other.value: return False
891 return True
892
Rich Laned9e3f7b2013-11-04 11:40:43 -0800893 def pretty_print(self, q):
894 q.text("bsn_l3_src_class_id {")
895 with q.group():
896 with q.indent(2):
897 q.breakable()
898 q.text("value = ");
899 q.text("%#x" % self.value)
900 q.breakable()
901 q.text('}')
902
Rich Lane7dcdf022013-12-11 14:45:27 -0800903oxm.subtypes[199172] = bsn_l3_src_class_id
904
905class bsn_l3_src_class_id_masked(oxm):
906 type_len = 199432
Rich Laned9e3f7b2013-11-04 11:40:43 -0800907
908 def __init__(self, value=None, value_mask=None):
909 if value != None:
910 self.value = value
911 else:
912 self.value = 0
913 if value_mask != None:
914 self.value_mask = value_mask
915 else:
916 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800917 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800918
919 def pack(self):
920 packed = []
921 packed.append(struct.pack("!L", self.type_len))
922 packed.append(struct.pack("!L", self.value))
923 packed.append(struct.pack("!L", self.value_mask))
924 return ''.join(packed)
925
926 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800927 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800928 obj = bsn_l3_src_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800929 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800930 assert(_type_len == 199432)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800931 obj.value = reader.read("!L")[0]
932 obj.value_mask = reader.read("!L")[0]
933 return obj
934
935 def __eq__(self, other):
936 if type(self) != type(other): return False
937 if self.value != other.value: return False
938 if self.value_mask != other.value_mask: return False
939 return True
940
Rich Laned9e3f7b2013-11-04 11:40:43 -0800941 def pretty_print(self, q):
942 q.text("bsn_l3_src_class_id_masked {")
943 with q.group():
944 with q.indent(2):
945 q.breakable()
946 q.text("value = ");
947 q.text("%#x" % self.value)
948 q.text(","); q.breakable()
949 q.text("value_mask = ");
950 q.text("%#x" % self.value_mask)
951 q.breakable()
952 q.text('}')
953
Rich Lane7dcdf022013-12-11 14:45:27 -0800954oxm.subtypes[199432] = bsn_l3_src_class_id_masked
955
956class bsn_lag_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800957 type_len = 197124
958
959 def __init__(self, value=None):
960 if value != None:
961 self.value = value
962 else:
963 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800964 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800965
966 def pack(self):
967 packed = []
968 packed.append(struct.pack("!L", self.type_len))
969 packed.append(struct.pack("!L", self.value))
970 return ''.join(packed)
971
972 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800973 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800974 obj = bsn_lag_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800975 _type_len = reader.read("!L")[0]
976 assert(_type_len == 197124)
977 obj.value = reader.read("!L")[0]
978 return obj
979
980 def __eq__(self, other):
981 if type(self) != type(other): return False
982 if self.value != other.value: return False
983 return True
984
Rich Laned9e3f7b2013-11-04 11:40:43 -0800985 def pretty_print(self, q):
986 q.text("bsn_lag_id {")
987 with q.group():
988 with q.indent(2):
989 q.breakable()
990 q.text("value = ");
991 q.text("%#x" % self.value)
992 q.breakable()
993 q.text('}')
994
Rich Lane7dcdf022013-12-11 14:45:27 -0800995oxm.subtypes[197124] = bsn_lag_id
996
997class bsn_lag_id_masked(oxm):
998 type_len = 197384
Rich Laned9e3f7b2013-11-04 11:40:43 -0800999
1000 def __init__(self, value=None, value_mask=None):
1001 if value != None:
1002 self.value = value
1003 else:
1004 self.value = 0
1005 if value_mask != None:
1006 self.value_mask = value_mask
1007 else:
1008 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001009 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001010
1011 def pack(self):
1012 packed = []
1013 packed.append(struct.pack("!L", self.type_len))
1014 packed.append(struct.pack("!L", self.value))
1015 packed.append(struct.pack("!L", self.value_mask))
1016 return ''.join(packed)
1017
1018 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001019 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001020 obj = bsn_lag_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001021 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001022 assert(_type_len == 197384)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001023 obj.value = reader.read("!L")[0]
1024 obj.value_mask = reader.read("!L")[0]
1025 return obj
1026
1027 def __eq__(self, other):
1028 if type(self) != type(other): return False
1029 if self.value != other.value: return False
1030 if self.value_mask != other.value_mask: return False
1031 return True
1032
Rich Laned9e3f7b2013-11-04 11:40:43 -08001033 def pretty_print(self, q):
1034 q.text("bsn_lag_id_masked {")
1035 with q.group():
1036 with q.indent(2):
1037 q.breakable()
1038 q.text("value = ");
1039 q.text("%#x" % self.value)
1040 q.text(","); q.breakable()
1041 q.text("value_mask = ");
1042 q.text("%#x" % self.value_mask)
1043 q.breakable()
1044 q.text('}')
1045
Rich Lane7dcdf022013-12-11 14:45:27 -08001046oxm.subtypes[197384] = bsn_lag_id_masked
1047
1048class bsn_vrf(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001049 type_len = 197636
1050
1051 def __init__(self, value=None):
1052 if value != None:
1053 self.value = value
1054 else:
1055 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001056 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001057
1058 def pack(self):
1059 packed = []
1060 packed.append(struct.pack("!L", self.type_len))
1061 packed.append(struct.pack("!L", self.value))
1062 return ''.join(packed)
1063
1064 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001065 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001066 obj = bsn_vrf()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001067 _type_len = reader.read("!L")[0]
1068 assert(_type_len == 197636)
1069 obj.value = reader.read("!L")[0]
1070 return obj
1071
1072 def __eq__(self, other):
1073 if type(self) != type(other): return False
1074 if self.value != other.value: return False
1075 return True
1076
Rich Laned9e3f7b2013-11-04 11:40:43 -08001077 def pretty_print(self, q):
1078 q.text("bsn_vrf {")
1079 with q.group():
1080 with q.indent(2):
1081 q.breakable()
1082 q.text("value = ");
1083 q.text("%#x" % self.value)
1084 q.breakable()
1085 q.text('}')
1086
Rich Lane7dcdf022013-12-11 14:45:27 -08001087oxm.subtypes[197636] = bsn_vrf
1088
1089class bsn_vrf_masked(oxm):
1090 type_len = 197896
Rich Laned9e3f7b2013-11-04 11:40:43 -08001091
1092 def __init__(self, value=None, value_mask=None):
1093 if value != None:
1094 self.value = value
1095 else:
1096 self.value = 0
1097 if value_mask != None:
1098 self.value_mask = value_mask
1099 else:
1100 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001101 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001102
1103 def pack(self):
1104 packed = []
1105 packed.append(struct.pack("!L", self.type_len))
1106 packed.append(struct.pack("!L", self.value))
1107 packed.append(struct.pack("!L", self.value_mask))
1108 return ''.join(packed)
1109
1110 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001111 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001112 obj = bsn_vrf_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001113 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001114 assert(_type_len == 197896)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001115 obj.value = reader.read("!L")[0]
1116 obj.value_mask = reader.read("!L")[0]
1117 return obj
1118
1119 def __eq__(self, other):
1120 if type(self) != type(other): return False
1121 if self.value != other.value: return False
1122 if self.value_mask != other.value_mask: return False
1123 return True
1124
Rich Laned9e3f7b2013-11-04 11:40:43 -08001125 def pretty_print(self, q):
1126 q.text("bsn_vrf_masked {")
1127 with q.group():
1128 with q.indent(2):
1129 q.breakable()
1130 q.text("value = ");
1131 q.text("%#x" % self.value)
1132 q.text(","); q.breakable()
1133 q.text("value_mask = ");
1134 q.text("%#x" % self.value_mask)
1135 q.breakable()
1136 q.text('}')
1137
Rich Lane7dcdf022013-12-11 14:45:27 -08001138oxm.subtypes[197896] = bsn_vrf_masked
1139
1140class eth_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001141 type_len = 2147485190
Rich Lanec2ee4b82013-04-24 17:12:38 -07001142
1143 def __init__(self, value=None):
1144 if value != None:
1145 self.value = value
1146 else:
1147 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001148 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001149
1150 def pack(self):
1151 packed = []
1152 packed.append(struct.pack("!L", self.type_len))
1153 packed.append(struct.pack("!6B", *self.value))
1154 return ''.join(packed)
1155
1156 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001157 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001158 obj = eth_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07001159 _type_len = reader.read("!L")[0]
1160 assert(_type_len == 2147485190)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001161 obj.value = list(reader.read('!6B'))
1162 return obj
1163
1164 def __eq__(self, other):
1165 if type(self) != type(other): return False
1166 if self.value != other.value: return False
1167 return True
1168
Rich Lanec2ee4b82013-04-24 17:12:38 -07001169 def pretty_print(self, q):
1170 q.text("eth_dst {")
1171 with q.group():
1172 with q.indent(2):
1173 q.breakable()
1174 q.text("value = ");
1175 q.text(util.pretty_mac(self.value))
1176 q.breakable()
1177 q.text('}')
1178
Rich Lane7dcdf022013-12-11 14:45:27 -08001179oxm.subtypes[2147485190] = eth_dst
1180
1181class eth_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001182 type_len = 2147485452
Rich Lanec2ee4b82013-04-24 17:12:38 -07001183
1184 def __init__(self, value=None, value_mask=None):
1185 if value != None:
1186 self.value = value
1187 else:
1188 self.value = [0,0,0,0,0,0]
1189 if value_mask != None:
1190 self.value_mask = value_mask
1191 else:
1192 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001193 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001194
1195 def pack(self):
1196 packed = []
1197 packed.append(struct.pack("!L", self.type_len))
1198 packed.append(struct.pack("!6B", *self.value))
1199 packed.append(struct.pack("!6B", *self.value_mask))
1200 return ''.join(packed)
1201
1202 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001203 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001204 obj = eth_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001205 _type_len = reader.read("!L")[0]
1206 assert(_type_len == 2147485452)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001207 obj.value = list(reader.read('!6B'))
1208 obj.value_mask = list(reader.read('!6B'))
1209 return obj
1210
1211 def __eq__(self, other):
1212 if type(self) != type(other): return False
1213 if self.value != other.value: return False
1214 if self.value_mask != other.value_mask: return False
1215 return True
1216
Rich Lanec2ee4b82013-04-24 17:12:38 -07001217 def pretty_print(self, q):
1218 q.text("eth_dst_masked {")
1219 with q.group():
1220 with q.indent(2):
1221 q.breakable()
1222 q.text("value = ");
1223 q.text(util.pretty_mac(self.value))
1224 q.text(","); q.breakable()
1225 q.text("value_mask = ");
1226 q.text(util.pretty_mac(self.value_mask))
1227 q.breakable()
1228 q.text('}')
1229
Rich Lane7dcdf022013-12-11 14:45:27 -08001230oxm.subtypes[2147485452] = eth_dst_masked
1231
1232class eth_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001233 type_len = 2147485702
Rich Lanec2ee4b82013-04-24 17:12:38 -07001234
1235 def __init__(self, value=None):
1236 if value != None:
1237 self.value = value
1238 else:
1239 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001240 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001241
1242 def pack(self):
1243 packed = []
1244 packed.append(struct.pack("!L", self.type_len))
1245 packed.append(struct.pack("!6B", *self.value))
1246 return ''.join(packed)
1247
1248 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001249 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001250 obj = eth_src()
Dan Talaycof6202252013-07-02 01:00:29 -07001251 _type_len = reader.read("!L")[0]
1252 assert(_type_len == 2147485702)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001253 obj.value = list(reader.read('!6B'))
1254 return obj
1255
1256 def __eq__(self, other):
1257 if type(self) != type(other): return False
1258 if self.value != other.value: return False
1259 return True
1260
Rich Lanec2ee4b82013-04-24 17:12:38 -07001261 def pretty_print(self, q):
1262 q.text("eth_src {")
1263 with q.group():
1264 with q.indent(2):
1265 q.breakable()
1266 q.text("value = ");
1267 q.text(util.pretty_mac(self.value))
1268 q.breakable()
1269 q.text('}')
1270
Rich Lane7dcdf022013-12-11 14:45:27 -08001271oxm.subtypes[2147485702] = eth_src
1272
1273class eth_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001274 type_len = 2147485964
Rich Lanec2ee4b82013-04-24 17:12:38 -07001275
1276 def __init__(self, value=None, value_mask=None):
1277 if value != None:
1278 self.value = value
1279 else:
1280 self.value = [0,0,0,0,0,0]
1281 if value_mask != None:
1282 self.value_mask = value_mask
1283 else:
1284 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001285 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001286
1287 def pack(self):
1288 packed = []
1289 packed.append(struct.pack("!L", self.type_len))
1290 packed.append(struct.pack("!6B", *self.value))
1291 packed.append(struct.pack("!6B", *self.value_mask))
1292 return ''.join(packed)
1293
1294 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001295 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001296 obj = eth_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001297 _type_len = reader.read("!L")[0]
1298 assert(_type_len == 2147485964)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001299 obj.value = list(reader.read('!6B'))
1300 obj.value_mask = list(reader.read('!6B'))
1301 return obj
1302
1303 def __eq__(self, other):
1304 if type(self) != type(other): return False
1305 if self.value != other.value: return False
1306 if self.value_mask != other.value_mask: return False
1307 return True
1308
Rich Lanec2ee4b82013-04-24 17:12:38 -07001309 def pretty_print(self, q):
1310 q.text("eth_src_masked {")
1311 with q.group():
1312 with q.indent(2):
1313 q.breakable()
1314 q.text("value = ");
1315 q.text(util.pretty_mac(self.value))
1316 q.text(","); q.breakable()
1317 q.text("value_mask = ");
1318 q.text(util.pretty_mac(self.value_mask))
1319 q.breakable()
1320 q.text('}')
1321
Rich Lane7dcdf022013-12-11 14:45:27 -08001322oxm.subtypes[2147485964] = eth_src_masked
1323
1324class eth_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001325 type_len = 2147486210
Rich Lanec2ee4b82013-04-24 17:12:38 -07001326
1327 def __init__(self, value=None):
1328 if value != None:
1329 self.value = value
1330 else:
1331 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001332 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001333
1334 def pack(self):
1335 packed = []
1336 packed.append(struct.pack("!L", self.type_len))
1337 packed.append(struct.pack("!H", self.value))
1338 return ''.join(packed)
1339
1340 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001341 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001342 obj = eth_type()
Dan Talaycof6202252013-07-02 01:00:29 -07001343 _type_len = reader.read("!L")[0]
1344 assert(_type_len == 2147486210)
1345 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001346 return obj
1347
1348 def __eq__(self, other):
1349 if type(self) != type(other): return False
1350 if self.value != other.value: return False
1351 return True
1352
Rich Lanec2ee4b82013-04-24 17:12:38 -07001353 def pretty_print(self, q):
1354 q.text("eth_type {")
1355 with q.group():
1356 with q.indent(2):
1357 q.breakable()
1358 q.text("value = ");
1359 q.text("%#x" % self.value)
1360 q.breakable()
1361 q.text('}')
1362
Rich Lane7dcdf022013-12-11 14:45:27 -08001363oxm.subtypes[2147486210] = eth_type
1364
1365class eth_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001366 type_len = 2147486468
Rich Lanec2ee4b82013-04-24 17:12:38 -07001367
1368 def __init__(self, value=None, value_mask=None):
1369 if value != None:
1370 self.value = value
1371 else:
1372 self.value = 0
1373 if value_mask != None:
1374 self.value_mask = value_mask
1375 else:
1376 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001377 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001378
1379 def pack(self):
1380 packed = []
1381 packed.append(struct.pack("!L", self.type_len))
1382 packed.append(struct.pack("!H", self.value))
1383 packed.append(struct.pack("!H", self.value_mask))
1384 return ''.join(packed)
1385
1386 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001387 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001388 obj = eth_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001389 _type_len = reader.read("!L")[0]
1390 assert(_type_len == 2147486468)
1391 obj.value = reader.read("!H")[0]
1392 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001393 return obj
1394
1395 def __eq__(self, other):
1396 if type(self) != type(other): return False
1397 if self.value != other.value: return False
1398 if self.value_mask != other.value_mask: return False
1399 return True
1400
Rich Lanec2ee4b82013-04-24 17:12:38 -07001401 def pretty_print(self, q):
1402 q.text("eth_type_masked {")
1403 with q.group():
1404 with q.indent(2):
1405 q.breakable()
1406 q.text("value = ");
1407 q.text("%#x" % self.value)
1408 q.text(","); q.breakable()
1409 q.text("value_mask = ");
1410 q.text("%#x" % self.value_mask)
1411 q.breakable()
1412 q.text('}')
1413
Rich Lane7dcdf022013-12-11 14:45:27 -08001414oxm.subtypes[2147486468] = eth_type_masked
1415
1416class icmpv4_code(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001417 type_len = 2147493889
Rich Lanec2ee4b82013-04-24 17:12:38 -07001418
1419 def __init__(self, value=None):
1420 if value != None:
1421 self.value = value
1422 else:
1423 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001424 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001425
1426 def pack(self):
1427 packed = []
1428 packed.append(struct.pack("!L", self.type_len))
1429 packed.append(struct.pack("!B", self.value))
1430 return ''.join(packed)
1431
1432 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001433 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001434 obj = icmpv4_code()
Dan Talaycof6202252013-07-02 01:00:29 -07001435 _type_len = reader.read("!L")[0]
1436 assert(_type_len == 2147493889)
1437 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001438 return obj
1439
1440 def __eq__(self, other):
1441 if type(self) != type(other): return False
1442 if self.value != other.value: return False
1443 return True
1444
Rich Lanec2ee4b82013-04-24 17:12:38 -07001445 def pretty_print(self, q):
1446 q.text("icmpv4_code {")
1447 with q.group():
1448 with q.indent(2):
1449 q.breakable()
1450 q.text("value = ");
1451 q.text("%#x" % self.value)
1452 q.breakable()
1453 q.text('}')
1454
Rich Lane7dcdf022013-12-11 14:45:27 -08001455oxm.subtypes[2147493889] = icmpv4_code
1456
1457class icmpv4_code_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001458 type_len = 2147494146
Rich Lanec2ee4b82013-04-24 17:12:38 -07001459
1460 def __init__(self, value=None, value_mask=None):
1461 if value != None:
1462 self.value = value
1463 else:
1464 self.value = 0
1465 if value_mask != None:
1466 self.value_mask = value_mask
1467 else:
1468 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001469 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001470
1471 def pack(self):
1472 packed = []
1473 packed.append(struct.pack("!L", self.type_len))
1474 packed.append(struct.pack("!B", self.value))
1475 packed.append(struct.pack("!B", self.value_mask))
1476 return ''.join(packed)
1477
1478 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001479 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001480 obj = icmpv4_code_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001481 _type_len = reader.read("!L")[0]
1482 assert(_type_len == 2147494146)
1483 obj.value = reader.read("!B")[0]
1484 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001485 return obj
1486
1487 def __eq__(self, other):
1488 if type(self) != type(other): return False
1489 if self.value != other.value: return False
1490 if self.value_mask != other.value_mask: return False
1491 return True
1492
Rich Lanec2ee4b82013-04-24 17:12:38 -07001493 def pretty_print(self, q):
1494 q.text("icmpv4_code_masked {")
1495 with q.group():
1496 with q.indent(2):
1497 q.breakable()
1498 q.text("value = ");
1499 q.text("%#x" % self.value)
1500 q.text(","); q.breakable()
1501 q.text("value_mask = ");
1502 q.text("%#x" % self.value_mask)
1503 q.breakable()
1504 q.text('}')
1505
Rich Lane7dcdf022013-12-11 14:45:27 -08001506oxm.subtypes[2147494146] = icmpv4_code_masked
1507
1508class icmpv4_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001509 type_len = 2147493377
Rich Lanec2ee4b82013-04-24 17:12:38 -07001510
1511 def __init__(self, value=None):
1512 if value != None:
1513 self.value = value
1514 else:
1515 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001516 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001517
1518 def pack(self):
1519 packed = []
1520 packed.append(struct.pack("!L", self.type_len))
1521 packed.append(struct.pack("!B", self.value))
1522 return ''.join(packed)
1523
1524 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001525 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001526 obj = icmpv4_type()
Dan Talaycof6202252013-07-02 01:00:29 -07001527 _type_len = reader.read("!L")[0]
1528 assert(_type_len == 2147493377)
1529 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001530 return obj
1531
1532 def __eq__(self, other):
1533 if type(self) != type(other): return False
1534 if self.value != other.value: return False
1535 return True
1536
Rich Lanec2ee4b82013-04-24 17:12:38 -07001537 def pretty_print(self, q):
1538 q.text("icmpv4_type {")
1539 with q.group():
1540 with q.indent(2):
1541 q.breakable()
1542 q.text("value = ");
1543 q.text("%#x" % self.value)
1544 q.breakable()
1545 q.text('}')
1546
Rich Lane7dcdf022013-12-11 14:45:27 -08001547oxm.subtypes[2147493377] = icmpv4_type
1548
1549class icmpv4_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001550 type_len = 2147493634
Rich Lanec2ee4b82013-04-24 17:12:38 -07001551
1552 def __init__(self, value=None, value_mask=None):
1553 if value != None:
1554 self.value = value
1555 else:
1556 self.value = 0
1557 if value_mask != None:
1558 self.value_mask = value_mask
1559 else:
1560 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001561 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001562
1563 def pack(self):
1564 packed = []
1565 packed.append(struct.pack("!L", self.type_len))
1566 packed.append(struct.pack("!B", self.value))
1567 packed.append(struct.pack("!B", self.value_mask))
1568 return ''.join(packed)
1569
1570 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001571 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001572 obj = icmpv4_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001573 _type_len = reader.read("!L")[0]
1574 assert(_type_len == 2147493634)
1575 obj.value = reader.read("!B")[0]
1576 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001577 return obj
1578
1579 def __eq__(self, other):
1580 if type(self) != type(other): return False
1581 if self.value != other.value: return False
1582 if self.value_mask != other.value_mask: return False
1583 return True
1584
Rich Lanec2ee4b82013-04-24 17:12:38 -07001585 def pretty_print(self, q):
1586 q.text("icmpv4_type_masked {")
1587 with q.group():
1588 with q.indent(2):
1589 q.breakable()
1590 q.text("value = ");
1591 q.text("%#x" % self.value)
1592 q.text(","); q.breakable()
1593 q.text("value_mask = ");
1594 q.text("%#x" % self.value_mask)
1595 q.breakable()
1596 q.text('}')
1597
Rich Lane7dcdf022013-12-11 14:45:27 -08001598oxm.subtypes[2147493634] = icmpv4_type_masked
1599
1600class icmpv6_code(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001601 type_len = 2147499009
Rich Lanec2ee4b82013-04-24 17:12:38 -07001602
1603 def __init__(self, value=None):
1604 if value != None:
1605 self.value = value
1606 else:
1607 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001608 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001609
1610 def pack(self):
1611 packed = []
1612 packed.append(struct.pack("!L", self.type_len))
1613 packed.append(struct.pack("!B", self.value))
1614 return ''.join(packed)
1615
1616 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001617 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001618 obj = icmpv6_code()
Dan Talaycof6202252013-07-02 01:00:29 -07001619 _type_len = reader.read("!L")[0]
1620 assert(_type_len == 2147499009)
1621 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001622 return obj
1623
1624 def __eq__(self, other):
1625 if type(self) != type(other): return False
1626 if self.value != other.value: return False
1627 return True
1628
Rich Lanec2ee4b82013-04-24 17:12:38 -07001629 def pretty_print(self, q):
1630 q.text("icmpv6_code {")
1631 with q.group():
1632 with q.indent(2):
1633 q.breakable()
1634 q.text("value = ");
1635 q.text("%#x" % self.value)
1636 q.breakable()
1637 q.text('}')
1638
Rich Lane7dcdf022013-12-11 14:45:27 -08001639oxm.subtypes[2147499009] = icmpv6_code
1640
1641class icmpv6_code_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001642 type_len = 2147499266
Rich Lanec2ee4b82013-04-24 17:12:38 -07001643
1644 def __init__(self, value=None, value_mask=None):
1645 if value != None:
1646 self.value = value
1647 else:
1648 self.value = 0
1649 if value_mask != None:
1650 self.value_mask = value_mask
1651 else:
1652 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001653 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001654
1655 def pack(self):
1656 packed = []
1657 packed.append(struct.pack("!L", self.type_len))
1658 packed.append(struct.pack("!B", self.value))
1659 packed.append(struct.pack("!B", self.value_mask))
1660 return ''.join(packed)
1661
1662 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001663 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001664 obj = icmpv6_code_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001665 _type_len = reader.read("!L")[0]
1666 assert(_type_len == 2147499266)
1667 obj.value = reader.read("!B")[0]
1668 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001669 return obj
1670
1671 def __eq__(self, other):
1672 if type(self) != type(other): return False
1673 if self.value != other.value: return False
1674 if self.value_mask != other.value_mask: return False
1675 return True
1676
Rich Lanec2ee4b82013-04-24 17:12:38 -07001677 def pretty_print(self, q):
1678 q.text("icmpv6_code_masked {")
1679 with q.group():
1680 with q.indent(2):
1681 q.breakable()
1682 q.text("value = ");
1683 q.text("%#x" % self.value)
1684 q.text(","); q.breakable()
1685 q.text("value_mask = ");
1686 q.text("%#x" % self.value_mask)
1687 q.breakable()
1688 q.text('}')
1689
Rich Lane7dcdf022013-12-11 14:45:27 -08001690oxm.subtypes[2147499266] = icmpv6_code_masked
1691
1692class icmpv6_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001693 type_len = 2147498497
Rich Lanec2ee4b82013-04-24 17:12:38 -07001694
1695 def __init__(self, value=None):
1696 if value != None:
1697 self.value = value
1698 else:
1699 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001700 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001701
1702 def pack(self):
1703 packed = []
1704 packed.append(struct.pack("!L", self.type_len))
1705 packed.append(struct.pack("!B", self.value))
1706 return ''.join(packed)
1707
1708 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001709 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001710 obj = icmpv6_type()
Dan Talaycof6202252013-07-02 01:00:29 -07001711 _type_len = reader.read("!L")[0]
1712 assert(_type_len == 2147498497)
1713 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001714 return obj
1715
1716 def __eq__(self, other):
1717 if type(self) != type(other): return False
1718 if self.value != other.value: return False
1719 return True
1720
Rich Lanec2ee4b82013-04-24 17:12:38 -07001721 def pretty_print(self, q):
1722 q.text("icmpv6_type {")
1723 with q.group():
1724 with q.indent(2):
1725 q.breakable()
1726 q.text("value = ");
1727 q.text("%#x" % self.value)
1728 q.breakable()
1729 q.text('}')
1730
Rich Lane7dcdf022013-12-11 14:45:27 -08001731oxm.subtypes[2147498497] = icmpv6_type
1732
1733class icmpv6_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001734 type_len = 2147498754
Rich Lanec2ee4b82013-04-24 17:12:38 -07001735
1736 def __init__(self, value=None, value_mask=None):
1737 if value != None:
1738 self.value = value
1739 else:
1740 self.value = 0
1741 if value_mask != None:
1742 self.value_mask = value_mask
1743 else:
1744 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001745 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001746
1747 def pack(self):
1748 packed = []
1749 packed.append(struct.pack("!L", self.type_len))
1750 packed.append(struct.pack("!B", self.value))
1751 packed.append(struct.pack("!B", self.value_mask))
1752 return ''.join(packed)
1753
1754 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001755 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001756 obj = icmpv6_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001757 _type_len = reader.read("!L")[0]
1758 assert(_type_len == 2147498754)
1759 obj.value = reader.read("!B")[0]
1760 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001761 return obj
1762
1763 def __eq__(self, other):
1764 if type(self) != type(other): return False
1765 if self.value != other.value: return False
1766 if self.value_mask != other.value_mask: return False
1767 return True
1768
Rich Lanec2ee4b82013-04-24 17:12:38 -07001769 def pretty_print(self, q):
1770 q.text("icmpv6_type_masked {")
1771 with q.group():
1772 with q.indent(2):
1773 q.breakable()
1774 q.text("value = ");
1775 q.text("%#x" % self.value)
1776 q.text(","); q.breakable()
1777 q.text("value_mask = ");
1778 q.text("%#x" % self.value_mask)
1779 q.breakable()
1780 q.text('}')
1781
Rich Lane7dcdf022013-12-11 14:45:27 -08001782oxm.subtypes[2147498754] = icmpv6_type_masked
1783
1784class in_phy_port(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001785 type_len = 2147484164
Rich Lanec2ee4b82013-04-24 17:12:38 -07001786
1787 def __init__(self, value=None):
1788 if value != None:
1789 self.value = value
1790 else:
1791 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001792 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001793
1794 def pack(self):
1795 packed = []
1796 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07001797 packed.append(util.pack_port_no(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07001798 return ''.join(packed)
1799
1800 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001801 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001802 obj = in_phy_port()
Dan Talaycof6202252013-07-02 01:00:29 -07001803 _type_len = reader.read("!L")[0]
1804 assert(_type_len == 2147484164)
1805 obj.value = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001806 return obj
1807
1808 def __eq__(self, other):
1809 if type(self) != type(other): return False
1810 if self.value != other.value: return False
1811 return True
1812
Rich Lanec2ee4b82013-04-24 17:12:38 -07001813 def pretty_print(self, q):
1814 q.text("in_phy_port {")
1815 with q.group():
1816 with q.indent(2):
1817 q.breakable()
1818 q.text("value = ");
1819 q.text(util.pretty_port(self.value))
1820 q.breakable()
1821 q.text('}')
1822
Rich Lane7dcdf022013-12-11 14:45:27 -08001823oxm.subtypes[2147484164] = in_phy_port
1824
1825class in_phy_port_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001826 type_len = 2147484424
Rich Lanec2ee4b82013-04-24 17:12:38 -07001827
1828 def __init__(self, value=None, value_mask=None):
1829 if value != None:
1830 self.value = value
1831 else:
1832 self.value = 0
1833 if value_mask != None:
1834 self.value_mask = value_mask
1835 else:
1836 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001837 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001838
1839 def pack(self):
1840 packed = []
1841 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07001842 packed.append(util.pack_port_no(self.value))
1843 packed.append(util.pack_port_no(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07001844 return ''.join(packed)
1845
1846 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001847 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001848 obj = in_phy_port_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001849 _type_len = reader.read("!L")[0]
1850 assert(_type_len == 2147484424)
1851 obj.value = util.unpack_port_no(reader)
1852 obj.value_mask = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001853 return obj
1854
1855 def __eq__(self, other):
1856 if type(self) != type(other): return False
1857 if self.value != other.value: return False
1858 if self.value_mask != other.value_mask: return False
1859 return True
1860
Rich Lanec2ee4b82013-04-24 17:12:38 -07001861 def pretty_print(self, q):
1862 q.text("in_phy_port_masked {")
1863 with q.group():
1864 with q.indent(2):
1865 q.breakable()
1866 q.text("value = ");
1867 q.text(util.pretty_port(self.value))
1868 q.text(","); q.breakable()
1869 q.text("value_mask = ");
1870 q.text(util.pretty_port(self.value_mask))
1871 q.breakable()
1872 q.text('}')
1873
Rich Lane7dcdf022013-12-11 14:45:27 -08001874oxm.subtypes[2147484424] = in_phy_port_masked
1875
1876class in_port(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001877 type_len = 2147483652
Rich Lanec2ee4b82013-04-24 17:12:38 -07001878
1879 def __init__(self, value=None):
1880 if value != None:
1881 self.value = value
1882 else:
1883 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001884 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001885
1886 def pack(self):
1887 packed = []
1888 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07001889 packed.append(util.pack_port_no(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07001890 return ''.join(packed)
1891
1892 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001893 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001894 obj = in_port()
Dan Talaycof6202252013-07-02 01:00:29 -07001895 _type_len = reader.read("!L")[0]
1896 assert(_type_len == 2147483652)
1897 obj.value = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001898 return obj
1899
1900 def __eq__(self, other):
1901 if type(self) != type(other): return False
1902 if self.value != other.value: return False
1903 return True
1904
Rich Lanec2ee4b82013-04-24 17:12:38 -07001905 def pretty_print(self, q):
1906 q.text("in_port {")
1907 with q.group():
1908 with q.indent(2):
1909 q.breakable()
1910 q.text("value = ");
1911 q.text(util.pretty_port(self.value))
1912 q.breakable()
1913 q.text('}')
1914
Rich Lane7dcdf022013-12-11 14:45:27 -08001915oxm.subtypes[2147483652] = in_port
1916
1917class in_port_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001918 type_len = 2147483912
Rich Lanec2ee4b82013-04-24 17:12:38 -07001919
1920 def __init__(self, value=None, value_mask=None):
1921 if value != None:
1922 self.value = value
1923 else:
1924 self.value = 0
1925 if value_mask != None:
1926 self.value_mask = value_mask
1927 else:
1928 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001929 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001930
1931 def pack(self):
1932 packed = []
1933 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07001934 packed.append(util.pack_port_no(self.value))
1935 packed.append(util.pack_port_no(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07001936 return ''.join(packed)
1937
1938 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001939 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001940 obj = in_port_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001941 _type_len = reader.read("!L")[0]
1942 assert(_type_len == 2147483912)
1943 obj.value = util.unpack_port_no(reader)
1944 obj.value_mask = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001945 return obj
1946
1947 def __eq__(self, other):
1948 if type(self) != type(other): return False
1949 if self.value != other.value: return False
1950 if self.value_mask != other.value_mask: return False
1951 return True
1952
Rich Lanec2ee4b82013-04-24 17:12:38 -07001953 def pretty_print(self, q):
1954 q.text("in_port_masked {")
1955 with q.group():
1956 with q.indent(2):
1957 q.breakable()
1958 q.text("value = ");
1959 q.text(util.pretty_port(self.value))
1960 q.text(","); q.breakable()
1961 q.text("value_mask = ");
1962 q.text(util.pretty_port(self.value_mask))
1963 q.breakable()
1964 q.text('}')
1965
Rich Lane7dcdf022013-12-11 14:45:27 -08001966oxm.subtypes[2147483912] = in_port_masked
1967
1968class ip_dscp(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001969 type_len = 2147487745
Rich Lanec2ee4b82013-04-24 17:12:38 -07001970
1971 def __init__(self, value=None):
1972 if value != None:
1973 self.value = value
1974 else:
1975 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001976 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001977
1978 def pack(self):
1979 packed = []
1980 packed.append(struct.pack("!L", self.type_len))
1981 packed.append(struct.pack("!B", self.value))
1982 return ''.join(packed)
1983
1984 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001985 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001986 obj = ip_dscp()
Dan Talaycof6202252013-07-02 01:00:29 -07001987 _type_len = reader.read("!L")[0]
1988 assert(_type_len == 2147487745)
1989 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001990 return obj
1991
1992 def __eq__(self, other):
1993 if type(self) != type(other): return False
1994 if self.value != other.value: return False
1995 return True
1996
Rich Lanec2ee4b82013-04-24 17:12:38 -07001997 def pretty_print(self, q):
1998 q.text("ip_dscp {")
1999 with q.group():
2000 with q.indent(2):
2001 q.breakable()
2002 q.text("value = ");
2003 q.text("%#x" % self.value)
2004 q.breakable()
2005 q.text('}')
2006
Rich Lane7dcdf022013-12-11 14:45:27 -08002007oxm.subtypes[2147487745] = ip_dscp
2008
2009class ip_dscp_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002010 type_len = 2147488002
Rich Lanec2ee4b82013-04-24 17:12:38 -07002011
2012 def __init__(self, value=None, value_mask=None):
2013 if value != None:
2014 self.value = value
2015 else:
2016 self.value = 0
2017 if value_mask != None:
2018 self.value_mask = value_mask
2019 else:
2020 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002021 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002022
2023 def pack(self):
2024 packed = []
2025 packed.append(struct.pack("!L", self.type_len))
2026 packed.append(struct.pack("!B", self.value))
2027 packed.append(struct.pack("!B", self.value_mask))
2028 return ''.join(packed)
2029
2030 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002031 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002032 obj = ip_dscp_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002033 _type_len = reader.read("!L")[0]
2034 assert(_type_len == 2147488002)
2035 obj.value = reader.read("!B")[0]
2036 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002037 return obj
2038
2039 def __eq__(self, other):
2040 if type(self) != type(other): return False
2041 if self.value != other.value: return False
2042 if self.value_mask != other.value_mask: return False
2043 return True
2044
Rich Lanec2ee4b82013-04-24 17:12:38 -07002045 def pretty_print(self, q):
2046 q.text("ip_dscp_masked {")
2047 with q.group():
2048 with q.indent(2):
2049 q.breakable()
2050 q.text("value = ");
2051 q.text("%#x" % self.value)
2052 q.text(","); q.breakable()
2053 q.text("value_mask = ");
2054 q.text("%#x" % self.value_mask)
2055 q.breakable()
2056 q.text('}')
2057
Rich Lane7dcdf022013-12-11 14:45:27 -08002058oxm.subtypes[2147488002] = ip_dscp_masked
2059
2060class ip_ecn(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002061 type_len = 2147488257
Rich Lanec2ee4b82013-04-24 17:12:38 -07002062
2063 def __init__(self, value=None):
2064 if value != None:
2065 self.value = value
2066 else:
2067 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002068 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002069
2070 def pack(self):
2071 packed = []
2072 packed.append(struct.pack("!L", self.type_len))
2073 packed.append(struct.pack("!B", self.value))
2074 return ''.join(packed)
2075
2076 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002077 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002078 obj = ip_ecn()
Dan Talaycof6202252013-07-02 01:00:29 -07002079 _type_len = reader.read("!L")[0]
2080 assert(_type_len == 2147488257)
2081 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002082 return obj
2083
2084 def __eq__(self, other):
2085 if type(self) != type(other): return False
2086 if self.value != other.value: return False
2087 return True
2088
Rich Lanec2ee4b82013-04-24 17:12:38 -07002089 def pretty_print(self, q):
2090 q.text("ip_ecn {")
2091 with q.group():
2092 with q.indent(2):
2093 q.breakable()
2094 q.text("value = ");
2095 q.text("%#x" % self.value)
2096 q.breakable()
2097 q.text('}')
2098
Rich Lane7dcdf022013-12-11 14:45:27 -08002099oxm.subtypes[2147488257] = ip_ecn
2100
2101class ip_ecn_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002102 type_len = 2147488514
Rich Lanec2ee4b82013-04-24 17:12:38 -07002103
2104 def __init__(self, value=None, value_mask=None):
2105 if value != None:
2106 self.value = value
2107 else:
2108 self.value = 0
2109 if value_mask != None:
2110 self.value_mask = value_mask
2111 else:
2112 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002113 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002114
2115 def pack(self):
2116 packed = []
2117 packed.append(struct.pack("!L", self.type_len))
2118 packed.append(struct.pack("!B", self.value))
2119 packed.append(struct.pack("!B", self.value_mask))
2120 return ''.join(packed)
2121
2122 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002123 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002124 obj = ip_ecn_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002125 _type_len = reader.read("!L")[0]
2126 assert(_type_len == 2147488514)
2127 obj.value = reader.read("!B")[0]
2128 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002129 return obj
2130
2131 def __eq__(self, other):
2132 if type(self) != type(other): return False
2133 if self.value != other.value: return False
2134 if self.value_mask != other.value_mask: return False
2135 return True
2136
Rich Lanec2ee4b82013-04-24 17:12:38 -07002137 def pretty_print(self, q):
2138 q.text("ip_ecn_masked {")
2139 with q.group():
2140 with q.indent(2):
2141 q.breakable()
2142 q.text("value = ");
2143 q.text("%#x" % self.value)
2144 q.text(","); q.breakable()
2145 q.text("value_mask = ");
2146 q.text("%#x" % self.value_mask)
2147 q.breakable()
2148 q.text('}')
2149
Rich Lane7dcdf022013-12-11 14:45:27 -08002150oxm.subtypes[2147488514] = ip_ecn_masked
2151
2152class ip_proto(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002153 type_len = 2147488769
Rich Lanec2ee4b82013-04-24 17:12:38 -07002154
2155 def __init__(self, value=None):
2156 if value != None:
2157 self.value = value
2158 else:
2159 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002160 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002161
2162 def pack(self):
2163 packed = []
2164 packed.append(struct.pack("!L", self.type_len))
2165 packed.append(struct.pack("!B", self.value))
2166 return ''.join(packed)
2167
2168 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002169 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002170 obj = ip_proto()
Dan Talaycof6202252013-07-02 01:00:29 -07002171 _type_len = reader.read("!L")[0]
2172 assert(_type_len == 2147488769)
2173 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002174 return obj
2175
2176 def __eq__(self, other):
2177 if type(self) != type(other): return False
2178 if self.value != other.value: return False
2179 return True
2180
Rich Lanec2ee4b82013-04-24 17:12:38 -07002181 def pretty_print(self, q):
2182 q.text("ip_proto {")
2183 with q.group():
2184 with q.indent(2):
2185 q.breakable()
2186 q.text("value = ");
2187 q.text("%#x" % self.value)
2188 q.breakable()
2189 q.text('}')
2190
Rich Lane7dcdf022013-12-11 14:45:27 -08002191oxm.subtypes[2147488769] = ip_proto
2192
2193class ip_proto_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002194 type_len = 2147489026
Rich Lanec2ee4b82013-04-24 17:12:38 -07002195
2196 def __init__(self, value=None, value_mask=None):
2197 if value != None:
2198 self.value = value
2199 else:
2200 self.value = 0
2201 if value_mask != None:
2202 self.value_mask = value_mask
2203 else:
2204 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002205 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002206
2207 def pack(self):
2208 packed = []
2209 packed.append(struct.pack("!L", self.type_len))
2210 packed.append(struct.pack("!B", self.value))
2211 packed.append(struct.pack("!B", self.value_mask))
2212 return ''.join(packed)
2213
2214 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002215 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002216 obj = ip_proto_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002217 _type_len = reader.read("!L")[0]
2218 assert(_type_len == 2147489026)
2219 obj.value = reader.read("!B")[0]
2220 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002221 return obj
2222
2223 def __eq__(self, other):
2224 if type(self) != type(other): return False
2225 if self.value != other.value: return False
2226 if self.value_mask != other.value_mask: return False
2227 return True
2228
Rich Lanec2ee4b82013-04-24 17:12:38 -07002229 def pretty_print(self, q):
2230 q.text("ip_proto_masked {")
2231 with q.group():
2232 with q.indent(2):
2233 q.breakable()
2234 q.text("value = ");
2235 q.text("%#x" % self.value)
2236 q.text(","); q.breakable()
2237 q.text("value_mask = ");
2238 q.text("%#x" % self.value_mask)
2239 q.breakable()
2240 q.text('}')
2241
Rich Lane7dcdf022013-12-11 14:45:27 -08002242oxm.subtypes[2147489026] = ip_proto_masked
2243
2244class ipv4_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002245 type_len = 2147489796
Rich Lanec2ee4b82013-04-24 17:12:38 -07002246
2247 def __init__(self, value=None):
2248 if value != None:
2249 self.value = value
2250 else:
2251 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002252 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002253
2254 def pack(self):
2255 packed = []
2256 packed.append(struct.pack("!L", self.type_len))
2257 packed.append(struct.pack("!L", self.value))
2258 return ''.join(packed)
2259
2260 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002261 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002262 obj = ipv4_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07002263 _type_len = reader.read("!L")[0]
2264 assert(_type_len == 2147489796)
2265 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002266 return obj
2267
2268 def __eq__(self, other):
2269 if type(self) != type(other): return False
2270 if self.value != other.value: return False
2271 return True
2272
Rich Lanec2ee4b82013-04-24 17:12:38 -07002273 def pretty_print(self, q):
2274 q.text("ipv4_dst {")
2275 with q.group():
2276 with q.indent(2):
2277 q.breakable()
2278 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07002279 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002280 q.breakable()
2281 q.text('}')
2282
Rich Lane7dcdf022013-12-11 14:45:27 -08002283oxm.subtypes[2147489796] = ipv4_dst
2284
2285class ipv4_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002286 type_len = 2147490056
Rich Lanec2ee4b82013-04-24 17:12:38 -07002287
2288 def __init__(self, value=None, value_mask=None):
2289 if value != None:
2290 self.value = value
2291 else:
2292 self.value = 0
2293 if value_mask != None:
2294 self.value_mask = value_mask
2295 else:
2296 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002297 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002298
2299 def pack(self):
2300 packed = []
2301 packed.append(struct.pack("!L", self.type_len))
2302 packed.append(struct.pack("!L", self.value))
2303 packed.append(struct.pack("!L", self.value_mask))
2304 return ''.join(packed)
2305
2306 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002307 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002308 obj = ipv4_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002309 _type_len = reader.read("!L")[0]
2310 assert(_type_len == 2147490056)
2311 obj.value = reader.read("!L")[0]
2312 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002313 return obj
2314
2315 def __eq__(self, other):
2316 if type(self) != type(other): return False
2317 if self.value != other.value: return False
2318 if self.value_mask != other.value_mask: return False
2319 return True
2320
Rich Lanec2ee4b82013-04-24 17:12:38 -07002321 def pretty_print(self, q):
2322 q.text("ipv4_dst_masked {")
2323 with q.group():
2324 with q.indent(2):
2325 q.breakable()
2326 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07002327 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002328 q.text(","); q.breakable()
2329 q.text("value_mask = ");
Rich Laned53156a2013-08-05 17:17:33 -07002330 q.text(util.pretty_ipv4(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002331 q.breakable()
2332 q.text('}')
2333
Rich Lane7dcdf022013-12-11 14:45:27 -08002334oxm.subtypes[2147490056] = ipv4_dst_masked
2335
2336class ipv4_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002337 type_len = 2147489284
Rich Lanec2ee4b82013-04-24 17:12:38 -07002338
2339 def __init__(self, value=None):
2340 if value != None:
2341 self.value = value
2342 else:
2343 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002344 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002345
2346 def pack(self):
2347 packed = []
2348 packed.append(struct.pack("!L", self.type_len))
2349 packed.append(struct.pack("!L", self.value))
2350 return ''.join(packed)
2351
2352 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002353 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002354 obj = ipv4_src()
Dan Talaycof6202252013-07-02 01:00:29 -07002355 _type_len = reader.read("!L")[0]
2356 assert(_type_len == 2147489284)
2357 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002358 return obj
2359
2360 def __eq__(self, other):
2361 if type(self) != type(other): return False
2362 if self.value != other.value: return False
2363 return True
2364
Rich Lanec2ee4b82013-04-24 17:12:38 -07002365 def pretty_print(self, q):
2366 q.text("ipv4_src {")
2367 with q.group():
2368 with q.indent(2):
2369 q.breakable()
2370 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07002371 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002372 q.breakable()
2373 q.text('}')
2374
Rich Lane7dcdf022013-12-11 14:45:27 -08002375oxm.subtypes[2147489284] = ipv4_src
2376
2377class ipv4_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002378 type_len = 2147489544
Rich Lanec2ee4b82013-04-24 17:12:38 -07002379
2380 def __init__(self, value=None, value_mask=None):
2381 if value != None:
2382 self.value = value
2383 else:
2384 self.value = 0
2385 if value_mask != None:
2386 self.value_mask = value_mask
2387 else:
2388 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002389 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002390
2391 def pack(self):
2392 packed = []
2393 packed.append(struct.pack("!L", self.type_len))
2394 packed.append(struct.pack("!L", self.value))
2395 packed.append(struct.pack("!L", self.value_mask))
2396 return ''.join(packed)
2397
2398 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002399 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002400 obj = ipv4_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002401 _type_len = reader.read("!L")[0]
2402 assert(_type_len == 2147489544)
2403 obj.value = reader.read("!L")[0]
2404 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002405 return obj
2406
2407 def __eq__(self, other):
2408 if type(self) != type(other): return False
2409 if self.value != other.value: return False
2410 if self.value_mask != other.value_mask: return False
2411 return True
2412
Rich Lanec2ee4b82013-04-24 17:12:38 -07002413 def pretty_print(self, q):
2414 q.text("ipv4_src_masked {")
2415 with q.group():
2416 with q.indent(2):
2417 q.breakable()
2418 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07002419 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002420 q.text(","); q.breakable()
2421 q.text("value_mask = ");
Rich Laned53156a2013-08-05 17:17:33 -07002422 q.text(util.pretty_ipv4(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002423 q.breakable()
2424 q.text('}')
2425
Rich Lane7dcdf022013-12-11 14:45:27 -08002426oxm.subtypes[2147489544] = ipv4_src_masked
2427
2428class ipv6_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002429 type_len = 2147497488
Rich Lanec2ee4b82013-04-24 17:12:38 -07002430
2431 def __init__(self, value=None):
2432 if value != None:
2433 self.value = value
2434 else:
2435 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 -08002436 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002437
2438 def pack(self):
2439 packed = []
2440 packed.append(struct.pack("!L", self.type_len))
2441 packed.append(struct.pack("!16s", self.value))
2442 return ''.join(packed)
2443
2444 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002445 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002446 obj = ipv6_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07002447 _type_len = reader.read("!L")[0]
2448 assert(_type_len == 2147497488)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002449 obj.value = reader.read('!16s')[0]
2450 return obj
2451
2452 def __eq__(self, other):
2453 if type(self) != type(other): return False
2454 if self.value != other.value: return False
2455 return True
2456
Rich Lanec2ee4b82013-04-24 17:12:38 -07002457 def pretty_print(self, q):
2458 q.text("ipv6_dst {")
2459 with q.group():
2460 with q.indent(2):
2461 q.breakable()
2462 q.text("value = ");
2463 q.pp(self.value)
2464 q.breakable()
2465 q.text('}')
2466
Rich Lane7dcdf022013-12-11 14:45:27 -08002467oxm.subtypes[2147497488] = ipv6_dst
2468
2469class ipv6_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002470 type_len = 2147497760
Rich Lanec2ee4b82013-04-24 17:12:38 -07002471
2472 def __init__(self, value=None, value_mask=None):
2473 if value != None:
2474 self.value = value
2475 else:
2476 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2477 if value_mask != None:
2478 self.value_mask = value_mask
2479 else:
2480 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 -08002481 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002482
2483 def pack(self):
2484 packed = []
2485 packed.append(struct.pack("!L", self.type_len))
2486 packed.append(struct.pack("!16s", self.value))
2487 packed.append(struct.pack("!16s", self.value_mask))
2488 return ''.join(packed)
2489
2490 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002491 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002492 obj = ipv6_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002493 _type_len = reader.read("!L")[0]
2494 assert(_type_len == 2147497760)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002495 obj.value = reader.read('!16s')[0]
2496 obj.value_mask = reader.read('!16s')[0]
2497 return obj
2498
2499 def __eq__(self, other):
2500 if type(self) != type(other): return False
2501 if self.value != other.value: return False
2502 if self.value_mask != other.value_mask: return False
2503 return True
2504
Rich Lanec2ee4b82013-04-24 17:12:38 -07002505 def pretty_print(self, q):
2506 q.text("ipv6_dst_masked {")
2507 with q.group():
2508 with q.indent(2):
2509 q.breakable()
2510 q.text("value = ");
2511 q.pp(self.value)
2512 q.text(","); q.breakable()
2513 q.text("value_mask = ");
2514 q.pp(self.value_mask)
2515 q.breakable()
2516 q.text('}')
2517
Rich Lane7dcdf022013-12-11 14:45:27 -08002518oxm.subtypes[2147497760] = ipv6_dst_masked
2519
2520class ipv6_flabel(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002521 type_len = 2147497988
Rich Lanec2ee4b82013-04-24 17:12:38 -07002522
2523 def __init__(self, value=None):
2524 if value != None:
2525 self.value = value
2526 else:
2527 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002528 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002529
2530 def pack(self):
2531 packed = []
2532 packed.append(struct.pack("!L", self.type_len))
2533 packed.append(struct.pack("!L", self.value))
2534 return ''.join(packed)
2535
2536 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002537 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002538 obj = ipv6_flabel()
Dan Talaycof6202252013-07-02 01:00:29 -07002539 _type_len = reader.read("!L")[0]
2540 assert(_type_len == 2147497988)
2541 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002542 return obj
2543
2544 def __eq__(self, other):
2545 if type(self) != type(other): return False
2546 if self.value != other.value: return False
2547 return True
2548
Rich Lanec2ee4b82013-04-24 17:12:38 -07002549 def pretty_print(self, q):
2550 q.text("ipv6_flabel {")
2551 with q.group():
2552 with q.indent(2):
2553 q.breakable()
2554 q.text("value = ");
2555 q.text("%#x" % self.value)
2556 q.breakable()
2557 q.text('}')
2558
Rich Lane7dcdf022013-12-11 14:45:27 -08002559oxm.subtypes[2147497988] = ipv6_flabel
2560
2561class ipv6_flabel_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002562 type_len = 2147498248
Rich Lanec2ee4b82013-04-24 17:12:38 -07002563
2564 def __init__(self, value=None, value_mask=None):
2565 if value != None:
2566 self.value = value
2567 else:
2568 self.value = 0
2569 if value_mask != None:
2570 self.value_mask = value_mask
2571 else:
2572 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002573 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002574
2575 def pack(self):
2576 packed = []
2577 packed.append(struct.pack("!L", self.type_len))
2578 packed.append(struct.pack("!L", self.value))
2579 packed.append(struct.pack("!L", self.value_mask))
2580 return ''.join(packed)
2581
2582 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002583 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002584 obj = ipv6_flabel_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002585 _type_len = reader.read("!L")[0]
2586 assert(_type_len == 2147498248)
2587 obj.value = reader.read("!L")[0]
2588 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002589 return obj
2590
2591 def __eq__(self, other):
2592 if type(self) != type(other): return False
2593 if self.value != other.value: return False
2594 if self.value_mask != other.value_mask: return False
2595 return True
2596
Rich Lanec2ee4b82013-04-24 17:12:38 -07002597 def pretty_print(self, q):
2598 q.text("ipv6_flabel_masked {")
2599 with q.group():
2600 with q.indent(2):
2601 q.breakable()
2602 q.text("value = ");
2603 q.text("%#x" % self.value)
2604 q.text(","); q.breakable()
2605 q.text("value_mask = ");
2606 q.text("%#x" % self.value_mask)
2607 q.breakable()
2608 q.text('}')
2609
Rich Lane7dcdf022013-12-11 14:45:27 -08002610oxm.subtypes[2147498248] = ipv6_flabel_masked
2611
2612class ipv6_nd_sll(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002613 type_len = 2147500038
Rich Lanec2ee4b82013-04-24 17:12:38 -07002614
2615 def __init__(self, value=None):
2616 if value != None:
2617 self.value = value
2618 else:
2619 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002620 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002621
2622 def pack(self):
2623 packed = []
2624 packed.append(struct.pack("!L", self.type_len))
2625 packed.append(struct.pack("!6B", *self.value))
2626 return ''.join(packed)
2627
2628 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002629 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002630 obj = ipv6_nd_sll()
Dan Talaycof6202252013-07-02 01:00:29 -07002631 _type_len = reader.read("!L")[0]
2632 assert(_type_len == 2147500038)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002633 obj.value = list(reader.read('!6B'))
2634 return obj
2635
2636 def __eq__(self, other):
2637 if type(self) != type(other): return False
2638 if self.value != other.value: return False
2639 return True
2640
Rich Lanec2ee4b82013-04-24 17:12:38 -07002641 def pretty_print(self, q):
2642 q.text("ipv6_nd_sll {")
2643 with q.group():
2644 with q.indent(2):
2645 q.breakable()
2646 q.text("value = ");
2647 q.text(util.pretty_mac(self.value))
2648 q.breakable()
2649 q.text('}')
2650
Rich Lane7dcdf022013-12-11 14:45:27 -08002651oxm.subtypes[2147500038] = ipv6_nd_sll
2652
2653class ipv6_nd_sll_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002654 type_len = 2147500300
Rich Lanec2ee4b82013-04-24 17:12:38 -07002655
2656 def __init__(self, value=None, value_mask=None):
2657 if value != None:
2658 self.value = value
2659 else:
2660 self.value = [0,0,0,0,0,0]
2661 if value_mask != None:
2662 self.value_mask = value_mask
2663 else:
2664 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002665 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002666
2667 def pack(self):
2668 packed = []
2669 packed.append(struct.pack("!L", self.type_len))
2670 packed.append(struct.pack("!6B", *self.value))
2671 packed.append(struct.pack("!6B", *self.value_mask))
2672 return ''.join(packed)
2673
2674 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002675 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002676 obj = ipv6_nd_sll_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002677 _type_len = reader.read("!L")[0]
2678 assert(_type_len == 2147500300)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002679 obj.value = list(reader.read('!6B'))
2680 obj.value_mask = list(reader.read('!6B'))
2681 return obj
2682
2683 def __eq__(self, other):
2684 if type(self) != type(other): return False
2685 if self.value != other.value: return False
2686 if self.value_mask != other.value_mask: return False
2687 return True
2688
Rich Lanec2ee4b82013-04-24 17:12:38 -07002689 def pretty_print(self, q):
2690 q.text("ipv6_nd_sll_masked {")
2691 with q.group():
2692 with q.indent(2):
2693 q.breakable()
2694 q.text("value = ");
2695 q.text(util.pretty_mac(self.value))
2696 q.text(","); q.breakable()
2697 q.text("value_mask = ");
2698 q.text(util.pretty_mac(self.value_mask))
2699 q.breakable()
2700 q.text('}')
2701
Rich Lane7dcdf022013-12-11 14:45:27 -08002702oxm.subtypes[2147500300] = ipv6_nd_sll_masked
2703
2704class ipv6_nd_target(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002705 type_len = 2147499536
Rich Lanec2ee4b82013-04-24 17:12:38 -07002706
2707 def __init__(self, value=None):
2708 if value != None:
2709 self.value = value
2710 else:
2711 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 -08002712 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002713
2714 def pack(self):
2715 packed = []
2716 packed.append(struct.pack("!L", self.type_len))
2717 packed.append(struct.pack("!16s", self.value))
2718 return ''.join(packed)
2719
2720 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002721 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002722 obj = ipv6_nd_target()
Dan Talaycof6202252013-07-02 01:00:29 -07002723 _type_len = reader.read("!L")[0]
2724 assert(_type_len == 2147499536)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002725 obj.value = reader.read('!16s')[0]
2726 return obj
2727
2728 def __eq__(self, other):
2729 if type(self) != type(other): return False
2730 if self.value != other.value: return False
2731 return True
2732
Rich Lanec2ee4b82013-04-24 17:12:38 -07002733 def pretty_print(self, q):
2734 q.text("ipv6_nd_target {")
2735 with q.group():
2736 with q.indent(2):
2737 q.breakable()
2738 q.text("value = ");
2739 q.pp(self.value)
2740 q.breakable()
2741 q.text('}')
2742
Rich Lane7dcdf022013-12-11 14:45:27 -08002743oxm.subtypes[2147499536] = ipv6_nd_target
2744
2745class ipv6_nd_target_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002746 type_len = 2147499808
Rich Lanec2ee4b82013-04-24 17:12:38 -07002747
2748 def __init__(self, value=None, value_mask=None):
2749 if value != None:
2750 self.value = value
2751 else:
2752 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2753 if value_mask != None:
2754 self.value_mask = value_mask
2755 else:
2756 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 -08002757 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002758
2759 def pack(self):
2760 packed = []
2761 packed.append(struct.pack("!L", self.type_len))
2762 packed.append(struct.pack("!16s", self.value))
2763 packed.append(struct.pack("!16s", self.value_mask))
2764 return ''.join(packed)
2765
2766 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002767 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002768 obj = ipv6_nd_target_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002769 _type_len = reader.read("!L")[0]
2770 assert(_type_len == 2147499808)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002771 obj.value = reader.read('!16s')[0]
2772 obj.value_mask = reader.read('!16s')[0]
2773 return obj
2774
2775 def __eq__(self, other):
2776 if type(self) != type(other): return False
2777 if self.value != other.value: return False
2778 if self.value_mask != other.value_mask: return False
2779 return True
2780
Rich Lanec2ee4b82013-04-24 17:12:38 -07002781 def pretty_print(self, q):
2782 q.text("ipv6_nd_target_masked {")
2783 with q.group():
2784 with q.indent(2):
2785 q.breakable()
2786 q.text("value = ");
2787 q.pp(self.value)
2788 q.text(","); q.breakable()
2789 q.text("value_mask = ");
2790 q.pp(self.value_mask)
2791 q.breakable()
2792 q.text('}')
2793
Rich Lane7dcdf022013-12-11 14:45:27 -08002794oxm.subtypes[2147499808] = ipv6_nd_target_masked
2795
2796class ipv6_nd_tll(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002797 type_len = 2147500550
Rich Lanec2ee4b82013-04-24 17:12:38 -07002798
2799 def __init__(self, value=None):
2800 if value != None:
2801 self.value = value
2802 else:
2803 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002804 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002805
2806 def pack(self):
2807 packed = []
2808 packed.append(struct.pack("!L", self.type_len))
2809 packed.append(struct.pack("!6B", *self.value))
2810 return ''.join(packed)
2811
2812 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002813 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002814 obj = ipv6_nd_tll()
Dan Talaycof6202252013-07-02 01:00:29 -07002815 _type_len = reader.read("!L")[0]
2816 assert(_type_len == 2147500550)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002817 obj.value = list(reader.read('!6B'))
2818 return obj
2819
2820 def __eq__(self, other):
2821 if type(self) != type(other): return False
2822 if self.value != other.value: return False
2823 return True
2824
Rich Lanec2ee4b82013-04-24 17:12:38 -07002825 def pretty_print(self, q):
2826 q.text("ipv6_nd_tll {")
2827 with q.group():
2828 with q.indent(2):
2829 q.breakable()
2830 q.text("value = ");
2831 q.text(util.pretty_mac(self.value))
2832 q.breakable()
2833 q.text('}')
2834
Rich Lane7dcdf022013-12-11 14:45:27 -08002835oxm.subtypes[2147500550] = ipv6_nd_tll
2836
2837class ipv6_nd_tll_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002838 type_len = 2147500812
Rich Lanec2ee4b82013-04-24 17:12:38 -07002839
2840 def __init__(self, value=None, value_mask=None):
2841 if value != None:
2842 self.value = value
2843 else:
2844 self.value = [0,0,0,0,0,0]
2845 if value_mask != None:
2846 self.value_mask = value_mask
2847 else:
2848 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002849 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002850
2851 def pack(self):
2852 packed = []
2853 packed.append(struct.pack("!L", self.type_len))
2854 packed.append(struct.pack("!6B", *self.value))
2855 packed.append(struct.pack("!6B", *self.value_mask))
2856 return ''.join(packed)
2857
2858 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002859 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002860 obj = ipv6_nd_tll_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002861 _type_len = reader.read("!L")[0]
2862 assert(_type_len == 2147500812)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002863 obj.value = list(reader.read('!6B'))
2864 obj.value_mask = list(reader.read('!6B'))
2865 return obj
2866
2867 def __eq__(self, other):
2868 if type(self) != type(other): return False
2869 if self.value != other.value: return False
2870 if self.value_mask != other.value_mask: return False
2871 return True
2872
Rich Lanec2ee4b82013-04-24 17:12:38 -07002873 def pretty_print(self, q):
2874 q.text("ipv6_nd_tll_masked {")
2875 with q.group():
2876 with q.indent(2):
2877 q.breakable()
2878 q.text("value = ");
2879 q.text(util.pretty_mac(self.value))
2880 q.text(","); q.breakable()
2881 q.text("value_mask = ");
2882 q.text(util.pretty_mac(self.value_mask))
2883 q.breakable()
2884 q.text('}')
2885
Rich Lane7dcdf022013-12-11 14:45:27 -08002886oxm.subtypes[2147500812] = ipv6_nd_tll_masked
2887
2888class ipv6_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002889 type_len = 2147496976
Rich Lanec2ee4b82013-04-24 17:12:38 -07002890
2891 def __init__(self, value=None):
2892 if value != None:
2893 self.value = value
2894 else:
2895 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 -08002896 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002897
2898 def pack(self):
2899 packed = []
2900 packed.append(struct.pack("!L", self.type_len))
2901 packed.append(struct.pack("!16s", self.value))
2902 return ''.join(packed)
2903
2904 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002905 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002906 obj = ipv6_src()
Dan Talaycof6202252013-07-02 01:00:29 -07002907 _type_len = reader.read("!L")[0]
2908 assert(_type_len == 2147496976)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002909 obj.value = reader.read('!16s')[0]
2910 return obj
2911
2912 def __eq__(self, other):
2913 if type(self) != type(other): return False
2914 if self.value != other.value: return False
2915 return True
2916
Rich Lanec2ee4b82013-04-24 17:12:38 -07002917 def pretty_print(self, q):
2918 q.text("ipv6_src {")
2919 with q.group():
2920 with q.indent(2):
2921 q.breakable()
2922 q.text("value = ");
2923 q.pp(self.value)
2924 q.breakable()
2925 q.text('}')
2926
Rich Lane7dcdf022013-12-11 14:45:27 -08002927oxm.subtypes[2147496976] = ipv6_src
2928
2929class ipv6_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002930 type_len = 2147497248
Rich Lanec2ee4b82013-04-24 17:12:38 -07002931
2932 def __init__(self, value=None, value_mask=None):
2933 if value != None:
2934 self.value = value
2935 else:
2936 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2937 if value_mask != None:
2938 self.value_mask = value_mask
2939 else:
2940 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 -08002941 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002942
2943 def pack(self):
2944 packed = []
2945 packed.append(struct.pack("!L", self.type_len))
2946 packed.append(struct.pack("!16s", self.value))
2947 packed.append(struct.pack("!16s", self.value_mask))
2948 return ''.join(packed)
2949
2950 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002951 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002952 obj = ipv6_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002953 _type_len = reader.read("!L")[0]
2954 assert(_type_len == 2147497248)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002955 obj.value = reader.read('!16s')[0]
2956 obj.value_mask = reader.read('!16s')[0]
2957 return obj
2958
2959 def __eq__(self, other):
2960 if type(self) != type(other): return False
2961 if self.value != other.value: return False
2962 if self.value_mask != other.value_mask: return False
2963 return True
2964
Rich Lanec2ee4b82013-04-24 17:12:38 -07002965 def pretty_print(self, q):
2966 q.text("ipv6_src_masked {")
2967 with q.group():
2968 with q.indent(2):
2969 q.breakable()
2970 q.text("value = ");
2971 q.pp(self.value)
2972 q.text(","); q.breakable()
2973 q.text("value_mask = ");
2974 q.pp(self.value_mask)
2975 q.breakable()
2976 q.text('}')
2977
Rich Lane7dcdf022013-12-11 14:45:27 -08002978oxm.subtypes[2147497248] = ipv6_src_masked
2979
2980class metadata(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002981 type_len = 2147484680
Rich Lanec2ee4b82013-04-24 17:12:38 -07002982
2983 def __init__(self, value=None):
2984 if value != None:
2985 self.value = value
2986 else:
2987 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002988 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002989
2990 def pack(self):
2991 packed = []
2992 packed.append(struct.pack("!L", self.type_len))
2993 packed.append(struct.pack("!Q", self.value))
2994 return ''.join(packed)
2995
2996 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002997 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002998 obj = metadata()
Dan Talaycof6202252013-07-02 01:00:29 -07002999 _type_len = reader.read("!L")[0]
3000 assert(_type_len == 2147484680)
3001 obj.value = reader.read("!Q")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003002 return obj
3003
3004 def __eq__(self, other):
3005 if type(self) != type(other): return False
3006 if self.value != other.value: return False
3007 return True
3008
Rich Lanec2ee4b82013-04-24 17:12:38 -07003009 def pretty_print(self, q):
3010 q.text("metadata {")
3011 with q.group():
3012 with q.indent(2):
3013 q.breakable()
3014 q.text("value = ");
3015 q.text("%#x" % self.value)
3016 q.breakable()
3017 q.text('}')
3018
Rich Lane7dcdf022013-12-11 14:45:27 -08003019oxm.subtypes[2147484680] = metadata
3020
3021class metadata_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003022 type_len = 2147484944
Rich Lanec2ee4b82013-04-24 17:12:38 -07003023
3024 def __init__(self, value=None, value_mask=None):
3025 if value != None:
3026 self.value = value
3027 else:
3028 self.value = 0
3029 if value_mask != None:
3030 self.value_mask = value_mask
3031 else:
3032 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003033 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003034
3035 def pack(self):
3036 packed = []
3037 packed.append(struct.pack("!L", self.type_len))
3038 packed.append(struct.pack("!Q", self.value))
3039 packed.append(struct.pack("!Q", self.value_mask))
3040 return ''.join(packed)
3041
3042 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003043 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003044 obj = metadata_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003045 _type_len = reader.read("!L")[0]
3046 assert(_type_len == 2147484944)
3047 obj.value = reader.read("!Q")[0]
3048 obj.value_mask = reader.read("!Q")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003049 return obj
3050
3051 def __eq__(self, other):
3052 if type(self) != type(other): return False
3053 if self.value != other.value: return False
3054 if self.value_mask != other.value_mask: return False
3055 return True
3056
Rich Lanec2ee4b82013-04-24 17:12:38 -07003057 def pretty_print(self, q):
3058 q.text("metadata_masked {")
3059 with q.group():
3060 with q.indent(2):
3061 q.breakable()
3062 q.text("value = ");
3063 q.text("%#x" % self.value)
3064 q.text(","); q.breakable()
3065 q.text("value_mask = ");
3066 q.text("%#x" % self.value_mask)
3067 q.breakable()
3068 q.text('}')
3069
Rich Lane7dcdf022013-12-11 14:45:27 -08003070oxm.subtypes[2147484944] = metadata_masked
3071
3072class mpls_label(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003073 type_len = 2147501060
Rich Lanec2ee4b82013-04-24 17:12:38 -07003074
3075 def __init__(self, value=None):
3076 if value != None:
3077 self.value = value
3078 else:
3079 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003080 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003081
3082 def pack(self):
3083 packed = []
3084 packed.append(struct.pack("!L", self.type_len))
3085 packed.append(struct.pack("!L", self.value))
3086 return ''.join(packed)
3087
3088 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003089 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003090 obj = mpls_label()
Dan Talaycof6202252013-07-02 01:00:29 -07003091 _type_len = reader.read("!L")[0]
3092 assert(_type_len == 2147501060)
3093 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003094 return obj
3095
3096 def __eq__(self, other):
3097 if type(self) != type(other): return False
3098 if self.value != other.value: return False
3099 return True
3100
Rich Lanec2ee4b82013-04-24 17:12:38 -07003101 def pretty_print(self, q):
3102 q.text("mpls_label {")
3103 with q.group():
3104 with q.indent(2):
3105 q.breakable()
3106 q.text("value = ");
3107 q.text("%#x" % self.value)
3108 q.breakable()
3109 q.text('}')
3110
Rich Lane7dcdf022013-12-11 14:45:27 -08003111oxm.subtypes[2147501060] = mpls_label
3112
3113class mpls_label_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003114 type_len = 2147501320
Rich Lanec2ee4b82013-04-24 17:12:38 -07003115
3116 def __init__(self, value=None, value_mask=None):
3117 if value != None:
3118 self.value = value
3119 else:
3120 self.value = 0
3121 if value_mask != None:
3122 self.value_mask = value_mask
3123 else:
3124 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003125 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003126
3127 def pack(self):
3128 packed = []
3129 packed.append(struct.pack("!L", self.type_len))
3130 packed.append(struct.pack("!L", self.value))
3131 packed.append(struct.pack("!L", self.value_mask))
3132 return ''.join(packed)
3133
3134 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003135 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003136 obj = mpls_label_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003137 _type_len = reader.read("!L")[0]
3138 assert(_type_len == 2147501320)
3139 obj.value = reader.read("!L")[0]
3140 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003141 return obj
3142
3143 def __eq__(self, other):
3144 if type(self) != type(other): return False
3145 if self.value != other.value: return False
3146 if self.value_mask != other.value_mask: return False
3147 return True
3148
Rich Lanec2ee4b82013-04-24 17:12:38 -07003149 def pretty_print(self, q):
3150 q.text("mpls_label_masked {")
3151 with q.group():
3152 with q.indent(2):
3153 q.breakable()
3154 q.text("value = ");
3155 q.text("%#x" % self.value)
3156 q.text(","); q.breakable()
3157 q.text("value_mask = ");
3158 q.text("%#x" % self.value_mask)
3159 q.breakable()
3160 q.text('}')
3161
Rich Lane7dcdf022013-12-11 14:45:27 -08003162oxm.subtypes[2147501320] = mpls_label_masked
3163
3164class mpls_tc(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003165 type_len = 2147501569
Rich Lanec2ee4b82013-04-24 17:12:38 -07003166
3167 def __init__(self, value=None):
3168 if value != None:
3169 self.value = value
3170 else:
3171 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003172 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003173
3174 def pack(self):
3175 packed = []
3176 packed.append(struct.pack("!L", self.type_len))
3177 packed.append(struct.pack("!B", self.value))
3178 return ''.join(packed)
3179
3180 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003181 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003182 obj = mpls_tc()
Dan Talaycof6202252013-07-02 01:00:29 -07003183 _type_len = reader.read("!L")[0]
3184 assert(_type_len == 2147501569)
3185 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003186 return obj
3187
3188 def __eq__(self, other):
3189 if type(self) != type(other): return False
3190 if self.value != other.value: return False
3191 return True
3192
Rich Lanec2ee4b82013-04-24 17:12:38 -07003193 def pretty_print(self, q):
3194 q.text("mpls_tc {")
3195 with q.group():
3196 with q.indent(2):
3197 q.breakable()
3198 q.text("value = ");
3199 q.text("%#x" % self.value)
3200 q.breakable()
3201 q.text('}')
3202
Rich Lane7dcdf022013-12-11 14:45:27 -08003203oxm.subtypes[2147501569] = mpls_tc
3204
3205class mpls_tc_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003206 type_len = 2147501826
Rich Lanec2ee4b82013-04-24 17:12:38 -07003207
3208 def __init__(self, value=None, value_mask=None):
3209 if value != None:
3210 self.value = value
3211 else:
3212 self.value = 0
3213 if value_mask != None:
3214 self.value_mask = value_mask
3215 else:
3216 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003217 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003218
3219 def pack(self):
3220 packed = []
3221 packed.append(struct.pack("!L", self.type_len))
3222 packed.append(struct.pack("!B", self.value))
3223 packed.append(struct.pack("!B", self.value_mask))
3224 return ''.join(packed)
3225
3226 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003227 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003228 obj = mpls_tc_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003229 _type_len = reader.read("!L")[0]
3230 assert(_type_len == 2147501826)
3231 obj.value = reader.read("!B")[0]
3232 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003233 return obj
3234
3235 def __eq__(self, other):
3236 if type(self) != type(other): return False
3237 if self.value != other.value: return False
3238 if self.value_mask != other.value_mask: return False
3239 return True
3240
Rich Lanec2ee4b82013-04-24 17:12:38 -07003241 def pretty_print(self, q):
3242 q.text("mpls_tc_masked {")
3243 with q.group():
3244 with q.indent(2):
3245 q.breakable()
3246 q.text("value = ");
3247 q.text("%#x" % self.value)
3248 q.text(","); q.breakable()
3249 q.text("value_mask = ");
3250 q.text("%#x" % self.value_mask)
3251 q.breakable()
3252 q.text('}')
3253
Rich Lane7dcdf022013-12-11 14:45:27 -08003254oxm.subtypes[2147501826] = mpls_tc_masked
3255
3256class sctp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003257 type_len = 2147492866
Rich Lanec2ee4b82013-04-24 17:12:38 -07003258
3259 def __init__(self, value=None):
3260 if value != None:
3261 self.value = value
3262 else:
3263 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003264 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003265
3266 def pack(self):
3267 packed = []
3268 packed.append(struct.pack("!L", self.type_len))
3269 packed.append(struct.pack("!H", self.value))
3270 return ''.join(packed)
3271
3272 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003273 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003274 obj = sctp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003275 _type_len = reader.read("!L")[0]
3276 assert(_type_len == 2147492866)
3277 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003278 return obj
3279
3280 def __eq__(self, other):
3281 if type(self) != type(other): return False
3282 if self.value != other.value: return False
3283 return True
3284
Rich Lanec2ee4b82013-04-24 17:12:38 -07003285 def pretty_print(self, q):
3286 q.text("sctp_dst {")
3287 with q.group():
3288 with q.indent(2):
3289 q.breakable()
3290 q.text("value = ");
3291 q.text("%#x" % self.value)
3292 q.breakable()
3293 q.text('}')
3294
Rich Lane7dcdf022013-12-11 14:45:27 -08003295oxm.subtypes[2147492866] = sctp_dst
3296
3297class sctp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003298 type_len = 2147493124
Rich Lanec2ee4b82013-04-24 17:12:38 -07003299
3300 def __init__(self, value=None, value_mask=None):
3301 if value != None:
3302 self.value = value
3303 else:
3304 self.value = 0
3305 if value_mask != None:
3306 self.value_mask = value_mask
3307 else:
3308 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003309 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003310
3311 def pack(self):
3312 packed = []
3313 packed.append(struct.pack("!L", self.type_len))
3314 packed.append(struct.pack("!H", self.value))
3315 packed.append(struct.pack("!H", self.value_mask))
3316 return ''.join(packed)
3317
3318 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003319 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003320 obj = sctp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003321 _type_len = reader.read("!L")[0]
3322 assert(_type_len == 2147493124)
3323 obj.value = reader.read("!H")[0]
3324 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003325 return obj
3326
3327 def __eq__(self, other):
3328 if type(self) != type(other): return False
3329 if self.value != other.value: return False
3330 if self.value_mask != other.value_mask: return False
3331 return True
3332
Rich Lanec2ee4b82013-04-24 17:12:38 -07003333 def pretty_print(self, q):
3334 q.text("sctp_dst_masked {")
3335 with q.group():
3336 with q.indent(2):
3337 q.breakable()
3338 q.text("value = ");
3339 q.text("%#x" % self.value)
3340 q.text(","); q.breakable()
3341 q.text("value_mask = ");
3342 q.text("%#x" % self.value_mask)
3343 q.breakable()
3344 q.text('}')
3345
Rich Lane7dcdf022013-12-11 14:45:27 -08003346oxm.subtypes[2147493124] = sctp_dst_masked
3347
3348class sctp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003349 type_len = 2147492354
Rich Lanec2ee4b82013-04-24 17:12:38 -07003350
3351 def __init__(self, value=None):
3352 if value != None:
3353 self.value = value
3354 else:
3355 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003356 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003357
3358 def pack(self):
3359 packed = []
3360 packed.append(struct.pack("!L", self.type_len))
3361 packed.append(struct.pack("!H", self.value))
3362 return ''.join(packed)
3363
3364 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003365 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003366 obj = sctp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07003367 _type_len = reader.read("!L")[0]
3368 assert(_type_len == 2147492354)
3369 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003370 return obj
3371
3372 def __eq__(self, other):
3373 if type(self) != type(other): return False
3374 if self.value != other.value: return False
3375 return True
3376
Rich Lanec2ee4b82013-04-24 17:12:38 -07003377 def pretty_print(self, q):
3378 q.text("sctp_src {")
3379 with q.group():
3380 with q.indent(2):
3381 q.breakable()
3382 q.text("value = ");
3383 q.text("%#x" % self.value)
3384 q.breakable()
3385 q.text('}')
3386
Rich Lane7dcdf022013-12-11 14:45:27 -08003387oxm.subtypes[2147492354] = sctp_src
3388
3389class sctp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003390 type_len = 2147492612
Rich Lanec2ee4b82013-04-24 17:12:38 -07003391
3392 def __init__(self, value=None, value_mask=None):
3393 if value != None:
3394 self.value = value
3395 else:
3396 self.value = 0
3397 if value_mask != None:
3398 self.value_mask = value_mask
3399 else:
3400 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003401 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003402
3403 def pack(self):
3404 packed = []
3405 packed.append(struct.pack("!L", self.type_len))
3406 packed.append(struct.pack("!H", self.value))
3407 packed.append(struct.pack("!H", self.value_mask))
3408 return ''.join(packed)
3409
3410 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003411 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003412 obj = sctp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003413 _type_len = reader.read("!L")[0]
3414 assert(_type_len == 2147492612)
3415 obj.value = reader.read("!H")[0]
3416 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003417 return obj
3418
3419 def __eq__(self, other):
3420 if type(self) != type(other): return False
3421 if self.value != other.value: return False
3422 if self.value_mask != other.value_mask: return False
3423 return True
3424
Rich Lanec2ee4b82013-04-24 17:12:38 -07003425 def pretty_print(self, q):
3426 q.text("sctp_src_masked {")
3427 with q.group():
3428 with q.indent(2):
3429 q.breakable()
3430 q.text("value = ");
3431 q.text("%#x" % self.value)
3432 q.text(","); q.breakable()
3433 q.text("value_mask = ");
3434 q.text("%#x" % self.value_mask)
3435 q.breakable()
3436 q.text('}')
3437
Rich Lane7dcdf022013-12-11 14:45:27 -08003438oxm.subtypes[2147492612] = sctp_src_masked
3439
3440class tcp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003441 type_len = 2147490818
Rich Lanec2ee4b82013-04-24 17:12:38 -07003442
3443 def __init__(self, value=None):
3444 if value != None:
3445 self.value = value
3446 else:
3447 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003448 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003449
3450 def pack(self):
3451 packed = []
3452 packed.append(struct.pack("!L", self.type_len))
3453 packed.append(struct.pack("!H", self.value))
3454 return ''.join(packed)
3455
3456 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003457 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003458 obj = tcp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003459 _type_len = reader.read("!L")[0]
3460 assert(_type_len == 2147490818)
3461 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003462 return obj
3463
3464 def __eq__(self, other):
3465 if type(self) != type(other): return False
3466 if self.value != other.value: return False
3467 return True
3468
Rich Lanec2ee4b82013-04-24 17:12:38 -07003469 def pretty_print(self, q):
3470 q.text("tcp_dst {")
3471 with q.group():
3472 with q.indent(2):
3473 q.breakable()
3474 q.text("value = ");
3475 q.text("%#x" % self.value)
3476 q.breakable()
3477 q.text('}')
3478
Rich Lane7dcdf022013-12-11 14:45:27 -08003479oxm.subtypes[2147490818] = tcp_dst
3480
3481class tcp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003482 type_len = 2147491076
Rich Lanec2ee4b82013-04-24 17:12:38 -07003483
3484 def __init__(self, value=None, value_mask=None):
3485 if value != None:
3486 self.value = value
3487 else:
3488 self.value = 0
3489 if value_mask != None:
3490 self.value_mask = value_mask
3491 else:
3492 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003493 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003494
3495 def pack(self):
3496 packed = []
3497 packed.append(struct.pack("!L", self.type_len))
3498 packed.append(struct.pack("!H", self.value))
3499 packed.append(struct.pack("!H", self.value_mask))
3500 return ''.join(packed)
3501
3502 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003503 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003504 obj = tcp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003505 _type_len = reader.read("!L")[0]
3506 assert(_type_len == 2147491076)
3507 obj.value = reader.read("!H")[0]
3508 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003509 return obj
3510
3511 def __eq__(self, other):
3512 if type(self) != type(other): return False
3513 if self.value != other.value: return False
3514 if self.value_mask != other.value_mask: return False
3515 return True
3516
Rich Lanec2ee4b82013-04-24 17:12:38 -07003517 def pretty_print(self, q):
3518 q.text("tcp_dst_masked {")
3519 with q.group():
3520 with q.indent(2):
3521 q.breakable()
3522 q.text("value = ");
3523 q.text("%#x" % self.value)
3524 q.text(","); q.breakable()
3525 q.text("value_mask = ");
3526 q.text("%#x" % self.value_mask)
3527 q.breakable()
3528 q.text('}')
3529
Rich Lane7dcdf022013-12-11 14:45:27 -08003530oxm.subtypes[2147491076] = tcp_dst_masked
3531
3532class tcp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003533 type_len = 2147490306
Rich Lanec2ee4b82013-04-24 17:12:38 -07003534
3535 def __init__(self, value=None):
3536 if value != None:
3537 self.value = value
3538 else:
3539 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003540 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003541
3542 def pack(self):
3543 packed = []
3544 packed.append(struct.pack("!L", self.type_len))
3545 packed.append(struct.pack("!H", self.value))
3546 return ''.join(packed)
3547
3548 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003549 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003550 obj = tcp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07003551 _type_len = reader.read("!L")[0]
3552 assert(_type_len == 2147490306)
3553 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003554 return obj
3555
3556 def __eq__(self, other):
3557 if type(self) != type(other): return False
3558 if self.value != other.value: return False
3559 return True
3560
Rich Lanec2ee4b82013-04-24 17:12:38 -07003561 def pretty_print(self, q):
3562 q.text("tcp_src {")
3563 with q.group():
3564 with q.indent(2):
3565 q.breakable()
3566 q.text("value = ");
3567 q.text("%#x" % self.value)
3568 q.breakable()
3569 q.text('}')
3570
Rich Lane7dcdf022013-12-11 14:45:27 -08003571oxm.subtypes[2147490306] = tcp_src
3572
3573class tcp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003574 type_len = 2147490564
Rich Lanec2ee4b82013-04-24 17:12:38 -07003575
3576 def __init__(self, value=None, value_mask=None):
3577 if value != None:
3578 self.value = value
3579 else:
3580 self.value = 0
3581 if value_mask != None:
3582 self.value_mask = value_mask
3583 else:
3584 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003585 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003586
3587 def pack(self):
3588 packed = []
3589 packed.append(struct.pack("!L", self.type_len))
3590 packed.append(struct.pack("!H", self.value))
3591 packed.append(struct.pack("!H", self.value_mask))
3592 return ''.join(packed)
3593
3594 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003595 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003596 obj = tcp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003597 _type_len = reader.read("!L")[0]
3598 assert(_type_len == 2147490564)
3599 obj.value = reader.read("!H")[0]
3600 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003601 return obj
3602
3603 def __eq__(self, other):
3604 if type(self) != type(other): return False
3605 if self.value != other.value: return False
3606 if self.value_mask != other.value_mask: return False
3607 return True
3608
Rich Lanec2ee4b82013-04-24 17:12:38 -07003609 def pretty_print(self, q):
3610 q.text("tcp_src_masked {")
3611 with q.group():
3612 with q.indent(2):
3613 q.breakable()
3614 q.text("value = ");
3615 q.text("%#x" % self.value)
3616 q.text(","); q.breakable()
3617 q.text("value_mask = ");
3618 q.text("%#x" % self.value_mask)
3619 q.breakable()
3620 q.text('}')
3621
Rich Lane7dcdf022013-12-11 14:45:27 -08003622oxm.subtypes[2147490564] = tcp_src_masked
3623
3624class udp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003625 type_len = 2147491842
Rich Lanec2ee4b82013-04-24 17:12:38 -07003626
3627 def __init__(self, value=None):
3628 if value != None:
3629 self.value = value
3630 else:
3631 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003632 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003633
3634 def pack(self):
3635 packed = []
3636 packed.append(struct.pack("!L", self.type_len))
3637 packed.append(struct.pack("!H", self.value))
3638 return ''.join(packed)
3639
3640 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003641 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003642 obj = udp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003643 _type_len = reader.read("!L")[0]
3644 assert(_type_len == 2147491842)
3645 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003646 return obj
3647
3648 def __eq__(self, other):
3649 if type(self) != type(other): return False
3650 if self.value != other.value: return False
3651 return True
3652
Rich Lanec2ee4b82013-04-24 17:12:38 -07003653 def pretty_print(self, q):
3654 q.text("udp_dst {")
3655 with q.group():
3656 with q.indent(2):
3657 q.breakable()
3658 q.text("value = ");
3659 q.text("%#x" % self.value)
3660 q.breakable()
3661 q.text('}')
3662
Rich Lane7dcdf022013-12-11 14:45:27 -08003663oxm.subtypes[2147491842] = udp_dst
3664
3665class udp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003666 type_len = 2147492100
Rich Lanec2ee4b82013-04-24 17:12:38 -07003667
3668 def __init__(self, value=None, value_mask=None):
3669 if value != None:
3670 self.value = value
3671 else:
3672 self.value = 0
3673 if value_mask != None:
3674 self.value_mask = value_mask
3675 else:
3676 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003677 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003678
3679 def pack(self):
3680 packed = []
3681 packed.append(struct.pack("!L", self.type_len))
3682 packed.append(struct.pack("!H", self.value))
3683 packed.append(struct.pack("!H", self.value_mask))
3684 return ''.join(packed)
3685
3686 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003687 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003688 obj = udp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003689 _type_len = reader.read("!L")[0]
3690 assert(_type_len == 2147492100)
3691 obj.value = reader.read("!H")[0]
3692 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003693 return obj
3694
3695 def __eq__(self, other):
3696 if type(self) != type(other): return False
3697 if self.value != other.value: return False
3698 if self.value_mask != other.value_mask: return False
3699 return True
3700
Rich Lanec2ee4b82013-04-24 17:12:38 -07003701 def pretty_print(self, q):
3702 q.text("udp_dst_masked {")
3703 with q.group():
3704 with q.indent(2):
3705 q.breakable()
3706 q.text("value = ");
3707 q.text("%#x" % self.value)
3708 q.text(","); q.breakable()
3709 q.text("value_mask = ");
3710 q.text("%#x" % self.value_mask)
3711 q.breakable()
3712 q.text('}')
3713
Rich Lane7dcdf022013-12-11 14:45:27 -08003714oxm.subtypes[2147492100] = udp_dst_masked
3715
3716class udp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003717 type_len = 2147491330
Rich Lanec2ee4b82013-04-24 17:12:38 -07003718
3719 def __init__(self, value=None):
3720 if value != None:
3721 self.value = value
3722 else:
3723 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003724 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003725
3726 def pack(self):
3727 packed = []
3728 packed.append(struct.pack("!L", self.type_len))
3729 packed.append(struct.pack("!H", self.value))
3730 return ''.join(packed)
3731
3732 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003733 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003734 obj = udp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07003735 _type_len = reader.read("!L")[0]
3736 assert(_type_len == 2147491330)
3737 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003738 return obj
3739
3740 def __eq__(self, other):
3741 if type(self) != type(other): return False
3742 if self.value != other.value: return False
3743 return True
3744
Rich Lanec2ee4b82013-04-24 17:12:38 -07003745 def pretty_print(self, q):
3746 q.text("udp_src {")
3747 with q.group():
3748 with q.indent(2):
3749 q.breakable()
3750 q.text("value = ");
3751 q.text("%#x" % self.value)
3752 q.breakable()
3753 q.text('}')
3754
Rich Lane7dcdf022013-12-11 14:45:27 -08003755oxm.subtypes[2147491330] = udp_src
3756
3757class udp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003758 type_len = 2147491588
Rich Lanec2ee4b82013-04-24 17:12:38 -07003759
3760 def __init__(self, value=None, value_mask=None):
3761 if value != None:
3762 self.value = value
3763 else:
3764 self.value = 0
3765 if value_mask != None:
3766 self.value_mask = value_mask
3767 else:
3768 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003769 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003770
3771 def pack(self):
3772 packed = []
3773 packed.append(struct.pack("!L", self.type_len))
3774 packed.append(struct.pack("!H", self.value))
3775 packed.append(struct.pack("!H", self.value_mask))
3776 return ''.join(packed)
3777
3778 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003779 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003780 obj = udp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003781 _type_len = reader.read("!L")[0]
3782 assert(_type_len == 2147491588)
3783 obj.value = reader.read("!H")[0]
3784 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003785 return obj
3786
3787 def __eq__(self, other):
3788 if type(self) != type(other): return False
3789 if self.value != other.value: return False
3790 if self.value_mask != other.value_mask: return False
3791 return True
3792
Rich Lanec2ee4b82013-04-24 17:12:38 -07003793 def pretty_print(self, q):
3794 q.text("udp_src_masked {")
3795 with q.group():
3796 with q.indent(2):
3797 q.breakable()
3798 q.text("value = ");
3799 q.text("%#x" % self.value)
3800 q.text(","); q.breakable()
3801 q.text("value_mask = ");
3802 q.text("%#x" % self.value_mask)
3803 q.breakable()
3804 q.text('}')
3805
Rich Lane7dcdf022013-12-11 14:45:27 -08003806oxm.subtypes[2147491588] = udp_src_masked
3807
3808class vlan_pcp(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003809 type_len = 2147487233
Rich Lanec2ee4b82013-04-24 17:12:38 -07003810
3811 def __init__(self, value=None):
3812 if value != None:
3813 self.value = value
3814 else:
3815 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003816 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003817
3818 def pack(self):
3819 packed = []
3820 packed.append(struct.pack("!L", self.type_len))
3821 packed.append(struct.pack("!B", self.value))
3822 return ''.join(packed)
3823
3824 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003825 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003826 obj = vlan_pcp()
Dan Talaycof6202252013-07-02 01:00:29 -07003827 _type_len = reader.read("!L")[0]
3828 assert(_type_len == 2147487233)
3829 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003830 return obj
3831
3832 def __eq__(self, other):
3833 if type(self) != type(other): return False
3834 if self.value != other.value: return False
3835 return True
3836
Rich Lanec2ee4b82013-04-24 17:12:38 -07003837 def pretty_print(self, q):
3838 q.text("vlan_pcp {")
3839 with q.group():
3840 with q.indent(2):
3841 q.breakable()
3842 q.text("value = ");
3843 q.text("%#x" % self.value)
3844 q.breakable()
3845 q.text('}')
3846
Rich Lane7dcdf022013-12-11 14:45:27 -08003847oxm.subtypes[2147487233] = vlan_pcp
3848
3849class vlan_pcp_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003850 type_len = 2147487490
Rich Lanec2ee4b82013-04-24 17:12:38 -07003851
3852 def __init__(self, value=None, value_mask=None):
3853 if value != None:
3854 self.value = value
3855 else:
3856 self.value = 0
3857 if value_mask != None:
3858 self.value_mask = value_mask
3859 else:
3860 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003861 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003862
3863 def pack(self):
3864 packed = []
3865 packed.append(struct.pack("!L", self.type_len))
3866 packed.append(struct.pack("!B", self.value))
3867 packed.append(struct.pack("!B", self.value_mask))
3868 return ''.join(packed)
3869
3870 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003871 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003872 obj = vlan_pcp_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003873 _type_len = reader.read("!L")[0]
3874 assert(_type_len == 2147487490)
3875 obj.value = reader.read("!B")[0]
3876 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003877 return obj
3878
3879 def __eq__(self, other):
3880 if type(self) != type(other): return False
3881 if self.value != other.value: return False
3882 if self.value_mask != other.value_mask: return False
3883 return True
3884
Rich Lanec2ee4b82013-04-24 17:12:38 -07003885 def pretty_print(self, q):
3886 q.text("vlan_pcp_masked {")
3887 with q.group():
3888 with q.indent(2):
3889 q.breakable()
3890 q.text("value = ");
3891 q.text("%#x" % self.value)
3892 q.text(","); q.breakable()
3893 q.text("value_mask = ");
3894 q.text("%#x" % self.value_mask)
3895 q.breakable()
3896 q.text('}')
3897
Rich Lane7dcdf022013-12-11 14:45:27 -08003898oxm.subtypes[2147487490] = vlan_pcp_masked
3899
3900class vlan_vid(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003901 type_len = 2147486722
Rich Lanec2ee4b82013-04-24 17:12:38 -07003902
3903 def __init__(self, value=None):
3904 if value != None:
3905 self.value = value
3906 else:
3907 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003908 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003909
3910 def pack(self):
3911 packed = []
3912 packed.append(struct.pack("!L", self.type_len))
3913 packed.append(struct.pack("!H", self.value))
3914 return ''.join(packed)
3915
3916 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003917 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003918 obj = vlan_vid()
Dan Talaycof6202252013-07-02 01:00:29 -07003919 _type_len = reader.read("!L")[0]
3920 assert(_type_len == 2147486722)
3921 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003922 return obj
3923
3924 def __eq__(self, other):
3925 if type(self) != type(other): return False
3926 if self.value != other.value: return False
3927 return True
3928
Rich Lanec2ee4b82013-04-24 17:12:38 -07003929 def pretty_print(self, q):
3930 q.text("vlan_vid {")
3931 with q.group():
3932 with q.indent(2):
3933 q.breakable()
3934 q.text("value = ");
3935 q.text("%#x" % self.value)
3936 q.breakable()
3937 q.text('}')
3938
Rich Lane7dcdf022013-12-11 14:45:27 -08003939oxm.subtypes[2147486722] = vlan_vid
3940
3941class vlan_vid_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003942 type_len = 2147486980
Rich Lanec2ee4b82013-04-24 17:12:38 -07003943
3944 def __init__(self, value=None, value_mask=None):
3945 if value != None:
3946 self.value = value
3947 else:
3948 self.value = 0
3949 if value_mask != None:
3950 self.value_mask = value_mask
3951 else:
3952 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003953 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003954
3955 def pack(self):
3956 packed = []
3957 packed.append(struct.pack("!L", self.type_len))
3958 packed.append(struct.pack("!H", self.value))
3959 packed.append(struct.pack("!H", self.value_mask))
3960 return ''.join(packed)
3961
3962 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003963 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003964 obj = vlan_vid_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003965 _type_len = reader.read("!L")[0]
3966 assert(_type_len == 2147486980)
3967 obj.value = reader.read("!H")[0]
3968 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003969 return obj
3970
3971 def __eq__(self, other):
3972 if type(self) != type(other): return False
3973 if self.value != other.value: return False
3974 if self.value_mask != other.value_mask: return False
3975 return True
3976
Rich Lanec2ee4b82013-04-24 17:12:38 -07003977 def pretty_print(self, q):
3978 q.text("vlan_vid_masked {")
3979 with q.group():
3980 with q.indent(2):
3981 q.breakable()
3982 q.text("value = ");
3983 q.text("%#x" % self.value)
3984 q.text(","); q.breakable()
3985 q.text("value_mask = ");
3986 q.text("%#x" % self.value_mask)
3987 q.breakable()
3988 q.text('}')
3989
Rich Lane7dcdf022013-12-11 14:45:27 -08003990oxm.subtypes[2147486980] = vlan_vid_masked
Rich Lanec2ee4b82013-04-24 17:12:38 -07003991
Rich Lane7dcdf022013-12-11 14:45:27 -08003992