blob: 65536e86d167efc3139e99d5b1d448fd7d4362ff [file] [log] [blame]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001# Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
2# Copyright (c) 2011, 2012 Open Networking Foundation
3# Copyright (c) 2012, 2013 Big Switch Networks, Inc.
Dan Talaycof6202252013-07-02 01:00:29 -07004# See the file LICENSE.pyloxi which should have been included in the source distribution
Rich Lanec2ee4b82013-04-24 17:12:38 -07005
Rich Lane7dcdf022013-12-11 14:45:27 -08006# Automatically generated by LOXI from template module.py
Rich Lanec2ee4b82013-04-24 17:12:38 -07007# Do not modify
8
9import struct
Rich Lane7dcdf022013-12-11 14:45:27 -080010import loxi
Rich Lanec2ee4b82013-04-24 17:12:38 -070011import const
Rich Lane7dcdf022013-12-11 14:45:27 -080012import common
13import action
14import instruction
15import oxm
16import action_id
17import instruction_id
18import meter_band
Rich Lane5454b682014-01-14 17:07:36 -080019import bsn_tlv
Rich Lanec2ee4b82013-04-24 17:12:38 -070020import util
21import loxi.generic_util
Rich Lanec2ee4b82013-04-24 17:12:38 -070022
Rich Lane7dcdf022013-12-11 14:45:27 -080023class oxm(loxi.OFObject):
24 subtypes = {}
Rich Laned53156a2013-08-05 17:17:33 -070025
Rich Lane95f7fc92014-01-27 17:08:16 -080026
27 def __init__(self, type_len=None):
28 if type_len != None:
29 self.type_len = type_len
30 else:
31 self.type_len = 0
32 return
33
34 def pack(self):
35 packed = []
36 packed.append(struct.pack("!L", self.type_len))
37 return ''.join(packed)
38
Rich Lane7dcdf022013-12-11 14:45:27 -080039 @staticmethod
40 def unpack(reader):
41 subtype, = reader.peek('!L', 0)
Rich Lane95f7fc92014-01-27 17:08:16 -080042 subclass = oxm.subtypes.get(subtype)
43 if subclass:
44 return subclass.unpack(reader)
45
46 obj = oxm()
47 obj.type_len = reader.read("!L")[0]
48 return obj
49
50 def __eq__(self, other):
51 if type(self) != type(other): return False
52 if self.type_len != other.type_len: return False
53 return True
54
55 def pretty_print(self, q):
56 q.text("oxm {")
57 with q.group():
58 with q.indent(2):
59 q.breakable()
60 q.breakable()
61 q.text('}')
Rich Lanec2ee4b82013-04-24 17:12:38 -070062
Rich Lanec2ee4b82013-04-24 17:12:38 -070063
Rich Lane7dcdf022013-12-11 14:45:27 -080064class arp_op(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -070065 type_len = 2147494402
Rich Lanec2ee4b82013-04-24 17:12:38 -070066
67 def __init__(self, value=None):
68 if value != None:
69 self.value = value
70 else:
71 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -080072 return
Rich Lanec2ee4b82013-04-24 17:12:38 -070073
74 def pack(self):
75 packed = []
76 packed.append(struct.pack("!L", self.type_len))
77 packed.append(struct.pack("!H", self.value))
78 return ''.join(packed)
79
80 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -080081 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -070082 obj = arp_op()
Dan Talaycof6202252013-07-02 01:00:29 -070083 _type_len = reader.read("!L")[0]
84 assert(_type_len == 2147494402)
85 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -070086 return obj
87
88 def __eq__(self, other):
89 if type(self) != type(other): return False
90 if self.value != other.value: return False
91 return True
92
Rich Lanec2ee4b82013-04-24 17:12:38 -070093 def pretty_print(self, q):
94 q.text("arp_op {")
95 with q.group():
96 with q.indent(2):
97 q.breakable()
98 q.text("value = ");
99 q.text("%#x" % self.value)
100 q.breakable()
101 q.text('}')
102
Rich Lane7dcdf022013-12-11 14:45:27 -0800103oxm.subtypes[2147494402] = arp_op
104
105class arp_op_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700106 type_len = 2147494660
Rich Lanec2ee4b82013-04-24 17:12:38 -0700107
108 def __init__(self, value=None, value_mask=None):
109 if value != None:
110 self.value = value
111 else:
112 self.value = 0
113 if value_mask != None:
114 self.value_mask = value_mask
115 else:
116 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800117 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700118
119 def pack(self):
120 packed = []
121 packed.append(struct.pack("!L", self.type_len))
122 packed.append(struct.pack("!H", self.value))
123 packed.append(struct.pack("!H", self.value_mask))
124 return ''.join(packed)
125
126 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800127 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700128 obj = arp_op_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700129 _type_len = reader.read("!L")[0]
130 assert(_type_len == 2147494660)
131 obj.value = reader.read("!H")[0]
132 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700133 return obj
134
135 def __eq__(self, other):
136 if type(self) != type(other): return False
137 if self.value != other.value: return False
138 if self.value_mask != other.value_mask: return False
139 return True
140
Rich Lanec2ee4b82013-04-24 17:12:38 -0700141 def pretty_print(self, q):
142 q.text("arp_op_masked {")
143 with q.group():
144 with q.indent(2):
145 q.breakable()
146 q.text("value = ");
147 q.text("%#x" % self.value)
148 q.text(","); q.breakable()
149 q.text("value_mask = ");
150 q.text("%#x" % self.value_mask)
151 q.breakable()
152 q.text('}')
153
Rich Lane7dcdf022013-12-11 14:45:27 -0800154oxm.subtypes[2147494660] = arp_op_masked
155
156class arp_sha(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700157 type_len = 2147495942
Rich Lanec2ee4b82013-04-24 17:12:38 -0700158
159 def __init__(self, value=None):
160 if value != None:
161 self.value = value
162 else:
163 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800164 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700165
166 def pack(self):
167 packed = []
168 packed.append(struct.pack("!L", self.type_len))
169 packed.append(struct.pack("!6B", *self.value))
170 return ''.join(packed)
171
172 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800173 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700174 obj = arp_sha()
Dan Talaycof6202252013-07-02 01:00:29 -0700175 _type_len = reader.read("!L")[0]
176 assert(_type_len == 2147495942)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700177 obj.value = list(reader.read('!6B'))
178 return obj
179
180 def __eq__(self, other):
181 if type(self) != type(other): return False
182 if self.value != other.value: return False
183 return True
184
Rich Lanec2ee4b82013-04-24 17:12:38 -0700185 def pretty_print(self, q):
186 q.text("arp_sha {")
187 with q.group():
188 with q.indent(2):
189 q.breakable()
190 q.text("value = ");
191 q.text(util.pretty_mac(self.value))
192 q.breakable()
193 q.text('}')
194
Rich Lane7dcdf022013-12-11 14:45:27 -0800195oxm.subtypes[2147495942] = arp_sha
196
197class arp_sha_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700198 type_len = 2147496204
Rich Lanec2ee4b82013-04-24 17:12:38 -0700199
200 def __init__(self, value=None, value_mask=None):
201 if value != None:
202 self.value = value
203 else:
204 self.value = [0,0,0,0,0,0]
205 if value_mask != None:
206 self.value_mask = value_mask
207 else:
208 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800209 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700210
211 def pack(self):
212 packed = []
213 packed.append(struct.pack("!L", self.type_len))
214 packed.append(struct.pack("!6B", *self.value))
215 packed.append(struct.pack("!6B", *self.value_mask))
216 return ''.join(packed)
217
218 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800219 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700220 obj = arp_sha_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700221 _type_len = reader.read("!L")[0]
222 assert(_type_len == 2147496204)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700223 obj.value = list(reader.read('!6B'))
224 obj.value_mask = list(reader.read('!6B'))
225 return obj
226
227 def __eq__(self, other):
228 if type(self) != type(other): return False
229 if self.value != other.value: return False
230 if self.value_mask != other.value_mask: return False
231 return True
232
Rich Lanec2ee4b82013-04-24 17:12:38 -0700233 def pretty_print(self, q):
234 q.text("arp_sha_masked {")
235 with q.group():
236 with q.indent(2):
237 q.breakable()
238 q.text("value = ");
239 q.text(util.pretty_mac(self.value))
240 q.text(","); q.breakable()
241 q.text("value_mask = ");
242 q.text(util.pretty_mac(self.value_mask))
243 q.breakable()
244 q.text('}')
245
Rich Lane7dcdf022013-12-11 14:45:27 -0800246oxm.subtypes[2147496204] = arp_sha_masked
247
248class arp_spa(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700249 type_len = 2147494916
Rich Lanec2ee4b82013-04-24 17:12:38 -0700250
251 def __init__(self, value=None):
252 if value != None:
253 self.value = value
254 else:
255 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800256 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700257
258 def pack(self):
259 packed = []
260 packed.append(struct.pack("!L", self.type_len))
261 packed.append(struct.pack("!L", self.value))
262 return ''.join(packed)
263
264 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800265 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700266 obj = arp_spa()
Dan Talaycof6202252013-07-02 01:00:29 -0700267 _type_len = reader.read("!L")[0]
268 assert(_type_len == 2147494916)
269 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700270 return obj
271
272 def __eq__(self, other):
273 if type(self) != type(other): return False
274 if self.value != other.value: return False
275 return True
276
Rich Lanec2ee4b82013-04-24 17:12:38 -0700277 def pretty_print(self, q):
278 q.text("arp_spa {")
279 with q.group():
280 with q.indent(2):
281 q.breakable()
282 q.text("value = ");
283 q.text("%#x" % self.value)
284 q.breakable()
285 q.text('}')
286
Rich Lane7dcdf022013-12-11 14:45:27 -0800287oxm.subtypes[2147494916] = arp_spa
288
289class arp_spa_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700290 type_len = 2147495176
Rich Lanec2ee4b82013-04-24 17:12:38 -0700291
292 def __init__(self, value=None, value_mask=None):
293 if value != None:
294 self.value = value
295 else:
296 self.value = 0
297 if value_mask != None:
298 self.value_mask = value_mask
299 else:
300 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800301 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700302
303 def pack(self):
304 packed = []
305 packed.append(struct.pack("!L", self.type_len))
306 packed.append(struct.pack("!L", self.value))
307 packed.append(struct.pack("!L", self.value_mask))
308 return ''.join(packed)
309
310 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800311 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700312 obj = arp_spa_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700313 _type_len = reader.read("!L")[0]
314 assert(_type_len == 2147495176)
315 obj.value = reader.read("!L")[0]
316 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700317 return obj
318
319 def __eq__(self, other):
320 if type(self) != type(other): return False
321 if self.value != other.value: return False
322 if self.value_mask != other.value_mask: return False
323 return True
324
Rich Lanec2ee4b82013-04-24 17:12:38 -0700325 def pretty_print(self, q):
326 q.text("arp_spa_masked {")
327 with q.group():
328 with q.indent(2):
329 q.breakable()
330 q.text("value = ");
331 q.text("%#x" % self.value)
332 q.text(","); q.breakable()
333 q.text("value_mask = ");
334 q.text("%#x" % self.value_mask)
335 q.breakable()
336 q.text('}')
337
Rich Lane7dcdf022013-12-11 14:45:27 -0800338oxm.subtypes[2147495176] = arp_spa_masked
339
340class arp_tha(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700341 type_len = 2147496454
Rich Lanec2ee4b82013-04-24 17:12:38 -0700342
343 def __init__(self, value=None):
344 if value != None:
345 self.value = value
346 else:
347 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800348 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700349
350 def pack(self):
351 packed = []
352 packed.append(struct.pack("!L", self.type_len))
353 packed.append(struct.pack("!6B", *self.value))
354 return ''.join(packed)
355
356 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800357 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700358 obj = arp_tha()
Dan Talaycof6202252013-07-02 01:00:29 -0700359 _type_len = reader.read("!L")[0]
360 assert(_type_len == 2147496454)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700361 obj.value = list(reader.read('!6B'))
362 return obj
363
364 def __eq__(self, other):
365 if type(self) != type(other): return False
366 if self.value != other.value: return False
367 return True
368
Rich Lanec2ee4b82013-04-24 17:12:38 -0700369 def pretty_print(self, q):
370 q.text("arp_tha {")
371 with q.group():
372 with q.indent(2):
373 q.breakable()
374 q.text("value = ");
375 q.text(util.pretty_mac(self.value))
376 q.breakable()
377 q.text('}')
378
Rich Lane7dcdf022013-12-11 14:45:27 -0800379oxm.subtypes[2147496454] = arp_tha
380
381class arp_tha_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700382 type_len = 2147496716
Rich Lanec2ee4b82013-04-24 17:12:38 -0700383
384 def __init__(self, value=None, value_mask=None):
385 if value != None:
386 self.value = value
387 else:
388 self.value = [0,0,0,0,0,0]
389 if value_mask != None:
390 self.value_mask = value_mask
391 else:
392 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800393 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700394
395 def pack(self):
396 packed = []
397 packed.append(struct.pack("!L", self.type_len))
398 packed.append(struct.pack("!6B", *self.value))
399 packed.append(struct.pack("!6B", *self.value_mask))
400 return ''.join(packed)
401
402 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800403 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700404 obj = arp_tha_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700405 _type_len = reader.read("!L")[0]
406 assert(_type_len == 2147496716)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700407 obj.value = list(reader.read('!6B'))
408 obj.value_mask = list(reader.read('!6B'))
409 return obj
410
411 def __eq__(self, other):
412 if type(self) != type(other): return False
413 if self.value != other.value: return False
414 if self.value_mask != other.value_mask: return False
415 return True
416
Rich Lanec2ee4b82013-04-24 17:12:38 -0700417 def pretty_print(self, q):
418 q.text("arp_tha_masked {")
419 with q.group():
420 with q.indent(2):
421 q.breakable()
422 q.text("value = ");
423 q.text(util.pretty_mac(self.value))
424 q.text(","); q.breakable()
425 q.text("value_mask = ");
426 q.text(util.pretty_mac(self.value_mask))
427 q.breakable()
428 q.text('}')
429
Rich Lane7dcdf022013-12-11 14:45:27 -0800430oxm.subtypes[2147496716] = arp_tha_masked
431
432class arp_tpa(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700433 type_len = 2147495428
Rich Lanec2ee4b82013-04-24 17:12:38 -0700434
435 def __init__(self, value=None):
436 if value != None:
437 self.value = value
438 else:
439 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800440 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700441
442 def pack(self):
443 packed = []
444 packed.append(struct.pack("!L", self.type_len))
445 packed.append(struct.pack("!L", self.value))
446 return ''.join(packed)
447
448 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800449 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700450 obj = arp_tpa()
Dan Talaycof6202252013-07-02 01:00:29 -0700451 _type_len = reader.read("!L")[0]
452 assert(_type_len == 2147495428)
453 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700454 return obj
455
456 def __eq__(self, other):
457 if type(self) != type(other): return False
458 if self.value != other.value: return False
459 return True
460
Rich Lanec2ee4b82013-04-24 17:12:38 -0700461 def pretty_print(self, q):
462 q.text("arp_tpa {")
463 with q.group():
464 with q.indent(2):
465 q.breakable()
466 q.text("value = ");
467 q.text("%#x" % self.value)
468 q.breakable()
469 q.text('}')
470
Rich Lane7dcdf022013-12-11 14:45:27 -0800471oxm.subtypes[2147495428] = arp_tpa
472
473class arp_tpa_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700474 type_len = 2147495688
Rich Lanec2ee4b82013-04-24 17:12:38 -0700475
476 def __init__(self, value=None, value_mask=None):
477 if value != None:
478 self.value = value
479 else:
480 self.value = 0
481 if value_mask != None:
482 self.value_mask = value_mask
483 else:
484 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800485 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700486
487 def pack(self):
488 packed = []
489 packed.append(struct.pack("!L", self.type_len))
490 packed.append(struct.pack("!L", self.value))
491 packed.append(struct.pack("!L", self.value_mask))
492 return ''.join(packed)
493
494 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800495 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700496 obj = arp_tpa_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700497 _type_len = reader.read("!L")[0]
498 assert(_type_len == 2147495688)
499 obj.value = reader.read("!L")[0]
500 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700501 return obj
502
503 def __eq__(self, other):
504 if type(self) != type(other): return False
505 if self.value != other.value: return False
506 if self.value_mask != other.value_mask: return False
507 return True
508
Rich Lanec2ee4b82013-04-24 17:12:38 -0700509 def pretty_print(self, q):
510 q.text("arp_tpa_masked {")
511 with q.group():
512 with q.indent(2):
513 q.breakable()
514 q.text("value = ");
515 q.text("%#x" % self.value)
516 q.text(","); q.breakable()
517 q.text("value_mask = ");
518 q.text("%#x" % self.value_mask)
519 q.breakable()
520 q.text('}')
521
Rich Lane7dcdf022013-12-11 14:45:27 -0800522oxm.subtypes[2147495688] = arp_tpa_masked
523
Rich Lanec0d05d12014-03-11 18:02:24 -0700524class bsn_egr_port_group_id(oxm):
525 type_len = 200196
526
527 def __init__(self, value=None):
528 if value != None:
529 self.value = value
530 else:
531 self.value = 0
532 return
533
534 def pack(self):
535 packed = []
536 packed.append(struct.pack("!L", self.type_len))
537 packed.append(struct.pack("!L", self.value))
538 return ''.join(packed)
539
540 @staticmethod
541 def unpack(reader):
542 obj = bsn_egr_port_group_id()
543 _type_len = reader.read("!L")[0]
544 assert(_type_len == 200196)
545 obj.value = reader.read("!L")[0]
546 return obj
547
548 def __eq__(self, other):
549 if type(self) != type(other): return False
550 if self.value != other.value: return False
551 return True
552
553 def pretty_print(self, q):
554 q.text("bsn_egr_port_group_id {")
555 with q.group():
556 with q.indent(2):
557 q.breakable()
558 q.text("value = ");
559 q.text("%#x" % self.value)
560 q.breakable()
561 q.text('}')
562
563oxm.subtypes[200196] = bsn_egr_port_group_id
564
565class bsn_egr_port_group_id_masked(oxm):
566 type_len = 200456
567
568 def __init__(self, value=None, value_mask=None):
569 if value != None:
570 self.value = value
571 else:
572 self.value = 0
573 if value_mask != None:
574 self.value_mask = value_mask
575 else:
576 self.value_mask = 0
577 return
578
579 def pack(self):
580 packed = []
581 packed.append(struct.pack("!L", self.type_len))
582 packed.append(struct.pack("!L", self.value))
583 packed.append(struct.pack("!L", self.value_mask))
584 return ''.join(packed)
585
586 @staticmethod
587 def unpack(reader):
588 obj = bsn_egr_port_group_id_masked()
589 _type_len = reader.read("!L")[0]
590 assert(_type_len == 200456)
591 obj.value = reader.read("!L")[0]
592 obj.value_mask = reader.read("!L")[0]
593 return obj
594
595 def __eq__(self, other):
596 if type(self) != type(other): return False
597 if self.value != other.value: return False
598 if self.value_mask != other.value_mask: return False
599 return True
600
601 def pretty_print(self, q):
602 q.text("bsn_egr_port_group_id_masked {")
603 with q.group():
604 with q.indent(2):
605 q.breakable()
606 q.text("value = ");
607 q.text("%#x" % self.value)
608 q.text(","); q.breakable()
609 q.text("value_mask = ");
610 q.text("%#x" % self.value_mask)
611 q.breakable()
612 q.text('}')
613
614oxm.subtypes[200456] = bsn_egr_port_group_id_masked
615
Rich Lane7dcdf022013-12-11 14:45:27 -0800616class bsn_global_vrf_allowed(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800617 type_len = 198145
618
619 def __init__(self, value=None):
620 if value != None:
621 self.value = value
622 else:
623 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800624 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800625
626 def pack(self):
627 packed = []
628 packed.append(struct.pack("!L", self.type_len))
629 packed.append(struct.pack("!B", self.value))
630 return ''.join(packed)
631
632 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800633 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800634 obj = bsn_global_vrf_allowed()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800635 _type_len = reader.read("!L")[0]
636 assert(_type_len == 198145)
637 obj.value = reader.read("!B")[0]
638 return obj
639
640 def __eq__(self, other):
641 if type(self) != type(other): return False
642 if self.value != other.value: return False
643 return True
644
Rich Laned9e3f7b2013-11-04 11:40:43 -0800645 def pretty_print(self, q):
646 q.text("bsn_global_vrf_allowed {")
647 with q.group():
648 with q.indent(2):
649 q.breakable()
650 q.text("value = ");
651 q.text("%#x" % self.value)
652 q.breakable()
653 q.text('}')
654
Rich Lane7dcdf022013-12-11 14:45:27 -0800655oxm.subtypes[198145] = bsn_global_vrf_allowed
656
657class bsn_global_vrf_allowed_masked(oxm):
658 type_len = 198402
Rich Laned9e3f7b2013-11-04 11:40:43 -0800659
660 def __init__(self, value=None, value_mask=None):
661 if value != None:
662 self.value = value
663 else:
664 self.value = 0
665 if value_mask != None:
666 self.value_mask = value_mask
667 else:
668 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800669 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800670
671 def pack(self):
672 packed = []
673 packed.append(struct.pack("!L", self.type_len))
674 packed.append(struct.pack("!B", self.value))
675 packed.append(struct.pack("!B", self.value_mask))
676 return ''.join(packed)
677
678 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800679 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800680 obj = bsn_global_vrf_allowed_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800681 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800682 assert(_type_len == 198402)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800683 obj.value = reader.read("!B")[0]
684 obj.value_mask = reader.read("!B")[0]
685 return obj
686
687 def __eq__(self, other):
688 if type(self) != type(other): return False
689 if self.value != other.value: return False
690 if self.value_mask != other.value_mask: return False
691 return True
692
Rich Laned9e3f7b2013-11-04 11:40:43 -0800693 def pretty_print(self, q):
694 q.text("bsn_global_vrf_allowed_masked {")
695 with q.group():
696 with q.indent(2):
697 q.breakable()
698 q.text("value = ");
699 q.text("%#x" % self.value)
700 q.text(","); q.breakable()
701 q.text("value_mask = ");
702 q.text("%#x" % self.value_mask)
703 q.breakable()
704 q.text('}')
705
Rich Lane7dcdf022013-12-11 14:45:27 -0800706oxm.subtypes[198402] = bsn_global_vrf_allowed_masked
707
708class bsn_in_ports_128(oxm):
709 type_len = 196624
Rich Lane6f4978c2013-10-20 21:33:52 -0700710
711 def __init__(self, value=None):
712 if value != None:
713 self.value = value
714 else:
715 self.value = set()
Rich Lane7dcdf022013-12-11 14:45:27 -0800716 return
Rich Lane6f4978c2013-10-20 21:33:52 -0700717
718 def pack(self):
719 packed = []
720 packed.append(struct.pack("!L", self.type_len))
721 packed.append(util.pack_bitmap_128(self.value))
722 return ''.join(packed)
723
724 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800725 def unpack(reader):
Rich Lane6f4978c2013-10-20 21:33:52 -0700726 obj = bsn_in_ports_128()
Rich Lane6f4978c2013-10-20 21:33:52 -0700727 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800728 assert(_type_len == 196624)
Rich Lane6f4978c2013-10-20 21:33:52 -0700729 obj.value = util.unpack_bitmap_128(reader)
730 return obj
731
732 def __eq__(self, other):
733 if type(self) != type(other): return False
734 if self.value != other.value: return False
735 return True
736
Rich Lane6f4978c2013-10-20 21:33:52 -0700737 def pretty_print(self, q):
738 q.text("bsn_in_ports_128 {")
739 with q.group():
740 with q.indent(2):
741 q.breakable()
742 q.text("value = ");
743 q.pp(self.value)
744 q.breakable()
745 q.text('}')
746
Rich Lane7dcdf022013-12-11 14:45:27 -0800747oxm.subtypes[196624] = bsn_in_ports_128
748
749class bsn_in_ports_128_masked(oxm):
Rich Lane6f4978c2013-10-20 21:33:52 -0700750 type_len = 196896
751
752 def __init__(self, value=None, value_mask=None):
753 if value != None:
754 self.value = value
755 else:
756 self.value = set()
757 if value_mask != None:
758 self.value_mask = value_mask
759 else:
760 self.value_mask = set()
Rich Lane7dcdf022013-12-11 14:45:27 -0800761 return
Rich Lane6f4978c2013-10-20 21:33:52 -0700762
763 def pack(self):
764 packed = []
765 packed.append(struct.pack("!L", self.type_len))
766 packed.append(util.pack_bitmap_128(self.value))
767 packed.append(util.pack_bitmap_128(self.value_mask))
768 return ''.join(packed)
769
770 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800771 def unpack(reader):
Rich Lane6f4978c2013-10-20 21:33:52 -0700772 obj = bsn_in_ports_128_masked()
Rich Lane6f4978c2013-10-20 21:33:52 -0700773 _type_len = reader.read("!L")[0]
774 assert(_type_len == 196896)
775 obj.value = util.unpack_bitmap_128(reader)
776 obj.value_mask = util.unpack_bitmap_128(reader)
777 return obj
778
779 def __eq__(self, other):
780 if type(self) != type(other): return False
781 if self.value != other.value: return False
782 if self.value_mask != other.value_mask: return False
783 return True
784
Rich Lane6f4978c2013-10-20 21:33:52 -0700785 def pretty_print(self, q):
786 q.text("bsn_in_ports_128_masked {")
787 with q.group():
788 with q.indent(2):
789 q.breakable()
790 q.text("value = ");
791 q.pp(self.value)
792 q.text(","); q.breakable()
793 q.text("value_mask = ");
794 q.pp(self.value_mask)
795 q.breakable()
796 q.text('}')
797
Rich Lane7dcdf022013-12-11 14:45:27 -0800798oxm.subtypes[196896] = bsn_in_ports_128_masked
799
800class bsn_l3_dst_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800801 type_len = 199684
802
803 def __init__(self, value=None):
804 if value != None:
805 self.value = value
806 else:
807 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800808 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800809
810 def pack(self):
811 packed = []
812 packed.append(struct.pack("!L", self.type_len))
813 packed.append(struct.pack("!L", self.value))
814 return ''.join(packed)
815
816 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800817 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800818 obj = bsn_l3_dst_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800819 _type_len = reader.read("!L")[0]
820 assert(_type_len == 199684)
821 obj.value = reader.read("!L")[0]
822 return obj
823
824 def __eq__(self, other):
825 if type(self) != type(other): return False
826 if self.value != other.value: return False
827 return True
828
Rich Laned9e3f7b2013-11-04 11:40:43 -0800829 def pretty_print(self, q):
830 q.text("bsn_l3_dst_class_id {")
831 with q.group():
832 with q.indent(2):
833 q.breakable()
834 q.text("value = ");
835 q.text("%#x" % self.value)
836 q.breakable()
837 q.text('}')
838
Rich Lane7dcdf022013-12-11 14:45:27 -0800839oxm.subtypes[199684] = bsn_l3_dst_class_id
840
841class bsn_l3_dst_class_id_masked(oxm):
842 type_len = 199944
Rich Laned9e3f7b2013-11-04 11:40:43 -0800843
844 def __init__(self, value=None, value_mask=None):
845 if value != None:
846 self.value = value
847 else:
848 self.value = 0
849 if value_mask != None:
850 self.value_mask = value_mask
851 else:
852 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800853 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800854
855 def pack(self):
856 packed = []
857 packed.append(struct.pack("!L", self.type_len))
858 packed.append(struct.pack("!L", self.value))
859 packed.append(struct.pack("!L", self.value_mask))
860 return ''.join(packed)
861
862 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800863 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800864 obj = bsn_l3_dst_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800865 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800866 assert(_type_len == 199944)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800867 obj.value = reader.read("!L")[0]
868 obj.value_mask = reader.read("!L")[0]
869 return obj
870
871 def __eq__(self, other):
872 if type(self) != type(other): return False
873 if self.value != other.value: return False
874 if self.value_mask != other.value_mask: return False
875 return True
876
Rich Laned9e3f7b2013-11-04 11:40:43 -0800877 def pretty_print(self, q):
878 q.text("bsn_l3_dst_class_id_masked {")
879 with q.group():
880 with q.indent(2):
881 q.breakable()
882 q.text("value = ");
883 q.text("%#x" % self.value)
884 q.text(","); q.breakable()
885 q.text("value_mask = ");
886 q.text("%#x" % self.value_mask)
887 q.breakable()
888 q.text('}')
889
Rich Lane7dcdf022013-12-11 14:45:27 -0800890oxm.subtypes[199944] = bsn_l3_dst_class_id_masked
891
892class bsn_l3_interface_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800893 type_len = 198660
894
895 def __init__(self, value=None):
896 if value != None:
897 self.value = value
898 else:
899 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800900 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800901
902 def pack(self):
903 packed = []
904 packed.append(struct.pack("!L", self.type_len))
905 packed.append(struct.pack("!L", self.value))
906 return ''.join(packed)
907
908 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800909 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800910 obj = bsn_l3_interface_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800911 _type_len = reader.read("!L")[0]
912 assert(_type_len == 198660)
913 obj.value = reader.read("!L")[0]
914 return obj
915
916 def __eq__(self, other):
917 if type(self) != type(other): return False
918 if self.value != other.value: return False
919 return True
920
Rich Laned9e3f7b2013-11-04 11:40:43 -0800921 def pretty_print(self, q):
922 q.text("bsn_l3_interface_class_id {")
923 with q.group():
924 with q.indent(2):
925 q.breakable()
926 q.text("value = ");
927 q.text("%#x" % self.value)
928 q.breakable()
929 q.text('}')
930
Rich Lane7dcdf022013-12-11 14:45:27 -0800931oxm.subtypes[198660] = bsn_l3_interface_class_id
932
933class bsn_l3_interface_class_id_masked(oxm):
934 type_len = 198920
Rich Laned9e3f7b2013-11-04 11:40:43 -0800935
936 def __init__(self, value=None, value_mask=None):
937 if value != None:
938 self.value = value
939 else:
940 self.value = 0
941 if value_mask != None:
942 self.value_mask = value_mask
943 else:
944 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800945 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800946
947 def pack(self):
948 packed = []
949 packed.append(struct.pack("!L", self.type_len))
950 packed.append(struct.pack("!L", self.value))
951 packed.append(struct.pack("!L", self.value_mask))
952 return ''.join(packed)
953
954 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800955 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800956 obj = bsn_l3_interface_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800957 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800958 assert(_type_len == 198920)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800959 obj.value = reader.read("!L")[0]
960 obj.value_mask = reader.read("!L")[0]
961 return obj
962
963 def __eq__(self, other):
964 if type(self) != type(other): return False
965 if self.value != other.value: return False
966 if self.value_mask != other.value_mask: return False
967 return True
968
Rich Laned9e3f7b2013-11-04 11:40:43 -0800969 def pretty_print(self, q):
970 q.text("bsn_l3_interface_class_id_masked {")
971 with q.group():
972 with q.indent(2):
973 q.breakable()
974 q.text("value = ");
975 q.text("%#x" % self.value)
976 q.text(","); q.breakable()
977 q.text("value_mask = ");
978 q.text("%#x" % self.value_mask)
979 q.breakable()
980 q.text('}')
981
Rich Lane7dcdf022013-12-11 14:45:27 -0800982oxm.subtypes[198920] = bsn_l3_interface_class_id_masked
983
984class bsn_l3_src_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800985 type_len = 199172
986
987 def __init__(self, value=None):
988 if value != None:
989 self.value = value
990 else:
991 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800992 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800993
994 def pack(self):
995 packed = []
996 packed.append(struct.pack("!L", self.type_len))
997 packed.append(struct.pack("!L", self.value))
998 return ''.join(packed)
999
1000 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001001 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001002 obj = bsn_l3_src_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001003 _type_len = reader.read("!L")[0]
1004 assert(_type_len == 199172)
1005 obj.value = reader.read("!L")[0]
1006 return obj
1007
1008 def __eq__(self, other):
1009 if type(self) != type(other): return False
1010 if self.value != other.value: return False
1011 return True
1012
Rich Laned9e3f7b2013-11-04 11:40:43 -08001013 def pretty_print(self, q):
1014 q.text("bsn_l3_src_class_id {")
1015 with q.group():
1016 with q.indent(2):
1017 q.breakable()
1018 q.text("value = ");
1019 q.text("%#x" % self.value)
1020 q.breakable()
1021 q.text('}')
1022
Rich Lane7dcdf022013-12-11 14:45:27 -08001023oxm.subtypes[199172] = bsn_l3_src_class_id
1024
1025class bsn_l3_src_class_id_masked(oxm):
1026 type_len = 199432
Rich Laned9e3f7b2013-11-04 11:40:43 -08001027
1028 def __init__(self, value=None, value_mask=None):
1029 if value != None:
1030 self.value = value
1031 else:
1032 self.value = 0
1033 if value_mask != None:
1034 self.value_mask = value_mask
1035 else:
1036 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001037 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001038
1039 def pack(self):
1040 packed = []
1041 packed.append(struct.pack("!L", self.type_len))
1042 packed.append(struct.pack("!L", self.value))
1043 packed.append(struct.pack("!L", self.value_mask))
1044 return ''.join(packed)
1045
1046 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001047 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001048 obj = bsn_l3_src_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001049 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001050 assert(_type_len == 199432)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001051 obj.value = reader.read("!L")[0]
1052 obj.value_mask = reader.read("!L")[0]
1053 return obj
1054
1055 def __eq__(self, other):
1056 if type(self) != type(other): return False
1057 if self.value != other.value: return False
1058 if self.value_mask != other.value_mask: return False
1059 return True
1060
Rich Laned9e3f7b2013-11-04 11:40:43 -08001061 def pretty_print(self, q):
1062 q.text("bsn_l3_src_class_id_masked {")
1063 with q.group():
1064 with q.indent(2):
1065 q.breakable()
1066 q.text("value = ");
1067 q.text("%#x" % self.value)
1068 q.text(","); q.breakable()
1069 q.text("value_mask = ");
1070 q.text("%#x" % self.value_mask)
1071 q.breakable()
1072 q.text('}')
1073
Rich Lane7dcdf022013-12-11 14:45:27 -08001074oxm.subtypes[199432] = bsn_l3_src_class_id_masked
1075
1076class bsn_lag_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001077 type_len = 197124
1078
1079 def __init__(self, value=None):
1080 if value != None:
1081 self.value = value
1082 else:
1083 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001084 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001085
1086 def pack(self):
1087 packed = []
1088 packed.append(struct.pack("!L", self.type_len))
1089 packed.append(struct.pack("!L", self.value))
1090 return ''.join(packed)
1091
1092 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001093 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001094 obj = bsn_lag_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001095 _type_len = reader.read("!L")[0]
1096 assert(_type_len == 197124)
1097 obj.value = reader.read("!L")[0]
1098 return obj
1099
1100 def __eq__(self, other):
1101 if type(self) != type(other): return False
1102 if self.value != other.value: return False
1103 return True
1104
Rich Laned9e3f7b2013-11-04 11:40:43 -08001105 def pretty_print(self, q):
1106 q.text("bsn_lag_id {")
1107 with q.group():
1108 with q.indent(2):
1109 q.breakable()
1110 q.text("value = ");
1111 q.text("%#x" % self.value)
1112 q.breakable()
1113 q.text('}')
1114
Rich Lane7dcdf022013-12-11 14:45:27 -08001115oxm.subtypes[197124] = bsn_lag_id
1116
1117class bsn_lag_id_masked(oxm):
1118 type_len = 197384
Rich Laned9e3f7b2013-11-04 11:40:43 -08001119
1120 def __init__(self, value=None, value_mask=None):
1121 if value != None:
1122 self.value = value
1123 else:
1124 self.value = 0
1125 if value_mask != None:
1126 self.value_mask = value_mask
1127 else:
1128 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001129 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001130
1131 def pack(self):
1132 packed = []
1133 packed.append(struct.pack("!L", self.type_len))
1134 packed.append(struct.pack("!L", self.value))
1135 packed.append(struct.pack("!L", self.value_mask))
1136 return ''.join(packed)
1137
1138 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001139 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001140 obj = bsn_lag_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001141 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001142 assert(_type_len == 197384)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001143 obj.value = reader.read("!L")[0]
1144 obj.value_mask = reader.read("!L")[0]
1145 return obj
1146
1147 def __eq__(self, other):
1148 if type(self) != type(other): return False
1149 if self.value != other.value: return False
1150 if self.value_mask != other.value_mask: return False
1151 return True
1152
Rich Laned9e3f7b2013-11-04 11:40:43 -08001153 def pretty_print(self, q):
1154 q.text("bsn_lag_id_masked {")
1155 with q.group():
1156 with q.indent(2):
1157 q.breakable()
1158 q.text("value = ");
1159 q.text("%#x" % self.value)
1160 q.text(","); q.breakable()
1161 q.text("value_mask = ");
1162 q.text("%#x" % self.value_mask)
1163 q.breakable()
1164 q.text('}')
1165
Rich Lane7dcdf022013-12-11 14:45:27 -08001166oxm.subtypes[197384] = bsn_lag_id_masked
1167
1168class bsn_vrf(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001169 type_len = 197636
1170
1171 def __init__(self, value=None):
1172 if value != None:
1173 self.value = value
1174 else:
1175 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001176 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001177
1178 def pack(self):
1179 packed = []
1180 packed.append(struct.pack("!L", self.type_len))
1181 packed.append(struct.pack("!L", self.value))
1182 return ''.join(packed)
1183
1184 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001185 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001186 obj = bsn_vrf()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001187 _type_len = reader.read("!L")[0]
1188 assert(_type_len == 197636)
1189 obj.value = reader.read("!L")[0]
1190 return obj
1191
1192 def __eq__(self, other):
1193 if type(self) != type(other): return False
1194 if self.value != other.value: return False
1195 return True
1196
Rich Laned9e3f7b2013-11-04 11:40:43 -08001197 def pretty_print(self, q):
1198 q.text("bsn_vrf {")
1199 with q.group():
1200 with q.indent(2):
1201 q.breakable()
1202 q.text("value = ");
1203 q.text("%#x" % self.value)
1204 q.breakable()
1205 q.text('}')
1206
Rich Lane7dcdf022013-12-11 14:45:27 -08001207oxm.subtypes[197636] = bsn_vrf
1208
1209class bsn_vrf_masked(oxm):
1210 type_len = 197896
Rich Laned9e3f7b2013-11-04 11:40:43 -08001211
1212 def __init__(self, value=None, value_mask=None):
1213 if value != None:
1214 self.value = value
1215 else:
1216 self.value = 0
1217 if value_mask != None:
1218 self.value_mask = value_mask
1219 else:
1220 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001221 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001222
1223 def pack(self):
1224 packed = []
1225 packed.append(struct.pack("!L", self.type_len))
1226 packed.append(struct.pack("!L", self.value))
1227 packed.append(struct.pack("!L", self.value_mask))
1228 return ''.join(packed)
1229
1230 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001231 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001232 obj = bsn_vrf_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001233 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001234 assert(_type_len == 197896)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001235 obj.value = reader.read("!L")[0]
1236 obj.value_mask = reader.read("!L")[0]
1237 return obj
1238
1239 def __eq__(self, other):
1240 if type(self) != type(other): return False
1241 if self.value != other.value: return False
1242 if self.value_mask != other.value_mask: return False
1243 return True
1244
Rich Laned9e3f7b2013-11-04 11:40:43 -08001245 def pretty_print(self, q):
1246 q.text("bsn_vrf_masked {")
1247 with q.group():
1248 with q.indent(2):
1249 q.breakable()
1250 q.text("value = ");
1251 q.text("%#x" % self.value)
1252 q.text(","); q.breakable()
1253 q.text("value_mask = ");
1254 q.text("%#x" % self.value_mask)
1255 q.breakable()
1256 q.text('}')
1257
Rich Lane7dcdf022013-12-11 14:45:27 -08001258oxm.subtypes[197896] = bsn_vrf_masked
1259
1260class eth_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001261 type_len = 2147485190
Rich Lanec2ee4b82013-04-24 17:12:38 -07001262
1263 def __init__(self, value=None):
1264 if value != None:
1265 self.value = value
1266 else:
1267 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001268 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001269
1270 def pack(self):
1271 packed = []
1272 packed.append(struct.pack("!L", self.type_len))
1273 packed.append(struct.pack("!6B", *self.value))
1274 return ''.join(packed)
1275
1276 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001277 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001278 obj = eth_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07001279 _type_len = reader.read("!L")[0]
1280 assert(_type_len == 2147485190)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001281 obj.value = list(reader.read('!6B'))
1282 return obj
1283
1284 def __eq__(self, other):
1285 if type(self) != type(other): return False
1286 if self.value != other.value: return False
1287 return True
1288
Rich Lanec2ee4b82013-04-24 17:12:38 -07001289 def pretty_print(self, q):
1290 q.text("eth_dst {")
1291 with q.group():
1292 with q.indent(2):
1293 q.breakable()
1294 q.text("value = ");
1295 q.text(util.pretty_mac(self.value))
1296 q.breakable()
1297 q.text('}')
1298
Rich Lane7dcdf022013-12-11 14:45:27 -08001299oxm.subtypes[2147485190] = eth_dst
1300
1301class eth_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001302 type_len = 2147485452
Rich Lanec2ee4b82013-04-24 17:12:38 -07001303
1304 def __init__(self, value=None, value_mask=None):
1305 if value != None:
1306 self.value = value
1307 else:
1308 self.value = [0,0,0,0,0,0]
1309 if value_mask != None:
1310 self.value_mask = value_mask
1311 else:
1312 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001313 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001314
1315 def pack(self):
1316 packed = []
1317 packed.append(struct.pack("!L", self.type_len))
1318 packed.append(struct.pack("!6B", *self.value))
1319 packed.append(struct.pack("!6B", *self.value_mask))
1320 return ''.join(packed)
1321
1322 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001323 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001324 obj = eth_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001325 _type_len = reader.read("!L")[0]
1326 assert(_type_len == 2147485452)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001327 obj.value = list(reader.read('!6B'))
1328 obj.value_mask = list(reader.read('!6B'))
1329 return obj
1330
1331 def __eq__(self, other):
1332 if type(self) != type(other): return False
1333 if self.value != other.value: return False
1334 if self.value_mask != other.value_mask: return False
1335 return True
1336
Rich Lanec2ee4b82013-04-24 17:12:38 -07001337 def pretty_print(self, q):
1338 q.text("eth_dst_masked {")
1339 with q.group():
1340 with q.indent(2):
1341 q.breakable()
1342 q.text("value = ");
1343 q.text(util.pretty_mac(self.value))
1344 q.text(","); q.breakable()
1345 q.text("value_mask = ");
1346 q.text(util.pretty_mac(self.value_mask))
1347 q.breakable()
1348 q.text('}')
1349
Rich Lane7dcdf022013-12-11 14:45:27 -08001350oxm.subtypes[2147485452] = eth_dst_masked
1351
1352class eth_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001353 type_len = 2147485702
Rich Lanec2ee4b82013-04-24 17:12:38 -07001354
1355 def __init__(self, value=None):
1356 if value != None:
1357 self.value = value
1358 else:
1359 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001360 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001361
1362 def pack(self):
1363 packed = []
1364 packed.append(struct.pack("!L", self.type_len))
1365 packed.append(struct.pack("!6B", *self.value))
1366 return ''.join(packed)
1367
1368 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001369 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001370 obj = eth_src()
Dan Talaycof6202252013-07-02 01:00:29 -07001371 _type_len = reader.read("!L")[0]
1372 assert(_type_len == 2147485702)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001373 obj.value = list(reader.read('!6B'))
1374 return obj
1375
1376 def __eq__(self, other):
1377 if type(self) != type(other): return False
1378 if self.value != other.value: return False
1379 return True
1380
Rich Lanec2ee4b82013-04-24 17:12:38 -07001381 def pretty_print(self, q):
1382 q.text("eth_src {")
1383 with q.group():
1384 with q.indent(2):
1385 q.breakable()
1386 q.text("value = ");
1387 q.text(util.pretty_mac(self.value))
1388 q.breakable()
1389 q.text('}')
1390
Rich Lane7dcdf022013-12-11 14:45:27 -08001391oxm.subtypes[2147485702] = eth_src
1392
1393class eth_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001394 type_len = 2147485964
Rich Lanec2ee4b82013-04-24 17:12:38 -07001395
1396 def __init__(self, value=None, value_mask=None):
1397 if value != None:
1398 self.value = value
1399 else:
1400 self.value = [0,0,0,0,0,0]
1401 if value_mask != None:
1402 self.value_mask = value_mask
1403 else:
1404 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001405 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001406
1407 def pack(self):
1408 packed = []
1409 packed.append(struct.pack("!L", self.type_len))
1410 packed.append(struct.pack("!6B", *self.value))
1411 packed.append(struct.pack("!6B", *self.value_mask))
1412 return ''.join(packed)
1413
1414 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001415 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001416 obj = eth_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001417 _type_len = reader.read("!L")[0]
1418 assert(_type_len == 2147485964)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001419 obj.value = list(reader.read('!6B'))
1420 obj.value_mask = list(reader.read('!6B'))
1421 return obj
1422
1423 def __eq__(self, other):
1424 if type(self) != type(other): return False
1425 if self.value != other.value: return False
1426 if self.value_mask != other.value_mask: return False
1427 return True
1428
Rich Lanec2ee4b82013-04-24 17:12:38 -07001429 def pretty_print(self, q):
1430 q.text("eth_src_masked {")
1431 with q.group():
1432 with q.indent(2):
1433 q.breakable()
1434 q.text("value = ");
1435 q.text(util.pretty_mac(self.value))
1436 q.text(","); q.breakable()
1437 q.text("value_mask = ");
1438 q.text(util.pretty_mac(self.value_mask))
1439 q.breakable()
1440 q.text('}')
1441
Rich Lane7dcdf022013-12-11 14:45:27 -08001442oxm.subtypes[2147485964] = eth_src_masked
1443
1444class eth_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001445 type_len = 2147486210
Rich Lanec2ee4b82013-04-24 17:12:38 -07001446
1447 def __init__(self, value=None):
1448 if value != None:
1449 self.value = value
1450 else:
1451 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001452 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001453
1454 def pack(self):
1455 packed = []
1456 packed.append(struct.pack("!L", self.type_len))
1457 packed.append(struct.pack("!H", self.value))
1458 return ''.join(packed)
1459
1460 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001461 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001462 obj = eth_type()
Dan Talaycof6202252013-07-02 01:00:29 -07001463 _type_len = reader.read("!L")[0]
1464 assert(_type_len == 2147486210)
1465 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001466 return obj
1467
1468 def __eq__(self, other):
1469 if type(self) != type(other): return False
1470 if self.value != other.value: return False
1471 return True
1472
Rich Lanec2ee4b82013-04-24 17:12:38 -07001473 def pretty_print(self, q):
1474 q.text("eth_type {")
1475 with q.group():
1476 with q.indent(2):
1477 q.breakable()
1478 q.text("value = ");
1479 q.text("%#x" % self.value)
1480 q.breakable()
1481 q.text('}')
1482
Rich Lane7dcdf022013-12-11 14:45:27 -08001483oxm.subtypes[2147486210] = eth_type
1484
1485class eth_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001486 type_len = 2147486468
Rich Lanec2ee4b82013-04-24 17:12:38 -07001487
1488 def __init__(self, value=None, value_mask=None):
1489 if value != None:
1490 self.value = value
1491 else:
1492 self.value = 0
1493 if value_mask != None:
1494 self.value_mask = value_mask
1495 else:
1496 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001497 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001498
1499 def pack(self):
1500 packed = []
1501 packed.append(struct.pack("!L", self.type_len))
1502 packed.append(struct.pack("!H", self.value))
1503 packed.append(struct.pack("!H", self.value_mask))
1504 return ''.join(packed)
1505
1506 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001507 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001508 obj = eth_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001509 _type_len = reader.read("!L")[0]
1510 assert(_type_len == 2147486468)
1511 obj.value = reader.read("!H")[0]
1512 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001513 return obj
1514
1515 def __eq__(self, other):
1516 if type(self) != type(other): return False
1517 if self.value != other.value: return False
1518 if self.value_mask != other.value_mask: return False
1519 return True
1520
Rich Lanec2ee4b82013-04-24 17:12:38 -07001521 def pretty_print(self, q):
1522 q.text("eth_type_masked {")
1523 with q.group():
1524 with q.indent(2):
1525 q.breakable()
1526 q.text("value = ");
1527 q.text("%#x" % self.value)
1528 q.text(","); q.breakable()
1529 q.text("value_mask = ");
1530 q.text("%#x" % self.value_mask)
1531 q.breakable()
1532 q.text('}')
1533
Rich Lane7dcdf022013-12-11 14:45:27 -08001534oxm.subtypes[2147486468] = eth_type_masked
1535
1536class icmpv4_code(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001537 type_len = 2147493889
Rich Lanec2ee4b82013-04-24 17:12:38 -07001538
1539 def __init__(self, value=None):
1540 if value != None:
1541 self.value = value
1542 else:
1543 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001544 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001545
1546 def pack(self):
1547 packed = []
1548 packed.append(struct.pack("!L", self.type_len))
1549 packed.append(struct.pack("!B", self.value))
1550 return ''.join(packed)
1551
1552 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001553 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001554 obj = icmpv4_code()
Dan Talaycof6202252013-07-02 01:00:29 -07001555 _type_len = reader.read("!L")[0]
1556 assert(_type_len == 2147493889)
1557 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001558 return obj
1559
1560 def __eq__(self, other):
1561 if type(self) != type(other): return False
1562 if self.value != other.value: return False
1563 return True
1564
Rich Lanec2ee4b82013-04-24 17:12:38 -07001565 def pretty_print(self, q):
1566 q.text("icmpv4_code {")
1567 with q.group():
1568 with q.indent(2):
1569 q.breakable()
1570 q.text("value = ");
1571 q.text("%#x" % self.value)
1572 q.breakable()
1573 q.text('}')
1574
Rich Lane7dcdf022013-12-11 14:45:27 -08001575oxm.subtypes[2147493889] = icmpv4_code
1576
1577class icmpv4_code_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001578 type_len = 2147494146
Rich Lanec2ee4b82013-04-24 17:12:38 -07001579
1580 def __init__(self, value=None, value_mask=None):
1581 if value != None:
1582 self.value = value
1583 else:
1584 self.value = 0
1585 if value_mask != None:
1586 self.value_mask = value_mask
1587 else:
1588 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001589 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001590
1591 def pack(self):
1592 packed = []
1593 packed.append(struct.pack("!L", self.type_len))
1594 packed.append(struct.pack("!B", self.value))
1595 packed.append(struct.pack("!B", self.value_mask))
1596 return ''.join(packed)
1597
1598 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001599 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001600 obj = icmpv4_code_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001601 _type_len = reader.read("!L")[0]
1602 assert(_type_len == 2147494146)
1603 obj.value = reader.read("!B")[0]
1604 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001605 return obj
1606
1607 def __eq__(self, other):
1608 if type(self) != type(other): return False
1609 if self.value != other.value: return False
1610 if self.value_mask != other.value_mask: return False
1611 return True
1612
Rich Lanec2ee4b82013-04-24 17:12:38 -07001613 def pretty_print(self, q):
1614 q.text("icmpv4_code_masked {")
1615 with q.group():
1616 with q.indent(2):
1617 q.breakable()
1618 q.text("value = ");
1619 q.text("%#x" % self.value)
1620 q.text(","); q.breakable()
1621 q.text("value_mask = ");
1622 q.text("%#x" % self.value_mask)
1623 q.breakable()
1624 q.text('}')
1625
Rich Lane7dcdf022013-12-11 14:45:27 -08001626oxm.subtypes[2147494146] = icmpv4_code_masked
1627
1628class icmpv4_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001629 type_len = 2147493377
Rich Lanec2ee4b82013-04-24 17:12:38 -07001630
1631 def __init__(self, value=None):
1632 if value != None:
1633 self.value = value
1634 else:
1635 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001636 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001637
1638 def pack(self):
1639 packed = []
1640 packed.append(struct.pack("!L", self.type_len))
1641 packed.append(struct.pack("!B", self.value))
1642 return ''.join(packed)
1643
1644 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001645 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001646 obj = icmpv4_type()
Dan Talaycof6202252013-07-02 01:00:29 -07001647 _type_len = reader.read("!L")[0]
1648 assert(_type_len == 2147493377)
1649 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001650 return obj
1651
1652 def __eq__(self, other):
1653 if type(self) != type(other): return False
1654 if self.value != other.value: return False
1655 return True
1656
Rich Lanec2ee4b82013-04-24 17:12:38 -07001657 def pretty_print(self, q):
1658 q.text("icmpv4_type {")
1659 with q.group():
1660 with q.indent(2):
1661 q.breakable()
1662 q.text("value = ");
1663 q.text("%#x" % self.value)
1664 q.breakable()
1665 q.text('}')
1666
Rich Lane7dcdf022013-12-11 14:45:27 -08001667oxm.subtypes[2147493377] = icmpv4_type
1668
1669class icmpv4_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001670 type_len = 2147493634
Rich Lanec2ee4b82013-04-24 17:12:38 -07001671
1672 def __init__(self, value=None, value_mask=None):
1673 if value != None:
1674 self.value = value
1675 else:
1676 self.value = 0
1677 if value_mask != None:
1678 self.value_mask = value_mask
1679 else:
1680 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001681 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001682
1683 def pack(self):
1684 packed = []
1685 packed.append(struct.pack("!L", self.type_len))
1686 packed.append(struct.pack("!B", self.value))
1687 packed.append(struct.pack("!B", self.value_mask))
1688 return ''.join(packed)
1689
1690 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001691 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001692 obj = icmpv4_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001693 _type_len = reader.read("!L")[0]
1694 assert(_type_len == 2147493634)
1695 obj.value = reader.read("!B")[0]
1696 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001697 return obj
1698
1699 def __eq__(self, other):
1700 if type(self) != type(other): return False
1701 if self.value != other.value: return False
1702 if self.value_mask != other.value_mask: return False
1703 return True
1704
Rich Lanec2ee4b82013-04-24 17:12:38 -07001705 def pretty_print(self, q):
1706 q.text("icmpv4_type_masked {")
1707 with q.group():
1708 with q.indent(2):
1709 q.breakable()
1710 q.text("value = ");
1711 q.text("%#x" % self.value)
1712 q.text(","); q.breakable()
1713 q.text("value_mask = ");
1714 q.text("%#x" % self.value_mask)
1715 q.breakable()
1716 q.text('}')
1717
Rich Lane7dcdf022013-12-11 14:45:27 -08001718oxm.subtypes[2147493634] = icmpv4_type_masked
1719
1720class icmpv6_code(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001721 type_len = 2147499009
Rich Lanec2ee4b82013-04-24 17:12:38 -07001722
1723 def __init__(self, value=None):
1724 if value != None:
1725 self.value = value
1726 else:
1727 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001728 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001729
1730 def pack(self):
1731 packed = []
1732 packed.append(struct.pack("!L", self.type_len))
1733 packed.append(struct.pack("!B", self.value))
1734 return ''.join(packed)
1735
1736 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001737 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001738 obj = icmpv6_code()
Dan Talaycof6202252013-07-02 01:00:29 -07001739 _type_len = reader.read("!L")[0]
1740 assert(_type_len == 2147499009)
1741 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001742 return obj
1743
1744 def __eq__(self, other):
1745 if type(self) != type(other): return False
1746 if self.value != other.value: return False
1747 return True
1748
Rich Lanec2ee4b82013-04-24 17:12:38 -07001749 def pretty_print(self, q):
1750 q.text("icmpv6_code {")
1751 with q.group():
1752 with q.indent(2):
1753 q.breakable()
1754 q.text("value = ");
1755 q.text("%#x" % self.value)
1756 q.breakable()
1757 q.text('}')
1758
Rich Lane7dcdf022013-12-11 14:45:27 -08001759oxm.subtypes[2147499009] = icmpv6_code
1760
1761class icmpv6_code_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001762 type_len = 2147499266
Rich Lanec2ee4b82013-04-24 17:12:38 -07001763
1764 def __init__(self, value=None, value_mask=None):
1765 if value != None:
1766 self.value = value
1767 else:
1768 self.value = 0
1769 if value_mask != None:
1770 self.value_mask = value_mask
1771 else:
1772 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001773 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001774
1775 def pack(self):
1776 packed = []
1777 packed.append(struct.pack("!L", self.type_len))
1778 packed.append(struct.pack("!B", self.value))
1779 packed.append(struct.pack("!B", self.value_mask))
1780 return ''.join(packed)
1781
1782 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001783 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001784 obj = icmpv6_code_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001785 _type_len = reader.read("!L")[0]
1786 assert(_type_len == 2147499266)
1787 obj.value = reader.read("!B")[0]
1788 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001789 return obj
1790
1791 def __eq__(self, other):
1792 if type(self) != type(other): return False
1793 if self.value != other.value: return False
1794 if self.value_mask != other.value_mask: return False
1795 return True
1796
Rich Lanec2ee4b82013-04-24 17:12:38 -07001797 def pretty_print(self, q):
1798 q.text("icmpv6_code_masked {")
1799 with q.group():
1800 with q.indent(2):
1801 q.breakable()
1802 q.text("value = ");
1803 q.text("%#x" % self.value)
1804 q.text(","); q.breakable()
1805 q.text("value_mask = ");
1806 q.text("%#x" % self.value_mask)
1807 q.breakable()
1808 q.text('}')
1809
Rich Lane7dcdf022013-12-11 14:45:27 -08001810oxm.subtypes[2147499266] = icmpv6_code_masked
1811
1812class icmpv6_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001813 type_len = 2147498497
Rich Lanec2ee4b82013-04-24 17:12:38 -07001814
1815 def __init__(self, value=None):
1816 if value != None:
1817 self.value = value
1818 else:
1819 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001820 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001821
1822 def pack(self):
1823 packed = []
1824 packed.append(struct.pack("!L", self.type_len))
1825 packed.append(struct.pack("!B", self.value))
1826 return ''.join(packed)
1827
1828 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001829 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001830 obj = icmpv6_type()
Dan Talaycof6202252013-07-02 01:00:29 -07001831 _type_len = reader.read("!L")[0]
1832 assert(_type_len == 2147498497)
1833 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001834 return obj
1835
1836 def __eq__(self, other):
1837 if type(self) != type(other): return False
1838 if self.value != other.value: return False
1839 return True
1840
Rich Lanec2ee4b82013-04-24 17:12:38 -07001841 def pretty_print(self, q):
1842 q.text("icmpv6_type {")
1843 with q.group():
1844 with q.indent(2):
1845 q.breakable()
1846 q.text("value = ");
1847 q.text("%#x" % self.value)
1848 q.breakable()
1849 q.text('}')
1850
Rich Lane7dcdf022013-12-11 14:45:27 -08001851oxm.subtypes[2147498497] = icmpv6_type
1852
1853class icmpv6_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001854 type_len = 2147498754
Rich Lanec2ee4b82013-04-24 17:12:38 -07001855
1856 def __init__(self, value=None, value_mask=None):
1857 if value != None:
1858 self.value = value
1859 else:
1860 self.value = 0
1861 if value_mask != None:
1862 self.value_mask = value_mask
1863 else:
1864 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001865 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001866
1867 def pack(self):
1868 packed = []
1869 packed.append(struct.pack("!L", self.type_len))
1870 packed.append(struct.pack("!B", self.value))
1871 packed.append(struct.pack("!B", self.value_mask))
1872 return ''.join(packed)
1873
1874 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001875 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001876 obj = icmpv6_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001877 _type_len = reader.read("!L")[0]
1878 assert(_type_len == 2147498754)
1879 obj.value = reader.read("!B")[0]
1880 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001881 return obj
1882
1883 def __eq__(self, other):
1884 if type(self) != type(other): return False
1885 if self.value != other.value: return False
1886 if self.value_mask != other.value_mask: return False
1887 return True
1888
Rich Lanec2ee4b82013-04-24 17:12:38 -07001889 def pretty_print(self, q):
1890 q.text("icmpv6_type_masked {")
1891 with q.group():
1892 with q.indent(2):
1893 q.breakable()
1894 q.text("value = ");
1895 q.text("%#x" % self.value)
1896 q.text(","); q.breakable()
1897 q.text("value_mask = ");
1898 q.text("%#x" % self.value_mask)
1899 q.breakable()
1900 q.text('}')
1901
Rich Lane7dcdf022013-12-11 14:45:27 -08001902oxm.subtypes[2147498754] = icmpv6_type_masked
1903
1904class in_phy_port(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001905 type_len = 2147484164
Rich Lanec2ee4b82013-04-24 17:12:38 -07001906
1907 def __init__(self, value=None):
1908 if value != None:
1909 self.value = value
1910 else:
1911 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001912 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001913
1914 def pack(self):
1915 packed = []
1916 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07001917 packed.append(util.pack_port_no(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07001918 return ''.join(packed)
1919
1920 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001921 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001922 obj = in_phy_port()
Dan Talaycof6202252013-07-02 01:00:29 -07001923 _type_len = reader.read("!L")[0]
1924 assert(_type_len == 2147484164)
1925 obj.value = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001926 return obj
1927
1928 def __eq__(self, other):
1929 if type(self) != type(other): return False
1930 if self.value != other.value: return False
1931 return True
1932
Rich Lanec2ee4b82013-04-24 17:12:38 -07001933 def pretty_print(self, q):
1934 q.text("in_phy_port {")
1935 with q.group():
1936 with q.indent(2):
1937 q.breakable()
1938 q.text("value = ");
1939 q.text(util.pretty_port(self.value))
1940 q.breakable()
1941 q.text('}')
1942
Rich Lane7dcdf022013-12-11 14:45:27 -08001943oxm.subtypes[2147484164] = in_phy_port
1944
1945class in_phy_port_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001946 type_len = 2147484424
Rich Lanec2ee4b82013-04-24 17:12:38 -07001947
1948 def __init__(self, value=None, value_mask=None):
1949 if value != None:
1950 self.value = value
1951 else:
1952 self.value = 0
1953 if value_mask != None:
1954 self.value_mask = value_mask
1955 else:
1956 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001957 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001958
1959 def pack(self):
1960 packed = []
1961 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07001962 packed.append(util.pack_port_no(self.value))
1963 packed.append(util.pack_port_no(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07001964 return ''.join(packed)
1965
1966 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001967 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001968 obj = in_phy_port_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001969 _type_len = reader.read("!L")[0]
1970 assert(_type_len == 2147484424)
1971 obj.value = util.unpack_port_no(reader)
1972 obj.value_mask = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001973 return obj
1974
1975 def __eq__(self, other):
1976 if type(self) != type(other): return False
1977 if self.value != other.value: return False
1978 if self.value_mask != other.value_mask: return False
1979 return True
1980
Rich Lanec2ee4b82013-04-24 17:12:38 -07001981 def pretty_print(self, q):
1982 q.text("in_phy_port_masked {")
1983 with q.group():
1984 with q.indent(2):
1985 q.breakable()
1986 q.text("value = ");
1987 q.text(util.pretty_port(self.value))
1988 q.text(","); q.breakable()
1989 q.text("value_mask = ");
1990 q.text(util.pretty_port(self.value_mask))
1991 q.breakable()
1992 q.text('}')
1993
Rich Lane7dcdf022013-12-11 14:45:27 -08001994oxm.subtypes[2147484424] = in_phy_port_masked
1995
1996class in_port(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001997 type_len = 2147483652
Rich Lanec2ee4b82013-04-24 17:12:38 -07001998
1999 def __init__(self, value=None):
2000 if value != None:
2001 self.value = value
2002 else:
2003 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002004 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002005
2006 def pack(self):
2007 packed = []
2008 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07002009 packed.append(util.pack_port_no(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002010 return ''.join(packed)
2011
2012 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002013 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002014 obj = in_port()
Dan Talaycof6202252013-07-02 01:00:29 -07002015 _type_len = reader.read("!L")[0]
2016 assert(_type_len == 2147483652)
2017 obj.value = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002018 return obj
2019
2020 def __eq__(self, other):
2021 if type(self) != type(other): return False
2022 if self.value != other.value: return False
2023 return True
2024
Rich Lanec2ee4b82013-04-24 17:12:38 -07002025 def pretty_print(self, q):
2026 q.text("in_port {")
2027 with q.group():
2028 with q.indent(2):
2029 q.breakable()
2030 q.text("value = ");
2031 q.text(util.pretty_port(self.value))
2032 q.breakable()
2033 q.text('}')
2034
Rich Lane7dcdf022013-12-11 14:45:27 -08002035oxm.subtypes[2147483652] = in_port
2036
2037class in_port_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002038 type_len = 2147483912
Rich Lanec2ee4b82013-04-24 17:12:38 -07002039
2040 def __init__(self, value=None, value_mask=None):
2041 if value != None:
2042 self.value = value
2043 else:
2044 self.value = 0
2045 if value_mask != None:
2046 self.value_mask = value_mask
2047 else:
2048 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002049 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002050
2051 def pack(self):
2052 packed = []
2053 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07002054 packed.append(util.pack_port_no(self.value))
2055 packed.append(util.pack_port_no(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002056 return ''.join(packed)
2057
2058 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002059 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002060 obj = in_port_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002061 _type_len = reader.read("!L")[0]
2062 assert(_type_len == 2147483912)
2063 obj.value = util.unpack_port_no(reader)
2064 obj.value_mask = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002065 return obj
2066
2067 def __eq__(self, other):
2068 if type(self) != type(other): return False
2069 if self.value != other.value: return False
2070 if self.value_mask != other.value_mask: return False
2071 return True
2072
Rich Lanec2ee4b82013-04-24 17:12:38 -07002073 def pretty_print(self, q):
2074 q.text("in_port_masked {")
2075 with q.group():
2076 with q.indent(2):
2077 q.breakable()
2078 q.text("value = ");
2079 q.text(util.pretty_port(self.value))
2080 q.text(","); q.breakable()
2081 q.text("value_mask = ");
2082 q.text(util.pretty_port(self.value_mask))
2083 q.breakable()
2084 q.text('}')
2085
Rich Lane7dcdf022013-12-11 14:45:27 -08002086oxm.subtypes[2147483912] = in_port_masked
2087
2088class ip_dscp(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002089 type_len = 2147487745
Rich Lanec2ee4b82013-04-24 17:12:38 -07002090
2091 def __init__(self, value=None):
2092 if value != None:
2093 self.value = value
2094 else:
2095 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002096 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002097
2098 def pack(self):
2099 packed = []
2100 packed.append(struct.pack("!L", self.type_len))
2101 packed.append(struct.pack("!B", self.value))
2102 return ''.join(packed)
2103
2104 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002105 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002106 obj = ip_dscp()
Dan Talaycof6202252013-07-02 01:00:29 -07002107 _type_len = reader.read("!L")[0]
2108 assert(_type_len == 2147487745)
2109 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002110 return obj
2111
2112 def __eq__(self, other):
2113 if type(self) != type(other): return False
2114 if self.value != other.value: return False
2115 return True
2116
Rich Lanec2ee4b82013-04-24 17:12:38 -07002117 def pretty_print(self, q):
2118 q.text("ip_dscp {")
2119 with q.group():
2120 with q.indent(2):
2121 q.breakable()
2122 q.text("value = ");
2123 q.text("%#x" % self.value)
2124 q.breakable()
2125 q.text('}')
2126
Rich Lane7dcdf022013-12-11 14:45:27 -08002127oxm.subtypes[2147487745] = ip_dscp
2128
2129class ip_dscp_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002130 type_len = 2147488002
Rich Lanec2ee4b82013-04-24 17:12:38 -07002131
2132 def __init__(self, value=None, value_mask=None):
2133 if value != None:
2134 self.value = value
2135 else:
2136 self.value = 0
2137 if value_mask != None:
2138 self.value_mask = value_mask
2139 else:
2140 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002141 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002142
2143 def pack(self):
2144 packed = []
2145 packed.append(struct.pack("!L", self.type_len))
2146 packed.append(struct.pack("!B", self.value))
2147 packed.append(struct.pack("!B", self.value_mask))
2148 return ''.join(packed)
2149
2150 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002151 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002152 obj = ip_dscp_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002153 _type_len = reader.read("!L")[0]
2154 assert(_type_len == 2147488002)
2155 obj.value = reader.read("!B")[0]
2156 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002157 return obj
2158
2159 def __eq__(self, other):
2160 if type(self) != type(other): return False
2161 if self.value != other.value: return False
2162 if self.value_mask != other.value_mask: return False
2163 return True
2164
Rich Lanec2ee4b82013-04-24 17:12:38 -07002165 def pretty_print(self, q):
2166 q.text("ip_dscp_masked {")
2167 with q.group():
2168 with q.indent(2):
2169 q.breakable()
2170 q.text("value = ");
2171 q.text("%#x" % self.value)
2172 q.text(","); q.breakable()
2173 q.text("value_mask = ");
2174 q.text("%#x" % self.value_mask)
2175 q.breakable()
2176 q.text('}')
2177
Rich Lane7dcdf022013-12-11 14:45:27 -08002178oxm.subtypes[2147488002] = ip_dscp_masked
2179
2180class ip_ecn(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002181 type_len = 2147488257
Rich Lanec2ee4b82013-04-24 17:12:38 -07002182
2183 def __init__(self, value=None):
2184 if value != None:
2185 self.value = value
2186 else:
2187 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002188 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002189
2190 def pack(self):
2191 packed = []
2192 packed.append(struct.pack("!L", self.type_len))
2193 packed.append(struct.pack("!B", self.value))
2194 return ''.join(packed)
2195
2196 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002197 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002198 obj = ip_ecn()
Dan Talaycof6202252013-07-02 01:00:29 -07002199 _type_len = reader.read("!L")[0]
2200 assert(_type_len == 2147488257)
2201 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002202 return obj
2203
2204 def __eq__(self, other):
2205 if type(self) != type(other): return False
2206 if self.value != other.value: return False
2207 return True
2208
Rich Lanec2ee4b82013-04-24 17:12:38 -07002209 def pretty_print(self, q):
2210 q.text("ip_ecn {")
2211 with q.group():
2212 with q.indent(2):
2213 q.breakable()
2214 q.text("value = ");
2215 q.text("%#x" % self.value)
2216 q.breakable()
2217 q.text('}')
2218
Rich Lane7dcdf022013-12-11 14:45:27 -08002219oxm.subtypes[2147488257] = ip_ecn
2220
2221class ip_ecn_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002222 type_len = 2147488514
Rich Lanec2ee4b82013-04-24 17:12:38 -07002223
2224 def __init__(self, value=None, value_mask=None):
2225 if value != None:
2226 self.value = value
2227 else:
2228 self.value = 0
2229 if value_mask != None:
2230 self.value_mask = value_mask
2231 else:
2232 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002233 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002234
2235 def pack(self):
2236 packed = []
2237 packed.append(struct.pack("!L", self.type_len))
2238 packed.append(struct.pack("!B", self.value))
2239 packed.append(struct.pack("!B", self.value_mask))
2240 return ''.join(packed)
2241
2242 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002243 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002244 obj = ip_ecn_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002245 _type_len = reader.read("!L")[0]
2246 assert(_type_len == 2147488514)
2247 obj.value = reader.read("!B")[0]
2248 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002249 return obj
2250
2251 def __eq__(self, other):
2252 if type(self) != type(other): return False
2253 if self.value != other.value: return False
2254 if self.value_mask != other.value_mask: return False
2255 return True
2256
Rich Lanec2ee4b82013-04-24 17:12:38 -07002257 def pretty_print(self, q):
2258 q.text("ip_ecn_masked {")
2259 with q.group():
2260 with q.indent(2):
2261 q.breakable()
2262 q.text("value = ");
2263 q.text("%#x" % self.value)
2264 q.text(","); q.breakable()
2265 q.text("value_mask = ");
2266 q.text("%#x" % self.value_mask)
2267 q.breakable()
2268 q.text('}')
2269
Rich Lane7dcdf022013-12-11 14:45:27 -08002270oxm.subtypes[2147488514] = ip_ecn_masked
2271
2272class ip_proto(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002273 type_len = 2147488769
Rich Lanec2ee4b82013-04-24 17:12:38 -07002274
2275 def __init__(self, value=None):
2276 if value != None:
2277 self.value = value
2278 else:
2279 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002280 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002281
2282 def pack(self):
2283 packed = []
2284 packed.append(struct.pack("!L", self.type_len))
2285 packed.append(struct.pack("!B", self.value))
2286 return ''.join(packed)
2287
2288 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002289 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002290 obj = ip_proto()
Dan Talaycof6202252013-07-02 01:00:29 -07002291 _type_len = reader.read("!L")[0]
2292 assert(_type_len == 2147488769)
2293 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002294 return obj
2295
2296 def __eq__(self, other):
2297 if type(self) != type(other): return False
2298 if self.value != other.value: return False
2299 return True
2300
Rich Lanec2ee4b82013-04-24 17:12:38 -07002301 def pretty_print(self, q):
2302 q.text("ip_proto {")
2303 with q.group():
2304 with q.indent(2):
2305 q.breakable()
2306 q.text("value = ");
2307 q.text("%#x" % self.value)
2308 q.breakable()
2309 q.text('}')
2310
Rich Lane7dcdf022013-12-11 14:45:27 -08002311oxm.subtypes[2147488769] = ip_proto
2312
2313class ip_proto_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002314 type_len = 2147489026
Rich Lanec2ee4b82013-04-24 17:12:38 -07002315
2316 def __init__(self, value=None, value_mask=None):
2317 if value != None:
2318 self.value = value
2319 else:
2320 self.value = 0
2321 if value_mask != None:
2322 self.value_mask = value_mask
2323 else:
2324 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002325 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002326
2327 def pack(self):
2328 packed = []
2329 packed.append(struct.pack("!L", self.type_len))
2330 packed.append(struct.pack("!B", self.value))
2331 packed.append(struct.pack("!B", self.value_mask))
2332 return ''.join(packed)
2333
2334 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002335 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002336 obj = ip_proto_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002337 _type_len = reader.read("!L")[0]
2338 assert(_type_len == 2147489026)
2339 obj.value = reader.read("!B")[0]
2340 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002341 return obj
2342
2343 def __eq__(self, other):
2344 if type(self) != type(other): return False
2345 if self.value != other.value: return False
2346 if self.value_mask != other.value_mask: return False
2347 return True
2348
Rich Lanec2ee4b82013-04-24 17:12:38 -07002349 def pretty_print(self, q):
2350 q.text("ip_proto_masked {")
2351 with q.group():
2352 with q.indent(2):
2353 q.breakable()
2354 q.text("value = ");
2355 q.text("%#x" % self.value)
2356 q.text(","); q.breakable()
2357 q.text("value_mask = ");
2358 q.text("%#x" % self.value_mask)
2359 q.breakable()
2360 q.text('}')
2361
Rich Lane7dcdf022013-12-11 14:45:27 -08002362oxm.subtypes[2147489026] = ip_proto_masked
2363
2364class ipv4_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002365 type_len = 2147489796
Rich Lanec2ee4b82013-04-24 17:12:38 -07002366
2367 def __init__(self, value=None):
2368 if value != None:
2369 self.value = value
2370 else:
2371 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002372 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002373
2374 def pack(self):
2375 packed = []
2376 packed.append(struct.pack("!L", self.type_len))
2377 packed.append(struct.pack("!L", self.value))
2378 return ''.join(packed)
2379
2380 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002381 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002382 obj = ipv4_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07002383 _type_len = reader.read("!L")[0]
2384 assert(_type_len == 2147489796)
2385 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002386 return obj
2387
2388 def __eq__(self, other):
2389 if type(self) != type(other): return False
2390 if self.value != other.value: return False
2391 return True
2392
Rich Lanec2ee4b82013-04-24 17:12:38 -07002393 def pretty_print(self, q):
2394 q.text("ipv4_dst {")
2395 with q.group():
2396 with q.indent(2):
2397 q.breakable()
2398 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07002399 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002400 q.breakable()
2401 q.text('}')
2402
Rich Lane7dcdf022013-12-11 14:45:27 -08002403oxm.subtypes[2147489796] = ipv4_dst
2404
2405class ipv4_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002406 type_len = 2147490056
Rich Lanec2ee4b82013-04-24 17:12:38 -07002407
2408 def __init__(self, value=None, value_mask=None):
2409 if value != None:
2410 self.value = value
2411 else:
2412 self.value = 0
2413 if value_mask != None:
2414 self.value_mask = value_mask
2415 else:
2416 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002417 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002418
2419 def pack(self):
2420 packed = []
2421 packed.append(struct.pack("!L", self.type_len))
2422 packed.append(struct.pack("!L", self.value))
2423 packed.append(struct.pack("!L", self.value_mask))
2424 return ''.join(packed)
2425
2426 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002427 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002428 obj = ipv4_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002429 _type_len = reader.read("!L")[0]
2430 assert(_type_len == 2147490056)
2431 obj.value = reader.read("!L")[0]
2432 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002433 return obj
2434
2435 def __eq__(self, other):
2436 if type(self) != type(other): return False
2437 if self.value != other.value: return False
2438 if self.value_mask != other.value_mask: return False
2439 return True
2440
Rich Lanec2ee4b82013-04-24 17:12:38 -07002441 def pretty_print(self, q):
2442 q.text("ipv4_dst_masked {")
2443 with q.group():
2444 with q.indent(2):
2445 q.breakable()
2446 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07002447 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002448 q.text(","); q.breakable()
2449 q.text("value_mask = ");
Rich Laned53156a2013-08-05 17:17:33 -07002450 q.text(util.pretty_ipv4(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002451 q.breakable()
2452 q.text('}')
2453
Rich Lane7dcdf022013-12-11 14:45:27 -08002454oxm.subtypes[2147490056] = ipv4_dst_masked
2455
2456class ipv4_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002457 type_len = 2147489284
Rich Lanec2ee4b82013-04-24 17:12:38 -07002458
2459 def __init__(self, value=None):
2460 if value != None:
2461 self.value = value
2462 else:
2463 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002464 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002465
2466 def pack(self):
2467 packed = []
2468 packed.append(struct.pack("!L", self.type_len))
2469 packed.append(struct.pack("!L", self.value))
2470 return ''.join(packed)
2471
2472 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002473 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002474 obj = ipv4_src()
Dan Talaycof6202252013-07-02 01:00:29 -07002475 _type_len = reader.read("!L")[0]
2476 assert(_type_len == 2147489284)
2477 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002478 return obj
2479
2480 def __eq__(self, other):
2481 if type(self) != type(other): return False
2482 if self.value != other.value: return False
2483 return True
2484
Rich Lanec2ee4b82013-04-24 17:12:38 -07002485 def pretty_print(self, q):
2486 q.text("ipv4_src {")
2487 with q.group():
2488 with q.indent(2):
2489 q.breakable()
2490 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07002491 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002492 q.breakable()
2493 q.text('}')
2494
Rich Lane7dcdf022013-12-11 14:45:27 -08002495oxm.subtypes[2147489284] = ipv4_src
2496
2497class ipv4_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002498 type_len = 2147489544
Rich Lanec2ee4b82013-04-24 17:12:38 -07002499
2500 def __init__(self, value=None, value_mask=None):
2501 if value != None:
2502 self.value = value
2503 else:
2504 self.value = 0
2505 if value_mask != None:
2506 self.value_mask = value_mask
2507 else:
2508 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002509 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002510
2511 def pack(self):
2512 packed = []
2513 packed.append(struct.pack("!L", self.type_len))
2514 packed.append(struct.pack("!L", self.value))
2515 packed.append(struct.pack("!L", self.value_mask))
2516 return ''.join(packed)
2517
2518 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002519 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002520 obj = ipv4_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002521 _type_len = reader.read("!L")[0]
2522 assert(_type_len == 2147489544)
2523 obj.value = reader.read("!L")[0]
2524 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002525 return obj
2526
2527 def __eq__(self, other):
2528 if type(self) != type(other): return False
2529 if self.value != other.value: return False
2530 if self.value_mask != other.value_mask: return False
2531 return True
2532
Rich Lanec2ee4b82013-04-24 17:12:38 -07002533 def pretty_print(self, q):
2534 q.text("ipv4_src_masked {")
2535 with q.group():
2536 with q.indent(2):
2537 q.breakable()
2538 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07002539 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002540 q.text(","); q.breakable()
2541 q.text("value_mask = ");
Rich Laned53156a2013-08-05 17:17:33 -07002542 q.text(util.pretty_ipv4(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002543 q.breakable()
2544 q.text('}')
2545
Rich Lane7dcdf022013-12-11 14:45:27 -08002546oxm.subtypes[2147489544] = ipv4_src_masked
2547
2548class ipv6_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002549 type_len = 2147497488
Rich Lanec2ee4b82013-04-24 17:12:38 -07002550
2551 def __init__(self, value=None):
2552 if value != None:
2553 self.value = value
2554 else:
2555 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Rich Lane7dcdf022013-12-11 14:45:27 -08002556 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002557
2558 def pack(self):
2559 packed = []
2560 packed.append(struct.pack("!L", self.type_len))
2561 packed.append(struct.pack("!16s", self.value))
2562 return ''.join(packed)
2563
2564 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002565 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002566 obj = ipv6_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07002567 _type_len = reader.read("!L")[0]
2568 assert(_type_len == 2147497488)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002569 obj.value = reader.read('!16s')[0]
2570 return obj
2571
2572 def __eq__(self, other):
2573 if type(self) != type(other): return False
2574 if self.value != other.value: return False
2575 return True
2576
Rich Lanec2ee4b82013-04-24 17:12:38 -07002577 def pretty_print(self, q):
2578 q.text("ipv6_dst {")
2579 with q.group():
2580 with q.indent(2):
2581 q.breakable()
2582 q.text("value = ");
2583 q.pp(self.value)
2584 q.breakable()
2585 q.text('}')
2586
Rich Lane7dcdf022013-12-11 14:45:27 -08002587oxm.subtypes[2147497488] = ipv6_dst
2588
2589class ipv6_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002590 type_len = 2147497760
Rich Lanec2ee4b82013-04-24 17:12:38 -07002591
2592 def __init__(self, value=None, value_mask=None):
2593 if value != None:
2594 self.value = value
2595 else:
2596 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2597 if value_mask != None:
2598 self.value_mask = value_mask
2599 else:
2600 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 -08002601 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002602
2603 def pack(self):
2604 packed = []
2605 packed.append(struct.pack("!L", self.type_len))
2606 packed.append(struct.pack("!16s", self.value))
2607 packed.append(struct.pack("!16s", self.value_mask))
2608 return ''.join(packed)
2609
2610 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002611 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002612 obj = ipv6_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002613 _type_len = reader.read("!L")[0]
2614 assert(_type_len == 2147497760)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002615 obj.value = reader.read('!16s')[0]
2616 obj.value_mask = reader.read('!16s')[0]
2617 return obj
2618
2619 def __eq__(self, other):
2620 if type(self) != type(other): return False
2621 if self.value != other.value: return False
2622 if self.value_mask != other.value_mask: return False
2623 return True
2624
Rich Lanec2ee4b82013-04-24 17:12:38 -07002625 def pretty_print(self, q):
2626 q.text("ipv6_dst_masked {")
2627 with q.group():
2628 with q.indent(2):
2629 q.breakable()
2630 q.text("value = ");
2631 q.pp(self.value)
2632 q.text(","); q.breakable()
2633 q.text("value_mask = ");
2634 q.pp(self.value_mask)
2635 q.breakable()
2636 q.text('}')
2637
Rich Lane7dcdf022013-12-11 14:45:27 -08002638oxm.subtypes[2147497760] = ipv6_dst_masked
2639
2640class ipv6_flabel(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002641 type_len = 2147497988
Rich Lanec2ee4b82013-04-24 17:12:38 -07002642
2643 def __init__(self, value=None):
2644 if value != None:
2645 self.value = value
2646 else:
2647 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002648 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002649
2650 def pack(self):
2651 packed = []
2652 packed.append(struct.pack("!L", self.type_len))
2653 packed.append(struct.pack("!L", self.value))
2654 return ''.join(packed)
2655
2656 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002657 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002658 obj = ipv6_flabel()
Dan Talaycof6202252013-07-02 01:00:29 -07002659 _type_len = reader.read("!L")[0]
2660 assert(_type_len == 2147497988)
2661 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002662 return obj
2663
2664 def __eq__(self, other):
2665 if type(self) != type(other): return False
2666 if self.value != other.value: return False
2667 return True
2668
Rich Lanec2ee4b82013-04-24 17:12:38 -07002669 def pretty_print(self, q):
2670 q.text("ipv6_flabel {")
2671 with q.group():
2672 with q.indent(2):
2673 q.breakable()
2674 q.text("value = ");
2675 q.text("%#x" % self.value)
2676 q.breakable()
2677 q.text('}')
2678
Rich Lane7dcdf022013-12-11 14:45:27 -08002679oxm.subtypes[2147497988] = ipv6_flabel
2680
2681class ipv6_flabel_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002682 type_len = 2147498248
Rich Lanec2ee4b82013-04-24 17:12:38 -07002683
2684 def __init__(self, value=None, value_mask=None):
2685 if value != None:
2686 self.value = value
2687 else:
2688 self.value = 0
2689 if value_mask != None:
2690 self.value_mask = value_mask
2691 else:
2692 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002693 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002694
2695 def pack(self):
2696 packed = []
2697 packed.append(struct.pack("!L", self.type_len))
2698 packed.append(struct.pack("!L", self.value))
2699 packed.append(struct.pack("!L", self.value_mask))
2700 return ''.join(packed)
2701
2702 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002703 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002704 obj = ipv6_flabel_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002705 _type_len = reader.read("!L")[0]
2706 assert(_type_len == 2147498248)
2707 obj.value = reader.read("!L")[0]
2708 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002709 return obj
2710
2711 def __eq__(self, other):
2712 if type(self) != type(other): return False
2713 if self.value != other.value: return False
2714 if self.value_mask != other.value_mask: return False
2715 return True
2716
Rich Lanec2ee4b82013-04-24 17:12:38 -07002717 def pretty_print(self, q):
2718 q.text("ipv6_flabel_masked {")
2719 with q.group():
2720 with q.indent(2):
2721 q.breakable()
2722 q.text("value = ");
2723 q.text("%#x" % self.value)
2724 q.text(","); q.breakable()
2725 q.text("value_mask = ");
2726 q.text("%#x" % self.value_mask)
2727 q.breakable()
2728 q.text('}')
2729
Rich Lane7dcdf022013-12-11 14:45:27 -08002730oxm.subtypes[2147498248] = ipv6_flabel_masked
2731
2732class ipv6_nd_sll(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002733 type_len = 2147500038
Rich Lanec2ee4b82013-04-24 17:12:38 -07002734
2735 def __init__(self, value=None):
2736 if value != None:
2737 self.value = value
2738 else:
2739 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002740 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002741
2742 def pack(self):
2743 packed = []
2744 packed.append(struct.pack("!L", self.type_len))
2745 packed.append(struct.pack("!6B", *self.value))
2746 return ''.join(packed)
2747
2748 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002749 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002750 obj = ipv6_nd_sll()
Dan Talaycof6202252013-07-02 01:00:29 -07002751 _type_len = reader.read("!L")[0]
2752 assert(_type_len == 2147500038)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002753 obj.value = list(reader.read('!6B'))
2754 return obj
2755
2756 def __eq__(self, other):
2757 if type(self) != type(other): return False
2758 if self.value != other.value: return False
2759 return True
2760
Rich Lanec2ee4b82013-04-24 17:12:38 -07002761 def pretty_print(self, q):
2762 q.text("ipv6_nd_sll {")
2763 with q.group():
2764 with q.indent(2):
2765 q.breakable()
2766 q.text("value = ");
2767 q.text(util.pretty_mac(self.value))
2768 q.breakable()
2769 q.text('}')
2770
Rich Lane7dcdf022013-12-11 14:45:27 -08002771oxm.subtypes[2147500038] = ipv6_nd_sll
2772
2773class ipv6_nd_sll_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002774 type_len = 2147500300
Rich Lanec2ee4b82013-04-24 17:12:38 -07002775
2776 def __init__(self, value=None, value_mask=None):
2777 if value != None:
2778 self.value = value
2779 else:
2780 self.value = [0,0,0,0,0,0]
2781 if value_mask != None:
2782 self.value_mask = value_mask
2783 else:
2784 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002785 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002786
2787 def pack(self):
2788 packed = []
2789 packed.append(struct.pack("!L", self.type_len))
2790 packed.append(struct.pack("!6B", *self.value))
2791 packed.append(struct.pack("!6B", *self.value_mask))
2792 return ''.join(packed)
2793
2794 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002795 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002796 obj = ipv6_nd_sll_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002797 _type_len = reader.read("!L")[0]
2798 assert(_type_len == 2147500300)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002799 obj.value = list(reader.read('!6B'))
2800 obj.value_mask = list(reader.read('!6B'))
2801 return obj
2802
2803 def __eq__(self, other):
2804 if type(self) != type(other): return False
2805 if self.value != other.value: return False
2806 if self.value_mask != other.value_mask: return False
2807 return True
2808
Rich Lanec2ee4b82013-04-24 17:12:38 -07002809 def pretty_print(self, q):
2810 q.text("ipv6_nd_sll_masked {")
2811 with q.group():
2812 with q.indent(2):
2813 q.breakable()
2814 q.text("value = ");
2815 q.text(util.pretty_mac(self.value))
2816 q.text(","); q.breakable()
2817 q.text("value_mask = ");
2818 q.text(util.pretty_mac(self.value_mask))
2819 q.breakable()
2820 q.text('}')
2821
Rich Lane7dcdf022013-12-11 14:45:27 -08002822oxm.subtypes[2147500300] = ipv6_nd_sll_masked
2823
2824class ipv6_nd_target(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002825 type_len = 2147499536
Rich Lanec2ee4b82013-04-24 17:12:38 -07002826
2827 def __init__(self, value=None):
2828 if value != None:
2829 self.value = value
2830 else:
2831 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Rich Lane7dcdf022013-12-11 14:45:27 -08002832 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002833
2834 def pack(self):
2835 packed = []
2836 packed.append(struct.pack("!L", self.type_len))
2837 packed.append(struct.pack("!16s", self.value))
2838 return ''.join(packed)
2839
2840 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002841 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002842 obj = ipv6_nd_target()
Dan Talaycof6202252013-07-02 01:00:29 -07002843 _type_len = reader.read("!L")[0]
2844 assert(_type_len == 2147499536)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002845 obj.value = reader.read('!16s')[0]
2846 return obj
2847
2848 def __eq__(self, other):
2849 if type(self) != type(other): return False
2850 if self.value != other.value: return False
2851 return True
2852
Rich Lanec2ee4b82013-04-24 17:12:38 -07002853 def pretty_print(self, q):
2854 q.text("ipv6_nd_target {")
2855 with q.group():
2856 with q.indent(2):
2857 q.breakable()
2858 q.text("value = ");
2859 q.pp(self.value)
2860 q.breakable()
2861 q.text('}')
2862
Rich Lane7dcdf022013-12-11 14:45:27 -08002863oxm.subtypes[2147499536] = ipv6_nd_target
2864
2865class ipv6_nd_target_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002866 type_len = 2147499808
Rich Lanec2ee4b82013-04-24 17:12:38 -07002867
2868 def __init__(self, value=None, value_mask=None):
2869 if value != None:
2870 self.value = value
2871 else:
2872 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2873 if value_mask != None:
2874 self.value_mask = value_mask
2875 else:
2876 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 -08002877 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002878
2879 def pack(self):
2880 packed = []
2881 packed.append(struct.pack("!L", self.type_len))
2882 packed.append(struct.pack("!16s", self.value))
2883 packed.append(struct.pack("!16s", self.value_mask))
2884 return ''.join(packed)
2885
2886 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002887 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002888 obj = ipv6_nd_target_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002889 _type_len = reader.read("!L")[0]
2890 assert(_type_len == 2147499808)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002891 obj.value = reader.read('!16s')[0]
2892 obj.value_mask = reader.read('!16s')[0]
2893 return obj
2894
2895 def __eq__(self, other):
2896 if type(self) != type(other): return False
2897 if self.value != other.value: return False
2898 if self.value_mask != other.value_mask: return False
2899 return True
2900
Rich Lanec2ee4b82013-04-24 17:12:38 -07002901 def pretty_print(self, q):
2902 q.text("ipv6_nd_target_masked {")
2903 with q.group():
2904 with q.indent(2):
2905 q.breakable()
2906 q.text("value = ");
2907 q.pp(self.value)
2908 q.text(","); q.breakable()
2909 q.text("value_mask = ");
2910 q.pp(self.value_mask)
2911 q.breakable()
2912 q.text('}')
2913
Rich Lane7dcdf022013-12-11 14:45:27 -08002914oxm.subtypes[2147499808] = ipv6_nd_target_masked
2915
2916class ipv6_nd_tll(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002917 type_len = 2147500550
Rich Lanec2ee4b82013-04-24 17:12:38 -07002918
2919 def __init__(self, value=None):
2920 if value != None:
2921 self.value = value
2922 else:
2923 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002924 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002925
2926 def pack(self):
2927 packed = []
2928 packed.append(struct.pack("!L", self.type_len))
2929 packed.append(struct.pack("!6B", *self.value))
2930 return ''.join(packed)
2931
2932 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002933 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002934 obj = ipv6_nd_tll()
Dan Talaycof6202252013-07-02 01:00:29 -07002935 _type_len = reader.read("!L")[0]
2936 assert(_type_len == 2147500550)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002937 obj.value = list(reader.read('!6B'))
2938 return obj
2939
2940 def __eq__(self, other):
2941 if type(self) != type(other): return False
2942 if self.value != other.value: return False
2943 return True
2944
Rich Lanec2ee4b82013-04-24 17:12:38 -07002945 def pretty_print(self, q):
2946 q.text("ipv6_nd_tll {")
2947 with q.group():
2948 with q.indent(2):
2949 q.breakable()
2950 q.text("value = ");
2951 q.text(util.pretty_mac(self.value))
2952 q.breakable()
2953 q.text('}')
2954
Rich Lane7dcdf022013-12-11 14:45:27 -08002955oxm.subtypes[2147500550] = ipv6_nd_tll
2956
2957class ipv6_nd_tll_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002958 type_len = 2147500812
Rich Lanec2ee4b82013-04-24 17:12:38 -07002959
2960 def __init__(self, value=None, value_mask=None):
2961 if value != None:
2962 self.value = value
2963 else:
2964 self.value = [0,0,0,0,0,0]
2965 if value_mask != None:
2966 self.value_mask = value_mask
2967 else:
2968 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002969 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002970
2971 def pack(self):
2972 packed = []
2973 packed.append(struct.pack("!L", self.type_len))
2974 packed.append(struct.pack("!6B", *self.value))
2975 packed.append(struct.pack("!6B", *self.value_mask))
2976 return ''.join(packed)
2977
2978 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002979 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002980 obj = ipv6_nd_tll_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002981 _type_len = reader.read("!L")[0]
2982 assert(_type_len == 2147500812)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002983 obj.value = list(reader.read('!6B'))
2984 obj.value_mask = list(reader.read('!6B'))
2985 return obj
2986
2987 def __eq__(self, other):
2988 if type(self) != type(other): return False
2989 if self.value != other.value: return False
2990 if self.value_mask != other.value_mask: return False
2991 return True
2992
Rich Lanec2ee4b82013-04-24 17:12:38 -07002993 def pretty_print(self, q):
2994 q.text("ipv6_nd_tll_masked {")
2995 with q.group():
2996 with q.indent(2):
2997 q.breakable()
2998 q.text("value = ");
2999 q.text(util.pretty_mac(self.value))
3000 q.text(","); q.breakable()
3001 q.text("value_mask = ");
3002 q.text(util.pretty_mac(self.value_mask))
3003 q.breakable()
3004 q.text('}')
3005
Rich Lane7dcdf022013-12-11 14:45:27 -08003006oxm.subtypes[2147500812] = ipv6_nd_tll_masked
3007
3008class ipv6_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003009 type_len = 2147496976
Rich Lanec2ee4b82013-04-24 17:12:38 -07003010
3011 def __init__(self, value=None):
3012 if value != None:
3013 self.value = value
3014 else:
3015 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Rich Lane7dcdf022013-12-11 14:45:27 -08003016 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003017
3018 def pack(self):
3019 packed = []
3020 packed.append(struct.pack("!L", self.type_len))
3021 packed.append(struct.pack("!16s", self.value))
3022 return ''.join(packed)
3023
3024 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003025 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003026 obj = ipv6_src()
Dan Talaycof6202252013-07-02 01:00:29 -07003027 _type_len = reader.read("!L")[0]
3028 assert(_type_len == 2147496976)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003029 obj.value = reader.read('!16s')[0]
3030 return obj
3031
3032 def __eq__(self, other):
3033 if type(self) != type(other): return False
3034 if self.value != other.value: return False
3035 return True
3036
Rich Lanec2ee4b82013-04-24 17:12:38 -07003037 def pretty_print(self, q):
3038 q.text("ipv6_src {")
3039 with q.group():
3040 with q.indent(2):
3041 q.breakable()
3042 q.text("value = ");
3043 q.pp(self.value)
3044 q.breakable()
3045 q.text('}')
3046
Rich Lane7dcdf022013-12-11 14:45:27 -08003047oxm.subtypes[2147496976] = ipv6_src
3048
3049class ipv6_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003050 type_len = 2147497248
Rich Lanec2ee4b82013-04-24 17:12:38 -07003051
3052 def __init__(self, value=None, value_mask=None):
3053 if value != None:
3054 self.value = value
3055 else:
3056 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
3057 if value_mask != None:
3058 self.value_mask = value_mask
3059 else:
3060 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 -08003061 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003062
3063 def pack(self):
3064 packed = []
3065 packed.append(struct.pack("!L", self.type_len))
3066 packed.append(struct.pack("!16s", self.value))
3067 packed.append(struct.pack("!16s", self.value_mask))
3068 return ''.join(packed)
3069
3070 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003071 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003072 obj = ipv6_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003073 _type_len = reader.read("!L")[0]
3074 assert(_type_len == 2147497248)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003075 obj.value = reader.read('!16s')[0]
3076 obj.value_mask = reader.read('!16s')[0]
3077 return obj
3078
3079 def __eq__(self, other):
3080 if type(self) != type(other): return False
3081 if self.value != other.value: return False
3082 if self.value_mask != other.value_mask: return False
3083 return True
3084
Rich Lanec2ee4b82013-04-24 17:12:38 -07003085 def pretty_print(self, q):
3086 q.text("ipv6_src_masked {")
3087 with q.group():
3088 with q.indent(2):
3089 q.breakable()
3090 q.text("value = ");
3091 q.pp(self.value)
3092 q.text(","); q.breakable()
3093 q.text("value_mask = ");
3094 q.pp(self.value_mask)
3095 q.breakable()
3096 q.text('}')
3097
Rich Lane7dcdf022013-12-11 14:45:27 -08003098oxm.subtypes[2147497248] = ipv6_src_masked
3099
3100class metadata(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003101 type_len = 2147484680
Rich Lanec2ee4b82013-04-24 17:12:38 -07003102
3103 def __init__(self, value=None):
3104 if value != None:
3105 self.value = value
3106 else:
3107 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003108 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003109
3110 def pack(self):
3111 packed = []
3112 packed.append(struct.pack("!L", self.type_len))
3113 packed.append(struct.pack("!Q", self.value))
3114 return ''.join(packed)
3115
3116 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003117 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003118 obj = metadata()
Dan Talaycof6202252013-07-02 01:00:29 -07003119 _type_len = reader.read("!L")[0]
3120 assert(_type_len == 2147484680)
3121 obj.value = reader.read("!Q")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003122 return obj
3123
3124 def __eq__(self, other):
3125 if type(self) != type(other): return False
3126 if self.value != other.value: return False
3127 return True
3128
Rich Lanec2ee4b82013-04-24 17:12:38 -07003129 def pretty_print(self, q):
3130 q.text("metadata {")
3131 with q.group():
3132 with q.indent(2):
3133 q.breakable()
3134 q.text("value = ");
3135 q.text("%#x" % self.value)
3136 q.breakable()
3137 q.text('}')
3138
Rich Lane7dcdf022013-12-11 14:45:27 -08003139oxm.subtypes[2147484680] = metadata
3140
3141class metadata_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003142 type_len = 2147484944
Rich Lanec2ee4b82013-04-24 17:12:38 -07003143
3144 def __init__(self, value=None, value_mask=None):
3145 if value != None:
3146 self.value = value
3147 else:
3148 self.value = 0
3149 if value_mask != None:
3150 self.value_mask = value_mask
3151 else:
3152 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003153 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003154
3155 def pack(self):
3156 packed = []
3157 packed.append(struct.pack("!L", self.type_len))
3158 packed.append(struct.pack("!Q", self.value))
3159 packed.append(struct.pack("!Q", self.value_mask))
3160 return ''.join(packed)
3161
3162 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003163 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003164 obj = metadata_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003165 _type_len = reader.read("!L")[0]
3166 assert(_type_len == 2147484944)
3167 obj.value = reader.read("!Q")[0]
3168 obj.value_mask = reader.read("!Q")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003169 return obj
3170
3171 def __eq__(self, other):
3172 if type(self) != type(other): return False
3173 if self.value != other.value: return False
3174 if self.value_mask != other.value_mask: return False
3175 return True
3176
Rich Lanec2ee4b82013-04-24 17:12:38 -07003177 def pretty_print(self, q):
3178 q.text("metadata_masked {")
3179 with q.group():
3180 with q.indent(2):
3181 q.breakable()
3182 q.text("value = ");
3183 q.text("%#x" % self.value)
3184 q.text(","); q.breakable()
3185 q.text("value_mask = ");
3186 q.text("%#x" % self.value_mask)
3187 q.breakable()
3188 q.text('}')
3189
Rich Lane7dcdf022013-12-11 14:45:27 -08003190oxm.subtypes[2147484944] = metadata_masked
3191
3192class mpls_label(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003193 type_len = 2147501060
Rich Lanec2ee4b82013-04-24 17:12:38 -07003194
3195 def __init__(self, value=None):
3196 if value != None:
3197 self.value = value
3198 else:
3199 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003200 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003201
3202 def pack(self):
3203 packed = []
3204 packed.append(struct.pack("!L", self.type_len))
3205 packed.append(struct.pack("!L", self.value))
3206 return ''.join(packed)
3207
3208 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003209 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003210 obj = mpls_label()
Dan Talaycof6202252013-07-02 01:00:29 -07003211 _type_len = reader.read("!L")[0]
3212 assert(_type_len == 2147501060)
3213 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003214 return obj
3215
3216 def __eq__(self, other):
3217 if type(self) != type(other): return False
3218 if self.value != other.value: return False
3219 return True
3220
Rich Lanec2ee4b82013-04-24 17:12:38 -07003221 def pretty_print(self, q):
3222 q.text("mpls_label {")
3223 with q.group():
3224 with q.indent(2):
3225 q.breakable()
3226 q.text("value = ");
3227 q.text("%#x" % self.value)
3228 q.breakable()
3229 q.text('}')
3230
Rich Lane7dcdf022013-12-11 14:45:27 -08003231oxm.subtypes[2147501060] = mpls_label
3232
3233class mpls_label_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003234 type_len = 2147501320
Rich Lanec2ee4b82013-04-24 17:12:38 -07003235
3236 def __init__(self, value=None, value_mask=None):
3237 if value != None:
3238 self.value = value
3239 else:
3240 self.value = 0
3241 if value_mask != None:
3242 self.value_mask = value_mask
3243 else:
3244 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003245 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003246
3247 def pack(self):
3248 packed = []
3249 packed.append(struct.pack("!L", self.type_len))
3250 packed.append(struct.pack("!L", self.value))
3251 packed.append(struct.pack("!L", self.value_mask))
3252 return ''.join(packed)
3253
3254 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003255 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003256 obj = mpls_label_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003257 _type_len = reader.read("!L")[0]
3258 assert(_type_len == 2147501320)
3259 obj.value = reader.read("!L")[0]
3260 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003261 return obj
3262
3263 def __eq__(self, other):
3264 if type(self) != type(other): return False
3265 if self.value != other.value: return False
3266 if self.value_mask != other.value_mask: return False
3267 return True
3268
Rich Lanec2ee4b82013-04-24 17:12:38 -07003269 def pretty_print(self, q):
3270 q.text("mpls_label_masked {")
3271 with q.group():
3272 with q.indent(2):
3273 q.breakable()
3274 q.text("value = ");
3275 q.text("%#x" % self.value)
3276 q.text(","); q.breakable()
3277 q.text("value_mask = ");
3278 q.text("%#x" % self.value_mask)
3279 q.breakable()
3280 q.text('}')
3281
Rich Lane7dcdf022013-12-11 14:45:27 -08003282oxm.subtypes[2147501320] = mpls_label_masked
3283
3284class mpls_tc(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003285 type_len = 2147501569
Rich Lanec2ee4b82013-04-24 17:12:38 -07003286
3287 def __init__(self, value=None):
3288 if value != None:
3289 self.value = value
3290 else:
3291 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003292 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003293
3294 def pack(self):
3295 packed = []
3296 packed.append(struct.pack("!L", self.type_len))
3297 packed.append(struct.pack("!B", self.value))
3298 return ''.join(packed)
3299
3300 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003301 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003302 obj = mpls_tc()
Dan Talaycof6202252013-07-02 01:00:29 -07003303 _type_len = reader.read("!L")[0]
3304 assert(_type_len == 2147501569)
3305 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003306 return obj
3307
3308 def __eq__(self, other):
3309 if type(self) != type(other): return False
3310 if self.value != other.value: return False
3311 return True
3312
Rich Lanec2ee4b82013-04-24 17:12:38 -07003313 def pretty_print(self, q):
3314 q.text("mpls_tc {")
3315 with q.group():
3316 with q.indent(2):
3317 q.breakable()
3318 q.text("value = ");
3319 q.text("%#x" % self.value)
3320 q.breakable()
3321 q.text('}')
3322
Rich Lane7dcdf022013-12-11 14:45:27 -08003323oxm.subtypes[2147501569] = mpls_tc
3324
3325class mpls_tc_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003326 type_len = 2147501826
Rich Lanec2ee4b82013-04-24 17:12:38 -07003327
3328 def __init__(self, value=None, value_mask=None):
3329 if value != None:
3330 self.value = value
3331 else:
3332 self.value = 0
3333 if value_mask != None:
3334 self.value_mask = value_mask
3335 else:
3336 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003337 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003338
3339 def pack(self):
3340 packed = []
3341 packed.append(struct.pack("!L", self.type_len))
3342 packed.append(struct.pack("!B", self.value))
3343 packed.append(struct.pack("!B", self.value_mask))
3344 return ''.join(packed)
3345
3346 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003347 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003348 obj = mpls_tc_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003349 _type_len = reader.read("!L")[0]
3350 assert(_type_len == 2147501826)
3351 obj.value = reader.read("!B")[0]
3352 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003353 return obj
3354
3355 def __eq__(self, other):
3356 if type(self) != type(other): return False
3357 if self.value != other.value: return False
3358 if self.value_mask != other.value_mask: return False
3359 return True
3360
Rich Lanec2ee4b82013-04-24 17:12:38 -07003361 def pretty_print(self, q):
3362 q.text("mpls_tc_masked {")
3363 with q.group():
3364 with q.indent(2):
3365 q.breakable()
3366 q.text("value = ");
3367 q.text("%#x" % self.value)
3368 q.text(","); q.breakable()
3369 q.text("value_mask = ");
3370 q.text("%#x" % self.value_mask)
3371 q.breakable()
3372 q.text('}')
3373
Rich Lane7dcdf022013-12-11 14:45:27 -08003374oxm.subtypes[2147501826] = mpls_tc_masked
3375
3376class sctp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003377 type_len = 2147492866
Rich Lanec2ee4b82013-04-24 17:12:38 -07003378
3379 def __init__(self, value=None):
3380 if value != None:
3381 self.value = value
3382 else:
3383 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003384 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003385
3386 def pack(self):
3387 packed = []
3388 packed.append(struct.pack("!L", self.type_len))
3389 packed.append(struct.pack("!H", self.value))
3390 return ''.join(packed)
3391
3392 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003393 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003394 obj = sctp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003395 _type_len = reader.read("!L")[0]
3396 assert(_type_len == 2147492866)
3397 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003398 return obj
3399
3400 def __eq__(self, other):
3401 if type(self) != type(other): return False
3402 if self.value != other.value: return False
3403 return True
3404
Rich Lanec2ee4b82013-04-24 17:12:38 -07003405 def pretty_print(self, q):
3406 q.text("sctp_dst {")
3407 with q.group():
3408 with q.indent(2):
3409 q.breakable()
3410 q.text("value = ");
3411 q.text("%#x" % self.value)
3412 q.breakable()
3413 q.text('}')
3414
Rich Lane7dcdf022013-12-11 14:45:27 -08003415oxm.subtypes[2147492866] = sctp_dst
3416
3417class sctp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003418 type_len = 2147493124
Rich Lanec2ee4b82013-04-24 17:12:38 -07003419
3420 def __init__(self, value=None, value_mask=None):
3421 if value != None:
3422 self.value = value
3423 else:
3424 self.value = 0
3425 if value_mask != None:
3426 self.value_mask = value_mask
3427 else:
3428 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003429 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003430
3431 def pack(self):
3432 packed = []
3433 packed.append(struct.pack("!L", self.type_len))
3434 packed.append(struct.pack("!H", self.value))
3435 packed.append(struct.pack("!H", self.value_mask))
3436 return ''.join(packed)
3437
3438 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003439 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003440 obj = sctp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003441 _type_len = reader.read("!L")[0]
3442 assert(_type_len == 2147493124)
3443 obj.value = reader.read("!H")[0]
3444 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003445 return obj
3446
3447 def __eq__(self, other):
3448 if type(self) != type(other): return False
3449 if self.value != other.value: return False
3450 if self.value_mask != other.value_mask: return False
3451 return True
3452
Rich Lanec2ee4b82013-04-24 17:12:38 -07003453 def pretty_print(self, q):
3454 q.text("sctp_dst_masked {")
3455 with q.group():
3456 with q.indent(2):
3457 q.breakable()
3458 q.text("value = ");
3459 q.text("%#x" % self.value)
3460 q.text(","); q.breakable()
3461 q.text("value_mask = ");
3462 q.text("%#x" % self.value_mask)
3463 q.breakable()
3464 q.text('}')
3465
Rich Lane7dcdf022013-12-11 14:45:27 -08003466oxm.subtypes[2147493124] = sctp_dst_masked
3467
3468class sctp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003469 type_len = 2147492354
Rich Lanec2ee4b82013-04-24 17:12:38 -07003470
3471 def __init__(self, value=None):
3472 if value != None:
3473 self.value = value
3474 else:
3475 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003476 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003477
3478 def pack(self):
3479 packed = []
3480 packed.append(struct.pack("!L", self.type_len))
3481 packed.append(struct.pack("!H", self.value))
3482 return ''.join(packed)
3483
3484 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003485 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003486 obj = sctp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07003487 _type_len = reader.read("!L")[0]
3488 assert(_type_len == 2147492354)
3489 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003490 return obj
3491
3492 def __eq__(self, other):
3493 if type(self) != type(other): return False
3494 if self.value != other.value: return False
3495 return True
3496
Rich Lanec2ee4b82013-04-24 17:12:38 -07003497 def pretty_print(self, q):
3498 q.text("sctp_src {")
3499 with q.group():
3500 with q.indent(2):
3501 q.breakable()
3502 q.text("value = ");
3503 q.text("%#x" % self.value)
3504 q.breakable()
3505 q.text('}')
3506
Rich Lane7dcdf022013-12-11 14:45:27 -08003507oxm.subtypes[2147492354] = sctp_src
3508
3509class sctp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003510 type_len = 2147492612
Rich Lanec2ee4b82013-04-24 17:12:38 -07003511
3512 def __init__(self, value=None, value_mask=None):
3513 if value != None:
3514 self.value = value
3515 else:
3516 self.value = 0
3517 if value_mask != None:
3518 self.value_mask = value_mask
3519 else:
3520 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003521 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003522
3523 def pack(self):
3524 packed = []
3525 packed.append(struct.pack("!L", self.type_len))
3526 packed.append(struct.pack("!H", self.value))
3527 packed.append(struct.pack("!H", self.value_mask))
3528 return ''.join(packed)
3529
3530 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003531 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003532 obj = sctp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003533 _type_len = reader.read("!L")[0]
3534 assert(_type_len == 2147492612)
3535 obj.value = reader.read("!H")[0]
3536 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003537 return obj
3538
3539 def __eq__(self, other):
3540 if type(self) != type(other): return False
3541 if self.value != other.value: return False
3542 if self.value_mask != other.value_mask: return False
3543 return True
3544
Rich Lanec2ee4b82013-04-24 17:12:38 -07003545 def pretty_print(self, q):
3546 q.text("sctp_src_masked {")
3547 with q.group():
3548 with q.indent(2):
3549 q.breakable()
3550 q.text("value = ");
3551 q.text("%#x" % self.value)
3552 q.text(","); q.breakable()
3553 q.text("value_mask = ");
3554 q.text("%#x" % self.value_mask)
3555 q.breakable()
3556 q.text('}')
3557
Rich Lane7dcdf022013-12-11 14:45:27 -08003558oxm.subtypes[2147492612] = sctp_src_masked
3559
3560class tcp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003561 type_len = 2147490818
Rich Lanec2ee4b82013-04-24 17:12:38 -07003562
3563 def __init__(self, value=None):
3564 if value != None:
3565 self.value = value
3566 else:
3567 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003568 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003569
3570 def pack(self):
3571 packed = []
3572 packed.append(struct.pack("!L", self.type_len))
3573 packed.append(struct.pack("!H", self.value))
3574 return ''.join(packed)
3575
3576 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003577 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003578 obj = tcp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003579 _type_len = reader.read("!L")[0]
3580 assert(_type_len == 2147490818)
3581 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003582 return obj
3583
3584 def __eq__(self, other):
3585 if type(self) != type(other): return False
3586 if self.value != other.value: return False
3587 return True
3588
Rich Lanec2ee4b82013-04-24 17:12:38 -07003589 def pretty_print(self, q):
3590 q.text("tcp_dst {")
3591 with q.group():
3592 with q.indent(2):
3593 q.breakable()
3594 q.text("value = ");
3595 q.text("%#x" % self.value)
3596 q.breakable()
3597 q.text('}')
3598
Rich Lane7dcdf022013-12-11 14:45:27 -08003599oxm.subtypes[2147490818] = tcp_dst
3600
3601class tcp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003602 type_len = 2147491076
Rich Lanec2ee4b82013-04-24 17:12:38 -07003603
3604 def __init__(self, value=None, value_mask=None):
3605 if value != None:
3606 self.value = value
3607 else:
3608 self.value = 0
3609 if value_mask != None:
3610 self.value_mask = value_mask
3611 else:
3612 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003613 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003614
3615 def pack(self):
3616 packed = []
3617 packed.append(struct.pack("!L", self.type_len))
3618 packed.append(struct.pack("!H", self.value))
3619 packed.append(struct.pack("!H", self.value_mask))
3620 return ''.join(packed)
3621
3622 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003623 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003624 obj = tcp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003625 _type_len = reader.read("!L")[0]
3626 assert(_type_len == 2147491076)
3627 obj.value = reader.read("!H")[0]
3628 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003629 return obj
3630
3631 def __eq__(self, other):
3632 if type(self) != type(other): return False
3633 if self.value != other.value: return False
3634 if self.value_mask != other.value_mask: return False
3635 return True
3636
Rich Lanec2ee4b82013-04-24 17:12:38 -07003637 def pretty_print(self, q):
3638 q.text("tcp_dst_masked {")
3639 with q.group():
3640 with q.indent(2):
3641 q.breakable()
3642 q.text("value = ");
3643 q.text("%#x" % self.value)
3644 q.text(","); q.breakable()
3645 q.text("value_mask = ");
3646 q.text("%#x" % self.value_mask)
3647 q.breakable()
3648 q.text('}')
3649
Rich Lane7dcdf022013-12-11 14:45:27 -08003650oxm.subtypes[2147491076] = tcp_dst_masked
3651
3652class tcp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003653 type_len = 2147490306
Rich Lanec2ee4b82013-04-24 17:12:38 -07003654
3655 def __init__(self, value=None):
3656 if value != None:
3657 self.value = value
3658 else:
3659 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003660 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003661
3662 def pack(self):
3663 packed = []
3664 packed.append(struct.pack("!L", self.type_len))
3665 packed.append(struct.pack("!H", self.value))
3666 return ''.join(packed)
3667
3668 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003669 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003670 obj = tcp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07003671 _type_len = reader.read("!L")[0]
3672 assert(_type_len == 2147490306)
3673 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003674 return obj
3675
3676 def __eq__(self, other):
3677 if type(self) != type(other): return False
3678 if self.value != other.value: return False
3679 return True
3680
Rich Lanec2ee4b82013-04-24 17:12:38 -07003681 def pretty_print(self, q):
3682 q.text("tcp_src {")
3683 with q.group():
3684 with q.indent(2):
3685 q.breakable()
3686 q.text("value = ");
3687 q.text("%#x" % self.value)
3688 q.breakable()
3689 q.text('}')
3690
Rich Lane7dcdf022013-12-11 14:45:27 -08003691oxm.subtypes[2147490306] = tcp_src
3692
3693class tcp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003694 type_len = 2147490564
Rich Lanec2ee4b82013-04-24 17:12:38 -07003695
3696 def __init__(self, value=None, value_mask=None):
3697 if value != None:
3698 self.value = value
3699 else:
3700 self.value = 0
3701 if value_mask != None:
3702 self.value_mask = value_mask
3703 else:
3704 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003705 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003706
3707 def pack(self):
3708 packed = []
3709 packed.append(struct.pack("!L", self.type_len))
3710 packed.append(struct.pack("!H", self.value))
3711 packed.append(struct.pack("!H", self.value_mask))
3712 return ''.join(packed)
3713
3714 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003715 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003716 obj = tcp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003717 _type_len = reader.read("!L")[0]
3718 assert(_type_len == 2147490564)
3719 obj.value = reader.read("!H")[0]
3720 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003721 return obj
3722
3723 def __eq__(self, other):
3724 if type(self) != type(other): return False
3725 if self.value != other.value: return False
3726 if self.value_mask != other.value_mask: return False
3727 return True
3728
Rich Lanec2ee4b82013-04-24 17:12:38 -07003729 def pretty_print(self, q):
3730 q.text("tcp_src_masked {")
3731 with q.group():
3732 with q.indent(2):
3733 q.breakable()
3734 q.text("value = ");
3735 q.text("%#x" % self.value)
3736 q.text(","); q.breakable()
3737 q.text("value_mask = ");
3738 q.text("%#x" % self.value_mask)
3739 q.breakable()
3740 q.text('}')
3741
Rich Lane7dcdf022013-12-11 14:45:27 -08003742oxm.subtypes[2147490564] = tcp_src_masked
3743
3744class udp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003745 type_len = 2147491842
Rich Lanec2ee4b82013-04-24 17:12:38 -07003746
3747 def __init__(self, value=None):
3748 if value != None:
3749 self.value = value
3750 else:
3751 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003752 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003753
3754 def pack(self):
3755 packed = []
3756 packed.append(struct.pack("!L", self.type_len))
3757 packed.append(struct.pack("!H", self.value))
3758 return ''.join(packed)
3759
3760 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003761 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003762 obj = udp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003763 _type_len = reader.read("!L")[0]
3764 assert(_type_len == 2147491842)
3765 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003766 return obj
3767
3768 def __eq__(self, other):
3769 if type(self) != type(other): return False
3770 if self.value != other.value: return False
3771 return True
3772
Rich Lanec2ee4b82013-04-24 17:12:38 -07003773 def pretty_print(self, q):
3774 q.text("udp_dst {")
3775 with q.group():
3776 with q.indent(2):
3777 q.breakable()
3778 q.text("value = ");
3779 q.text("%#x" % self.value)
3780 q.breakable()
3781 q.text('}')
3782
Rich Lane7dcdf022013-12-11 14:45:27 -08003783oxm.subtypes[2147491842] = udp_dst
3784
3785class udp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003786 type_len = 2147492100
Rich Lanec2ee4b82013-04-24 17:12:38 -07003787
3788 def __init__(self, value=None, value_mask=None):
3789 if value != None:
3790 self.value = value
3791 else:
3792 self.value = 0
3793 if value_mask != None:
3794 self.value_mask = value_mask
3795 else:
3796 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003797 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003798
3799 def pack(self):
3800 packed = []
3801 packed.append(struct.pack("!L", self.type_len))
3802 packed.append(struct.pack("!H", self.value))
3803 packed.append(struct.pack("!H", self.value_mask))
3804 return ''.join(packed)
3805
3806 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003807 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003808 obj = udp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003809 _type_len = reader.read("!L")[0]
3810 assert(_type_len == 2147492100)
3811 obj.value = reader.read("!H")[0]
3812 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003813 return obj
3814
3815 def __eq__(self, other):
3816 if type(self) != type(other): return False
3817 if self.value != other.value: return False
3818 if self.value_mask != other.value_mask: return False
3819 return True
3820
Rich Lanec2ee4b82013-04-24 17:12:38 -07003821 def pretty_print(self, q):
3822 q.text("udp_dst_masked {")
3823 with q.group():
3824 with q.indent(2):
3825 q.breakable()
3826 q.text("value = ");
3827 q.text("%#x" % self.value)
3828 q.text(","); q.breakable()
3829 q.text("value_mask = ");
3830 q.text("%#x" % self.value_mask)
3831 q.breakable()
3832 q.text('}')
3833
Rich Lane7dcdf022013-12-11 14:45:27 -08003834oxm.subtypes[2147492100] = udp_dst_masked
3835
3836class udp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003837 type_len = 2147491330
Rich Lanec2ee4b82013-04-24 17:12:38 -07003838
3839 def __init__(self, value=None):
3840 if value != None:
3841 self.value = value
3842 else:
3843 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003844 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003845
3846 def pack(self):
3847 packed = []
3848 packed.append(struct.pack("!L", self.type_len))
3849 packed.append(struct.pack("!H", self.value))
3850 return ''.join(packed)
3851
3852 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003853 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003854 obj = udp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07003855 _type_len = reader.read("!L")[0]
3856 assert(_type_len == 2147491330)
3857 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003858 return obj
3859
3860 def __eq__(self, other):
3861 if type(self) != type(other): return False
3862 if self.value != other.value: return False
3863 return True
3864
Rich Lanec2ee4b82013-04-24 17:12:38 -07003865 def pretty_print(self, q):
3866 q.text("udp_src {")
3867 with q.group():
3868 with q.indent(2):
3869 q.breakable()
3870 q.text("value = ");
3871 q.text("%#x" % self.value)
3872 q.breakable()
3873 q.text('}')
3874
Rich Lane7dcdf022013-12-11 14:45:27 -08003875oxm.subtypes[2147491330] = udp_src
3876
3877class udp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003878 type_len = 2147491588
Rich Lanec2ee4b82013-04-24 17:12:38 -07003879
3880 def __init__(self, value=None, value_mask=None):
3881 if value != None:
3882 self.value = value
3883 else:
3884 self.value = 0
3885 if value_mask != None:
3886 self.value_mask = value_mask
3887 else:
3888 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003889 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003890
3891 def pack(self):
3892 packed = []
3893 packed.append(struct.pack("!L", self.type_len))
3894 packed.append(struct.pack("!H", self.value))
3895 packed.append(struct.pack("!H", self.value_mask))
3896 return ''.join(packed)
3897
3898 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003899 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003900 obj = udp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003901 _type_len = reader.read("!L")[0]
3902 assert(_type_len == 2147491588)
3903 obj.value = reader.read("!H")[0]
3904 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003905 return obj
3906
3907 def __eq__(self, other):
3908 if type(self) != type(other): return False
3909 if self.value != other.value: return False
3910 if self.value_mask != other.value_mask: return False
3911 return True
3912
Rich Lanec2ee4b82013-04-24 17:12:38 -07003913 def pretty_print(self, q):
3914 q.text("udp_src_masked {")
3915 with q.group():
3916 with q.indent(2):
3917 q.breakable()
3918 q.text("value = ");
3919 q.text("%#x" % self.value)
3920 q.text(","); q.breakable()
3921 q.text("value_mask = ");
3922 q.text("%#x" % self.value_mask)
3923 q.breakable()
3924 q.text('}')
3925
Rich Lane7dcdf022013-12-11 14:45:27 -08003926oxm.subtypes[2147491588] = udp_src_masked
3927
3928class vlan_pcp(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003929 type_len = 2147487233
Rich Lanec2ee4b82013-04-24 17:12:38 -07003930
3931 def __init__(self, value=None):
3932 if value != None:
3933 self.value = value
3934 else:
3935 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003936 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003937
3938 def pack(self):
3939 packed = []
3940 packed.append(struct.pack("!L", self.type_len))
3941 packed.append(struct.pack("!B", self.value))
3942 return ''.join(packed)
3943
3944 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003945 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003946 obj = vlan_pcp()
Dan Talaycof6202252013-07-02 01:00:29 -07003947 _type_len = reader.read("!L")[0]
3948 assert(_type_len == 2147487233)
3949 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003950 return obj
3951
3952 def __eq__(self, other):
3953 if type(self) != type(other): return False
3954 if self.value != other.value: return False
3955 return True
3956
Rich Lanec2ee4b82013-04-24 17:12:38 -07003957 def pretty_print(self, q):
3958 q.text("vlan_pcp {")
3959 with q.group():
3960 with q.indent(2):
3961 q.breakable()
3962 q.text("value = ");
3963 q.text("%#x" % self.value)
3964 q.breakable()
3965 q.text('}')
3966
Rich Lane7dcdf022013-12-11 14:45:27 -08003967oxm.subtypes[2147487233] = vlan_pcp
3968
3969class vlan_pcp_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003970 type_len = 2147487490
Rich Lanec2ee4b82013-04-24 17:12:38 -07003971
3972 def __init__(self, value=None, value_mask=None):
3973 if value != None:
3974 self.value = value
3975 else:
3976 self.value = 0
3977 if value_mask != None:
3978 self.value_mask = value_mask
3979 else:
3980 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003981 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003982
3983 def pack(self):
3984 packed = []
3985 packed.append(struct.pack("!L", self.type_len))
3986 packed.append(struct.pack("!B", self.value))
3987 packed.append(struct.pack("!B", self.value_mask))
3988 return ''.join(packed)
3989
3990 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003991 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003992 obj = vlan_pcp_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003993 _type_len = reader.read("!L")[0]
3994 assert(_type_len == 2147487490)
3995 obj.value = reader.read("!B")[0]
3996 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003997 return obj
3998
3999 def __eq__(self, other):
4000 if type(self) != type(other): return False
4001 if self.value != other.value: return False
4002 if self.value_mask != other.value_mask: return False
4003 return True
4004
Rich Lanec2ee4b82013-04-24 17:12:38 -07004005 def pretty_print(self, q):
4006 q.text("vlan_pcp_masked {")
4007 with q.group():
4008 with q.indent(2):
4009 q.breakable()
4010 q.text("value = ");
4011 q.text("%#x" % self.value)
4012 q.text(","); q.breakable()
4013 q.text("value_mask = ");
4014 q.text("%#x" % self.value_mask)
4015 q.breakable()
4016 q.text('}')
4017
Rich Lane7dcdf022013-12-11 14:45:27 -08004018oxm.subtypes[2147487490] = vlan_pcp_masked
4019
4020class vlan_vid(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004021 type_len = 2147486722
Rich Lanec2ee4b82013-04-24 17:12:38 -07004022
4023 def __init__(self, value=None):
4024 if value != None:
4025 self.value = value
4026 else:
4027 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004028 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004029
4030 def pack(self):
4031 packed = []
4032 packed.append(struct.pack("!L", self.type_len))
4033 packed.append(struct.pack("!H", self.value))
4034 return ''.join(packed)
4035
4036 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004037 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004038 obj = vlan_vid()
Dan Talaycof6202252013-07-02 01:00:29 -07004039 _type_len = reader.read("!L")[0]
4040 assert(_type_len == 2147486722)
4041 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004042 return obj
4043
4044 def __eq__(self, other):
4045 if type(self) != type(other): return False
4046 if self.value != other.value: return False
4047 return True
4048
Rich Lanec2ee4b82013-04-24 17:12:38 -07004049 def pretty_print(self, q):
4050 q.text("vlan_vid {")
4051 with q.group():
4052 with q.indent(2):
4053 q.breakable()
4054 q.text("value = ");
4055 q.text("%#x" % self.value)
4056 q.breakable()
4057 q.text('}')
4058
Rich Lane7dcdf022013-12-11 14:45:27 -08004059oxm.subtypes[2147486722] = vlan_vid
4060
4061class vlan_vid_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004062 type_len = 2147486980
Rich Lanec2ee4b82013-04-24 17:12:38 -07004063
4064 def __init__(self, value=None, value_mask=None):
4065 if value != None:
4066 self.value = value
4067 else:
4068 self.value = 0
4069 if value_mask != None:
4070 self.value_mask = value_mask
4071 else:
4072 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004073 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004074
4075 def pack(self):
4076 packed = []
4077 packed.append(struct.pack("!L", self.type_len))
4078 packed.append(struct.pack("!H", self.value))
4079 packed.append(struct.pack("!H", self.value_mask))
4080 return ''.join(packed)
4081
4082 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004083 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004084 obj = vlan_vid_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004085 _type_len = reader.read("!L")[0]
4086 assert(_type_len == 2147486980)
4087 obj.value = reader.read("!H")[0]
4088 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004089 return obj
4090
4091 def __eq__(self, other):
4092 if type(self) != type(other): return False
4093 if self.value != other.value: return False
4094 if self.value_mask != other.value_mask: return False
4095 return True
4096
Rich Lanec2ee4b82013-04-24 17:12:38 -07004097 def pretty_print(self, q):
4098 q.text("vlan_vid_masked {")
4099 with q.group():
4100 with q.indent(2):
4101 q.breakable()
4102 q.text("value = ");
4103 q.text("%#x" % self.value)
4104 q.text(","); q.breakable()
4105 q.text("value_mask = ");
4106 q.text("%#x" % self.value_mask)
4107 q.breakable()
4108 q.text('}')
4109
Rich Lane7dcdf022013-12-11 14:45:27 -08004110oxm.subtypes[2147486980] = vlan_vid_masked
Rich Lanec2ee4b82013-04-24 17:12:38 -07004111
Rich Lane7dcdf022013-12-11 14:45:27 -08004112