blob: 2abee43e294e6ba3e4f19dc14d7e629a59ca62e7 [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 Lanec2ee4b82013-04-24 17:12:38 -070019import util
20import loxi.generic_util
Rich Lanec2ee4b82013-04-24 17:12:38 -070021
Rich Lane7dcdf022013-12-11 14:45:27 -080022class oxm(loxi.OFObject):
23 subtypes = {}
Rich Laned53156a2013-08-05 17:17:33 -070024
Rich Lane7dcdf022013-12-11 14:45:27 -080025 @staticmethod
26 def unpack(reader):
27 subtype, = reader.peek('!L', 0)
28 try:
29 subclass = oxm.subtypes[subtype]
30 except KeyError:
31 raise loxi.ProtocolError("unknown oxm subtype %#x" % subtype)
32 return subclass.unpack(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -070033
Rich Lanec2ee4b82013-04-24 17:12:38 -070034
Rich Lane7dcdf022013-12-11 14:45:27 -080035class arp_op(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -070036 type_len = 2147494402
Rich Lanec2ee4b82013-04-24 17:12:38 -070037
38 def __init__(self, value=None):
39 if value != None:
40 self.value = value
41 else:
42 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -080043 return
Rich Lanec2ee4b82013-04-24 17:12:38 -070044
45 def pack(self):
46 packed = []
47 packed.append(struct.pack("!L", self.type_len))
48 packed.append(struct.pack("!H", self.value))
49 return ''.join(packed)
50
51 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -080052 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -070053 obj = arp_op()
Dan Talaycof6202252013-07-02 01:00:29 -070054 _type_len = reader.read("!L")[0]
55 assert(_type_len == 2147494402)
56 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -070057 return obj
58
59 def __eq__(self, other):
60 if type(self) != type(other): return False
61 if self.value != other.value: return False
62 return True
63
Rich Lanec2ee4b82013-04-24 17:12:38 -070064 def pretty_print(self, q):
65 q.text("arp_op {")
66 with q.group():
67 with q.indent(2):
68 q.breakable()
69 q.text("value = ");
70 q.text("%#x" % self.value)
71 q.breakable()
72 q.text('}')
73
Rich Lane7dcdf022013-12-11 14:45:27 -080074oxm.subtypes[2147494402] = arp_op
75
76class arp_op_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -070077 type_len = 2147494660
Rich Lanec2ee4b82013-04-24 17:12:38 -070078
79 def __init__(self, value=None, value_mask=None):
80 if value != None:
81 self.value = value
82 else:
83 self.value = 0
84 if value_mask != None:
85 self.value_mask = value_mask
86 else:
87 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -080088 return
Rich Lanec2ee4b82013-04-24 17:12:38 -070089
90 def pack(self):
91 packed = []
92 packed.append(struct.pack("!L", self.type_len))
93 packed.append(struct.pack("!H", self.value))
94 packed.append(struct.pack("!H", self.value_mask))
95 return ''.join(packed)
96
97 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -080098 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -070099 obj = arp_op_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700100 _type_len = reader.read("!L")[0]
101 assert(_type_len == 2147494660)
102 obj.value = reader.read("!H")[0]
103 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700104 return obj
105
106 def __eq__(self, other):
107 if type(self) != type(other): return False
108 if self.value != other.value: return False
109 if self.value_mask != other.value_mask: return False
110 return True
111
Rich Lanec2ee4b82013-04-24 17:12:38 -0700112 def pretty_print(self, q):
113 q.text("arp_op_masked {")
114 with q.group():
115 with q.indent(2):
116 q.breakable()
117 q.text("value = ");
118 q.text("%#x" % self.value)
119 q.text(","); q.breakable()
120 q.text("value_mask = ");
121 q.text("%#x" % self.value_mask)
122 q.breakable()
123 q.text('}')
124
Rich Lane7dcdf022013-12-11 14:45:27 -0800125oxm.subtypes[2147494660] = arp_op_masked
126
127class arp_sha(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700128 type_len = 2147495942
Rich Lanec2ee4b82013-04-24 17:12:38 -0700129
130 def __init__(self, value=None):
131 if value != None:
132 self.value = value
133 else:
134 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800135 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700136
137 def pack(self):
138 packed = []
139 packed.append(struct.pack("!L", self.type_len))
140 packed.append(struct.pack("!6B", *self.value))
141 return ''.join(packed)
142
143 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800144 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700145 obj = arp_sha()
Dan Talaycof6202252013-07-02 01:00:29 -0700146 _type_len = reader.read("!L")[0]
147 assert(_type_len == 2147495942)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700148 obj.value = list(reader.read('!6B'))
149 return obj
150
151 def __eq__(self, other):
152 if type(self) != type(other): return False
153 if self.value != other.value: return False
154 return True
155
Rich Lanec2ee4b82013-04-24 17:12:38 -0700156 def pretty_print(self, q):
157 q.text("arp_sha {")
158 with q.group():
159 with q.indent(2):
160 q.breakable()
161 q.text("value = ");
162 q.text(util.pretty_mac(self.value))
163 q.breakable()
164 q.text('}')
165
Rich Lane7dcdf022013-12-11 14:45:27 -0800166oxm.subtypes[2147495942] = arp_sha
167
168class arp_sha_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700169 type_len = 2147496204
Rich Lanec2ee4b82013-04-24 17:12:38 -0700170
171 def __init__(self, value=None, value_mask=None):
172 if value != None:
173 self.value = value
174 else:
175 self.value = [0,0,0,0,0,0]
176 if value_mask != None:
177 self.value_mask = value_mask
178 else:
179 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800180 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700181
182 def pack(self):
183 packed = []
184 packed.append(struct.pack("!L", self.type_len))
185 packed.append(struct.pack("!6B", *self.value))
186 packed.append(struct.pack("!6B", *self.value_mask))
187 return ''.join(packed)
188
189 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800190 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700191 obj = arp_sha_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700192 _type_len = reader.read("!L")[0]
193 assert(_type_len == 2147496204)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700194 obj.value = list(reader.read('!6B'))
195 obj.value_mask = list(reader.read('!6B'))
196 return obj
197
198 def __eq__(self, other):
199 if type(self) != type(other): return False
200 if self.value != other.value: return False
201 if self.value_mask != other.value_mask: return False
202 return True
203
Rich Lanec2ee4b82013-04-24 17:12:38 -0700204 def pretty_print(self, q):
205 q.text("arp_sha_masked {")
206 with q.group():
207 with q.indent(2):
208 q.breakable()
209 q.text("value = ");
210 q.text(util.pretty_mac(self.value))
211 q.text(","); q.breakable()
212 q.text("value_mask = ");
213 q.text(util.pretty_mac(self.value_mask))
214 q.breakable()
215 q.text('}')
216
Rich Lane7dcdf022013-12-11 14:45:27 -0800217oxm.subtypes[2147496204] = arp_sha_masked
218
219class arp_spa(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700220 type_len = 2147494916
Rich Lanec2ee4b82013-04-24 17:12:38 -0700221
222 def __init__(self, value=None):
223 if value != None:
224 self.value = value
225 else:
226 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800227 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700228
229 def pack(self):
230 packed = []
231 packed.append(struct.pack("!L", self.type_len))
232 packed.append(struct.pack("!L", self.value))
233 return ''.join(packed)
234
235 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800236 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700237 obj = arp_spa()
Dan Talaycof6202252013-07-02 01:00:29 -0700238 _type_len = reader.read("!L")[0]
239 assert(_type_len == 2147494916)
240 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700241 return obj
242
243 def __eq__(self, other):
244 if type(self) != type(other): return False
245 if self.value != other.value: return False
246 return True
247
Rich Lanec2ee4b82013-04-24 17:12:38 -0700248 def pretty_print(self, q):
249 q.text("arp_spa {")
250 with q.group():
251 with q.indent(2):
252 q.breakable()
253 q.text("value = ");
254 q.text("%#x" % self.value)
255 q.breakable()
256 q.text('}')
257
Rich Lane7dcdf022013-12-11 14:45:27 -0800258oxm.subtypes[2147494916] = arp_spa
259
260class arp_spa_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700261 type_len = 2147495176
Rich Lanec2ee4b82013-04-24 17:12:38 -0700262
263 def __init__(self, value=None, value_mask=None):
264 if value != None:
265 self.value = value
266 else:
267 self.value = 0
268 if value_mask != None:
269 self.value_mask = value_mask
270 else:
271 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800272 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700273
274 def pack(self):
275 packed = []
276 packed.append(struct.pack("!L", self.type_len))
277 packed.append(struct.pack("!L", self.value))
278 packed.append(struct.pack("!L", self.value_mask))
279 return ''.join(packed)
280
281 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800282 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700283 obj = arp_spa_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700284 _type_len = reader.read("!L")[0]
285 assert(_type_len == 2147495176)
286 obj.value = reader.read("!L")[0]
287 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700288 return obj
289
290 def __eq__(self, other):
291 if type(self) != type(other): return False
292 if self.value != other.value: return False
293 if self.value_mask != other.value_mask: return False
294 return True
295
Rich Lanec2ee4b82013-04-24 17:12:38 -0700296 def pretty_print(self, q):
297 q.text("arp_spa_masked {")
298 with q.group():
299 with q.indent(2):
300 q.breakable()
301 q.text("value = ");
302 q.text("%#x" % self.value)
303 q.text(","); q.breakable()
304 q.text("value_mask = ");
305 q.text("%#x" % self.value_mask)
306 q.breakable()
307 q.text('}')
308
Rich Lane7dcdf022013-12-11 14:45:27 -0800309oxm.subtypes[2147495176] = arp_spa_masked
310
311class arp_tha(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700312 type_len = 2147496454
Rich Lanec2ee4b82013-04-24 17:12:38 -0700313
314 def __init__(self, value=None):
315 if value != None:
316 self.value = value
317 else:
318 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800319 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700320
321 def pack(self):
322 packed = []
323 packed.append(struct.pack("!L", self.type_len))
324 packed.append(struct.pack("!6B", *self.value))
325 return ''.join(packed)
326
327 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800328 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700329 obj = arp_tha()
Dan Talaycof6202252013-07-02 01:00:29 -0700330 _type_len = reader.read("!L")[0]
331 assert(_type_len == 2147496454)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700332 obj.value = list(reader.read('!6B'))
333 return obj
334
335 def __eq__(self, other):
336 if type(self) != type(other): return False
337 if self.value != other.value: return False
338 return True
339
Rich Lanec2ee4b82013-04-24 17:12:38 -0700340 def pretty_print(self, q):
341 q.text("arp_tha {")
342 with q.group():
343 with q.indent(2):
344 q.breakable()
345 q.text("value = ");
346 q.text(util.pretty_mac(self.value))
347 q.breakable()
348 q.text('}')
349
Rich Lane7dcdf022013-12-11 14:45:27 -0800350oxm.subtypes[2147496454] = arp_tha
351
352class arp_tha_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700353 type_len = 2147496716
Rich Lanec2ee4b82013-04-24 17:12:38 -0700354
355 def __init__(self, value=None, value_mask=None):
356 if value != None:
357 self.value = value
358 else:
359 self.value = [0,0,0,0,0,0]
360 if value_mask != None:
361 self.value_mask = value_mask
362 else:
363 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800364 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700365
366 def pack(self):
367 packed = []
368 packed.append(struct.pack("!L", self.type_len))
369 packed.append(struct.pack("!6B", *self.value))
370 packed.append(struct.pack("!6B", *self.value_mask))
371 return ''.join(packed)
372
373 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800374 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700375 obj = arp_tha_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700376 _type_len = reader.read("!L")[0]
377 assert(_type_len == 2147496716)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700378 obj.value = list(reader.read('!6B'))
379 obj.value_mask = list(reader.read('!6B'))
380 return obj
381
382 def __eq__(self, other):
383 if type(self) != type(other): return False
384 if self.value != other.value: return False
385 if self.value_mask != other.value_mask: return False
386 return True
387
Rich Lanec2ee4b82013-04-24 17:12:38 -0700388 def pretty_print(self, q):
389 q.text("arp_tha_masked {")
390 with q.group():
391 with q.indent(2):
392 q.breakable()
393 q.text("value = ");
394 q.text(util.pretty_mac(self.value))
395 q.text(","); q.breakable()
396 q.text("value_mask = ");
397 q.text(util.pretty_mac(self.value_mask))
398 q.breakable()
399 q.text('}')
400
Rich Lane7dcdf022013-12-11 14:45:27 -0800401oxm.subtypes[2147496716] = arp_tha_masked
402
403class arp_tpa(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700404 type_len = 2147495428
Rich Lanec2ee4b82013-04-24 17:12:38 -0700405
406 def __init__(self, value=None):
407 if value != None:
408 self.value = value
409 else:
410 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800411 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700412
413 def pack(self):
414 packed = []
415 packed.append(struct.pack("!L", self.type_len))
416 packed.append(struct.pack("!L", self.value))
417 return ''.join(packed)
418
419 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800420 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700421 obj = arp_tpa()
Dan Talaycof6202252013-07-02 01:00:29 -0700422 _type_len = reader.read("!L")[0]
423 assert(_type_len == 2147495428)
424 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700425 return obj
426
427 def __eq__(self, other):
428 if type(self) != type(other): return False
429 if self.value != other.value: return False
430 return True
431
Rich Lanec2ee4b82013-04-24 17:12:38 -0700432 def pretty_print(self, q):
433 q.text("arp_tpa {")
434 with q.group():
435 with q.indent(2):
436 q.breakable()
437 q.text("value = ");
438 q.text("%#x" % self.value)
439 q.breakable()
440 q.text('}')
441
Rich Lane7dcdf022013-12-11 14:45:27 -0800442oxm.subtypes[2147495428] = arp_tpa
443
444class arp_tpa_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700445 type_len = 2147495688
Rich Lanec2ee4b82013-04-24 17:12:38 -0700446
447 def __init__(self, value=None, value_mask=None):
448 if value != None:
449 self.value = value
450 else:
451 self.value = 0
452 if value_mask != None:
453 self.value_mask = value_mask
454 else:
455 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800456 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700457
458 def pack(self):
459 packed = []
460 packed.append(struct.pack("!L", self.type_len))
461 packed.append(struct.pack("!L", self.value))
462 packed.append(struct.pack("!L", self.value_mask))
463 return ''.join(packed)
464
465 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800466 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700467 obj = arp_tpa_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700468 _type_len = reader.read("!L")[0]
469 assert(_type_len == 2147495688)
470 obj.value = reader.read("!L")[0]
471 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700472 return obj
473
474 def __eq__(self, other):
475 if type(self) != type(other): return False
476 if self.value != other.value: return False
477 if self.value_mask != other.value_mask: return False
478 return True
479
Rich Lanec2ee4b82013-04-24 17:12:38 -0700480 def pretty_print(self, q):
481 q.text("arp_tpa_masked {")
482 with q.group():
483 with q.indent(2):
484 q.breakable()
485 q.text("value = ");
486 q.text("%#x" % self.value)
487 q.text(","); q.breakable()
488 q.text("value_mask = ");
489 q.text("%#x" % self.value_mask)
490 q.breakable()
491 q.text('}')
492
Rich Lane7dcdf022013-12-11 14:45:27 -0800493oxm.subtypes[2147495688] = arp_tpa_masked
494
495class bsn_global_vrf_allowed(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800496 type_len = 198145
497
498 def __init__(self, value=None):
499 if value != None:
500 self.value = value
501 else:
502 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800503 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800504
505 def pack(self):
506 packed = []
507 packed.append(struct.pack("!L", self.type_len))
508 packed.append(struct.pack("!B", self.value))
509 return ''.join(packed)
510
511 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800512 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800513 obj = bsn_global_vrf_allowed()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800514 _type_len = reader.read("!L")[0]
515 assert(_type_len == 198145)
516 obj.value = reader.read("!B")[0]
517 return obj
518
519 def __eq__(self, other):
520 if type(self) != type(other): return False
521 if self.value != other.value: return False
522 return True
523
Rich Laned9e3f7b2013-11-04 11:40:43 -0800524 def pretty_print(self, q):
525 q.text("bsn_global_vrf_allowed {")
526 with q.group():
527 with q.indent(2):
528 q.breakable()
529 q.text("value = ");
530 q.text("%#x" % self.value)
531 q.breakable()
532 q.text('}')
533
Rich Lane7dcdf022013-12-11 14:45:27 -0800534oxm.subtypes[198145] = bsn_global_vrf_allowed
535
536class bsn_global_vrf_allowed_masked(oxm):
537 type_len = 198402
Rich Laned9e3f7b2013-11-04 11:40:43 -0800538
539 def __init__(self, value=None, value_mask=None):
540 if value != None:
541 self.value = value
542 else:
543 self.value = 0
544 if value_mask != None:
545 self.value_mask = value_mask
546 else:
547 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800548 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800549
550 def pack(self):
551 packed = []
552 packed.append(struct.pack("!L", self.type_len))
553 packed.append(struct.pack("!B", self.value))
554 packed.append(struct.pack("!B", self.value_mask))
555 return ''.join(packed)
556
557 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800558 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800559 obj = bsn_global_vrf_allowed_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800560 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800561 assert(_type_len == 198402)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800562 obj.value = reader.read("!B")[0]
563 obj.value_mask = reader.read("!B")[0]
564 return obj
565
566 def __eq__(self, other):
567 if type(self) != type(other): return False
568 if self.value != other.value: return False
569 if self.value_mask != other.value_mask: return False
570 return True
571
Rich Laned9e3f7b2013-11-04 11:40:43 -0800572 def pretty_print(self, q):
573 q.text("bsn_global_vrf_allowed_masked {")
574 with q.group():
575 with q.indent(2):
576 q.breakable()
577 q.text("value = ");
578 q.text("%#x" % self.value)
579 q.text(","); q.breakable()
580 q.text("value_mask = ");
581 q.text("%#x" % self.value_mask)
582 q.breakable()
583 q.text('}')
584
Rich Lane7dcdf022013-12-11 14:45:27 -0800585oxm.subtypes[198402] = bsn_global_vrf_allowed_masked
586
587class bsn_in_ports_128(oxm):
588 type_len = 196624
Rich Lane6f4978c2013-10-20 21:33:52 -0700589
590 def __init__(self, value=None):
591 if value != None:
592 self.value = value
593 else:
594 self.value = set()
Rich Lane7dcdf022013-12-11 14:45:27 -0800595 return
Rich Lane6f4978c2013-10-20 21:33:52 -0700596
597 def pack(self):
598 packed = []
599 packed.append(struct.pack("!L", self.type_len))
600 packed.append(util.pack_bitmap_128(self.value))
601 return ''.join(packed)
602
603 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800604 def unpack(reader):
Rich Lane6f4978c2013-10-20 21:33:52 -0700605 obj = bsn_in_ports_128()
Rich Lane6f4978c2013-10-20 21:33:52 -0700606 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800607 assert(_type_len == 196624)
Rich Lane6f4978c2013-10-20 21:33:52 -0700608 obj.value = util.unpack_bitmap_128(reader)
609 return obj
610
611 def __eq__(self, other):
612 if type(self) != type(other): return False
613 if self.value != other.value: return False
614 return True
615
Rich Lane6f4978c2013-10-20 21:33:52 -0700616 def pretty_print(self, q):
617 q.text("bsn_in_ports_128 {")
618 with q.group():
619 with q.indent(2):
620 q.breakable()
621 q.text("value = ");
622 q.pp(self.value)
623 q.breakable()
624 q.text('}')
625
Rich Lane7dcdf022013-12-11 14:45:27 -0800626oxm.subtypes[196624] = bsn_in_ports_128
627
628class bsn_in_ports_128_masked(oxm):
Rich Lane6f4978c2013-10-20 21:33:52 -0700629 type_len = 196896
630
631 def __init__(self, value=None, value_mask=None):
632 if value != None:
633 self.value = value
634 else:
635 self.value = set()
636 if value_mask != None:
637 self.value_mask = value_mask
638 else:
639 self.value_mask = set()
Rich Lane7dcdf022013-12-11 14:45:27 -0800640 return
Rich Lane6f4978c2013-10-20 21:33:52 -0700641
642 def pack(self):
643 packed = []
644 packed.append(struct.pack("!L", self.type_len))
645 packed.append(util.pack_bitmap_128(self.value))
646 packed.append(util.pack_bitmap_128(self.value_mask))
647 return ''.join(packed)
648
649 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800650 def unpack(reader):
Rich Lane6f4978c2013-10-20 21:33:52 -0700651 obj = bsn_in_ports_128_masked()
Rich Lane6f4978c2013-10-20 21:33:52 -0700652 _type_len = reader.read("!L")[0]
653 assert(_type_len == 196896)
654 obj.value = util.unpack_bitmap_128(reader)
655 obj.value_mask = util.unpack_bitmap_128(reader)
656 return obj
657
658 def __eq__(self, other):
659 if type(self) != type(other): return False
660 if self.value != other.value: return False
661 if self.value_mask != other.value_mask: return False
662 return True
663
Rich Lane6f4978c2013-10-20 21:33:52 -0700664 def pretty_print(self, q):
665 q.text("bsn_in_ports_128_masked {")
666 with q.group():
667 with q.indent(2):
668 q.breakable()
669 q.text("value = ");
670 q.pp(self.value)
671 q.text(","); q.breakable()
672 q.text("value_mask = ");
673 q.pp(self.value_mask)
674 q.breakable()
675 q.text('}')
676
Rich Lane7dcdf022013-12-11 14:45:27 -0800677oxm.subtypes[196896] = bsn_in_ports_128_masked
678
679class bsn_l3_dst_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800680 type_len = 199684
681
682 def __init__(self, value=None):
683 if value != None:
684 self.value = value
685 else:
686 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800687 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800688
689 def pack(self):
690 packed = []
691 packed.append(struct.pack("!L", self.type_len))
692 packed.append(struct.pack("!L", self.value))
693 return ''.join(packed)
694
695 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800696 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800697 obj = bsn_l3_dst_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800698 _type_len = reader.read("!L")[0]
699 assert(_type_len == 199684)
700 obj.value = reader.read("!L")[0]
701 return obj
702
703 def __eq__(self, other):
704 if type(self) != type(other): return False
705 if self.value != other.value: return False
706 return True
707
Rich Laned9e3f7b2013-11-04 11:40:43 -0800708 def pretty_print(self, q):
709 q.text("bsn_l3_dst_class_id {")
710 with q.group():
711 with q.indent(2):
712 q.breakable()
713 q.text("value = ");
714 q.text("%#x" % self.value)
715 q.breakable()
716 q.text('}')
717
Rich Lane7dcdf022013-12-11 14:45:27 -0800718oxm.subtypes[199684] = bsn_l3_dst_class_id
719
720class bsn_l3_dst_class_id_masked(oxm):
721 type_len = 199944
Rich Laned9e3f7b2013-11-04 11:40:43 -0800722
723 def __init__(self, value=None, value_mask=None):
724 if value != None:
725 self.value = value
726 else:
727 self.value = 0
728 if value_mask != None:
729 self.value_mask = value_mask
730 else:
731 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800732 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800733
734 def pack(self):
735 packed = []
736 packed.append(struct.pack("!L", self.type_len))
737 packed.append(struct.pack("!L", self.value))
738 packed.append(struct.pack("!L", self.value_mask))
739 return ''.join(packed)
740
741 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800742 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800743 obj = bsn_l3_dst_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800744 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800745 assert(_type_len == 199944)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800746 obj.value = reader.read("!L")[0]
747 obj.value_mask = reader.read("!L")[0]
748 return obj
749
750 def __eq__(self, other):
751 if type(self) != type(other): return False
752 if self.value != other.value: return False
753 if self.value_mask != other.value_mask: return False
754 return True
755
Rich Laned9e3f7b2013-11-04 11:40:43 -0800756 def pretty_print(self, q):
757 q.text("bsn_l3_dst_class_id_masked {")
758 with q.group():
759 with q.indent(2):
760 q.breakable()
761 q.text("value = ");
762 q.text("%#x" % self.value)
763 q.text(","); q.breakable()
764 q.text("value_mask = ");
765 q.text("%#x" % self.value_mask)
766 q.breakable()
767 q.text('}')
768
Rich Lane7dcdf022013-12-11 14:45:27 -0800769oxm.subtypes[199944] = bsn_l3_dst_class_id_masked
770
771class bsn_l3_interface_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800772 type_len = 198660
773
774 def __init__(self, value=None):
775 if value != None:
776 self.value = value
777 else:
778 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800779 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800780
781 def pack(self):
782 packed = []
783 packed.append(struct.pack("!L", self.type_len))
784 packed.append(struct.pack("!L", self.value))
785 return ''.join(packed)
786
787 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800788 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800789 obj = bsn_l3_interface_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800790 _type_len = reader.read("!L")[0]
791 assert(_type_len == 198660)
792 obj.value = reader.read("!L")[0]
793 return obj
794
795 def __eq__(self, other):
796 if type(self) != type(other): return False
797 if self.value != other.value: return False
798 return True
799
Rich Laned9e3f7b2013-11-04 11:40:43 -0800800 def pretty_print(self, q):
801 q.text("bsn_l3_interface_class_id {")
802 with q.group():
803 with q.indent(2):
804 q.breakable()
805 q.text("value = ");
806 q.text("%#x" % self.value)
807 q.breakable()
808 q.text('}')
809
Rich Lane7dcdf022013-12-11 14:45:27 -0800810oxm.subtypes[198660] = bsn_l3_interface_class_id
811
812class bsn_l3_interface_class_id_masked(oxm):
813 type_len = 198920
Rich Laned9e3f7b2013-11-04 11:40:43 -0800814
815 def __init__(self, value=None, value_mask=None):
816 if value != None:
817 self.value = value
818 else:
819 self.value = 0
820 if value_mask != None:
821 self.value_mask = value_mask
822 else:
823 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800824 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800825
826 def pack(self):
827 packed = []
828 packed.append(struct.pack("!L", self.type_len))
829 packed.append(struct.pack("!L", self.value))
830 packed.append(struct.pack("!L", self.value_mask))
831 return ''.join(packed)
832
833 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800834 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800835 obj = bsn_l3_interface_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800836 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800837 assert(_type_len == 198920)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800838 obj.value = reader.read("!L")[0]
839 obj.value_mask = reader.read("!L")[0]
840 return obj
841
842 def __eq__(self, other):
843 if type(self) != type(other): return False
844 if self.value != other.value: return False
845 if self.value_mask != other.value_mask: return False
846 return True
847
Rich Laned9e3f7b2013-11-04 11:40:43 -0800848 def pretty_print(self, q):
849 q.text("bsn_l3_interface_class_id_masked {")
850 with q.group():
851 with q.indent(2):
852 q.breakable()
853 q.text("value = ");
854 q.text("%#x" % self.value)
855 q.text(","); q.breakable()
856 q.text("value_mask = ");
857 q.text("%#x" % self.value_mask)
858 q.breakable()
859 q.text('}')
860
Rich Lane7dcdf022013-12-11 14:45:27 -0800861oxm.subtypes[198920] = bsn_l3_interface_class_id_masked
862
863class bsn_l3_src_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800864 type_len = 199172
865
866 def __init__(self, value=None):
867 if value != None:
868 self.value = value
869 else:
870 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800871 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800872
873 def pack(self):
874 packed = []
875 packed.append(struct.pack("!L", self.type_len))
876 packed.append(struct.pack("!L", self.value))
877 return ''.join(packed)
878
879 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800880 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800881 obj = bsn_l3_src_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800882 _type_len = reader.read("!L")[0]
883 assert(_type_len == 199172)
884 obj.value = reader.read("!L")[0]
885 return obj
886
887 def __eq__(self, other):
888 if type(self) != type(other): return False
889 if self.value != other.value: return False
890 return True
891
Rich Laned9e3f7b2013-11-04 11:40:43 -0800892 def pretty_print(self, q):
893 q.text("bsn_l3_src_class_id {")
894 with q.group():
895 with q.indent(2):
896 q.breakable()
897 q.text("value = ");
898 q.text("%#x" % self.value)
899 q.breakable()
900 q.text('}')
901
Rich Lane7dcdf022013-12-11 14:45:27 -0800902oxm.subtypes[199172] = bsn_l3_src_class_id
903
904class bsn_l3_src_class_id_masked(oxm):
905 type_len = 199432
Rich Laned9e3f7b2013-11-04 11:40:43 -0800906
907 def __init__(self, value=None, value_mask=None):
908 if value != None:
909 self.value = value
910 else:
911 self.value = 0
912 if value_mask != None:
913 self.value_mask = value_mask
914 else:
915 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800916 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800917
918 def pack(self):
919 packed = []
920 packed.append(struct.pack("!L", self.type_len))
921 packed.append(struct.pack("!L", self.value))
922 packed.append(struct.pack("!L", self.value_mask))
923 return ''.join(packed)
924
925 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800926 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800927 obj = bsn_l3_src_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800928 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800929 assert(_type_len == 199432)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800930 obj.value = reader.read("!L")[0]
931 obj.value_mask = reader.read("!L")[0]
932 return obj
933
934 def __eq__(self, other):
935 if type(self) != type(other): return False
936 if self.value != other.value: return False
937 if self.value_mask != other.value_mask: return False
938 return True
939
Rich Laned9e3f7b2013-11-04 11:40:43 -0800940 def pretty_print(self, q):
941 q.text("bsn_l3_src_class_id_masked {")
942 with q.group():
943 with q.indent(2):
944 q.breakable()
945 q.text("value = ");
946 q.text("%#x" % self.value)
947 q.text(","); q.breakable()
948 q.text("value_mask = ");
949 q.text("%#x" % self.value_mask)
950 q.breakable()
951 q.text('}')
952
Rich Lane7dcdf022013-12-11 14:45:27 -0800953oxm.subtypes[199432] = bsn_l3_src_class_id_masked
954
955class bsn_lag_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800956 type_len = 197124
957
958 def __init__(self, value=None):
959 if value != None:
960 self.value = value
961 else:
962 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800963 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800964
965 def pack(self):
966 packed = []
967 packed.append(struct.pack("!L", self.type_len))
968 packed.append(struct.pack("!L", self.value))
969 return ''.join(packed)
970
971 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800972 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800973 obj = bsn_lag_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800974 _type_len = reader.read("!L")[0]
975 assert(_type_len == 197124)
976 obj.value = reader.read("!L")[0]
977 return obj
978
979 def __eq__(self, other):
980 if type(self) != type(other): return False
981 if self.value != other.value: return False
982 return True
983
Rich Laned9e3f7b2013-11-04 11:40:43 -0800984 def pretty_print(self, q):
985 q.text("bsn_lag_id {")
986 with q.group():
987 with q.indent(2):
988 q.breakable()
989 q.text("value = ");
990 q.text("%#x" % self.value)
991 q.breakable()
992 q.text('}')
993
Rich Lane7dcdf022013-12-11 14:45:27 -0800994oxm.subtypes[197124] = bsn_lag_id
995
996class bsn_lag_id_masked(oxm):
997 type_len = 197384
Rich Laned9e3f7b2013-11-04 11:40:43 -0800998
999 def __init__(self, value=None, value_mask=None):
1000 if value != None:
1001 self.value = value
1002 else:
1003 self.value = 0
1004 if value_mask != None:
1005 self.value_mask = value_mask
1006 else:
1007 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001008 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001009
1010 def pack(self):
1011 packed = []
1012 packed.append(struct.pack("!L", self.type_len))
1013 packed.append(struct.pack("!L", self.value))
1014 packed.append(struct.pack("!L", self.value_mask))
1015 return ''.join(packed)
1016
1017 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001018 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001019 obj = bsn_lag_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001020 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001021 assert(_type_len == 197384)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001022 obj.value = reader.read("!L")[0]
1023 obj.value_mask = reader.read("!L")[0]
1024 return obj
1025
1026 def __eq__(self, other):
1027 if type(self) != type(other): return False
1028 if self.value != other.value: return False
1029 if self.value_mask != other.value_mask: return False
1030 return True
1031
Rich Laned9e3f7b2013-11-04 11:40:43 -08001032 def pretty_print(self, q):
1033 q.text("bsn_lag_id_masked {")
1034 with q.group():
1035 with q.indent(2):
1036 q.breakable()
1037 q.text("value = ");
1038 q.text("%#x" % self.value)
1039 q.text(","); q.breakable()
1040 q.text("value_mask = ");
1041 q.text("%#x" % self.value_mask)
1042 q.breakable()
1043 q.text('}')
1044
Rich Lane7dcdf022013-12-11 14:45:27 -08001045oxm.subtypes[197384] = bsn_lag_id_masked
1046
1047class bsn_vrf(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001048 type_len = 197636
1049
1050 def __init__(self, value=None):
1051 if value != None:
1052 self.value = value
1053 else:
1054 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001055 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001056
1057 def pack(self):
1058 packed = []
1059 packed.append(struct.pack("!L", self.type_len))
1060 packed.append(struct.pack("!L", self.value))
1061 return ''.join(packed)
1062
1063 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001064 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001065 obj = bsn_vrf()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001066 _type_len = reader.read("!L")[0]
1067 assert(_type_len == 197636)
1068 obj.value = reader.read("!L")[0]
1069 return obj
1070
1071 def __eq__(self, other):
1072 if type(self) != type(other): return False
1073 if self.value != other.value: return False
1074 return True
1075
Rich Laned9e3f7b2013-11-04 11:40:43 -08001076 def pretty_print(self, q):
1077 q.text("bsn_vrf {")
1078 with q.group():
1079 with q.indent(2):
1080 q.breakable()
1081 q.text("value = ");
1082 q.text("%#x" % self.value)
1083 q.breakable()
1084 q.text('}')
1085
Rich Lane7dcdf022013-12-11 14:45:27 -08001086oxm.subtypes[197636] = bsn_vrf
1087
1088class bsn_vrf_masked(oxm):
1089 type_len = 197896
Rich Laned9e3f7b2013-11-04 11:40:43 -08001090
1091 def __init__(self, value=None, value_mask=None):
1092 if value != None:
1093 self.value = value
1094 else:
1095 self.value = 0
1096 if value_mask != None:
1097 self.value_mask = value_mask
1098 else:
1099 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001100 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001101
1102 def pack(self):
1103 packed = []
1104 packed.append(struct.pack("!L", self.type_len))
1105 packed.append(struct.pack("!L", self.value))
1106 packed.append(struct.pack("!L", self.value_mask))
1107 return ''.join(packed)
1108
1109 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001110 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001111 obj = bsn_vrf_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001112 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001113 assert(_type_len == 197896)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001114 obj.value = reader.read("!L")[0]
1115 obj.value_mask = reader.read("!L")[0]
1116 return obj
1117
1118 def __eq__(self, other):
1119 if type(self) != type(other): return False
1120 if self.value != other.value: return False
1121 if self.value_mask != other.value_mask: return False
1122 return True
1123
Rich Laned9e3f7b2013-11-04 11:40:43 -08001124 def pretty_print(self, q):
1125 q.text("bsn_vrf_masked {")
1126 with q.group():
1127 with q.indent(2):
1128 q.breakable()
1129 q.text("value = ");
1130 q.text("%#x" % self.value)
1131 q.text(","); q.breakable()
1132 q.text("value_mask = ");
1133 q.text("%#x" % self.value_mask)
1134 q.breakable()
1135 q.text('}')
1136
Rich Lane7dcdf022013-12-11 14:45:27 -08001137oxm.subtypes[197896] = bsn_vrf_masked
1138
1139class eth_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001140 type_len = 2147485190
Rich Lanec2ee4b82013-04-24 17:12:38 -07001141
1142 def __init__(self, value=None):
1143 if value != None:
1144 self.value = value
1145 else:
1146 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001147 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001148
1149 def pack(self):
1150 packed = []
1151 packed.append(struct.pack("!L", self.type_len))
1152 packed.append(struct.pack("!6B", *self.value))
1153 return ''.join(packed)
1154
1155 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001156 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001157 obj = eth_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07001158 _type_len = reader.read("!L")[0]
1159 assert(_type_len == 2147485190)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001160 obj.value = list(reader.read('!6B'))
1161 return obj
1162
1163 def __eq__(self, other):
1164 if type(self) != type(other): return False
1165 if self.value != other.value: return False
1166 return True
1167
Rich Lanec2ee4b82013-04-24 17:12:38 -07001168 def pretty_print(self, q):
1169 q.text("eth_dst {")
1170 with q.group():
1171 with q.indent(2):
1172 q.breakable()
1173 q.text("value = ");
1174 q.text(util.pretty_mac(self.value))
1175 q.breakable()
1176 q.text('}')
1177
Rich Lane7dcdf022013-12-11 14:45:27 -08001178oxm.subtypes[2147485190] = eth_dst
1179
1180class eth_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001181 type_len = 2147485452
Rich Lanec2ee4b82013-04-24 17:12:38 -07001182
1183 def __init__(self, value=None, value_mask=None):
1184 if value != None:
1185 self.value = value
1186 else:
1187 self.value = [0,0,0,0,0,0]
1188 if value_mask != None:
1189 self.value_mask = value_mask
1190 else:
1191 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001192 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001193
1194 def pack(self):
1195 packed = []
1196 packed.append(struct.pack("!L", self.type_len))
1197 packed.append(struct.pack("!6B", *self.value))
1198 packed.append(struct.pack("!6B", *self.value_mask))
1199 return ''.join(packed)
1200
1201 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001202 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001203 obj = eth_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001204 _type_len = reader.read("!L")[0]
1205 assert(_type_len == 2147485452)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001206 obj.value = list(reader.read('!6B'))
1207 obj.value_mask = list(reader.read('!6B'))
1208 return obj
1209
1210 def __eq__(self, other):
1211 if type(self) != type(other): return False
1212 if self.value != other.value: return False
1213 if self.value_mask != other.value_mask: return False
1214 return True
1215
Rich Lanec2ee4b82013-04-24 17:12:38 -07001216 def pretty_print(self, q):
1217 q.text("eth_dst_masked {")
1218 with q.group():
1219 with q.indent(2):
1220 q.breakable()
1221 q.text("value = ");
1222 q.text(util.pretty_mac(self.value))
1223 q.text(","); q.breakable()
1224 q.text("value_mask = ");
1225 q.text(util.pretty_mac(self.value_mask))
1226 q.breakable()
1227 q.text('}')
1228
Rich Lane7dcdf022013-12-11 14:45:27 -08001229oxm.subtypes[2147485452] = eth_dst_masked
1230
1231class eth_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001232 type_len = 2147485702
Rich Lanec2ee4b82013-04-24 17:12:38 -07001233
1234 def __init__(self, value=None):
1235 if value != None:
1236 self.value = value
1237 else:
1238 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001239 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001240
1241 def pack(self):
1242 packed = []
1243 packed.append(struct.pack("!L", self.type_len))
1244 packed.append(struct.pack("!6B", *self.value))
1245 return ''.join(packed)
1246
1247 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001248 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001249 obj = eth_src()
Dan Talaycof6202252013-07-02 01:00:29 -07001250 _type_len = reader.read("!L")[0]
1251 assert(_type_len == 2147485702)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001252 obj.value = list(reader.read('!6B'))
1253 return obj
1254
1255 def __eq__(self, other):
1256 if type(self) != type(other): return False
1257 if self.value != other.value: return False
1258 return True
1259
Rich Lanec2ee4b82013-04-24 17:12:38 -07001260 def pretty_print(self, q):
1261 q.text("eth_src {")
1262 with q.group():
1263 with q.indent(2):
1264 q.breakable()
1265 q.text("value = ");
1266 q.text(util.pretty_mac(self.value))
1267 q.breakable()
1268 q.text('}')
1269
Rich Lane7dcdf022013-12-11 14:45:27 -08001270oxm.subtypes[2147485702] = eth_src
1271
1272class eth_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001273 type_len = 2147485964
Rich Lanec2ee4b82013-04-24 17:12:38 -07001274
1275 def __init__(self, value=None, value_mask=None):
1276 if value != None:
1277 self.value = value
1278 else:
1279 self.value = [0,0,0,0,0,0]
1280 if value_mask != None:
1281 self.value_mask = value_mask
1282 else:
1283 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001284 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001285
1286 def pack(self):
1287 packed = []
1288 packed.append(struct.pack("!L", self.type_len))
1289 packed.append(struct.pack("!6B", *self.value))
1290 packed.append(struct.pack("!6B", *self.value_mask))
1291 return ''.join(packed)
1292
1293 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001294 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001295 obj = eth_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001296 _type_len = reader.read("!L")[0]
1297 assert(_type_len == 2147485964)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001298 obj.value = list(reader.read('!6B'))
1299 obj.value_mask = list(reader.read('!6B'))
1300 return obj
1301
1302 def __eq__(self, other):
1303 if type(self) != type(other): return False
1304 if self.value != other.value: return False
1305 if self.value_mask != other.value_mask: return False
1306 return True
1307
Rich Lanec2ee4b82013-04-24 17:12:38 -07001308 def pretty_print(self, q):
1309 q.text("eth_src_masked {")
1310 with q.group():
1311 with q.indent(2):
1312 q.breakable()
1313 q.text("value = ");
1314 q.text(util.pretty_mac(self.value))
1315 q.text(","); q.breakable()
1316 q.text("value_mask = ");
1317 q.text(util.pretty_mac(self.value_mask))
1318 q.breakable()
1319 q.text('}')
1320
Rich Lane7dcdf022013-12-11 14:45:27 -08001321oxm.subtypes[2147485964] = eth_src_masked
1322
1323class eth_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001324 type_len = 2147486210
Rich Lanec2ee4b82013-04-24 17:12:38 -07001325
1326 def __init__(self, value=None):
1327 if value != None:
1328 self.value = value
1329 else:
1330 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001331 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001332
1333 def pack(self):
1334 packed = []
1335 packed.append(struct.pack("!L", self.type_len))
1336 packed.append(struct.pack("!H", self.value))
1337 return ''.join(packed)
1338
1339 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001340 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001341 obj = eth_type()
Dan Talaycof6202252013-07-02 01:00:29 -07001342 _type_len = reader.read("!L")[0]
1343 assert(_type_len == 2147486210)
1344 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001345 return obj
1346
1347 def __eq__(self, other):
1348 if type(self) != type(other): return False
1349 if self.value != other.value: return False
1350 return True
1351
Rich Lanec2ee4b82013-04-24 17:12:38 -07001352 def pretty_print(self, q):
1353 q.text("eth_type {")
1354 with q.group():
1355 with q.indent(2):
1356 q.breakable()
1357 q.text("value = ");
1358 q.text("%#x" % self.value)
1359 q.breakable()
1360 q.text('}')
1361
Rich Lane7dcdf022013-12-11 14:45:27 -08001362oxm.subtypes[2147486210] = eth_type
1363
1364class eth_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001365 type_len = 2147486468
Rich Lanec2ee4b82013-04-24 17:12:38 -07001366
1367 def __init__(self, value=None, value_mask=None):
1368 if value != None:
1369 self.value = value
1370 else:
1371 self.value = 0
1372 if value_mask != None:
1373 self.value_mask = value_mask
1374 else:
1375 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001376 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001377
1378 def pack(self):
1379 packed = []
1380 packed.append(struct.pack("!L", self.type_len))
1381 packed.append(struct.pack("!H", self.value))
1382 packed.append(struct.pack("!H", self.value_mask))
1383 return ''.join(packed)
1384
1385 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001386 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001387 obj = eth_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001388 _type_len = reader.read("!L")[0]
1389 assert(_type_len == 2147486468)
1390 obj.value = reader.read("!H")[0]
1391 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001392 return obj
1393
1394 def __eq__(self, other):
1395 if type(self) != type(other): return False
1396 if self.value != other.value: return False
1397 if self.value_mask != other.value_mask: return False
1398 return True
1399
Rich Lanec2ee4b82013-04-24 17:12:38 -07001400 def pretty_print(self, q):
1401 q.text("eth_type_masked {")
1402 with q.group():
1403 with q.indent(2):
1404 q.breakable()
1405 q.text("value = ");
1406 q.text("%#x" % self.value)
1407 q.text(","); q.breakable()
1408 q.text("value_mask = ");
1409 q.text("%#x" % self.value_mask)
1410 q.breakable()
1411 q.text('}')
1412
Rich Lane7dcdf022013-12-11 14:45:27 -08001413oxm.subtypes[2147486468] = eth_type_masked
1414
1415class icmpv4_code(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001416 type_len = 2147493889
Rich Lanec2ee4b82013-04-24 17:12:38 -07001417
1418 def __init__(self, value=None):
1419 if value != None:
1420 self.value = value
1421 else:
1422 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001423 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001424
1425 def pack(self):
1426 packed = []
1427 packed.append(struct.pack("!L", self.type_len))
1428 packed.append(struct.pack("!B", self.value))
1429 return ''.join(packed)
1430
1431 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001432 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001433 obj = icmpv4_code()
Dan Talaycof6202252013-07-02 01:00:29 -07001434 _type_len = reader.read("!L")[0]
1435 assert(_type_len == 2147493889)
1436 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001437 return obj
1438
1439 def __eq__(self, other):
1440 if type(self) != type(other): return False
1441 if self.value != other.value: return False
1442 return True
1443
Rich Lanec2ee4b82013-04-24 17:12:38 -07001444 def pretty_print(self, q):
1445 q.text("icmpv4_code {")
1446 with q.group():
1447 with q.indent(2):
1448 q.breakable()
1449 q.text("value = ");
1450 q.text("%#x" % self.value)
1451 q.breakable()
1452 q.text('}')
1453
Rich Lane7dcdf022013-12-11 14:45:27 -08001454oxm.subtypes[2147493889] = icmpv4_code
1455
1456class icmpv4_code_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001457 type_len = 2147494146
Rich Lanec2ee4b82013-04-24 17:12:38 -07001458
1459 def __init__(self, value=None, value_mask=None):
1460 if value != None:
1461 self.value = value
1462 else:
1463 self.value = 0
1464 if value_mask != None:
1465 self.value_mask = value_mask
1466 else:
1467 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001468 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001469
1470 def pack(self):
1471 packed = []
1472 packed.append(struct.pack("!L", self.type_len))
1473 packed.append(struct.pack("!B", self.value))
1474 packed.append(struct.pack("!B", self.value_mask))
1475 return ''.join(packed)
1476
1477 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001478 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001479 obj = icmpv4_code_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001480 _type_len = reader.read("!L")[0]
1481 assert(_type_len == 2147494146)
1482 obj.value = reader.read("!B")[0]
1483 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001484 return obj
1485
1486 def __eq__(self, other):
1487 if type(self) != type(other): return False
1488 if self.value != other.value: return False
1489 if self.value_mask != other.value_mask: return False
1490 return True
1491
Rich Lanec2ee4b82013-04-24 17:12:38 -07001492 def pretty_print(self, q):
1493 q.text("icmpv4_code_masked {")
1494 with q.group():
1495 with q.indent(2):
1496 q.breakable()
1497 q.text("value = ");
1498 q.text("%#x" % self.value)
1499 q.text(","); q.breakable()
1500 q.text("value_mask = ");
1501 q.text("%#x" % self.value_mask)
1502 q.breakable()
1503 q.text('}')
1504
Rich Lane7dcdf022013-12-11 14:45:27 -08001505oxm.subtypes[2147494146] = icmpv4_code_masked
1506
1507class icmpv4_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001508 type_len = 2147493377
Rich Lanec2ee4b82013-04-24 17:12:38 -07001509
1510 def __init__(self, value=None):
1511 if value != None:
1512 self.value = value
1513 else:
1514 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001515 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001516
1517 def pack(self):
1518 packed = []
1519 packed.append(struct.pack("!L", self.type_len))
1520 packed.append(struct.pack("!B", self.value))
1521 return ''.join(packed)
1522
1523 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001524 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001525 obj = icmpv4_type()
Dan Talaycof6202252013-07-02 01:00:29 -07001526 _type_len = reader.read("!L")[0]
1527 assert(_type_len == 2147493377)
1528 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001529 return obj
1530
1531 def __eq__(self, other):
1532 if type(self) != type(other): return False
1533 if self.value != other.value: return False
1534 return True
1535
Rich Lanec2ee4b82013-04-24 17:12:38 -07001536 def pretty_print(self, q):
1537 q.text("icmpv4_type {")
1538 with q.group():
1539 with q.indent(2):
1540 q.breakable()
1541 q.text("value = ");
1542 q.text("%#x" % self.value)
1543 q.breakable()
1544 q.text('}')
1545
Rich Lane7dcdf022013-12-11 14:45:27 -08001546oxm.subtypes[2147493377] = icmpv4_type
1547
1548class icmpv4_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001549 type_len = 2147493634
Rich Lanec2ee4b82013-04-24 17:12:38 -07001550
1551 def __init__(self, value=None, value_mask=None):
1552 if value != None:
1553 self.value = value
1554 else:
1555 self.value = 0
1556 if value_mask != None:
1557 self.value_mask = value_mask
1558 else:
1559 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001560 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001561
1562 def pack(self):
1563 packed = []
1564 packed.append(struct.pack("!L", self.type_len))
1565 packed.append(struct.pack("!B", self.value))
1566 packed.append(struct.pack("!B", self.value_mask))
1567 return ''.join(packed)
1568
1569 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001570 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001571 obj = icmpv4_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001572 _type_len = reader.read("!L")[0]
1573 assert(_type_len == 2147493634)
1574 obj.value = reader.read("!B")[0]
1575 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001576 return obj
1577
1578 def __eq__(self, other):
1579 if type(self) != type(other): return False
1580 if self.value != other.value: return False
1581 if self.value_mask != other.value_mask: return False
1582 return True
1583
Rich Lanec2ee4b82013-04-24 17:12:38 -07001584 def pretty_print(self, q):
1585 q.text("icmpv4_type_masked {")
1586 with q.group():
1587 with q.indent(2):
1588 q.breakable()
1589 q.text("value = ");
1590 q.text("%#x" % self.value)
1591 q.text(","); q.breakable()
1592 q.text("value_mask = ");
1593 q.text("%#x" % self.value_mask)
1594 q.breakable()
1595 q.text('}')
1596
Rich Lane7dcdf022013-12-11 14:45:27 -08001597oxm.subtypes[2147493634] = icmpv4_type_masked
1598
1599class icmpv6_code(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001600 type_len = 2147499009
Rich Lanec2ee4b82013-04-24 17:12:38 -07001601
1602 def __init__(self, value=None):
1603 if value != None:
1604 self.value = value
1605 else:
1606 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001607 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001608
1609 def pack(self):
1610 packed = []
1611 packed.append(struct.pack("!L", self.type_len))
1612 packed.append(struct.pack("!B", self.value))
1613 return ''.join(packed)
1614
1615 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001616 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001617 obj = icmpv6_code()
Dan Talaycof6202252013-07-02 01:00:29 -07001618 _type_len = reader.read("!L")[0]
1619 assert(_type_len == 2147499009)
1620 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001621 return obj
1622
1623 def __eq__(self, other):
1624 if type(self) != type(other): return False
1625 if self.value != other.value: return False
1626 return True
1627
Rich Lanec2ee4b82013-04-24 17:12:38 -07001628 def pretty_print(self, q):
1629 q.text("icmpv6_code {")
1630 with q.group():
1631 with q.indent(2):
1632 q.breakable()
1633 q.text("value = ");
1634 q.text("%#x" % self.value)
1635 q.breakable()
1636 q.text('}')
1637
Rich Lane7dcdf022013-12-11 14:45:27 -08001638oxm.subtypes[2147499009] = icmpv6_code
1639
1640class icmpv6_code_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001641 type_len = 2147499266
Rich Lanec2ee4b82013-04-24 17:12:38 -07001642
1643 def __init__(self, value=None, value_mask=None):
1644 if value != None:
1645 self.value = value
1646 else:
1647 self.value = 0
1648 if value_mask != None:
1649 self.value_mask = value_mask
1650 else:
1651 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001652 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001653
1654 def pack(self):
1655 packed = []
1656 packed.append(struct.pack("!L", self.type_len))
1657 packed.append(struct.pack("!B", self.value))
1658 packed.append(struct.pack("!B", self.value_mask))
1659 return ''.join(packed)
1660
1661 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001662 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001663 obj = icmpv6_code_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001664 _type_len = reader.read("!L")[0]
1665 assert(_type_len == 2147499266)
1666 obj.value = reader.read("!B")[0]
1667 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001668 return obj
1669
1670 def __eq__(self, other):
1671 if type(self) != type(other): return False
1672 if self.value != other.value: return False
1673 if self.value_mask != other.value_mask: return False
1674 return True
1675
Rich Lanec2ee4b82013-04-24 17:12:38 -07001676 def pretty_print(self, q):
1677 q.text("icmpv6_code_masked {")
1678 with q.group():
1679 with q.indent(2):
1680 q.breakable()
1681 q.text("value = ");
1682 q.text("%#x" % self.value)
1683 q.text(","); q.breakable()
1684 q.text("value_mask = ");
1685 q.text("%#x" % self.value_mask)
1686 q.breakable()
1687 q.text('}')
1688
Rich Lane7dcdf022013-12-11 14:45:27 -08001689oxm.subtypes[2147499266] = icmpv6_code_masked
1690
1691class icmpv6_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001692 type_len = 2147498497
Rich Lanec2ee4b82013-04-24 17:12:38 -07001693
1694 def __init__(self, value=None):
1695 if value != None:
1696 self.value = value
1697 else:
1698 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001699 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001700
1701 def pack(self):
1702 packed = []
1703 packed.append(struct.pack("!L", self.type_len))
1704 packed.append(struct.pack("!B", self.value))
1705 return ''.join(packed)
1706
1707 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001708 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001709 obj = icmpv6_type()
Dan Talaycof6202252013-07-02 01:00:29 -07001710 _type_len = reader.read("!L")[0]
1711 assert(_type_len == 2147498497)
1712 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001713 return obj
1714
1715 def __eq__(self, other):
1716 if type(self) != type(other): return False
1717 if self.value != other.value: return False
1718 return True
1719
Rich Lanec2ee4b82013-04-24 17:12:38 -07001720 def pretty_print(self, q):
1721 q.text("icmpv6_type {")
1722 with q.group():
1723 with q.indent(2):
1724 q.breakable()
1725 q.text("value = ");
1726 q.text("%#x" % self.value)
1727 q.breakable()
1728 q.text('}')
1729
Rich Lane7dcdf022013-12-11 14:45:27 -08001730oxm.subtypes[2147498497] = icmpv6_type
1731
1732class icmpv6_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001733 type_len = 2147498754
Rich Lanec2ee4b82013-04-24 17:12:38 -07001734
1735 def __init__(self, value=None, value_mask=None):
1736 if value != None:
1737 self.value = value
1738 else:
1739 self.value = 0
1740 if value_mask != None:
1741 self.value_mask = value_mask
1742 else:
1743 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001744 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001745
1746 def pack(self):
1747 packed = []
1748 packed.append(struct.pack("!L", self.type_len))
1749 packed.append(struct.pack("!B", self.value))
1750 packed.append(struct.pack("!B", self.value_mask))
1751 return ''.join(packed)
1752
1753 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001754 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001755 obj = icmpv6_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001756 _type_len = reader.read("!L")[0]
1757 assert(_type_len == 2147498754)
1758 obj.value = reader.read("!B")[0]
1759 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001760 return obj
1761
1762 def __eq__(self, other):
1763 if type(self) != type(other): return False
1764 if self.value != other.value: return False
1765 if self.value_mask != other.value_mask: return False
1766 return True
1767
Rich Lanec2ee4b82013-04-24 17:12:38 -07001768 def pretty_print(self, q):
1769 q.text("icmpv6_type_masked {")
1770 with q.group():
1771 with q.indent(2):
1772 q.breakable()
1773 q.text("value = ");
1774 q.text("%#x" % self.value)
1775 q.text(","); q.breakable()
1776 q.text("value_mask = ");
1777 q.text("%#x" % self.value_mask)
1778 q.breakable()
1779 q.text('}')
1780
Rich Lane7dcdf022013-12-11 14:45:27 -08001781oxm.subtypes[2147498754] = icmpv6_type_masked
1782
1783class in_phy_port(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001784 type_len = 2147484164
Rich Lanec2ee4b82013-04-24 17:12:38 -07001785
1786 def __init__(self, value=None):
1787 if value != None:
1788 self.value = value
1789 else:
1790 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001791 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001792
1793 def pack(self):
1794 packed = []
1795 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07001796 packed.append(util.pack_port_no(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07001797 return ''.join(packed)
1798
1799 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001800 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001801 obj = in_phy_port()
Dan Talaycof6202252013-07-02 01:00:29 -07001802 _type_len = reader.read("!L")[0]
1803 assert(_type_len == 2147484164)
1804 obj.value = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001805 return obj
1806
1807 def __eq__(self, other):
1808 if type(self) != type(other): return False
1809 if self.value != other.value: return False
1810 return True
1811
Rich Lanec2ee4b82013-04-24 17:12:38 -07001812 def pretty_print(self, q):
1813 q.text("in_phy_port {")
1814 with q.group():
1815 with q.indent(2):
1816 q.breakable()
1817 q.text("value = ");
1818 q.text(util.pretty_port(self.value))
1819 q.breakable()
1820 q.text('}')
1821
Rich Lane7dcdf022013-12-11 14:45:27 -08001822oxm.subtypes[2147484164] = in_phy_port
1823
1824class in_phy_port_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001825 type_len = 2147484424
Rich Lanec2ee4b82013-04-24 17:12:38 -07001826
1827 def __init__(self, value=None, value_mask=None):
1828 if value != None:
1829 self.value = value
1830 else:
1831 self.value = 0
1832 if value_mask != None:
1833 self.value_mask = value_mask
1834 else:
1835 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001836 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001837
1838 def pack(self):
1839 packed = []
1840 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07001841 packed.append(util.pack_port_no(self.value))
1842 packed.append(util.pack_port_no(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07001843 return ''.join(packed)
1844
1845 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001846 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001847 obj = in_phy_port_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001848 _type_len = reader.read("!L")[0]
1849 assert(_type_len == 2147484424)
1850 obj.value = util.unpack_port_no(reader)
1851 obj.value_mask = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001852 return obj
1853
1854 def __eq__(self, other):
1855 if type(self) != type(other): return False
1856 if self.value != other.value: return False
1857 if self.value_mask != other.value_mask: return False
1858 return True
1859
Rich Lanec2ee4b82013-04-24 17:12:38 -07001860 def pretty_print(self, q):
1861 q.text("in_phy_port_masked {")
1862 with q.group():
1863 with q.indent(2):
1864 q.breakable()
1865 q.text("value = ");
1866 q.text(util.pretty_port(self.value))
1867 q.text(","); q.breakable()
1868 q.text("value_mask = ");
1869 q.text(util.pretty_port(self.value_mask))
1870 q.breakable()
1871 q.text('}')
1872
Rich Lane7dcdf022013-12-11 14:45:27 -08001873oxm.subtypes[2147484424] = in_phy_port_masked
1874
1875class in_port(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001876 type_len = 2147483652
Rich Lanec2ee4b82013-04-24 17:12:38 -07001877
1878 def __init__(self, value=None):
1879 if value != None:
1880 self.value = value
1881 else:
1882 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001883 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001884
1885 def pack(self):
1886 packed = []
1887 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07001888 packed.append(util.pack_port_no(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07001889 return ''.join(packed)
1890
1891 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001892 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001893 obj = in_port()
Dan Talaycof6202252013-07-02 01:00:29 -07001894 _type_len = reader.read("!L")[0]
1895 assert(_type_len == 2147483652)
1896 obj.value = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001897 return obj
1898
1899 def __eq__(self, other):
1900 if type(self) != type(other): return False
1901 if self.value != other.value: return False
1902 return True
1903
Rich Lanec2ee4b82013-04-24 17:12:38 -07001904 def pretty_print(self, q):
1905 q.text("in_port {")
1906 with q.group():
1907 with q.indent(2):
1908 q.breakable()
1909 q.text("value = ");
1910 q.text(util.pretty_port(self.value))
1911 q.breakable()
1912 q.text('}')
1913
Rich Lane7dcdf022013-12-11 14:45:27 -08001914oxm.subtypes[2147483652] = in_port
1915
1916class in_port_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001917 type_len = 2147483912
Rich Lanec2ee4b82013-04-24 17:12:38 -07001918
1919 def __init__(self, value=None, value_mask=None):
1920 if value != None:
1921 self.value = value
1922 else:
1923 self.value = 0
1924 if value_mask != None:
1925 self.value_mask = value_mask
1926 else:
1927 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001928 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001929
1930 def pack(self):
1931 packed = []
1932 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07001933 packed.append(util.pack_port_no(self.value))
1934 packed.append(util.pack_port_no(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07001935 return ''.join(packed)
1936
1937 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001938 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001939 obj = in_port_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001940 _type_len = reader.read("!L")[0]
1941 assert(_type_len == 2147483912)
1942 obj.value = util.unpack_port_no(reader)
1943 obj.value_mask = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001944 return obj
1945
1946 def __eq__(self, other):
1947 if type(self) != type(other): return False
1948 if self.value != other.value: return False
1949 if self.value_mask != other.value_mask: return False
1950 return True
1951
Rich Lanec2ee4b82013-04-24 17:12:38 -07001952 def pretty_print(self, q):
1953 q.text("in_port_masked {")
1954 with q.group():
1955 with q.indent(2):
1956 q.breakable()
1957 q.text("value = ");
1958 q.text(util.pretty_port(self.value))
1959 q.text(","); q.breakable()
1960 q.text("value_mask = ");
1961 q.text(util.pretty_port(self.value_mask))
1962 q.breakable()
1963 q.text('}')
1964
Rich Lane7dcdf022013-12-11 14:45:27 -08001965oxm.subtypes[2147483912] = in_port_masked
1966
1967class ip_dscp(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001968 type_len = 2147487745
Rich Lanec2ee4b82013-04-24 17:12:38 -07001969
1970 def __init__(self, value=None):
1971 if value != None:
1972 self.value = value
1973 else:
1974 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001975 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001976
1977 def pack(self):
1978 packed = []
1979 packed.append(struct.pack("!L", self.type_len))
1980 packed.append(struct.pack("!B", self.value))
1981 return ''.join(packed)
1982
1983 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001984 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001985 obj = ip_dscp()
Dan Talaycof6202252013-07-02 01:00:29 -07001986 _type_len = reader.read("!L")[0]
1987 assert(_type_len == 2147487745)
1988 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001989 return obj
1990
1991 def __eq__(self, other):
1992 if type(self) != type(other): return False
1993 if self.value != other.value: return False
1994 return True
1995
Rich Lanec2ee4b82013-04-24 17:12:38 -07001996 def pretty_print(self, q):
1997 q.text("ip_dscp {")
1998 with q.group():
1999 with q.indent(2):
2000 q.breakable()
2001 q.text("value = ");
2002 q.text("%#x" % self.value)
2003 q.breakable()
2004 q.text('}')
2005
Rich Lane7dcdf022013-12-11 14:45:27 -08002006oxm.subtypes[2147487745] = ip_dscp
2007
2008class ip_dscp_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002009 type_len = 2147488002
Rich Lanec2ee4b82013-04-24 17:12:38 -07002010
2011 def __init__(self, value=None, value_mask=None):
2012 if value != None:
2013 self.value = value
2014 else:
2015 self.value = 0
2016 if value_mask != None:
2017 self.value_mask = value_mask
2018 else:
2019 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002020 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002021
2022 def pack(self):
2023 packed = []
2024 packed.append(struct.pack("!L", self.type_len))
2025 packed.append(struct.pack("!B", self.value))
2026 packed.append(struct.pack("!B", self.value_mask))
2027 return ''.join(packed)
2028
2029 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002030 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002031 obj = ip_dscp_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002032 _type_len = reader.read("!L")[0]
2033 assert(_type_len == 2147488002)
2034 obj.value = reader.read("!B")[0]
2035 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002036 return obj
2037
2038 def __eq__(self, other):
2039 if type(self) != type(other): return False
2040 if self.value != other.value: return False
2041 if self.value_mask != other.value_mask: return False
2042 return True
2043
Rich Lanec2ee4b82013-04-24 17:12:38 -07002044 def pretty_print(self, q):
2045 q.text("ip_dscp_masked {")
2046 with q.group():
2047 with q.indent(2):
2048 q.breakable()
2049 q.text("value = ");
2050 q.text("%#x" % self.value)
2051 q.text(","); q.breakable()
2052 q.text("value_mask = ");
2053 q.text("%#x" % self.value_mask)
2054 q.breakable()
2055 q.text('}')
2056
Rich Lane7dcdf022013-12-11 14:45:27 -08002057oxm.subtypes[2147488002] = ip_dscp_masked
2058
2059class ip_ecn(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002060 type_len = 2147488257
Rich Lanec2ee4b82013-04-24 17:12:38 -07002061
2062 def __init__(self, value=None):
2063 if value != None:
2064 self.value = value
2065 else:
2066 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002067 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002068
2069 def pack(self):
2070 packed = []
2071 packed.append(struct.pack("!L", self.type_len))
2072 packed.append(struct.pack("!B", self.value))
2073 return ''.join(packed)
2074
2075 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002076 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002077 obj = ip_ecn()
Dan Talaycof6202252013-07-02 01:00:29 -07002078 _type_len = reader.read("!L")[0]
2079 assert(_type_len == 2147488257)
2080 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002081 return obj
2082
2083 def __eq__(self, other):
2084 if type(self) != type(other): return False
2085 if self.value != other.value: return False
2086 return True
2087
Rich Lanec2ee4b82013-04-24 17:12:38 -07002088 def pretty_print(self, q):
2089 q.text("ip_ecn {")
2090 with q.group():
2091 with q.indent(2):
2092 q.breakable()
2093 q.text("value = ");
2094 q.text("%#x" % self.value)
2095 q.breakable()
2096 q.text('}')
2097
Rich Lane7dcdf022013-12-11 14:45:27 -08002098oxm.subtypes[2147488257] = ip_ecn
2099
2100class ip_ecn_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002101 type_len = 2147488514
Rich Lanec2ee4b82013-04-24 17:12:38 -07002102
2103 def __init__(self, value=None, value_mask=None):
2104 if value != None:
2105 self.value = value
2106 else:
2107 self.value = 0
2108 if value_mask != None:
2109 self.value_mask = value_mask
2110 else:
2111 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002112 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002113
2114 def pack(self):
2115 packed = []
2116 packed.append(struct.pack("!L", self.type_len))
2117 packed.append(struct.pack("!B", self.value))
2118 packed.append(struct.pack("!B", self.value_mask))
2119 return ''.join(packed)
2120
2121 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002122 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002123 obj = ip_ecn_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002124 _type_len = reader.read("!L")[0]
2125 assert(_type_len == 2147488514)
2126 obj.value = reader.read("!B")[0]
2127 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002128 return obj
2129
2130 def __eq__(self, other):
2131 if type(self) != type(other): return False
2132 if self.value != other.value: return False
2133 if self.value_mask != other.value_mask: return False
2134 return True
2135
Rich Lanec2ee4b82013-04-24 17:12:38 -07002136 def pretty_print(self, q):
2137 q.text("ip_ecn_masked {")
2138 with q.group():
2139 with q.indent(2):
2140 q.breakable()
2141 q.text("value = ");
2142 q.text("%#x" % self.value)
2143 q.text(","); q.breakable()
2144 q.text("value_mask = ");
2145 q.text("%#x" % self.value_mask)
2146 q.breakable()
2147 q.text('}')
2148
Rich Lane7dcdf022013-12-11 14:45:27 -08002149oxm.subtypes[2147488514] = ip_ecn_masked
2150
2151class ip_proto(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002152 type_len = 2147488769
Rich Lanec2ee4b82013-04-24 17:12:38 -07002153
2154 def __init__(self, value=None):
2155 if value != None:
2156 self.value = value
2157 else:
2158 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002159 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002160
2161 def pack(self):
2162 packed = []
2163 packed.append(struct.pack("!L", self.type_len))
2164 packed.append(struct.pack("!B", self.value))
2165 return ''.join(packed)
2166
2167 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002168 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002169 obj = ip_proto()
Dan Talaycof6202252013-07-02 01:00:29 -07002170 _type_len = reader.read("!L")[0]
2171 assert(_type_len == 2147488769)
2172 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002173 return obj
2174
2175 def __eq__(self, other):
2176 if type(self) != type(other): return False
2177 if self.value != other.value: return False
2178 return True
2179
Rich Lanec2ee4b82013-04-24 17:12:38 -07002180 def pretty_print(self, q):
2181 q.text("ip_proto {")
2182 with q.group():
2183 with q.indent(2):
2184 q.breakable()
2185 q.text("value = ");
2186 q.text("%#x" % self.value)
2187 q.breakable()
2188 q.text('}')
2189
Rich Lane7dcdf022013-12-11 14:45:27 -08002190oxm.subtypes[2147488769] = ip_proto
2191
2192class ip_proto_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002193 type_len = 2147489026
Rich Lanec2ee4b82013-04-24 17:12:38 -07002194
2195 def __init__(self, value=None, value_mask=None):
2196 if value != None:
2197 self.value = value
2198 else:
2199 self.value = 0
2200 if value_mask != None:
2201 self.value_mask = value_mask
2202 else:
2203 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002204 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002205
2206 def pack(self):
2207 packed = []
2208 packed.append(struct.pack("!L", self.type_len))
2209 packed.append(struct.pack("!B", self.value))
2210 packed.append(struct.pack("!B", self.value_mask))
2211 return ''.join(packed)
2212
2213 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002214 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002215 obj = ip_proto_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002216 _type_len = reader.read("!L")[0]
2217 assert(_type_len == 2147489026)
2218 obj.value = reader.read("!B")[0]
2219 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002220 return obj
2221
2222 def __eq__(self, other):
2223 if type(self) != type(other): return False
2224 if self.value != other.value: return False
2225 if self.value_mask != other.value_mask: return False
2226 return True
2227
Rich Lanec2ee4b82013-04-24 17:12:38 -07002228 def pretty_print(self, q):
2229 q.text("ip_proto_masked {")
2230 with q.group():
2231 with q.indent(2):
2232 q.breakable()
2233 q.text("value = ");
2234 q.text("%#x" % self.value)
2235 q.text(","); q.breakable()
2236 q.text("value_mask = ");
2237 q.text("%#x" % self.value_mask)
2238 q.breakable()
2239 q.text('}')
2240
Rich Lane7dcdf022013-12-11 14:45:27 -08002241oxm.subtypes[2147489026] = ip_proto_masked
2242
2243class ipv4_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002244 type_len = 2147489796
Rich Lanec2ee4b82013-04-24 17:12:38 -07002245
2246 def __init__(self, value=None):
2247 if value != None:
2248 self.value = value
2249 else:
2250 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002251 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002252
2253 def pack(self):
2254 packed = []
2255 packed.append(struct.pack("!L", self.type_len))
2256 packed.append(struct.pack("!L", self.value))
2257 return ''.join(packed)
2258
2259 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002260 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002261 obj = ipv4_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07002262 _type_len = reader.read("!L")[0]
2263 assert(_type_len == 2147489796)
2264 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002265 return obj
2266
2267 def __eq__(self, other):
2268 if type(self) != type(other): return False
2269 if self.value != other.value: return False
2270 return True
2271
Rich Lanec2ee4b82013-04-24 17:12:38 -07002272 def pretty_print(self, q):
2273 q.text("ipv4_dst {")
2274 with q.group():
2275 with q.indent(2):
2276 q.breakable()
2277 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07002278 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002279 q.breakable()
2280 q.text('}')
2281
Rich Lane7dcdf022013-12-11 14:45:27 -08002282oxm.subtypes[2147489796] = ipv4_dst
2283
2284class ipv4_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002285 type_len = 2147490056
Rich Lanec2ee4b82013-04-24 17:12:38 -07002286
2287 def __init__(self, value=None, value_mask=None):
2288 if value != None:
2289 self.value = value
2290 else:
2291 self.value = 0
2292 if value_mask != None:
2293 self.value_mask = value_mask
2294 else:
2295 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002296 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002297
2298 def pack(self):
2299 packed = []
2300 packed.append(struct.pack("!L", self.type_len))
2301 packed.append(struct.pack("!L", self.value))
2302 packed.append(struct.pack("!L", self.value_mask))
2303 return ''.join(packed)
2304
2305 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002306 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002307 obj = ipv4_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002308 _type_len = reader.read("!L")[0]
2309 assert(_type_len == 2147490056)
2310 obj.value = reader.read("!L")[0]
2311 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002312 return obj
2313
2314 def __eq__(self, other):
2315 if type(self) != type(other): return False
2316 if self.value != other.value: return False
2317 if self.value_mask != other.value_mask: return False
2318 return True
2319
Rich Lanec2ee4b82013-04-24 17:12:38 -07002320 def pretty_print(self, q):
2321 q.text("ipv4_dst_masked {")
2322 with q.group():
2323 with q.indent(2):
2324 q.breakable()
2325 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07002326 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002327 q.text(","); q.breakable()
2328 q.text("value_mask = ");
Rich Laned53156a2013-08-05 17:17:33 -07002329 q.text(util.pretty_ipv4(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002330 q.breakable()
2331 q.text('}')
2332
Rich Lane7dcdf022013-12-11 14:45:27 -08002333oxm.subtypes[2147490056] = ipv4_dst_masked
2334
2335class ipv4_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002336 type_len = 2147489284
Rich Lanec2ee4b82013-04-24 17:12:38 -07002337
2338 def __init__(self, value=None):
2339 if value != None:
2340 self.value = value
2341 else:
2342 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002343 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002344
2345 def pack(self):
2346 packed = []
2347 packed.append(struct.pack("!L", self.type_len))
2348 packed.append(struct.pack("!L", self.value))
2349 return ''.join(packed)
2350
2351 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002352 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002353 obj = ipv4_src()
Dan Talaycof6202252013-07-02 01:00:29 -07002354 _type_len = reader.read("!L")[0]
2355 assert(_type_len == 2147489284)
2356 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002357 return obj
2358
2359 def __eq__(self, other):
2360 if type(self) != type(other): return False
2361 if self.value != other.value: return False
2362 return True
2363
Rich Lanec2ee4b82013-04-24 17:12:38 -07002364 def pretty_print(self, q):
2365 q.text("ipv4_src {")
2366 with q.group():
2367 with q.indent(2):
2368 q.breakable()
2369 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07002370 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002371 q.breakable()
2372 q.text('}')
2373
Rich Lane7dcdf022013-12-11 14:45:27 -08002374oxm.subtypes[2147489284] = ipv4_src
2375
2376class ipv4_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002377 type_len = 2147489544
Rich Lanec2ee4b82013-04-24 17:12:38 -07002378
2379 def __init__(self, value=None, value_mask=None):
2380 if value != None:
2381 self.value = value
2382 else:
2383 self.value = 0
2384 if value_mask != None:
2385 self.value_mask = value_mask
2386 else:
2387 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002388 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002389
2390 def pack(self):
2391 packed = []
2392 packed.append(struct.pack("!L", self.type_len))
2393 packed.append(struct.pack("!L", self.value))
2394 packed.append(struct.pack("!L", self.value_mask))
2395 return ''.join(packed)
2396
2397 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002398 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002399 obj = ipv4_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002400 _type_len = reader.read("!L")[0]
2401 assert(_type_len == 2147489544)
2402 obj.value = reader.read("!L")[0]
2403 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002404 return obj
2405
2406 def __eq__(self, other):
2407 if type(self) != type(other): return False
2408 if self.value != other.value: return False
2409 if self.value_mask != other.value_mask: return False
2410 return True
2411
Rich Lanec2ee4b82013-04-24 17:12:38 -07002412 def pretty_print(self, q):
2413 q.text("ipv4_src_masked {")
2414 with q.group():
2415 with q.indent(2):
2416 q.breakable()
2417 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07002418 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002419 q.text(","); q.breakable()
2420 q.text("value_mask = ");
Rich Laned53156a2013-08-05 17:17:33 -07002421 q.text(util.pretty_ipv4(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002422 q.breakable()
2423 q.text('}')
2424
Rich Lane7dcdf022013-12-11 14:45:27 -08002425oxm.subtypes[2147489544] = ipv4_src_masked
2426
2427class ipv6_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002428 type_len = 2147497488
Rich Lanec2ee4b82013-04-24 17:12:38 -07002429
2430 def __init__(self, value=None):
2431 if value != None:
2432 self.value = value
2433 else:
2434 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 -08002435 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002436
2437 def pack(self):
2438 packed = []
2439 packed.append(struct.pack("!L", self.type_len))
2440 packed.append(struct.pack("!16s", self.value))
2441 return ''.join(packed)
2442
2443 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002444 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002445 obj = ipv6_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07002446 _type_len = reader.read("!L")[0]
2447 assert(_type_len == 2147497488)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002448 obj.value = reader.read('!16s')[0]
2449 return obj
2450
2451 def __eq__(self, other):
2452 if type(self) != type(other): return False
2453 if self.value != other.value: return False
2454 return True
2455
Rich Lanec2ee4b82013-04-24 17:12:38 -07002456 def pretty_print(self, q):
2457 q.text("ipv6_dst {")
2458 with q.group():
2459 with q.indent(2):
2460 q.breakable()
2461 q.text("value = ");
2462 q.pp(self.value)
2463 q.breakable()
2464 q.text('}')
2465
Rich Lane7dcdf022013-12-11 14:45:27 -08002466oxm.subtypes[2147497488] = ipv6_dst
2467
2468class ipv6_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002469 type_len = 2147497760
Rich Lanec2ee4b82013-04-24 17:12:38 -07002470
2471 def __init__(self, value=None, value_mask=None):
2472 if value != None:
2473 self.value = value
2474 else:
2475 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2476 if value_mask != None:
2477 self.value_mask = value_mask
2478 else:
2479 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 -08002480 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002481
2482 def pack(self):
2483 packed = []
2484 packed.append(struct.pack("!L", self.type_len))
2485 packed.append(struct.pack("!16s", self.value))
2486 packed.append(struct.pack("!16s", self.value_mask))
2487 return ''.join(packed)
2488
2489 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002490 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002491 obj = ipv6_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002492 _type_len = reader.read("!L")[0]
2493 assert(_type_len == 2147497760)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002494 obj.value = reader.read('!16s')[0]
2495 obj.value_mask = reader.read('!16s')[0]
2496 return obj
2497
2498 def __eq__(self, other):
2499 if type(self) != type(other): return False
2500 if self.value != other.value: return False
2501 if self.value_mask != other.value_mask: return False
2502 return True
2503
Rich Lanec2ee4b82013-04-24 17:12:38 -07002504 def pretty_print(self, q):
2505 q.text("ipv6_dst_masked {")
2506 with q.group():
2507 with q.indent(2):
2508 q.breakable()
2509 q.text("value = ");
2510 q.pp(self.value)
2511 q.text(","); q.breakable()
2512 q.text("value_mask = ");
2513 q.pp(self.value_mask)
2514 q.breakable()
2515 q.text('}')
2516
Rich Lane7dcdf022013-12-11 14:45:27 -08002517oxm.subtypes[2147497760] = ipv6_dst_masked
2518
2519class ipv6_flabel(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002520 type_len = 2147497988
Rich Lanec2ee4b82013-04-24 17:12:38 -07002521
2522 def __init__(self, value=None):
2523 if value != None:
2524 self.value = value
2525 else:
2526 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002527 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002528
2529 def pack(self):
2530 packed = []
2531 packed.append(struct.pack("!L", self.type_len))
2532 packed.append(struct.pack("!L", self.value))
2533 return ''.join(packed)
2534
2535 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002536 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002537 obj = ipv6_flabel()
Dan Talaycof6202252013-07-02 01:00:29 -07002538 _type_len = reader.read("!L")[0]
2539 assert(_type_len == 2147497988)
2540 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002541 return obj
2542
2543 def __eq__(self, other):
2544 if type(self) != type(other): return False
2545 if self.value != other.value: return False
2546 return True
2547
Rich Lanec2ee4b82013-04-24 17:12:38 -07002548 def pretty_print(self, q):
2549 q.text("ipv6_flabel {")
2550 with q.group():
2551 with q.indent(2):
2552 q.breakable()
2553 q.text("value = ");
2554 q.text("%#x" % self.value)
2555 q.breakable()
2556 q.text('}')
2557
Rich Lane7dcdf022013-12-11 14:45:27 -08002558oxm.subtypes[2147497988] = ipv6_flabel
2559
2560class ipv6_flabel_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002561 type_len = 2147498248
Rich Lanec2ee4b82013-04-24 17:12:38 -07002562
2563 def __init__(self, value=None, value_mask=None):
2564 if value != None:
2565 self.value = value
2566 else:
2567 self.value = 0
2568 if value_mask != None:
2569 self.value_mask = value_mask
2570 else:
2571 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002572 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002573
2574 def pack(self):
2575 packed = []
2576 packed.append(struct.pack("!L", self.type_len))
2577 packed.append(struct.pack("!L", self.value))
2578 packed.append(struct.pack("!L", self.value_mask))
2579 return ''.join(packed)
2580
2581 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002582 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002583 obj = ipv6_flabel_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002584 _type_len = reader.read("!L")[0]
2585 assert(_type_len == 2147498248)
2586 obj.value = reader.read("!L")[0]
2587 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002588 return obj
2589
2590 def __eq__(self, other):
2591 if type(self) != type(other): return False
2592 if self.value != other.value: return False
2593 if self.value_mask != other.value_mask: return False
2594 return True
2595
Rich Lanec2ee4b82013-04-24 17:12:38 -07002596 def pretty_print(self, q):
2597 q.text("ipv6_flabel_masked {")
2598 with q.group():
2599 with q.indent(2):
2600 q.breakable()
2601 q.text("value = ");
2602 q.text("%#x" % self.value)
2603 q.text(","); q.breakable()
2604 q.text("value_mask = ");
2605 q.text("%#x" % self.value_mask)
2606 q.breakable()
2607 q.text('}')
2608
Rich Lane7dcdf022013-12-11 14:45:27 -08002609oxm.subtypes[2147498248] = ipv6_flabel_masked
2610
2611class ipv6_nd_sll(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002612 type_len = 2147500038
Rich Lanec2ee4b82013-04-24 17:12:38 -07002613
2614 def __init__(self, value=None):
2615 if value != None:
2616 self.value = value
2617 else:
2618 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002619 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002620
2621 def pack(self):
2622 packed = []
2623 packed.append(struct.pack("!L", self.type_len))
2624 packed.append(struct.pack("!6B", *self.value))
2625 return ''.join(packed)
2626
2627 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002628 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002629 obj = ipv6_nd_sll()
Dan Talaycof6202252013-07-02 01:00:29 -07002630 _type_len = reader.read("!L")[0]
2631 assert(_type_len == 2147500038)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002632 obj.value = list(reader.read('!6B'))
2633 return obj
2634
2635 def __eq__(self, other):
2636 if type(self) != type(other): return False
2637 if self.value != other.value: return False
2638 return True
2639
Rich Lanec2ee4b82013-04-24 17:12:38 -07002640 def pretty_print(self, q):
2641 q.text("ipv6_nd_sll {")
2642 with q.group():
2643 with q.indent(2):
2644 q.breakable()
2645 q.text("value = ");
2646 q.text(util.pretty_mac(self.value))
2647 q.breakable()
2648 q.text('}')
2649
Rich Lane7dcdf022013-12-11 14:45:27 -08002650oxm.subtypes[2147500038] = ipv6_nd_sll
2651
2652class ipv6_nd_sll_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002653 type_len = 2147500300
Rich Lanec2ee4b82013-04-24 17:12:38 -07002654
2655 def __init__(self, value=None, value_mask=None):
2656 if value != None:
2657 self.value = value
2658 else:
2659 self.value = [0,0,0,0,0,0]
2660 if value_mask != None:
2661 self.value_mask = value_mask
2662 else:
2663 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002664 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002665
2666 def pack(self):
2667 packed = []
2668 packed.append(struct.pack("!L", self.type_len))
2669 packed.append(struct.pack("!6B", *self.value))
2670 packed.append(struct.pack("!6B", *self.value_mask))
2671 return ''.join(packed)
2672
2673 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002674 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002675 obj = ipv6_nd_sll_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002676 _type_len = reader.read("!L")[0]
2677 assert(_type_len == 2147500300)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002678 obj.value = list(reader.read('!6B'))
2679 obj.value_mask = list(reader.read('!6B'))
2680 return obj
2681
2682 def __eq__(self, other):
2683 if type(self) != type(other): return False
2684 if self.value != other.value: return False
2685 if self.value_mask != other.value_mask: return False
2686 return True
2687
Rich Lanec2ee4b82013-04-24 17:12:38 -07002688 def pretty_print(self, q):
2689 q.text("ipv6_nd_sll_masked {")
2690 with q.group():
2691 with q.indent(2):
2692 q.breakable()
2693 q.text("value = ");
2694 q.text(util.pretty_mac(self.value))
2695 q.text(","); q.breakable()
2696 q.text("value_mask = ");
2697 q.text(util.pretty_mac(self.value_mask))
2698 q.breakable()
2699 q.text('}')
2700
Rich Lane7dcdf022013-12-11 14:45:27 -08002701oxm.subtypes[2147500300] = ipv6_nd_sll_masked
2702
2703class ipv6_nd_target(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002704 type_len = 2147499536
Rich Lanec2ee4b82013-04-24 17:12:38 -07002705
2706 def __init__(self, value=None):
2707 if value != None:
2708 self.value = value
2709 else:
2710 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 -08002711 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002712
2713 def pack(self):
2714 packed = []
2715 packed.append(struct.pack("!L", self.type_len))
2716 packed.append(struct.pack("!16s", self.value))
2717 return ''.join(packed)
2718
2719 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002720 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002721 obj = ipv6_nd_target()
Dan Talaycof6202252013-07-02 01:00:29 -07002722 _type_len = reader.read("!L")[0]
2723 assert(_type_len == 2147499536)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002724 obj.value = reader.read('!16s')[0]
2725 return obj
2726
2727 def __eq__(self, other):
2728 if type(self) != type(other): return False
2729 if self.value != other.value: return False
2730 return True
2731
Rich Lanec2ee4b82013-04-24 17:12:38 -07002732 def pretty_print(self, q):
2733 q.text("ipv6_nd_target {")
2734 with q.group():
2735 with q.indent(2):
2736 q.breakable()
2737 q.text("value = ");
2738 q.pp(self.value)
2739 q.breakable()
2740 q.text('}')
2741
Rich Lane7dcdf022013-12-11 14:45:27 -08002742oxm.subtypes[2147499536] = ipv6_nd_target
2743
2744class ipv6_nd_target_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002745 type_len = 2147499808
Rich Lanec2ee4b82013-04-24 17:12:38 -07002746
2747 def __init__(self, value=None, value_mask=None):
2748 if value != None:
2749 self.value = value
2750 else:
2751 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2752 if value_mask != None:
2753 self.value_mask = value_mask
2754 else:
2755 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 -08002756 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002757
2758 def pack(self):
2759 packed = []
2760 packed.append(struct.pack("!L", self.type_len))
2761 packed.append(struct.pack("!16s", self.value))
2762 packed.append(struct.pack("!16s", self.value_mask))
2763 return ''.join(packed)
2764
2765 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002766 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002767 obj = ipv6_nd_target_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002768 _type_len = reader.read("!L")[0]
2769 assert(_type_len == 2147499808)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002770 obj.value = reader.read('!16s')[0]
2771 obj.value_mask = reader.read('!16s')[0]
2772 return obj
2773
2774 def __eq__(self, other):
2775 if type(self) != type(other): return False
2776 if self.value != other.value: return False
2777 if self.value_mask != other.value_mask: return False
2778 return True
2779
Rich Lanec2ee4b82013-04-24 17:12:38 -07002780 def pretty_print(self, q):
2781 q.text("ipv6_nd_target_masked {")
2782 with q.group():
2783 with q.indent(2):
2784 q.breakable()
2785 q.text("value = ");
2786 q.pp(self.value)
2787 q.text(","); q.breakable()
2788 q.text("value_mask = ");
2789 q.pp(self.value_mask)
2790 q.breakable()
2791 q.text('}')
2792
Rich Lane7dcdf022013-12-11 14:45:27 -08002793oxm.subtypes[2147499808] = ipv6_nd_target_masked
2794
2795class ipv6_nd_tll(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002796 type_len = 2147500550
Rich Lanec2ee4b82013-04-24 17:12:38 -07002797
2798 def __init__(self, value=None):
2799 if value != None:
2800 self.value = value
2801 else:
2802 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002803 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002804
2805 def pack(self):
2806 packed = []
2807 packed.append(struct.pack("!L", self.type_len))
2808 packed.append(struct.pack("!6B", *self.value))
2809 return ''.join(packed)
2810
2811 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002812 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002813 obj = ipv6_nd_tll()
Dan Talaycof6202252013-07-02 01:00:29 -07002814 _type_len = reader.read("!L")[0]
2815 assert(_type_len == 2147500550)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002816 obj.value = list(reader.read('!6B'))
2817 return obj
2818
2819 def __eq__(self, other):
2820 if type(self) != type(other): return False
2821 if self.value != other.value: return False
2822 return True
2823
Rich Lanec2ee4b82013-04-24 17:12:38 -07002824 def pretty_print(self, q):
2825 q.text("ipv6_nd_tll {")
2826 with q.group():
2827 with q.indent(2):
2828 q.breakable()
2829 q.text("value = ");
2830 q.text(util.pretty_mac(self.value))
2831 q.breakable()
2832 q.text('}')
2833
Rich Lane7dcdf022013-12-11 14:45:27 -08002834oxm.subtypes[2147500550] = ipv6_nd_tll
2835
2836class ipv6_nd_tll_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002837 type_len = 2147500812
Rich Lanec2ee4b82013-04-24 17:12:38 -07002838
2839 def __init__(self, value=None, value_mask=None):
2840 if value != None:
2841 self.value = value
2842 else:
2843 self.value = [0,0,0,0,0,0]
2844 if value_mask != None:
2845 self.value_mask = value_mask
2846 else:
2847 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002848 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002849
2850 def pack(self):
2851 packed = []
2852 packed.append(struct.pack("!L", self.type_len))
2853 packed.append(struct.pack("!6B", *self.value))
2854 packed.append(struct.pack("!6B", *self.value_mask))
2855 return ''.join(packed)
2856
2857 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002858 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002859 obj = ipv6_nd_tll_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002860 _type_len = reader.read("!L")[0]
2861 assert(_type_len == 2147500812)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002862 obj.value = list(reader.read('!6B'))
2863 obj.value_mask = list(reader.read('!6B'))
2864 return obj
2865
2866 def __eq__(self, other):
2867 if type(self) != type(other): return False
2868 if self.value != other.value: return False
2869 if self.value_mask != other.value_mask: return False
2870 return True
2871
Rich Lanec2ee4b82013-04-24 17:12:38 -07002872 def pretty_print(self, q):
2873 q.text("ipv6_nd_tll_masked {")
2874 with q.group():
2875 with q.indent(2):
2876 q.breakable()
2877 q.text("value = ");
2878 q.text(util.pretty_mac(self.value))
2879 q.text(","); q.breakable()
2880 q.text("value_mask = ");
2881 q.text(util.pretty_mac(self.value_mask))
2882 q.breakable()
2883 q.text('}')
2884
Rich Lane7dcdf022013-12-11 14:45:27 -08002885oxm.subtypes[2147500812] = ipv6_nd_tll_masked
2886
2887class ipv6_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002888 type_len = 2147496976
Rich Lanec2ee4b82013-04-24 17:12:38 -07002889
2890 def __init__(self, value=None):
2891 if value != None:
2892 self.value = value
2893 else:
2894 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 -08002895 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002896
2897 def pack(self):
2898 packed = []
2899 packed.append(struct.pack("!L", self.type_len))
2900 packed.append(struct.pack("!16s", self.value))
2901 return ''.join(packed)
2902
2903 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002904 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002905 obj = ipv6_src()
Dan Talaycof6202252013-07-02 01:00:29 -07002906 _type_len = reader.read("!L")[0]
2907 assert(_type_len == 2147496976)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002908 obj.value = reader.read('!16s')[0]
2909 return obj
2910
2911 def __eq__(self, other):
2912 if type(self) != type(other): return False
2913 if self.value != other.value: return False
2914 return True
2915
Rich Lanec2ee4b82013-04-24 17:12:38 -07002916 def pretty_print(self, q):
2917 q.text("ipv6_src {")
2918 with q.group():
2919 with q.indent(2):
2920 q.breakable()
2921 q.text("value = ");
2922 q.pp(self.value)
2923 q.breakable()
2924 q.text('}')
2925
Rich Lane7dcdf022013-12-11 14:45:27 -08002926oxm.subtypes[2147496976] = ipv6_src
2927
2928class ipv6_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002929 type_len = 2147497248
Rich Lanec2ee4b82013-04-24 17:12:38 -07002930
2931 def __init__(self, value=None, value_mask=None):
2932 if value != None:
2933 self.value = value
2934 else:
2935 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2936 if value_mask != None:
2937 self.value_mask = value_mask
2938 else:
2939 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 -08002940 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002941
2942 def pack(self):
2943 packed = []
2944 packed.append(struct.pack("!L", self.type_len))
2945 packed.append(struct.pack("!16s", self.value))
2946 packed.append(struct.pack("!16s", self.value_mask))
2947 return ''.join(packed)
2948
2949 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002950 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002951 obj = ipv6_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002952 _type_len = reader.read("!L")[0]
2953 assert(_type_len == 2147497248)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002954 obj.value = reader.read('!16s')[0]
2955 obj.value_mask = reader.read('!16s')[0]
2956 return obj
2957
2958 def __eq__(self, other):
2959 if type(self) != type(other): return False
2960 if self.value != other.value: return False
2961 if self.value_mask != other.value_mask: return False
2962 return True
2963
Rich Lanec2ee4b82013-04-24 17:12:38 -07002964 def pretty_print(self, q):
2965 q.text("ipv6_src_masked {")
2966 with q.group():
2967 with q.indent(2):
2968 q.breakable()
2969 q.text("value = ");
2970 q.pp(self.value)
2971 q.text(","); q.breakable()
2972 q.text("value_mask = ");
2973 q.pp(self.value_mask)
2974 q.breakable()
2975 q.text('}')
2976
Rich Lane7dcdf022013-12-11 14:45:27 -08002977oxm.subtypes[2147497248] = ipv6_src_masked
2978
2979class metadata(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002980 type_len = 2147484680
Rich Lanec2ee4b82013-04-24 17:12:38 -07002981
2982 def __init__(self, value=None):
2983 if value != None:
2984 self.value = value
2985 else:
2986 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002987 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002988
2989 def pack(self):
2990 packed = []
2991 packed.append(struct.pack("!L", self.type_len))
2992 packed.append(struct.pack("!Q", self.value))
2993 return ''.join(packed)
2994
2995 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002996 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002997 obj = metadata()
Dan Talaycof6202252013-07-02 01:00:29 -07002998 _type_len = reader.read("!L")[0]
2999 assert(_type_len == 2147484680)
3000 obj.value = reader.read("!Q")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003001 return obj
3002
3003 def __eq__(self, other):
3004 if type(self) != type(other): return False
3005 if self.value != other.value: return False
3006 return True
3007
Rich Lanec2ee4b82013-04-24 17:12:38 -07003008 def pretty_print(self, q):
3009 q.text("metadata {")
3010 with q.group():
3011 with q.indent(2):
3012 q.breakable()
3013 q.text("value = ");
3014 q.text("%#x" % self.value)
3015 q.breakable()
3016 q.text('}')
3017
Rich Lane7dcdf022013-12-11 14:45:27 -08003018oxm.subtypes[2147484680] = metadata
3019
3020class metadata_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003021 type_len = 2147484944
Rich Lanec2ee4b82013-04-24 17:12:38 -07003022
3023 def __init__(self, value=None, value_mask=None):
3024 if value != None:
3025 self.value = value
3026 else:
3027 self.value = 0
3028 if value_mask != None:
3029 self.value_mask = value_mask
3030 else:
3031 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003032 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003033
3034 def pack(self):
3035 packed = []
3036 packed.append(struct.pack("!L", self.type_len))
3037 packed.append(struct.pack("!Q", self.value))
3038 packed.append(struct.pack("!Q", self.value_mask))
3039 return ''.join(packed)
3040
3041 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003042 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003043 obj = metadata_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003044 _type_len = reader.read("!L")[0]
3045 assert(_type_len == 2147484944)
3046 obj.value = reader.read("!Q")[0]
3047 obj.value_mask = reader.read("!Q")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003048 return obj
3049
3050 def __eq__(self, other):
3051 if type(self) != type(other): return False
3052 if self.value != other.value: return False
3053 if self.value_mask != other.value_mask: return False
3054 return True
3055
Rich Lanec2ee4b82013-04-24 17:12:38 -07003056 def pretty_print(self, q):
3057 q.text("metadata_masked {")
3058 with q.group():
3059 with q.indent(2):
3060 q.breakable()
3061 q.text("value = ");
3062 q.text("%#x" % self.value)
3063 q.text(","); q.breakable()
3064 q.text("value_mask = ");
3065 q.text("%#x" % self.value_mask)
3066 q.breakable()
3067 q.text('}')
3068
Rich Lane7dcdf022013-12-11 14:45:27 -08003069oxm.subtypes[2147484944] = metadata_masked
3070
3071class mpls_label(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003072 type_len = 2147501060
Rich Lanec2ee4b82013-04-24 17:12:38 -07003073
3074 def __init__(self, value=None):
3075 if value != None:
3076 self.value = value
3077 else:
3078 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003079 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003080
3081 def pack(self):
3082 packed = []
3083 packed.append(struct.pack("!L", self.type_len))
3084 packed.append(struct.pack("!L", self.value))
3085 return ''.join(packed)
3086
3087 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003088 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003089 obj = mpls_label()
Dan Talaycof6202252013-07-02 01:00:29 -07003090 _type_len = reader.read("!L")[0]
3091 assert(_type_len == 2147501060)
3092 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003093 return obj
3094
3095 def __eq__(self, other):
3096 if type(self) != type(other): return False
3097 if self.value != other.value: return False
3098 return True
3099
Rich Lanec2ee4b82013-04-24 17:12:38 -07003100 def pretty_print(self, q):
3101 q.text("mpls_label {")
3102 with q.group():
3103 with q.indent(2):
3104 q.breakable()
3105 q.text("value = ");
3106 q.text("%#x" % self.value)
3107 q.breakable()
3108 q.text('}')
3109
Rich Lane7dcdf022013-12-11 14:45:27 -08003110oxm.subtypes[2147501060] = mpls_label
3111
3112class mpls_label_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003113 type_len = 2147501320
Rich Lanec2ee4b82013-04-24 17:12:38 -07003114
3115 def __init__(self, value=None, value_mask=None):
3116 if value != None:
3117 self.value = value
3118 else:
3119 self.value = 0
3120 if value_mask != None:
3121 self.value_mask = value_mask
3122 else:
3123 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003124 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003125
3126 def pack(self):
3127 packed = []
3128 packed.append(struct.pack("!L", self.type_len))
3129 packed.append(struct.pack("!L", self.value))
3130 packed.append(struct.pack("!L", self.value_mask))
3131 return ''.join(packed)
3132
3133 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003134 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003135 obj = mpls_label_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003136 _type_len = reader.read("!L")[0]
3137 assert(_type_len == 2147501320)
3138 obj.value = reader.read("!L")[0]
3139 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003140 return obj
3141
3142 def __eq__(self, other):
3143 if type(self) != type(other): return False
3144 if self.value != other.value: return False
3145 if self.value_mask != other.value_mask: return False
3146 return True
3147
Rich Lanec2ee4b82013-04-24 17:12:38 -07003148 def pretty_print(self, q):
3149 q.text("mpls_label_masked {")
3150 with q.group():
3151 with q.indent(2):
3152 q.breakable()
3153 q.text("value = ");
3154 q.text("%#x" % self.value)
3155 q.text(","); q.breakable()
3156 q.text("value_mask = ");
3157 q.text("%#x" % self.value_mask)
3158 q.breakable()
3159 q.text('}')
3160
Rich Lane7dcdf022013-12-11 14:45:27 -08003161oxm.subtypes[2147501320] = mpls_label_masked
3162
3163class mpls_tc(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003164 type_len = 2147501569
Rich Lanec2ee4b82013-04-24 17:12:38 -07003165
3166 def __init__(self, value=None):
3167 if value != None:
3168 self.value = value
3169 else:
3170 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003171 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003172
3173 def pack(self):
3174 packed = []
3175 packed.append(struct.pack("!L", self.type_len))
3176 packed.append(struct.pack("!B", self.value))
3177 return ''.join(packed)
3178
3179 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003180 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003181 obj = mpls_tc()
Dan Talaycof6202252013-07-02 01:00:29 -07003182 _type_len = reader.read("!L")[0]
3183 assert(_type_len == 2147501569)
3184 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003185 return obj
3186
3187 def __eq__(self, other):
3188 if type(self) != type(other): return False
3189 if self.value != other.value: return False
3190 return True
3191
Rich Lanec2ee4b82013-04-24 17:12:38 -07003192 def pretty_print(self, q):
3193 q.text("mpls_tc {")
3194 with q.group():
3195 with q.indent(2):
3196 q.breakable()
3197 q.text("value = ");
3198 q.text("%#x" % self.value)
3199 q.breakable()
3200 q.text('}')
3201
Rich Lane7dcdf022013-12-11 14:45:27 -08003202oxm.subtypes[2147501569] = mpls_tc
3203
3204class mpls_tc_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003205 type_len = 2147501826
Rich Lanec2ee4b82013-04-24 17:12:38 -07003206
3207 def __init__(self, value=None, value_mask=None):
3208 if value != None:
3209 self.value = value
3210 else:
3211 self.value = 0
3212 if value_mask != None:
3213 self.value_mask = value_mask
3214 else:
3215 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003216 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003217
3218 def pack(self):
3219 packed = []
3220 packed.append(struct.pack("!L", self.type_len))
3221 packed.append(struct.pack("!B", self.value))
3222 packed.append(struct.pack("!B", self.value_mask))
3223 return ''.join(packed)
3224
3225 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003226 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003227 obj = mpls_tc_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003228 _type_len = reader.read("!L")[0]
3229 assert(_type_len == 2147501826)
3230 obj.value = reader.read("!B")[0]
3231 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003232 return obj
3233
3234 def __eq__(self, other):
3235 if type(self) != type(other): return False
3236 if self.value != other.value: return False
3237 if self.value_mask != other.value_mask: return False
3238 return True
3239
Rich Lanec2ee4b82013-04-24 17:12:38 -07003240 def pretty_print(self, q):
3241 q.text("mpls_tc_masked {")
3242 with q.group():
3243 with q.indent(2):
3244 q.breakable()
3245 q.text("value = ");
3246 q.text("%#x" % self.value)
3247 q.text(","); q.breakable()
3248 q.text("value_mask = ");
3249 q.text("%#x" % self.value_mask)
3250 q.breakable()
3251 q.text('}')
3252
Rich Lane7dcdf022013-12-11 14:45:27 -08003253oxm.subtypes[2147501826] = mpls_tc_masked
3254
3255class sctp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003256 type_len = 2147492866
Rich Lanec2ee4b82013-04-24 17:12:38 -07003257
3258 def __init__(self, value=None):
3259 if value != None:
3260 self.value = value
3261 else:
3262 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003263 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003264
3265 def pack(self):
3266 packed = []
3267 packed.append(struct.pack("!L", self.type_len))
3268 packed.append(struct.pack("!H", self.value))
3269 return ''.join(packed)
3270
3271 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003272 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003273 obj = sctp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003274 _type_len = reader.read("!L")[0]
3275 assert(_type_len == 2147492866)
3276 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003277 return obj
3278
3279 def __eq__(self, other):
3280 if type(self) != type(other): return False
3281 if self.value != other.value: return False
3282 return True
3283
Rich Lanec2ee4b82013-04-24 17:12:38 -07003284 def pretty_print(self, q):
3285 q.text("sctp_dst {")
3286 with q.group():
3287 with q.indent(2):
3288 q.breakable()
3289 q.text("value = ");
3290 q.text("%#x" % self.value)
3291 q.breakable()
3292 q.text('}')
3293
Rich Lane7dcdf022013-12-11 14:45:27 -08003294oxm.subtypes[2147492866] = sctp_dst
3295
3296class sctp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003297 type_len = 2147493124
Rich Lanec2ee4b82013-04-24 17:12:38 -07003298
3299 def __init__(self, value=None, value_mask=None):
3300 if value != None:
3301 self.value = value
3302 else:
3303 self.value = 0
3304 if value_mask != None:
3305 self.value_mask = value_mask
3306 else:
3307 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003308 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003309
3310 def pack(self):
3311 packed = []
3312 packed.append(struct.pack("!L", self.type_len))
3313 packed.append(struct.pack("!H", self.value))
3314 packed.append(struct.pack("!H", self.value_mask))
3315 return ''.join(packed)
3316
3317 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003318 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003319 obj = sctp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003320 _type_len = reader.read("!L")[0]
3321 assert(_type_len == 2147493124)
3322 obj.value = reader.read("!H")[0]
3323 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003324 return obj
3325
3326 def __eq__(self, other):
3327 if type(self) != type(other): return False
3328 if self.value != other.value: return False
3329 if self.value_mask != other.value_mask: return False
3330 return True
3331
Rich Lanec2ee4b82013-04-24 17:12:38 -07003332 def pretty_print(self, q):
3333 q.text("sctp_dst_masked {")
3334 with q.group():
3335 with q.indent(2):
3336 q.breakable()
3337 q.text("value = ");
3338 q.text("%#x" % self.value)
3339 q.text(","); q.breakable()
3340 q.text("value_mask = ");
3341 q.text("%#x" % self.value_mask)
3342 q.breakable()
3343 q.text('}')
3344
Rich Lane7dcdf022013-12-11 14:45:27 -08003345oxm.subtypes[2147493124] = sctp_dst_masked
3346
3347class sctp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003348 type_len = 2147492354
Rich Lanec2ee4b82013-04-24 17:12:38 -07003349
3350 def __init__(self, value=None):
3351 if value != None:
3352 self.value = value
3353 else:
3354 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003355 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003356
3357 def pack(self):
3358 packed = []
3359 packed.append(struct.pack("!L", self.type_len))
3360 packed.append(struct.pack("!H", self.value))
3361 return ''.join(packed)
3362
3363 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003364 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003365 obj = sctp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07003366 _type_len = reader.read("!L")[0]
3367 assert(_type_len == 2147492354)
3368 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003369 return obj
3370
3371 def __eq__(self, other):
3372 if type(self) != type(other): return False
3373 if self.value != other.value: return False
3374 return True
3375
Rich Lanec2ee4b82013-04-24 17:12:38 -07003376 def pretty_print(self, q):
3377 q.text("sctp_src {")
3378 with q.group():
3379 with q.indent(2):
3380 q.breakable()
3381 q.text("value = ");
3382 q.text("%#x" % self.value)
3383 q.breakable()
3384 q.text('}')
3385
Rich Lane7dcdf022013-12-11 14:45:27 -08003386oxm.subtypes[2147492354] = sctp_src
3387
3388class sctp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003389 type_len = 2147492612
Rich Lanec2ee4b82013-04-24 17:12:38 -07003390
3391 def __init__(self, value=None, value_mask=None):
3392 if value != None:
3393 self.value = value
3394 else:
3395 self.value = 0
3396 if value_mask != None:
3397 self.value_mask = value_mask
3398 else:
3399 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003400 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003401
3402 def pack(self):
3403 packed = []
3404 packed.append(struct.pack("!L", self.type_len))
3405 packed.append(struct.pack("!H", self.value))
3406 packed.append(struct.pack("!H", self.value_mask))
3407 return ''.join(packed)
3408
3409 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003410 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003411 obj = sctp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003412 _type_len = reader.read("!L")[0]
3413 assert(_type_len == 2147492612)
3414 obj.value = reader.read("!H")[0]
3415 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003416 return obj
3417
3418 def __eq__(self, other):
3419 if type(self) != type(other): return False
3420 if self.value != other.value: return False
3421 if self.value_mask != other.value_mask: return False
3422 return True
3423
Rich Lanec2ee4b82013-04-24 17:12:38 -07003424 def pretty_print(self, q):
3425 q.text("sctp_src_masked {")
3426 with q.group():
3427 with q.indent(2):
3428 q.breakable()
3429 q.text("value = ");
3430 q.text("%#x" % self.value)
3431 q.text(","); q.breakable()
3432 q.text("value_mask = ");
3433 q.text("%#x" % self.value_mask)
3434 q.breakable()
3435 q.text('}')
3436
Rich Lane7dcdf022013-12-11 14:45:27 -08003437oxm.subtypes[2147492612] = sctp_src_masked
3438
3439class tcp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003440 type_len = 2147490818
Rich Lanec2ee4b82013-04-24 17:12:38 -07003441
3442 def __init__(self, value=None):
3443 if value != None:
3444 self.value = value
3445 else:
3446 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003447 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003448
3449 def pack(self):
3450 packed = []
3451 packed.append(struct.pack("!L", self.type_len))
3452 packed.append(struct.pack("!H", self.value))
3453 return ''.join(packed)
3454
3455 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003456 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003457 obj = tcp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003458 _type_len = reader.read("!L")[0]
3459 assert(_type_len == 2147490818)
3460 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003461 return obj
3462
3463 def __eq__(self, other):
3464 if type(self) != type(other): return False
3465 if self.value != other.value: return False
3466 return True
3467
Rich Lanec2ee4b82013-04-24 17:12:38 -07003468 def pretty_print(self, q):
3469 q.text("tcp_dst {")
3470 with q.group():
3471 with q.indent(2):
3472 q.breakable()
3473 q.text("value = ");
3474 q.text("%#x" % self.value)
3475 q.breakable()
3476 q.text('}')
3477
Rich Lane7dcdf022013-12-11 14:45:27 -08003478oxm.subtypes[2147490818] = tcp_dst
3479
3480class tcp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003481 type_len = 2147491076
Rich Lanec2ee4b82013-04-24 17:12:38 -07003482
3483 def __init__(self, value=None, value_mask=None):
3484 if value != None:
3485 self.value = value
3486 else:
3487 self.value = 0
3488 if value_mask != None:
3489 self.value_mask = value_mask
3490 else:
3491 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003492 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003493
3494 def pack(self):
3495 packed = []
3496 packed.append(struct.pack("!L", self.type_len))
3497 packed.append(struct.pack("!H", self.value))
3498 packed.append(struct.pack("!H", self.value_mask))
3499 return ''.join(packed)
3500
3501 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003502 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003503 obj = tcp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003504 _type_len = reader.read("!L")[0]
3505 assert(_type_len == 2147491076)
3506 obj.value = reader.read("!H")[0]
3507 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003508 return obj
3509
3510 def __eq__(self, other):
3511 if type(self) != type(other): return False
3512 if self.value != other.value: return False
3513 if self.value_mask != other.value_mask: return False
3514 return True
3515
Rich Lanec2ee4b82013-04-24 17:12:38 -07003516 def pretty_print(self, q):
3517 q.text("tcp_dst_masked {")
3518 with q.group():
3519 with q.indent(2):
3520 q.breakable()
3521 q.text("value = ");
3522 q.text("%#x" % self.value)
3523 q.text(","); q.breakable()
3524 q.text("value_mask = ");
3525 q.text("%#x" % self.value_mask)
3526 q.breakable()
3527 q.text('}')
3528
Rich Lane7dcdf022013-12-11 14:45:27 -08003529oxm.subtypes[2147491076] = tcp_dst_masked
3530
3531class tcp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003532 type_len = 2147490306
Rich Lanec2ee4b82013-04-24 17:12:38 -07003533
3534 def __init__(self, value=None):
3535 if value != None:
3536 self.value = value
3537 else:
3538 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003539 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003540
3541 def pack(self):
3542 packed = []
3543 packed.append(struct.pack("!L", self.type_len))
3544 packed.append(struct.pack("!H", self.value))
3545 return ''.join(packed)
3546
3547 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003548 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003549 obj = tcp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07003550 _type_len = reader.read("!L")[0]
3551 assert(_type_len == 2147490306)
3552 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003553 return obj
3554
3555 def __eq__(self, other):
3556 if type(self) != type(other): return False
3557 if self.value != other.value: return False
3558 return True
3559
Rich Lanec2ee4b82013-04-24 17:12:38 -07003560 def pretty_print(self, q):
3561 q.text("tcp_src {")
3562 with q.group():
3563 with q.indent(2):
3564 q.breakable()
3565 q.text("value = ");
3566 q.text("%#x" % self.value)
3567 q.breakable()
3568 q.text('}')
3569
Rich Lane7dcdf022013-12-11 14:45:27 -08003570oxm.subtypes[2147490306] = tcp_src
3571
3572class tcp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003573 type_len = 2147490564
Rich Lanec2ee4b82013-04-24 17:12:38 -07003574
3575 def __init__(self, value=None, value_mask=None):
3576 if value != None:
3577 self.value = value
3578 else:
3579 self.value = 0
3580 if value_mask != None:
3581 self.value_mask = value_mask
3582 else:
3583 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003584 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003585
3586 def pack(self):
3587 packed = []
3588 packed.append(struct.pack("!L", self.type_len))
3589 packed.append(struct.pack("!H", self.value))
3590 packed.append(struct.pack("!H", self.value_mask))
3591 return ''.join(packed)
3592
3593 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003594 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003595 obj = tcp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003596 _type_len = reader.read("!L")[0]
3597 assert(_type_len == 2147490564)
3598 obj.value = reader.read("!H")[0]
3599 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003600 return obj
3601
3602 def __eq__(self, other):
3603 if type(self) != type(other): return False
3604 if self.value != other.value: return False
3605 if self.value_mask != other.value_mask: return False
3606 return True
3607
Rich Lanec2ee4b82013-04-24 17:12:38 -07003608 def pretty_print(self, q):
3609 q.text("tcp_src_masked {")
3610 with q.group():
3611 with q.indent(2):
3612 q.breakable()
3613 q.text("value = ");
3614 q.text("%#x" % self.value)
3615 q.text(","); q.breakable()
3616 q.text("value_mask = ");
3617 q.text("%#x" % self.value_mask)
3618 q.breakable()
3619 q.text('}')
3620
Rich Lane7dcdf022013-12-11 14:45:27 -08003621oxm.subtypes[2147490564] = tcp_src_masked
3622
3623class udp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003624 type_len = 2147491842
Rich Lanec2ee4b82013-04-24 17:12:38 -07003625
3626 def __init__(self, value=None):
3627 if value != None:
3628 self.value = value
3629 else:
3630 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003631 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003632
3633 def pack(self):
3634 packed = []
3635 packed.append(struct.pack("!L", self.type_len))
3636 packed.append(struct.pack("!H", self.value))
3637 return ''.join(packed)
3638
3639 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003640 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003641 obj = udp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003642 _type_len = reader.read("!L")[0]
3643 assert(_type_len == 2147491842)
3644 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003645 return obj
3646
3647 def __eq__(self, other):
3648 if type(self) != type(other): return False
3649 if self.value != other.value: return False
3650 return True
3651
Rich Lanec2ee4b82013-04-24 17:12:38 -07003652 def pretty_print(self, q):
3653 q.text("udp_dst {")
3654 with q.group():
3655 with q.indent(2):
3656 q.breakable()
3657 q.text("value = ");
3658 q.text("%#x" % self.value)
3659 q.breakable()
3660 q.text('}')
3661
Rich Lane7dcdf022013-12-11 14:45:27 -08003662oxm.subtypes[2147491842] = udp_dst
3663
3664class udp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003665 type_len = 2147492100
Rich Lanec2ee4b82013-04-24 17:12:38 -07003666
3667 def __init__(self, value=None, value_mask=None):
3668 if value != None:
3669 self.value = value
3670 else:
3671 self.value = 0
3672 if value_mask != None:
3673 self.value_mask = value_mask
3674 else:
3675 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003676 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003677
3678 def pack(self):
3679 packed = []
3680 packed.append(struct.pack("!L", self.type_len))
3681 packed.append(struct.pack("!H", self.value))
3682 packed.append(struct.pack("!H", self.value_mask))
3683 return ''.join(packed)
3684
3685 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003686 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003687 obj = udp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003688 _type_len = reader.read("!L")[0]
3689 assert(_type_len == 2147492100)
3690 obj.value = reader.read("!H")[0]
3691 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003692 return obj
3693
3694 def __eq__(self, other):
3695 if type(self) != type(other): return False
3696 if self.value != other.value: return False
3697 if self.value_mask != other.value_mask: return False
3698 return True
3699
Rich Lanec2ee4b82013-04-24 17:12:38 -07003700 def pretty_print(self, q):
3701 q.text("udp_dst_masked {")
3702 with q.group():
3703 with q.indent(2):
3704 q.breakable()
3705 q.text("value = ");
3706 q.text("%#x" % self.value)
3707 q.text(","); q.breakable()
3708 q.text("value_mask = ");
3709 q.text("%#x" % self.value_mask)
3710 q.breakable()
3711 q.text('}')
3712
Rich Lane7dcdf022013-12-11 14:45:27 -08003713oxm.subtypes[2147492100] = udp_dst_masked
3714
3715class udp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003716 type_len = 2147491330
Rich Lanec2ee4b82013-04-24 17:12:38 -07003717
3718 def __init__(self, value=None):
3719 if value != None:
3720 self.value = value
3721 else:
3722 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003723 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003724
3725 def pack(self):
3726 packed = []
3727 packed.append(struct.pack("!L", self.type_len))
3728 packed.append(struct.pack("!H", self.value))
3729 return ''.join(packed)
3730
3731 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003732 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003733 obj = udp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07003734 _type_len = reader.read("!L")[0]
3735 assert(_type_len == 2147491330)
3736 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003737 return obj
3738
3739 def __eq__(self, other):
3740 if type(self) != type(other): return False
3741 if self.value != other.value: return False
3742 return True
3743
Rich Lanec2ee4b82013-04-24 17:12:38 -07003744 def pretty_print(self, q):
3745 q.text("udp_src {")
3746 with q.group():
3747 with q.indent(2):
3748 q.breakable()
3749 q.text("value = ");
3750 q.text("%#x" % self.value)
3751 q.breakable()
3752 q.text('}')
3753
Rich Lane7dcdf022013-12-11 14:45:27 -08003754oxm.subtypes[2147491330] = udp_src
3755
3756class udp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003757 type_len = 2147491588
Rich Lanec2ee4b82013-04-24 17:12:38 -07003758
3759 def __init__(self, value=None, value_mask=None):
3760 if value != None:
3761 self.value = value
3762 else:
3763 self.value = 0
3764 if value_mask != None:
3765 self.value_mask = value_mask
3766 else:
3767 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003768 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003769
3770 def pack(self):
3771 packed = []
3772 packed.append(struct.pack("!L", self.type_len))
3773 packed.append(struct.pack("!H", self.value))
3774 packed.append(struct.pack("!H", self.value_mask))
3775 return ''.join(packed)
3776
3777 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003778 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003779 obj = udp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003780 _type_len = reader.read("!L")[0]
3781 assert(_type_len == 2147491588)
3782 obj.value = reader.read("!H")[0]
3783 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003784 return obj
3785
3786 def __eq__(self, other):
3787 if type(self) != type(other): return False
3788 if self.value != other.value: return False
3789 if self.value_mask != other.value_mask: return False
3790 return True
3791
Rich Lanec2ee4b82013-04-24 17:12:38 -07003792 def pretty_print(self, q):
3793 q.text("udp_src_masked {")
3794 with q.group():
3795 with q.indent(2):
3796 q.breakable()
3797 q.text("value = ");
3798 q.text("%#x" % self.value)
3799 q.text(","); q.breakable()
3800 q.text("value_mask = ");
3801 q.text("%#x" % self.value_mask)
3802 q.breakable()
3803 q.text('}')
3804
Rich Lane7dcdf022013-12-11 14:45:27 -08003805oxm.subtypes[2147491588] = udp_src_masked
3806
3807class vlan_pcp(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003808 type_len = 2147487233
Rich Lanec2ee4b82013-04-24 17:12:38 -07003809
3810 def __init__(self, value=None):
3811 if value != None:
3812 self.value = value
3813 else:
3814 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003815 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003816
3817 def pack(self):
3818 packed = []
3819 packed.append(struct.pack("!L", self.type_len))
3820 packed.append(struct.pack("!B", self.value))
3821 return ''.join(packed)
3822
3823 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003824 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003825 obj = vlan_pcp()
Dan Talaycof6202252013-07-02 01:00:29 -07003826 _type_len = reader.read("!L")[0]
3827 assert(_type_len == 2147487233)
3828 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003829 return obj
3830
3831 def __eq__(self, other):
3832 if type(self) != type(other): return False
3833 if self.value != other.value: return False
3834 return True
3835
Rich Lanec2ee4b82013-04-24 17:12:38 -07003836 def pretty_print(self, q):
3837 q.text("vlan_pcp {")
3838 with q.group():
3839 with q.indent(2):
3840 q.breakable()
3841 q.text("value = ");
3842 q.text("%#x" % self.value)
3843 q.breakable()
3844 q.text('}')
3845
Rich Lane7dcdf022013-12-11 14:45:27 -08003846oxm.subtypes[2147487233] = vlan_pcp
3847
3848class vlan_pcp_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003849 type_len = 2147487490
Rich Lanec2ee4b82013-04-24 17:12:38 -07003850
3851 def __init__(self, value=None, value_mask=None):
3852 if value != None:
3853 self.value = value
3854 else:
3855 self.value = 0
3856 if value_mask != None:
3857 self.value_mask = value_mask
3858 else:
3859 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003860 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003861
3862 def pack(self):
3863 packed = []
3864 packed.append(struct.pack("!L", self.type_len))
3865 packed.append(struct.pack("!B", self.value))
3866 packed.append(struct.pack("!B", self.value_mask))
3867 return ''.join(packed)
3868
3869 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003870 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003871 obj = vlan_pcp_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003872 _type_len = reader.read("!L")[0]
3873 assert(_type_len == 2147487490)
3874 obj.value = reader.read("!B")[0]
3875 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003876 return obj
3877
3878 def __eq__(self, other):
3879 if type(self) != type(other): return False
3880 if self.value != other.value: return False
3881 if self.value_mask != other.value_mask: return False
3882 return True
3883
Rich Lanec2ee4b82013-04-24 17:12:38 -07003884 def pretty_print(self, q):
3885 q.text("vlan_pcp_masked {")
3886 with q.group():
3887 with q.indent(2):
3888 q.breakable()
3889 q.text("value = ");
3890 q.text("%#x" % self.value)
3891 q.text(","); q.breakable()
3892 q.text("value_mask = ");
3893 q.text("%#x" % self.value_mask)
3894 q.breakable()
3895 q.text('}')
3896
Rich Lane7dcdf022013-12-11 14:45:27 -08003897oxm.subtypes[2147487490] = vlan_pcp_masked
3898
3899class vlan_vid(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003900 type_len = 2147486722
Rich Lanec2ee4b82013-04-24 17:12:38 -07003901
3902 def __init__(self, value=None):
3903 if value != None:
3904 self.value = value
3905 else:
3906 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003907 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003908
3909 def pack(self):
3910 packed = []
3911 packed.append(struct.pack("!L", self.type_len))
3912 packed.append(struct.pack("!H", self.value))
3913 return ''.join(packed)
3914
3915 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003916 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003917 obj = vlan_vid()
Dan Talaycof6202252013-07-02 01:00:29 -07003918 _type_len = reader.read("!L")[0]
3919 assert(_type_len == 2147486722)
3920 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003921 return obj
3922
3923 def __eq__(self, other):
3924 if type(self) != type(other): return False
3925 if self.value != other.value: return False
3926 return True
3927
Rich Lanec2ee4b82013-04-24 17:12:38 -07003928 def pretty_print(self, q):
3929 q.text("vlan_vid {")
3930 with q.group():
3931 with q.indent(2):
3932 q.breakable()
3933 q.text("value = ");
3934 q.text("%#x" % self.value)
3935 q.breakable()
3936 q.text('}')
3937
Rich Lane7dcdf022013-12-11 14:45:27 -08003938oxm.subtypes[2147486722] = vlan_vid
3939
3940class vlan_vid_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003941 type_len = 2147486980
Rich Lanec2ee4b82013-04-24 17:12:38 -07003942
3943 def __init__(self, value=None, value_mask=None):
3944 if value != None:
3945 self.value = value
3946 else:
3947 self.value = 0
3948 if value_mask != None:
3949 self.value_mask = value_mask
3950 else:
3951 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003952 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003953
3954 def pack(self):
3955 packed = []
3956 packed.append(struct.pack("!L", self.type_len))
3957 packed.append(struct.pack("!H", self.value))
3958 packed.append(struct.pack("!H", self.value_mask))
3959 return ''.join(packed)
3960
3961 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003962 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003963 obj = vlan_vid_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003964 _type_len = reader.read("!L")[0]
3965 assert(_type_len == 2147486980)
3966 obj.value = reader.read("!H")[0]
3967 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003968 return obj
3969
3970 def __eq__(self, other):
3971 if type(self) != type(other): return False
3972 if self.value != other.value: return False
3973 if self.value_mask != other.value_mask: return False
3974 return True
3975
Rich Lanec2ee4b82013-04-24 17:12:38 -07003976 def pretty_print(self, q):
3977 q.text("vlan_vid_masked {")
3978 with q.group():
3979 with q.indent(2):
3980 q.breakable()
3981 q.text("value = ");
3982 q.text("%#x" % self.value)
3983 q.text(","); q.breakable()
3984 q.text("value_mask = ");
3985 q.text("%#x" % self.value_mask)
3986 q.breakable()
3987 q.text('}')
3988
Rich Lane7dcdf022013-12-11 14:45:27 -08003989oxm.subtypes[2147486980] = vlan_vid_masked
Rich Lanec2ee4b82013-04-24 17:12:38 -07003990
Rich Lane7dcdf022013-12-11 14:45:27 -08003991