blob: a2c0a2364250fcda58cde96157e68f9d2ca72989 [file] [log] [blame]
Matteo Scandoloa229eca2017-08-08 13:05:28 -07001
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16
Rich Lanec2ee4b82013-04-24 17:12:38 -070017# Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
18# Copyright (c) 2011, 2012 Open Networking Foundation
19# Copyright (c) 2012, 2013 Big Switch Networks, Inc.
Dan Talaycof6202252013-07-02 01:00:29 -070020# See the file LICENSE.pyloxi which should have been included in the source distribution
Rich Lanec2ee4b82013-04-24 17:12:38 -070021
Rich Lane7dcdf022013-12-11 14:45:27 -080022# Automatically generated by LOXI from template module.py
Rich Lanec2ee4b82013-04-24 17:12:38 -070023# Do not modify
24
25import struct
Rich Lane7dcdf022013-12-11 14:45:27 -080026import loxi
Rich Lanec2ee4b82013-04-24 17:12:38 -070027import util
28import loxi.generic_util
Rich Lanec2ee4b82013-04-24 17:12:38 -070029
Rich Lanee2567702015-01-26 15:04:35 -080030import sys
31ofp = sys.modules['loxi.of13']
32
Rich Lane7dcdf022013-12-11 14:45:27 -080033class oxm(loxi.OFObject):
34 subtypes = {}
Rich Laned53156a2013-08-05 17:17:33 -070035
Rich Lane95f7fc92014-01-27 17:08:16 -080036
37 def __init__(self, type_len=None):
38 if type_len != None:
39 self.type_len = type_len
40 else:
41 self.type_len = 0
42 return
43
44 def pack(self):
45 packed = []
46 packed.append(struct.pack("!L", self.type_len))
47 return ''.join(packed)
48
Rich Lane7dcdf022013-12-11 14:45:27 -080049 @staticmethod
50 def unpack(reader):
51 subtype, = reader.peek('!L', 0)
Rich Lane95f7fc92014-01-27 17:08:16 -080052 subclass = oxm.subtypes.get(subtype)
53 if subclass:
54 return subclass.unpack(reader)
55
56 obj = oxm()
57 obj.type_len = reader.read("!L")[0]
58 return obj
59
60 def __eq__(self, other):
61 if type(self) != type(other): return False
62 if self.type_len != other.type_len: return False
63 return True
64
65 def pretty_print(self, q):
66 q.text("oxm {")
67 with q.group():
68 with q.indent(2):
69 q.breakable()
70 q.breakable()
71 q.text('}')
Rich Lanec2ee4b82013-04-24 17:12:38 -070072
Rich Lanec2ee4b82013-04-24 17:12:38 -070073
Rich Lane7dcdf022013-12-11 14:45:27 -080074class arp_op(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -070075 type_len = 2147494402
Rich Lanec2ee4b82013-04-24 17:12:38 -070076
77 def __init__(self, value=None):
78 if value != None:
79 self.value = value
80 else:
81 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -080082 return
Rich Lanec2ee4b82013-04-24 17:12:38 -070083
84 def pack(self):
85 packed = []
86 packed.append(struct.pack("!L", self.type_len))
87 packed.append(struct.pack("!H", self.value))
88 return ''.join(packed)
89
90 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -080091 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -070092 obj = arp_op()
Dan Talaycof6202252013-07-02 01:00:29 -070093 _type_len = reader.read("!L")[0]
94 assert(_type_len == 2147494402)
95 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -070096 return obj
97
98 def __eq__(self, other):
99 if type(self) != type(other): return False
100 if self.value != other.value: return False
101 return True
102
Rich Lanec2ee4b82013-04-24 17:12:38 -0700103 def pretty_print(self, q):
104 q.text("arp_op {")
105 with q.group():
106 with q.indent(2):
107 q.breakable()
108 q.text("value = ");
109 q.text("%#x" % self.value)
110 q.breakable()
111 q.text('}')
112
Rich Lane7dcdf022013-12-11 14:45:27 -0800113oxm.subtypes[2147494402] = arp_op
114
115class arp_op_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700116 type_len = 2147494660
Rich Lanec2ee4b82013-04-24 17:12:38 -0700117
118 def __init__(self, value=None, value_mask=None):
119 if value != None:
120 self.value = value
121 else:
122 self.value = 0
123 if value_mask != None:
124 self.value_mask = value_mask
125 else:
126 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800127 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700128
129 def pack(self):
130 packed = []
131 packed.append(struct.pack("!L", self.type_len))
132 packed.append(struct.pack("!H", self.value))
133 packed.append(struct.pack("!H", self.value_mask))
134 return ''.join(packed)
135
136 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800137 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700138 obj = arp_op_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700139 _type_len = reader.read("!L")[0]
140 assert(_type_len == 2147494660)
141 obj.value = reader.read("!H")[0]
142 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700143 return obj
144
145 def __eq__(self, other):
146 if type(self) != type(other): return False
147 if self.value != other.value: return False
148 if self.value_mask != other.value_mask: return False
149 return True
150
Rich Lanec2ee4b82013-04-24 17:12:38 -0700151 def pretty_print(self, q):
152 q.text("arp_op_masked {")
153 with q.group():
154 with q.indent(2):
155 q.breakable()
156 q.text("value = ");
157 q.text("%#x" % self.value)
158 q.text(","); q.breakable()
159 q.text("value_mask = ");
160 q.text("%#x" % self.value_mask)
161 q.breakable()
162 q.text('}')
163
Rich Lane7dcdf022013-12-11 14:45:27 -0800164oxm.subtypes[2147494660] = arp_op_masked
165
166class arp_sha(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700167 type_len = 2147495942
Rich Lanec2ee4b82013-04-24 17:12:38 -0700168
169 def __init__(self, value=None):
170 if value != None:
171 self.value = value
172 else:
173 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800174 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700175
176 def pack(self):
177 packed = []
178 packed.append(struct.pack("!L", self.type_len))
179 packed.append(struct.pack("!6B", *self.value))
180 return ''.join(packed)
181
182 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800183 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700184 obj = arp_sha()
Dan Talaycof6202252013-07-02 01:00:29 -0700185 _type_len = reader.read("!L")[0]
186 assert(_type_len == 2147495942)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700187 obj.value = list(reader.read('!6B'))
188 return obj
189
190 def __eq__(self, other):
191 if type(self) != type(other): return False
192 if self.value != other.value: return False
193 return True
194
Rich Lanec2ee4b82013-04-24 17:12:38 -0700195 def pretty_print(self, q):
196 q.text("arp_sha {")
197 with q.group():
198 with q.indent(2):
199 q.breakable()
200 q.text("value = ");
201 q.text(util.pretty_mac(self.value))
202 q.breakable()
203 q.text('}')
204
Rich Lane7dcdf022013-12-11 14:45:27 -0800205oxm.subtypes[2147495942] = arp_sha
206
207class arp_sha_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700208 type_len = 2147496204
Rich Lanec2ee4b82013-04-24 17:12:38 -0700209
210 def __init__(self, value=None, value_mask=None):
211 if value != None:
212 self.value = value
213 else:
214 self.value = [0,0,0,0,0,0]
215 if value_mask != None:
216 self.value_mask = value_mask
217 else:
218 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800219 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700220
221 def pack(self):
222 packed = []
223 packed.append(struct.pack("!L", self.type_len))
224 packed.append(struct.pack("!6B", *self.value))
225 packed.append(struct.pack("!6B", *self.value_mask))
226 return ''.join(packed)
227
228 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800229 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700230 obj = arp_sha_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700231 _type_len = reader.read("!L")[0]
232 assert(_type_len == 2147496204)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700233 obj.value = list(reader.read('!6B'))
234 obj.value_mask = list(reader.read('!6B'))
235 return obj
236
237 def __eq__(self, other):
238 if type(self) != type(other): return False
239 if self.value != other.value: return False
240 if self.value_mask != other.value_mask: return False
241 return True
242
Rich Lanec2ee4b82013-04-24 17:12:38 -0700243 def pretty_print(self, q):
244 q.text("arp_sha_masked {")
245 with q.group():
246 with q.indent(2):
247 q.breakable()
248 q.text("value = ");
249 q.text(util.pretty_mac(self.value))
250 q.text(","); q.breakable()
251 q.text("value_mask = ");
252 q.text(util.pretty_mac(self.value_mask))
253 q.breakable()
254 q.text('}')
255
Rich Lane7dcdf022013-12-11 14:45:27 -0800256oxm.subtypes[2147496204] = arp_sha_masked
257
258class arp_spa(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700259 type_len = 2147494916
Rich Lanec2ee4b82013-04-24 17:12:38 -0700260
261 def __init__(self, value=None):
262 if value != None:
263 self.value = value
264 else:
265 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800266 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700267
268 def pack(self):
269 packed = []
270 packed.append(struct.pack("!L", self.type_len))
271 packed.append(struct.pack("!L", self.value))
272 return ''.join(packed)
273
274 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800275 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700276 obj = arp_spa()
Dan Talaycof6202252013-07-02 01:00:29 -0700277 _type_len = reader.read("!L")[0]
278 assert(_type_len == 2147494916)
279 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700280 return obj
281
282 def __eq__(self, other):
283 if type(self) != type(other): return False
284 if self.value != other.value: return False
285 return True
286
Rich Lanec2ee4b82013-04-24 17:12:38 -0700287 def pretty_print(self, q):
288 q.text("arp_spa {")
289 with q.group():
290 with q.indent(2):
291 q.breakable()
292 q.text("value = ");
293 q.text("%#x" % self.value)
294 q.breakable()
295 q.text('}')
296
Rich Lane7dcdf022013-12-11 14:45:27 -0800297oxm.subtypes[2147494916] = arp_spa
298
299class arp_spa_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700300 type_len = 2147495176
Rich Lanec2ee4b82013-04-24 17:12:38 -0700301
302 def __init__(self, value=None, value_mask=None):
303 if value != None:
304 self.value = value
305 else:
306 self.value = 0
307 if value_mask != None:
308 self.value_mask = value_mask
309 else:
310 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800311 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700312
313 def pack(self):
314 packed = []
315 packed.append(struct.pack("!L", self.type_len))
316 packed.append(struct.pack("!L", self.value))
317 packed.append(struct.pack("!L", self.value_mask))
318 return ''.join(packed)
319
320 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800321 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700322 obj = arp_spa_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700323 _type_len = reader.read("!L")[0]
324 assert(_type_len == 2147495176)
325 obj.value = reader.read("!L")[0]
326 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700327 return obj
328
329 def __eq__(self, other):
330 if type(self) != type(other): return False
331 if self.value != other.value: return False
332 if self.value_mask != other.value_mask: return False
333 return True
334
Rich Lanec2ee4b82013-04-24 17:12:38 -0700335 def pretty_print(self, q):
336 q.text("arp_spa_masked {")
337 with q.group():
338 with q.indent(2):
339 q.breakable()
340 q.text("value = ");
341 q.text("%#x" % self.value)
342 q.text(","); q.breakable()
343 q.text("value_mask = ");
344 q.text("%#x" % self.value_mask)
345 q.breakable()
346 q.text('}')
347
Rich Lane7dcdf022013-12-11 14:45:27 -0800348oxm.subtypes[2147495176] = arp_spa_masked
349
350class arp_tha(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700351 type_len = 2147496454
Rich Lanec2ee4b82013-04-24 17:12:38 -0700352
353 def __init__(self, value=None):
354 if value != None:
355 self.value = value
356 else:
357 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800358 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700359
360 def pack(self):
361 packed = []
362 packed.append(struct.pack("!L", self.type_len))
363 packed.append(struct.pack("!6B", *self.value))
364 return ''.join(packed)
365
366 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800367 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700368 obj = arp_tha()
Dan Talaycof6202252013-07-02 01:00:29 -0700369 _type_len = reader.read("!L")[0]
370 assert(_type_len == 2147496454)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700371 obj.value = list(reader.read('!6B'))
372 return obj
373
374 def __eq__(self, other):
375 if type(self) != type(other): return False
376 if self.value != other.value: return False
377 return True
378
Rich Lanec2ee4b82013-04-24 17:12:38 -0700379 def pretty_print(self, q):
380 q.text("arp_tha {")
381 with q.group():
382 with q.indent(2):
383 q.breakable()
384 q.text("value = ");
385 q.text(util.pretty_mac(self.value))
386 q.breakable()
387 q.text('}')
388
Rich Lane7dcdf022013-12-11 14:45:27 -0800389oxm.subtypes[2147496454] = arp_tha
390
391class arp_tha_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700392 type_len = 2147496716
Rich Lanec2ee4b82013-04-24 17:12:38 -0700393
394 def __init__(self, value=None, value_mask=None):
395 if value != None:
396 self.value = value
397 else:
398 self.value = [0,0,0,0,0,0]
399 if value_mask != None:
400 self.value_mask = value_mask
401 else:
402 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800403 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700404
405 def pack(self):
406 packed = []
407 packed.append(struct.pack("!L", self.type_len))
408 packed.append(struct.pack("!6B", *self.value))
409 packed.append(struct.pack("!6B", *self.value_mask))
410 return ''.join(packed)
411
412 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800413 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700414 obj = arp_tha_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700415 _type_len = reader.read("!L")[0]
416 assert(_type_len == 2147496716)
Rich Lanec2ee4b82013-04-24 17:12:38 -0700417 obj.value = list(reader.read('!6B'))
418 obj.value_mask = list(reader.read('!6B'))
419 return obj
420
421 def __eq__(self, other):
422 if type(self) != type(other): return False
423 if self.value != other.value: return False
424 if self.value_mask != other.value_mask: return False
425 return True
426
Rich Lanec2ee4b82013-04-24 17:12:38 -0700427 def pretty_print(self, q):
428 q.text("arp_tha_masked {")
429 with q.group():
430 with q.indent(2):
431 q.breakable()
432 q.text("value = ");
433 q.text(util.pretty_mac(self.value))
434 q.text(","); q.breakable()
435 q.text("value_mask = ");
436 q.text(util.pretty_mac(self.value_mask))
437 q.breakable()
438 q.text('}')
439
Rich Lane7dcdf022013-12-11 14:45:27 -0800440oxm.subtypes[2147496716] = arp_tha_masked
441
442class arp_tpa(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700443 type_len = 2147495428
Rich Lanec2ee4b82013-04-24 17:12:38 -0700444
445 def __init__(self, value=None):
446 if value != None:
447 self.value = value
448 else:
449 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800450 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700451
452 def pack(self):
453 packed = []
454 packed.append(struct.pack("!L", self.type_len))
455 packed.append(struct.pack("!L", self.value))
456 return ''.join(packed)
457
458 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800459 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700460 obj = arp_tpa()
Dan Talaycof6202252013-07-02 01:00:29 -0700461 _type_len = reader.read("!L")[0]
462 assert(_type_len == 2147495428)
463 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700464 return obj
465
466 def __eq__(self, other):
467 if type(self) != type(other): return False
468 if self.value != other.value: return False
469 return True
470
Rich Lanec2ee4b82013-04-24 17:12:38 -0700471 def pretty_print(self, q):
472 q.text("arp_tpa {")
473 with q.group():
474 with q.indent(2):
475 q.breakable()
476 q.text("value = ");
477 q.text("%#x" % self.value)
478 q.breakable()
479 q.text('}')
480
Rich Lane7dcdf022013-12-11 14:45:27 -0800481oxm.subtypes[2147495428] = arp_tpa
482
483class arp_tpa_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -0700484 type_len = 2147495688
Rich Lanec2ee4b82013-04-24 17:12:38 -0700485
486 def __init__(self, value=None, value_mask=None):
487 if value != None:
488 self.value = value
489 else:
490 self.value = 0
491 if value_mask != None:
492 self.value_mask = value_mask
493 else:
494 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800495 return
Rich Lanec2ee4b82013-04-24 17:12:38 -0700496
497 def pack(self):
498 packed = []
499 packed.append(struct.pack("!L", self.type_len))
500 packed.append(struct.pack("!L", self.value))
501 packed.append(struct.pack("!L", self.value_mask))
502 return ''.join(packed)
503
504 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800505 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -0700506 obj = arp_tpa_masked()
Dan Talaycof6202252013-07-02 01:00:29 -0700507 _type_len = reader.read("!L")[0]
508 assert(_type_len == 2147495688)
509 obj.value = reader.read("!L")[0]
510 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -0700511 return obj
512
513 def __eq__(self, other):
514 if type(self) != type(other): return False
515 if self.value != other.value: return False
516 if self.value_mask != other.value_mask: return False
517 return True
518
Rich Lanec2ee4b82013-04-24 17:12:38 -0700519 def pretty_print(self, q):
520 q.text("arp_tpa_masked {")
521 with q.group():
522 with q.indent(2):
523 q.breakable()
524 q.text("value = ");
525 q.text("%#x" % self.value)
526 q.text(","); q.breakable()
527 q.text("value_mask = ");
528 q.text("%#x" % self.value_mask)
529 q.breakable()
530 q.text('}')
531
Rich Lane7dcdf022013-12-11 14:45:27 -0800532oxm.subtypes[2147495688] = arp_tpa_masked
533
Rich Lanec0d05d12014-03-11 18:02:24 -0700534class bsn_egr_port_group_id(oxm):
535 type_len = 200196
536
537 def __init__(self, value=None):
538 if value != None:
539 self.value = value
540 else:
541 self.value = 0
542 return
543
544 def pack(self):
545 packed = []
546 packed.append(struct.pack("!L", self.type_len))
547 packed.append(struct.pack("!L", self.value))
548 return ''.join(packed)
549
550 @staticmethod
551 def unpack(reader):
552 obj = bsn_egr_port_group_id()
553 _type_len = reader.read("!L")[0]
554 assert(_type_len == 200196)
555 obj.value = reader.read("!L")[0]
556 return obj
557
558 def __eq__(self, other):
559 if type(self) != type(other): return False
560 if self.value != other.value: return False
561 return True
562
563 def pretty_print(self, q):
564 q.text("bsn_egr_port_group_id {")
565 with q.group():
566 with q.indent(2):
567 q.breakable()
568 q.text("value = ");
569 q.text("%#x" % self.value)
570 q.breakable()
571 q.text('}')
572
573oxm.subtypes[200196] = bsn_egr_port_group_id
574
575class bsn_egr_port_group_id_masked(oxm):
576 type_len = 200456
577
578 def __init__(self, value=None, value_mask=None):
579 if value != None:
580 self.value = value
581 else:
582 self.value = 0
583 if value_mask != None:
584 self.value_mask = value_mask
585 else:
586 self.value_mask = 0
587 return
588
589 def pack(self):
590 packed = []
591 packed.append(struct.pack("!L", self.type_len))
592 packed.append(struct.pack("!L", self.value))
593 packed.append(struct.pack("!L", self.value_mask))
594 return ''.join(packed)
595
596 @staticmethod
597 def unpack(reader):
598 obj = bsn_egr_port_group_id_masked()
599 _type_len = reader.read("!L")[0]
600 assert(_type_len == 200456)
601 obj.value = reader.read("!L")[0]
602 obj.value_mask = reader.read("!L")[0]
603 return obj
604
605 def __eq__(self, other):
606 if type(self) != type(other): return False
607 if self.value != other.value: return False
608 if self.value_mask != other.value_mask: return False
609 return True
610
611 def pretty_print(self, q):
612 q.text("bsn_egr_port_group_id_masked {")
613 with q.group():
614 with q.indent(2):
615 q.breakable()
616 q.text("value = ");
617 q.text("%#x" % self.value)
618 q.text(","); q.breakable()
619 q.text("value_mask = ");
620 q.text("%#x" % self.value_mask)
621 q.breakable()
622 q.text('}')
623
624oxm.subtypes[200456] = bsn_egr_port_group_id_masked
625
Rich Lane7dcdf022013-12-11 14:45:27 -0800626class bsn_global_vrf_allowed(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800627 type_len = 198145
628
629 def __init__(self, value=None):
630 if value != None:
631 self.value = value
632 else:
633 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800634 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800635
636 def pack(self):
637 packed = []
638 packed.append(struct.pack("!L", self.type_len))
639 packed.append(struct.pack("!B", self.value))
640 return ''.join(packed)
641
642 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800643 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800644 obj = bsn_global_vrf_allowed()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800645 _type_len = reader.read("!L")[0]
646 assert(_type_len == 198145)
647 obj.value = reader.read("!B")[0]
648 return obj
649
650 def __eq__(self, other):
651 if type(self) != type(other): return False
652 if self.value != other.value: return False
653 return True
654
Rich Laned9e3f7b2013-11-04 11:40:43 -0800655 def pretty_print(self, q):
656 q.text("bsn_global_vrf_allowed {")
657 with q.group():
658 with q.indent(2):
659 q.breakable()
660 q.text("value = ");
661 q.text("%#x" % self.value)
662 q.breakable()
663 q.text('}')
664
Rich Lane7dcdf022013-12-11 14:45:27 -0800665oxm.subtypes[198145] = bsn_global_vrf_allowed
666
667class bsn_global_vrf_allowed_masked(oxm):
668 type_len = 198402
Rich Laned9e3f7b2013-11-04 11:40:43 -0800669
670 def __init__(self, value=None, value_mask=None):
671 if value != None:
672 self.value = value
673 else:
674 self.value = 0
675 if value_mask != None:
676 self.value_mask = value_mask
677 else:
678 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -0800679 return
Rich Laned9e3f7b2013-11-04 11:40:43 -0800680
681 def pack(self):
682 packed = []
683 packed.append(struct.pack("!L", self.type_len))
684 packed.append(struct.pack("!B", self.value))
685 packed.append(struct.pack("!B", self.value_mask))
686 return ''.join(packed)
687
688 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800689 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -0800690 obj = bsn_global_vrf_allowed_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -0800691 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800692 assert(_type_len == 198402)
Rich Laned9e3f7b2013-11-04 11:40:43 -0800693 obj.value = reader.read("!B")[0]
694 obj.value_mask = reader.read("!B")[0]
695 return obj
696
697 def __eq__(self, other):
698 if type(self) != type(other): return False
699 if self.value != other.value: return False
700 if self.value_mask != other.value_mask: return False
701 return True
702
Rich Laned9e3f7b2013-11-04 11:40:43 -0800703 def pretty_print(self, q):
704 q.text("bsn_global_vrf_allowed_masked {")
705 with q.group():
706 with q.indent(2):
707 q.breakable()
708 q.text("value = ");
709 q.text("%#x" % self.value)
710 q.text(","); q.breakable()
711 q.text("value_mask = ");
712 q.text("%#x" % self.value_mask)
713 q.breakable()
714 q.text('}')
715
Rich Lane7dcdf022013-12-11 14:45:27 -0800716oxm.subtypes[198402] = bsn_global_vrf_allowed_masked
717
718class bsn_in_ports_128(oxm):
719 type_len = 196624
Rich Lane6f4978c2013-10-20 21:33:52 -0700720
721 def __init__(self, value=None):
722 if value != None:
723 self.value = value
724 else:
725 self.value = set()
Rich Lane7dcdf022013-12-11 14:45:27 -0800726 return
Rich Lane6f4978c2013-10-20 21:33:52 -0700727
728 def pack(self):
729 packed = []
730 packed.append(struct.pack("!L", self.type_len))
731 packed.append(util.pack_bitmap_128(self.value))
732 return ''.join(packed)
733
734 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800735 def unpack(reader):
Rich Lane6f4978c2013-10-20 21:33:52 -0700736 obj = bsn_in_ports_128()
Rich Lane6f4978c2013-10-20 21:33:52 -0700737 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -0800738 assert(_type_len == 196624)
Rich Lane6f4978c2013-10-20 21:33:52 -0700739 obj.value = util.unpack_bitmap_128(reader)
740 return obj
741
742 def __eq__(self, other):
743 if type(self) != type(other): return False
744 if self.value != other.value: return False
745 return True
746
Rich Lane6f4978c2013-10-20 21:33:52 -0700747 def pretty_print(self, q):
748 q.text("bsn_in_ports_128 {")
749 with q.group():
750 with q.indent(2):
751 q.breakable()
752 q.text("value = ");
753 q.pp(self.value)
754 q.breakable()
755 q.text('}')
756
Rich Lane7dcdf022013-12-11 14:45:27 -0800757oxm.subtypes[196624] = bsn_in_ports_128
758
759class bsn_in_ports_128_masked(oxm):
Rich Lane6f4978c2013-10-20 21:33:52 -0700760 type_len = 196896
761
762 def __init__(self, value=None, value_mask=None):
763 if value != None:
764 self.value = value
765 else:
766 self.value = set()
767 if value_mask != None:
768 self.value_mask = value_mask
769 else:
770 self.value_mask = set()
Rich Lane7dcdf022013-12-11 14:45:27 -0800771 return
Rich Lane6f4978c2013-10-20 21:33:52 -0700772
773 def pack(self):
774 packed = []
775 packed.append(struct.pack("!L", self.type_len))
776 packed.append(util.pack_bitmap_128(self.value))
777 packed.append(util.pack_bitmap_128(self.value_mask))
778 return ''.join(packed)
779
780 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -0800781 def unpack(reader):
Rich Lane6f4978c2013-10-20 21:33:52 -0700782 obj = bsn_in_ports_128_masked()
Rich Lane6f4978c2013-10-20 21:33:52 -0700783 _type_len = reader.read("!L")[0]
784 assert(_type_len == 196896)
785 obj.value = util.unpack_bitmap_128(reader)
786 obj.value_mask = util.unpack_bitmap_128(reader)
787 return obj
788
789 def __eq__(self, other):
790 if type(self) != type(other): return False
791 if self.value != other.value: return False
792 if self.value_mask != other.value_mask: return False
793 return True
794
Rich Lane6f4978c2013-10-20 21:33:52 -0700795 def pretty_print(self, q):
796 q.text("bsn_in_ports_128_masked {")
797 with q.group():
798 with q.indent(2):
799 q.breakable()
800 q.text("value = ");
801 q.pp(self.value)
802 q.text(","); q.breakable()
803 q.text("value_mask = ");
804 q.pp(self.value_mask)
805 q.breakable()
806 q.text('}')
807
Rich Lane7dcdf022013-12-11 14:45:27 -0800808oxm.subtypes[196896] = bsn_in_ports_128_masked
809
Rich Lane474324f2015-01-14 15:22:56 -0800810class bsn_in_ports_512(oxm):
811 type_len = 206400
812
813 def __init__(self, value=None):
814 if value != None:
815 self.value = value
816 else:
817 self.value = set()
818 return
819
820 def pack(self):
821 packed = []
822 packed.append(struct.pack("!L", self.type_len))
823 packed.append(util.pack_bitmap_512(self.value))
824 return ''.join(packed)
825
826 @staticmethod
827 def unpack(reader):
828 obj = bsn_in_ports_512()
829 _type_len = reader.read("!L")[0]
830 assert(_type_len == 206400)
831 obj.value = util.unpack_bitmap_512(reader)
832 return obj
833
834 def __eq__(self, other):
835 if type(self) != type(other): return False
836 if self.value != other.value: return False
837 return True
838
839 def pretty_print(self, q):
840 q.text("bsn_in_ports_512 {")
841 with q.group():
842 with q.indent(2):
843 q.breakable()
844 q.text("value = ");
845 q.pp(self.value)
846 q.breakable()
847 q.text('}')
848
849oxm.subtypes[206400] = bsn_in_ports_512
850
851class bsn_in_ports_512_masked(oxm):
852 type_len = 206720
853
854 def __init__(self, value=None, value_mask=None):
855 if value != None:
856 self.value = value
857 else:
858 self.value = set()
859 if value_mask != None:
860 self.value_mask = value_mask
861 else:
862 self.value_mask = set()
863 return
864
865 def pack(self):
866 packed = []
867 packed.append(struct.pack("!L", self.type_len))
868 packed.append(util.pack_bitmap_512(self.value))
869 packed.append(util.pack_bitmap_512(self.value_mask))
870 return ''.join(packed)
871
872 @staticmethod
873 def unpack(reader):
874 obj = bsn_in_ports_512_masked()
875 _type_len = reader.read("!L")[0]
876 assert(_type_len == 206720)
877 obj.value = util.unpack_bitmap_512(reader)
878 obj.value_mask = util.unpack_bitmap_512(reader)
879 return obj
880
881 def __eq__(self, other):
882 if type(self) != type(other): return False
883 if self.value != other.value: return False
884 if self.value_mask != other.value_mask: return False
885 return True
886
887 def pretty_print(self, q):
888 q.text("bsn_in_ports_512_masked {")
889 with q.group():
890 with q.indent(2):
891 q.breakable()
892 q.text("value = ");
893 q.pp(self.value)
894 q.text(","); q.breakable()
895 q.text("value_mask = ");
896 q.pp(self.value_mask)
897 q.breakable()
898 q.text('}')
899
900oxm.subtypes[206720] = bsn_in_ports_512_masked
901
Rich Lane2d1b40e2015-02-11 12:45:33 -0800902class bsn_ingress_port_group_id(oxm):
903 type_len = 206852
904
905 def __init__(self, value=None):
906 if value != None:
907 self.value = value
908 else:
909 self.value = 0
910 return
911
912 def pack(self):
913 packed = []
914 packed.append(struct.pack("!L", self.type_len))
915 packed.append(struct.pack("!L", self.value))
916 return ''.join(packed)
917
918 @staticmethod
919 def unpack(reader):
920 obj = bsn_ingress_port_group_id()
921 _type_len = reader.read("!L")[0]
922 assert(_type_len == 206852)
923 obj.value = reader.read("!L")[0]
924 return obj
925
926 def __eq__(self, other):
927 if type(self) != type(other): return False
928 if self.value != other.value: return False
929 return True
930
931 def pretty_print(self, q):
932 q.text("bsn_ingress_port_group_id {")
933 with q.group():
934 with q.indent(2):
935 q.breakable()
936 q.text("value = ");
937 q.text("%#x" % self.value)
938 q.breakable()
939 q.text('}')
940
941oxm.subtypes[206852] = bsn_ingress_port_group_id
942
943class bsn_ingress_port_group_id_masked(oxm):
944 type_len = 207112
945
946 def __init__(self, value=None, value_mask=None):
947 if value != None:
948 self.value = value
949 else:
950 self.value = 0
951 if value_mask != None:
952 self.value_mask = value_mask
953 else:
954 self.value_mask = 0
955 return
956
957 def pack(self):
958 packed = []
959 packed.append(struct.pack("!L", self.type_len))
960 packed.append(struct.pack("!L", self.value))
961 packed.append(struct.pack("!L", self.value_mask))
962 return ''.join(packed)
963
964 @staticmethod
965 def unpack(reader):
966 obj = bsn_ingress_port_group_id_masked()
967 _type_len = reader.read("!L")[0]
968 assert(_type_len == 207112)
969 obj.value = reader.read("!L")[0]
970 obj.value_mask = reader.read("!L")[0]
971 return obj
972
973 def __eq__(self, other):
974 if type(self) != type(other): return False
975 if self.value != other.value: return False
976 if self.value_mask != other.value_mask: return False
977 return True
978
979 def pretty_print(self, q):
980 q.text("bsn_ingress_port_group_id_masked {")
981 with q.group():
982 with q.indent(2):
983 q.breakable()
984 q.text("value = ");
985 q.text("%#x" % self.value)
986 q.text(","); q.breakable()
987 q.text("value_mask = ");
988 q.text("%#x" % self.value_mask)
989 q.breakable()
990 q.text('}')
991
992oxm.subtypes[207112] = bsn_ingress_port_group_id_masked
993
Rich Lane51168312015-06-25 13:13:54 -0700994class bsn_inner_eth_dst(oxm):
995 type_len = 207878
996
997 def __init__(self, value=None):
998 if value != None:
999 self.value = value
1000 else:
1001 self.value = [0,0,0,0,0,0]
1002 return
1003
1004 def pack(self):
1005 packed = []
1006 packed.append(struct.pack("!L", self.type_len))
1007 packed.append(struct.pack("!6B", *self.value))
1008 return ''.join(packed)
1009
1010 @staticmethod
1011 def unpack(reader):
1012 obj = bsn_inner_eth_dst()
1013 _type_len = reader.read("!L")[0]
1014 assert(_type_len == 207878)
1015 obj.value = list(reader.read('!6B'))
1016 return obj
1017
1018 def __eq__(self, other):
1019 if type(self) != type(other): return False
1020 if self.value != other.value: return False
1021 return True
1022
1023 def pretty_print(self, q):
1024 q.text("bsn_inner_eth_dst {")
1025 with q.group():
1026 with q.indent(2):
1027 q.breakable()
1028 q.text("value = ");
1029 q.text(util.pretty_mac(self.value))
1030 q.breakable()
1031 q.text('}')
1032
1033oxm.subtypes[207878] = bsn_inner_eth_dst
1034
1035class bsn_inner_eth_dst_masked(oxm):
1036 type_len = 208140
1037
1038 def __init__(self, value=None, value_mask=None):
1039 if value != None:
1040 self.value = value
1041 else:
1042 self.value = [0,0,0,0,0,0]
1043 if value_mask != None:
1044 self.value_mask = value_mask
1045 else:
1046 self.value_mask = [0,0,0,0,0,0]
1047 return
1048
1049 def pack(self):
1050 packed = []
1051 packed.append(struct.pack("!L", self.type_len))
1052 packed.append(struct.pack("!6B", *self.value))
1053 packed.append(struct.pack("!6B", *self.value_mask))
1054 return ''.join(packed)
1055
1056 @staticmethod
1057 def unpack(reader):
1058 obj = bsn_inner_eth_dst_masked()
1059 _type_len = reader.read("!L")[0]
1060 assert(_type_len == 208140)
1061 obj.value = list(reader.read('!6B'))
1062 obj.value_mask = list(reader.read('!6B'))
1063 return obj
1064
1065 def __eq__(self, other):
1066 if type(self) != type(other): return False
1067 if self.value != other.value: return False
1068 if self.value_mask != other.value_mask: return False
1069 return True
1070
1071 def pretty_print(self, q):
1072 q.text("bsn_inner_eth_dst_masked {")
1073 with q.group():
1074 with q.indent(2):
1075 q.breakable()
1076 q.text("value = ");
1077 q.text(util.pretty_mac(self.value))
1078 q.text(","); q.breakable()
1079 q.text("value_mask = ");
1080 q.text(util.pretty_mac(self.value_mask))
1081 q.breakable()
1082 q.text('}')
1083
1084oxm.subtypes[208140] = bsn_inner_eth_dst_masked
1085
1086class bsn_inner_eth_src(oxm):
1087 type_len = 208390
1088
1089 def __init__(self, value=None):
1090 if value != None:
1091 self.value = value
1092 else:
1093 self.value = [0,0,0,0,0,0]
1094 return
1095
1096 def pack(self):
1097 packed = []
1098 packed.append(struct.pack("!L", self.type_len))
1099 packed.append(struct.pack("!6B", *self.value))
1100 return ''.join(packed)
1101
1102 @staticmethod
1103 def unpack(reader):
1104 obj = bsn_inner_eth_src()
1105 _type_len = reader.read("!L")[0]
1106 assert(_type_len == 208390)
1107 obj.value = list(reader.read('!6B'))
1108 return obj
1109
1110 def __eq__(self, other):
1111 if type(self) != type(other): return False
1112 if self.value != other.value: return False
1113 return True
1114
1115 def pretty_print(self, q):
1116 q.text("bsn_inner_eth_src {")
1117 with q.group():
1118 with q.indent(2):
1119 q.breakable()
1120 q.text("value = ");
1121 q.text(util.pretty_mac(self.value))
1122 q.breakable()
1123 q.text('}')
1124
1125oxm.subtypes[208390] = bsn_inner_eth_src
1126
1127class bsn_inner_eth_src_masked(oxm):
1128 type_len = 208652
1129
1130 def __init__(self, value=None, value_mask=None):
1131 if value != None:
1132 self.value = value
1133 else:
1134 self.value = [0,0,0,0,0,0]
1135 if value_mask != None:
1136 self.value_mask = value_mask
1137 else:
1138 self.value_mask = [0,0,0,0,0,0]
1139 return
1140
1141 def pack(self):
1142 packed = []
1143 packed.append(struct.pack("!L", self.type_len))
1144 packed.append(struct.pack("!6B", *self.value))
1145 packed.append(struct.pack("!6B", *self.value_mask))
1146 return ''.join(packed)
1147
1148 @staticmethod
1149 def unpack(reader):
1150 obj = bsn_inner_eth_src_masked()
1151 _type_len = reader.read("!L")[0]
1152 assert(_type_len == 208652)
1153 obj.value = list(reader.read('!6B'))
1154 obj.value_mask = list(reader.read('!6B'))
1155 return obj
1156
1157 def __eq__(self, other):
1158 if type(self) != type(other): return False
1159 if self.value != other.value: return False
1160 if self.value_mask != other.value_mask: return False
1161 return True
1162
1163 def pretty_print(self, q):
1164 q.text("bsn_inner_eth_src_masked {")
1165 with q.group():
1166 with q.indent(2):
1167 q.breakable()
1168 q.text("value = ");
1169 q.text(util.pretty_mac(self.value))
1170 q.text(","); q.breakable()
1171 q.text("value_mask = ");
1172 q.text(util.pretty_mac(self.value_mask))
1173 q.breakable()
1174 q.text('}')
1175
1176oxm.subtypes[208652] = bsn_inner_eth_src_masked
1177
Rich Lane7cccc0f2015-07-13 17:00:46 -07001178class bsn_inner_vlan_vid(oxm):
1179 type_len = 208898
1180
1181 def __init__(self, value=None):
1182 if value != None:
1183 self.value = value
1184 else:
1185 self.value = 0
1186 return
1187
1188 def pack(self):
1189 packed = []
1190 packed.append(struct.pack("!L", self.type_len))
1191 packed.append(struct.pack("!H", self.value))
1192 return ''.join(packed)
1193
1194 @staticmethod
1195 def unpack(reader):
1196 obj = bsn_inner_vlan_vid()
1197 _type_len = reader.read("!L")[0]
1198 assert(_type_len == 208898)
1199 obj.value = reader.read("!H")[0]
1200 return obj
1201
1202 def __eq__(self, other):
1203 if type(self) != type(other): return False
1204 if self.value != other.value: return False
1205 return True
1206
1207 def pretty_print(self, q):
1208 q.text("bsn_inner_vlan_vid {")
1209 with q.group():
1210 with q.indent(2):
1211 q.breakable()
1212 q.text("value = ");
1213 q.text("%#x" % self.value)
1214 q.breakable()
1215 q.text('}')
1216
1217oxm.subtypes[208898] = bsn_inner_vlan_vid
1218
1219class bsn_inner_vlan_vid_masked(oxm):
1220 type_len = 209156
1221
1222 def __init__(self, value=None, value_mask=None):
1223 if value != None:
1224 self.value = value
1225 else:
1226 self.value = 0
1227 if value_mask != None:
1228 self.value_mask = value_mask
1229 else:
1230 self.value_mask = 0
1231 return
1232
1233 def pack(self):
1234 packed = []
1235 packed.append(struct.pack("!L", self.type_len))
1236 packed.append(struct.pack("!H", self.value))
1237 packed.append(struct.pack("!H", self.value_mask))
1238 return ''.join(packed)
1239
1240 @staticmethod
1241 def unpack(reader):
1242 obj = bsn_inner_vlan_vid_masked()
1243 _type_len = reader.read("!L")[0]
1244 assert(_type_len == 209156)
1245 obj.value = reader.read("!H")[0]
1246 obj.value_mask = reader.read("!H")[0]
1247 return obj
1248
1249 def __eq__(self, other):
1250 if type(self) != type(other): return False
1251 if self.value != other.value: return False
1252 if self.value_mask != other.value_mask: return False
1253 return True
1254
1255 def pretty_print(self, q):
1256 q.text("bsn_inner_vlan_vid_masked {")
1257 with q.group():
1258 with q.indent(2):
1259 q.breakable()
1260 q.text("value = ");
1261 q.text("%#x" % self.value)
1262 q.text(","); q.breakable()
1263 q.text("value_mask = ");
1264 q.text("%#x" % self.value_mask)
1265 q.breakable()
1266 q.text('}')
1267
1268oxm.subtypes[209156] = bsn_inner_vlan_vid_masked
1269
Rich Laneccd32ed2014-11-10 17:48:24 -08001270class bsn_l2_cache_hit(oxm):
1271 type_len = 205825
1272
1273 def __init__(self, value=None):
1274 if value != None:
1275 self.value = value
1276 else:
1277 self.value = 0
1278 return
1279
1280 def pack(self):
1281 packed = []
1282 packed.append(struct.pack("!L", self.type_len))
1283 packed.append(struct.pack("!B", self.value))
1284 return ''.join(packed)
1285
1286 @staticmethod
1287 def unpack(reader):
1288 obj = bsn_l2_cache_hit()
1289 _type_len = reader.read("!L")[0]
1290 assert(_type_len == 205825)
1291 obj.value = reader.read("!B")[0]
1292 return obj
1293
1294 def __eq__(self, other):
1295 if type(self) != type(other): return False
1296 if self.value != other.value: return False
1297 return True
1298
1299 def pretty_print(self, q):
1300 q.text("bsn_l2_cache_hit {")
1301 with q.group():
1302 with q.indent(2):
1303 q.breakable()
1304 q.text("value = ");
1305 q.text("%#x" % self.value)
1306 q.breakable()
1307 q.text('}')
1308
1309oxm.subtypes[205825] = bsn_l2_cache_hit
1310
1311class bsn_l2_cache_hit_masked(oxm):
1312 type_len = 206082
1313
1314 def __init__(self, value=None, value_mask=None):
1315 if value != None:
1316 self.value = value
1317 else:
1318 self.value = 0
1319 if value_mask != None:
1320 self.value_mask = value_mask
1321 else:
1322 self.value_mask = 0
1323 return
1324
1325 def pack(self):
1326 packed = []
1327 packed.append(struct.pack("!L", self.type_len))
1328 packed.append(struct.pack("!B", self.value))
1329 packed.append(struct.pack("!B", self.value_mask))
1330 return ''.join(packed)
1331
1332 @staticmethod
1333 def unpack(reader):
1334 obj = bsn_l2_cache_hit_masked()
1335 _type_len = reader.read("!L")[0]
1336 assert(_type_len == 206082)
1337 obj.value = reader.read("!B")[0]
1338 obj.value_mask = reader.read("!B")[0]
1339 return obj
1340
1341 def __eq__(self, other):
1342 if type(self) != type(other): return False
1343 if self.value != other.value: return False
1344 if self.value_mask != other.value_mask: return False
1345 return True
1346
1347 def pretty_print(self, q):
1348 q.text("bsn_l2_cache_hit_masked {")
1349 with q.group():
1350 with q.indent(2):
1351 q.breakable()
1352 q.text("value = ");
1353 q.text("%#x" % self.value)
1354 q.text(","); q.breakable()
1355 q.text("value_mask = ");
1356 q.text("%#x" % self.value_mask)
1357 q.breakable()
1358 q.text('}')
1359
1360oxm.subtypes[206082] = bsn_l2_cache_hit_masked
1361
Rich Lane7dcdf022013-12-11 14:45:27 -08001362class bsn_l3_dst_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001363 type_len = 199684
1364
1365 def __init__(self, value=None):
1366 if value != None:
1367 self.value = value
1368 else:
1369 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001370 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001371
1372 def pack(self):
1373 packed = []
1374 packed.append(struct.pack("!L", self.type_len))
1375 packed.append(struct.pack("!L", self.value))
1376 return ''.join(packed)
1377
1378 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001379 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001380 obj = bsn_l3_dst_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001381 _type_len = reader.read("!L")[0]
1382 assert(_type_len == 199684)
1383 obj.value = reader.read("!L")[0]
1384 return obj
1385
1386 def __eq__(self, other):
1387 if type(self) != type(other): return False
1388 if self.value != other.value: return False
1389 return True
1390
Rich Laned9e3f7b2013-11-04 11:40:43 -08001391 def pretty_print(self, q):
1392 q.text("bsn_l3_dst_class_id {")
1393 with q.group():
1394 with q.indent(2):
1395 q.breakable()
1396 q.text("value = ");
1397 q.text("%#x" % self.value)
1398 q.breakable()
1399 q.text('}')
1400
Rich Lane7dcdf022013-12-11 14:45:27 -08001401oxm.subtypes[199684] = bsn_l3_dst_class_id
1402
1403class bsn_l3_dst_class_id_masked(oxm):
1404 type_len = 199944
Rich Laned9e3f7b2013-11-04 11:40:43 -08001405
1406 def __init__(self, value=None, value_mask=None):
1407 if value != None:
1408 self.value = value
1409 else:
1410 self.value = 0
1411 if value_mask != None:
1412 self.value_mask = value_mask
1413 else:
1414 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001415 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001416
1417 def pack(self):
1418 packed = []
1419 packed.append(struct.pack("!L", self.type_len))
1420 packed.append(struct.pack("!L", self.value))
1421 packed.append(struct.pack("!L", self.value_mask))
1422 return ''.join(packed)
1423
1424 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001425 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001426 obj = bsn_l3_dst_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001427 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001428 assert(_type_len == 199944)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001429 obj.value = reader.read("!L")[0]
1430 obj.value_mask = reader.read("!L")[0]
1431 return obj
1432
1433 def __eq__(self, other):
1434 if type(self) != type(other): return False
1435 if self.value != other.value: return False
1436 if self.value_mask != other.value_mask: return False
1437 return True
1438
Rich Laned9e3f7b2013-11-04 11:40:43 -08001439 def pretty_print(self, q):
1440 q.text("bsn_l3_dst_class_id_masked {")
1441 with q.group():
1442 with q.indent(2):
1443 q.breakable()
1444 q.text("value = ");
1445 q.text("%#x" % self.value)
1446 q.text(","); q.breakable()
1447 q.text("value_mask = ");
1448 q.text("%#x" % self.value_mask)
1449 q.breakable()
1450 q.text('}')
1451
Rich Lane7dcdf022013-12-11 14:45:27 -08001452oxm.subtypes[199944] = bsn_l3_dst_class_id_masked
1453
1454class bsn_l3_interface_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001455 type_len = 198660
1456
1457 def __init__(self, value=None):
1458 if value != None:
1459 self.value = value
1460 else:
1461 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001462 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001463
1464 def pack(self):
1465 packed = []
1466 packed.append(struct.pack("!L", self.type_len))
1467 packed.append(struct.pack("!L", self.value))
1468 return ''.join(packed)
1469
1470 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001471 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001472 obj = bsn_l3_interface_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001473 _type_len = reader.read("!L")[0]
1474 assert(_type_len == 198660)
1475 obj.value = reader.read("!L")[0]
1476 return obj
1477
1478 def __eq__(self, other):
1479 if type(self) != type(other): return False
1480 if self.value != other.value: return False
1481 return True
1482
Rich Laned9e3f7b2013-11-04 11:40:43 -08001483 def pretty_print(self, q):
1484 q.text("bsn_l3_interface_class_id {")
1485 with q.group():
1486 with q.indent(2):
1487 q.breakable()
1488 q.text("value = ");
1489 q.text("%#x" % self.value)
1490 q.breakable()
1491 q.text('}')
1492
Rich Lane7dcdf022013-12-11 14:45:27 -08001493oxm.subtypes[198660] = bsn_l3_interface_class_id
1494
1495class bsn_l3_interface_class_id_masked(oxm):
1496 type_len = 198920
Rich Laned9e3f7b2013-11-04 11:40:43 -08001497
1498 def __init__(self, value=None, value_mask=None):
1499 if value != None:
1500 self.value = value
1501 else:
1502 self.value = 0
1503 if value_mask != None:
1504 self.value_mask = value_mask
1505 else:
1506 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001507 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001508
1509 def pack(self):
1510 packed = []
1511 packed.append(struct.pack("!L", self.type_len))
1512 packed.append(struct.pack("!L", self.value))
1513 packed.append(struct.pack("!L", self.value_mask))
1514 return ''.join(packed)
1515
1516 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001517 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001518 obj = bsn_l3_interface_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001519 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001520 assert(_type_len == 198920)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001521 obj.value = reader.read("!L")[0]
1522 obj.value_mask = reader.read("!L")[0]
1523 return obj
1524
1525 def __eq__(self, other):
1526 if type(self) != type(other): return False
1527 if self.value != other.value: return False
1528 if self.value_mask != other.value_mask: return False
1529 return True
1530
Rich Laned9e3f7b2013-11-04 11:40:43 -08001531 def pretty_print(self, q):
1532 q.text("bsn_l3_interface_class_id_masked {")
1533 with q.group():
1534 with q.indent(2):
1535 q.breakable()
1536 q.text("value = ");
1537 q.text("%#x" % self.value)
1538 q.text(","); q.breakable()
1539 q.text("value_mask = ");
1540 q.text("%#x" % self.value_mask)
1541 q.breakable()
1542 q.text('}')
1543
Rich Lane7dcdf022013-12-11 14:45:27 -08001544oxm.subtypes[198920] = bsn_l3_interface_class_id_masked
1545
1546class bsn_l3_src_class_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001547 type_len = 199172
1548
1549 def __init__(self, value=None):
1550 if value != None:
1551 self.value = value
1552 else:
1553 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001554 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001555
1556 def pack(self):
1557 packed = []
1558 packed.append(struct.pack("!L", self.type_len))
1559 packed.append(struct.pack("!L", self.value))
1560 return ''.join(packed)
1561
1562 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001563 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001564 obj = bsn_l3_src_class_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001565 _type_len = reader.read("!L")[0]
1566 assert(_type_len == 199172)
1567 obj.value = reader.read("!L")[0]
1568 return obj
1569
1570 def __eq__(self, other):
1571 if type(self) != type(other): return False
1572 if self.value != other.value: return False
1573 return True
1574
Rich Laned9e3f7b2013-11-04 11:40:43 -08001575 def pretty_print(self, q):
1576 q.text("bsn_l3_src_class_id {")
1577 with q.group():
1578 with q.indent(2):
1579 q.breakable()
1580 q.text("value = ");
1581 q.text("%#x" % self.value)
1582 q.breakable()
1583 q.text('}')
1584
Rich Lane7dcdf022013-12-11 14:45:27 -08001585oxm.subtypes[199172] = bsn_l3_src_class_id
1586
1587class bsn_l3_src_class_id_masked(oxm):
1588 type_len = 199432
Rich Laned9e3f7b2013-11-04 11:40:43 -08001589
1590 def __init__(self, value=None, value_mask=None):
1591 if value != None:
1592 self.value = value
1593 else:
1594 self.value = 0
1595 if value_mask != None:
1596 self.value_mask = value_mask
1597 else:
1598 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001599 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001600
1601 def pack(self):
1602 packed = []
1603 packed.append(struct.pack("!L", self.type_len))
1604 packed.append(struct.pack("!L", self.value))
1605 packed.append(struct.pack("!L", self.value_mask))
1606 return ''.join(packed)
1607
1608 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001609 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001610 obj = bsn_l3_src_class_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001611 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001612 assert(_type_len == 199432)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001613 obj.value = reader.read("!L")[0]
1614 obj.value_mask = reader.read("!L")[0]
1615 return obj
1616
1617 def __eq__(self, other):
1618 if type(self) != type(other): return False
1619 if self.value != other.value: return False
1620 if self.value_mask != other.value_mask: return False
1621 return True
1622
Rich Laned9e3f7b2013-11-04 11:40:43 -08001623 def pretty_print(self, q):
1624 q.text("bsn_l3_src_class_id_masked {")
1625 with q.group():
1626 with q.indent(2):
1627 q.breakable()
1628 q.text("value = ");
1629 q.text("%#x" % self.value)
1630 q.text(","); q.breakable()
1631 q.text("value_mask = ");
1632 q.text("%#x" % self.value_mask)
1633 q.breakable()
1634 q.text('}')
1635
Rich Lane7dcdf022013-12-11 14:45:27 -08001636oxm.subtypes[199432] = bsn_l3_src_class_id_masked
1637
1638class bsn_lag_id(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001639 type_len = 197124
1640
1641 def __init__(self, value=None):
1642 if value != None:
1643 self.value = value
1644 else:
1645 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001646 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001647
1648 def pack(self):
1649 packed = []
1650 packed.append(struct.pack("!L", self.type_len))
1651 packed.append(struct.pack("!L", self.value))
1652 return ''.join(packed)
1653
1654 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001655 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001656 obj = bsn_lag_id()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001657 _type_len = reader.read("!L")[0]
1658 assert(_type_len == 197124)
1659 obj.value = reader.read("!L")[0]
1660 return obj
1661
1662 def __eq__(self, other):
1663 if type(self) != type(other): return False
1664 if self.value != other.value: return False
1665 return True
1666
Rich Laned9e3f7b2013-11-04 11:40:43 -08001667 def pretty_print(self, q):
1668 q.text("bsn_lag_id {")
1669 with q.group():
1670 with q.indent(2):
1671 q.breakable()
1672 q.text("value = ");
1673 q.text("%#x" % self.value)
1674 q.breakable()
1675 q.text('}')
1676
Rich Lane7dcdf022013-12-11 14:45:27 -08001677oxm.subtypes[197124] = bsn_lag_id
1678
1679class bsn_lag_id_masked(oxm):
1680 type_len = 197384
Rich Laned9e3f7b2013-11-04 11:40:43 -08001681
1682 def __init__(self, value=None, value_mask=None):
1683 if value != None:
1684 self.value = value
1685 else:
1686 self.value = 0
1687 if value_mask != None:
1688 self.value_mask = value_mask
1689 else:
1690 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08001691 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08001692
1693 def pack(self):
1694 packed = []
1695 packed.append(struct.pack("!L", self.type_len))
1696 packed.append(struct.pack("!L", self.value))
1697 packed.append(struct.pack("!L", self.value_mask))
1698 return ''.join(packed)
1699
1700 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08001701 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08001702 obj = bsn_lag_id_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08001703 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08001704 assert(_type_len == 197384)
Rich Laned9e3f7b2013-11-04 11:40:43 -08001705 obj.value = reader.read("!L")[0]
1706 obj.value_mask = reader.read("!L")[0]
1707 return obj
1708
1709 def __eq__(self, other):
1710 if type(self) != type(other): return False
1711 if self.value != other.value: return False
1712 if self.value_mask != other.value_mask: return False
1713 return True
1714
Rich Laned9e3f7b2013-11-04 11:40:43 -08001715 def pretty_print(self, q):
1716 q.text("bsn_lag_id_masked {")
1717 with q.group():
1718 with q.indent(2):
1719 q.breakable()
1720 q.text("value = ");
1721 q.text("%#x" % self.value)
1722 q.text(","); q.breakable()
1723 q.text("value_mask = ");
1724 q.text("%#x" % self.value_mask)
1725 q.breakable()
1726 q.text('}')
1727
Rich Lane7dcdf022013-12-11 14:45:27 -08001728oxm.subtypes[197384] = bsn_lag_id_masked
1729
Harshmeet Singhc51f4042014-05-21 13:32:52 -07001730class bsn_tcp_flags(oxm):
1731 type_len = 204802
1732
1733 def __init__(self, value=None):
1734 if value != None:
1735 self.value = value
1736 else:
1737 self.value = 0
1738 return
1739
1740 def pack(self):
1741 packed = []
1742 packed.append(struct.pack("!L", self.type_len))
1743 packed.append(struct.pack("!H", self.value))
1744 return ''.join(packed)
1745
1746 @staticmethod
1747 def unpack(reader):
1748 obj = bsn_tcp_flags()
1749 _type_len = reader.read("!L")[0]
1750 assert(_type_len == 204802)
1751 obj.value = reader.read("!H")[0]
1752 return obj
1753
1754 def __eq__(self, other):
1755 if type(self) != type(other): return False
1756 if self.value != other.value: return False
1757 return True
1758
1759 def pretty_print(self, q):
1760 q.text("bsn_tcp_flags {")
1761 with q.group():
1762 with q.indent(2):
1763 q.breakable()
1764 q.text("value = ");
1765 q.text("%#x" % self.value)
1766 q.breakable()
1767 q.text('}')
1768
1769oxm.subtypes[204802] = bsn_tcp_flags
1770
1771class bsn_tcp_flags_masked(oxm):
1772 type_len = 205060
1773
1774 def __init__(self, value=None, value_mask=None):
1775 if value != None:
1776 self.value = value
1777 else:
1778 self.value = 0
1779 if value_mask != None:
1780 self.value_mask = value_mask
1781 else:
1782 self.value_mask = 0
1783 return
1784
1785 def pack(self):
1786 packed = []
1787 packed.append(struct.pack("!L", self.type_len))
1788 packed.append(struct.pack("!H", self.value))
1789 packed.append(struct.pack("!H", self.value_mask))
1790 return ''.join(packed)
1791
1792 @staticmethod
1793 def unpack(reader):
1794 obj = bsn_tcp_flags_masked()
1795 _type_len = reader.read("!L")[0]
1796 assert(_type_len == 205060)
1797 obj.value = reader.read("!H")[0]
1798 obj.value_mask = reader.read("!H")[0]
1799 return obj
1800
1801 def __eq__(self, other):
1802 if type(self) != type(other): return False
1803 if self.value != other.value: return False
1804 if self.value_mask != other.value_mask: return False
1805 return True
1806
1807 def pretty_print(self, q):
1808 q.text("bsn_tcp_flags_masked {")
1809 with q.group():
1810 with q.indent(2):
1811 q.breakable()
1812 q.text("value = ");
1813 q.text("%#x" % self.value)
1814 q.text(","); q.breakable()
1815 q.text("value_mask = ");
1816 q.text("%#x" % self.value_mask)
1817 q.breakable()
1818 q.text('}')
1819
1820oxm.subtypes[205060] = bsn_tcp_flags_masked
1821
Rich Lane93b33132014-04-21 12:20:58 -07001822class bsn_udf0(oxm):
1823 type_len = 200708
1824
1825 def __init__(self, value=None):
1826 if value != None:
1827 self.value = value
1828 else:
1829 self.value = 0
1830 return
1831
1832 def pack(self):
1833 packed = []
1834 packed.append(struct.pack("!L", self.type_len))
1835 packed.append(struct.pack("!L", self.value))
1836 return ''.join(packed)
1837
1838 @staticmethod
1839 def unpack(reader):
1840 obj = bsn_udf0()
1841 _type_len = reader.read("!L")[0]
1842 assert(_type_len == 200708)
1843 obj.value = reader.read("!L")[0]
1844 return obj
1845
1846 def __eq__(self, other):
1847 if type(self) != type(other): return False
1848 if self.value != other.value: return False
1849 return True
1850
1851 def pretty_print(self, q):
1852 q.text("bsn_udf0 {")
1853 with q.group():
1854 with q.indent(2):
1855 q.breakable()
1856 q.text("value = ");
1857 q.text("%#x" % self.value)
1858 q.breakable()
1859 q.text('}')
1860
1861oxm.subtypes[200708] = bsn_udf0
1862
1863class bsn_udf0_masked(oxm):
1864 type_len = 200968
1865
1866 def __init__(self, value=None, value_mask=None):
1867 if value != None:
1868 self.value = value
1869 else:
1870 self.value = 0
1871 if value_mask != None:
1872 self.value_mask = value_mask
1873 else:
1874 self.value_mask = 0
1875 return
1876
1877 def pack(self):
1878 packed = []
1879 packed.append(struct.pack("!L", self.type_len))
1880 packed.append(struct.pack("!L", self.value))
1881 packed.append(struct.pack("!L", self.value_mask))
1882 return ''.join(packed)
1883
1884 @staticmethod
1885 def unpack(reader):
1886 obj = bsn_udf0_masked()
1887 _type_len = reader.read("!L")[0]
1888 assert(_type_len == 200968)
1889 obj.value = reader.read("!L")[0]
1890 obj.value_mask = reader.read("!L")[0]
1891 return obj
1892
1893 def __eq__(self, other):
1894 if type(self) != type(other): return False
1895 if self.value != other.value: return False
1896 if self.value_mask != other.value_mask: return False
1897 return True
1898
1899 def pretty_print(self, q):
1900 q.text("bsn_udf0_masked {")
1901 with q.group():
1902 with q.indent(2):
1903 q.breakable()
1904 q.text("value = ");
1905 q.text("%#x" % self.value)
1906 q.text(","); q.breakable()
1907 q.text("value_mask = ");
1908 q.text("%#x" % self.value_mask)
1909 q.breakable()
1910 q.text('}')
1911
1912oxm.subtypes[200968] = bsn_udf0_masked
1913
1914class bsn_udf1(oxm):
1915 type_len = 201220
1916
1917 def __init__(self, value=None):
1918 if value != None:
1919 self.value = value
1920 else:
1921 self.value = 0
1922 return
1923
1924 def pack(self):
1925 packed = []
1926 packed.append(struct.pack("!L", self.type_len))
1927 packed.append(struct.pack("!L", self.value))
1928 return ''.join(packed)
1929
1930 @staticmethod
1931 def unpack(reader):
1932 obj = bsn_udf1()
1933 _type_len = reader.read("!L")[0]
1934 assert(_type_len == 201220)
1935 obj.value = reader.read("!L")[0]
1936 return obj
1937
1938 def __eq__(self, other):
1939 if type(self) != type(other): return False
1940 if self.value != other.value: return False
1941 return True
1942
1943 def pretty_print(self, q):
1944 q.text("bsn_udf1 {")
1945 with q.group():
1946 with q.indent(2):
1947 q.breakable()
1948 q.text("value = ");
1949 q.text("%#x" % self.value)
1950 q.breakable()
1951 q.text('}')
1952
1953oxm.subtypes[201220] = bsn_udf1
1954
1955class bsn_udf1_masked(oxm):
1956 type_len = 201480
1957
1958 def __init__(self, value=None, value_mask=None):
1959 if value != None:
1960 self.value = value
1961 else:
1962 self.value = 0
1963 if value_mask != None:
1964 self.value_mask = value_mask
1965 else:
1966 self.value_mask = 0
1967 return
1968
1969 def pack(self):
1970 packed = []
1971 packed.append(struct.pack("!L", self.type_len))
1972 packed.append(struct.pack("!L", self.value))
1973 packed.append(struct.pack("!L", self.value_mask))
1974 return ''.join(packed)
1975
1976 @staticmethod
1977 def unpack(reader):
1978 obj = bsn_udf1_masked()
1979 _type_len = reader.read("!L")[0]
1980 assert(_type_len == 201480)
1981 obj.value = reader.read("!L")[0]
1982 obj.value_mask = reader.read("!L")[0]
1983 return obj
1984
1985 def __eq__(self, other):
1986 if type(self) != type(other): return False
1987 if self.value != other.value: return False
1988 if self.value_mask != other.value_mask: return False
1989 return True
1990
1991 def pretty_print(self, q):
1992 q.text("bsn_udf1_masked {")
1993 with q.group():
1994 with q.indent(2):
1995 q.breakable()
1996 q.text("value = ");
1997 q.text("%#x" % self.value)
1998 q.text(","); q.breakable()
1999 q.text("value_mask = ");
2000 q.text("%#x" % self.value_mask)
2001 q.breakable()
2002 q.text('}')
2003
2004oxm.subtypes[201480] = bsn_udf1_masked
2005
2006class bsn_udf2(oxm):
2007 type_len = 201732
2008
2009 def __init__(self, value=None):
2010 if value != None:
2011 self.value = value
2012 else:
2013 self.value = 0
2014 return
2015
2016 def pack(self):
2017 packed = []
2018 packed.append(struct.pack("!L", self.type_len))
2019 packed.append(struct.pack("!L", self.value))
2020 return ''.join(packed)
2021
2022 @staticmethod
2023 def unpack(reader):
2024 obj = bsn_udf2()
2025 _type_len = reader.read("!L")[0]
2026 assert(_type_len == 201732)
2027 obj.value = reader.read("!L")[0]
2028 return obj
2029
2030 def __eq__(self, other):
2031 if type(self) != type(other): return False
2032 if self.value != other.value: return False
2033 return True
2034
2035 def pretty_print(self, q):
2036 q.text("bsn_udf2 {")
2037 with q.group():
2038 with q.indent(2):
2039 q.breakable()
2040 q.text("value = ");
2041 q.text("%#x" % self.value)
2042 q.breakable()
2043 q.text('}')
2044
2045oxm.subtypes[201732] = bsn_udf2
2046
2047class bsn_udf2_masked(oxm):
2048 type_len = 201992
2049
2050 def __init__(self, value=None, value_mask=None):
2051 if value != None:
2052 self.value = value
2053 else:
2054 self.value = 0
2055 if value_mask != None:
2056 self.value_mask = value_mask
2057 else:
2058 self.value_mask = 0
2059 return
2060
2061 def pack(self):
2062 packed = []
2063 packed.append(struct.pack("!L", self.type_len))
2064 packed.append(struct.pack("!L", self.value))
2065 packed.append(struct.pack("!L", self.value_mask))
2066 return ''.join(packed)
2067
2068 @staticmethod
2069 def unpack(reader):
2070 obj = bsn_udf2_masked()
2071 _type_len = reader.read("!L")[0]
2072 assert(_type_len == 201992)
2073 obj.value = reader.read("!L")[0]
2074 obj.value_mask = reader.read("!L")[0]
2075 return obj
2076
2077 def __eq__(self, other):
2078 if type(self) != type(other): return False
2079 if self.value != other.value: return False
2080 if self.value_mask != other.value_mask: return False
2081 return True
2082
2083 def pretty_print(self, q):
2084 q.text("bsn_udf2_masked {")
2085 with q.group():
2086 with q.indent(2):
2087 q.breakable()
2088 q.text("value = ");
2089 q.text("%#x" % self.value)
2090 q.text(","); q.breakable()
2091 q.text("value_mask = ");
2092 q.text("%#x" % self.value_mask)
2093 q.breakable()
2094 q.text('}')
2095
2096oxm.subtypes[201992] = bsn_udf2_masked
2097
2098class bsn_udf3(oxm):
2099 type_len = 202244
2100
2101 def __init__(self, value=None):
2102 if value != None:
2103 self.value = value
2104 else:
2105 self.value = 0
2106 return
2107
2108 def pack(self):
2109 packed = []
2110 packed.append(struct.pack("!L", self.type_len))
2111 packed.append(struct.pack("!L", self.value))
2112 return ''.join(packed)
2113
2114 @staticmethod
2115 def unpack(reader):
2116 obj = bsn_udf3()
2117 _type_len = reader.read("!L")[0]
2118 assert(_type_len == 202244)
2119 obj.value = reader.read("!L")[0]
2120 return obj
2121
2122 def __eq__(self, other):
2123 if type(self) != type(other): return False
2124 if self.value != other.value: return False
2125 return True
2126
2127 def pretty_print(self, q):
2128 q.text("bsn_udf3 {")
2129 with q.group():
2130 with q.indent(2):
2131 q.breakable()
2132 q.text("value = ");
2133 q.text("%#x" % self.value)
2134 q.breakable()
2135 q.text('}')
2136
2137oxm.subtypes[202244] = bsn_udf3
2138
2139class bsn_udf3_masked(oxm):
2140 type_len = 202504
2141
2142 def __init__(self, value=None, value_mask=None):
2143 if value != None:
2144 self.value = value
2145 else:
2146 self.value = 0
2147 if value_mask != None:
2148 self.value_mask = value_mask
2149 else:
2150 self.value_mask = 0
2151 return
2152
2153 def pack(self):
2154 packed = []
2155 packed.append(struct.pack("!L", self.type_len))
2156 packed.append(struct.pack("!L", self.value))
2157 packed.append(struct.pack("!L", self.value_mask))
2158 return ''.join(packed)
2159
2160 @staticmethod
2161 def unpack(reader):
2162 obj = bsn_udf3_masked()
2163 _type_len = reader.read("!L")[0]
2164 assert(_type_len == 202504)
2165 obj.value = reader.read("!L")[0]
2166 obj.value_mask = reader.read("!L")[0]
2167 return obj
2168
2169 def __eq__(self, other):
2170 if type(self) != type(other): return False
2171 if self.value != other.value: return False
2172 if self.value_mask != other.value_mask: return False
2173 return True
2174
2175 def pretty_print(self, q):
2176 q.text("bsn_udf3_masked {")
2177 with q.group():
2178 with q.indent(2):
2179 q.breakable()
2180 q.text("value = ");
2181 q.text("%#x" % self.value)
2182 q.text(","); q.breakable()
2183 q.text("value_mask = ");
2184 q.text("%#x" % self.value_mask)
2185 q.breakable()
2186 q.text('}')
2187
2188oxm.subtypes[202504] = bsn_udf3_masked
2189
2190class bsn_udf4(oxm):
2191 type_len = 202756
2192
2193 def __init__(self, value=None):
2194 if value != None:
2195 self.value = value
2196 else:
2197 self.value = 0
2198 return
2199
2200 def pack(self):
2201 packed = []
2202 packed.append(struct.pack("!L", self.type_len))
2203 packed.append(struct.pack("!L", self.value))
2204 return ''.join(packed)
2205
2206 @staticmethod
2207 def unpack(reader):
2208 obj = bsn_udf4()
2209 _type_len = reader.read("!L")[0]
2210 assert(_type_len == 202756)
2211 obj.value = reader.read("!L")[0]
2212 return obj
2213
2214 def __eq__(self, other):
2215 if type(self) != type(other): return False
2216 if self.value != other.value: return False
2217 return True
2218
2219 def pretty_print(self, q):
2220 q.text("bsn_udf4 {")
2221 with q.group():
2222 with q.indent(2):
2223 q.breakable()
2224 q.text("value = ");
2225 q.text("%#x" % self.value)
2226 q.breakable()
2227 q.text('}')
2228
2229oxm.subtypes[202756] = bsn_udf4
2230
2231class bsn_udf4_masked(oxm):
2232 type_len = 203016
2233
2234 def __init__(self, value=None, value_mask=None):
2235 if value != None:
2236 self.value = value
2237 else:
2238 self.value = 0
2239 if value_mask != None:
2240 self.value_mask = value_mask
2241 else:
2242 self.value_mask = 0
2243 return
2244
2245 def pack(self):
2246 packed = []
2247 packed.append(struct.pack("!L", self.type_len))
2248 packed.append(struct.pack("!L", self.value))
2249 packed.append(struct.pack("!L", self.value_mask))
2250 return ''.join(packed)
2251
2252 @staticmethod
2253 def unpack(reader):
2254 obj = bsn_udf4_masked()
2255 _type_len = reader.read("!L")[0]
2256 assert(_type_len == 203016)
2257 obj.value = reader.read("!L")[0]
2258 obj.value_mask = reader.read("!L")[0]
2259 return obj
2260
2261 def __eq__(self, other):
2262 if type(self) != type(other): return False
2263 if self.value != other.value: return False
2264 if self.value_mask != other.value_mask: return False
2265 return True
2266
2267 def pretty_print(self, q):
2268 q.text("bsn_udf4_masked {")
2269 with q.group():
2270 with q.indent(2):
2271 q.breakable()
2272 q.text("value = ");
2273 q.text("%#x" % self.value)
2274 q.text(","); q.breakable()
2275 q.text("value_mask = ");
2276 q.text("%#x" % self.value_mask)
2277 q.breakable()
2278 q.text('}')
2279
2280oxm.subtypes[203016] = bsn_udf4_masked
2281
2282class bsn_udf5(oxm):
2283 type_len = 203268
2284
2285 def __init__(self, value=None):
2286 if value != None:
2287 self.value = value
2288 else:
2289 self.value = 0
2290 return
2291
2292 def pack(self):
2293 packed = []
2294 packed.append(struct.pack("!L", self.type_len))
2295 packed.append(struct.pack("!L", self.value))
2296 return ''.join(packed)
2297
2298 @staticmethod
2299 def unpack(reader):
2300 obj = bsn_udf5()
2301 _type_len = reader.read("!L")[0]
2302 assert(_type_len == 203268)
2303 obj.value = reader.read("!L")[0]
2304 return obj
2305
2306 def __eq__(self, other):
2307 if type(self) != type(other): return False
2308 if self.value != other.value: return False
2309 return True
2310
2311 def pretty_print(self, q):
2312 q.text("bsn_udf5 {")
2313 with q.group():
2314 with q.indent(2):
2315 q.breakable()
2316 q.text("value = ");
2317 q.text("%#x" % self.value)
2318 q.breakable()
2319 q.text('}')
2320
2321oxm.subtypes[203268] = bsn_udf5
2322
2323class bsn_udf5_masked(oxm):
2324 type_len = 203528
2325
2326 def __init__(self, value=None, value_mask=None):
2327 if value != None:
2328 self.value = value
2329 else:
2330 self.value = 0
2331 if value_mask != None:
2332 self.value_mask = value_mask
2333 else:
2334 self.value_mask = 0
2335 return
2336
2337 def pack(self):
2338 packed = []
2339 packed.append(struct.pack("!L", self.type_len))
2340 packed.append(struct.pack("!L", self.value))
2341 packed.append(struct.pack("!L", self.value_mask))
2342 return ''.join(packed)
2343
2344 @staticmethod
2345 def unpack(reader):
2346 obj = bsn_udf5_masked()
2347 _type_len = reader.read("!L")[0]
2348 assert(_type_len == 203528)
2349 obj.value = reader.read("!L")[0]
2350 obj.value_mask = reader.read("!L")[0]
2351 return obj
2352
2353 def __eq__(self, other):
2354 if type(self) != type(other): return False
2355 if self.value != other.value: return False
2356 if self.value_mask != other.value_mask: return False
2357 return True
2358
2359 def pretty_print(self, q):
2360 q.text("bsn_udf5_masked {")
2361 with q.group():
2362 with q.indent(2):
2363 q.breakable()
2364 q.text("value = ");
2365 q.text("%#x" % self.value)
2366 q.text(","); q.breakable()
2367 q.text("value_mask = ");
2368 q.text("%#x" % self.value_mask)
2369 q.breakable()
2370 q.text('}')
2371
2372oxm.subtypes[203528] = bsn_udf5_masked
2373
2374class bsn_udf6(oxm):
2375 type_len = 203780
2376
2377 def __init__(self, value=None):
2378 if value != None:
2379 self.value = value
2380 else:
2381 self.value = 0
2382 return
2383
2384 def pack(self):
2385 packed = []
2386 packed.append(struct.pack("!L", self.type_len))
2387 packed.append(struct.pack("!L", self.value))
2388 return ''.join(packed)
2389
2390 @staticmethod
2391 def unpack(reader):
2392 obj = bsn_udf6()
2393 _type_len = reader.read("!L")[0]
2394 assert(_type_len == 203780)
2395 obj.value = reader.read("!L")[0]
2396 return obj
2397
2398 def __eq__(self, other):
2399 if type(self) != type(other): return False
2400 if self.value != other.value: return False
2401 return True
2402
2403 def pretty_print(self, q):
2404 q.text("bsn_udf6 {")
2405 with q.group():
2406 with q.indent(2):
2407 q.breakable()
2408 q.text("value = ");
2409 q.text("%#x" % self.value)
2410 q.breakable()
2411 q.text('}')
2412
2413oxm.subtypes[203780] = bsn_udf6
2414
2415class bsn_udf6_masked(oxm):
2416 type_len = 204040
2417
2418 def __init__(self, value=None, value_mask=None):
2419 if value != None:
2420 self.value = value
2421 else:
2422 self.value = 0
2423 if value_mask != None:
2424 self.value_mask = value_mask
2425 else:
2426 self.value_mask = 0
2427 return
2428
2429 def pack(self):
2430 packed = []
2431 packed.append(struct.pack("!L", self.type_len))
2432 packed.append(struct.pack("!L", self.value))
2433 packed.append(struct.pack("!L", self.value_mask))
2434 return ''.join(packed)
2435
2436 @staticmethod
2437 def unpack(reader):
2438 obj = bsn_udf6_masked()
2439 _type_len = reader.read("!L")[0]
2440 assert(_type_len == 204040)
2441 obj.value = reader.read("!L")[0]
2442 obj.value_mask = reader.read("!L")[0]
2443 return obj
2444
2445 def __eq__(self, other):
2446 if type(self) != type(other): return False
2447 if self.value != other.value: return False
2448 if self.value_mask != other.value_mask: return False
2449 return True
2450
2451 def pretty_print(self, q):
2452 q.text("bsn_udf6_masked {")
2453 with q.group():
2454 with q.indent(2):
2455 q.breakable()
2456 q.text("value = ");
2457 q.text("%#x" % self.value)
2458 q.text(","); q.breakable()
2459 q.text("value_mask = ");
2460 q.text("%#x" % self.value_mask)
2461 q.breakable()
2462 q.text('}')
2463
2464oxm.subtypes[204040] = bsn_udf6_masked
2465
2466class bsn_udf7(oxm):
2467 type_len = 204292
2468
2469 def __init__(self, value=None):
2470 if value != None:
2471 self.value = value
2472 else:
2473 self.value = 0
2474 return
2475
2476 def pack(self):
2477 packed = []
2478 packed.append(struct.pack("!L", self.type_len))
2479 packed.append(struct.pack("!L", self.value))
2480 return ''.join(packed)
2481
2482 @staticmethod
2483 def unpack(reader):
2484 obj = bsn_udf7()
2485 _type_len = reader.read("!L")[0]
2486 assert(_type_len == 204292)
2487 obj.value = reader.read("!L")[0]
2488 return obj
2489
2490 def __eq__(self, other):
2491 if type(self) != type(other): return False
2492 if self.value != other.value: return False
2493 return True
2494
2495 def pretty_print(self, q):
2496 q.text("bsn_udf7 {")
2497 with q.group():
2498 with q.indent(2):
2499 q.breakable()
2500 q.text("value = ");
2501 q.text("%#x" % self.value)
2502 q.breakable()
2503 q.text('}')
2504
2505oxm.subtypes[204292] = bsn_udf7
2506
2507class bsn_udf7_masked(oxm):
2508 type_len = 204552
2509
2510 def __init__(self, value=None, value_mask=None):
2511 if value != None:
2512 self.value = value
2513 else:
2514 self.value = 0
2515 if value_mask != None:
2516 self.value_mask = value_mask
2517 else:
2518 self.value_mask = 0
2519 return
2520
2521 def pack(self):
2522 packed = []
2523 packed.append(struct.pack("!L", self.type_len))
2524 packed.append(struct.pack("!L", self.value))
2525 packed.append(struct.pack("!L", self.value_mask))
2526 return ''.join(packed)
2527
2528 @staticmethod
2529 def unpack(reader):
2530 obj = bsn_udf7_masked()
2531 _type_len = reader.read("!L")[0]
2532 assert(_type_len == 204552)
2533 obj.value = reader.read("!L")[0]
2534 obj.value_mask = reader.read("!L")[0]
2535 return obj
2536
2537 def __eq__(self, other):
2538 if type(self) != type(other): return False
2539 if self.value != other.value: return False
2540 if self.value_mask != other.value_mask: return False
2541 return True
2542
2543 def pretty_print(self, q):
2544 q.text("bsn_udf7_masked {")
2545 with q.group():
2546 with q.indent(2):
2547 q.breakable()
2548 q.text("value = ");
2549 q.text("%#x" % self.value)
2550 q.text(","); q.breakable()
2551 q.text("value_mask = ");
2552 q.text("%#x" % self.value_mask)
2553 q.breakable()
2554 q.text('}')
2555
2556oxm.subtypes[204552] = bsn_udf7_masked
2557
Rich Lane5587ab12014-06-30 11:19:09 -07002558class bsn_vlan_xlate_port_group_id(oxm):
2559 type_len = 205316
2560
2561 def __init__(self, value=None):
2562 if value != None:
2563 self.value = value
2564 else:
2565 self.value = 0
2566 return
2567
2568 def pack(self):
2569 packed = []
2570 packed.append(struct.pack("!L", self.type_len))
2571 packed.append(struct.pack("!L", self.value))
2572 return ''.join(packed)
2573
2574 @staticmethod
2575 def unpack(reader):
2576 obj = bsn_vlan_xlate_port_group_id()
2577 _type_len = reader.read("!L")[0]
2578 assert(_type_len == 205316)
2579 obj.value = reader.read("!L")[0]
2580 return obj
2581
2582 def __eq__(self, other):
2583 if type(self) != type(other): return False
2584 if self.value != other.value: return False
2585 return True
2586
2587 def pretty_print(self, q):
2588 q.text("bsn_vlan_xlate_port_group_id {")
2589 with q.group():
2590 with q.indent(2):
2591 q.breakable()
2592 q.text("value = ");
2593 q.text("%#x" % self.value)
2594 q.breakable()
2595 q.text('}')
2596
2597oxm.subtypes[205316] = bsn_vlan_xlate_port_group_id
2598
2599class bsn_vlan_xlate_port_group_id_masked(oxm):
2600 type_len = 205576
2601
2602 def __init__(self, value=None, value_mask=None):
2603 if value != None:
2604 self.value = value
2605 else:
2606 self.value = 0
2607 if value_mask != None:
2608 self.value_mask = value_mask
2609 else:
2610 self.value_mask = 0
2611 return
2612
2613 def pack(self):
2614 packed = []
2615 packed.append(struct.pack("!L", self.type_len))
2616 packed.append(struct.pack("!L", self.value))
2617 packed.append(struct.pack("!L", self.value_mask))
2618 return ''.join(packed)
2619
2620 @staticmethod
2621 def unpack(reader):
2622 obj = bsn_vlan_xlate_port_group_id_masked()
2623 _type_len = reader.read("!L")[0]
2624 assert(_type_len == 205576)
2625 obj.value = reader.read("!L")[0]
2626 obj.value_mask = reader.read("!L")[0]
2627 return obj
2628
2629 def __eq__(self, other):
2630 if type(self) != type(other): return False
2631 if self.value != other.value: return False
2632 if self.value_mask != other.value_mask: return False
2633 return True
2634
2635 def pretty_print(self, q):
2636 q.text("bsn_vlan_xlate_port_group_id_masked {")
2637 with q.group():
2638 with q.indent(2):
2639 q.breakable()
2640 q.text("value = ");
2641 q.text("%#x" % self.value)
2642 q.text(","); q.breakable()
2643 q.text("value_mask = ");
2644 q.text("%#x" % self.value_mask)
2645 q.breakable()
2646 q.text('}')
2647
2648oxm.subtypes[205576] = bsn_vlan_xlate_port_group_id_masked
2649
Rich Lane7dcdf022013-12-11 14:45:27 -08002650class bsn_vrf(oxm):
Rich Laned9e3f7b2013-11-04 11:40:43 -08002651 type_len = 197636
2652
2653 def __init__(self, value=None):
2654 if value != None:
2655 self.value = value
2656 else:
2657 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002658 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08002659
2660 def pack(self):
2661 packed = []
2662 packed.append(struct.pack("!L", self.type_len))
2663 packed.append(struct.pack("!L", self.value))
2664 return ''.join(packed)
2665
2666 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002667 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08002668 obj = bsn_vrf()
Rich Laned9e3f7b2013-11-04 11:40:43 -08002669 _type_len = reader.read("!L")[0]
2670 assert(_type_len == 197636)
2671 obj.value = reader.read("!L")[0]
2672 return obj
2673
2674 def __eq__(self, other):
2675 if type(self) != type(other): return False
2676 if self.value != other.value: return False
2677 return True
2678
Rich Laned9e3f7b2013-11-04 11:40:43 -08002679 def pretty_print(self, q):
2680 q.text("bsn_vrf {")
2681 with q.group():
2682 with q.indent(2):
2683 q.breakable()
2684 q.text("value = ");
2685 q.text("%#x" % self.value)
2686 q.breakable()
2687 q.text('}')
2688
Rich Lane7dcdf022013-12-11 14:45:27 -08002689oxm.subtypes[197636] = bsn_vrf
2690
2691class bsn_vrf_masked(oxm):
2692 type_len = 197896
Rich Laned9e3f7b2013-11-04 11:40:43 -08002693
2694 def __init__(self, value=None, value_mask=None):
2695 if value != None:
2696 self.value = value
2697 else:
2698 self.value = 0
2699 if value_mask != None:
2700 self.value_mask = value_mask
2701 else:
2702 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08002703 return
Rich Laned9e3f7b2013-11-04 11:40:43 -08002704
2705 def pack(self):
2706 packed = []
2707 packed.append(struct.pack("!L", self.type_len))
2708 packed.append(struct.pack("!L", self.value))
2709 packed.append(struct.pack("!L", self.value_mask))
2710 return ''.join(packed)
2711
2712 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002713 def unpack(reader):
Rich Laned9e3f7b2013-11-04 11:40:43 -08002714 obj = bsn_vrf_masked()
Rich Laned9e3f7b2013-11-04 11:40:43 -08002715 _type_len = reader.read("!L")[0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002716 assert(_type_len == 197896)
Rich Laned9e3f7b2013-11-04 11:40:43 -08002717 obj.value = reader.read("!L")[0]
2718 obj.value_mask = reader.read("!L")[0]
2719 return obj
2720
2721 def __eq__(self, other):
2722 if type(self) != type(other): return False
2723 if self.value != other.value: return False
2724 if self.value_mask != other.value_mask: return False
2725 return True
2726
Rich Laned9e3f7b2013-11-04 11:40:43 -08002727 def pretty_print(self, q):
2728 q.text("bsn_vrf_masked {")
2729 with q.group():
2730 with q.indent(2):
2731 q.breakable()
2732 q.text("value = ");
2733 q.text("%#x" % self.value)
2734 q.text(","); q.breakable()
2735 q.text("value_mask = ");
2736 q.text("%#x" % self.value_mask)
2737 q.breakable()
2738 q.text('}')
2739
Rich Lane7dcdf022013-12-11 14:45:27 -08002740oxm.subtypes[197896] = bsn_vrf_masked
2741
Rich Lane51168312015-06-25 13:13:54 -07002742class bsn_vxlan_network_id(oxm):
2743 type_len = 207364
2744
2745 def __init__(self, value=None):
2746 if value != None:
2747 self.value = value
2748 else:
2749 self.value = 0
2750 return
2751
2752 def pack(self):
2753 packed = []
2754 packed.append(struct.pack("!L", self.type_len))
2755 packed.append(struct.pack("!L", self.value))
2756 return ''.join(packed)
2757
2758 @staticmethod
2759 def unpack(reader):
2760 obj = bsn_vxlan_network_id()
2761 _type_len = reader.read("!L")[0]
2762 assert(_type_len == 207364)
2763 obj.value = reader.read("!L")[0]
2764 return obj
2765
2766 def __eq__(self, other):
2767 if type(self) != type(other): return False
2768 if self.value != other.value: return False
2769 return True
2770
2771 def pretty_print(self, q):
2772 q.text("bsn_vxlan_network_id {")
2773 with q.group():
2774 with q.indent(2):
2775 q.breakable()
2776 q.text("value = ");
2777 q.text("%#x" % self.value)
2778 q.breakable()
2779 q.text('}')
2780
2781oxm.subtypes[207364] = bsn_vxlan_network_id
2782
2783class bsn_vxlan_network_id_masked(oxm):
2784 type_len = 207624
2785
2786 def __init__(self, value=None, value_mask=None):
2787 if value != None:
2788 self.value = value
2789 else:
2790 self.value = 0
2791 if value_mask != None:
2792 self.value_mask = value_mask
2793 else:
2794 self.value_mask = 0
2795 return
2796
2797 def pack(self):
2798 packed = []
2799 packed.append(struct.pack("!L", self.type_len))
2800 packed.append(struct.pack("!L", self.value))
2801 packed.append(struct.pack("!L", self.value_mask))
2802 return ''.join(packed)
2803
2804 @staticmethod
2805 def unpack(reader):
2806 obj = bsn_vxlan_network_id_masked()
2807 _type_len = reader.read("!L")[0]
2808 assert(_type_len == 207624)
2809 obj.value = reader.read("!L")[0]
2810 obj.value_mask = reader.read("!L")[0]
2811 return obj
2812
2813 def __eq__(self, other):
2814 if type(self) != type(other): return False
2815 if self.value != other.value: return False
2816 if self.value_mask != other.value_mask: return False
2817 return True
2818
2819 def pretty_print(self, q):
2820 q.text("bsn_vxlan_network_id_masked {")
2821 with q.group():
2822 with q.indent(2):
2823 q.breakable()
2824 q.text("value = ");
2825 q.text("%#x" % self.value)
2826 q.text(","); q.breakable()
2827 q.text("value_mask = ");
2828 q.text("%#x" % self.value_mask)
2829 q.breakable()
2830 q.text('}')
2831
2832oxm.subtypes[207624] = bsn_vxlan_network_id_masked
2833
Rich Lane7dcdf022013-12-11 14:45:27 -08002834class eth_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002835 type_len = 2147485190
Rich Lanec2ee4b82013-04-24 17:12:38 -07002836
2837 def __init__(self, value=None):
2838 if value != None:
2839 self.value = value
2840 else:
2841 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002842 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002843
2844 def pack(self):
2845 packed = []
2846 packed.append(struct.pack("!L", self.type_len))
2847 packed.append(struct.pack("!6B", *self.value))
2848 return ''.join(packed)
2849
2850 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002851 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002852 obj = eth_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07002853 _type_len = reader.read("!L")[0]
2854 assert(_type_len == 2147485190)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002855 obj.value = list(reader.read('!6B'))
2856 return obj
2857
2858 def __eq__(self, other):
2859 if type(self) != type(other): return False
2860 if self.value != other.value: return False
2861 return True
2862
Rich Lanec2ee4b82013-04-24 17:12:38 -07002863 def pretty_print(self, q):
2864 q.text("eth_dst {")
2865 with q.group():
2866 with q.indent(2):
2867 q.breakable()
2868 q.text("value = ");
2869 q.text(util.pretty_mac(self.value))
2870 q.breakable()
2871 q.text('}')
2872
Rich Lane7dcdf022013-12-11 14:45:27 -08002873oxm.subtypes[2147485190] = eth_dst
2874
2875class eth_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002876 type_len = 2147485452
Rich Lanec2ee4b82013-04-24 17:12:38 -07002877
2878 def __init__(self, value=None, value_mask=None):
2879 if value != None:
2880 self.value = value
2881 else:
2882 self.value = [0,0,0,0,0,0]
2883 if value_mask != None:
2884 self.value_mask = value_mask
2885 else:
2886 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002887 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002888
2889 def pack(self):
2890 packed = []
2891 packed.append(struct.pack("!L", self.type_len))
2892 packed.append(struct.pack("!6B", *self.value))
2893 packed.append(struct.pack("!6B", *self.value_mask))
2894 return ''.join(packed)
2895
2896 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002897 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002898 obj = eth_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002899 _type_len = reader.read("!L")[0]
2900 assert(_type_len == 2147485452)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002901 obj.value = list(reader.read('!6B'))
2902 obj.value_mask = list(reader.read('!6B'))
2903 return obj
2904
2905 def __eq__(self, other):
2906 if type(self) != type(other): return False
2907 if self.value != other.value: return False
2908 if self.value_mask != other.value_mask: return False
2909 return True
2910
Rich Lanec2ee4b82013-04-24 17:12:38 -07002911 def pretty_print(self, q):
2912 q.text("eth_dst_masked {")
2913 with q.group():
2914 with q.indent(2):
2915 q.breakable()
2916 q.text("value = ");
2917 q.text(util.pretty_mac(self.value))
2918 q.text(","); q.breakable()
2919 q.text("value_mask = ");
2920 q.text(util.pretty_mac(self.value_mask))
2921 q.breakable()
2922 q.text('}')
2923
Rich Lane7dcdf022013-12-11 14:45:27 -08002924oxm.subtypes[2147485452] = eth_dst_masked
2925
2926class eth_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002927 type_len = 2147485702
Rich Lanec2ee4b82013-04-24 17:12:38 -07002928
2929 def __init__(self, value=None):
2930 if value != None:
2931 self.value = value
2932 else:
2933 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002934 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002935
2936 def pack(self):
2937 packed = []
2938 packed.append(struct.pack("!L", self.type_len))
2939 packed.append(struct.pack("!6B", *self.value))
2940 return ''.join(packed)
2941
2942 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002943 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002944 obj = eth_src()
Dan Talaycof6202252013-07-02 01:00:29 -07002945 _type_len = reader.read("!L")[0]
2946 assert(_type_len == 2147485702)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002947 obj.value = list(reader.read('!6B'))
2948 return obj
2949
2950 def __eq__(self, other):
2951 if type(self) != type(other): return False
2952 if self.value != other.value: return False
2953 return True
2954
Rich Lanec2ee4b82013-04-24 17:12:38 -07002955 def pretty_print(self, q):
2956 q.text("eth_src {")
2957 with q.group():
2958 with q.indent(2):
2959 q.breakable()
2960 q.text("value = ");
2961 q.text(util.pretty_mac(self.value))
2962 q.breakable()
2963 q.text('}')
2964
Rich Lane7dcdf022013-12-11 14:45:27 -08002965oxm.subtypes[2147485702] = eth_src
2966
2967class eth_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07002968 type_len = 2147485964
Rich Lanec2ee4b82013-04-24 17:12:38 -07002969
2970 def __init__(self, value=None, value_mask=None):
2971 if value != None:
2972 self.value = value
2973 else:
2974 self.value = [0,0,0,0,0,0]
2975 if value_mask != None:
2976 self.value_mask = value_mask
2977 else:
2978 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08002979 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07002980
2981 def pack(self):
2982 packed = []
2983 packed.append(struct.pack("!L", self.type_len))
2984 packed.append(struct.pack("!6B", *self.value))
2985 packed.append(struct.pack("!6B", *self.value_mask))
2986 return ''.join(packed)
2987
2988 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08002989 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07002990 obj = eth_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07002991 _type_len = reader.read("!L")[0]
2992 assert(_type_len == 2147485964)
Rich Lanec2ee4b82013-04-24 17:12:38 -07002993 obj.value = list(reader.read('!6B'))
2994 obj.value_mask = list(reader.read('!6B'))
2995 return obj
2996
2997 def __eq__(self, other):
2998 if type(self) != type(other): return False
2999 if self.value != other.value: return False
3000 if self.value_mask != other.value_mask: return False
3001 return True
3002
Rich Lanec2ee4b82013-04-24 17:12:38 -07003003 def pretty_print(self, q):
3004 q.text("eth_src_masked {")
3005 with q.group():
3006 with q.indent(2):
3007 q.breakable()
3008 q.text("value = ");
3009 q.text(util.pretty_mac(self.value))
3010 q.text(","); q.breakable()
3011 q.text("value_mask = ");
3012 q.text(util.pretty_mac(self.value_mask))
3013 q.breakable()
3014 q.text('}')
3015
Rich Lane7dcdf022013-12-11 14:45:27 -08003016oxm.subtypes[2147485964] = eth_src_masked
3017
3018class eth_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003019 type_len = 2147486210
Rich Lanec2ee4b82013-04-24 17:12:38 -07003020
3021 def __init__(self, value=None):
3022 if value != None:
3023 self.value = value
3024 else:
3025 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003026 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003027
3028 def pack(self):
3029 packed = []
3030 packed.append(struct.pack("!L", self.type_len))
3031 packed.append(struct.pack("!H", self.value))
3032 return ''.join(packed)
3033
3034 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003035 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003036 obj = eth_type()
Dan Talaycof6202252013-07-02 01:00:29 -07003037 _type_len = reader.read("!L")[0]
3038 assert(_type_len == 2147486210)
3039 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003040 return obj
3041
3042 def __eq__(self, other):
3043 if type(self) != type(other): return False
3044 if self.value != other.value: return False
3045 return True
3046
Rich Lanec2ee4b82013-04-24 17:12:38 -07003047 def pretty_print(self, q):
3048 q.text("eth_type {")
3049 with q.group():
3050 with q.indent(2):
3051 q.breakable()
3052 q.text("value = ");
3053 q.text("%#x" % self.value)
3054 q.breakable()
3055 q.text('}')
3056
Rich Lane7dcdf022013-12-11 14:45:27 -08003057oxm.subtypes[2147486210] = eth_type
3058
3059class eth_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003060 type_len = 2147486468
Rich Lanec2ee4b82013-04-24 17:12:38 -07003061
3062 def __init__(self, value=None, value_mask=None):
3063 if value != None:
3064 self.value = value
3065 else:
3066 self.value = 0
3067 if value_mask != None:
3068 self.value_mask = value_mask
3069 else:
3070 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003071 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003072
3073 def pack(self):
3074 packed = []
3075 packed.append(struct.pack("!L", self.type_len))
3076 packed.append(struct.pack("!H", self.value))
3077 packed.append(struct.pack("!H", self.value_mask))
3078 return ''.join(packed)
3079
3080 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003081 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003082 obj = eth_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003083 _type_len = reader.read("!L")[0]
3084 assert(_type_len == 2147486468)
3085 obj.value = reader.read("!H")[0]
3086 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003087 return obj
3088
3089 def __eq__(self, other):
3090 if type(self) != type(other): return False
3091 if self.value != other.value: return False
3092 if self.value_mask != other.value_mask: return False
3093 return True
3094
Rich Lanec2ee4b82013-04-24 17:12:38 -07003095 def pretty_print(self, q):
3096 q.text("eth_type_masked {")
3097 with q.group():
3098 with q.indent(2):
3099 q.breakable()
3100 q.text("value = ");
3101 q.text("%#x" % self.value)
3102 q.text(","); q.breakable()
3103 q.text("value_mask = ");
3104 q.text("%#x" % self.value_mask)
3105 q.breakable()
3106 q.text('}')
3107
Rich Lane7dcdf022013-12-11 14:45:27 -08003108oxm.subtypes[2147486468] = eth_type_masked
3109
3110class icmpv4_code(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003111 type_len = 2147493889
Rich Lanec2ee4b82013-04-24 17:12:38 -07003112
3113 def __init__(self, value=None):
3114 if value != None:
3115 self.value = value
3116 else:
3117 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003118 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003119
3120 def pack(self):
3121 packed = []
3122 packed.append(struct.pack("!L", self.type_len))
3123 packed.append(struct.pack("!B", self.value))
3124 return ''.join(packed)
3125
3126 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003127 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003128 obj = icmpv4_code()
Dan Talaycof6202252013-07-02 01:00:29 -07003129 _type_len = reader.read("!L")[0]
3130 assert(_type_len == 2147493889)
3131 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003132 return obj
3133
3134 def __eq__(self, other):
3135 if type(self) != type(other): return False
3136 if self.value != other.value: return False
3137 return True
3138
Rich Lanec2ee4b82013-04-24 17:12:38 -07003139 def pretty_print(self, q):
3140 q.text("icmpv4_code {")
3141 with q.group():
3142 with q.indent(2):
3143 q.breakable()
3144 q.text("value = ");
3145 q.text("%#x" % self.value)
3146 q.breakable()
3147 q.text('}')
3148
Rich Lane7dcdf022013-12-11 14:45:27 -08003149oxm.subtypes[2147493889] = icmpv4_code
3150
3151class icmpv4_code_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003152 type_len = 2147494146
Rich Lanec2ee4b82013-04-24 17:12:38 -07003153
3154 def __init__(self, value=None, value_mask=None):
3155 if value != None:
3156 self.value = value
3157 else:
3158 self.value = 0
3159 if value_mask != None:
3160 self.value_mask = value_mask
3161 else:
3162 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003163 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003164
3165 def pack(self):
3166 packed = []
3167 packed.append(struct.pack("!L", self.type_len))
3168 packed.append(struct.pack("!B", self.value))
3169 packed.append(struct.pack("!B", self.value_mask))
3170 return ''.join(packed)
3171
3172 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003173 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003174 obj = icmpv4_code_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003175 _type_len = reader.read("!L")[0]
3176 assert(_type_len == 2147494146)
3177 obj.value = reader.read("!B")[0]
3178 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003179 return obj
3180
3181 def __eq__(self, other):
3182 if type(self) != type(other): return False
3183 if self.value != other.value: return False
3184 if self.value_mask != other.value_mask: return False
3185 return True
3186
Rich Lanec2ee4b82013-04-24 17:12:38 -07003187 def pretty_print(self, q):
3188 q.text("icmpv4_code_masked {")
3189 with q.group():
3190 with q.indent(2):
3191 q.breakable()
3192 q.text("value = ");
3193 q.text("%#x" % self.value)
3194 q.text(","); q.breakable()
3195 q.text("value_mask = ");
3196 q.text("%#x" % self.value_mask)
3197 q.breakable()
3198 q.text('}')
3199
Rich Lane7dcdf022013-12-11 14:45:27 -08003200oxm.subtypes[2147494146] = icmpv4_code_masked
3201
3202class icmpv4_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003203 type_len = 2147493377
Rich Lanec2ee4b82013-04-24 17:12:38 -07003204
3205 def __init__(self, value=None):
3206 if value != None:
3207 self.value = value
3208 else:
3209 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003210 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003211
3212 def pack(self):
3213 packed = []
3214 packed.append(struct.pack("!L", self.type_len))
3215 packed.append(struct.pack("!B", self.value))
3216 return ''.join(packed)
3217
3218 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003219 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003220 obj = icmpv4_type()
Dan Talaycof6202252013-07-02 01:00:29 -07003221 _type_len = reader.read("!L")[0]
3222 assert(_type_len == 2147493377)
3223 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003224 return obj
3225
3226 def __eq__(self, other):
3227 if type(self) != type(other): return False
3228 if self.value != other.value: return False
3229 return True
3230
Rich Lanec2ee4b82013-04-24 17:12:38 -07003231 def pretty_print(self, q):
3232 q.text("icmpv4_type {")
3233 with q.group():
3234 with q.indent(2):
3235 q.breakable()
3236 q.text("value = ");
3237 q.text("%#x" % self.value)
3238 q.breakable()
3239 q.text('}')
3240
Rich Lane7dcdf022013-12-11 14:45:27 -08003241oxm.subtypes[2147493377] = icmpv4_type
3242
3243class icmpv4_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003244 type_len = 2147493634
Rich Lanec2ee4b82013-04-24 17:12:38 -07003245
3246 def __init__(self, value=None, value_mask=None):
3247 if value != None:
3248 self.value = value
3249 else:
3250 self.value = 0
3251 if value_mask != None:
3252 self.value_mask = value_mask
3253 else:
3254 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003255 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003256
3257 def pack(self):
3258 packed = []
3259 packed.append(struct.pack("!L", self.type_len))
3260 packed.append(struct.pack("!B", self.value))
3261 packed.append(struct.pack("!B", self.value_mask))
3262 return ''.join(packed)
3263
3264 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003265 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003266 obj = icmpv4_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003267 _type_len = reader.read("!L")[0]
3268 assert(_type_len == 2147493634)
3269 obj.value = reader.read("!B")[0]
3270 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003271 return obj
3272
3273 def __eq__(self, other):
3274 if type(self) != type(other): return False
3275 if self.value != other.value: return False
3276 if self.value_mask != other.value_mask: return False
3277 return True
3278
Rich Lanec2ee4b82013-04-24 17:12:38 -07003279 def pretty_print(self, q):
3280 q.text("icmpv4_type_masked {")
3281 with q.group():
3282 with q.indent(2):
3283 q.breakable()
3284 q.text("value = ");
3285 q.text("%#x" % self.value)
3286 q.text(","); q.breakable()
3287 q.text("value_mask = ");
3288 q.text("%#x" % self.value_mask)
3289 q.breakable()
3290 q.text('}')
3291
Rich Lane7dcdf022013-12-11 14:45:27 -08003292oxm.subtypes[2147493634] = icmpv4_type_masked
3293
3294class icmpv6_code(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003295 type_len = 2147499009
Rich Lanec2ee4b82013-04-24 17:12:38 -07003296
3297 def __init__(self, value=None):
3298 if value != None:
3299 self.value = value
3300 else:
3301 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003302 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003303
3304 def pack(self):
3305 packed = []
3306 packed.append(struct.pack("!L", self.type_len))
3307 packed.append(struct.pack("!B", self.value))
3308 return ''.join(packed)
3309
3310 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003311 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003312 obj = icmpv6_code()
Dan Talaycof6202252013-07-02 01:00:29 -07003313 _type_len = reader.read("!L")[0]
3314 assert(_type_len == 2147499009)
3315 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003316 return obj
3317
3318 def __eq__(self, other):
3319 if type(self) != type(other): return False
3320 if self.value != other.value: return False
3321 return True
3322
Rich Lanec2ee4b82013-04-24 17:12:38 -07003323 def pretty_print(self, q):
3324 q.text("icmpv6_code {")
3325 with q.group():
3326 with q.indent(2):
3327 q.breakable()
3328 q.text("value = ");
3329 q.text("%#x" % self.value)
3330 q.breakable()
3331 q.text('}')
3332
Rich Lane7dcdf022013-12-11 14:45:27 -08003333oxm.subtypes[2147499009] = icmpv6_code
3334
3335class icmpv6_code_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003336 type_len = 2147499266
Rich Lanec2ee4b82013-04-24 17:12:38 -07003337
3338 def __init__(self, value=None, value_mask=None):
3339 if value != None:
3340 self.value = value
3341 else:
3342 self.value = 0
3343 if value_mask != None:
3344 self.value_mask = value_mask
3345 else:
3346 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003347 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003348
3349 def pack(self):
3350 packed = []
3351 packed.append(struct.pack("!L", self.type_len))
3352 packed.append(struct.pack("!B", self.value))
3353 packed.append(struct.pack("!B", self.value_mask))
3354 return ''.join(packed)
3355
3356 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003357 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003358 obj = icmpv6_code_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003359 _type_len = reader.read("!L")[0]
3360 assert(_type_len == 2147499266)
3361 obj.value = reader.read("!B")[0]
3362 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003363 return obj
3364
3365 def __eq__(self, other):
3366 if type(self) != type(other): return False
3367 if self.value != other.value: return False
3368 if self.value_mask != other.value_mask: return False
3369 return True
3370
Rich Lanec2ee4b82013-04-24 17:12:38 -07003371 def pretty_print(self, q):
3372 q.text("icmpv6_code_masked {")
3373 with q.group():
3374 with q.indent(2):
3375 q.breakable()
3376 q.text("value = ");
3377 q.text("%#x" % self.value)
3378 q.text(","); q.breakable()
3379 q.text("value_mask = ");
3380 q.text("%#x" % self.value_mask)
3381 q.breakable()
3382 q.text('}')
3383
Rich Lane7dcdf022013-12-11 14:45:27 -08003384oxm.subtypes[2147499266] = icmpv6_code_masked
3385
3386class icmpv6_type(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003387 type_len = 2147498497
Rich Lanec2ee4b82013-04-24 17:12:38 -07003388
3389 def __init__(self, value=None):
3390 if value != None:
3391 self.value = value
3392 else:
3393 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003394 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003395
3396 def pack(self):
3397 packed = []
3398 packed.append(struct.pack("!L", self.type_len))
3399 packed.append(struct.pack("!B", self.value))
3400 return ''.join(packed)
3401
3402 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003403 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003404 obj = icmpv6_type()
Dan Talaycof6202252013-07-02 01:00:29 -07003405 _type_len = reader.read("!L")[0]
3406 assert(_type_len == 2147498497)
3407 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003408 return obj
3409
3410 def __eq__(self, other):
3411 if type(self) != type(other): return False
3412 if self.value != other.value: return False
3413 return True
3414
Rich Lanec2ee4b82013-04-24 17:12:38 -07003415 def pretty_print(self, q):
3416 q.text("icmpv6_type {")
3417 with q.group():
3418 with q.indent(2):
3419 q.breakable()
3420 q.text("value = ");
3421 q.text("%#x" % self.value)
3422 q.breakable()
3423 q.text('}')
3424
Rich Lane7dcdf022013-12-11 14:45:27 -08003425oxm.subtypes[2147498497] = icmpv6_type
3426
3427class icmpv6_type_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003428 type_len = 2147498754
Rich Lanec2ee4b82013-04-24 17:12:38 -07003429
3430 def __init__(self, value=None, value_mask=None):
3431 if value != None:
3432 self.value = value
3433 else:
3434 self.value = 0
3435 if value_mask != None:
3436 self.value_mask = value_mask
3437 else:
3438 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003439 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003440
3441 def pack(self):
3442 packed = []
3443 packed.append(struct.pack("!L", self.type_len))
3444 packed.append(struct.pack("!B", self.value))
3445 packed.append(struct.pack("!B", self.value_mask))
3446 return ''.join(packed)
3447
3448 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003449 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003450 obj = icmpv6_type_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003451 _type_len = reader.read("!L")[0]
3452 assert(_type_len == 2147498754)
3453 obj.value = reader.read("!B")[0]
3454 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003455 return obj
3456
3457 def __eq__(self, other):
3458 if type(self) != type(other): return False
3459 if self.value != other.value: return False
3460 if self.value_mask != other.value_mask: return False
3461 return True
3462
Rich Lanec2ee4b82013-04-24 17:12:38 -07003463 def pretty_print(self, q):
3464 q.text("icmpv6_type_masked {")
3465 with q.group():
3466 with q.indent(2):
3467 q.breakable()
3468 q.text("value = ");
3469 q.text("%#x" % self.value)
3470 q.text(","); q.breakable()
3471 q.text("value_mask = ");
3472 q.text("%#x" % self.value_mask)
3473 q.breakable()
3474 q.text('}')
3475
Rich Lane7dcdf022013-12-11 14:45:27 -08003476oxm.subtypes[2147498754] = icmpv6_type_masked
3477
3478class in_phy_port(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003479 type_len = 2147484164
Rich Lanec2ee4b82013-04-24 17:12:38 -07003480
3481 def __init__(self, value=None):
3482 if value != None:
3483 self.value = value
3484 else:
3485 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003486 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003487
3488 def pack(self):
3489 packed = []
3490 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07003491 packed.append(util.pack_port_no(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003492 return ''.join(packed)
3493
3494 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003495 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003496 obj = in_phy_port()
Dan Talaycof6202252013-07-02 01:00:29 -07003497 _type_len = reader.read("!L")[0]
3498 assert(_type_len == 2147484164)
3499 obj.value = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003500 return obj
3501
3502 def __eq__(self, other):
3503 if type(self) != type(other): return False
3504 if self.value != other.value: return False
3505 return True
3506
Rich Lanec2ee4b82013-04-24 17:12:38 -07003507 def pretty_print(self, q):
3508 q.text("in_phy_port {")
3509 with q.group():
3510 with q.indent(2):
3511 q.breakable()
3512 q.text("value = ");
3513 q.text(util.pretty_port(self.value))
3514 q.breakable()
3515 q.text('}')
3516
Rich Lane7dcdf022013-12-11 14:45:27 -08003517oxm.subtypes[2147484164] = in_phy_port
3518
3519class in_phy_port_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003520 type_len = 2147484424
Rich Lanec2ee4b82013-04-24 17:12:38 -07003521
3522 def __init__(self, value=None, value_mask=None):
3523 if value != None:
3524 self.value = value
3525 else:
3526 self.value = 0
3527 if value_mask != None:
3528 self.value_mask = value_mask
3529 else:
3530 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003531 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003532
3533 def pack(self):
3534 packed = []
3535 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07003536 packed.append(util.pack_port_no(self.value))
3537 packed.append(util.pack_port_no(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003538 return ''.join(packed)
3539
3540 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003541 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003542 obj = in_phy_port_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003543 _type_len = reader.read("!L")[0]
3544 assert(_type_len == 2147484424)
3545 obj.value = util.unpack_port_no(reader)
3546 obj.value_mask = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003547 return obj
3548
3549 def __eq__(self, other):
3550 if type(self) != type(other): return False
3551 if self.value != other.value: return False
3552 if self.value_mask != other.value_mask: return False
3553 return True
3554
Rich Lanec2ee4b82013-04-24 17:12:38 -07003555 def pretty_print(self, q):
3556 q.text("in_phy_port_masked {")
3557 with q.group():
3558 with q.indent(2):
3559 q.breakable()
3560 q.text("value = ");
3561 q.text(util.pretty_port(self.value))
3562 q.text(","); q.breakable()
3563 q.text("value_mask = ");
3564 q.text(util.pretty_port(self.value_mask))
3565 q.breakable()
3566 q.text('}')
3567
Rich Lane7dcdf022013-12-11 14:45:27 -08003568oxm.subtypes[2147484424] = in_phy_port_masked
3569
3570class in_port(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003571 type_len = 2147483652
Rich Lanec2ee4b82013-04-24 17:12:38 -07003572
3573 def __init__(self, value=None):
3574 if value != None:
3575 self.value = value
3576 else:
3577 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003578 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003579
3580 def pack(self):
3581 packed = []
3582 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07003583 packed.append(util.pack_port_no(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003584 return ''.join(packed)
3585
3586 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003587 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003588 obj = in_port()
Dan Talaycof6202252013-07-02 01:00:29 -07003589 _type_len = reader.read("!L")[0]
3590 assert(_type_len == 2147483652)
3591 obj.value = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003592 return obj
3593
3594 def __eq__(self, other):
3595 if type(self) != type(other): return False
3596 if self.value != other.value: return False
3597 return True
3598
Rich Lanec2ee4b82013-04-24 17:12:38 -07003599 def pretty_print(self, q):
3600 q.text("in_port {")
3601 with q.group():
3602 with q.indent(2):
3603 q.breakable()
3604 q.text("value = ");
3605 q.text(util.pretty_port(self.value))
3606 q.breakable()
3607 q.text('}')
3608
Rich Lane7dcdf022013-12-11 14:45:27 -08003609oxm.subtypes[2147483652] = in_port
3610
3611class in_port_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003612 type_len = 2147483912
Rich Lanec2ee4b82013-04-24 17:12:38 -07003613
3614 def __init__(self, value=None, value_mask=None):
3615 if value != None:
3616 self.value = value
3617 else:
3618 self.value = 0
3619 if value_mask != None:
3620 self.value_mask = value_mask
3621 else:
3622 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003623 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003624
3625 def pack(self):
3626 packed = []
3627 packed.append(struct.pack("!L", self.type_len))
Dan Talaycof6202252013-07-02 01:00:29 -07003628 packed.append(util.pack_port_no(self.value))
3629 packed.append(util.pack_port_no(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003630 return ''.join(packed)
3631
3632 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003633 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003634 obj = in_port_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003635 _type_len = reader.read("!L")[0]
3636 assert(_type_len == 2147483912)
3637 obj.value = util.unpack_port_no(reader)
3638 obj.value_mask = util.unpack_port_no(reader)
Rich Lanec2ee4b82013-04-24 17:12:38 -07003639 return obj
3640
3641 def __eq__(self, other):
3642 if type(self) != type(other): return False
3643 if self.value != other.value: return False
3644 if self.value_mask != other.value_mask: return False
3645 return True
3646
Rich Lanec2ee4b82013-04-24 17:12:38 -07003647 def pretty_print(self, q):
3648 q.text("in_port_masked {")
3649 with q.group():
3650 with q.indent(2):
3651 q.breakable()
3652 q.text("value = ");
3653 q.text(util.pretty_port(self.value))
3654 q.text(","); q.breakable()
3655 q.text("value_mask = ");
3656 q.text(util.pretty_port(self.value_mask))
3657 q.breakable()
3658 q.text('}')
3659
Rich Lane7dcdf022013-12-11 14:45:27 -08003660oxm.subtypes[2147483912] = in_port_masked
3661
3662class ip_dscp(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003663 type_len = 2147487745
Rich Lanec2ee4b82013-04-24 17:12:38 -07003664
3665 def __init__(self, value=None):
3666 if value != None:
3667 self.value = value
3668 else:
3669 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003670 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003671
3672 def pack(self):
3673 packed = []
3674 packed.append(struct.pack("!L", self.type_len))
3675 packed.append(struct.pack("!B", self.value))
3676 return ''.join(packed)
3677
3678 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003679 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003680 obj = ip_dscp()
Dan Talaycof6202252013-07-02 01:00:29 -07003681 _type_len = reader.read("!L")[0]
3682 assert(_type_len == 2147487745)
3683 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003684 return obj
3685
3686 def __eq__(self, other):
3687 if type(self) != type(other): return False
3688 if self.value != other.value: return False
3689 return True
3690
Rich Lanec2ee4b82013-04-24 17:12:38 -07003691 def pretty_print(self, q):
3692 q.text("ip_dscp {")
3693 with q.group():
3694 with q.indent(2):
3695 q.breakable()
3696 q.text("value = ");
3697 q.text("%#x" % self.value)
3698 q.breakable()
3699 q.text('}')
3700
Rich Lane7dcdf022013-12-11 14:45:27 -08003701oxm.subtypes[2147487745] = ip_dscp
3702
3703class ip_dscp_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003704 type_len = 2147488002
Rich Lanec2ee4b82013-04-24 17:12:38 -07003705
3706 def __init__(self, value=None, value_mask=None):
3707 if value != None:
3708 self.value = value
3709 else:
3710 self.value = 0
3711 if value_mask != None:
3712 self.value_mask = value_mask
3713 else:
3714 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003715 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003716
3717 def pack(self):
3718 packed = []
3719 packed.append(struct.pack("!L", self.type_len))
3720 packed.append(struct.pack("!B", self.value))
3721 packed.append(struct.pack("!B", self.value_mask))
3722 return ''.join(packed)
3723
3724 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003725 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003726 obj = ip_dscp_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003727 _type_len = reader.read("!L")[0]
3728 assert(_type_len == 2147488002)
3729 obj.value = reader.read("!B")[0]
3730 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003731 return obj
3732
3733 def __eq__(self, other):
3734 if type(self) != type(other): return False
3735 if self.value != other.value: return False
3736 if self.value_mask != other.value_mask: return False
3737 return True
3738
Rich Lanec2ee4b82013-04-24 17:12:38 -07003739 def pretty_print(self, q):
3740 q.text("ip_dscp_masked {")
3741 with q.group():
3742 with q.indent(2):
3743 q.breakable()
3744 q.text("value = ");
3745 q.text("%#x" % self.value)
3746 q.text(","); q.breakable()
3747 q.text("value_mask = ");
3748 q.text("%#x" % self.value_mask)
3749 q.breakable()
3750 q.text('}')
3751
Rich Lane7dcdf022013-12-11 14:45:27 -08003752oxm.subtypes[2147488002] = ip_dscp_masked
3753
3754class ip_ecn(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003755 type_len = 2147488257
Rich Lanec2ee4b82013-04-24 17:12:38 -07003756
3757 def __init__(self, value=None):
3758 if value != None:
3759 self.value = value
3760 else:
3761 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003762 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003763
3764 def pack(self):
3765 packed = []
3766 packed.append(struct.pack("!L", self.type_len))
3767 packed.append(struct.pack("!B", self.value))
3768 return ''.join(packed)
3769
3770 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003771 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003772 obj = ip_ecn()
Dan Talaycof6202252013-07-02 01:00:29 -07003773 _type_len = reader.read("!L")[0]
3774 assert(_type_len == 2147488257)
3775 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003776 return obj
3777
3778 def __eq__(self, other):
3779 if type(self) != type(other): return False
3780 if self.value != other.value: return False
3781 return True
3782
Rich Lanec2ee4b82013-04-24 17:12:38 -07003783 def pretty_print(self, q):
3784 q.text("ip_ecn {")
3785 with q.group():
3786 with q.indent(2):
3787 q.breakable()
3788 q.text("value = ");
3789 q.text("%#x" % self.value)
3790 q.breakable()
3791 q.text('}')
3792
Rich Lane7dcdf022013-12-11 14:45:27 -08003793oxm.subtypes[2147488257] = ip_ecn
3794
3795class ip_ecn_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003796 type_len = 2147488514
Rich Lanec2ee4b82013-04-24 17:12:38 -07003797
3798 def __init__(self, value=None, value_mask=None):
3799 if value != None:
3800 self.value = value
3801 else:
3802 self.value = 0
3803 if value_mask != None:
3804 self.value_mask = value_mask
3805 else:
3806 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003807 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003808
3809 def pack(self):
3810 packed = []
3811 packed.append(struct.pack("!L", self.type_len))
3812 packed.append(struct.pack("!B", self.value))
3813 packed.append(struct.pack("!B", self.value_mask))
3814 return ''.join(packed)
3815
3816 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003817 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003818 obj = ip_ecn_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003819 _type_len = reader.read("!L")[0]
3820 assert(_type_len == 2147488514)
3821 obj.value = reader.read("!B")[0]
3822 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003823 return obj
3824
3825 def __eq__(self, other):
3826 if type(self) != type(other): return False
3827 if self.value != other.value: return False
3828 if self.value_mask != other.value_mask: return False
3829 return True
3830
Rich Lanec2ee4b82013-04-24 17:12:38 -07003831 def pretty_print(self, q):
3832 q.text("ip_ecn_masked {")
3833 with q.group():
3834 with q.indent(2):
3835 q.breakable()
3836 q.text("value = ");
3837 q.text("%#x" % self.value)
3838 q.text(","); q.breakable()
3839 q.text("value_mask = ");
3840 q.text("%#x" % self.value_mask)
3841 q.breakable()
3842 q.text('}')
3843
Rich Lane7dcdf022013-12-11 14:45:27 -08003844oxm.subtypes[2147488514] = ip_ecn_masked
3845
3846class ip_proto(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003847 type_len = 2147488769
Rich Lanec2ee4b82013-04-24 17:12:38 -07003848
3849 def __init__(self, value=None):
3850 if value != None:
3851 self.value = value
3852 else:
3853 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003854 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003855
3856 def pack(self):
3857 packed = []
3858 packed.append(struct.pack("!L", self.type_len))
3859 packed.append(struct.pack("!B", self.value))
3860 return ''.join(packed)
3861
3862 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003863 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003864 obj = ip_proto()
Dan Talaycof6202252013-07-02 01:00:29 -07003865 _type_len = reader.read("!L")[0]
3866 assert(_type_len == 2147488769)
3867 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003868 return obj
3869
3870 def __eq__(self, other):
3871 if type(self) != type(other): return False
3872 if self.value != other.value: return False
3873 return True
3874
Rich Lanec2ee4b82013-04-24 17:12:38 -07003875 def pretty_print(self, q):
3876 q.text("ip_proto {")
3877 with q.group():
3878 with q.indent(2):
3879 q.breakable()
3880 q.text("value = ");
3881 q.text("%#x" % self.value)
3882 q.breakable()
3883 q.text('}')
3884
Rich Lane7dcdf022013-12-11 14:45:27 -08003885oxm.subtypes[2147488769] = ip_proto
3886
3887class ip_proto_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003888 type_len = 2147489026
Rich Lanec2ee4b82013-04-24 17:12:38 -07003889
3890 def __init__(self, value=None, value_mask=None):
3891 if value != None:
3892 self.value = value
3893 else:
3894 self.value = 0
3895 if value_mask != None:
3896 self.value_mask = value_mask
3897 else:
3898 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003899 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003900
3901 def pack(self):
3902 packed = []
3903 packed.append(struct.pack("!L", self.type_len))
3904 packed.append(struct.pack("!B", self.value))
3905 packed.append(struct.pack("!B", self.value_mask))
3906 return ''.join(packed)
3907
3908 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003909 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003910 obj = ip_proto_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07003911 _type_len = reader.read("!L")[0]
3912 assert(_type_len == 2147489026)
3913 obj.value = reader.read("!B")[0]
3914 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003915 return obj
3916
3917 def __eq__(self, other):
3918 if type(self) != type(other): return False
3919 if self.value != other.value: return False
3920 if self.value_mask != other.value_mask: return False
3921 return True
3922
Rich Lanec2ee4b82013-04-24 17:12:38 -07003923 def pretty_print(self, q):
3924 q.text("ip_proto_masked {")
3925 with q.group():
3926 with q.indent(2):
3927 q.breakable()
3928 q.text("value = ");
3929 q.text("%#x" % self.value)
3930 q.text(","); q.breakable()
3931 q.text("value_mask = ");
3932 q.text("%#x" % self.value_mask)
3933 q.breakable()
3934 q.text('}')
3935
Rich Lane7dcdf022013-12-11 14:45:27 -08003936oxm.subtypes[2147489026] = ip_proto_masked
3937
3938class ipv4_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003939 type_len = 2147489796
Rich Lanec2ee4b82013-04-24 17:12:38 -07003940
3941 def __init__(self, value=None):
3942 if value != None:
3943 self.value = value
3944 else:
3945 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003946 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003947
3948 def pack(self):
3949 packed = []
3950 packed.append(struct.pack("!L", self.type_len))
3951 packed.append(struct.pack("!L", self.value))
3952 return ''.join(packed)
3953
3954 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08003955 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07003956 obj = ipv4_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07003957 _type_len = reader.read("!L")[0]
3958 assert(_type_len == 2147489796)
3959 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07003960 return obj
3961
3962 def __eq__(self, other):
3963 if type(self) != type(other): return False
3964 if self.value != other.value: return False
3965 return True
3966
Rich Lanec2ee4b82013-04-24 17:12:38 -07003967 def pretty_print(self, q):
3968 q.text("ipv4_dst {")
3969 with q.group():
3970 with q.indent(2):
3971 q.breakable()
3972 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07003973 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07003974 q.breakable()
3975 q.text('}')
3976
Rich Lane7dcdf022013-12-11 14:45:27 -08003977oxm.subtypes[2147489796] = ipv4_dst
3978
3979class ipv4_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07003980 type_len = 2147490056
Rich Lanec2ee4b82013-04-24 17:12:38 -07003981
3982 def __init__(self, value=None, value_mask=None):
3983 if value != None:
3984 self.value = value
3985 else:
3986 self.value = 0
3987 if value_mask != None:
3988 self.value_mask = value_mask
3989 else:
3990 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08003991 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07003992
3993 def pack(self):
3994 packed = []
3995 packed.append(struct.pack("!L", self.type_len))
3996 packed.append(struct.pack("!L", self.value))
3997 packed.append(struct.pack("!L", self.value_mask))
3998 return ''.join(packed)
3999
4000 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004001 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004002 obj = ipv4_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004003 _type_len = reader.read("!L")[0]
4004 assert(_type_len == 2147490056)
4005 obj.value = reader.read("!L")[0]
4006 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004007 return obj
4008
4009 def __eq__(self, other):
4010 if type(self) != type(other): return False
4011 if self.value != other.value: return False
4012 if self.value_mask != other.value_mask: return False
4013 return True
4014
Rich Lanec2ee4b82013-04-24 17:12:38 -07004015 def pretty_print(self, q):
4016 q.text("ipv4_dst_masked {")
4017 with q.group():
4018 with q.indent(2):
4019 q.breakable()
4020 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07004021 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07004022 q.text(","); q.breakable()
4023 q.text("value_mask = ");
Rich Laned53156a2013-08-05 17:17:33 -07004024 q.text(util.pretty_ipv4(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07004025 q.breakable()
4026 q.text('}')
4027
Rich Lane7dcdf022013-12-11 14:45:27 -08004028oxm.subtypes[2147490056] = ipv4_dst_masked
4029
4030class ipv4_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004031 type_len = 2147489284
Rich Lanec2ee4b82013-04-24 17:12:38 -07004032
4033 def __init__(self, value=None):
4034 if value != None:
4035 self.value = value
4036 else:
4037 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004038 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004039
4040 def pack(self):
4041 packed = []
4042 packed.append(struct.pack("!L", self.type_len))
4043 packed.append(struct.pack("!L", self.value))
4044 return ''.join(packed)
4045
4046 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004047 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004048 obj = ipv4_src()
Dan Talaycof6202252013-07-02 01:00:29 -07004049 _type_len = reader.read("!L")[0]
4050 assert(_type_len == 2147489284)
4051 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004052 return obj
4053
4054 def __eq__(self, other):
4055 if type(self) != type(other): return False
4056 if self.value != other.value: return False
4057 return True
4058
Rich Lanec2ee4b82013-04-24 17:12:38 -07004059 def pretty_print(self, q):
4060 q.text("ipv4_src {")
4061 with q.group():
4062 with q.indent(2):
4063 q.breakable()
4064 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07004065 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07004066 q.breakable()
4067 q.text('}')
4068
Rich Lane7dcdf022013-12-11 14:45:27 -08004069oxm.subtypes[2147489284] = ipv4_src
4070
4071class ipv4_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004072 type_len = 2147489544
Rich Lanec2ee4b82013-04-24 17:12:38 -07004073
4074 def __init__(self, value=None, value_mask=None):
4075 if value != None:
4076 self.value = value
4077 else:
4078 self.value = 0
4079 if value_mask != None:
4080 self.value_mask = value_mask
4081 else:
4082 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004083 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004084
4085 def pack(self):
4086 packed = []
4087 packed.append(struct.pack("!L", self.type_len))
4088 packed.append(struct.pack("!L", self.value))
4089 packed.append(struct.pack("!L", self.value_mask))
4090 return ''.join(packed)
4091
4092 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004093 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004094 obj = ipv4_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004095 _type_len = reader.read("!L")[0]
4096 assert(_type_len == 2147489544)
4097 obj.value = reader.read("!L")[0]
4098 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004099 return obj
4100
4101 def __eq__(self, other):
4102 if type(self) != type(other): return False
4103 if self.value != other.value: return False
4104 if self.value_mask != other.value_mask: return False
4105 return True
4106
Rich Lanec2ee4b82013-04-24 17:12:38 -07004107 def pretty_print(self, q):
4108 q.text("ipv4_src_masked {")
4109 with q.group():
4110 with q.indent(2):
4111 q.breakable()
4112 q.text("value = ");
Rich Laned53156a2013-08-05 17:17:33 -07004113 q.text(util.pretty_ipv4(self.value))
Rich Lanec2ee4b82013-04-24 17:12:38 -07004114 q.text(","); q.breakable()
4115 q.text("value_mask = ");
Rich Laned53156a2013-08-05 17:17:33 -07004116 q.text(util.pretty_ipv4(self.value_mask))
Rich Lanec2ee4b82013-04-24 17:12:38 -07004117 q.breakable()
4118 q.text('}')
4119
Rich Lane7dcdf022013-12-11 14:45:27 -08004120oxm.subtypes[2147489544] = ipv4_src_masked
4121
4122class ipv6_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004123 type_len = 2147497488
Rich Lanec2ee4b82013-04-24 17:12:38 -07004124
4125 def __init__(self, value=None):
4126 if value != None:
4127 self.value = value
4128 else:
4129 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 -08004130 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004131
4132 def pack(self):
4133 packed = []
4134 packed.append(struct.pack("!L", self.type_len))
4135 packed.append(struct.pack("!16s", self.value))
4136 return ''.join(packed)
4137
4138 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004139 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004140 obj = ipv6_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07004141 _type_len = reader.read("!L")[0]
4142 assert(_type_len == 2147497488)
Rich Lanec2ee4b82013-04-24 17:12:38 -07004143 obj.value = reader.read('!16s')[0]
4144 return obj
4145
4146 def __eq__(self, other):
4147 if type(self) != type(other): return False
4148 if self.value != other.value: return False
4149 return True
4150
Rich Lanec2ee4b82013-04-24 17:12:38 -07004151 def pretty_print(self, q):
4152 q.text("ipv6_dst {")
4153 with q.group():
4154 with q.indent(2):
4155 q.breakable()
4156 q.text("value = ");
4157 q.pp(self.value)
4158 q.breakable()
4159 q.text('}')
4160
Rich Lane7dcdf022013-12-11 14:45:27 -08004161oxm.subtypes[2147497488] = ipv6_dst
4162
4163class ipv6_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004164 type_len = 2147497760
Rich Lanec2ee4b82013-04-24 17:12:38 -07004165
4166 def __init__(self, value=None, value_mask=None):
4167 if value != None:
4168 self.value = value
4169 else:
4170 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
4171 if value_mask != None:
4172 self.value_mask = value_mask
4173 else:
4174 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 -08004175 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004176
4177 def pack(self):
4178 packed = []
4179 packed.append(struct.pack("!L", self.type_len))
4180 packed.append(struct.pack("!16s", self.value))
4181 packed.append(struct.pack("!16s", self.value_mask))
4182 return ''.join(packed)
4183
4184 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004185 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004186 obj = ipv6_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004187 _type_len = reader.read("!L")[0]
4188 assert(_type_len == 2147497760)
Rich Lanec2ee4b82013-04-24 17:12:38 -07004189 obj.value = reader.read('!16s')[0]
4190 obj.value_mask = reader.read('!16s')[0]
4191 return obj
4192
4193 def __eq__(self, other):
4194 if type(self) != type(other): return False
4195 if self.value != other.value: return False
4196 if self.value_mask != other.value_mask: return False
4197 return True
4198
Rich Lanec2ee4b82013-04-24 17:12:38 -07004199 def pretty_print(self, q):
4200 q.text("ipv6_dst_masked {")
4201 with q.group():
4202 with q.indent(2):
4203 q.breakable()
4204 q.text("value = ");
4205 q.pp(self.value)
4206 q.text(","); q.breakable()
4207 q.text("value_mask = ");
4208 q.pp(self.value_mask)
4209 q.breakable()
4210 q.text('}')
4211
Rich Lane7dcdf022013-12-11 14:45:27 -08004212oxm.subtypes[2147497760] = ipv6_dst_masked
4213
Rich Laneccd32ed2014-11-10 17:48:24 -08004214class ipv6_exthdr(oxm):
4215 type_len = 2147503618
4216
4217 def __init__(self, value=None):
4218 if value != None:
4219 self.value = value
4220 else:
4221 self.value = 0
4222 return
4223
4224 def pack(self):
4225 packed = []
4226 packed.append(struct.pack("!L", self.type_len))
4227 packed.append(struct.pack("!H", self.value))
4228 return ''.join(packed)
4229
4230 @staticmethod
4231 def unpack(reader):
4232 obj = ipv6_exthdr()
4233 _type_len = reader.read("!L")[0]
4234 assert(_type_len == 2147503618)
4235 obj.value = reader.read("!H")[0]
4236 return obj
4237
4238 def __eq__(self, other):
4239 if type(self) != type(other): return False
4240 if self.value != other.value: return False
4241 return True
4242
4243 def pretty_print(self, q):
4244 q.text("ipv6_exthdr {")
4245 with q.group():
4246 with q.indent(2):
4247 q.breakable()
4248 q.text("value = ");
4249 q.text("%#x" % self.value)
4250 q.breakable()
4251 q.text('}')
4252
4253oxm.subtypes[2147503618] = ipv6_exthdr
4254
4255class ipv6_exthdr_masked(oxm):
4256 type_len = 2147503876
4257
4258 def __init__(self, value=None, value_mask=None):
4259 if value != None:
4260 self.value = value
4261 else:
4262 self.value = 0
4263 if value_mask != None:
4264 self.value_mask = value_mask
4265 else:
4266 self.value_mask = 0
4267 return
4268
4269 def pack(self):
4270 packed = []
4271 packed.append(struct.pack("!L", self.type_len))
4272 packed.append(struct.pack("!H", self.value))
4273 packed.append(struct.pack("!H", self.value_mask))
4274 return ''.join(packed)
4275
4276 @staticmethod
4277 def unpack(reader):
4278 obj = ipv6_exthdr_masked()
4279 _type_len = reader.read("!L")[0]
4280 assert(_type_len == 2147503876)
4281 obj.value = reader.read("!H")[0]
4282 obj.value_mask = reader.read("!H")[0]
4283 return obj
4284
4285 def __eq__(self, other):
4286 if type(self) != type(other): return False
4287 if self.value != other.value: return False
4288 if self.value_mask != other.value_mask: return False
4289 return True
4290
4291 def pretty_print(self, q):
4292 q.text("ipv6_exthdr_masked {")
4293 with q.group():
4294 with q.indent(2):
4295 q.breakable()
4296 q.text("value = ");
4297 q.text("%#x" % self.value)
4298 q.text(","); q.breakable()
4299 q.text("value_mask = ");
4300 q.text("%#x" % self.value_mask)
4301 q.breakable()
4302 q.text('}')
4303
4304oxm.subtypes[2147503876] = ipv6_exthdr_masked
4305
Rich Lane7dcdf022013-12-11 14:45:27 -08004306class ipv6_flabel(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004307 type_len = 2147497988
Rich Lanec2ee4b82013-04-24 17:12:38 -07004308
4309 def __init__(self, value=None):
4310 if value != None:
4311 self.value = value
4312 else:
4313 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004314 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004315
4316 def pack(self):
4317 packed = []
4318 packed.append(struct.pack("!L", self.type_len))
4319 packed.append(struct.pack("!L", self.value))
4320 return ''.join(packed)
4321
4322 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004323 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004324 obj = ipv6_flabel()
Dan Talaycof6202252013-07-02 01:00:29 -07004325 _type_len = reader.read("!L")[0]
4326 assert(_type_len == 2147497988)
4327 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004328 return obj
4329
4330 def __eq__(self, other):
4331 if type(self) != type(other): return False
4332 if self.value != other.value: return False
4333 return True
4334
Rich Lanec2ee4b82013-04-24 17:12:38 -07004335 def pretty_print(self, q):
4336 q.text("ipv6_flabel {")
4337 with q.group():
4338 with q.indent(2):
4339 q.breakable()
4340 q.text("value = ");
4341 q.text("%#x" % self.value)
4342 q.breakable()
4343 q.text('}')
4344
Rich Lane7dcdf022013-12-11 14:45:27 -08004345oxm.subtypes[2147497988] = ipv6_flabel
4346
4347class ipv6_flabel_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004348 type_len = 2147498248
Rich Lanec2ee4b82013-04-24 17:12:38 -07004349
4350 def __init__(self, value=None, value_mask=None):
4351 if value != None:
4352 self.value = value
4353 else:
4354 self.value = 0
4355 if value_mask != None:
4356 self.value_mask = value_mask
4357 else:
4358 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004359 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004360
4361 def pack(self):
4362 packed = []
4363 packed.append(struct.pack("!L", self.type_len))
4364 packed.append(struct.pack("!L", self.value))
4365 packed.append(struct.pack("!L", self.value_mask))
4366 return ''.join(packed)
4367
4368 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004369 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004370 obj = ipv6_flabel_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004371 _type_len = reader.read("!L")[0]
4372 assert(_type_len == 2147498248)
4373 obj.value = reader.read("!L")[0]
4374 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004375 return obj
4376
4377 def __eq__(self, other):
4378 if type(self) != type(other): return False
4379 if self.value != other.value: return False
4380 if self.value_mask != other.value_mask: return False
4381 return True
4382
Rich Lanec2ee4b82013-04-24 17:12:38 -07004383 def pretty_print(self, q):
4384 q.text("ipv6_flabel_masked {")
4385 with q.group():
4386 with q.indent(2):
4387 q.breakable()
4388 q.text("value = ");
4389 q.text("%#x" % self.value)
4390 q.text(","); q.breakable()
4391 q.text("value_mask = ");
4392 q.text("%#x" % self.value_mask)
4393 q.breakable()
4394 q.text('}')
4395
Rich Lane7dcdf022013-12-11 14:45:27 -08004396oxm.subtypes[2147498248] = ipv6_flabel_masked
4397
4398class ipv6_nd_sll(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004399 type_len = 2147500038
Rich Lanec2ee4b82013-04-24 17:12:38 -07004400
4401 def __init__(self, value=None):
4402 if value != None:
4403 self.value = value
4404 else:
4405 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08004406 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004407
4408 def pack(self):
4409 packed = []
4410 packed.append(struct.pack("!L", self.type_len))
4411 packed.append(struct.pack("!6B", *self.value))
4412 return ''.join(packed)
4413
4414 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004415 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004416 obj = ipv6_nd_sll()
Dan Talaycof6202252013-07-02 01:00:29 -07004417 _type_len = reader.read("!L")[0]
4418 assert(_type_len == 2147500038)
Rich Lanec2ee4b82013-04-24 17:12:38 -07004419 obj.value = list(reader.read('!6B'))
4420 return obj
4421
4422 def __eq__(self, other):
4423 if type(self) != type(other): return False
4424 if self.value != other.value: return False
4425 return True
4426
Rich Lanec2ee4b82013-04-24 17:12:38 -07004427 def pretty_print(self, q):
4428 q.text("ipv6_nd_sll {")
4429 with q.group():
4430 with q.indent(2):
4431 q.breakable()
4432 q.text("value = ");
4433 q.text(util.pretty_mac(self.value))
4434 q.breakable()
4435 q.text('}')
4436
Rich Lane7dcdf022013-12-11 14:45:27 -08004437oxm.subtypes[2147500038] = ipv6_nd_sll
4438
4439class ipv6_nd_sll_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004440 type_len = 2147500300
Rich Lanec2ee4b82013-04-24 17:12:38 -07004441
4442 def __init__(self, value=None, value_mask=None):
4443 if value != None:
4444 self.value = value
4445 else:
4446 self.value = [0,0,0,0,0,0]
4447 if value_mask != None:
4448 self.value_mask = value_mask
4449 else:
4450 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08004451 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004452
4453 def pack(self):
4454 packed = []
4455 packed.append(struct.pack("!L", self.type_len))
4456 packed.append(struct.pack("!6B", *self.value))
4457 packed.append(struct.pack("!6B", *self.value_mask))
4458 return ''.join(packed)
4459
4460 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004461 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004462 obj = ipv6_nd_sll_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004463 _type_len = reader.read("!L")[0]
4464 assert(_type_len == 2147500300)
Rich Lanec2ee4b82013-04-24 17:12:38 -07004465 obj.value = list(reader.read('!6B'))
4466 obj.value_mask = list(reader.read('!6B'))
4467 return obj
4468
4469 def __eq__(self, other):
4470 if type(self) != type(other): return False
4471 if self.value != other.value: return False
4472 if self.value_mask != other.value_mask: return False
4473 return True
4474
Rich Lanec2ee4b82013-04-24 17:12:38 -07004475 def pretty_print(self, q):
4476 q.text("ipv6_nd_sll_masked {")
4477 with q.group():
4478 with q.indent(2):
4479 q.breakable()
4480 q.text("value = ");
4481 q.text(util.pretty_mac(self.value))
4482 q.text(","); q.breakable()
4483 q.text("value_mask = ");
4484 q.text(util.pretty_mac(self.value_mask))
4485 q.breakable()
4486 q.text('}')
4487
Rich Lane7dcdf022013-12-11 14:45:27 -08004488oxm.subtypes[2147500300] = ipv6_nd_sll_masked
4489
4490class ipv6_nd_target(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004491 type_len = 2147499536
Rich Lanec2ee4b82013-04-24 17:12:38 -07004492
4493 def __init__(self, value=None):
4494 if value != None:
4495 self.value = value
4496 else:
4497 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 -08004498 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004499
4500 def pack(self):
4501 packed = []
4502 packed.append(struct.pack("!L", self.type_len))
4503 packed.append(struct.pack("!16s", self.value))
4504 return ''.join(packed)
4505
4506 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004507 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004508 obj = ipv6_nd_target()
Dan Talaycof6202252013-07-02 01:00:29 -07004509 _type_len = reader.read("!L")[0]
4510 assert(_type_len == 2147499536)
Rich Lanec2ee4b82013-04-24 17:12:38 -07004511 obj.value = reader.read('!16s')[0]
4512 return obj
4513
4514 def __eq__(self, other):
4515 if type(self) != type(other): return False
4516 if self.value != other.value: return False
4517 return True
4518
Rich Lanec2ee4b82013-04-24 17:12:38 -07004519 def pretty_print(self, q):
4520 q.text("ipv6_nd_target {")
4521 with q.group():
4522 with q.indent(2):
4523 q.breakable()
4524 q.text("value = ");
4525 q.pp(self.value)
4526 q.breakable()
4527 q.text('}')
4528
Rich Lane7dcdf022013-12-11 14:45:27 -08004529oxm.subtypes[2147499536] = ipv6_nd_target
4530
4531class ipv6_nd_target_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004532 type_len = 2147499808
Rich Lanec2ee4b82013-04-24 17:12:38 -07004533
4534 def __init__(self, value=None, value_mask=None):
4535 if value != None:
4536 self.value = value
4537 else:
4538 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
4539 if value_mask != None:
4540 self.value_mask = value_mask
4541 else:
4542 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 -08004543 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004544
4545 def pack(self):
4546 packed = []
4547 packed.append(struct.pack("!L", self.type_len))
4548 packed.append(struct.pack("!16s", self.value))
4549 packed.append(struct.pack("!16s", self.value_mask))
4550 return ''.join(packed)
4551
4552 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004553 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004554 obj = ipv6_nd_target_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004555 _type_len = reader.read("!L")[0]
4556 assert(_type_len == 2147499808)
Rich Lanec2ee4b82013-04-24 17:12:38 -07004557 obj.value = reader.read('!16s')[0]
4558 obj.value_mask = reader.read('!16s')[0]
4559 return obj
4560
4561 def __eq__(self, other):
4562 if type(self) != type(other): return False
4563 if self.value != other.value: return False
4564 if self.value_mask != other.value_mask: return False
4565 return True
4566
Rich Lanec2ee4b82013-04-24 17:12:38 -07004567 def pretty_print(self, q):
4568 q.text("ipv6_nd_target_masked {")
4569 with q.group():
4570 with q.indent(2):
4571 q.breakable()
4572 q.text("value = ");
4573 q.pp(self.value)
4574 q.text(","); q.breakable()
4575 q.text("value_mask = ");
4576 q.pp(self.value_mask)
4577 q.breakable()
4578 q.text('}')
4579
Rich Lane7dcdf022013-12-11 14:45:27 -08004580oxm.subtypes[2147499808] = ipv6_nd_target_masked
4581
4582class ipv6_nd_tll(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004583 type_len = 2147500550
Rich Lanec2ee4b82013-04-24 17:12:38 -07004584
4585 def __init__(self, value=None):
4586 if value != None:
4587 self.value = value
4588 else:
4589 self.value = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08004590 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004591
4592 def pack(self):
4593 packed = []
4594 packed.append(struct.pack("!L", self.type_len))
4595 packed.append(struct.pack("!6B", *self.value))
4596 return ''.join(packed)
4597
4598 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004599 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004600 obj = ipv6_nd_tll()
Dan Talaycof6202252013-07-02 01:00:29 -07004601 _type_len = reader.read("!L")[0]
4602 assert(_type_len == 2147500550)
Rich Lanec2ee4b82013-04-24 17:12:38 -07004603 obj.value = list(reader.read('!6B'))
4604 return obj
4605
4606 def __eq__(self, other):
4607 if type(self) != type(other): return False
4608 if self.value != other.value: return False
4609 return True
4610
Rich Lanec2ee4b82013-04-24 17:12:38 -07004611 def pretty_print(self, q):
4612 q.text("ipv6_nd_tll {")
4613 with q.group():
4614 with q.indent(2):
4615 q.breakable()
4616 q.text("value = ");
4617 q.text(util.pretty_mac(self.value))
4618 q.breakable()
4619 q.text('}')
4620
Rich Lane7dcdf022013-12-11 14:45:27 -08004621oxm.subtypes[2147500550] = ipv6_nd_tll
4622
4623class ipv6_nd_tll_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004624 type_len = 2147500812
Rich Lanec2ee4b82013-04-24 17:12:38 -07004625
4626 def __init__(self, value=None, value_mask=None):
4627 if value != None:
4628 self.value = value
4629 else:
4630 self.value = [0,0,0,0,0,0]
4631 if value_mask != None:
4632 self.value_mask = value_mask
4633 else:
4634 self.value_mask = [0,0,0,0,0,0]
Rich Lane7dcdf022013-12-11 14:45:27 -08004635 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004636
4637 def pack(self):
4638 packed = []
4639 packed.append(struct.pack("!L", self.type_len))
4640 packed.append(struct.pack("!6B", *self.value))
4641 packed.append(struct.pack("!6B", *self.value_mask))
4642 return ''.join(packed)
4643
4644 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004645 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004646 obj = ipv6_nd_tll_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004647 _type_len = reader.read("!L")[0]
4648 assert(_type_len == 2147500812)
Rich Lanec2ee4b82013-04-24 17:12:38 -07004649 obj.value = list(reader.read('!6B'))
4650 obj.value_mask = list(reader.read('!6B'))
4651 return obj
4652
4653 def __eq__(self, other):
4654 if type(self) != type(other): return False
4655 if self.value != other.value: return False
4656 if self.value_mask != other.value_mask: return False
4657 return True
4658
Rich Lanec2ee4b82013-04-24 17:12:38 -07004659 def pretty_print(self, q):
4660 q.text("ipv6_nd_tll_masked {")
4661 with q.group():
4662 with q.indent(2):
4663 q.breakable()
4664 q.text("value = ");
4665 q.text(util.pretty_mac(self.value))
4666 q.text(","); q.breakable()
4667 q.text("value_mask = ");
4668 q.text(util.pretty_mac(self.value_mask))
4669 q.breakable()
4670 q.text('}')
4671
Rich Lane7dcdf022013-12-11 14:45:27 -08004672oxm.subtypes[2147500812] = ipv6_nd_tll_masked
4673
4674class ipv6_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004675 type_len = 2147496976
Rich Lanec2ee4b82013-04-24 17:12:38 -07004676
4677 def __init__(self, value=None):
4678 if value != None:
4679 self.value = value
4680 else:
4681 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 -08004682 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004683
4684 def pack(self):
4685 packed = []
4686 packed.append(struct.pack("!L", self.type_len))
4687 packed.append(struct.pack("!16s", self.value))
4688 return ''.join(packed)
4689
4690 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004691 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004692 obj = ipv6_src()
Dan Talaycof6202252013-07-02 01:00:29 -07004693 _type_len = reader.read("!L")[0]
4694 assert(_type_len == 2147496976)
Rich Lanec2ee4b82013-04-24 17:12:38 -07004695 obj.value = reader.read('!16s')[0]
4696 return obj
4697
4698 def __eq__(self, other):
4699 if type(self) != type(other): return False
4700 if self.value != other.value: return False
4701 return True
4702
Rich Lanec2ee4b82013-04-24 17:12:38 -07004703 def pretty_print(self, q):
4704 q.text("ipv6_src {")
4705 with q.group():
4706 with q.indent(2):
4707 q.breakable()
4708 q.text("value = ");
4709 q.pp(self.value)
4710 q.breakable()
4711 q.text('}')
4712
Rich Lane7dcdf022013-12-11 14:45:27 -08004713oxm.subtypes[2147496976] = ipv6_src
4714
4715class ipv6_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004716 type_len = 2147497248
Rich Lanec2ee4b82013-04-24 17:12:38 -07004717
4718 def __init__(self, value=None, value_mask=None):
4719 if value != None:
4720 self.value = value
4721 else:
4722 self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
4723 if value_mask != None:
4724 self.value_mask = value_mask
4725 else:
4726 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 -08004727 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004728
4729 def pack(self):
4730 packed = []
4731 packed.append(struct.pack("!L", self.type_len))
4732 packed.append(struct.pack("!16s", self.value))
4733 packed.append(struct.pack("!16s", self.value_mask))
4734 return ''.join(packed)
4735
4736 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004737 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004738 obj = ipv6_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004739 _type_len = reader.read("!L")[0]
4740 assert(_type_len == 2147497248)
Rich Lanec2ee4b82013-04-24 17:12:38 -07004741 obj.value = reader.read('!16s')[0]
4742 obj.value_mask = reader.read('!16s')[0]
4743 return obj
4744
4745 def __eq__(self, other):
4746 if type(self) != type(other): return False
4747 if self.value != other.value: return False
4748 if self.value_mask != other.value_mask: return False
4749 return True
4750
Rich Lanec2ee4b82013-04-24 17:12:38 -07004751 def pretty_print(self, q):
4752 q.text("ipv6_src_masked {")
4753 with q.group():
4754 with q.indent(2):
4755 q.breakable()
4756 q.text("value = ");
4757 q.pp(self.value)
4758 q.text(","); q.breakable()
4759 q.text("value_mask = ");
4760 q.pp(self.value_mask)
4761 q.breakable()
4762 q.text('}')
4763
Rich Lane7dcdf022013-12-11 14:45:27 -08004764oxm.subtypes[2147497248] = ipv6_src_masked
4765
4766class metadata(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004767 type_len = 2147484680
Rich Lanec2ee4b82013-04-24 17:12:38 -07004768
4769 def __init__(self, value=None):
4770 if value != None:
4771 self.value = value
4772 else:
4773 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004774 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004775
4776 def pack(self):
4777 packed = []
4778 packed.append(struct.pack("!L", self.type_len))
4779 packed.append(struct.pack("!Q", self.value))
4780 return ''.join(packed)
4781
4782 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004783 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004784 obj = metadata()
Dan Talaycof6202252013-07-02 01:00:29 -07004785 _type_len = reader.read("!L")[0]
4786 assert(_type_len == 2147484680)
4787 obj.value = reader.read("!Q")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004788 return obj
4789
4790 def __eq__(self, other):
4791 if type(self) != type(other): return False
4792 if self.value != other.value: return False
4793 return True
4794
Rich Lanec2ee4b82013-04-24 17:12:38 -07004795 def pretty_print(self, q):
4796 q.text("metadata {")
4797 with q.group():
4798 with q.indent(2):
4799 q.breakable()
4800 q.text("value = ");
4801 q.text("%#x" % self.value)
4802 q.breakable()
4803 q.text('}')
4804
Rich Lane7dcdf022013-12-11 14:45:27 -08004805oxm.subtypes[2147484680] = metadata
4806
4807class metadata_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004808 type_len = 2147484944
Rich Lanec2ee4b82013-04-24 17:12:38 -07004809
4810 def __init__(self, value=None, value_mask=None):
4811 if value != None:
4812 self.value = value
4813 else:
4814 self.value = 0
4815 if value_mask != None:
4816 self.value_mask = value_mask
4817 else:
4818 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004819 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004820
4821 def pack(self):
4822 packed = []
4823 packed.append(struct.pack("!L", self.type_len))
4824 packed.append(struct.pack("!Q", self.value))
4825 packed.append(struct.pack("!Q", self.value_mask))
4826 return ''.join(packed)
4827
4828 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004829 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004830 obj = metadata_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07004831 _type_len = reader.read("!L")[0]
4832 assert(_type_len == 2147484944)
4833 obj.value = reader.read("!Q")[0]
4834 obj.value_mask = reader.read("!Q")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004835 return obj
4836
4837 def __eq__(self, other):
4838 if type(self) != type(other): return False
4839 if self.value != other.value: return False
4840 if self.value_mask != other.value_mask: return False
4841 return True
4842
Rich Lanec2ee4b82013-04-24 17:12:38 -07004843 def pretty_print(self, q):
4844 q.text("metadata_masked {")
4845 with q.group():
4846 with q.indent(2):
4847 q.breakable()
4848 q.text("value = ");
4849 q.text("%#x" % self.value)
4850 q.text(","); q.breakable()
4851 q.text("value_mask = ");
4852 q.text("%#x" % self.value_mask)
4853 q.breakable()
4854 q.text('}')
4855
Rich Lane7dcdf022013-12-11 14:45:27 -08004856oxm.subtypes[2147484944] = metadata_masked
4857
Harshmeet Singh1db46332014-10-14 16:29:13 -07004858class mpls_bos(oxm):
4859 type_len = 2147502081
4860
4861 def __init__(self, value=None):
4862 if value != None:
4863 self.value = value
4864 else:
4865 self.value = 0
4866 return
4867
4868 def pack(self):
4869 packed = []
4870 packed.append(struct.pack("!L", self.type_len))
4871 packed.append(struct.pack("!B", self.value))
4872 return ''.join(packed)
4873
4874 @staticmethod
4875 def unpack(reader):
4876 obj = mpls_bos()
4877 _type_len = reader.read("!L")[0]
4878 assert(_type_len == 2147502081)
4879 obj.value = reader.read("!B")[0]
4880 return obj
4881
4882 def __eq__(self, other):
4883 if type(self) != type(other): return False
4884 if self.value != other.value: return False
4885 return True
4886
4887 def pretty_print(self, q):
4888 q.text("mpls_bos {")
4889 with q.group():
4890 with q.indent(2):
4891 q.breakable()
4892 q.text("value = ");
4893 q.text("%#x" % self.value)
4894 q.breakable()
4895 q.text('}')
4896
4897oxm.subtypes[2147502081] = mpls_bos
4898
4899class mpls_bos_masked(oxm):
4900 type_len = 2147502338
4901
4902 def __init__(self, value=None, value_mask=None):
4903 if value != None:
4904 self.value = value
4905 else:
4906 self.value = 0
4907 if value_mask != None:
4908 self.value_mask = value_mask
4909 else:
4910 self.value_mask = 0
4911 return
4912
4913 def pack(self):
4914 packed = []
4915 packed.append(struct.pack("!L", self.type_len))
4916 packed.append(struct.pack("!B", self.value))
4917 packed.append(struct.pack("!B", self.value_mask))
4918 return ''.join(packed)
4919
4920 @staticmethod
4921 def unpack(reader):
4922 obj = mpls_bos_masked()
4923 _type_len = reader.read("!L")[0]
4924 assert(_type_len == 2147502338)
4925 obj.value = reader.read("!B")[0]
4926 obj.value_mask = reader.read("!B")[0]
4927 return obj
4928
4929 def __eq__(self, other):
4930 if type(self) != type(other): return False
4931 if self.value != other.value: return False
4932 if self.value_mask != other.value_mask: return False
4933 return True
4934
4935 def pretty_print(self, q):
4936 q.text("mpls_bos_masked {")
4937 with q.group():
4938 with q.indent(2):
4939 q.breakable()
4940 q.text("value = ");
4941 q.text("%#x" % self.value)
4942 q.text(","); q.breakable()
4943 q.text("value_mask = ");
4944 q.text("%#x" % self.value_mask)
4945 q.breakable()
4946 q.text('}')
4947
4948oxm.subtypes[2147502338] = mpls_bos_masked
4949
Rich Lane7dcdf022013-12-11 14:45:27 -08004950class mpls_label(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004951 type_len = 2147501060
Rich Lanec2ee4b82013-04-24 17:12:38 -07004952
4953 def __init__(self, value=None):
4954 if value != None:
4955 self.value = value
4956 else:
4957 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08004958 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07004959
4960 def pack(self):
4961 packed = []
4962 packed.append(struct.pack("!L", self.type_len))
4963 packed.append(struct.pack("!L", self.value))
4964 return ''.join(packed)
4965
4966 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08004967 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07004968 obj = mpls_label()
Dan Talaycof6202252013-07-02 01:00:29 -07004969 _type_len = reader.read("!L")[0]
4970 assert(_type_len == 2147501060)
4971 obj.value = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07004972 return obj
4973
4974 def __eq__(self, other):
4975 if type(self) != type(other): return False
4976 if self.value != other.value: return False
4977 return True
4978
Rich Lanec2ee4b82013-04-24 17:12:38 -07004979 def pretty_print(self, q):
4980 q.text("mpls_label {")
4981 with q.group():
4982 with q.indent(2):
4983 q.breakable()
4984 q.text("value = ");
4985 q.text("%#x" % self.value)
4986 q.breakable()
4987 q.text('}')
4988
Rich Lane7dcdf022013-12-11 14:45:27 -08004989oxm.subtypes[2147501060] = mpls_label
4990
4991class mpls_label_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07004992 type_len = 2147501320
Rich Lanec2ee4b82013-04-24 17:12:38 -07004993
4994 def __init__(self, value=None, value_mask=None):
4995 if value != None:
4996 self.value = value
4997 else:
4998 self.value = 0
4999 if value_mask != None:
5000 self.value_mask = value_mask
5001 else:
5002 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005003 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005004
5005 def pack(self):
5006 packed = []
5007 packed.append(struct.pack("!L", self.type_len))
5008 packed.append(struct.pack("!L", self.value))
5009 packed.append(struct.pack("!L", self.value_mask))
5010 return ''.join(packed)
5011
5012 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005013 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005014 obj = mpls_label_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07005015 _type_len = reader.read("!L")[0]
5016 assert(_type_len == 2147501320)
5017 obj.value = reader.read("!L")[0]
5018 obj.value_mask = reader.read("!L")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005019 return obj
5020
5021 def __eq__(self, other):
5022 if type(self) != type(other): return False
5023 if self.value != other.value: return False
5024 if self.value_mask != other.value_mask: return False
5025 return True
5026
Rich Lanec2ee4b82013-04-24 17:12:38 -07005027 def pretty_print(self, q):
5028 q.text("mpls_label_masked {")
5029 with q.group():
5030 with q.indent(2):
5031 q.breakable()
5032 q.text("value = ");
5033 q.text("%#x" % self.value)
5034 q.text(","); q.breakable()
5035 q.text("value_mask = ");
5036 q.text("%#x" % self.value_mask)
5037 q.breakable()
5038 q.text('}')
5039
Rich Lane7dcdf022013-12-11 14:45:27 -08005040oxm.subtypes[2147501320] = mpls_label_masked
5041
5042class mpls_tc(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07005043 type_len = 2147501569
Rich Lanec2ee4b82013-04-24 17:12:38 -07005044
5045 def __init__(self, value=None):
5046 if value != None:
5047 self.value = value
5048 else:
5049 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005050 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005051
5052 def pack(self):
5053 packed = []
5054 packed.append(struct.pack("!L", self.type_len))
5055 packed.append(struct.pack("!B", self.value))
5056 return ''.join(packed)
5057
5058 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005059 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005060 obj = mpls_tc()
Dan Talaycof6202252013-07-02 01:00:29 -07005061 _type_len = reader.read("!L")[0]
5062 assert(_type_len == 2147501569)
5063 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005064 return obj
5065
5066 def __eq__(self, other):
5067 if type(self) != type(other): return False
5068 if self.value != other.value: return False
5069 return True
5070
Rich Lanec2ee4b82013-04-24 17:12:38 -07005071 def pretty_print(self, q):
5072 q.text("mpls_tc {")
5073 with q.group():
5074 with q.indent(2):
5075 q.breakable()
5076 q.text("value = ");
5077 q.text("%#x" % self.value)
5078 q.breakable()
5079 q.text('}')
5080
Rich Lane7dcdf022013-12-11 14:45:27 -08005081oxm.subtypes[2147501569] = mpls_tc
5082
5083class mpls_tc_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07005084 type_len = 2147501826
Rich Lanec2ee4b82013-04-24 17:12:38 -07005085
5086 def __init__(self, value=None, value_mask=None):
5087 if value != None:
5088 self.value = value
5089 else:
5090 self.value = 0
5091 if value_mask != None:
5092 self.value_mask = value_mask
5093 else:
5094 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005095 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005096
5097 def pack(self):
5098 packed = []
5099 packed.append(struct.pack("!L", self.type_len))
5100 packed.append(struct.pack("!B", self.value))
5101 packed.append(struct.pack("!B", self.value_mask))
5102 return ''.join(packed)
5103
5104 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005105 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005106 obj = mpls_tc_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07005107 _type_len = reader.read("!L")[0]
5108 assert(_type_len == 2147501826)
5109 obj.value = reader.read("!B")[0]
5110 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005111 return obj
5112
5113 def __eq__(self, other):
5114 if type(self) != type(other): return False
5115 if self.value != other.value: return False
5116 if self.value_mask != other.value_mask: return False
5117 return True
5118
Rich Lanec2ee4b82013-04-24 17:12:38 -07005119 def pretty_print(self, q):
5120 q.text("mpls_tc_masked {")
5121 with q.group():
5122 with q.indent(2):
5123 q.breakable()
5124 q.text("value = ");
5125 q.text("%#x" % self.value)
5126 q.text(","); q.breakable()
5127 q.text("value_mask = ");
5128 q.text("%#x" % self.value_mask)
5129 q.breakable()
5130 q.text('}')
5131
Rich Lane7dcdf022013-12-11 14:45:27 -08005132oxm.subtypes[2147501826] = mpls_tc_masked
5133
5134class sctp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07005135 type_len = 2147492866
Rich Lanec2ee4b82013-04-24 17:12:38 -07005136
5137 def __init__(self, value=None):
5138 if value != None:
5139 self.value = value
5140 else:
5141 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005142 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005143
5144 def pack(self):
5145 packed = []
5146 packed.append(struct.pack("!L", self.type_len))
5147 packed.append(struct.pack("!H", self.value))
5148 return ''.join(packed)
5149
5150 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005151 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005152 obj = sctp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07005153 _type_len = reader.read("!L")[0]
5154 assert(_type_len == 2147492866)
5155 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005156 return obj
5157
5158 def __eq__(self, other):
5159 if type(self) != type(other): return False
5160 if self.value != other.value: return False
5161 return True
5162
Rich Lanec2ee4b82013-04-24 17:12:38 -07005163 def pretty_print(self, q):
5164 q.text("sctp_dst {")
5165 with q.group():
5166 with q.indent(2):
5167 q.breakable()
5168 q.text("value = ");
5169 q.text("%#x" % self.value)
5170 q.breakable()
5171 q.text('}')
5172
Rich Lane7dcdf022013-12-11 14:45:27 -08005173oxm.subtypes[2147492866] = sctp_dst
5174
5175class sctp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07005176 type_len = 2147493124
Rich Lanec2ee4b82013-04-24 17:12:38 -07005177
5178 def __init__(self, value=None, value_mask=None):
5179 if value != None:
5180 self.value = value
5181 else:
5182 self.value = 0
5183 if value_mask != None:
5184 self.value_mask = value_mask
5185 else:
5186 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005187 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005188
5189 def pack(self):
5190 packed = []
5191 packed.append(struct.pack("!L", self.type_len))
5192 packed.append(struct.pack("!H", self.value))
5193 packed.append(struct.pack("!H", self.value_mask))
5194 return ''.join(packed)
5195
5196 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005197 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005198 obj = sctp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07005199 _type_len = reader.read("!L")[0]
5200 assert(_type_len == 2147493124)
5201 obj.value = reader.read("!H")[0]
5202 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005203 return obj
5204
5205 def __eq__(self, other):
5206 if type(self) != type(other): return False
5207 if self.value != other.value: return False
5208 if self.value_mask != other.value_mask: return False
5209 return True
5210
Rich Lanec2ee4b82013-04-24 17:12:38 -07005211 def pretty_print(self, q):
5212 q.text("sctp_dst_masked {")
5213 with q.group():
5214 with q.indent(2):
5215 q.breakable()
5216 q.text("value = ");
5217 q.text("%#x" % self.value)
5218 q.text(","); q.breakable()
5219 q.text("value_mask = ");
5220 q.text("%#x" % self.value_mask)
5221 q.breakable()
5222 q.text('}')
5223
Rich Lane7dcdf022013-12-11 14:45:27 -08005224oxm.subtypes[2147493124] = sctp_dst_masked
5225
5226class sctp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07005227 type_len = 2147492354
Rich Lanec2ee4b82013-04-24 17:12:38 -07005228
5229 def __init__(self, value=None):
5230 if value != None:
5231 self.value = value
5232 else:
5233 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005234 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005235
5236 def pack(self):
5237 packed = []
5238 packed.append(struct.pack("!L", self.type_len))
5239 packed.append(struct.pack("!H", self.value))
5240 return ''.join(packed)
5241
5242 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005243 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005244 obj = sctp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07005245 _type_len = reader.read("!L")[0]
5246 assert(_type_len == 2147492354)
5247 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005248 return obj
5249
5250 def __eq__(self, other):
5251 if type(self) != type(other): return False
5252 if self.value != other.value: return False
5253 return True
5254
Rich Lanec2ee4b82013-04-24 17:12:38 -07005255 def pretty_print(self, q):
5256 q.text("sctp_src {")
5257 with q.group():
5258 with q.indent(2):
5259 q.breakable()
5260 q.text("value = ");
5261 q.text("%#x" % self.value)
5262 q.breakable()
5263 q.text('}')
5264
Rich Lane7dcdf022013-12-11 14:45:27 -08005265oxm.subtypes[2147492354] = sctp_src
5266
5267class sctp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07005268 type_len = 2147492612
Rich Lanec2ee4b82013-04-24 17:12:38 -07005269
5270 def __init__(self, value=None, value_mask=None):
5271 if value != None:
5272 self.value = value
5273 else:
5274 self.value = 0
5275 if value_mask != None:
5276 self.value_mask = value_mask
5277 else:
5278 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005279 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005280
5281 def pack(self):
5282 packed = []
5283 packed.append(struct.pack("!L", self.type_len))
5284 packed.append(struct.pack("!H", self.value))
5285 packed.append(struct.pack("!H", self.value_mask))
5286 return ''.join(packed)
5287
5288 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005289 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005290 obj = sctp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07005291 _type_len = reader.read("!L")[0]
5292 assert(_type_len == 2147492612)
5293 obj.value = reader.read("!H")[0]
5294 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005295 return obj
5296
5297 def __eq__(self, other):
5298 if type(self) != type(other): return False
5299 if self.value != other.value: return False
5300 if self.value_mask != other.value_mask: return False
5301 return True
5302
Rich Lanec2ee4b82013-04-24 17:12:38 -07005303 def pretty_print(self, q):
5304 q.text("sctp_src_masked {")
5305 with q.group():
5306 with q.indent(2):
5307 q.breakable()
5308 q.text("value = ");
5309 q.text("%#x" % self.value)
5310 q.text(","); q.breakable()
5311 q.text("value_mask = ");
5312 q.text("%#x" % self.value_mask)
5313 q.breakable()
5314 q.text('}')
5315
Rich Lane7dcdf022013-12-11 14:45:27 -08005316oxm.subtypes[2147492612] = sctp_src_masked
5317
5318class tcp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07005319 type_len = 2147490818
Rich Lanec2ee4b82013-04-24 17:12:38 -07005320
5321 def __init__(self, value=None):
5322 if value != None:
5323 self.value = value
5324 else:
5325 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005326 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005327
5328 def pack(self):
5329 packed = []
5330 packed.append(struct.pack("!L", self.type_len))
5331 packed.append(struct.pack("!H", self.value))
5332 return ''.join(packed)
5333
5334 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005335 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005336 obj = tcp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07005337 _type_len = reader.read("!L")[0]
5338 assert(_type_len == 2147490818)
5339 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005340 return obj
5341
5342 def __eq__(self, other):
5343 if type(self) != type(other): return False
5344 if self.value != other.value: return False
5345 return True
5346
Rich Lanec2ee4b82013-04-24 17:12:38 -07005347 def pretty_print(self, q):
5348 q.text("tcp_dst {")
5349 with q.group():
5350 with q.indent(2):
5351 q.breakable()
5352 q.text("value = ");
5353 q.text("%#x" % self.value)
5354 q.breakable()
5355 q.text('}')
5356
Rich Lane7dcdf022013-12-11 14:45:27 -08005357oxm.subtypes[2147490818] = tcp_dst
5358
5359class tcp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07005360 type_len = 2147491076
Rich Lanec2ee4b82013-04-24 17:12:38 -07005361
5362 def __init__(self, value=None, value_mask=None):
5363 if value != None:
5364 self.value = value
5365 else:
5366 self.value = 0
5367 if value_mask != None:
5368 self.value_mask = value_mask
5369 else:
5370 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005371 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005372
5373 def pack(self):
5374 packed = []
5375 packed.append(struct.pack("!L", self.type_len))
5376 packed.append(struct.pack("!H", self.value))
5377 packed.append(struct.pack("!H", self.value_mask))
5378 return ''.join(packed)
5379
5380 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005381 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005382 obj = tcp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07005383 _type_len = reader.read("!L")[0]
5384 assert(_type_len == 2147491076)
5385 obj.value = reader.read("!H")[0]
5386 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005387 return obj
5388
5389 def __eq__(self, other):
5390 if type(self) != type(other): return False
5391 if self.value != other.value: return False
5392 if self.value_mask != other.value_mask: return False
5393 return True
5394
Rich Lanec2ee4b82013-04-24 17:12:38 -07005395 def pretty_print(self, q):
5396 q.text("tcp_dst_masked {")
5397 with q.group():
5398 with q.indent(2):
5399 q.breakable()
5400 q.text("value = ");
5401 q.text("%#x" % self.value)
5402 q.text(","); q.breakable()
5403 q.text("value_mask = ");
5404 q.text("%#x" % self.value_mask)
5405 q.breakable()
5406 q.text('}')
5407
Rich Lane7dcdf022013-12-11 14:45:27 -08005408oxm.subtypes[2147491076] = tcp_dst_masked
5409
5410class tcp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07005411 type_len = 2147490306
Rich Lanec2ee4b82013-04-24 17:12:38 -07005412
5413 def __init__(self, value=None):
5414 if value != None:
5415 self.value = value
5416 else:
5417 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005418 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005419
5420 def pack(self):
5421 packed = []
5422 packed.append(struct.pack("!L", self.type_len))
5423 packed.append(struct.pack("!H", self.value))
5424 return ''.join(packed)
5425
5426 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005427 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005428 obj = tcp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07005429 _type_len = reader.read("!L")[0]
5430 assert(_type_len == 2147490306)
5431 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005432 return obj
5433
5434 def __eq__(self, other):
5435 if type(self) != type(other): return False
5436 if self.value != other.value: return False
5437 return True
5438
Rich Lanec2ee4b82013-04-24 17:12:38 -07005439 def pretty_print(self, q):
5440 q.text("tcp_src {")
5441 with q.group():
5442 with q.indent(2):
5443 q.breakable()
5444 q.text("value = ");
5445 q.text("%#x" % self.value)
5446 q.breakable()
5447 q.text('}')
5448
Rich Lane7dcdf022013-12-11 14:45:27 -08005449oxm.subtypes[2147490306] = tcp_src
5450
5451class tcp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07005452 type_len = 2147490564
Rich Lanec2ee4b82013-04-24 17:12:38 -07005453
5454 def __init__(self, value=None, value_mask=None):
5455 if value != None:
5456 self.value = value
5457 else:
5458 self.value = 0
5459 if value_mask != None:
5460 self.value_mask = value_mask
5461 else:
5462 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005463 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005464
5465 def pack(self):
5466 packed = []
5467 packed.append(struct.pack("!L", self.type_len))
5468 packed.append(struct.pack("!H", self.value))
5469 packed.append(struct.pack("!H", self.value_mask))
5470 return ''.join(packed)
5471
5472 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005473 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005474 obj = tcp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07005475 _type_len = reader.read("!L")[0]
5476 assert(_type_len == 2147490564)
5477 obj.value = reader.read("!H")[0]
5478 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005479 return obj
5480
5481 def __eq__(self, other):
5482 if type(self) != type(other): return False
5483 if self.value != other.value: return False
5484 if self.value_mask != other.value_mask: return False
5485 return True
5486
Rich Lanec2ee4b82013-04-24 17:12:38 -07005487 def pretty_print(self, q):
5488 q.text("tcp_src_masked {")
5489 with q.group():
5490 with q.indent(2):
5491 q.breakable()
5492 q.text("value = ");
5493 q.text("%#x" % self.value)
5494 q.text(","); q.breakable()
5495 q.text("value_mask = ");
5496 q.text("%#x" % self.value_mask)
5497 q.breakable()
5498 q.text('}')
5499
Rich Lane7dcdf022013-12-11 14:45:27 -08005500oxm.subtypes[2147490564] = tcp_src_masked
5501
Rich Lane5587ab12014-06-30 11:19:09 -07005502class tunnel_id(oxm):
5503 type_len = 2147503112
5504
5505 def __init__(self, value=None):
5506 if value != None:
5507 self.value = value
5508 else:
5509 self.value = 0
5510 return
5511
5512 def pack(self):
5513 packed = []
5514 packed.append(struct.pack("!L", self.type_len))
5515 packed.append(struct.pack("!Q", self.value))
5516 return ''.join(packed)
5517
5518 @staticmethod
5519 def unpack(reader):
5520 obj = tunnel_id()
5521 _type_len = reader.read("!L")[0]
5522 assert(_type_len == 2147503112)
5523 obj.value = reader.read("!Q")[0]
5524 return obj
5525
5526 def __eq__(self, other):
5527 if type(self) != type(other): return False
5528 if self.value != other.value: return False
5529 return True
5530
5531 def pretty_print(self, q):
5532 q.text("tunnel_id {")
5533 with q.group():
5534 with q.indent(2):
5535 q.breakable()
5536 q.text("value = ");
5537 q.text("%#x" % self.value)
5538 q.breakable()
5539 q.text('}')
5540
5541oxm.subtypes[2147503112] = tunnel_id
5542
5543class tunnel_id_masked(oxm):
5544 type_len = 2147503376
5545
5546 def __init__(self, value=None, value_mask=None):
5547 if value != None:
5548 self.value = value
5549 else:
5550 self.value = 0
5551 if value_mask != None:
5552 self.value_mask = value_mask
5553 else:
5554 self.value_mask = 0
5555 return
5556
5557 def pack(self):
5558 packed = []
5559 packed.append(struct.pack("!L", self.type_len))
5560 packed.append(struct.pack("!Q", self.value))
5561 packed.append(struct.pack("!Q", self.value_mask))
5562 return ''.join(packed)
5563
5564 @staticmethod
5565 def unpack(reader):
5566 obj = tunnel_id_masked()
5567 _type_len = reader.read("!L")[0]
5568 assert(_type_len == 2147503376)
5569 obj.value = reader.read("!Q")[0]
5570 obj.value_mask = reader.read("!Q")[0]
5571 return obj
5572
5573 def __eq__(self, other):
5574 if type(self) != type(other): return False
5575 if self.value != other.value: return False
5576 if self.value_mask != other.value_mask: return False
5577 return True
5578
5579 def pretty_print(self, q):
5580 q.text("tunnel_id_masked {")
5581 with q.group():
5582 with q.indent(2):
5583 q.breakable()
5584 q.text("value = ");
5585 q.text("%#x" % self.value)
5586 q.text(","); q.breakable()
5587 q.text("value_mask = ");
5588 q.text("%#x" % self.value_mask)
5589 q.breakable()
5590 q.text('}')
5591
5592oxm.subtypes[2147503376] = tunnel_id_masked
5593
Harshmeet Singh301f7172014-12-08 13:07:29 -08005594class tunnel_ipv4_dst(oxm):
5595 type_len = 81924
5596
5597 def __init__(self, value=None):
5598 if value != None:
5599 self.value = value
5600 else:
5601 self.value = 0
5602 return
5603
5604 def pack(self):
5605 packed = []
5606 packed.append(struct.pack("!L", self.type_len))
5607 packed.append(struct.pack("!L", self.value))
5608 return ''.join(packed)
5609
5610 @staticmethod
5611 def unpack(reader):
5612 obj = tunnel_ipv4_dst()
5613 _type_len = reader.read("!L")[0]
5614 assert(_type_len == 81924)
5615 obj.value = reader.read("!L")[0]
5616 return obj
5617
5618 def __eq__(self, other):
5619 if type(self) != type(other): return False
5620 if self.value != other.value: return False
5621 return True
5622
5623 def pretty_print(self, q):
5624 q.text("tunnel_ipv4_dst {")
5625 with q.group():
5626 with q.indent(2):
5627 q.breakable()
5628 q.text("value = ");
5629 q.text(util.pretty_ipv4(self.value))
5630 q.breakable()
5631 q.text('}')
5632
5633oxm.subtypes[81924] = tunnel_ipv4_dst
5634
5635class tunnel_ipv4_dst_masked(oxm):
5636 type_len = 82184
5637
5638 def __init__(self, value=None, value_mask=None):
5639 if value != None:
5640 self.value = value
5641 else:
5642 self.value = 0
5643 if value_mask != None:
5644 self.value_mask = value_mask
5645 else:
5646 self.value_mask = 0
5647 return
5648
5649 def pack(self):
5650 packed = []
5651 packed.append(struct.pack("!L", self.type_len))
5652 packed.append(struct.pack("!L", self.value))
5653 packed.append(struct.pack("!L", self.value_mask))
5654 return ''.join(packed)
5655
5656 @staticmethod
5657 def unpack(reader):
5658 obj = tunnel_ipv4_dst_masked()
5659 _type_len = reader.read("!L")[0]
5660 assert(_type_len == 82184)
5661 obj.value = reader.read("!L")[0]
5662 obj.value_mask = reader.read("!L")[0]
5663 return obj
5664
5665 def __eq__(self, other):
5666 if type(self) != type(other): return False
5667 if self.value != other.value: return False
5668 if self.value_mask != other.value_mask: return False
5669 return True
5670
5671 def pretty_print(self, q):
5672 q.text("tunnel_ipv4_dst_masked {")
5673 with q.group():
5674 with q.indent(2):
5675 q.breakable()
5676 q.text("value = ");
5677 q.text(util.pretty_ipv4(self.value))
5678 q.text(","); q.breakable()
5679 q.text("value_mask = ");
5680 q.text(util.pretty_ipv4(self.value_mask))
5681 q.breakable()
5682 q.text('}')
5683
5684oxm.subtypes[82184] = tunnel_ipv4_dst_masked
5685
5686class tunnel_ipv4_src(oxm):
5687 type_len = 81412
5688
5689 def __init__(self, value=None):
5690 if value != None:
5691 self.value = value
5692 else:
5693 self.value = 0
5694 return
5695
5696 def pack(self):
5697 packed = []
5698 packed.append(struct.pack("!L", self.type_len))
5699 packed.append(struct.pack("!L", self.value))
5700 return ''.join(packed)
5701
5702 @staticmethod
5703 def unpack(reader):
5704 obj = tunnel_ipv4_src()
5705 _type_len = reader.read("!L")[0]
5706 assert(_type_len == 81412)
5707 obj.value = reader.read("!L")[0]
5708 return obj
5709
5710 def __eq__(self, other):
5711 if type(self) != type(other): return False
5712 if self.value != other.value: return False
5713 return True
5714
5715 def pretty_print(self, q):
5716 q.text("tunnel_ipv4_src {")
5717 with q.group():
5718 with q.indent(2):
5719 q.breakable()
5720 q.text("value = ");
5721 q.text(util.pretty_ipv4(self.value))
5722 q.breakable()
5723 q.text('}')
5724
5725oxm.subtypes[81412] = tunnel_ipv4_src
5726
5727class tunnel_ipv4_src_masked(oxm):
5728 type_len = 81672
5729
5730 def __init__(self, value=None, value_mask=None):
5731 if value != None:
5732 self.value = value
5733 else:
5734 self.value = 0
5735 if value_mask != None:
5736 self.value_mask = value_mask
5737 else:
5738 self.value_mask = 0
5739 return
5740
5741 def pack(self):
5742 packed = []
5743 packed.append(struct.pack("!L", self.type_len))
5744 packed.append(struct.pack("!L", self.value))
5745 packed.append(struct.pack("!L", self.value_mask))
5746 return ''.join(packed)
5747
5748 @staticmethod
5749 def unpack(reader):
5750 obj = tunnel_ipv4_src_masked()
5751 _type_len = reader.read("!L")[0]
5752 assert(_type_len == 81672)
5753 obj.value = reader.read("!L")[0]
5754 obj.value_mask = reader.read("!L")[0]
5755 return obj
5756
5757 def __eq__(self, other):
5758 if type(self) != type(other): return False
5759 if self.value != other.value: return False
5760 if self.value_mask != other.value_mask: return False
5761 return True
5762
5763 def pretty_print(self, q):
5764 q.text("tunnel_ipv4_src_masked {")
5765 with q.group():
5766 with q.indent(2):
5767 q.breakable()
5768 q.text("value = ");
5769 q.text(util.pretty_ipv4(self.value))
5770 q.text(","); q.breakable()
5771 q.text("value_mask = ");
5772 q.text(util.pretty_ipv4(self.value_mask))
5773 q.breakable()
5774 q.text('}')
5775
5776oxm.subtypes[81672] = tunnel_ipv4_src_masked
5777
Rich Lane7dcdf022013-12-11 14:45:27 -08005778class udp_dst(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07005779 type_len = 2147491842
Rich Lanec2ee4b82013-04-24 17:12:38 -07005780
5781 def __init__(self, value=None):
5782 if value != None:
5783 self.value = value
5784 else:
5785 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005786 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005787
5788 def pack(self):
5789 packed = []
5790 packed.append(struct.pack("!L", self.type_len))
5791 packed.append(struct.pack("!H", self.value))
5792 return ''.join(packed)
5793
5794 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005795 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005796 obj = udp_dst()
Dan Talaycof6202252013-07-02 01:00:29 -07005797 _type_len = reader.read("!L")[0]
5798 assert(_type_len == 2147491842)
5799 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005800 return obj
5801
5802 def __eq__(self, other):
5803 if type(self) != type(other): return False
5804 if self.value != other.value: return False
5805 return True
5806
Rich Lanec2ee4b82013-04-24 17:12:38 -07005807 def pretty_print(self, q):
5808 q.text("udp_dst {")
5809 with q.group():
5810 with q.indent(2):
5811 q.breakable()
5812 q.text("value = ");
5813 q.text("%#x" % self.value)
5814 q.breakable()
5815 q.text('}')
5816
Rich Lane7dcdf022013-12-11 14:45:27 -08005817oxm.subtypes[2147491842] = udp_dst
5818
5819class udp_dst_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07005820 type_len = 2147492100
Rich Lanec2ee4b82013-04-24 17:12:38 -07005821
5822 def __init__(self, value=None, value_mask=None):
5823 if value != None:
5824 self.value = value
5825 else:
5826 self.value = 0
5827 if value_mask != None:
5828 self.value_mask = value_mask
5829 else:
5830 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005831 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005832
5833 def pack(self):
5834 packed = []
5835 packed.append(struct.pack("!L", self.type_len))
5836 packed.append(struct.pack("!H", self.value))
5837 packed.append(struct.pack("!H", self.value_mask))
5838 return ''.join(packed)
5839
5840 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005841 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005842 obj = udp_dst_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07005843 _type_len = reader.read("!L")[0]
5844 assert(_type_len == 2147492100)
5845 obj.value = reader.read("!H")[0]
5846 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005847 return obj
5848
5849 def __eq__(self, other):
5850 if type(self) != type(other): return False
5851 if self.value != other.value: return False
5852 if self.value_mask != other.value_mask: return False
5853 return True
5854
Rich Lanec2ee4b82013-04-24 17:12:38 -07005855 def pretty_print(self, q):
5856 q.text("udp_dst_masked {")
5857 with q.group():
5858 with q.indent(2):
5859 q.breakable()
5860 q.text("value = ");
5861 q.text("%#x" % self.value)
5862 q.text(","); q.breakable()
5863 q.text("value_mask = ");
5864 q.text("%#x" % self.value_mask)
5865 q.breakable()
5866 q.text('}')
5867
Rich Lane7dcdf022013-12-11 14:45:27 -08005868oxm.subtypes[2147492100] = udp_dst_masked
5869
5870class udp_src(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07005871 type_len = 2147491330
Rich Lanec2ee4b82013-04-24 17:12:38 -07005872
5873 def __init__(self, value=None):
5874 if value != None:
5875 self.value = value
5876 else:
5877 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005878 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005879
5880 def pack(self):
5881 packed = []
5882 packed.append(struct.pack("!L", self.type_len))
5883 packed.append(struct.pack("!H", self.value))
5884 return ''.join(packed)
5885
5886 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005887 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005888 obj = udp_src()
Dan Talaycof6202252013-07-02 01:00:29 -07005889 _type_len = reader.read("!L")[0]
5890 assert(_type_len == 2147491330)
5891 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005892 return obj
5893
5894 def __eq__(self, other):
5895 if type(self) != type(other): return False
5896 if self.value != other.value: return False
5897 return True
5898
Rich Lanec2ee4b82013-04-24 17:12:38 -07005899 def pretty_print(self, q):
5900 q.text("udp_src {")
5901 with q.group():
5902 with q.indent(2):
5903 q.breakable()
5904 q.text("value = ");
5905 q.text("%#x" % self.value)
5906 q.breakable()
5907 q.text('}')
5908
Rich Lane7dcdf022013-12-11 14:45:27 -08005909oxm.subtypes[2147491330] = udp_src
5910
5911class udp_src_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07005912 type_len = 2147491588
Rich Lanec2ee4b82013-04-24 17:12:38 -07005913
5914 def __init__(self, value=None, value_mask=None):
5915 if value != None:
5916 self.value = value
5917 else:
5918 self.value = 0
5919 if value_mask != None:
5920 self.value_mask = value_mask
5921 else:
5922 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005923 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005924
5925 def pack(self):
5926 packed = []
5927 packed.append(struct.pack("!L", self.type_len))
5928 packed.append(struct.pack("!H", self.value))
5929 packed.append(struct.pack("!H", self.value_mask))
5930 return ''.join(packed)
5931
5932 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005933 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005934 obj = udp_src_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07005935 _type_len = reader.read("!L")[0]
5936 assert(_type_len == 2147491588)
5937 obj.value = reader.read("!H")[0]
5938 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005939 return obj
5940
5941 def __eq__(self, other):
5942 if type(self) != type(other): return False
5943 if self.value != other.value: return False
5944 if self.value_mask != other.value_mask: return False
5945 return True
5946
Rich Lanec2ee4b82013-04-24 17:12:38 -07005947 def pretty_print(self, q):
5948 q.text("udp_src_masked {")
5949 with q.group():
5950 with q.indent(2):
5951 q.breakable()
5952 q.text("value = ");
5953 q.text("%#x" % self.value)
5954 q.text(","); q.breakable()
5955 q.text("value_mask = ");
5956 q.text("%#x" % self.value_mask)
5957 q.breakable()
5958 q.text('}')
5959
Rich Lane7dcdf022013-12-11 14:45:27 -08005960oxm.subtypes[2147491588] = udp_src_masked
5961
5962class vlan_pcp(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07005963 type_len = 2147487233
Rich Lanec2ee4b82013-04-24 17:12:38 -07005964
5965 def __init__(self, value=None):
5966 if value != None:
5967 self.value = value
5968 else:
5969 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08005970 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07005971
5972 def pack(self):
5973 packed = []
5974 packed.append(struct.pack("!L", self.type_len))
5975 packed.append(struct.pack("!B", self.value))
5976 return ''.join(packed)
5977
5978 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08005979 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07005980 obj = vlan_pcp()
Dan Talaycof6202252013-07-02 01:00:29 -07005981 _type_len = reader.read("!L")[0]
5982 assert(_type_len == 2147487233)
5983 obj.value = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07005984 return obj
5985
5986 def __eq__(self, other):
5987 if type(self) != type(other): return False
5988 if self.value != other.value: return False
5989 return True
5990
Rich Lanec2ee4b82013-04-24 17:12:38 -07005991 def pretty_print(self, q):
5992 q.text("vlan_pcp {")
5993 with q.group():
5994 with q.indent(2):
5995 q.breakable()
5996 q.text("value = ");
5997 q.text("%#x" % self.value)
5998 q.breakable()
5999 q.text('}')
6000
Rich Lane7dcdf022013-12-11 14:45:27 -08006001oxm.subtypes[2147487233] = vlan_pcp
6002
6003class vlan_pcp_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07006004 type_len = 2147487490
Rich Lanec2ee4b82013-04-24 17:12:38 -07006005
6006 def __init__(self, value=None, value_mask=None):
6007 if value != None:
6008 self.value = value
6009 else:
6010 self.value = 0
6011 if value_mask != None:
6012 self.value_mask = value_mask
6013 else:
6014 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08006015 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07006016
6017 def pack(self):
6018 packed = []
6019 packed.append(struct.pack("!L", self.type_len))
6020 packed.append(struct.pack("!B", self.value))
6021 packed.append(struct.pack("!B", self.value_mask))
6022 return ''.join(packed)
6023
6024 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08006025 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07006026 obj = vlan_pcp_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07006027 _type_len = reader.read("!L")[0]
6028 assert(_type_len == 2147487490)
6029 obj.value = reader.read("!B")[0]
6030 obj.value_mask = reader.read("!B")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07006031 return obj
6032
6033 def __eq__(self, other):
6034 if type(self) != type(other): return False
6035 if self.value != other.value: return False
6036 if self.value_mask != other.value_mask: return False
6037 return True
6038
Rich Lanec2ee4b82013-04-24 17:12:38 -07006039 def pretty_print(self, q):
6040 q.text("vlan_pcp_masked {")
6041 with q.group():
6042 with q.indent(2):
6043 q.breakable()
6044 q.text("value = ");
6045 q.text("%#x" % self.value)
6046 q.text(","); q.breakable()
6047 q.text("value_mask = ");
6048 q.text("%#x" % self.value_mask)
6049 q.breakable()
6050 q.text('}')
6051
Rich Lane7dcdf022013-12-11 14:45:27 -08006052oxm.subtypes[2147487490] = vlan_pcp_masked
6053
6054class vlan_vid(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07006055 type_len = 2147486722
Rich Lanec2ee4b82013-04-24 17:12:38 -07006056
6057 def __init__(self, value=None):
6058 if value != None:
6059 self.value = value
6060 else:
6061 self.value = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08006062 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07006063
6064 def pack(self):
6065 packed = []
6066 packed.append(struct.pack("!L", self.type_len))
6067 packed.append(struct.pack("!H", self.value))
6068 return ''.join(packed)
6069
6070 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08006071 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07006072 obj = vlan_vid()
Dan Talaycof6202252013-07-02 01:00:29 -07006073 _type_len = reader.read("!L")[0]
6074 assert(_type_len == 2147486722)
6075 obj.value = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07006076 return obj
6077
6078 def __eq__(self, other):
6079 if type(self) != type(other): return False
6080 if self.value != other.value: return False
6081 return True
6082
Rich Lanec2ee4b82013-04-24 17:12:38 -07006083 def pretty_print(self, q):
6084 q.text("vlan_vid {")
6085 with q.group():
6086 with q.indent(2):
6087 q.breakable()
6088 q.text("value = ");
6089 q.text("%#x" % self.value)
6090 q.breakable()
6091 q.text('}')
6092
Rich Lane7dcdf022013-12-11 14:45:27 -08006093oxm.subtypes[2147486722] = vlan_vid
6094
6095class vlan_vid_masked(oxm):
Dan Talaycof6202252013-07-02 01:00:29 -07006096 type_len = 2147486980
Rich Lanec2ee4b82013-04-24 17:12:38 -07006097
6098 def __init__(self, value=None, value_mask=None):
6099 if value != None:
6100 self.value = value
6101 else:
6102 self.value = 0
6103 if value_mask != None:
6104 self.value_mask = value_mask
6105 else:
6106 self.value_mask = 0
Rich Lane7dcdf022013-12-11 14:45:27 -08006107 return
Rich Lanec2ee4b82013-04-24 17:12:38 -07006108
6109 def pack(self):
6110 packed = []
6111 packed.append(struct.pack("!L", self.type_len))
6112 packed.append(struct.pack("!H", self.value))
6113 packed.append(struct.pack("!H", self.value_mask))
6114 return ''.join(packed)
6115
6116 @staticmethod
Rich Lane7dcdf022013-12-11 14:45:27 -08006117 def unpack(reader):
Rich Lanec2ee4b82013-04-24 17:12:38 -07006118 obj = vlan_vid_masked()
Dan Talaycof6202252013-07-02 01:00:29 -07006119 _type_len = reader.read("!L")[0]
6120 assert(_type_len == 2147486980)
6121 obj.value = reader.read("!H")[0]
6122 obj.value_mask = reader.read("!H")[0]
Rich Lanec2ee4b82013-04-24 17:12:38 -07006123 return obj
6124
6125 def __eq__(self, other):
6126 if type(self) != type(other): return False
6127 if self.value != other.value: return False
6128 if self.value_mask != other.value_mask: return False
6129 return True
6130
Rich Lanec2ee4b82013-04-24 17:12:38 -07006131 def pretty_print(self, q):
6132 q.text("vlan_vid_masked {")
6133 with q.group():
6134 with q.indent(2):
6135 q.breakable()
6136 q.text("value = ");
6137 q.text("%#x" % self.value)
6138 q.text(","); q.breakable()
6139 q.text("value_mask = ");
6140 q.text("%#x" % self.value_mask)
6141 q.breakable()
6142 q.text('}')
6143
Rich Lane7dcdf022013-12-11 14:45:27 -08006144oxm.subtypes[2147486980] = vlan_vid_masked
Rich Lanec2ee4b82013-04-24 17:12:38 -07006145
macauley4075b552015-08-04 17:33:59 +08006146OFDPA_EXPERIMETER =0x00001018
Rich Lane7dcdf022013-12-11 14:45:27 -08006147
macauley4075b552015-08-04 17:33:59 +08006148OFDPA_EXP_TYPE_VRF =1
6149OFDPA_EXP_TYPE_TRAFFIC_CLASS=2
6150OFDPA_EXP_TYPE_COLOR =3
6151OFDPA_EXP_TYPE_DEI =4
6152OFDPA_EXP_TYPE_QOS_INDEX =5
6153OFDPA_EXP_TYPE_LMEP_ID =6
6154OFDPA_EXP_TYPE_MPLS_TTL =7
6155OFDPA_EXP_TYPE_MPLS_L2_PORT =8
6156OFDPA_EXP_TYPE_OVID =10
6157OFDPA_EXP_TYPE_MPLS_DATA_FIRST_NIBBLE=11,
6158OFDPA_EXP_TYPE_ACH_CHANNEL =12
6159OFDPA_EXP_TYPE_NEXT_LABLE_IS_GAL=13
6160OFDPA_EXP_TYPE_OAM_Y1731_MDL=14
6161OFDPA_EXP_TYPE_OAM_Y1731_OPCODE=15
6162OFDPA_EXP_TYPE_COLOR_ACTION_INDEX=16
6163OFDPA_EXP_TYPE_TXFCL =17
6164OFDPA_EXP_TYPE_RXFCL =18
Piercf76e802016-09-19 20:16:35 -07006165OFDPA_EXP_TYPE_MPLS_TYPE = 23
macauley4075b552015-08-04 17:33:59 +08006166OFDPA_EXP_TYPE_RX_TIMESAMP =19
Andreas Pantelopoulosf83e0212018-03-18 20:44:05 -07006167
6168OFDPA_EXP_TYPE_ACTSET_OUTPUT=43
6169OFDPA_EXP_TYPE_ALLOW_VLAN_TRANSLATION=24
macauley4075b552015-08-04 17:33:59 +08006170
Piercf76e802016-09-19 20:16:35 -07006171VPWS = 1
6172TUNNEL_ID_BASE = 0x10000
Saurav Das5d1473d2018-07-12 11:02:56 -07006173TUNNEL_ID_BASE_CROSS_CONNECT = 0x20000
Pierb5da4c92016-09-21 11:23:35 -07006174L3_PHP = 32
Piercf76e802016-09-19 20:16:35 -07006175
macauley4075b552015-08-04 17:33:59 +08006176class exp1ByteValue(oxm):
Flavio Castro91d1a552016-05-17 16:59:44 -07006177 type_len = 0xffff0005
macauley4075b552015-08-04 17:33:59 +08006178
6179 def __init__(self, exp_type=0, value=None):
6180 if value != None:
6181 self.value = value
6182 self.exp_type=exp_type
6183 else:
6184 self.value = 0
6185 return
6186
6187 def pack(self):
6188 packed = []
Flavio Castro91d1a552016-05-17 16:59:44 -07006189 packed.append(struct.pack("!L", self.type_len | (self.exp_type <<9)))
macauley4075b552015-08-04 17:33:59 +08006190 packed.append(struct.pack("!L", OFDPA_EXPERIMETER))
Flavio Castro91d1a552016-05-17 16:59:44 -07006191 #packed.append(struct.pack("!H", self.exp_type))
Piercf76e802016-09-19 20:16:35 -07006192 packed.append(struct.pack("!b", self.value))
macauley4075b552015-08-04 17:33:59 +08006193 return ''.join(packed)
6194
6195 @staticmethod
6196 def unpack(reader):
6197 obj = exp1ByteValue()
6198 _type_len = reader.read("!L")[0]
6199 assert(_type_len == 0xffff0007)
6200 experimenter = reader.read("!L")[0]
6201 assert(experimenter == OFDPA_EXPERIMETER)
6202 obj.exp_type= reader.read("!H")[0]
6203 obj.value= reader.read("!b")[0]
6204 return obj
6205
6206 def __eq__(self, other):
6207 if type(self) != type(other): return False
6208 if self.value != other.value: return False
Piercf76e802016-09-19 20:16:35 -07006209 if self.exp_type != other.exp_type: return False
macauley4075b552015-08-04 17:33:59 +08006210 return True
6211
6212 def pretty_print(self, q):
6213 q.text("exp1ByteValue {")
6214 with q.group():
6215 with q.indent(2):
6216 q.breakable()
6217 q.text("value = ");
6218 q.text("%#x" % self.value)
6219 q.breakable()
6220 q.text('}')
6221
6222oxm.subtypes[0xffff0007] = exp1ByteValue
6223
6224class exp2ByteValue(oxm):
Flavio Castrobcc3dbc2016-04-06 11:05:03 -04006225 type_len = 0xffff0006
macauley4075b552015-08-04 17:33:59 +08006226
6227 def __init__(self, exp_type=0, value=None):
6228 if value != None:
6229 self.value = value
6230 self.exp_type=exp_type
6231 else:
6232 self.value = 0
6233 return
6234
6235 def pack(self):
6236 packed = []
Flavio Castrobcc3dbc2016-04-06 11:05:03 -04006237 packed.append(struct.pack("!L", self.type_len | (self.exp_type <<9)))
macauley4075b552015-08-04 17:33:59 +08006238 packed.append(struct.pack("!L", OFDPA_EXPERIMETER))
Flavio Castrobcc3dbc2016-04-06 11:05:03 -04006239 #packed.append(struct.pack("!H", self.exp_type))
Piercf76e802016-09-19 20:16:35 -07006240 packed.append(struct.pack("!H", self.value))
macauley4075b552015-08-04 17:33:59 +08006241 return ''.join(packed)
6242
6243 @staticmethod
6244 def unpack(reader):
6245 obj = exp2ByteValue()
6246 _type_len = reader.read("!L")[0]
6247 assert(_type_len == 0xffff0008)
6248 experimenter = reader.read("!L")[0]
6249 assert(experimenter == OFDPA_EXPERIMETER)
6250 obj.exp_type= reader.read("!H")[0]
6251 obj.value= reader.read("!H")[0]
6252 return obj
6253
6254 def __eq__(self, other):
6255 if type(self) != type(other): return False
6256 if self.value != other.value: return False
Piercf76e802016-09-19 20:16:35 -07006257 if self.exp_type != other.exp_type: return False
macauley4075b552015-08-04 17:33:59 +08006258 return True
6259
6260 def pretty_print(self, q):
6261 q.text("exp2ByteValue {")
6262 with q.group():
6263 with q.indent(2):
6264 q.breakable()
6265 q.text("value = ");
6266 q.text("%#x" % self.value)
6267 q.breakable()
6268 q.text('}')
6269
6270oxm.subtypes[0xffff0008] = exp2ByteValue
6271
macauley4075b552015-08-04 17:33:59 +08006272class exp4ByteValue(oxm):
Piercf76e802016-09-19 20:16:35 -07006273 type_len = 0xffff0008
macauley4075b552015-08-04 17:33:59 +08006274
Jonghwan Hyunff0dfd52018-03-20 15:04:35 -07006275 def __init__(self, exp_type=0, value=None, experimenter=OFDPA_EXPERIMETER):
macauley4075b552015-08-04 17:33:59 +08006276 if value != None:
6277 self.value = value
6278 self.exp_type=exp_type
Jonghwan Hyunff0dfd52018-03-20 15:04:35 -07006279 self.experimenter = experimenter
macauley4075b552015-08-04 17:33:59 +08006280 else:
6281 self.value = 0
6282 return
6283
6284 def pack(self):
6285 packed = []
Piercf76e802016-09-19 20:16:35 -07006286 packed.append(struct.pack("!L", self.type_len | (self.exp_type <<9)))
Jonghwan Hyunff0dfd52018-03-20 15:04:35 -07006287 packed.append(struct.pack("!L", self.experimenter))
Piercf76e802016-09-19 20:16:35 -07006288 packed.append(struct.pack("!L", self.value))
macauley4075b552015-08-04 17:33:59 +08006289 return ''.join(packed)
6290
6291 @staticmethod
6292 def unpack(reader):
6293 obj = exp4ByteValue()
6294 _type_len = reader.read("!L")[0]
6295 assert(_type_len == 0xffff000a)
6296 experimenter = reader.read("!L")[0]
6297 assert(experimenter == OFDPA_EXPERIMETER)
6298 obj.exp_type= reader.read("!H")[0]
6299 obj.value= reader.read("!L")[0]
6300 return obj
6301
6302 def __eq__(self, other):
6303 if type(self) != type(other): return False
6304 if self.value != other.value: return False
Piercf76e802016-09-19 20:16:35 -07006305 if self.exp_type != other.exp_type: return False
macauley4075b552015-08-04 17:33:59 +08006306 return True
6307
6308 def pretty_print(self, q):
6309 q.text("exp4ByteValue {")
6310 with q.group():
6311 with q.indent(2):
6312 q.breakable()
6313 q.text("value = ");
6314 q.text("%#x" % self.value)
6315 q.breakable()
6316 q.text('}')
6317
Flavio Castrobcc3dbc2016-04-06 11:05:03 -04006318oxm.subtypes[0xffff000a] = exp4ByteValue
Jonghwan Hyunff0dfd52018-03-20 15:04:35 -07006319
6320class exp4ByteReg( oxm ):
6321 type_len = 0x80010000
6322
6323 def __init__( self, oxm_field=0 ):
6324 self.oxm_field = oxm_field
6325
6326 def pack( self ):
6327 packed = [ ]
6328 packed.append( struct.pack( "!L", self.type_len | (self.oxm_field << 9) ) )
6329 return ''.join( packed )