blob: 56da4d01c566ff40677471047737d4ae415ea7e8 [file] [log] [blame]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001# Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
2# Copyright (c) 2011, 2012 Open Networking Foundation
3# Copyright (c) 2012, 2013 Big Switch Networks, Inc.
Dan Talaycof6202252013-07-02 01:00:29 -07004# See the file LICENSE.pyloxi which should have been included in the source distribution
Rich Lanec2ee4b82013-04-24 17:12:38 -07005
Rich Lane7dcdf022013-12-11 14:45:27 -08006# Automatically generated by LOXI from template module.py
Rich Lanec2ee4b82013-04-24 17:12:38 -07007# Do not modify
8
9import struct
Rich Lane7dcdf022013-12-11 14:45:27 -080010import loxi
Rich Lanec2ee4b82013-04-24 17:12:38 -070011import const
Rich Lane7dcdf022013-12-11 14:45:27 -080012import common
13import action
14import instruction
15import oxm
Rich Lanec2ee4b82013-04-24 17:12:38 -070016import util
17import loxi.generic_util
Rich Lanec2ee4b82013-04-24 17:12:38 -070018
Rich Lane7dcdf022013-12-11 14:45:27 -080019class oxm(loxi.OFObject):
20 subtypes = {}
Rich Laned53156a2013-08-05 17:17:33 -070021
Rich Lane7dcdf022013-12-11 14:45:27 -080022 @staticmethod
23 def unpack(reader):
24 subtype, = reader.peek('!L', 0)
25 try:
26 subclass = oxm.subtypes[subtype]
27 except KeyError:
28 raise loxi.ProtocolError("unknown oxm subtype %#x" % subtype)
29 return subclass.unpack(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -070030
Rich Lanec2ee4b82013-04-24 17:12:38 -070031
Rich Lane7dcdf022013-12-11 14:45:27 -080032class arp_op(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -070033 type_len = 2147494402
Rich Lanec2ee4b82013-04-24 17:12:38 -070034
35 def __init__(self, value=None):
36 if value != None:
37 self.value = value
38 else:
39 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -080040 return
Rich Lanec2ee4b82013-04-24 17:12:38 -070041
42 def pack(self):
43 packed = []
44 packed.append(struct.pack("!L", self.type_len))
45 packed.append(struct.pack("!H", self.value))
46 return ''.join(packed)
47
48 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -080049 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -070050 obj = arp_op()
Dan Talaycof6202252013-07-02 01:00:29 -070051 _type_len = reader.read("!L")[0]
52 assert(_type_len == 2147494402)
53 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -070054 return obj
55
56 def __eq__(self, other):
57 if type(self) != type(other): return False
58 if self.value != other.value: return False
59 return True
60
Rich Lanec2ee4b82013-04-24 17:12:38 -070061 def pretty_print(self, q):
62 q.text("arp_op {")
63 with q.group():
64 with q.indent(2):
65 q.breakable()
66 q.text("value = ");
67 q.text("%#x" % self.value)
68 q.breakable()
69 q.text('}')
70
Rich Lane7dcdf022013-12-11 14:45:27 -080071oxm.subtypes[2147494402] = arp_op
72
73class arp_op_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -070074 type_len = 2147494660
Rich Lanec2ee4b82013-04-24 17:12:38 -070075
76 def __init__(self, value=None, value_mask=None):
77 if value != None:
78 self.value = value
79 else:
80 self.value = 0
81 if value_mask != None:
82 self.value_mask = value_mask
83 else:
84 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -080085 return
Rich Lanec2ee4b82013-04-24 17:12:38 -070086
87 def pack(self):
88 packed = []
89 packed.append(struct.pack("!L", self.type_len))
90 packed.append(struct.pack("!H", self.value))
91 packed.append(struct.pack("!H", self.value_mask))
92 return ''.join(packed)
93
94 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -080095 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -070096 obj = arp_op_masked()
Dan Talaycof6202252013-07-02 01:00:29 -070097 _type_len = reader.read("!L")[0]
98 assert(_type_len == 2147494660)
99 obj.value = reader.read("!H")[0]
100 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700101 return obj
102
103 def __eq__(self, other):
104 if type(self) != type(other): return False
105 if self.value != other.value: return False
106 if self.value_mask != other.value_mask: return False
107 return True
108
Rich Lanec2ee4b82013-04-24 17:12:38 -0700109 def pretty_print(self, q):
110 q.text("arp_op_masked {")
111 with q.group():
112 with q.indent(2):
113 q.breakable()
114 q.text("value = ");
115 q.text("%#x" % self.value)
116 q.text(","); q.breakable()
117 q.text("value_mask = ");
118 q.text("%#x" % self.value_mask)
119 q.breakable()
120 q.text('}')
121
Rich Lane7dcdf022013-12-11 14:45:27 -0800122oxm.subtypes[2147494660] = arp_op_masked
123
124class arp_sha(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700125 type_len = 2147495942
Rich Lanec2ee4b82013-04-24 17:12:38 -0700126
127 def __init__(self, value=None):
128 if value != None:
129 self.value = value
130 else:
131 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800132 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700133
134 def pack(self):
135 packed = []
136 packed.append(struct.pack("!L", self.type_len))
137 packed.append(struct.pack("!6B", *self.value))
138 return ''.join(packed)
139
140 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800141 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700142 obj = arp_sha()
Dan Talaycof6202252013-07-02 01:00:29 -0700143 _type_len = reader.read("!L")[0]
144 assert(_type_len == 2147495942)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700145 obj.value = list(reader.read('!6B'))
146 return obj
147
148 def __eq__(self, other):
149 if type(self) != type(other): return False
150 if self.value != other.value: return False
151 return True
152
Rich Lanec2ee4b82013-04-24 17:12:38 -0700153 def pretty_print(self, q):
154 q.text("arp_sha {")
155 with q.group():
156 with q.indent(2):
157 q.breakable()
158 q.text("value = ");
159 q.text(util.pretty_mac(self.value))
160 q.breakable()
161 q.text('}')
162
Rich Lane7dcdf022013-12-11 14:45:27 -0800163oxm.subtypes[2147495942] = arp_sha
164
165class arp_sha_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700166 type_len = 2147496204
Rich Lanec2ee4b82013-04-24 17:12:38 -0700167
168 def __init__(self, value=None, value_mask=None):
169 if value != None:
170 self.value = value
171 else:
172 self.value = [0,0,0,0,0,0]
173 if value_mask != None:
174 self.value_mask = value_mask
175 else:
176 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800177 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700178
179 def pack(self):
180 packed = []
181 packed.append(struct.pack("!L", self.type_len))
182 packed.append(struct.pack("!6B", *self.value))
183 packed.append(struct.pack("!6B", *self.value_mask))
184 return ''.join(packed)
185
186 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800187 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700188 obj = arp_sha_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700189 _type_len = reader.read("!L")[0]
190 assert(_type_len == 2147496204)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700191 obj.value = list(reader.read('!6B'))
192 obj.value_mask = list(reader.read('!6B'))
193 return obj
194
195 def __eq__(self, other):
196 if type(self) != type(other): return False
197 if self.value != other.value: return False
198 if self.value_mask != other.value_mask: return False
199 return True
200
Rich Lanec2ee4b82013-04-24 17:12:38 -0700201 def pretty_print(self, q):
202 q.text("arp_sha_masked {")
203 with q.group():
204 with q.indent(2):
205 q.breakable()
206 q.text("value = ");
207 q.text(util.pretty_mac(self.value))
208 q.text(","); q.breakable()
209 q.text("value_mask = ");
210 q.text(util.pretty_mac(self.value_mask))
211 q.breakable()
212 q.text('}')
213
Rich Lane7dcdf022013-12-11 14:45:27 -0800214oxm.subtypes[2147496204] = arp_sha_masked
215
216class arp_spa(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700217 type_len = 2147494916
Rich Lanec2ee4b82013-04-24 17:12:38 -0700218
219 def __init__(self, value=None):
220 if value != None:
221 self.value = value
222 else:
223 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800224 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700225
226 def pack(self):
227 packed = []
228 packed.append(struct.pack("!L", self.type_len))
229 packed.append(struct.pack("!L", self.value))
230 return ''.join(packed)
231
232 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800233 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700234 obj = arp_spa()
Dan Talaycof6202252013-07-02 01:00:29 -0700235 _type_len = reader.read("!L")[0]
236 assert(_type_len == 2147494916)
237 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700238 return obj
239
240 def __eq__(self, other):
241 if type(self) != type(other): return False
242 if self.value != other.value: return False
243 return True
244
Rich Lanec2ee4b82013-04-24 17:12:38 -0700245 def pretty_print(self, q):
246 q.text("arp_spa {")
247 with q.group():
248 with q.indent(2):
249 q.breakable()
250 q.text("value = ");
251 q.text("%#x" % self.value)
252 q.breakable()
253 q.text('}')
254
Rich Lane7dcdf022013-12-11 14:45:27 -0800255oxm.subtypes[2147494916] = arp_spa
256
257class arp_spa_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700258 type_len = 2147495176
Rich Lanec2ee4b82013-04-24 17:12:38 -0700259
260 def __init__(self, value=None, value_mask=None):
261 if value != None:
262 self.value = value
263 else:
264 self.value = 0
265 if value_mask != None:
266 self.value_mask = value_mask
267 else:
268 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800269 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700270
271 def pack(self):
272 packed = []
273 packed.append(struct.pack("!L", self.type_len))
274 packed.append(struct.pack("!L", self.value))
275 packed.append(struct.pack("!L", self.value_mask))
276 return ''.join(packed)
277
278 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800279 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700280 obj = arp_spa_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700281 _type_len = reader.read("!L")[0]
282 assert(_type_len == 2147495176)
283 obj.value = reader.read("!L")[0]
284 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700285 return obj
286
287 def __eq__(self, other):
288 if type(self) != type(other): return False
289 if self.value != other.value: return False
290 if self.value_mask != other.value_mask: return False
291 return True
292
Rich Lanec2ee4b82013-04-24 17:12:38 -0700293 def pretty_print(self, q):
294 q.text("arp_spa_masked {")
295 with q.group():
296 with q.indent(2):
297 q.breakable()
298 q.text("value = ");
299 q.text("%#x" % self.value)
300 q.text(","); q.breakable()
301 q.text("value_mask = ");
302 q.text("%#x" % self.value_mask)
303 q.breakable()
304 q.text('}')
305
Rich Lane7dcdf022013-12-11 14:45:27 -0800306oxm.subtypes[2147495176] = arp_spa_masked
307
308class arp_tha(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700309 type_len = 2147496454
Rich Lanec2ee4b82013-04-24 17:12:38 -0700310
311 def __init__(self, value=None):
312 if value != None:
313 self.value = value
314 else:
315 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800316 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700317
318 def pack(self):
319 packed = []
320 packed.append(struct.pack("!L", self.type_len))
321 packed.append(struct.pack("!6B", *self.value))
322 return ''.join(packed)
323
324 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800325 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700326 obj = arp_tha()
Dan Talaycof6202252013-07-02 01:00:29 -0700327 _type_len = reader.read("!L")[0]
328 assert(_type_len == 2147496454)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700329 obj.value = list(reader.read('!6B'))
330 return obj
331
332 def __eq__(self, other):
333 if type(self) != type(other): return False
334 if self.value != other.value: return False
335 return True
336
Rich Lanec2ee4b82013-04-24 17:12:38 -0700337 def pretty_print(self, q):
338 q.text("arp_tha {")
339 with q.group():
340 with q.indent(2):
341 q.breakable()
342 q.text("value = ");
343 q.text(util.pretty_mac(self.value))
344 q.breakable()
345 q.text('}')
346
Rich Lane7dcdf022013-12-11 14:45:27 -0800347oxm.subtypes[2147496454] = arp_tha
348
349class arp_tha_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700350 type_len = 2147496716
Rich Lanec2ee4b82013-04-24 17:12:38 -0700351
352 def __init__(self, value=None, value_mask=None):
353 if value != None:
354 self.value = value
355 else:
356 self.value = [0,0,0,0,0,0]
357 if value_mask != None:
358 self.value_mask = value_mask
359 else:
360 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800361 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700362
363 def pack(self):
364 packed = []
365 packed.append(struct.pack("!L", self.type_len))
366 packed.append(struct.pack("!6B", *self.value))
367 packed.append(struct.pack("!6B", *self.value_mask))
368 return ''.join(packed)
369
370 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800371 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700372 obj = arp_tha_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700373 _type_len = reader.read("!L")[0]
374 assert(_type_len == 2147496716)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700375 obj.value = list(reader.read('!6B'))
376 obj.value_mask = list(reader.read('!6B'))
377 return obj
378
379 def __eq__(self, other):
380 if type(self) != type(other): return False
381 if self.value != other.value: return False
382 if self.value_mask != other.value_mask: return False
383 return True
384
Rich Lanec2ee4b82013-04-24 17:12:38 -0700385 def pretty_print(self, q):
386 q.text("arp_tha_masked {")
387 with q.group():
388 with q.indent(2):
389 q.breakable()
390 q.text("value = ");
391 q.text(util.pretty_mac(self.value))
392 q.text(","); q.breakable()
393 q.text("value_mask = ");
394 q.text(util.pretty_mac(self.value_mask))
395 q.breakable()
396 q.text('}')
397
Rich Lane7dcdf022013-12-11 14:45:27 -0800398oxm.subtypes[2147496716] = arp_tha_masked
399
400class arp_tpa(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700401 type_len = 2147495428
Rich Lanec2ee4b82013-04-24 17:12:38 -0700402
403 def __init__(self, value=None):
404 if value != None:
405 self.value = value
406 else:
407 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800408 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700409
410 def pack(self):
411 packed = []
412 packed.append(struct.pack("!L", self.type_len))
413 packed.append(struct.pack("!L", self.value))
414 return ''.join(packed)
415
416 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800417 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700418 obj = arp_tpa()
Dan Talaycof6202252013-07-02 01:00:29 -0700419 _type_len = reader.read("!L")[0]
420 assert(_type_len == 2147495428)
421 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700422 return obj
423
424 def __eq__(self, other):
425 if type(self) != type(other): return False
426 if self.value != other.value: return False
427 return True
428
Rich Lanec2ee4b82013-04-24 17:12:38 -0700429 def pretty_print(self, q):
430 q.text("arp_tpa {")
431 with q.group():
432 with q.indent(2):
433 q.breakable()
434 q.text("value = ");
435 q.text("%#x" % self.value)
436 q.breakable()
437 q.text('}')
438
Rich Lane7dcdf022013-12-11 14:45:27 -0800439oxm.subtypes[2147495428] = arp_tpa
440
441class arp_tpa_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700442 type_len = 2147495688
Rich Lanec2ee4b82013-04-24 17:12:38 -0700443
444 def __init__(self, value=None, value_mask=None):
445 if value != None:
446 self.value = value
447 else:
448 self.value = 0
449 if value_mask != None:
450 self.value_mask = value_mask
451 else:
452 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800453 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700454
455 def pack(self):
456 packed = []
457 packed.append(struct.pack("!L", self.type_len))
458 packed.append(struct.pack("!L", self.value))
459 packed.append(struct.pack("!L", self.value_mask))
460 return ''.join(packed)
461
462 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800463 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700464 obj = arp_tpa_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700465 _type_len = reader.read("!L")[0]
466 assert(_type_len == 2147495688)
467 obj.value = reader.read("!L")[0]
468 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700469 return obj
470
471 def __eq__(self, other):
472 if type(self) != type(other): return False
473 if self.value != other.value: return False
474 if self.value_mask != other.value_mask: return False
475 return True
476
Rich Lanec2ee4b82013-04-24 17:12:38 -0700477 def pretty_print(self, q):
478 q.text("arp_tpa_masked {")
479 with q.group():
480 with q.indent(2):
481 q.breakable()
482 q.text("value = ");
483 q.text("%#x" % self.value)
484 q.text(","); q.breakable()
485 q.text("value_mask = ");
486 q.text("%#x" % self.value_mask)
487 q.breakable()
488 q.text('}')
489
Rich Lane7dcdf022013-12-11 14:45:27 -0800490oxm.subtypes[2147495688] = arp_tpa_masked
491
492class bsn_global_vrf_allowed(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800493 type_len = 198145
494
495 def __init__(self, value=None):
496 if value != None:
497 self.value = value
498 else:
499 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800500 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800501
502 def pack(self):
503 packed = []
504 packed.append(struct.pack("!L", self.type_len))
505 packed.append(struct.pack("!B", self.value))
506 return ''.join(packed)
507
508 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800509 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800510 obj = bsn_global_vrf_allowed()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800511 _type_len = reader.read("!L")[0]
512 assert(_type_len == 198145)
513 obj.value = reader.read("!B")[0]
514 return obj
515
516 def __eq__(self, other):
517 if type(self) != type(other): return False
518 if self.value != other.value: return False
519 return True
520
Rich Laned9e3f7b2013-11-04 11:40:43 -0800521 def pretty_print(self, q):
522 q.text("bsn_global_vrf_allowed {")
523 with q.group():
524 with q.indent(2):
525 q.breakable()
526 q.text("value = ");
527 q.text("%#x" % self.value)
528 q.breakable()
529 q.text('}')
530
Rich Lane7dcdf022013-12-11 14:45:27 -0800531oxm.subtypes[198145] = bsn_global_vrf_allowed
532
533class bsn_global_vrf_allowed_masked(oxm):
534 type_len = 198402
Rich Laned9e3f7b2013-11-04 11:40:43 -0800535
536 def __init__(self, value=None, value_mask=None):
537 if value != None:
538 self.value = value
539 else:
540 self.value = 0
541 if value_mask != None:
542 self.value_mask = value_mask
543 else:
544 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800545 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800546
547 def pack(self):
548 packed = []
549 packed.append(struct.pack("!L", self.type_len))
550 packed.append(struct.pack("!B", self.value))
551 packed.append(struct.pack("!B", self.value_mask))
552 return ''.join(packed)
553
554 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800555 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800556 obj = bsn_global_vrf_allowed_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800557 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800558 assert(_type_len == 198402)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800559 obj.value = reader.read("!B")[0]
560 obj.value_mask = reader.read("!B")[0]
561 return obj
562
563 def __eq__(self, other):
564 if type(self) != type(other): return False
565 if self.value != other.value: return False
566 if self.value_mask != other.value_mask: return False
567 return True
568
Rich Laned9e3f7b2013-11-04 11:40:43 -0800569 def pretty_print(self, q):
570 q.text("bsn_global_vrf_allowed_masked {")
571 with q.group():
572 with q.indent(2):
573 q.breakable()
574 q.text("value = ");
575 q.text("%#x" % self.value)
576 q.text(","); q.breakable()
577 q.text("value_mask = ");
578 q.text("%#x" % self.value_mask)
579 q.breakable()
580 q.text('}')
581
Rich Lane7dcdf022013-12-11 14:45:27 -0800582oxm.subtypes[198402] = bsn_global_vrf_allowed_masked
583
584class bsn_in_ports_128(oxm):
585 type_len = 196624
Rich Lane6f4978c2013-10-20 21:33:52 -0700586
587 def __init__(self, value=None):
588 if value != None:
589 self.value = value
590 else:
591 self.value = set()
Rich Lane7dcdf022013-12-11 14:45:27 -0800592 return
Rich Lane6f4978c2013-10-20 21:33:52 -0700593
594 def pack(self):
595 packed = []
596 packed.append(struct.pack("!L", self.type_len))
597 packed.append(util.pack_bitmap_128(self.value))
598 return ''.join(packed)
599
600 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800601 def unpack(reader):
Rich Lane6f4978c2013-10-20 21:33:52 -0700602 obj = bsn_in_ports_128()
Rich Lane6f4978c2013-10-20 21:33:52 -0700603 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800604 assert(_type_len == 196624)
Rich Lane6f4978c2013-10-20 21:33:52 -0700605 obj.value = util.unpack_bitmap_128(reader)
606 return obj
607
608 def __eq__(self, other):
609 if type(self) != type(other): return False
610 if self.value != other.value: return False
611 return True
612
Rich Lane6f4978c2013-10-20 21:33:52 -0700613 def pretty_print(self, q):
614 q.text("bsn_in_ports_128 {")
615 with q.group():
616 with q.indent(2):
617 q.breakable()
618 q.text("value = ");
619 q.pp(self.value)
620 q.breakable()
621 q.text('}')
622
Rich Lane7dcdf022013-12-11 14:45:27 -0800623oxm.subtypes[196624] = bsn_in_ports_128
624
625class bsn_in_ports_128_masked(oxm):
Rich Lane6f4978c2013-10-20 21:33:52 -0700626 type_len = 196896
627
628 def __init__(self, value=None, value_mask=None):
629 if value != None:
630 self.value = value
631 else:
632 self.value = set()
633 if value_mask != None:
634 self.value_mask = value_mask
635 else:
636 self.value_mask = set()
Rich Lane7dcdf022013-12-11 14:45:27 -0800637 return
Rich Lane6f4978c2013-10-20 21:33:52 -0700638
639 def pack(self):
640 packed = []
641 packed.append(struct.pack("!L", self.type_len))
642 packed.append(util.pack_bitmap_128(self.value))
643 packed.append(util.pack_bitmap_128(self.value_mask))
644 return ''.join(packed)
645
646 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800647 def unpack(reader):
Rich Lane6f4978c2013-10-20 21:33:52 -0700648 obj = bsn_in_ports_128_masked()
Rich Lane6f4978c2013-10-20 21:33:52 -0700649 _type_len = reader.read("!L")[0]
650 assert(_type_len == 196896)
651 obj.value = util.unpack_bitmap_128(reader)
652 obj.value_mask = util.unpack_bitmap_128(reader)
653 return obj
654
655 def __eq__(self, other):
656 if type(self) != type(other): return False
657 if self.value != other.value: return False
658 if self.value_mask != other.value_mask: return False
659 return True
660
Rich Lane6f4978c2013-10-20 21:33:52 -0700661 def pretty_print(self, q):
662 q.text("bsn_in_ports_128_masked {")
663 with q.group():
664 with q.indent(2):
665 q.breakable()
666 q.text("value = ");
667 q.pp(self.value)
668 q.text(","); q.breakable()
669 q.text("value_mask = ");
670 q.pp(self.value_mask)
671 q.breakable()
672 q.text('}')
673
Rich Lane7dcdf022013-12-11 14:45:27 -0800674oxm.subtypes[196896] = bsn_in_ports_128_masked
675
676class bsn_l3_dst_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800677 type_len = 199684
678
679 def __init__(self, value=None):
680 if value != None:
681 self.value = value
682 else:
683 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800684 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800685
686 def pack(self):
687 packed = []
688 packed.append(struct.pack("!L", self.type_len))
689 packed.append(struct.pack("!L", self.value))
690 return ''.join(packed)
691
692 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800693 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800694 obj = bsn_l3_dst_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800695 _type_len = reader.read("!L")[0]
696 assert(_type_len == 199684)
697 obj.value = reader.read("!L")[0]
698 return obj
699
700 def __eq__(self, other):
701 if type(self) != type(other): return False
702 if self.value != other.value: return False
703 return True
704
Rich Laned9e3f7b2013-11-04 11:40:43 -0800705 def pretty_print(self, q):
706 q.text("bsn_l3_dst_class_id {")
707 with q.group():
708 with q.indent(2):
709 q.breakable()
710 q.text("value = ");
711 q.text("%#x" % self.value)
712 q.breakable()
713 q.text('}')
714
Rich Lane7dcdf022013-12-11 14:45:27 -0800715oxm.subtypes[199684] = bsn_l3_dst_class_id
716
717class bsn_l3_dst_class_id_masked(oxm):
718 type_len = 199944
Rich Laned9e3f7b2013-11-04 11:40:43 -0800719
720 def __init__(self, value=None, value_mask=None):
721 if value != None:
722 self.value = value
723 else:
724 self.value = 0
725 if value_mask != None:
726 self.value_mask = value_mask
727 else:
728 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800729 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800730
731 def pack(self):
732 packed = []
733 packed.append(struct.pack("!L", self.type_len))
734 packed.append(struct.pack("!L", self.value))
735 packed.append(struct.pack("!L", self.value_mask))
736 return ''.join(packed)
737
738 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800739 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800740 obj = bsn_l3_dst_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800741 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800742 assert(_type_len == 199944)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800743 obj.value = reader.read("!L")[0]
744 obj.value_mask = reader.read("!L")[0]
745 return obj
746
747 def __eq__(self, other):
748 if type(self) != type(other): return False
749 if self.value != other.value: return False
750 if self.value_mask != other.value_mask: return False
751 return True
752
Rich Laned9e3f7b2013-11-04 11:40:43 -0800753 def pretty_print(self, q):
754 q.text("bsn_l3_dst_class_id_masked {")
755 with q.group():
756 with q.indent(2):
757 q.breakable()
758 q.text("value = ");
759 q.text("%#x" % self.value)
760 q.text(","); q.breakable()
761 q.text("value_mask = ");
762 q.text("%#x" % self.value_mask)
763 q.breakable()
764 q.text('}')
765
Rich Lane7dcdf022013-12-11 14:45:27 -0800766oxm.subtypes[199944] = bsn_l3_dst_class_id_masked
767
768class bsn_l3_interface_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800769 type_len = 198660
770
771 def __init__(self, value=None):
772 if value != None:
773 self.value = value
774 else:
775 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800776 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800777
778 def pack(self):
779 packed = []
780 packed.append(struct.pack("!L", self.type_len))
781 packed.append(struct.pack("!L", self.value))
782 return ''.join(packed)
783
784 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800785 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800786 obj = bsn_l3_interface_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800787 _type_len = reader.read("!L")[0]
788 assert(_type_len == 198660)
789 obj.value = reader.read("!L")[0]
790 return obj
791
792 def __eq__(self, other):
793 if type(self) != type(other): return False
794 if self.value != other.value: return False
795 return True
796
Rich Laned9e3f7b2013-11-04 11:40:43 -0800797 def pretty_print(self, q):
798 q.text("bsn_l3_interface_class_id {")
799 with q.group():
800 with q.indent(2):
801 q.breakable()
802 q.text("value = ");
803 q.text("%#x" % self.value)
804 q.breakable()
805 q.text('}')
806
Rich Lane7dcdf022013-12-11 14:45:27 -0800807oxm.subtypes[198660] = bsn_l3_interface_class_id
808
809class bsn_l3_interface_class_id_masked(oxm):
810 type_len = 198920
Rich Laned9e3f7b2013-11-04 11:40:43 -0800811
812 def __init__(self, value=None, value_mask=None):
813 if value != None:
814 self.value = value
815 else:
816 self.value = 0
817 if value_mask != None:
818 self.value_mask = value_mask
819 else:
820 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800821 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800822
823 def pack(self):
824 packed = []
825 packed.append(struct.pack("!L", self.type_len))
826 packed.append(struct.pack("!L", self.value))
827 packed.append(struct.pack("!L", self.value_mask))
828 return ''.join(packed)
829
830 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800831 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800832 obj = bsn_l3_interface_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800833 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800834 assert(_type_len == 198920)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800835 obj.value = reader.read("!L")[0]
836 obj.value_mask = reader.read("!L")[0]
837 return obj
838
839 def __eq__(self, other):
840 if type(self) != type(other): return False
841 if self.value != other.value: return False
842 if self.value_mask != other.value_mask: return False
843 return True
844
Rich Laned9e3f7b2013-11-04 11:40:43 -0800845 def pretty_print(self, q):
846 q.text("bsn_l3_interface_class_id_masked {")
847 with q.group():
848 with q.indent(2):
849 q.breakable()
850 q.text("value = ");
851 q.text("%#x" % self.value)
852 q.text(","); q.breakable()
853 q.text("value_mask = ");
854 q.text("%#x" % self.value_mask)
855 q.breakable()
856 q.text('}')
857
Rich Lane7dcdf022013-12-11 14:45:27 -0800858oxm.subtypes[198920] = bsn_l3_interface_class_id_masked
859
860class bsn_l3_src_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800861 type_len = 199172
862
863 def __init__(self, value=None):
864 if value != None:
865 self.value = value
866 else:
867 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800868 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800869
870 def pack(self):
871 packed = []
872 packed.append(struct.pack("!L", self.type_len))
873 packed.append(struct.pack("!L", self.value))
874 return ''.join(packed)
875
876 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800877 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800878 obj = bsn_l3_src_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800879 _type_len = reader.read("!L")[0]
880 assert(_type_len == 199172)
881 obj.value = reader.read("!L")[0]
882 return obj
883
884 def __eq__(self, other):
885 if type(self) != type(other): return False
886 if self.value != other.value: return False
887 return True
888
Rich Laned9e3f7b2013-11-04 11:40:43 -0800889 def pretty_print(self, q):
890 q.text("bsn_l3_src_class_id {")
891 with q.group():
892 with q.indent(2):
893 q.breakable()
894 q.text("value = ");
895 q.text("%#x" % self.value)
896 q.breakable()
897 q.text('}')
898
Rich Lane7dcdf022013-12-11 14:45:27 -0800899oxm.subtypes[199172] = bsn_l3_src_class_id
900
901class bsn_l3_src_class_id_masked(oxm):
902 type_len = 199432
Rich Laned9e3f7b2013-11-04 11:40:43 -0800903
904 def __init__(self, value=None, value_mask=None):
905 if value != None:
906 self.value = value
907 else:
908 self.value = 0
909 if value_mask != None:
910 self.value_mask = value_mask
911 else:
912 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800913 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800914
915 def pack(self):
916 packed = []
917 packed.append(struct.pack("!L", self.type_len))
918 packed.append(struct.pack("!L", self.value))
919 packed.append(struct.pack("!L", self.value_mask))
920 return ''.join(packed)
921
922 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800923 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800924 obj = bsn_l3_src_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800925 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800926 assert(_type_len == 199432)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800927 obj.value = reader.read("!L")[0]
928 obj.value_mask = reader.read("!L")[0]
929 return obj
930
931 def __eq__(self, other):
932 if type(self) != type(other): return False
933 if self.value != other.value: return False
934 if self.value_mask != other.value_mask: return False
935 return True
936
Rich Laned9e3f7b2013-11-04 11:40:43 -0800937 def pretty_print(self, q):
938 q.text("bsn_l3_src_class_id_masked {")
939 with q.group():
940 with q.indent(2):
941 q.breakable()
942 q.text("value = ");
943 q.text("%#x" % self.value)
944 q.text(","); q.breakable()
945 q.text("value_mask = ");
946 q.text("%#x" % self.value_mask)
947 q.breakable()
948 q.text('}')
949
Rich Lane7dcdf022013-12-11 14:45:27 -0800950oxm.subtypes[199432] = bsn_l3_src_class_id_masked
951
952class bsn_lag_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800953 type_len = 197124
954
955 def __init__(self, value=None):
956 if value != None:
957 self.value = value
958 else:
959 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800960 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800961
962 def pack(self):
963 packed = []
964 packed.append(struct.pack("!L", self.type_len))
965 packed.append(struct.pack("!L", self.value))
966 return ''.join(packed)
967
968 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800969 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800970 obj = bsn_lag_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800971 _type_len = reader.read("!L")[0]
972 assert(_type_len == 197124)
973 obj.value = reader.read("!L")[0]
974 return obj
975
976 def __eq__(self, other):
977 if type(self) != type(other): return False
978 if self.value != other.value: return False
979 return True
980
Rich Laned9e3f7b2013-11-04 11:40:43 -0800981 def pretty_print(self, q):
982 q.text("bsn_lag_id {")
983 with q.group():
984 with q.indent(2):
985 q.breakable()
986 q.text("value = ");
987 q.text("%#x" % self.value)
988 q.breakable()
989 q.text('}')
990
Rich Lane7dcdf022013-12-11 14:45:27 -0800991oxm.subtypes[197124] = bsn_lag_id
992
993class bsn_lag_id_masked(oxm):
994 type_len = 197384
Rich Laned9e3f7b2013-11-04 11:40:43 -0800995
996 def __init__(self, value=None, value_mask=None):
997 if value != None:
998 self.value = value
999 else:
1000 self.value = 0
1001 if value_mask != None:
1002 self.value_mask = value_mask
1003 else:
1004 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001005 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001006
1007 def pack(self):
1008 packed = []
1009 packed.append(struct.pack("!L", self.type_len))
1010 packed.append(struct.pack("!L", self.value))
1011 packed.append(struct.pack("!L", self.value_mask))
1012 return ''.join(packed)
1013
1014 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001015 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001016 obj = bsn_lag_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001017 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001018 assert(_type_len == 197384)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001019 obj.value = reader.read("!L")[0]
1020 obj.value_mask = reader.read("!L")[0]
1021 return obj
1022
1023 def __eq__(self, other):
1024 if type(self) != type(other): return False
1025 if self.value != other.value: return False
1026 if self.value_mask != other.value_mask: return False
1027 return True
1028
Rich Laned9e3f7b2013-11-04 11:40:43 -08001029 def pretty_print(self, q):
1030 q.text("bsn_lag_id_masked {")
1031 with q.group():
1032 with q.indent(2):
1033 q.breakable()
1034 q.text("value = ");
1035 q.text("%#x" % self.value)
1036 q.text(","); q.breakable()
1037 q.text("value_mask = ");
1038 q.text("%#x" % self.value_mask)
1039 q.breakable()
1040 q.text('}')
1041
Rich Lane7dcdf022013-12-11 14:45:27 -08001042oxm.subtypes[197384] = bsn_lag_id_masked
1043
1044class bsn_vrf(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001045 type_len = 197636
1046
1047 def __init__(self, value=None):
1048 if value != None:
1049 self.value = value
1050 else:
1051 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001052 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001053
1054 def pack(self):
1055 packed = []
1056 packed.append(struct.pack("!L", self.type_len))
1057 packed.append(struct.pack("!L", self.value))
1058 return ''.join(packed)
1059
1060 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001061 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001062 obj = bsn_vrf()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001063 _type_len = reader.read("!L")[0]
1064 assert(_type_len == 197636)
1065 obj.value = reader.read("!L")[0]
1066 return obj
1067
1068 def __eq__(self, other):
1069 if type(self) != type(other): return False
1070 if self.value != other.value: return False
1071 return True
1072
Rich Laned9e3f7b2013-11-04 11:40:43 -08001073 def pretty_print(self, q):
1074 q.text("bsn_vrf {")
1075 with q.group():
1076 with q.indent(2):
1077 q.breakable()
1078 q.text("value = ");
1079 q.text("%#x" % self.value)
1080 q.breakable()
1081 q.text('}')
1082
Rich Lane7dcdf022013-12-11 14:45:27 -08001083oxm.subtypes[197636] = bsn_vrf
1084
1085class bsn_vrf_masked(oxm):
1086 type_len = 197896
Rich Laned9e3f7b2013-11-04 11:40:43 -08001087
1088 def __init__(self, value=None, value_mask=None):
1089 if value != None:
1090 self.value = value
1091 else:
1092 self.value = 0
1093 if value_mask != None:
1094 self.value_mask = value_mask
1095 else:
1096 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001097 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001098
1099 def pack(self):
1100 packed = []
1101 packed.append(struct.pack("!L", self.type_len))
1102 packed.append(struct.pack("!L", self.value))
1103 packed.append(struct.pack("!L", self.value_mask))
1104 return ''.join(packed)
1105
1106 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001107 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001108 obj = bsn_vrf_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001109 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001110 assert(_type_len == 197896)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001111 obj.value = reader.read("!L")[0]
1112 obj.value_mask = reader.read("!L")[0]
1113 return obj
1114
1115 def __eq__(self, other):
1116 if type(self) != type(other): return False
1117 if self.value != other.value: return False
1118 if self.value_mask != other.value_mask: return False
1119 return True
1120
Rich Laned9e3f7b2013-11-04 11:40:43 -08001121 def pretty_print(self, q):
1122 q.text("bsn_vrf_masked {")
1123 with q.group():
1124 with q.indent(2):
1125 q.breakable()
1126 q.text("value = ");
1127 q.text("%#x" % self.value)
1128 q.text(","); q.breakable()
1129 q.text("value_mask = ");
1130 q.text("%#x" % self.value_mask)
1131 q.breakable()
1132 q.text('}')
1133
Rich Lane7dcdf022013-12-11 14:45:27 -08001134oxm.subtypes[197896] = bsn_vrf_masked
1135
1136class eth_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001137 type_len = 2147485190
Rich Lanec2ee4b82013-04-24 17:12:38 -07001138
1139 def __init__(self, value=None):
1140 if value != None:
1141 self.value = value
1142 else:
1143 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001144 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001145
1146 def pack(self):
1147 packed = []
1148 packed.append(struct.pack("!L", self.type_len))
1149 packed.append(struct.pack("!6B", *self.value))
1150 return ''.join(packed)
1151
1152 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001153 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001154 obj = eth_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07001155 _type_len = reader.read("!L")[0]
1156 assert(_type_len == 2147485190)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001157 obj.value = list(reader.read('!6B'))
1158 return obj
1159
1160 def __eq__(self, other):
1161 if type(self) != type(other): return False
1162 if self.value != other.value: return False
1163 return True
1164
Rich Lanec2ee4b82013-04-24 17:12:38 -07001165 def pretty_print(self, q):
1166 q.text("eth_dst {")
1167 with q.group():
1168 with q.indent(2):
1169 q.breakable()
1170 q.text("value = ");
1171 q.text(util.pretty_mac(self.value))
1172 q.breakable()
1173 q.text('}')
1174
Rich Lane7dcdf022013-12-11 14:45:27 -08001175oxm.subtypes[2147485190] = eth_dst
1176
1177class eth_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001178 type_len = 2147485452
Rich Lanec2ee4b82013-04-24 17:12:38 -07001179
1180 def __init__(self, value=None, value_mask=None):
1181 if value != None:
1182 self.value = value
1183 else:
1184 self.value = [0,0,0,0,0,0]
1185 if value_mask != None:
1186 self.value_mask = value_mask
1187 else:
1188 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001189 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001190
1191 def pack(self):
1192 packed = []
1193 packed.append(struct.pack("!L", self.type_len))
1194 packed.append(struct.pack("!6B", *self.value))
1195 packed.append(struct.pack("!6B", *self.value_mask))
1196 return ''.join(packed)
1197
1198 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001199 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001200 obj = eth_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001201 _type_len = reader.read("!L")[0]
1202 assert(_type_len == 2147485452)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001203 obj.value = list(reader.read('!6B'))
1204 obj.value_mask = list(reader.read('!6B'))
1205 return obj
1206
1207 def __eq__(self, other):
1208 if type(self) != type(other): return False
1209 if self.value != other.value: return False
1210 if self.value_mask != other.value_mask: return False
1211 return True
1212
Rich Lanec2ee4b82013-04-24 17:12:38 -07001213 def pretty_print(self, q):
1214 q.text("eth_dst_masked {")
1215 with q.group():
1216 with q.indent(2):
1217 q.breakable()
1218 q.text("value = ");
1219 q.text(util.pretty_mac(self.value))
1220 q.text(","); q.breakable()
1221 q.text("value_mask = ");
1222 q.text(util.pretty_mac(self.value_mask))
1223 q.breakable()
1224 q.text('}')
1225
Rich Lane7dcdf022013-12-11 14:45:27 -08001226oxm.subtypes[2147485452] = eth_dst_masked
1227
1228class eth_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001229 type_len = 2147485702
Rich Lanec2ee4b82013-04-24 17:12:38 -07001230
1231 def __init__(self, value=None):
1232 if value != None:
1233 self.value = value
1234 else:
1235 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001236 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001237
1238 def pack(self):
1239 packed = []
1240 packed.append(struct.pack("!L", self.type_len))
1241 packed.append(struct.pack("!6B", *self.value))
1242 return ''.join(packed)
1243
1244 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001245 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001246 obj = eth_src()
Dan Talaycof6202252013-07-02 01:00:29 -07001247 _type_len = reader.read("!L")[0]
1248 assert(_type_len == 2147485702)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001249 obj.value = list(reader.read('!6B'))
1250 return obj
1251
1252 def __eq__(self, other):
1253 if type(self) != type(other): return False
1254 if self.value != other.value: return False
1255 return True
1256
Rich Lanec2ee4b82013-04-24 17:12:38 -07001257 def pretty_print(self, q):
1258 q.text("eth_src {")
1259 with q.group():
1260 with q.indent(2):
1261 q.breakable()
1262 q.text("value = ");
1263 q.text(util.pretty_mac(self.value))
1264 q.breakable()
1265 q.text('}')
1266
Rich Lane7dcdf022013-12-11 14:45:27 -08001267oxm.subtypes[2147485702] = eth_src
1268
1269class eth_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001270 type_len = 2147485964
Rich Lanec2ee4b82013-04-24 17:12:38 -07001271
1272 def __init__(self, value=None, value_mask=None):
1273 if value != None:
1274 self.value = value
1275 else:
1276 self.value = [0,0,0,0,0,0]
1277 if value_mask != None:
1278 self.value_mask = value_mask
1279 else:
1280 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001281 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001282
1283 def pack(self):
1284 packed = []
1285 packed.append(struct.pack("!L", self.type_len))
1286 packed.append(struct.pack("!6B", *self.value))
1287 packed.append(struct.pack("!6B", *self.value_mask))
1288 return ''.join(packed)
1289
1290 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001291 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001292 obj = eth_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001293 _type_len = reader.read("!L")[0]
1294 assert(_type_len == 2147485964)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001295 obj.value = list(reader.read('!6B'))
1296 obj.value_mask = list(reader.read('!6B'))
1297 return obj
1298
1299 def __eq__(self, other):
1300 if type(self) != type(other): return False
1301 if self.value != other.value: return False
1302 if self.value_mask != other.value_mask: return False
1303 return True
1304
Rich Lanec2ee4b82013-04-24 17:12:38 -07001305 def pretty_print(self, q):
1306 q.text("eth_src_masked {")
1307 with q.group():
1308 with q.indent(2):
1309 q.breakable()
1310 q.text("value = ");
1311 q.text(util.pretty_mac(self.value))
1312 q.text(","); q.breakable()
1313 q.text("value_mask = ");
1314 q.text(util.pretty_mac(self.value_mask))
1315 q.breakable()
1316 q.text('}')
1317
Rich Lane7dcdf022013-12-11 14:45:27 -08001318oxm.subtypes[2147485964] = eth_src_masked
1319
1320class eth_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001321 type_len = 2147486210
Rich Lanec2ee4b82013-04-24 17:12:38 -07001322
1323 def __init__(self, value=None):
1324 if value != None:
1325 self.value = value
1326 else:
1327 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001328 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001329
1330 def pack(self):
1331 packed = []
1332 packed.append(struct.pack("!L", self.type_len))
1333 packed.append(struct.pack("!H", self.value))
1334 return ''.join(packed)
1335
1336 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001337 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001338 obj = eth_type()
Dan Talaycof6202252013-07-02 01:00:29 -07001339 _type_len = reader.read("!L")[0]
1340 assert(_type_len == 2147486210)
1341 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001342 return obj
1343
1344 def __eq__(self, other):
1345 if type(self) != type(other): return False
1346 if self.value != other.value: return False
1347 return True
1348
Rich Lanec2ee4b82013-04-24 17:12:38 -07001349 def pretty_print(self, q):
1350 q.text("eth_type {")
1351 with q.group():
1352 with q.indent(2):
1353 q.breakable()
1354 q.text("value = ");
1355 q.text("%#x" % self.value)
1356 q.breakable()
1357 q.text('}')
1358
Rich Lane7dcdf022013-12-11 14:45:27 -08001359oxm.subtypes[2147486210] = eth_type
1360
1361class eth_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001362 type_len = 2147486468
Rich Lanec2ee4b82013-04-24 17:12:38 -07001363
1364 def __init__(self, value=None, value_mask=None):
1365 if value != None:
1366 self.value = value
1367 else:
1368 self.value = 0
1369 if value_mask != None:
1370 self.value_mask = value_mask
1371 else:
1372 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001373 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001374
1375 def pack(self):
1376 packed = []
1377 packed.append(struct.pack("!L", self.type_len))
1378 packed.append(struct.pack("!H", self.value))
1379 packed.append(struct.pack("!H", self.value_mask))
1380 return ''.join(packed)
1381
1382 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001383 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001384 obj = eth_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001385 _type_len = reader.read("!L")[0]
1386 assert(_type_len == 2147486468)
1387 obj.value = reader.read("!H")[0]
1388 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001389 return obj
1390
1391 def __eq__(self, other):
1392 if type(self) != type(other): return False
1393 if self.value != other.value: return False
1394 if self.value_mask != other.value_mask: return False
1395 return True
1396
Rich Lanec2ee4b82013-04-24 17:12:38 -07001397 def pretty_print(self, q):
1398 q.text("eth_type_masked {")
1399 with q.group():
1400 with q.indent(2):
1401 q.breakable()
1402 q.text("value = ");
1403 q.text("%#x" % self.value)
1404 q.text(","); q.breakable()
1405 q.text("value_mask = ");
1406 q.text("%#x" % self.value_mask)
1407 q.breakable()
1408 q.text('}')
1409
Rich Lane7dcdf022013-12-11 14:45:27 -08001410oxm.subtypes[2147486468] = eth_type_masked
1411
1412class icmpv4_code(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001413 type_len = 2147493889
Rich Lanec2ee4b82013-04-24 17:12:38 -07001414
1415 def __init__(self, value=None):
1416 if value != None:
1417 self.value = value
1418 else:
1419 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001420 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001421
1422 def pack(self):
1423 packed = []
1424 packed.append(struct.pack("!L", self.type_len))
1425 packed.append(struct.pack("!B", self.value))
1426 return ''.join(packed)
1427
1428 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001429 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001430 obj = icmpv4_code()
Dan Talaycof6202252013-07-02 01:00:29 -07001431 _type_len = reader.read("!L")[0]
1432 assert(_type_len == 2147493889)
1433 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001434 return obj
1435
1436 def __eq__(self, other):
1437 if type(self) != type(other): return False
1438 if self.value != other.value: return False
1439 return True
1440
Rich Lanec2ee4b82013-04-24 17:12:38 -07001441 def pretty_print(self, q):
1442 q.text("icmpv4_code {")
1443 with q.group():
1444 with q.indent(2):
1445 q.breakable()
1446 q.text("value = ");
1447 q.text("%#x" % self.value)
1448 q.breakable()
1449 q.text('}')
1450
Rich Lane7dcdf022013-12-11 14:45:27 -08001451oxm.subtypes[2147493889] = icmpv4_code
1452
1453class icmpv4_code_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001454 type_len = 2147494146
Rich Lanec2ee4b82013-04-24 17:12:38 -07001455
1456 def __init__(self, value=None, value_mask=None):
1457 if value != None:
1458 self.value = value
1459 else:
1460 self.value = 0
1461 if value_mask != None:
1462 self.value_mask = value_mask
1463 else:
1464 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001465 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001466
1467 def pack(self):
1468 packed = []
1469 packed.append(struct.pack("!L", self.type_len))
1470 packed.append(struct.pack("!B", self.value))
1471 packed.append(struct.pack("!B", self.value_mask))
1472 return ''.join(packed)
1473
1474 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001475 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001476 obj = icmpv4_code_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001477 _type_len = reader.read("!L")[0]
1478 assert(_type_len == 2147494146)
1479 obj.value = reader.read("!B")[0]
1480 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001481 return obj
1482
1483 def __eq__(self, other):
1484 if type(self) != type(other): return False
1485 if self.value != other.value: return False
1486 if self.value_mask != other.value_mask: return False
1487 return True
1488
Rich Lanec2ee4b82013-04-24 17:12:38 -07001489 def pretty_print(self, q):
1490 q.text("icmpv4_code_masked {")
1491 with q.group():
1492 with q.indent(2):
1493 q.breakable()
1494 q.text("value = ");
1495 q.text("%#x" % self.value)
1496 q.text(","); q.breakable()
1497 q.text("value_mask = ");
1498 q.text("%#x" % self.value_mask)
1499 q.breakable()
1500 q.text('}')
1501
Rich Lane7dcdf022013-12-11 14:45:27 -08001502oxm.subtypes[2147494146] = icmpv4_code_masked
1503
1504class icmpv4_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001505 type_len = 2147493377
Rich Lanec2ee4b82013-04-24 17:12:38 -07001506
1507 def __init__(self, value=None):
1508 if value != None:
1509 self.value = value
1510 else:
1511 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001512 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001513
1514 def pack(self):
1515 packed = []
1516 packed.append(struct.pack("!L", self.type_len))
1517 packed.append(struct.pack("!B", self.value))
1518 return ''.join(packed)
1519
1520 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001521 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001522 obj = icmpv4_type()
Dan Talaycof6202252013-07-02 01:00:29 -07001523 _type_len = reader.read("!L")[0]
1524 assert(_type_len == 2147493377)
1525 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001526 return obj
1527
1528 def __eq__(self, other):
1529 if type(self) != type(other): return False
1530 if self.value != other.value: return False
1531 return True
1532
Rich Lanec2ee4b82013-04-24 17:12:38 -07001533 def pretty_print(self, q):
1534 q.text("icmpv4_type {")
1535 with q.group():
1536 with q.indent(2):
1537 q.breakable()
1538 q.text("value = ");
1539 q.text("%#x" % self.value)
1540 q.breakable()
1541 q.text('}')
1542
Rich Lane7dcdf022013-12-11 14:45:27 -08001543oxm.subtypes[2147493377] = icmpv4_type
1544
1545class icmpv4_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001546 type_len = 2147493634
Rich Lanec2ee4b82013-04-24 17:12:38 -07001547
1548 def __init__(self, value=None, value_mask=None):
1549 if value != None:
1550 self.value = value
1551 else:
1552 self.value = 0
1553 if value_mask != None:
1554 self.value_mask = value_mask
1555 else:
1556 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001557 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001558
1559 def pack(self):
1560 packed = []
1561 packed.append(struct.pack("!L", self.type_len))
1562 packed.append(struct.pack("!B", self.value))
1563 packed.append(struct.pack("!B", self.value_mask))
1564 return ''.join(packed)
1565
1566 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001567 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001568 obj = icmpv4_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001569 _type_len = reader.read("!L")[0]
1570 assert(_type_len == 2147493634)
1571 obj.value = reader.read("!B")[0]
1572 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001573 return obj
1574
1575 def __eq__(self, other):
1576 if type(self) != type(other): return False
1577 if self.value != other.value: return False
1578 if self.value_mask != other.value_mask: return False
1579 return True
1580
Rich Lanec2ee4b82013-04-24 17:12:38 -07001581 def pretty_print(self, q):
1582 q.text("icmpv4_type_masked {")
1583 with q.group():
1584 with q.indent(2):
1585 q.breakable()
1586 q.text("value = ");
1587 q.text("%#x" % self.value)
1588 q.text(","); q.breakable()
1589 q.text("value_mask = ");
1590 q.text("%#x" % self.value_mask)
1591 q.breakable()
1592 q.text('}')
1593
Rich Lane7dcdf022013-12-11 14:45:27 -08001594oxm.subtypes[2147493634] = icmpv4_type_masked
1595
1596class icmpv6_code(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001597 type_len = 2147499009
Rich Lanec2ee4b82013-04-24 17:12:38 -07001598
1599 def __init__(self, value=None):
1600 if value != None:
1601 self.value = value
1602 else:
1603 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001604 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001605
1606 def pack(self):
1607 packed = []
1608 packed.append(struct.pack("!L", self.type_len))
1609 packed.append(struct.pack("!B", self.value))
1610 return ''.join(packed)
1611
1612 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001613 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001614 obj = icmpv6_code()
Dan Talaycof6202252013-07-02 01:00:29 -07001615 _type_len = reader.read("!L")[0]
1616 assert(_type_len == 2147499009)
1617 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001618 return obj
1619
1620 def __eq__(self, other):
1621 if type(self) != type(other): return False
1622 if self.value != other.value: return False
1623 return True
1624
Rich Lanec2ee4b82013-04-24 17:12:38 -07001625 def pretty_print(self, q):
1626 q.text("icmpv6_code {")
1627 with q.group():
1628 with q.indent(2):
1629 q.breakable()
1630 q.text("value = ");
1631 q.text("%#x" % self.value)
1632 q.breakable()
1633 q.text('}')
1634
Rich Lane7dcdf022013-12-11 14:45:27 -08001635oxm.subtypes[2147499009] = icmpv6_code
1636
1637class icmpv6_code_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001638 type_len = 2147499266
Rich Lanec2ee4b82013-04-24 17:12:38 -07001639
1640 def __init__(self, value=None, value_mask=None):
1641 if value != None:
1642 self.value = value
1643 else:
1644 self.value = 0
1645 if value_mask != None:
1646 self.value_mask = value_mask
1647 else:
1648 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001649 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001650
1651 def pack(self):
1652 packed = []
1653 packed.append(struct.pack("!L", self.type_len))
1654 packed.append(struct.pack("!B", self.value))
1655 packed.append(struct.pack("!B", self.value_mask))
1656 return ''.join(packed)
1657
1658 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001659 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001660 obj = icmpv6_code_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001661 _type_len = reader.read("!L")[0]
1662 assert(_type_len == 2147499266)
1663 obj.value = reader.read("!B")[0]
1664 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001665 return obj
1666
1667 def __eq__(self, other):
1668 if type(self) != type(other): return False
1669 if self.value != other.value: return False
1670 if self.value_mask != other.value_mask: return False
1671 return True
1672
Rich Lanec2ee4b82013-04-24 17:12:38 -07001673 def pretty_print(self, q):
1674 q.text("icmpv6_code_masked {")
1675 with q.group():
1676 with q.indent(2):
1677 q.breakable()
1678 q.text("value = ");
1679 q.text("%#x" % self.value)
1680 q.text(","); q.breakable()
1681 q.text("value_mask = ");
1682 q.text("%#x" % self.value_mask)
1683 q.breakable()
1684 q.text('}')
1685
Rich Lane7dcdf022013-12-11 14:45:27 -08001686oxm.subtypes[2147499266] = icmpv6_code_masked
1687
1688class icmpv6_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001689 type_len = 2147498497
Rich Lanec2ee4b82013-04-24 17:12:38 -07001690
1691 def __init__(self, value=None):
1692 if value != None:
1693 self.value = value
1694 else:
1695 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001696 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001697
1698 def pack(self):
1699 packed = []
1700 packed.append(struct.pack("!L", self.type_len))
1701 packed.append(struct.pack("!B", self.value))
1702 return ''.join(packed)
1703
1704 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001705 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001706 obj = icmpv6_type()
Dan Talaycof6202252013-07-02 01:00:29 -07001707 _type_len = reader.read("!L")[0]
1708 assert(_type_len == 2147498497)
1709 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001710 return obj
1711
1712 def __eq__(self, other):
1713 if type(self) != type(other): return False
1714 if self.value != other.value: return False
1715 return True
1716
Rich Lanec2ee4b82013-04-24 17:12:38 -07001717 def pretty_print(self, q):
1718 q.text("icmpv6_type {")
1719 with q.group():
1720 with q.indent(2):
1721 q.breakable()
1722 q.text("value = ");
1723 q.text("%#x" % self.value)
1724 q.breakable()
1725 q.text('}')
1726
Rich Lane7dcdf022013-12-11 14:45:27 -08001727oxm.subtypes[2147498497] = icmpv6_type
1728
1729class icmpv6_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001730 type_len = 2147498754
Rich Lanec2ee4b82013-04-24 17:12:38 -07001731
1732 def __init__(self, value=None, value_mask=None):
1733 if value != None:
1734 self.value = value
1735 else:
1736 self.value = 0
1737 if value_mask != None:
1738 self.value_mask = value_mask
1739 else:
1740 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001741 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001742
1743 def pack(self):
1744 packed = []
1745 packed.append(struct.pack("!L", self.type_len))
1746 packed.append(struct.pack("!B", self.value))
1747 packed.append(struct.pack("!B", self.value_mask))
1748 return ''.join(packed)
1749
1750 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001751 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001752 obj = icmpv6_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001753 _type_len = reader.read("!L")[0]
1754 assert(_type_len == 2147498754)
1755 obj.value = reader.read("!B")[0]
1756 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001757 return obj
1758
1759 def __eq__(self, other):
1760 if type(self) != type(other): return False
1761 if self.value != other.value: return False
1762 if self.value_mask != other.value_mask: return False
1763 return True
1764
Rich Lanec2ee4b82013-04-24 17:12:38 -07001765 def pretty_print(self, q):
1766 q.text("icmpv6_type_masked {")
1767 with q.group():
1768 with q.indent(2):
1769 q.breakable()
1770 q.text("value = ");
1771 q.text("%#x" % self.value)
1772 q.text(","); q.breakable()
1773 q.text("value_mask = ");
1774 q.text("%#x" % self.value_mask)
1775 q.breakable()
1776 q.text('}')
1777
Rich Lane7dcdf022013-12-11 14:45:27 -08001778oxm.subtypes[2147498754] = icmpv6_type_masked
1779
1780class in_phy_port(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001781 type_len = 2147484164
Rich Lanec2ee4b82013-04-24 17:12:38 -07001782
1783 def __init__(self, value=None):
1784 if value != None:
1785 self.value = value
1786 else:
1787 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001788 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001789
1790 def pack(self):
1791 packed = []
1792 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07001793 packed.append(util.pack_port_no(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07001794 return ''.join(packed)
1795
1796 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001797 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001798 obj = in_phy_port()
Dan Talaycof6202252013-07-02 01:00:29 -07001799 _type_len = reader.read("!L")[0]
1800 assert(_type_len == 2147484164)
1801 obj.value = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001802 return obj
1803
1804 def __eq__(self, other):
1805 if type(self) != type(other): return False
1806 if self.value != other.value: return False
1807 return True
1808
Rich Lanec2ee4b82013-04-24 17:12:38 -07001809 def pretty_print(self, q):
1810 q.text("in_phy_port {")
1811 with q.group():
1812 with q.indent(2):
1813 q.breakable()
1814 q.text("value = ");
1815 q.text(util.pretty_port(self.value))
1816 q.breakable()
1817 q.text('}')
1818
Rich Lane7dcdf022013-12-11 14:45:27 -08001819oxm.subtypes[2147484164] = in_phy_port
1820
1821class in_phy_port_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001822 type_len = 2147484424
Rich Lanec2ee4b82013-04-24 17:12:38 -07001823
1824 def __init__(self, value=None, value_mask=None):
1825 if value != None:
1826 self.value = value
1827 else:
1828 self.value = 0
1829 if value_mask != None:
1830 self.value_mask = value_mask
1831 else:
1832 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001833 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001834
1835 def pack(self):
1836 packed = []
1837 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07001838 packed.append(util.pack_port_no(self.value))
1839 packed.append(util.pack_port_no(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07001840 return ''.join(packed)
1841
1842 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001843 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001844 obj = in_phy_port_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001845 _type_len = reader.read("!L")[0]
1846 assert(_type_len == 2147484424)
1847 obj.value = util.unpack_port_no(reader)
1848 obj.value_mask = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001849 return obj
1850
1851 def __eq__(self, other):
1852 if type(self) != type(other): return False
1853 if self.value != other.value: return False
1854 if self.value_mask != other.value_mask: return False
1855 return True
1856
Rich Lanec2ee4b82013-04-24 17:12:38 -07001857 def pretty_print(self, q):
1858 q.text("in_phy_port_masked {")
1859 with q.group():
1860 with q.indent(2):
1861 q.breakable()
1862 q.text("value = ");
1863 q.text(util.pretty_port(self.value))
1864 q.text(","); q.breakable()
1865 q.text("value_mask = ");
1866 q.text(util.pretty_port(self.value_mask))
1867 q.breakable()
1868 q.text('}')
1869
Rich Lane7dcdf022013-12-11 14:45:27 -08001870oxm.subtypes[2147484424] = in_phy_port_masked
1871
1872class in_port(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001873 type_len = 2147483652
Rich Lanec2ee4b82013-04-24 17:12:38 -07001874
1875 def __init__(self, value=None):
1876 if value != None:
1877 self.value = value
1878 else:
1879 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001880 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001881
1882 def pack(self):
1883 packed = []
1884 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07001885 packed.append(util.pack_port_no(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07001886 return ''.join(packed)
1887
1888 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001889 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001890 obj = in_port()
Dan Talaycof6202252013-07-02 01:00:29 -07001891 _type_len = reader.read("!L")[0]
1892 assert(_type_len == 2147483652)
1893 obj.value = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001894 return obj
1895
1896 def __eq__(self, other):
1897 if type(self) != type(other): return False
1898 if self.value != other.value: return False
1899 return True
1900
Rich Lanec2ee4b82013-04-24 17:12:38 -07001901 def pretty_print(self, q):
1902 q.text("in_port {")
1903 with q.group():
1904 with q.indent(2):
1905 q.breakable()
1906 q.text("value = ");
1907 q.text(util.pretty_port(self.value))
1908 q.breakable()
1909 q.text('}')
1910
Rich Lane7dcdf022013-12-11 14:45:27 -08001911oxm.subtypes[2147483652] = in_port
1912
1913class in_port_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001914 type_len = 2147483912
Rich Lanec2ee4b82013-04-24 17:12:38 -07001915
1916 def __init__(self, value=None, value_mask=None):
1917 if value != None:
1918 self.value = value
1919 else:
1920 self.value = 0
1921 if value_mask != None:
1922 self.value_mask = value_mask
1923 else:
1924 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001925 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001926
1927 def pack(self):
1928 packed = []
1929 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07001930 packed.append(util.pack_port_no(self.value))
1931 packed.append(util.pack_port_no(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07001932 return ''.join(packed)
1933
1934 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001935 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001936 obj = in_port_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07001937 _type_len = reader.read("!L")[0]
1938 assert(_type_len == 2147483912)
1939 obj.value = util.unpack_port_no(reader)
1940 obj.value_mask = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07001941 return obj
1942
1943 def __eq__(self, other):
1944 if type(self) != type(other): return False
1945 if self.value != other.value: return False
1946 if self.value_mask != other.value_mask: return False
1947 return True
1948
Rich Lanec2ee4b82013-04-24 17:12:38 -07001949 def pretty_print(self, q):
1950 q.text("in_port_masked {")
1951 with q.group():
1952 with q.indent(2):
1953 q.breakable()
1954 q.text("value = ");
1955 q.text(util.pretty_port(self.value))
1956 q.text(","); q.breakable()
1957 q.text("value_mask = ");
1958 q.text(util.pretty_port(self.value_mask))
1959 q.breakable()
1960 q.text('}')
1961
Rich Lane7dcdf022013-12-11 14:45:27 -08001962oxm.subtypes[2147483912] = in_port_masked
1963
1964class ip_dscp(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07001965 type_len = 2147487745
Rich Lanec2ee4b82013-04-24 17:12:38 -07001966
1967 def __init__(self, value=None):
1968 if value != None:
1969 self.value = value
1970 else:
1971 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001972 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07001973
1974 def pack(self):
1975 packed = []
1976 packed.append(struct.pack("!L", self.type_len))
1977 packed.append(struct.pack("!B", self.value))
1978 return ''.join(packed)
1979
1980 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001981 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07001982 obj = ip_dscp()
Dan Talaycof6202252013-07-02 01:00:29 -07001983 _type_len = reader.read("!L")[0]
1984 assert(_type_len == 2147487745)
1985 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07001986 return obj
1987
1988 def __eq__(self, other):
1989 if type(self) != type(other): return False
1990 if self.value != other.value: return False
1991 return True
1992
Rich Lanec2ee4b82013-04-24 17:12:38 -07001993 def pretty_print(self, q):
1994 q.text("ip_dscp {")
1995 with q.group():
1996 with q.indent(2):
1997 q.breakable()
1998 q.text("value = ");
1999 q.text("%#x" % self.value)
2000 q.breakable()
2001 q.text('}')
2002
Rich Lane7dcdf022013-12-11 14:45:27 -08002003oxm.subtypes[2147487745] = ip_dscp
2004
2005class ip_dscp_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002006 type_len = 2147488002
Rich Lanec2ee4b82013-04-24 17:12:38 -07002007
2008 def __init__(self, value=None, value_mask=None):
2009 if value != None:
2010 self.value = value
2011 else:
2012 self.value = 0
2013 if value_mask != None:
2014 self.value_mask = value_mask
2015 else:
2016 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002017 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002018
2019 def pack(self):
2020 packed = []
2021 packed.append(struct.pack("!L", self.type_len))
2022 packed.append(struct.pack("!B", self.value))
2023 packed.append(struct.pack("!B", self.value_mask))
2024 return ''.join(packed)
2025
2026 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002027 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002028 obj = ip_dscp_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002029 _type_len = reader.read("!L")[0]
2030 assert(_type_len == 2147488002)
2031 obj.value = reader.read("!B")[0]
2032 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002033 return obj
2034
2035 def __eq__(self, other):
2036 if type(self) != type(other): return False
2037 if self.value != other.value: return False
2038 if self.value_mask != other.value_mask: return False
2039 return True
2040
Rich Lanec2ee4b82013-04-24 17:12:38 -07002041 def pretty_print(self, q):
2042 q.text("ip_dscp_masked {")
2043 with q.group():
2044 with q.indent(2):
2045 q.breakable()
2046 q.text("value = ");
2047 q.text("%#x" % self.value)
2048 q.text(","); q.breakable()
2049 q.text("value_mask = ");
2050 q.text("%#x" % self.value_mask)
2051 q.breakable()
2052 q.text('}')
2053
Rich Lane7dcdf022013-12-11 14:45:27 -08002054oxm.subtypes[2147488002] = ip_dscp_masked
2055
2056class ip_ecn(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002057 type_len = 2147488257
Rich Lanec2ee4b82013-04-24 17:12:38 -07002058
2059 def __init__(self, value=None):
2060 if value != None:
2061 self.value = value
2062 else:
2063 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002064 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002065
2066 def pack(self):
2067 packed = []
2068 packed.append(struct.pack("!L", self.type_len))
2069 packed.append(struct.pack("!B", self.value))
2070 return ''.join(packed)
2071
2072 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002073 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002074 obj = ip_ecn()
Dan Talaycof6202252013-07-02 01:00:29 -07002075 _type_len = reader.read("!L")[0]
2076 assert(_type_len == 2147488257)
2077 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002078 return obj
2079
2080 def __eq__(self, other):
2081 if type(self) != type(other): return False
2082 if self.value != other.value: return False
2083 return True
2084
Rich Lanec2ee4b82013-04-24 17:12:38 -07002085 def pretty_print(self, q):
2086 q.text("ip_ecn {")
2087 with q.group():
2088 with q.indent(2):
2089 q.breakable()
2090 q.text("value = ");
2091 q.text("%#x" % self.value)
2092 q.breakable()
2093 q.text('}')
2094
Rich Lane7dcdf022013-12-11 14:45:27 -08002095oxm.subtypes[2147488257] = ip_ecn
2096
2097class ip_ecn_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002098 type_len = 2147488514
Rich Lanec2ee4b82013-04-24 17:12:38 -07002099
2100 def __init__(self, value=None, value_mask=None):
2101 if value != None:
2102 self.value = value
2103 else:
2104 self.value = 0
2105 if value_mask != None:
2106 self.value_mask = value_mask
2107 else:
2108 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002109 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002110
2111 def pack(self):
2112 packed = []
2113 packed.append(struct.pack("!L", self.type_len))
2114 packed.append(struct.pack("!B", self.value))
2115 packed.append(struct.pack("!B", self.value_mask))
2116 return ''.join(packed)
2117
2118 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002119 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002120 obj = ip_ecn_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002121 _type_len = reader.read("!L")[0]
2122 assert(_type_len == 2147488514)
2123 obj.value = reader.read("!B")[0]
2124 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002125 return obj
2126
2127 def __eq__(self, other):
2128 if type(self) != type(other): return False
2129 if self.value != other.value: return False
2130 if self.value_mask != other.value_mask: return False
2131 return True
2132
Rich Lanec2ee4b82013-04-24 17:12:38 -07002133 def pretty_print(self, q):
2134 q.text("ip_ecn_masked {")
2135 with q.group():
2136 with q.indent(2):
2137 q.breakable()
2138 q.text("value = ");
2139 q.text("%#x" % self.value)
2140 q.text(","); q.breakable()
2141 q.text("value_mask = ");
2142 q.text("%#x" % self.value_mask)
2143 q.breakable()
2144 q.text('}')
2145
Rich Lane7dcdf022013-12-11 14:45:27 -08002146oxm.subtypes[2147488514] = ip_ecn_masked
2147
2148class ip_proto(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002149 type_len = 2147488769
Rich Lanec2ee4b82013-04-24 17:12:38 -07002150
2151 def __init__(self, value=None):
2152 if value != None:
2153 self.value = value
2154 else:
2155 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002156 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002157
2158 def pack(self):
2159 packed = []
2160 packed.append(struct.pack("!L", self.type_len))
2161 packed.append(struct.pack("!B", self.value))
2162 return ''.join(packed)
2163
2164 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002165 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002166 obj = ip_proto()
Dan Talaycof6202252013-07-02 01:00:29 -07002167 _type_len = reader.read("!L")[0]
2168 assert(_type_len == 2147488769)
2169 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002170 return obj
2171
2172 def __eq__(self, other):
2173 if type(self) != type(other): return False
2174 if self.value != other.value: return False
2175 return True
2176
Rich Lanec2ee4b82013-04-24 17:12:38 -07002177 def pretty_print(self, q):
2178 q.text("ip_proto {")
2179 with q.group():
2180 with q.indent(2):
2181 q.breakable()
2182 q.text("value = ");
2183 q.text("%#x" % self.value)
2184 q.breakable()
2185 q.text('}')
2186
Rich Lane7dcdf022013-12-11 14:45:27 -08002187oxm.subtypes[2147488769] = ip_proto
2188
2189class ip_proto_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002190 type_len = 2147489026
Rich Lanec2ee4b82013-04-24 17:12:38 -07002191
2192 def __init__(self, value=None, value_mask=None):
2193 if value != None:
2194 self.value = value
2195 else:
2196 self.value = 0
2197 if value_mask != None:
2198 self.value_mask = value_mask
2199 else:
2200 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002201 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002202
2203 def pack(self):
2204 packed = []
2205 packed.append(struct.pack("!L", self.type_len))
2206 packed.append(struct.pack("!B", self.value))
2207 packed.append(struct.pack("!B", self.value_mask))
2208 return ''.join(packed)
2209
2210 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002211 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002212 obj = ip_proto_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002213 _type_len = reader.read("!L")[0]
2214 assert(_type_len == 2147489026)
2215 obj.value = reader.read("!B")[0]
2216 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002217 return obj
2218
2219 def __eq__(self, other):
2220 if type(self) != type(other): return False
2221 if self.value != other.value: return False
2222 if self.value_mask != other.value_mask: return False
2223 return True
2224
Rich Lanec2ee4b82013-04-24 17:12:38 -07002225 def pretty_print(self, q):
2226 q.text("ip_proto_masked {")
2227 with q.group():
2228 with q.indent(2):
2229 q.breakable()
2230 q.text("value = ");
2231 q.text("%#x" % self.value)
2232 q.text(","); q.breakable()
2233 q.text("value_mask = ");
2234 q.text("%#x" % self.value_mask)
2235 q.breakable()
2236 q.text('}')
2237
Rich Lane7dcdf022013-12-11 14:45:27 -08002238oxm.subtypes[2147489026] = ip_proto_masked
2239
2240class ipv4_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002241 type_len = 2147489796
Rich Lanec2ee4b82013-04-24 17:12:38 -07002242
2243 def __init__(self, value=None):
2244 if value != None:
2245 self.value = value
2246 else:
2247 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002248 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002249
2250 def pack(self):
2251 packed = []
2252 packed.append(struct.pack("!L", self.type_len))
2253 packed.append(struct.pack("!L", self.value))
2254 return ''.join(packed)
2255
2256 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002257 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002258 obj = ipv4_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07002259 _type_len = reader.read("!L")[0]
2260 assert(_type_len == 2147489796)
2261 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002262 return obj
2263
2264 def __eq__(self, other):
2265 if type(self) != type(other): return False
2266 if self.value != other.value: return False
2267 return True
2268
Rich Lanec2ee4b82013-04-24 17:12:38 -07002269 def pretty_print(self, q):
2270 q.text("ipv4_dst {")
2271 with q.group():
2272 with q.indent(2):
2273 q.breakable()
2274 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07002275 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002276 q.breakable()
2277 q.text('}')
2278
Rich Lane7dcdf022013-12-11 14:45:27 -08002279oxm.subtypes[2147489796] = ipv4_dst
2280
2281class ipv4_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002282 type_len = 2147490056
Rich Lanec2ee4b82013-04-24 17:12:38 -07002283
2284 def __init__(self, value=None, value_mask=None):
2285 if value != None:
2286 self.value = value
2287 else:
2288 self.value = 0
2289 if value_mask != None:
2290 self.value_mask = value_mask
2291 else:
2292 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002293 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002294
2295 def pack(self):
2296 packed = []
2297 packed.append(struct.pack("!L", self.type_len))
2298 packed.append(struct.pack("!L", self.value))
2299 packed.append(struct.pack("!L", self.value_mask))
2300 return ''.join(packed)
2301
2302 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002303 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002304 obj = ipv4_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002305 _type_len = reader.read("!L")[0]
2306 assert(_type_len == 2147490056)
2307 obj.value = reader.read("!L")[0]
2308 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002309 return obj
2310
2311 def __eq__(self, other):
2312 if type(self) != type(other): return False
2313 if self.value != other.value: return False
2314 if self.value_mask != other.value_mask: return False
2315 return True
2316
Rich Lanec2ee4b82013-04-24 17:12:38 -07002317 def pretty_print(self, q):
2318 q.text("ipv4_dst_masked {")
2319 with q.group():
2320 with q.indent(2):
2321 q.breakable()
2322 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07002323 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002324 q.text(","); q.breakable()
2325 q.text("value_mask = ");
Rich Laned53156a2013-08-05 17:17:33 -07002326 q.text(util.pretty_ipv4(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002327 q.breakable()
2328 q.text('}')
2329
Rich Lane7dcdf022013-12-11 14:45:27 -08002330oxm.subtypes[2147490056] = ipv4_dst_masked
2331
2332class ipv4_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002333 type_len = 2147489284
Rich Lanec2ee4b82013-04-24 17:12:38 -07002334
2335 def __init__(self, value=None):
2336 if value != None:
2337 self.value = value
2338 else:
2339 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002340 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002341
2342 def pack(self):
2343 packed = []
2344 packed.append(struct.pack("!L", self.type_len))
2345 packed.append(struct.pack("!L", self.value))
2346 return ''.join(packed)
2347
2348 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002349 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002350 obj = ipv4_src()
Dan Talaycof6202252013-07-02 01:00:29 -07002351 _type_len = reader.read("!L")[0]
2352 assert(_type_len == 2147489284)
2353 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002354 return obj
2355
2356 def __eq__(self, other):
2357 if type(self) != type(other): return False
2358 if self.value != other.value: return False
2359 return True
2360
Rich Lanec2ee4b82013-04-24 17:12:38 -07002361 def pretty_print(self, q):
2362 q.text("ipv4_src {")
2363 with q.group():
2364 with q.indent(2):
2365 q.breakable()
2366 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07002367 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002368 q.breakable()
2369 q.text('}')
2370
Rich Lane7dcdf022013-12-11 14:45:27 -08002371oxm.subtypes[2147489284] = ipv4_src
2372
2373class ipv4_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002374 type_len = 2147489544
Rich Lanec2ee4b82013-04-24 17:12:38 -07002375
2376 def __init__(self, value=None, value_mask=None):
2377 if value != None:
2378 self.value = value
2379 else:
2380 self.value = 0
2381 if value_mask != None:
2382 self.value_mask = value_mask
2383 else:
2384 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002385 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002386
2387 def pack(self):
2388 packed = []
2389 packed.append(struct.pack("!L", self.type_len))
2390 packed.append(struct.pack("!L", self.value))
2391 packed.append(struct.pack("!L", self.value_mask))
2392 return ''.join(packed)
2393
2394 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002395 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002396 obj = ipv4_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002397 _type_len = reader.read("!L")[0]
2398 assert(_type_len == 2147489544)
2399 obj.value = reader.read("!L")[0]
2400 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002401 return obj
2402
2403 def __eq__(self, other):
2404 if type(self) != type(other): return False
2405 if self.value != other.value: return False
2406 if self.value_mask != other.value_mask: return False
2407 return True
2408
Rich Lanec2ee4b82013-04-24 17:12:38 -07002409 def pretty_print(self, q):
2410 q.text("ipv4_src_masked {")
2411 with q.group():
2412 with q.indent(2):
2413 q.breakable()
2414 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07002415 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002416 q.text(","); q.breakable()
2417 q.text("value_mask = ");
Rich Laned53156a2013-08-05 17:17:33 -07002418 q.text(util.pretty_ipv4(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07002419 q.breakable()
2420 q.text('}')
2421
Rich Lane7dcdf022013-12-11 14:45:27 -08002422oxm.subtypes[2147489544] = ipv4_src_masked
2423
2424class ipv6_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002425 type_len = 2147497488
Rich Lanec2ee4b82013-04-24 17:12:38 -07002426
2427 def __init__(self, value=None):
2428 if value != None:
2429 self.value = value
2430 else:
2431 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 -08002432 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002433
2434 def pack(self):
2435 packed = []
2436 packed.append(struct.pack("!L", self.type_len))
2437 packed.append(struct.pack("!16s", self.value))
2438 return ''.join(packed)
2439
2440 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002441 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002442 obj = ipv6_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07002443 _type_len = reader.read("!L")[0]
2444 assert(_type_len == 2147497488)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002445 obj.value = reader.read('!16s')[0]
2446 return obj
2447
2448 def __eq__(self, other):
2449 if type(self) != type(other): return False
2450 if self.value != other.value: return False
2451 return True
2452
Rich Lanec2ee4b82013-04-24 17:12:38 -07002453 def pretty_print(self, q):
2454 q.text("ipv6_dst {")
2455 with q.group():
2456 with q.indent(2):
2457 q.breakable()
2458 q.text("value = ");
2459 q.pp(self.value)
2460 q.breakable()
2461 q.text('}')
2462
Rich Lane7dcdf022013-12-11 14:45:27 -08002463oxm.subtypes[2147497488] = ipv6_dst
2464
2465class ipv6_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002466 type_len = 2147497760
Rich Lanec2ee4b82013-04-24 17:12:38 -07002467
2468 def __init__(self, value=None, value_mask=None):
2469 if value != None:
2470 self.value = value
2471 else:
2472 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2473 if value_mask != None:
2474 self.value_mask = value_mask
2475 else:
2476 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 -08002477 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002478
2479 def pack(self):
2480 packed = []
2481 packed.append(struct.pack("!L", self.type_len))
2482 packed.append(struct.pack("!16s", self.value))
2483 packed.append(struct.pack("!16s", self.value_mask))
2484 return ''.join(packed)
2485
2486 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002487 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002488 obj = ipv6_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002489 _type_len = reader.read("!L")[0]
2490 assert(_type_len == 2147497760)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002491 obj.value = reader.read('!16s')[0]
2492 obj.value_mask = reader.read('!16s')[0]
2493 return obj
2494
2495 def __eq__(self, other):
2496 if type(self) != type(other): return False
2497 if self.value != other.value: return False
2498 if self.value_mask != other.value_mask: return False
2499 return True
2500
Rich Lanec2ee4b82013-04-24 17:12:38 -07002501 def pretty_print(self, q):
2502 q.text("ipv6_dst_masked {")
2503 with q.group():
2504 with q.indent(2):
2505 q.breakable()
2506 q.text("value = ");
2507 q.pp(self.value)
2508 q.text(","); q.breakable()
2509 q.text("value_mask = ");
2510 q.pp(self.value_mask)
2511 q.breakable()
2512 q.text('}')
2513
Rich Lane7dcdf022013-12-11 14:45:27 -08002514oxm.subtypes[2147497760] = ipv6_dst_masked
2515
2516class ipv6_flabel(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002517 type_len = 2147497988
Rich Lanec2ee4b82013-04-24 17:12:38 -07002518
2519 def __init__(self, value=None):
2520 if value != None:
2521 self.value = value
2522 else:
2523 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002524 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002525
2526 def pack(self):
2527 packed = []
2528 packed.append(struct.pack("!L", self.type_len))
2529 packed.append(struct.pack("!L", self.value))
2530 return ''.join(packed)
2531
2532 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002533 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002534 obj = ipv6_flabel()
Dan Talaycof6202252013-07-02 01:00:29 -07002535 _type_len = reader.read("!L")[0]
2536 assert(_type_len == 2147497988)
2537 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002538 return obj
2539
2540 def __eq__(self, other):
2541 if type(self) != type(other): return False
2542 if self.value != other.value: return False
2543 return True
2544
Rich Lanec2ee4b82013-04-24 17:12:38 -07002545 def pretty_print(self, q):
2546 q.text("ipv6_flabel {")
2547 with q.group():
2548 with q.indent(2):
2549 q.breakable()
2550 q.text("value = ");
2551 q.text("%#x" % self.value)
2552 q.breakable()
2553 q.text('}')
2554
Rich Lane7dcdf022013-12-11 14:45:27 -08002555oxm.subtypes[2147497988] = ipv6_flabel
2556
2557class ipv6_flabel_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002558 type_len = 2147498248
Rich Lanec2ee4b82013-04-24 17:12:38 -07002559
2560 def __init__(self, value=None, value_mask=None):
2561 if value != None:
2562 self.value = value
2563 else:
2564 self.value = 0
2565 if value_mask != None:
2566 self.value_mask = value_mask
2567 else:
2568 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002569 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002570
2571 def pack(self):
2572 packed = []
2573 packed.append(struct.pack("!L", self.type_len))
2574 packed.append(struct.pack("!L", self.value))
2575 packed.append(struct.pack("!L", self.value_mask))
2576 return ''.join(packed)
2577
2578 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002579 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002580 obj = ipv6_flabel_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002581 _type_len = reader.read("!L")[0]
2582 assert(_type_len == 2147498248)
2583 obj.value = reader.read("!L")[0]
2584 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002585 return obj
2586
2587 def __eq__(self, other):
2588 if type(self) != type(other): return False
2589 if self.value != other.value: return False
2590 if self.value_mask != other.value_mask: return False
2591 return True
2592
Rich Lanec2ee4b82013-04-24 17:12:38 -07002593 def pretty_print(self, q):
2594 q.text("ipv6_flabel_masked {")
2595 with q.group():
2596 with q.indent(2):
2597 q.breakable()
2598 q.text("value = ");
2599 q.text("%#x" % self.value)
2600 q.text(","); q.breakable()
2601 q.text("value_mask = ");
2602 q.text("%#x" % self.value_mask)
2603 q.breakable()
2604 q.text('}')
2605
Rich Lane7dcdf022013-12-11 14:45:27 -08002606oxm.subtypes[2147498248] = ipv6_flabel_masked
2607
2608class ipv6_nd_sll(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002609 type_len = 2147500038
Rich Lanec2ee4b82013-04-24 17:12:38 -07002610
2611 def __init__(self, value=None):
2612 if value != None:
2613 self.value = value
2614 else:
2615 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002616 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002617
2618 def pack(self):
2619 packed = []
2620 packed.append(struct.pack("!L", self.type_len))
2621 packed.append(struct.pack("!6B", *self.value))
2622 return ''.join(packed)
2623
2624 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002625 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002626 obj = ipv6_nd_sll()
Dan Talaycof6202252013-07-02 01:00:29 -07002627 _type_len = reader.read("!L")[0]
2628 assert(_type_len == 2147500038)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002629 obj.value = list(reader.read('!6B'))
2630 return obj
2631
2632 def __eq__(self, other):
2633 if type(self) != type(other): return False
2634 if self.value != other.value: return False
2635 return True
2636
Rich Lanec2ee4b82013-04-24 17:12:38 -07002637 def pretty_print(self, q):
2638 q.text("ipv6_nd_sll {")
2639 with q.group():
2640 with q.indent(2):
2641 q.breakable()
2642 q.text("value = ");
2643 q.text(util.pretty_mac(self.value))
2644 q.breakable()
2645 q.text('}')
2646
Rich Lane7dcdf022013-12-11 14:45:27 -08002647oxm.subtypes[2147500038] = ipv6_nd_sll
2648
2649class ipv6_nd_sll_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002650 type_len = 2147500300
Rich Lanec2ee4b82013-04-24 17:12:38 -07002651
2652 def __init__(self, value=None, value_mask=None):
2653 if value != None:
2654 self.value = value
2655 else:
2656 self.value = [0,0,0,0,0,0]
2657 if value_mask != None:
2658 self.value_mask = value_mask
2659 else:
2660 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002661 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002662
2663 def pack(self):
2664 packed = []
2665 packed.append(struct.pack("!L", self.type_len))
2666 packed.append(struct.pack("!6B", *self.value))
2667 packed.append(struct.pack("!6B", *self.value_mask))
2668 return ''.join(packed)
2669
2670 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002671 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002672 obj = ipv6_nd_sll_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002673 _type_len = reader.read("!L")[0]
2674 assert(_type_len == 2147500300)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002675 obj.value = list(reader.read('!6B'))
2676 obj.value_mask = list(reader.read('!6B'))
2677 return obj
2678
2679 def __eq__(self, other):
2680 if type(self) != type(other): return False
2681 if self.value != other.value: return False
2682 if self.value_mask != other.value_mask: return False
2683 return True
2684
Rich Lanec2ee4b82013-04-24 17:12:38 -07002685 def pretty_print(self, q):
2686 q.text("ipv6_nd_sll_masked {")
2687 with q.group():
2688 with q.indent(2):
2689 q.breakable()
2690 q.text("value = ");
2691 q.text(util.pretty_mac(self.value))
2692 q.text(","); q.breakable()
2693 q.text("value_mask = ");
2694 q.text(util.pretty_mac(self.value_mask))
2695 q.breakable()
2696 q.text('}')
2697
Rich Lane7dcdf022013-12-11 14:45:27 -08002698oxm.subtypes[2147500300] = ipv6_nd_sll_masked
2699
2700class ipv6_nd_target(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002701 type_len = 2147499536
Rich Lanec2ee4b82013-04-24 17:12:38 -07002702
2703 def __init__(self, value=None):
2704 if value != None:
2705 self.value = value
2706 else:
2707 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 -08002708 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002709
2710 def pack(self):
2711 packed = []
2712 packed.append(struct.pack("!L", self.type_len))
2713 packed.append(struct.pack("!16s", self.value))
2714 return ''.join(packed)
2715
2716 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002717 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002718 obj = ipv6_nd_target()
Dan Talaycof6202252013-07-02 01:00:29 -07002719 _type_len = reader.read("!L")[0]
2720 assert(_type_len == 2147499536)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002721 obj.value = reader.read('!16s')[0]
2722 return obj
2723
2724 def __eq__(self, other):
2725 if type(self) != type(other): return False
2726 if self.value != other.value: return False
2727 return True
2728
Rich Lanec2ee4b82013-04-24 17:12:38 -07002729 def pretty_print(self, q):
2730 q.text("ipv6_nd_target {")
2731 with q.group():
2732 with q.indent(2):
2733 q.breakable()
2734 q.text("value = ");
2735 q.pp(self.value)
2736 q.breakable()
2737 q.text('}')
2738
Rich Lane7dcdf022013-12-11 14:45:27 -08002739oxm.subtypes[2147499536] = ipv6_nd_target
2740
2741class ipv6_nd_target_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002742 type_len = 2147499808
Rich Lanec2ee4b82013-04-24 17:12:38 -07002743
2744 def __init__(self, value=None, value_mask=None):
2745 if value != None:
2746 self.value = value
2747 else:
2748 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2749 if value_mask != None:
2750 self.value_mask = value_mask
2751 else:
2752 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 -08002753 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002754
2755 def pack(self):
2756 packed = []
2757 packed.append(struct.pack("!L", self.type_len))
2758 packed.append(struct.pack("!16s", self.value))
2759 packed.append(struct.pack("!16s", self.value_mask))
2760 return ''.join(packed)
2761
2762 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002763 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002764 obj = ipv6_nd_target_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002765 _type_len = reader.read("!L")[0]
2766 assert(_type_len == 2147499808)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002767 obj.value = reader.read('!16s')[0]
2768 obj.value_mask = reader.read('!16s')[0]
2769 return obj
2770
2771 def __eq__(self, other):
2772 if type(self) != type(other): return False
2773 if self.value != other.value: return False
2774 if self.value_mask != other.value_mask: return False
2775 return True
2776
Rich Lanec2ee4b82013-04-24 17:12:38 -07002777 def pretty_print(self, q):
2778 q.text("ipv6_nd_target_masked {")
2779 with q.group():
2780 with q.indent(2):
2781 q.breakable()
2782 q.text("value = ");
2783 q.pp(self.value)
2784 q.text(","); q.breakable()
2785 q.text("value_mask = ");
2786 q.pp(self.value_mask)
2787 q.breakable()
2788 q.text('}')
2789
Rich Lane7dcdf022013-12-11 14:45:27 -08002790oxm.subtypes[2147499808] = ipv6_nd_target_masked
2791
2792class ipv6_nd_tll(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002793 type_len = 2147500550
Rich Lanec2ee4b82013-04-24 17:12:38 -07002794
2795 def __init__(self, value=None):
2796 if value != None:
2797 self.value = value
2798 else:
2799 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002800 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002801
2802 def pack(self):
2803 packed = []
2804 packed.append(struct.pack("!L", self.type_len))
2805 packed.append(struct.pack("!6B", *self.value))
2806 return ''.join(packed)
2807
2808 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002809 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002810 obj = ipv6_nd_tll()
Dan Talaycof6202252013-07-02 01:00:29 -07002811 _type_len = reader.read("!L")[0]
2812 assert(_type_len == 2147500550)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002813 obj.value = list(reader.read('!6B'))
2814 return obj
2815
2816 def __eq__(self, other):
2817 if type(self) != type(other): return False
2818 if self.value != other.value: return False
2819 return True
2820
Rich Lanec2ee4b82013-04-24 17:12:38 -07002821 def pretty_print(self, q):
2822 q.text("ipv6_nd_tll {")
2823 with q.group():
2824 with q.indent(2):
2825 q.breakable()
2826 q.text("value = ");
2827 q.text(util.pretty_mac(self.value))
2828 q.breakable()
2829 q.text('}')
2830
Rich Lane7dcdf022013-12-11 14:45:27 -08002831oxm.subtypes[2147500550] = ipv6_nd_tll
2832
2833class ipv6_nd_tll_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002834 type_len = 2147500812
Rich Lanec2ee4b82013-04-24 17:12:38 -07002835
2836 def __init__(self, value=None, value_mask=None):
2837 if value != None:
2838 self.value = value
2839 else:
2840 self.value = [0,0,0,0,0,0]
2841 if value_mask != None:
2842 self.value_mask = value_mask
2843 else:
2844 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002845 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002846
2847 def pack(self):
2848 packed = []
2849 packed.append(struct.pack("!L", self.type_len))
2850 packed.append(struct.pack("!6B", *self.value))
2851 packed.append(struct.pack("!6B", *self.value_mask))
2852 return ''.join(packed)
2853
2854 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002855 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002856 obj = ipv6_nd_tll_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002857 _type_len = reader.read("!L")[0]
2858 assert(_type_len == 2147500812)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002859 obj.value = list(reader.read('!6B'))
2860 obj.value_mask = list(reader.read('!6B'))
2861 return obj
2862
2863 def __eq__(self, other):
2864 if type(self) != type(other): return False
2865 if self.value != other.value: return False
2866 if self.value_mask != other.value_mask: return False
2867 return True
2868
Rich Lanec2ee4b82013-04-24 17:12:38 -07002869 def pretty_print(self, q):
2870 q.text("ipv6_nd_tll_masked {")
2871 with q.group():
2872 with q.indent(2):
2873 q.breakable()
2874 q.text("value = ");
2875 q.text(util.pretty_mac(self.value))
2876 q.text(","); q.breakable()
2877 q.text("value_mask = ");
2878 q.text(util.pretty_mac(self.value_mask))
2879 q.breakable()
2880 q.text('}')
2881
Rich Lane7dcdf022013-12-11 14:45:27 -08002882oxm.subtypes[2147500812] = ipv6_nd_tll_masked
2883
2884class ipv6_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002885 type_len = 2147496976
Rich Lanec2ee4b82013-04-24 17:12:38 -07002886
2887 def __init__(self, value=None):
2888 if value != None:
2889 self.value = value
2890 else:
2891 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 -08002892 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002893
2894 def pack(self):
2895 packed = []
2896 packed.append(struct.pack("!L", self.type_len))
2897 packed.append(struct.pack("!16s", self.value))
2898 return ''.join(packed)
2899
2900 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002901 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002902 obj = ipv6_src()
Dan Talaycof6202252013-07-02 01:00:29 -07002903 _type_len = reader.read("!L")[0]
2904 assert(_type_len == 2147496976)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002905 obj.value = reader.read('!16s')[0]
2906 return obj
2907
2908 def __eq__(self, other):
2909 if type(self) != type(other): return False
2910 if self.value != other.value: return False
2911 return True
2912
Rich Lanec2ee4b82013-04-24 17:12:38 -07002913 def pretty_print(self, q):
2914 q.text("ipv6_src {")
2915 with q.group():
2916 with q.indent(2):
2917 q.breakable()
2918 q.text("value = ");
2919 q.pp(self.value)
2920 q.breakable()
2921 q.text('}')
2922
Rich Lane7dcdf022013-12-11 14:45:27 -08002923oxm.subtypes[2147496976] = ipv6_src
2924
2925class ipv6_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002926 type_len = 2147497248
Rich Lanec2ee4b82013-04-24 17:12:38 -07002927
2928 def __init__(self, value=None, value_mask=None):
2929 if value != None:
2930 self.value = value
2931 else:
2932 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2933 if value_mask != None:
2934 self.value_mask = value_mask
2935 else:
2936 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 -08002937 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002938
2939 def pack(self):
2940 packed = []
2941 packed.append(struct.pack("!L", self.type_len))
2942 packed.append(struct.pack("!16s", self.value))
2943 packed.append(struct.pack("!16s", self.value_mask))
2944 return ''.join(packed)
2945
2946 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002947 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002948 obj = ipv6_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002949 _type_len = reader.read("!L")[0]
2950 assert(_type_len == 2147497248)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002951 obj.value = reader.read('!16s')[0]
2952 obj.value_mask = reader.read('!16s')[0]
2953 return obj
2954
2955 def __eq__(self, other):
2956 if type(self) != type(other): return False
2957 if self.value != other.value: return False
2958 if self.value_mask != other.value_mask: return False
2959 return True
2960
Rich Lanec2ee4b82013-04-24 17:12:38 -07002961 def pretty_print(self, q):
2962 q.text("ipv6_src_masked {")
2963 with q.group():
2964 with q.indent(2):
2965 q.breakable()
2966 q.text("value = ");
2967 q.pp(self.value)
2968 q.text(","); q.breakable()
2969 q.text("value_mask = ");
2970 q.pp(self.value_mask)
2971 q.breakable()
2972 q.text('}')
2973
Rich Lane7dcdf022013-12-11 14:45:27 -08002974oxm.subtypes[2147497248] = ipv6_src_masked
2975
2976class metadata(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002977 type_len = 2147484680
Rich Lanec2ee4b82013-04-24 17:12:38 -07002978
2979 def __init__(self, value=None):
2980 if value != None:
2981 self.value = value
2982 else:
2983 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002984 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002985
2986 def pack(self):
2987 packed = []
2988 packed.append(struct.pack("!L", self.type_len))
2989 packed.append(struct.pack("!Q", self.value))
2990 return ''.join(packed)
2991
2992 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002993 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002994 obj = metadata()
Dan Talaycof6202252013-07-02 01:00:29 -07002995 _type_len = reader.read("!L")[0]
2996 assert(_type_len == 2147484680)
2997 obj.value = reader.read("!Q")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07002998 return obj
2999
3000 def __eq__(self, other):
3001 if type(self) != type(other): return False
3002 if self.value != other.value: return False
3003 return True
3004
Rich Lanec2ee4b82013-04-24 17:12:38 -07003005 def pretty_print(self, q):
3006 q.text("metadata {")
3007 with q.group():
3008 with q.indent(2):
3009 q.breakable()
3010 q.text("value = ");
3011 q.text("%#x" % self.value)
3012 q.breakable()
3013 q.text('}')
3014
Rich Lane7dcdf022013-12-11 14:45:27 -08003015oxm.subtypes[2147484680] = metadata
3016
3017class metadata_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003018 type_len = 2147484944
Rich Lanec2ee4b82013-04-24 17:12:38 -07003019
3020 def __init__(self, value=None, value_mask=None):
3021 if value != None:
3022 self.value = value
3023 else:
3024 self.value = 0
3025 if value_mask != None:
3026 self.value_mask = value_mask
3027 else:
3028 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003029 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003030
3031 def pack(self):
3032 packed = []
3033 packed.append(struct.pack("!L", self.type_len))
3034 packed.append(struct.pack("!Q", self.value))
3035 packed.append(struct.pack("!Q", self.value_mask))
3036 return ''.join(packed)
3037
3038 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003039 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003040 obj = metadata_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003041 _type_len = reader.read("!L")[0]
3042 assert(_type_len == 2147484944)
3043 obj.value = reader.read("!Q")[0]
3044 obj.value_mask = reader.read("!Q")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003045 return obj
3046
3047 def __eq__(self, other):
3048 if type(self) != type(other): return False
3049 if self.value != other.value: return False
3050 if self.value_mask != other.value_mask: return False
3051 return True
3052
Rich Lanec2ee4b82013-04-24 17:12:38 -07003053 def pretty_print(self, q):
3054 q.text("metadata_masked {")
3055 with q.group():
3056 with q.indent(2):
3057 q.breakable()
3058 q.text("value = ");
3059 q.text("%#x" % self.value)
3060 q.text(","); q.breakable()
3061 q.text("value_mask = ");
3062 q.text("%#x" % self.value_mask)
3063 q.breakable()
3064 q.text('}')
3065
Rich Lane7dcdf022013-12-11 14:45:27 -08003066oxm.subtypes[2147484944] = metadata_masked
3067
3068class mpls_label(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003069 type_len = 2147501060
Rich Lanec2ee4b82013-04-24 17:12:38 -07003070
3071 def __init__(self, value=None):
3072 if value != None:
3073 self.value = value
3074 else:
3075 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003076 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003077
3078 def pack(self):
3079 packed = []
3080 packed.append(struct.pack("!L", self.type_len))
3081 packed.append(struct.pack("!L", self.value))
3082 return ''.join(packed)
3083
3084 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003085 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003086 obj = mpls_label()
Dan Talaycof6202252013-07-02 01:00:29 -07003087 _type_len = reader.read("!L")[0]
3088 assert(_type_len == 2147501060)
3089 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003090 return obj
3091
3092 def __eq__(self, other):
3093 if type(self) != type(other): return False
3094 if self.value != other.value: return False
3095 return True
3096
Rich Lanec2ee4b82013-04-24 17:12:38 -07003097 def pretty_print(self, q):
3098 q.text("mpls_label {")
3099 with q.group():
3100 with q.indent(2):
3101 q.breakable()
3102 q.text("value = ");
3103 q.text("%#x" % self.value)
3104 q.breakable()
3105 q.text('}')
3106
Rich Lane7dcdf022013-12-11 14:45:27 -08003107oxm.subtypes[2147501060] = mpls_label
3108
3109class mpls_label_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003110 type_len = 2147501320
Rich Lanec2ee4b82013-04-24 17:12:38 -07003111
3112 def __init__(self, value=None, value_mask=None):
3113 if value != None:
3114 self.value = value
3115 else:
3116 self.value = 0
3117 if value_mask != None:
3118 self.value_mask = value_mask
3119 else:
3120 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003121 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003122
3123 def pack(self):
3124 packed = []
3125 packed.append(struct.pack("!L", self.type_len))
3126 packed.append(struct.pack("!L", self.value))
3127 packed.append(struct.pack("!L", self.value_mask))
3128 return ''.join(packed)
3129
3130 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003131 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003132 obj = mpls_label_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003133 _type_len = reader.read("!L")[0]
3134 assert(_type_len == 2147501320)
3135 obj.value = reader.read("!L")[0]
3136 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003137 return obj
3138
3139 def __eq__(self, other):
3140 if type(self) != type(other): return False
3141 if self.value != other.value: return False
3142 if self.value_mask != other.value_mask: return False
3143 return True
3144
Rich Lanec2ee4b82013-04-24 17:12:38 -07003145 def pretty_print(self, q):
3146 q.text("mpls_label_masked {")
3147 with q.group():
3148 with q.indent(2):
3149 q.breakable()
3150 q.text("value = ");
3151 q.text("%#x" % self.value)
3152 q.text(","); q.breakable()
3153 q.text("value_mask = ");
3154 q.text("%#x" % self.value_mask)
3155 q.breakable()
3156 q.text('}')
3157
Rich Lane7dcdf022013-12-11 14:45:27 -08003158oxm.subtypes[2147501320] = mpls_label_masked
3159
3160class mpls_tc(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003161 type_len = 2147501569
Rich Lanec2ee4b82013-04-24 17:12:38 -07003162
3163 def __init__(self, value=None):
3164 if value != None:
3165 self.value = value
3166 else:
3167 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003168 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003169
3170 def pack(self):
3171 packed = []
3172 packed.append(struct.pack("!L", self.type_len))
3173 packed.append(struct.pack("!B", self.value))
3174 return ''.join(packed)
3175
3176 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003177 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003178 obj = mpls_tc()
Dan Talaycof6202252013-07-02 01:00:29 -07003179 _type_len = reader.read("!L")[0]
3180 assert(_type_len == 2147501569)
3181 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003182 return obj
3183
3184 def __eq__(self, other):
3185 if type(self) != type(other): return False
3186 if self.value != other.value: return False
3187 return True
3188
Rich Lanec2ee4b82013-04-24 17:12:38 -07003189 def pretty_print(self, q):
3190 q.text("mpls_tc {")
3191 with q.group():
3192 with q.indent(2):
3193 q.breakable()
3194 q.text("value = ");
3195 q.text("%#x" % self.value)
3196 q.breakable()
3197 q.text('}')
3198
Rich Lane7dcdf022013-12-11 14:45:27 -08003199oxm.subtypes[2147501569] = mpls_tc
3200
3201class mpls_tc_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003202 type_len = 2147501826
Rich Lanec2ee4b82013-04-24 17:12:38 -07003203
3204 def __init__(self, value=None, value_mask=None):
3205 if value != None:
3206 self.value = value
3207 else:
3208 self.value = 0
3209 if value_mask != None:
3210 self.value_mask = value_mask
3211 else:
3212 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003213 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003214
3215 def pack(self):
3216 packed = []
3217 packed.append(struct.pack("!L", self.type_len))
3218 packed.append(struct.pack("!B", self.value))
3219 packed.append(struct.pack("!B", self.value_mask))
3220 return ''.join(packed)
3221
3222 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003223 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003224 obj = mpls_tc_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003225 _type_len = reader.read("!L")[0]
3226 assert(_type_len == 2147501826)
3227 obj.value = reader.read("!B")[0]
3228 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003229 return obj
3230
3231 def __eq__(self, other):
3232 if type(self) != type(other): return False
3233 if self.value != other.value: return False
3234 if self.value_mask != other.value_mask: return False
3235 return True
3236
Rich Lanec2ee4b82013-04-24 17:12:38 -07003237 def pretty_print(self, q):
3238 q.text("mpls_tc_masked {")
3239 with q.group():
3240 with q.indent(2):
3241 q.breakable()
3242 q.text("value = ");
3243 q.text("%#x" % self.value)
3244 q.text(","); q.breakable()
3245 q.text("value_mask = ");
3246 q.text("%#x" % self.value_mask)
3247 q.breakable()
3248 q.text('}')
3249
Rich Lane7dcdf022013-12-11 14:45:27 -08003250oxm.subtypes[2147501826] = mpls_tc_masked
3251
3252class sctp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003253 type_len = 2147492866
Rich Lanec2ee4b82013-04-24 17:12:38 -07003254
3255 def __init__(self, value=None):
3256 if value != None:
3257 self.value = value
3258 else:
3259 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003260 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003261
3262 def pack(self):
3263 packed = []
3264 packed.append(struct.pack("!L", self.type_len))
3265 packed.append(struct.pack("!H", self.value))
3266 return ''.join(packed)
3267
3268 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003269 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003270 obj = sctp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003271 _type_len = reader.read("!L")[0]
3272 assert(_type_len == 2147492866)
3273 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003274 return obj
3275
3276 def __eq__(self, other):
3277 if type(self) != type(other): return False
3278 if self.value != other.value: return False
3279 return True
3280
Rich Lanec2ee4b82013-04-24 17:12:38 -07003281 def pretty_print(self, q):
3282 q.text("sctp_dst {")
3283 with q.group():
3284 with q.indent(2):
3285 q.breakable()
3286 q.text("value = ");
3287 q.text("%#x" % self.value)
3288 q.breakable()
3289 q.text('}')
3290
Rich Lane7dcdf022013-12-11 14:45:27 -08003291oxm.subtypes[2147492866] = sctp_dst
3292
3293class sctp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003294 type_len = 2147493124
Rich Lanec2ee4b82013-04-24 17:12:38 -07003295
3296 def __init__(self, value=None, value_mask=None):
3297 if value != None:
3298 self.value = value
3299 else:
3300 self.value = 0
3301 if value_mask != None:
3302 self.value_mask = value_mask
3303 else:
3304 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003305 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003306
3307 def pack(self):
3308 packed = []
3309 packed.append(struct.pack("!L", self.type_len))
3310 packed.append(struct.pack("!H", self.value))
3311 packed.append(struct.pack("!H", self.value_mask))
3312 return ''.join(packed)
3313
3314 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003315 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003316 obj = sctp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003317 _type_len = reader.read("!L")[0]
3318 assert(_type_len == 2147493124)
3319 obj.value = reader.read("!H")[0]
3320 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003321 return obj
3322
3323 def __eq__(self, other):
3324 if type(self) != type(other): return False
3325 if self.value != other.value: return False
3326 if self.value_mask != other.value_mask: return False
3327 return True
3328
Rich Lanec2ee4b82013-04-24 17:12:38 -07003329 def pretty_print(self, q):
3330 q.text("sctp_dst_masked {")
3331 with q.group():
3332 with q.indent(2):
3333 q.breakable()
3334 q.text("value = ");
3335 q.text("%#x" % self.value)
3336 q.text(","); q.breakable()
3337 q.text("value_mask = ");
3338 q.text("%#x" % self.value_mask)
3339 q.breakable()
3340 q.text('}')
3341
Rich Lane7dcdf022013-12-11 14:45:27 -08003342oxm.subtypes[2147493124] = sctp_dst_masked
3343
3344class sctp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003345 type_len = 2147492354
Rich Lanec2ee4b82013-04-24 17:12:38 -07003346
3347 def __init__(self, value=None):
3348 if value != None:
3349 self.value = value
3350 else:
3351 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003352 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003353
3354 def pack(self):
3355 packed = []
3356 packed.append(struct.pack("!L", self.type_len))
3357 packed.append(struct.pack("!H", self.value))
3358 return ''.join(packed)
3359
3360 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003361 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003362 obj = sctp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07003363 _type_len = reader.read("!L")[0]
3364 assert(_type_len == 2147492354)
3365 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003366 return obj
3367
3368 def __eq__(self, other):
3369 if type(self) != type(other): return False
3370 if self.value != other.value: return False
3371 return True
3372
Rich Lanec2ee4b82013-04-24 17:12:38 -07003373 def pretty_print(self, q):
3374 q.text("sctp_src {")
3375 with q.group():
3376 with q.indent(2):
3377 q.breakable()
3378 q.text("value = ");
3379 q.text("%#x" % self.value)
3380 q.breakable()
3381 q.text('}')
3382
Rich Lane7dcdf022013-12-11 14:45:27 -08003383oxm.subtypes[2147492354] = sctp_src
3384
3385class sctp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003386 type_len = 2147492612
Rich Lanec2ee4b82013-04-24 17:12:38 -07003387
3388 def __init__(self, value=None, value_mask=None):
3389 if value != None:
3390 self.value = value
3391 else:
3392 self.value = 0
3393 if value_mask != None:
3394 self.value_mask = value_mask
3395 else:
3396 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003397 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003398
3399 def pack(self):
3400 packed = []
3401 packed.append(struct.pack("!L", self.type_len))
3402 packed.append(struct.pack("!H", self.value))
3403 packed.append(struct.pack("!H", self.value_mask))
3404 return ''.join(packed)
3405
3406 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003407 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003408 obj = sctp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003409 _type_len = reader.read("!L")[0]
3410 assert(_type_len == 2147492612)
3411 obj.value = reader.read("!H")[0]
3412 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003413 return obj
3414
3415 def __eq__(self, other):
3416 if type(self) != type(other): return False
3417 if self.value != other.value: return False
3418 if self.value_mask != other.value_mask: return False
3419 return True
3420
Rich Lanec2ee4b82013-04-24 17:12:38 -07003421 def pretty_print(self, q):
3422 q.text("sctp_src_masked {")
3423 with q.group():
3424 with q.indent(2):
3425 q.breakable()
3426 q.text("value = ");
3427 q.text("%#x" % self.value)
3428 q.text(","); q.breakable()
3429 q.text("value_mask = ");
3430 q.text("%#x" % self.value_mask)
3431 q.breakable()
3432 q.text('}')
3433
Rich Lane7dcdf022013-12-11 14:45:27 -08003434oxm.subtypes[2147492612] = sctp_src_masked
3435
3436class tcp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003437 type_len = 2147490818
Rich Lanec2ee4b82013-04-24 17:12:38 -07003438
3439 def __init__(self, value=None):
3440 if value != None:
3441 self.value = value
3442 else:
3443 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003444 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003445
3446 def pack(self):
3447 packed = []
3448 packed.append(struct.pack("!L", self.type_len))
3449 packed.append(struct.pack("!H", self.value))
3450 return ''.join(packed)
3451
3452 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003453 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003454 obj = tcp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003455 _type_len = reader.read("!L")[0]
3456 assert(_type_len == 2147490818)
3457 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003458 return obj
3459
3460 def __eq__(self, other):
3461 if type(self) != type(other): return False
3462 if self.value != other.value: return False
3463 return True
3464
Rich Lanec2ee4b82013-04-24 17:12:38 -07003465 def pretty_print(self, q):
3466 q.text("tcp_dst {")
3467 with q.group():
3468 with q.indent(2):
3469 q.breakable()
3470 q.text("value = ");
3471 q.text("%#x" % self.value)
3472 q.breakable()
3473 q.text('}')
3474
Rich Lane7dcdf022013-12-11 14:45:27 -08003475oxm.subtypes[2147490818] = tcp_dst
3476
3477class tcp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003478 type_len = 2147491076
Rich Lanec2ee4b82013-04-24 17:12:38 -07003479
3480 def __init__(self, value=None, value_mask=None):
3481 if value != None:
3482 self.value = value
3483 else:
3484 self.value = 0
3485 if value_mask != None:
3486 self.value_mask = value_mask
3487 else:
3488 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003489 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003490
3491 def pack(self):
3492 packed = []
3493 packed.append(struct.pack("!L", self.type_len))
3494 packed.append(struct.pack("!H", self.value))
3495 packed.append(struct.pack("!H", self.value_mask))
3496 return ''.join(packed)
3497
3498 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003499 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003500 obj = tcp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003501 _type_len = reader.read("!L")[0]
3502 assert(_type_len == 2147491076)
3503 obj.value = reader.read("!H")[0]
3504 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003505 return obj
3506
3507 def __eq__(self, other):
3508 if type(self) != type(other): return False
3509 if self.value != other.value: return False
3510 if self.value_mask != other.value_mask: return False
3511 return True
3512
Rich Lanec2ee4b82013-04-24 17:12:38 -07003513 def pretty_print(self, q):
3514 q.text("tcp_dst_masked {")
3515 with q.group():
3516 with q.indent(2):
3517 q.breakable()
3518 q.text("value = ");
3519 q.text("%#x" % self.value)
3520 q.text(","); q.breakable()
3521 q.text("value_mask = ");
3522 q.text("%#x" % self.value_mask)
3523 q.breakable()
3524 q.text('}')
3525
Rich Lane7dcdf022013-12-11 14:45:27 -08003526oxm.subtypes[2147491076] = tcp_dst_masked
3527
3528class tcp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003529 type_len = 2147490306
Rich Lanec2ee4b82013-04-24 17:12:38 -07003530
3531 def __init__(self, value=None):
3532 if value != None:
3533 self.value = value
3534 else:
3535 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003536 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003537
3538 def pack(self):
3539 packed = []
3540 packed.append(struct.pack("!L", self.type_len))
3541 packed.append(struct.pack("!H", self.value))
3542 return ''.join(packed)
3543
3544 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003545 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003546 obj = tcp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07003547 _type_len = reader.read("!L")[0]
3548 assert(_type_len == 2147490306)
3549 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003550 return obj
3551
3552 def __eq__(self, other):
3553 if type(self) != type(other): return False
3554 if self.value != other.value: return False
3555 return True
3556
Rich Lanec2ee4b82013-04-24 17:12:38 -07003557 def pretty_print(self, q):
3558 q.text("tcp_src {")
3559 with q.group():
3560 with q.indent(2):
3561 q.breakable()
3562 q.text("value = ");
3563 q.text("%#x" % self.value)
3564 q.breakable()
3565 q.text('}')
3566
Rich Lane7dcdf022013-12-11 14:45:27 -08003567oxm.subtypes[2147490306] = tcp_src
3568
3569class tcp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003570 type_len = 2147490564
Rich Lanec2ee4b82013-04-24 17:12:38 -07003571
3572 def __init__(self, value=None, value_mask=None):
3573 if value != None:
3574 self.value = value
3575 else:
3576 self.value = 0
3577 if value_mask != None:
3578 self.value_mask = value_mask
3579 else:
3580 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003581 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003582
3583 def pack(self):
3584 packed = []
3585 packed.append(struct.pack("!L", self.type_len))
3586 packed.append(struct.pack("!H", self.value))
3587 packed.append(struct.pack("!H", self.value_mask))
3588 return ''.join(packed)
3589
3590 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003591 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003592 obj = tcp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003593 _type_len = reader.read("!L")[0]
3594 assert(_type_len == 2147490564)
3595 obj.value = reader.read("!H")[0]
3596 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003597 return obj
3598
3599 def __eq__(self, other):
3600 if type(self) != type(other): return False
3601 if self.value != other.value: return False
3602 if self.value_mask != other.value_mask: return False
3603 return True
3604
Rich Lanec2ee4b82013-04-24 17:12:38 -07003605 def pretty_print(self, q):
3606 q.text("tcp_src_masked {")
3607 with q.group():
3608 with q.indent(2):
3609 q.breakable()
3610 q.text("value = ");
3611 q.text("%#x" % self.value)
3612 q.text(","); q.breakable()
3613 q.text("value_mask = ");
3614 q.text("%#x" % self.value_mask)
3615 q.breakable()
3616 q.text('}')
3617
Rich Lane7dcdf022013-12-11 14:45:27 -08003618oxm.subtypes[2147490564] = tcp_src_masked
3619
3620class udp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003621 type_len = 2147491842
Rich Lanec2ee4b82013-04-24 17:12:38 -07003622
3623 def __init__(self, value=None):
3624 if value != None:
3625 self.value = value
3626 else:
3627 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003628 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003629
3630 def pack(self):
3631 packed = []
3632 packed.append(struct.pack("!L", self.type_len))
3633 packed.append(struct.pack("!H", self.value))
3634 return ''.join(packed)
3635
3636 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003637 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003638 obj = udp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003639 _type_len = reader.read("!L")[0]
3640 assert(_type_len == 2147491842)
3641 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003642 return obj
3643
3644 def __eq__(self, other):
3645 if type(self) != type(other): return False
3646 if self.value != other.value: return False
3647 return True
3648
Rich Lanec2ee4b82013-04-24 17:12:38 -07003649 def pretty_print(self, q):
3650 q.text("udp_dst {")
3651 with q.group():
3652 with q.indent(2):
3653 q.breakable()
3654 q.text("value = ");
3655 q.text("%#x" % self.value)
3656 q.breakable()
3657 q.text('}')
3658
Rich Lane7dcdf022013-12-11 14:45:27 -08003659oxm.subtypes[2147491842] = udp_dst
3660
3661class udp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003662 type_len = 2147492100
Rich Lanec2ee4b82013-04-24 17:12:38 -07003663
3664 def __init__(self, value=None, value_mask=None):
3665 if value != None:
3666 self.value = value
3667 else:
3668 self.value = 0
3669 if value_mask != None:
3670 self.value_mask = value_mask
3671 else:
3672 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003673 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003674
3675 def pack(self):
3676 packed = []
3677 packed.append(struct.pack("!L", self.type_len))
3678 packed.append(struct.pack("!H", self.value))
3679 packed.append(struct.pack("!H", self.value_mask))
3680 return ''.join(packed)
3681
3682 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003683 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003684 obj = udp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003685 _type_len = reader.read("!L")[0]
3686 assert(_type_len == 2147492100)
3687 obj.value = reader.read("!H")[0]
3688 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003689 return obj
3690
3691 def __eq__(self, other):
3692 if type(self) != type(other): return False
3693 if self.value != other.value: return False
3694 if self.value_mask != other.value_mask: return False
3695 return True
3696
Rich Lanec2ee4b82013-04-24 17:12:38 -07003697 def pretty_print(self, q):
3698 q.text("udp_dst_masked {")
3699 with q.group():
3700 with q.indent(2):
3701 q.breakable()
3702 q.text("value = ");
3703 q.text("%#x" % self.value)
3704 q.text(","); q.breakable()
3705 q.text("value_mask = ");
3706 q.text("%#x" % self.value_mask)
3707 q.breakable()
3708 q.text('}')
3709
Rich Lane7dcdf022013-12-11 14:45:27 -08003710oxm.subtypes[2147492100] = udp_dst_masked
3711
3712class udp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003713 type_len = 2147491330
Rich Lanec2ee4b82013-04-24 17:12:38 -07003714
3715 def __init__(self, value=None):
3716 if value != None:
3717 self.value = value
3718 else:
3719 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003720 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003721
3722 def pack(self):
3723 packed = []
3724 packed.append(struct.pack("!L", self.type_len))
3725 packed.append(struct.pack("!H", self.value))
3726 return ''.join(packed)
3727
3728 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003729 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003730 obj = udp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07003731 _type_len = reader.read("!L")[0]
3732 assert(_type_len == 2147491330)
3733 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003734 return obj
3735
3736 def __eq__(self, other):
3737 if type(self) != type(other): return False
3738 if self.value != other.value: return False
3739 return True
3740
Rich Lanec2ee4b82013-04-24 17:12:38 -07003741 def pretty_print(self, q):
3742 q.text("udp_src {")
3743 with q.group():
3744 with q.indent(2):
3745 q.breakable()
3746 q.text("value = ");
3747 q.text("%#x" % self.value)
3748 q.breakable()
3749 q.text('}')
3750
Rich Lane7dcdf022013-12-11 14:45:27 -08003751oxm.subtypes[2147491330] = udp_src
3752
3753class udp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003754 type_len = 2147491588
Rich Lanec2ee4b82013-04-24 17:12:38 -07003755
3756 def __init__(self, value=None, value_mask=None):
3757 if value != None:
3758 self.value = value
3759 else:
3760 self.value = 0
3761 if value_mask != None:
3762 self.value_mask = value_mask
3763 else:
3764 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003765 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003766
3767 def pack(self):
3768 packed = []
3769 packed.append(struct.pack("!L", self.type_len))
3770 packed.append(struct.pack("!H", self.value))
3771 packed.append(struct.pack("!H", self.value_mask))
3772 return ''.join(packed)
3773
3774 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003775 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003776 obj = udp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003777 _type_len = reader.read("!L")[0]
3778 assert(_type_len == 2147491588)
3779 obj.value = reader.read("!H")[0]
3780 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003781 return obj
3782
3783 def __eq__(self, other):
3784 if type(self) != type(other): return False
3785 if self.value != other.value: return False
3786 if self.value_mask != other.value_mask: return False
3787 return True
3788
Rich Lanec2ee4b82013-04-24 17:12:38 -07003789 def pretty_print(self, q):
3790 q.text("udp_src_masked {")
3791 with q.group():
3792 with q.indent(2):
3793 q.breakable()
3794 q.text("value = ");
3795 q.text("%#x" % self.value)
3796 q.text(","); q.breakable()
3797 q.text("value_mask = ");
3798 q.text("%#x" % self.value_mask)
3799 q.breakable()
3800 q.text('}')
3801
Rich Lane7dcdf022013-12-11 14:45:27 -08003802oxm.subtypes[2147491588] = udp_src_masked
3803
3804class vlan_pcp(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003805 type_len = 2147487233
Rich Lanec2ee4b82013-04-24 17:12:38 -07003806
3807 def __init__(self, value=None):
3808 if value != None:
3809 self.value = value
3810 else:
3811 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003812 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003813
3814 def pack(self):
3815 packed = []
3816 packed.append(struct.pack("!L", self.type_len))
3817 packed.append(struct.pack("!B", self.value))
3818 return ''.join(packed)
3819
3820 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003821 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003822 obj = vlan_pcp()
Dan Talaycof6202252013-07-02 01:00:29 -07003823 _type_len = reader.read("!L")[0]
3824 assert(_type_len == 2147487233)
3825 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003826 return obj
3827
3828 def __eq__(self, other):
3829 if type(self) != type(other): return False
3830 if self.value != other.value: return False
3831 return True
3832
Rich Lanec2ee4b82013-04-24 17:12:38 -07003833 def pretty_print(self, q):
3834 q.text("vlan_pcp {")
3835 with q.group():
3836 with q.indent(2):
3837 q.breakable()
3838 q.text("value = ");
3839 q.text("%#x" % self.value)
3840 q.breakable()
3841 q.text('}')
3842
Rich Lane7dcdf022013-12-11 14:45:27 -08003843oxm.subtypes[2147487233] = vlan_pcp
3844
3845class vlan_pcp_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003846 type_len = 2147487490
Rich Lanec2ee4b82013-04-24 17:12:38 -07003847
3848 def __init__(self, value=None, value_mask=None):
3849 if value != None:
3850 self.value = value
3851 else:
3852 self.value = 0
3853 if value_mask != None:
3854 self.value_mask = value_mask
3855 else:
3856 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003857 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003858
3859 def pack(self):
3860 packed = []
3861 packed.append(struct.pack("!L", self.type_len))
3862 packed.append(struct.pack("!B", self.value))
3863 packed.append(struct.pack("!B", self.value_mask))
3864 return ''.join(packed)
3865
3866 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003867 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003868 obj = vlan_pcp_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003869 _type_len = reader.read("!L")[0]
3870 assert(_type_len == 2147487490)
3871 obj.value = reader.read("!B")[0]
3872 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003873 return obj
3874
3875 def __eq__(self, other):
3876 if type(self) != type(other): return False
3877 if self.value != other.value: return False
3878 if self.value_mask != other.value_mask: return False
3879 return True
3880
Rich Lanec2ee4b82013-04-24 17:12:38 -07003881 def pretty_print(self, q):
3882 q.text("vlan_pcp_masked {")
3883 with q.group():
3884 with q.indent(2):
3885 q.breakable()
3886 q.text("value = ");
3887 q.text("%#x" % self.value)
3888 q.text(","); q.breakable()
3889 q.text("value_mask = ");
3890 q.text("%#x" % self.value_mask)
3891 q.breakable()
3892 q.text('}')
3893
Rich Lane7dcdf022013-12-11 14:45:27 -08003894oxm.subtypes[2147487490] = vlan_pcp_masked
3895
3896class vlan_vid(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003897 type_len = 2147486722
Rich Lanec2ee4b82013-04-24 17:12:38 -07003898
3899 def __init__(self, value=None):
3900 if value != None:
3901 self.value = value
3902 else:
3903 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003904 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003905
3906 def pack(self):
3907 packed = []
3908 packed.append(struct.pack("!L", self.type_len))
3909 packed.append(struct.pack("!H", self.value))
3910 return ''.join(packed)
3911
3912 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003913 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003914 obj = vlan_vid()
Dan Talaycof6202252013-07-02 01:00:29 -07003915 _type_len = reader.read("!L")[0]
3916 assert(_type_len == 2147486722)
3917 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003918 return obj
3919
3920 def __eq__(self, other):
3921 if type(self) != type(other): return False
3922 if self.value != other.value: return False
3923 return True
3924
Rich Lanec2ee4b82013-04-24 17:12:38 -07003925 def pretty_print(self, q):
3926 q.text("vlan_vid {")
3927 with q.group():
3928 with q.indent(2):
3929 q.breakable()
3930 q.text("value = ");
3931 q.text("%#x" % self.value)
3932 q.breakable()
3933 q.text('}')
3934
Rich Lane7dcdf022013-12-11 14:45:27 -08003935oxm.subtypes[2147486722] = vlan_vid
3936
3937class vlan_vid_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003938 type_len = 2147486980
Rich Lanec2ee4b82013-04-24 17:12:38 -07003939
3940 def __init__(self, value=None, value_mask=None):
3941 if value != None:
3942 self.value = value
3943 else:
3944 self.value = 0
3945 if value_mask != None:
3946 self.value_mask = value_mask
3947 else:
3948 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003949 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003950
3951 def pack(self):
3952 packed = []
3953 packed.append(struct.pack("!L", self.type_len))
3954 packed.append(struct.pack("!H", self.value))
3955 packed.append(struct.pack("!H", self.value_mask))
3956 return ''.join(packed)
3957
3958 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003959 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003960 obj = vlan_vid_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003961 _type_len = reader.read("!L")[0]
3962 assert(_type_len == 2147486980)
3963 obj.value = reader.read("!H")[0]
3964 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003965 return obj
3966
3967 def __eq__(self, other):
3968 if type(self) != type(other): return False
3969 if self.value != other.value: return False
3970 if self.value_mask != other.value_mask: return False
3971 return True
3972
Rich Lanec2ee4b82013-04-24 17:12:38 -07003973 def pretty_print(self, q):
3974 q.text("vlan_vid_masked {")
3975 with q.group():
3976 with q.indent(2):
3977 q.breakable()
3978 q.text("value = ");
3979 q.text("%#x" % self.value)
3980 q.text(","); q.breakable()
3981 q.text("value_mask = ");
3982 q.text("%#x" % self.value_mask)
3983 q.breakable()
3984 q.text('}')
3985
Rich Lane7dcdf022013-12-11 14:45:27 -08003986oxm.subtypes[2147486980] = vlan_vid_masked
Rich Lanec2ee4b82013-04-24 17:12:38 -07003987
Rich Lane7dcdf022013-12-11 14:45:27 -08003988