Rich Lane | 2e079da | 2014-10-29 15:30:24 -0700 | [diff] [blame^] | 1 | # Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University |
| 2 | # Copyright (c) 2011, 2012 Open Networking Foundation |
| 3 | # Copyright (c) 2012, 2013 Big Switch Networks, Inc. |
| 4 | # See the file LICENSE.pyloxi which should have been included in the source distribution |
| 5 | |
| 6 | # Automatically generated by LOXI from template module.py |
| 7 | # Do not modify |
| 8 | |
| 9 | import struct |
| 10 | import loxi |
| 11 | import const |
| 12 | import port_desc_prop |
| 13 | import meter_band |
| 14 | import table_mod_prop |
| 15 | import instruction |
| 16 | import queue_desc_prop |
| 17 | import oxm |
| 18 | import bundle_prop |
| 19 | import common |
| 20 | import instruction_id |
| 21 | import action |
| 22 | import role_prop |
| 23 | import message |
| 24 | import queue_stats_prop |
| 25 | import port_stats_prop |
| 26 | import port_mod_prop |
| 27 | import async_config_prop |
| 28 | import action_id |
| 29 | import util |
| 30 | import loxi.generic_util |
| 31 | |
| 32 | class oxm(loxi.OFObject): |
| 33 | subtypes = {} |
| 34 | |
| 35 | |
| 36 | def __init__(self, type_len=None): |
| 37 | if type_len != None: |
| 38 | self.type_len = type_len |
| 39 | else: |
| 40 | self.type_len = 0 |
| 41 | return |
| 42 | |
| 43 | def pack(self): |
| 44 | packed = [] |
| 45 | packed.append(struct.pack("!L", self.type_len)) |
| 46 | return ''.join(packed) |
| 47 | |
| 48 | @staticmethod |
| 49 | def unpack(reader): |
| 50 | subtype, = reader.peek('!L', 0) |
| 51 | subclass = oxm.subtypes.get(subtype) |
| 52 | if subclass: |
| 53 | return subclass.unpack(reader) |
| 54 | |
| 55 | obj = oxm() |
| 56 | obj.type_len = reader.read("!L")[0] |
| 57 | return obj |
| 58 | |
| 59 | def __eq__(self, other): |
| 60 | if type(self) != type(other): return False |
| 61 | if self.type_len != other.type_len: return False |
| 62 | return True |
| 63 | |
| 64 | def pretty_print(self, q): |
| 65 | q.text("oxm {") |
| 66 | with q.group(): |
| 67 | with q.indent(2): |
| 68 | q.breakable() |
| 69 | q.breakable() |
| 70 | q.text('}') |
| 71 | |
| 72 | |
| 73 | class arp_op(oxm): |
| 74 | type_len = 2147494402 |
| 75 | |
| 76 | def __init__(self, value=None): |
| 77 | if value != None: |
| 78 | self.value = value |
| 79 | else: |
| 80 | self.value = 0 |
| 81 | return |
| 82 | |
| 83 | def pack(self): |
| 84 | packed = [] |
| 85 | packed.append(struct.pack("!L", self.type_len)) |
| 86 | packed.append(struct.pack("!H", self.value)) |
| 87 | return ''.join(packed) |
| 88 | |
| 89 | @staticmethod |
| 90 | def unpack(reader): |
| 91 | obj = arp_op() |
| 92 | _type_len = reader.read("!L")[0] |
| 93 | assert(_type_len == 2147494402) |
| 94 | obj.value = reader.read("!H")[0] |
| 95 | return obj |
| 96 | |
| 97 | def __eq__(self, other): |
| 98 | if type(self) != type(other): return False |
| 99 | if self.value != other.value: return False |
| 100 | return True |
| 101 | |
| 102 | def pretty_print(self, q): |
| 103 | q.text("arp_op {") |
| 104 | with q.group(): |
| 105 | with q.indent(2): |
| 106 | q.breakable() |
| 107 | q.text("value = "); |
| 108 | q.text("%#x" % self.value) |
| 109 | q.breakable() |
| 110 | q.text('}') |
| 111 | |
| 112 | oxm.subtypes[2147494402] = arp_op |
| 113 | |
| 114 | class arp_op_masked(oxm): |
| 115 | type_len = 2147494660 |
| 116 | |
| 117 | def __init__(self, value=None, value_mask=None): |
| 118 | if value != None: |
| 119 | self.value = value |
| 120 | else: |
| 121 | self.value = 0 |
| 122 | if value_mask != None: |
| 123 | self.value_mask = value_mask |
| 124 | else: |
| 125 | self.value_mask = 0 |
| 126 | return |
| 127 | |
| 128 | def pack(self): |
| 129 | packed = [] |
| 130 | packed.append(struct.pack("!L", self.type_len)) |
| 131 | packed.append(struct.pack("!H", self.value)) |
| 132 | packed.append(struct.pack("!H", self.value_mask)) |
| 133 | return ''.join(packed) |
| 134 | |
| 135 | @staticmethod |
| 136 | def unpack(reader): |
| 137 | obj = arp_op_masked() |
| 138 | _type_len = reader.read("!L")[0] |
| 139 | assert(_type_len == 2147494660) |
| 140 | obj.value = reader.read("!H")[0] |
| 141 | obj.value_mask = reader.read("!H")[0] |
| 142 | return obj |
| 143 | |
| 144 | def __eq__(self, other): |
| 145 | if type(self) != type(other): return False |
| 146 | if self.value != other.value: return False |
| 147 | if self.value_mask != other.value_mask: return False |
| 148 | return True |
| 149 | |
| 150 | def pretty_print(self, q): |
| 151 | q.text("arp_op_masked {") |
| 152 | with q.group(): |
| 153 | with q.indent(2): |
| 154 | q.breakable() |
| 155 | q.text("value = "); |
| 156 | q.text("%#x" % self.value) |
| 157 | q.text(","); q.breakable() |
| 158 | q.text("value_mask = "); |
| 159 | q.text("%#x" % self.value_mask) |
| 160 | q.breakable() |
| 161 | q.text('}') |
| 162 | |
| 163 | oxm.subtypes[2147494660] = arp_op_masked |
| 164 | |
| 165 | class arp_sha(oxm): |
| 166 | type_len = 2147495942 |
| 167 | |
| 168 | def __init__(self, value=None): |
| 169 | if value != None: |
| 170 | self.value = value |
| 171 | else: |
| 172 | self.value = [0,0,0,0,0,0] |
| 173 | return |
| 174 | |
| 175 | def pack(self): |
| 176 | packed = [] |
| 177 | packed.append(struct.pack("!L", self.type_len)) |
| 178 | packed.append(struct.pack("!6B", *self.value)) |
| 179 | return ''.join(packed) |
| 180 | |
| 181 | @staticmethod |
| 182 | def unpack(reader): |
| 183 | obj = arp_sha() |
| 184 | _type_len = reader.read("!L")[0] |
| 185 | assert(_type_len == 2147495942) |
| 186 | obj.value = list(reader.read('!6B')) |
| 187 | return obj |
| 188 | |
| 189 | def __eq__(self, other): |
| 190 | if type(self) != type(other): return False |
| 191 | if self.value != other.value: return False |
| 192 | return True |
| 193 | |
| 194 | def pretty_print(self, q): |
| 195 | q.text("arp_sha {") |
| 196 | with q.group(): |
| 197 | with q.indent(2): |
| 198 | q.breakable() |
| 199 | q.text("value = "); |
| 200 | q.text(util.pretty_mac(self.value)) |
| 201 | q.breakable() |
| 202 | q.text('}') |
| 203 | |
| 204 | oxm.subtypes[2147495942] = arp_sha |
| 205 | |
| 206 | class arp_sha_masked(oxm): |
| 207 | type_len = 2147496204 |
| 208 | |
| 209 | def __init__(self, value=None, value_mask=None): |
| 210 | if value != None: |
| 211 | self.value = value |
| 212 | else: |
| 213 | self.value = [0,0,0,0,0,0] |
| 214 | if value_mask != None: |
| 215 | self.value_mask = value_mask |
| 216 | else: |
| 217 | self.value_mask = [0,0,0,0,0,0] |
| 218 | return |
| 219 | |
| 220 | def pack(self): |
| 221 | packed = [] |
| 222 | packed.append(struct.pack("!L", self.type_len)) |
| 223 | packed.append(struct.pack("!6B", *self.value)) |
| 224 | packed.append(struct.pack("!6B", *self.value_mask)) |
| 225 | return ''.join(packed) |
| 226 | |
| 227 | @staticmethod |
| 228 | def unpack(reader): |
| 229 | obj = arp_sha_masked() |
| 230 | _type_len = reader.read("!L")[0] |
| 231 | assert(_type_len == 2147496204) |
| 232 | obj.value = list(reader.read('!6B')) |
| 233 | obj.value_mask = list(reader.read('!6B')) |
| 234 | return obj |
| 235 | |
| 236 | def __eq__(self, other): |
| 237 | if type(self) != type(other): return False |
| 238 | if self.value != other.value: return False |
| 239 | if self.value_mask != other.value_mask: return False |
| 240 | return True |
| 241 | |
| 242 | def pretty_print(self, q): |
| 243 | q.text("arp_sha_masked {") |
| 244 | with q.group(): |
| 245 | with q.indent(2): |
| 246 | q.breakable() |
| 247 | q.text("value = "); |
| 248 | q.text(util.pretty_mac(self.value)) |
| 249 | q.text(","); q.breakable() |
| 250 | q.text("value_mask = "); |
| 251 | q.text(util.pretty_mac(self.value_mask)) |
| 252 | q.breakable() |
| 253 | q.text('}') |
| 254 | |
| 255 | oxm.subtypes[2147496204] = arp_sha_masked |
| 256 | |
| 257 | class arp_spa(oxm): |
| 258 | type_len = 2147494916 |
| 259 | |
| 260 | def __init__(self, value=None): |
| 261 | if value != None: |
| 262 | self.value = value |
| 263 | else: |
| 264 | self.value = 0 |
| 265 | return |
| 266 | |
| 267 | def pack(self): |
| 268 | packed = [] |
| 269 | packed.append(struct.pack("!L", self.type_len)) |
| 270 | packed.append(struct.pack("!L", self.value)) |
| 271 | return ''.join(packed) |
| 272 | |
| 273 | @staticmethod |
| 274 | def unpack(reader): |
| 275 | obj = arp_spa() |
| 276 | _type_len = reader.read("!L")[0] |
| 277 | assert(_type_len == 2147494916) |
| 278 | obj.value = reader.read("!L")[0] |
| 279 | return obj |
| 280 | |
| 281 | def __eq__(self, other): |
| 282 | if type(self) != type(other): return False |
| 283 | if self.value != other.value: return False |
| 284 | return True |
| 285 | |
| 286 | def pretty_print(self, q): |
| 287 | q.text("arp_spa {") |
| 288 | with q.group(): |
| 289 | with q.indent(2): |
| 290 | q.breakable() |
| 291 | q.text("value = "); |
| 292 | q.text("%#x" % self.value) |
| 293 | q.breakable() |
| 294 | q.text('}') |
| 295 | |
| 296 | oxm.subtypes[2147494916] = arp_spa |
| 297 | |
| 298 | class arp_spa_masked(oxm): |
| 299 | type_len = 2147495176 |
| 300 | |
| 301 | def __init__(self, value=None, value_mask=None): |
| 302 | if value != None: |
| 303 | self.value = value |
| 304 | else: |
| 305 | self.value = 0 |
| 306 | if value_mask != None: |
| 307 | self.value_mask = value_mask |
| 308 | else: |
| 309 | self.value_mask = 0 |
| 310 | return |
| 311 | |
| 312 | def pack(self): |
| 313 | packed = [] |
| 314 | packed.append(struct.pack("!L", self.type_len)) |
| 315 | packed.append(struct.pack("!L", self.value)) |
| 316 | packed.append(struct.pack("!L", self.value_mask)) |
| 317 | return ''.join(packed) |
| 318 | |
| 319 | @staticmethod |
| 320 | def unpack(reader): |
| 321 | obj = arp_spa_masked() |
| 322 | _type_len = reader.read("!L")[0] |
| 323 | assert(_type_len == 2147495176) |
| 324 | obj.value = reader.read("!L")[0] |
| 325 | obj.value_mask = reader.read("!L")[0] |
| 326 | return obj |
| 327 | |
| 328 | def __eq__(self, other): |
| 329 | if type(self) != type(other): return False |
| 330 | if self.value != other.value: return False |
| 331 | if self.value_mask != other.value_mask: return False |
| 332 | return True |
| 333 | |
| 334 | def pretty_print(self, q): |
| 335 | q.text("arp_spa_masked {") |
| 336 | with q.group(): |
| 337 | with q.indent(2): |
| 338 | q.breakable() |
| 339 | q.text("value = "); |
| 340 | q.text("%#x" % self.value) |
| 341 | q.text(","); q.breakable() |
| 342 | q.text("value_mask = "); |
| 343 | q.text("%#x" % self.value_mask) |
| 344 | q.breakable() |
| 345 | q.text('}') |
| 346 | |
| 347 | oxm.subtypes[2147495176] = arp_spa_masked |
| 348 | |
| 349 | class arp_tha(oxm): |
| 350 | type_len = 2147496454 |
| 351 | |
| 352 | def __init__(self, value=None): |
| 353 | if value != None: |
| 354 | self.value = value |
| 355 | else: |
| 356 | self.value = [0,0,0,0,0,0] |
| 357 | return |
| 358 | |
| 359 | def pack(self): |
| 360 | packed = [] |
| 361 | packed.append(struct.pack("!L", self.type_len)) |
| 362 | packed.append(struct.pack("!6B", *self.value)) |
| 363 | return ''.join(packed) |
| 364 | |
| 365 | @staticmethod |
| 366 | def unpack(reader): |
| 367 | obj = arp_tha() |
| 368 | _type_len = reader.read("!L")[0] |
| 369 | assert(_type_len == 2147496454) |
| 370 | obj.value = list(reader.read('!6B')) |
| 371 | return obj |
| 372 | |
| 373 | def __eq__(self, other): |
| 374 | if type(self) != type(other): return False |
| 375 | if self.value != other.value: return False |
| 376 | return True |
| 377 | |
| 378 | def pretty_print(self, q): |
| 379 | q.text("arp_tha {") |
| 380 | with q.group(): |
| 381 | with q.indent(2): |
| 382 | q.breakable() |
| 383 | q.text("value = "); |
| 384 | q.text(util.pretty_mac(self.value)) |
| 385 | q.breakable() |
| 386 | q.text('}') |
| 387 | |
| 388 | oxm.subtypes[2147496454] = arp_tha |
| 389 | |
| 390 | class arp_tha_masked(oxm): |
| 391 | type_len = 2147496716 |
| 392 | |
| 393 | def __init__(self, value=None, value_mask=None): |
| 394 | if value != None: |
| 395 | self.value = value |
| 396 | else: |
| 397 | self.value = [0,0,0,0,0,0] |
| 398 | if value_mask != None: |
| 399 | self.value_mask = value_mask |
| 400 | else: |
| 401 | self.value_mask = [0,0,0,0,0,0] |
| 402 | return |
| 403 | |
| 404 | def pack(self): |
| 405 | packed = [] |
| 406 | packed.append(struct.pack("!L", self.type_len)) |
| 407 | packed.append(struct.pack("!6B", *self.value)) |
| 408 | packed.append(struct.pack("!6B", *self.value_mask)) |
| 409 | return ''.join(packed) |
| 410 | |
| 411 | @staticmethod |
| 412 | def unpack(reader): |
| 413 | obj = arp_tha_masked() |
| 414 | _type_len = reader.read("!L")[0] |
| 415 | assert(_type_len == 2147496716) |
| 416 | obj.value = list(reader.read('!6B')) |
| 417 | obj.value_mask = list(reader.read('!6B')) |
| 418 | return obj |
| 419 | |
| 420 | def __eq__(self, other): |
| 421 | if type(self) != type(other): return False |
| 422 | if self.value != other.value: return False |
| 423 | if self.value_mask != other.value_mask: return False |
| 424 | return True |
| 425 | |
| 426 | def pretty_print(self, q): |
| 427 | q.text("arp_tha_masked {") |
| 428 | with q.group(): |
| 429 | with q.indent(2): |
| 430 | q.breakable() |
| 431 | q.text("value = "); |
| 432 | q.text(util.pretty_mac(self.value)) |
| 433 | q.text(","); q.breakable() |
| 434 | q.text("value_mask = "); |
| 435 | q.text(util.pretty_mac(self.value_mask)) |
| 436 | q.breakable() |
| 437 | q.text('}') |
| 438 | |
| 439 | oxm.subtypes[2147496716] = arp_tha_masked |
| 440 | |
| 441 | class arp_tpa(oxm): |
| 442 | type_len = 2147495428 |
| 443 | |
| 444 | def __init__(self, value=None): |
| 445 | if value != None: |
| 446 | self.value = value |
| 447 | else: |
| 448 | self.value = 0 |
| 449 | return |
| 450 | |
| 451 | def pack(self): |
| 452 | packed = [] |
| 453 | packed.append(struct.pack("!L", self.type_len)) |
| 454 | packed.append(struct.pack("!L", self.value)) |
| 455 | return ''.join(packed) |
| 456 | |
| 457 | @staticmethod |
| 458 | def unpack(reader): |
| 459 | obj = arp_tpa() |
| 460 | _type_len = reader.read("!L")[0] |
| 461 | assert(_type_len == 2147495428) |
| 462 | obj.value = reader.read("!L")[0] |
| 463 | return obj |
| 464 | |
| 465 | def __eq__(self, other): |
| 466 | if type(self) != type(other): return False |
| 467 | if self.value != other.value: return False |
| 468 | return True |
| 469 | |
| 470 | def pretty_print(self, q): |
| 471 | q.text("arp_tpa {") |
| 472 | with q.group(): |
| 473 | with q.indent(2): |
| 474 | q.breakable() |
| 475 | q.text("value = "); |
| 476 | q.text("%#x" % self.value) |
| 477 | q.breakable() |
| 478 | q.text('}') |
| 479 | |
| 480 | oxm.subtypes[2147495428] = arp_tpa |
| 481 | |
| 482 | class arp_tpa_masked(oxm): |
| 483 | type_len = 2147495688 |
| 484 | |
| 485 | def __init__(self, value=None, value_mask=None): |
| 486 | if value != None: |
| 487 | self.value = value |
| 488 | else: |
| 489 | self.value = 0 |
| 490 | if value_mask != None: |
| 491 | self.value_mask = value_mask |
| 492 | else: |
| 493 | self.value_mask = 0 |
| 494 | return |
| 495 | |
| 496 | def pack(self): |
| 497 | packed = [] |
| 498 | packed.append(struct.pack("!L", self.type_len)) |
| 499 | packed.append(struct.pack("!L", self.value)) |
| 500 | packed.append(struct.pack("!L", self.value_mask)) |
| 501 | return ''.join(packed) |
| 502 | |
| 503 | @staticmethod |
| 504 | def unpack(reader): |
| 505 | obj = arp_tpa_masked() |
| 506 | _type_len = reader.read("!L")[0] |
| 507 | assert(_type_len == 2147495688) |
| 508 | obj.value = reader.read("!L")[0] |
| 509 | obj.value_mask = reader.read("!L")[0] |
| 510 | return obj |
| 511 | |
| 512 | def __eq__(self, other): |
| 513 | if type(self) != type(other): return False |
| 514 | if self.value != other.value: return False |
| 515 | if self.value_mask != other.value_mask: return False |
| 516 | return True |
| 517 | |
| 518 | def pretty_print(self, q): |
| 519 | q.text("arp_tpa_masked {") |
| 520 | with q.group(): |
| 521 | with q.indent(2): |
| 522 | q.breakable() |
| 523 | q.text("value = "); |
| 524 | q.text("%#x" % self.value) |
| 525 | q.text(","); q.breakable() |
| 526 | q.text("value_mask = "); |
| 527 | q.text("%#x" % self.value_mask) |
| 528 | q.breakable() |
| 529 | q.text('}') |
| 530 | |
| 531 | oxm.subtypes[2147495688] = arp_tpa_masked |
| 532 | |
| 533 | class eth_dst(oxm): |
| 534 | type_len = 2147485190 |
| 535 | |
| 536 | def __init__(self, value=None): |
| 537 | if value != None: |
| 538 | self.value = value |
| 539 | else: |
| 540 | self.value = [0,0,0,0,0,0] |
| 541 | return |
| 542 | |
| 543 | def pack(self): |
| 544 | packed = [] |
| 545 | packed.append(struct.pack("!L", self.type_len)) |
| 546 | packed.append(struct.pack("!6B", *self.value)) |
| 547 | return ''.join(packed) |
| 548 | |
| 549 | @staticmethod |
| 550 | def unpack(reader): |
| 551 | obj = eth_dst() |
| 552 | _type_len = reader.read("!L")[0] |
| 553 | assert(_type_len == 2147485190) |
| 554 | obj.value = list(reader.read('!6B')) |
| 555 | return obj |
| 556 | |
| 557 | def __eq__(self, other): |
| 558 | if type(self) != type(other): return False |
| 559 | if self.value != other.value: return False |
| 560 | return True |
| 561 | |
| 562 | def pretty_print(self, q): |
| 563 | q.text("eth_dst {") |
| 564 | with q.group(): |
| 565 | with q.indent(2): |
| 566 | q.breakable() |
| 567 | q.text("value = "); |
| 568 | q.text(util.pretty_mac(self.value)) |
| 569 | q.breakable() |
| 570 | q.text('}') |
| 571 | |
| 572 | oxm.subtypes[2147485190] = eth_dst |
| 573 | |
| 574 | class eth_dst_masked(oxm): |
| 575 | type_len = 2147485452 |
| 576 | |
| 577 | def __init__(self, value=None, value_mask=None): |
| 578 | if value != None: |
| 579 | self.value = value |
| 580 | else: |
| 581 | self.value = [0,0,0,0,0,0] |
| 582 | if value_mask != None: |
| 583 | self.value_mask = value_mask |
| 584 | else: |
| 585 | self.value_mask = [0,0,0,0,0,0] |
| 586 | return |
| 587 | |
| 588 | def pack(self): |
| 589 | packed = [] |
| 590 | packed.append(struct.pack("!L", self.type_len)) |
| 591 | packed.append(struct.pack("!6B", *self.value)) |
| 592 | packed.append(struct.pack("!6B", *self.value_mask)) |
| 593 | return ''.join(packed) |
| 594 | |
| 595 | @staticmethod |
| 596 | def unpack(reader): |
| 597 | obj = eth_dst_masked() |
| 598 | _type_len = reader.read("!L")[0] |
| 599 | assert(_type_len == 2147485452) |
| 600 | obj.value = list(reader.read('!6B')) |
| 601 | obj.value_mask = list(reader.read('!6B')) |
| 602 | return obj |
| 603 | |
| 604 | def __eq__(self, other): |
| 605 | if type(self) != type(other): return False |
| 606 | if self.value != other.value: return False |
| 607 | if self.value_mask != other.value_mask: return False |
| 608 | return True |
| 609 | |
| 610 | def pretty_print(self, q): |
| 611 | q.text("eth_dst_masked {") |
| 612 | with q.group(): |
| 613 | with q.indent(2): |
| 614 | q.breakable() |
| 615 | q.text("value = "); |
| 616 | q.text(util.pretty_mac(self.value)) |
| 617 | q.text(","); q.breakable() |
| 618 | q.text("value_mask = "); |
| 619 | q.text(util.pretty_mac(self.value_mask)) |
| 620 | q.breakable() |
| 621 | q.text('}') |
| 622 | |
| 623 | oxm.subtypes[2147485452] = eth_dst_masked |
| 624 | |
| 625 | class eth_src(oxm): |
| 626 | type_len = 2147485702 |
| 627 | |
| 628 | def __init__(self, value=None): |
| 629 | if value != None: |
| 630 | self.value = value |
| 631 | else: |
| 632 | self.value = [0,0,0,0,0,0] |
| 633 | return |
| 634 | |
| 635 | def pack(self): |
| 636 | packed = [] |
| 637 | packed.append(struct.pack("!L", self.type_len)) |
| 638 | packed.append(struct.pack("!6B", *self.value)) |
| 639 | return ''.join(packed) |
| 640 | |
| 641 | @staticmethod |
| 642 | def unpack(reader): |
| 643 | obj = eth_src() |
| 644 | _type_len = reader.read("!L")[0] |
| 645 | assert(_type_len == 2147485702) |
| 646 | obj.value = list(reader.read('!6B')) |
| 647 | return obj |
| 648 | |
| 649 | def __eq__(self, other): |
| 650 | if type(self) != type(other): return False |
| 651 | if self.value != other.value: return False |
| 652 | return True |
| 653 | |
| 654 | def pretty_print(self, q): |
| 655 | q.text("eth_src {") |
| 656 | with q.group(): |
| 657 | with q.indent(2): |
| 658 | q.breakable() |
| 659 | q.text("value = "); |
| 660 | q.text(util.pretty_mac(self.value)) |
| 661 | q.breakable() |
| 662 | q.text('}') |
| 663 | |
| 664 | oxm.subtypes[2147485702] = eth_src |
| 665 | |
| 666 | class eth_src_masked(oxm): |
| 667 | type_len = 2147485964 |
| 668 | |
| 669 | def __init__(self, value=None, value_mask=None): |
| 670 | if value != None: |
| 671 | self.value = value |
| 672 | else: |
| 673 | self.value = [0,0,0,0,0,0] |
| 674 | if value_mask != None: |
| 675 | self.value_mask = value_mask |
| 676 | else: |
| 677 | self.value_mask = [0,0,0,0,0,0] |
| 678 | return |
| 679 | |
| 680 | def pack(self): |
| 681 | packed = [] |
| 682 | packed.append(struct.pack("!L", self.type_len)) |
| 683 | packed.append(struct.pack("!6B", *self.value)) |
| 684 | packed.append(struct.pack("!6B", *self.value_mask)) |
| 685 | return ''.join(packed) |
| 686 | |
| 687 | @staticmethod |
| 688 | def unpack(reader): |
| 689 | obj = eth_src_masked() |
| 690 | _type_len = reader.read("!L")[0] |
| 691 | assert(_type_len == 2147485964) |
| 692 | obj.value = list(reader.read('!6B')) |
| 693 | obj.value_mask = list(reader.read('!6B')) |
| 694 | return obj |
| 695 | |
| 696 | def __eq__(self, other): |
| 697 | if type(self) != type(other): return False |
| 698 | if self.value != other.value: return False |
| 699 | if self.value_mask != other.value_mask: return False |
| 700 | return True |
| 701 | |
| 702 | def pretty_print(self, q): |
| 703 | q.text("eth_src_masked {") |
| 704 | with q.group(): |
| 705 | with q.indent(2): |
| 706 | q.breakable() |
| 707 | q.text("value = "); |
| 708 | q.text(util.pretty_mac(self.value)) |
| 709 | q.text(","); q.breakable() |
| 710 | q.text("value_mask = "); |
| 711 | q.text(util.pretty_mac(self.value_mask)) |
| 712 | q.breakable() |
| 713 | q.text('}') |
| 714 | |
| 715 | oxm.subtypes[2147485964] = eth_src_masked |
| 716 | |
| 717 | class eth_type(oxm): |
| 718 | type_len = 2147486210 |
| 719 | |
| 720 | def __init__(self, value=None): |
| 721 | if value != None: |
| 722 | self.value = value |
| 723 | else: |
| 724 | self.value = 0 |
| 725 | return |
| 726 | |
| 727 | def pack(self): |
| 728 | packed = [] |
| 729 | packed.append(struct.pack("!L", self.type_len)) |
| 730 | packed.append(struct.pack("!H", self.value)) |
| 731 | return ''.join(packed) |
| 732 | |
| 733 | @staticmethod |
| 734 | def unpack(reader): |
| 735 | obj = eth_type() |
| 736 | _type_len = reader.read("!L")[0] |
| 737 | assert(_type_len == 2147486210) |
| 738 | obj.value = reader.read("!H")[0] |
| 739 | return obj |
| 740 | |
| 741 | def __eq__(self, other): |
| 742 | if type(self) != type(other): return False |
| 743 | if self.value != other.value: return False |
| 744 | return True |
| 745 | |
| 746 | def pretty_print(self, q): |
| 747 | q.text("eth_type {") |
| 748 | with q.group(): |
| 749 | with q.indent(2): |
| 750 | q.breakable() |
| 751 | q.text("value = "); |
| 752 | q.text("%#x" % self.value) |
| 753 | q.breakable() |
| 754 | q.text('}') |
| 755 | |
| 756 | oxm.subtypes[2147486210] = eth_type |
| 757 | |
| 758 | class eth_type_masked(oxm): |
| 759 | type_len = 2147486468 |
| 760 | |
| 761 | def __init__(self, value=None, value_mask=None): |
| 762 | if value != None: |
| 763 | self.value = value |
| 764 | else: |
| 765 | self.value = 0 |
| 766 | if value_mask != None: |
| 767 | self.value_mask = value_mask |
| 768 | else: |
| 769 | self.value_mask = 0 |
| 770 | return |
| 771 | |
| 772 | def pack(self): |
| 773 | packed = [] |
| 774 | packed.append(struct.pack("!L", self.type_len)) |
| 775 | packed.append(struct.pack("!H", self.value)) |
| 776 | packed.append(struct.pack("!H", self.value_mask)) |
| 777 | return ''.join(packed) |
| 778 | |
| 779 | @staticmethod |
| 780 | def unpack(reader): |
| 781 | obj = eth_type_masked() |
| 782 | _type_len = reader.read("!L")[0] |
| 783 | assert(_type_len == 2147486468) |
| 784 | obj.value = reader.read("!H")[0] |
| 785 | obj.value_mask = reader.read("!H")[0] |
| 786 | return obj |
| 787 | |
| 788 | def __eq__(self, other): |
| 789 | if type(self) != type(other): return False |
| 790 | if self.value != other.value: return False |
| 791 | if self.value_mask != other.value_mask: return False |
| 792 | return True |
| 793 | |
| 794 | def pretty_print(self, q): |
| 795 | q.text("eth_type_masked {") |
| 796 | with q.group(): |
| 797 | with q.indent(2): |
| 798 | q.breakable() |
| 799 | q.text("value = "); |
| 800 | q.text("%#x" % self.value) |
| 801 | q.text(","); q.breakable() |
| 802 | q.text("value_mask = "); |
| 803 | q.text("%#x" % self.value_mask) |
| 804 | q.breakable() |
| 805 | q.text('}') |
| 806 | |
| 807 | oxm.subtypes[2147486468] = eth_type_masked |
| 808 | |
| 809 | class icmpv4_code(oxm): |
| 810 | type_len = 2147493889 |
| 811 | |
| 812 | def __init__(self, value=None): |
| 813 | if value != None: |
| 814 | self.value = value |
| 815 | else: |
| 816 | self.value = 0 |
| 817 | return |
| 818 | |
| 819 | def pack(self): |
| 820 | packed = [] |
| 821 | packed.append(struct.pack("!L", self.type_len)) |
| 822 | packed.append(struct.pack("!B", self.value)) |
| 823 | return ''.join(packed) |
| 824 | |
| 825 | @staticmethod |
| 826 | def unpack(reader): |
| 827 | obj = icmpv4_code() |
| 828 | _type_len = reader.read("!L")[0] |
| 829 | assert(_type_len == 2147493889) |
| 830 | obj.value = reader.read("!B")[0] |
| 831 | return obj |
| 832 | |
| 833 | def __eq__(self, other): |
| 834 | if type(self) != type(other): return False |
| 835 | if self.value != other.value: return False |
| 836 | return True |
| 837 | |
| 838 | def pretty_print(self, q): |
| 839 | q.text("icmpv4_code {") |
| 840 | with q.group(): |
| 841 | with q.indent(2): |
| 842 | q.breakable() |
| 843 | q.text("value = "); |
| 844 | q.text("%#x" % self.value) |
| 845 | q.breakable() |
| 846 | q.text('}') |
| 847 | |
| 848 | oxm.subtypes[2147493889] = icmpv4_code |
| 849 | |
| 850 | class icmpv4_code_masked(oxm): |
| 851 | type_len = 2147494146 |
| 852 | |
| 853 | def __init__(self, value=None, value_mask=None): |
| 854 | if value != None: |
| 855 | self.value = value |
| 856 | else: |
| 857 | self.value = 0 |
| 858 | if value_mask != None: |
| 859 | self.value_mask = value_mask |
| 860 | else: |
| 861 | self.value_mask = 0 |
| 862 | return |
| 863 | |
| 864 | def pack(self): |
| 865 | packed = [] |
| 866 | packed.append(struct.pack("!L", self.type_len)) |
| 867 | packed.append(struct.pack("!B", self.value)) |
| 868 | packed.append(struct.pack("!B", self.value_mask)) |
| 869 | return ''.join(packed) |
| 870 | |
| 871 | @staticmethod |
| 872 | def unpack(reader): |
| 873 | obj = icmpv4_code_masked() |
| 874 | _type_len = reader.read("!L")[0] |
| 875 | assert(_type_len == 2147494146) |
| 876 | obj.value = reader.read("!B")[0] |
| 877 | obj.value_mask = reader.read("!B")[0] |
| 878 | return obj |
| 879 | |
| 880 | def __eq__(self, other): |
| 881 | if type(self) != type(other): return False |
| 882 | if self.value != other.value: return False |
| 883 | if self.value_mask != other.value_mask: return False |
| 884 | return True |
| 885 | |
| 886 | def pretty_print(self, q): |
| 887 | q.text("icmpv4_code_masked {") |
| 888 | with q.group(): |
| 889 | with q.indent(2): |
| 890 | q.breakable() |
| 891 | q.text("value = "); |
| 892 | q.text("%#x" % self.value) |
| 893 | q.text(","); q.breakable() |
| 894 | q.text("value_mask = "); |
| 895 | q.text("%#x" % self.value_mask) |
| 896 | q.breakable() |
| 897 | q.text('}') |
| 898 | |
| 899 | oxm.subtypes[2147494146] = icmpv4_code_masked |
| 900 | |
| 901 | class icmpv4_type(oxm): |
| 902 | type_len = 2147493377 |
| 903 | |
| 904 | def __init__(self, value=None): |
| 905 | if value != None: |
| 906 | self.value = value |
| 907 | else: |
| 908 | self.value = 0 |
| 909 | return |
| 910 | |
| 911 | def pack(self): |
| 912 | packed = [] |
| 913 | packed.append(struct.pack("!L", self.type_len)) |
| 914 | packed.append(struct.pack("!B", self.value)) |
| 915 | return ''.join(packed) |
| 916 | |
| 917 | @staticmethod |
| 918 | def unpack(reader): |
| 919 | obj = icmpv4_type() |
| 920 | _type_len = reader.read("!L")[0] |
| 921 | assert(_type_len == 2147493377) |
| 922 | obj.value = reader.read("!B")[0] |
| 923 | return obj |
| 924 | |
| 925 | def __eq__(self, other): |
| 926 | if type(self) != type(other): return False |
| 927 | if self.value != other.value: return False |
| 928 | return True |
| 929 | |
| 930 | def pretty_print(self, q): |
| 931 | q.text("icmpv4_type {") |
| 932 | with q.group(): |
| 933 | with q.indent(2): |
| 934 | q.breakable() |
| 935 | q.text("value = "); |
| 936 | q.text("%#x" % self.value) |
| 937 | q.breakable() |
| 938 | q.text('}') |
| 939 | |
| 940 | oxm.subtypes[2147493377] = icmpv4_type |
| 941 | |
| 942 | class icmpv4_type_masked(oxm): |
| 943 | type_len = 2147493634 |
| 944 | |
| 945 | def __init__(self, value=None, value_mask=None): |
| 946 | if value != None: |
| 947 | self.value = value |
| 948 | else: |
| 949 | self.value = 0 |
| 950 | if value_mask != None: |
| 951 | self.value_mask = value_mask |
| 952 | else: |
| 953 | self.value_mask = 0 |
| 954 | return |
| 955 | |
| 956 | def pack(self): |
| 957 | packed = [] |
| 958 | packed.append(struct.pack("!L", self.type_len)) |
| 959 | packed.append(struct.pack("!B", self.value)) |
| 960 | packed.append(struct.pack("!B", self.value_mask)) |
| 961 | return ''.join(packed) |
| 962 | |
| 963 | @staticmethod |
| 964 | def unpack(reader): |
| 965 | obj = icmpv4_type_masked() |
| 966 | _type_len = reader.read("!L")[0] |
| 967 | assert(_type_len == 2147493634) |
| 968 | obj.value = reader.read("!B")[0] |
| 969 | obj.value_mask = reader.read("!B")[0] |
| 970 | return obj |
| 971 | |
| 972 | def __eq__(self, other): |
| 973 | if type(self) != type(other): return False |
| 974 | if self.value != other.value: return False |
| 975 | if self.value_mask != other.value_mask: return False |
| 976 | return True |
| 977 | |
| 978 | def pretty_print(self, q): |
| 979 | q.text("icmpv4_type_masked {") |
| 980 | with q.group(): |
| 981 | with q.indent(2): |
| 982 | q.breakable() |
| 983 | q.text("value = "); |
| 984 | q.text("%#x" % self.value) |
| 985 | q.text(","); q.breakable() |
| 986 | q.text("value_mask = "); |
| 987 | q.text("%#x" % self.value_mask) |
| 988 | q.breakable() |
| 989 | q.text('}') |
| 990 | |
| 991 | oxm.subtypes[2147493634] = icmpv4_type_masked |
| 992 | |
| 993 | class icmpv6_code(oxm): |
| 994 | type_len = 2147499009 |
| 995 | |
| 996 | def __init__(self, value=None): |
| 997 | if value != None: |
| 998 | self.value = value |
| 999 | else: |
| 1000 | self.value = 0 |
| 1001 | return |
| 1002 | |
| 1003 | def pack(self): |
| 1004 | packed = [] |
| 1005 | packed.append(struct.pack("!L", self.type_len)) |
| 1006 | packed.append(struct.pack("!B", self.value)) |
| 1007 | return ''.join(packed) |
| 1008 | |
| 1009 | @staticmethod |
| 1010 | def unpack(reader): |
| 1011 | obj = icmpv6_code() |
| 1012 | _type_len = reader.read("!L")[0] |
| 1013 | assert(_type_len == 2147499009) |
| 1014 | obj.value = reader.read("!B")[0] |
| 1015 | return obj |
| 1016 | |
| 1017 | def __eq__(self, other): |
| 1018 | if type(self) != type(other): return False |
| 1019 | if self.value != other.value: return False |
| 1020 | return True |
| 1021 | |
| 1022 | def pretty_print(self, q): |
| 1023 | q.text("icmpv6_code {") |
| 1024 | with q.group(): |
| 1025 | with q.indent(2): |
| 1026 | q.breakable() |
| 1027 | q.text("value = "); |
| 1028 | q.text("%#x" % self.value) |
| 1029 | q.breakable() |
| 1030 | q.text('}') |
| 1031 | |
| 1032 | oxm.subtypes[2147499009] = icmpv6_code |
| 1033 | |
| 1034 | class icmpv6_code_masked(oxm): |
| 1035 | type_len = 2147499266 |
| 1036 | |
| 1037 | def __init__(self, value=None, value_mask=None): |
| 1038 | if value != None: |
| 1039 | self.value = value |
| 1040 | else: |
| 1041 | self.value = 0 |
| 1042 | if value_mask != None: |
| 1043 | self.value_mask = value_mask |
| 1044 | else: |
| 1045 | self.value_mask = 0 |
| 1046 | return |
| 1047 | |
| 1048 | def pack(self): |
| 1049 | packed = [] |
| 1050 | packed.append(struct.pack("!L", self.type_len)) |
| 1051 | packed.append(struct.pack("!B", self.value)) |
| 1052 | packed.append(struct.pack("!B", self.value_mask)) |
| 1053 | return ''.join(packed) |
| 1054 | |
| 1055 | @staticmethod |
| 1056 | def unpack(reader): |
| 1057 | obj = icmpv6_code_masked() |
| 1058 | _type_len = reader.read("!L")[0] |
| 1059 | assert(_type_len == 2147499266) |
| 1060 | obj.value = reader.read("!B")[0] |
| 1061 | obj.value_mask = reader.read("!B")[0] |
| 1062 | return obj |
| 1063 | |
| 1064 | def __eq__(self, other): |
| 1065 | if type(self) != type(other): return False |
| 1066 | if self.value != other.value: return False |
| 1067 | if self.value_mask != other.value_mask: return False |
| 1068 | return True |
| 1069 | |
| 1070 | def pretty_print(self, q): |
| 1071 | q.text("icmpv6_code_masked {") |
| 1072 | with q.group(): |
| 1073 | with q.indent(2): |
| 1074 | q.breakable() |
| 1075 | q.text("value = "); |
| 1076 | q.text("%#x" % self.value) |
| 1077 | q.text(","); q.breakable() |
| 1078 | q.text("value_mask = "); |
| 1079 | q.text("%#x" % self.value_mask) |
| 1080 | q.breakable() |
| 1081 | q.text('}') |
| 1082 | |
| 1083 | oxm.subtypes[2147499266] = icmpv6_code_masked |
| 1084 | |
| 1085 | class icmpv6_type(oxm): |
| 1086 | type_len = 2147498497 |
| 1087 | |
| 1088 | def __init__(self, value=None): |
| 1089 | if value != None: |
| 1090 | self.value = value |
| 1091 | else: |
| 1092 | self.value = 0 |
| 1093 | return |
| 1094 | |
| 1095 | def pack(self): |
| 1096 | packed = [] |
| 1097 | packed.append(struct.pack("!L", self.type_len)) |
| 1098 | packed.append(struct.pack("!B", self.value)) |
| 1099 | return ''.join(packed) |
| 1100 | |
| 1101 | @staticmethod |
| 1102 | def unpack(reader): |
| 1103 | obj = icmpv6_type() |
| 1104 | _type_len = reader.read("!L")[0] |
| 1105 | assert(_type_len == 2147498497) |
| 1106 | obj.value = reader.read("!B")[0] |
| 1107 | return obj |
| 1108 | |
| 1109 | def __eq__(self, other): |
| 1110 | if type(self) != type(other): return False |
| 1111 | if self.value != other.value: return False |
| 1112 | return True |
| 1113 | |
| 1114 | def pretty_print(self, q): |
| 1115 | q.text("icmpv6_type {") |
| 1116 | with q.group(): |
| 1117 | with q.indent(2): |
| 1118 | q.breakable() |
| 1119 | q.text("value = "); |
| 1120 | q.text("%#x" % self.value) |
| 1121 | q.breakable() |
| 1122 | q.text('}') |
| 1123 | |
| 1124 | oxm.subtypes[2147498497] = icmpv6_type |
| 1125 | |
| 1126 | class icmpv6_type_masked(oxm): |
| 1127 | type_len = 2147498754 |
| 1128 | |
| 1129 | def __init__(self, value=None, value_mask=None): |
| 1130 | if value != None: |
| 1131 | self.value = value |
| 1132 | else: |
| 1133 | self.value = 0 |
| 1134 | if value_mask != None: |
| 1135 | self.value_mask = value_mask |
| 1136 | else: |
| 1137 | self.value_mask = 0 |
| 1138 | return |
| 1139 | |
| 1140 | def pack(self): |
| 1141 | packed = [] |
| 1142 | packed.append(struct.pack("!L", self.type_len)) |
| 1143 | packed.append(struct.pack("!B", self.value)) |
| 1144 | packed.append(struct.pack("!B", self.value_mask)) |
| 1145 | return ''.join(packed) |
| 1146 | |
| 1147 | @staticmethod |
| 1148 | def unpack(reader): |
| 1149 | obj = icmpv6_type_masked() |
| 1150 | _type_len = reader.read("!L")[0] |
| 1151 | assert(_type_len == 2147498754) |
| 1152 | obj.value = reader.read("!B")[0] |
| 1153 | obj.value_mask = reader.read("!B")[0] |
| 1154 | return obj |
| 1155 | |
| 1156 | def __eq__(self, other): |
| 1157 | if type(self) != type(other): return False |
| 1158 | if self.value != other.value: return False |
| 1159 | if self.value_mask != other.value_mask: return False |
| 1160 | return True |
| 1161 | |
| 1162 | def pretty_print(self, q): |
| 1163 | q.text("icmpv6_type_masked {") |
| 1164 | with q.group(): |
| 1165 | with q.indent(2): |
| 1166 | q.breakable() |
| 1167 | q.text("value = "); |
| 1168 | q.text("%#x" % self.value) |
| 1169 | q.text(","); q.breakable() |
| 1170 | q.text("value_mask = "); |
| 1171 | q.text("%#x" % self.value_mask) |
| 1172 | q.breakable() |
| 1173 | q.text('}') |
| 1174 | |
| 1175 | oxm.subtypes[2147498754] = icmpv6_type_masked |
| 1176 | |
| 1177 | class in_phy_port(oxm): |
| 1178 | type_len = 2147484164 |
| 1179 | |
| 1180 | def __init__(self, value=None): |
| 1181 | if value != None: |
| 1182 | self.value = value |
| 1183 | else: |
| 1184 | self.value = 0 |
| 1185 | return |
| 1186 | |
| 1187 | def pack(self): |
| 1188 | packed = [] |
| 1189 | packed.append(struct.pack("!L", self.type_len)) |
| 1190 | packed.append(util.pack_port_no(self.value)) |
| 1191 | return ''.join(packed) |
| 1192 | |
| 1193 | @staticmethod |
| 1194 | def unpack(reader): |
| 1195 | obj = in_phy_port() |
| 1196 | _type_len = reader.read("!L")[0] |
| 1197 | assert(_type_len == 2147484164) |
| 1198 | obj.value = util.unpack_port_no(reader) |
| 1199 | return obj |
| 1200 | |
| 1201 | def __eq__(self, other): |
| 1202 | if type(self) != type(other): return False |
| 1203 | if self.value != other.value: return False |
| 1204 | return True |
| 1205 | |
| 1206 | def pretty_print(self, q): |
| 1207 | q.text("in_phy_port {") |
| 1208 | with q.group(): |
| 1209 | with q.indent(2): |
| 1210 | q.breakable() |
| 1211 | q.text("value = "); |
| 1212 | q.text(util.pretty_port(self.value)) |
| 1213 | q.breakable() |
| 1214 | q.text('}') |
| 1215 | |
| 1216 | oxm.subtypes[2147484164] = in_phy_port |
| 1217 | |
| 1218 | class in_phy_port_masked(oxm): |
| 1219 | type_len = 2147484424 |
| 1220 | |
| 1221 | def __init__(self, value=None, value_mask=None): |
| 1222 | if value != None: |
| 1223 | self.value = value |
| 1224 | else: |
| 1225 | self.value = 0 |
| 1226 | if value_mask != None: |
| 1227 | self.value_mask = value_mask |
| 1228 | else: |
| 1229 | self.value_mask = 0 |
| 1230 | return |
| 1231 | |
| 1232 | def pack(self): |
| 1233 | packed = [] |
| 1234 | packed.append(struct.pack("!L", self.type_len)) |
| 1235 | packed.append(util.pack_port_no(self.value)) |
| 1236 | packed.append(util.pack_port_no(self.value_mask)) |
| 1237 | return ''.join(packed) |
| 1238 | |
| 1239 | @staticmethod |
| 1240 | def unpack(reader): |
| 1241 | obj = in_phy_port_masked() |
| 1242 | _type_len = reader.read("!L")[0] |
| 1243 | assert(_type_len == 2147484424) |
| 1244 | obj.value = util.unpack_port_no(reader) |
| 1245 | obj.value_mask = util.unpack_port_no(reader) |
| 1246 | return obj |
| 1247 | |
| 1248 | def __eq__(self, other): |
| 1249 | if type(self) != type(other): return False |
| 1250 | if self.value != other.value: return False |
| 1251 | if self.value_mask != other.value_mask: return False |
| 1252 | return True |
| 1253 | |
| 1254 | def pretty_print(self, q): |
| 1255 | q.text("in_phy_port_masked {") |
| 1256 | with q.group(): |
| 1257 | with q.indent(2): |
| 1258 | q.breakable() |
| 1259 | q.text("value = "); |
| 1260 | q.text(util.pretty_port(self.value)) |
| 1261 | q.text(","); q.breakable() |
| 1262 | q.text("value_mask = "); |
| 1263 | q.text(util.pretty_port(self.value_mask)) |
| 1264 | q.breakable() |
| 1265 | q.text('}') |
| 1266 | |
| 1267 | oxm.subtypes[2147484424] = in_phy_port_masked |
| 1268 | |
| 1269 | class in_port(oxm): |
| 1270 | type_len = 2147483652 |
| 1271 | |
| 1272 | def __init__(self, value=None): |
| 1273 | if value != None: |
| 1274 | self.value = value |
| 1275 | else: |
| 1276 | self.value = 0 |
| 1277 | return |
| 1278 | |
| 1279 | def pack(self): |
| 1280 | packed = [] |
| 1281 | packed.append(struct.pack("!L", self.type_len)) |
| 1282 | packed.append(util.pack_port_no(self.value)) |
| 1283 | return ''.join(packed) |
| 1284 | |
| 1285 | @staticmethod |
| 1286 | def unpack(reader): |
| 1287 | obj = in_port() |
| 1288 | _type_len = reader.read("!L")[0] |
| 1289 | assert(_type_len == 2147483652) |
| 1290 | obj.value = util.unpack_port_no(reader) |
| 1291 | return obj |
| 1292 | |
| 1293 | def __eq__(self, other): |
| 1294 | if type(self) != type(other): return False |
| 1295 | if self.value != other.value: return False |
| 1296 | return True |
| 1297 | |
| 1298 | def pretty_print(self, q): |
| 1299 | q.text("in_port {") |
| 1300 | with q.group(): |
| 1301 | with q.indent(2): |
| 1302 | q.breakable() |
| 1303 | q.text("value = "); |
| 1304 | q.text(util.pretty_port(self.value)) |
| 1305 | q.breakable() |
| 1306 | q.text('}') |
| 1307 | |
| 1308 | oxm.subtypes[2147483652] = in_port |
| 1309 | |
| 1310 | class in_port_masked(oxm): |
| 1311 | type_len = 2147483912 |
| 1312 | |
| 1313 | def __init__(self, value=None, value_mask=None): |
| 1314 | if value != None: |
| 1315 | self.value = value |
| 1316 | else: |
| 1317 | self.value = 0 |
| 1318 | if value_mask != None: |
| 1319 | self.value_mask = value_mask |
| 1320 | else: |
| 1321 | self.value_mask = 0 |
| 1322 | return |
| 1323 | |
| 1324 | def pack(self): |
| 1325 | packed = [] |
| 1326 | packed.append(struct.pack("!L", self.type_len)) |
| 1327 | packed.append(util.pack_port_no(self.value)) |
| 1328 | packed.append(util.pack_port_no(self.value_mask)) |
| 1329 | return ''.join(packed) |
| 1330 | |
| 1331 | @staticmethod |
| 1332 | def unpack(reader): |
| 1333 | obj = in_port_masked() |
| 1334 | _type_len = reader.read("!L")[0] |
| 1335 | assert(_type_len == 2147483912) |
| 1336 | obj.value = util.unpack_port_no(reader) |
| 1337 | obj.value_mask = util.unpack_port_no(reader) |
| 1338 | return obj |
| 1339 | |
| 1340 | def __eq__(self, other): |
| 1341 | if type(self) != type(other): return False |
| 1342 | if self.value != other.value: return False |
| 1343 | if self.value_mask != other.value_mask: return False |
| 1344 | return True |
| 1345 | |
| 1346 | def pretty_print(self, q): |
| 1347 | q.text("in_port_masked {") |
| 1348 | with q.group(): |
| 1349 | with q.indent(2): |
| 1350 | q.breakable() |
| 1351 | q.text("value = "); |
| 1352 | q.text(util.pretty_port(self.value)) |
| 1353 | q.text(","); q.breakable() |
| 1354 | q.text("value_mask = "); |
| 1355 | q.text(util.pretty_port(self.value_mask)) |
| 1356 | q.breakable() |
| 1357 | q.text('}') |
| 1358 | |
| 1359 | oxm.subtypes[2147483912] = in_port_masked |
| 1360 | |
| 1361 | class ip_dscp(oxm): |
| 1362 | type_len = 2147487745 |
| 1363 | |
| 1364 | def __init__(self, value=None): |
| 1365 | if value != None: |
| 1366 | self.value = value |
| 1367 | else: |
| 1368 | self.value = 0 |
| 1369 | return |
| 1370 | |
| 1371 | def pack(self): |
| 1372 | packed = [] |
| 1373 | packed.append(struct.pack("!L", self.type_len)) |
| 1374 | packed.append(struct.pack("!B", self.value)) |
| 1375 | return ''.join(packed) |
| 1376 | |
| 1377 | @staticmethod |
| 1378 | def unpack(reader): |
| 1379 | obj = ip_dscp() |
| 1380 | _type_len = reader.read("!L")[0] |
| 1381 | assert(_type_len == 2147487745) |
| 1382 | obj.value = reader.read("!B")[0] |
| 1383 | return obj |
| 1384 | |
| 1385 | def __eq__(self, other): |
| 1386 | if type(self) != type(other): return False |
| 1387 | if self.value != other.value: return False |
| 1388 | return True |
| 1389 | |
| 1390 | def pretty_print(self, q): |
| 1391 | q.text("ip_dscp {") |
| 1392 | with q.group(): |
| 1393 | with q.indent(2): |
| 1394 | q.breakable() |
| 1395 | q.text("value = "); |
| 1396 | q.text("%#x" % self.value) |
| 1397 | q.breakable() |
| 1398 | q.text('}') |
| 1399 | |
| 1400 | oxm.subtypes[2147487745] = ip_dscp |
| 1401 | |
| 1402 | class ip_dscp_masked(oxm): |
| 1403 | type_len = 2147488002 |
| 1404 | |
| 1405 | def __init__(self, value=None, value_mask=None): |
| 1406 | if value != None: |
| 1407 | self.value = value |
| 1408 | else: |
| 1409 | self.value = 0 |
| 1410 | if value_mask != None: |
| 1411 | self.value_mask = value_mask |
| 1412 | else: |
| 1413 | self.value_mask = 0 |
| 1414 | return |
| 1415 | |
| 1416 | def pack(self): |
| 1417 | packed = [] |
| 1418 | packed.append(struct.pack("!L", self.type_len)) |
| 1419 | packed.append(struct.pack("!B", self.value)) |
| 1420 | packed.append(struct.pack("!B", self.value_mask)) |
| 1421 | return ''.join(packed) |
| 1422 | |
| 1423 | @staticmethod |
| 1424 | def unpack(reader): |
| 1425 | obj = ip_dscp_masked() |
| 1426 | _type_len = reader.read("!L")[0] |
| 1427 | assert(_type_len == 2147488002) |
| 1428 | obj.value = reader.read("!B")[0] |
| 1429 | obj.value_mask = reader.read("!B")[0] |
| 1430 | return obj |
| 1431 | |
| 1432 | def __eq__(self, other): |
| 1433 | if type(self) != type(other): return False |
| 1434 | if self.value != other.value: return False |
| 1435 | if self.value_mask != other.value_mask: return False |
| 1436 | return True |
| 1437 | |
| 1438 | def pretty_print(self, q): |
| 1439 | q.text("ip_dscp_masked {") |
| 1440 | with q.group(): |
| 1441 | with q.indent(2): |
| 1442 | q.breakable() |
| 1443 | q.text("value = "); |
| 1444 | q.text("%#x" % self.value) |
| 1445 | q.text(","); q.breakable() |
| 1446 | q.text("value_mask = "); |
| 1447 | q.text("%#x" % self.value_mask) |
| 1448 | q.breakable() |
| 1449 | q.text('}') |
| 1450 | |
| 1451 | oxm.subtypes[2147488002] = ip_dscp_masked |
| 1452 | |
| 1453 | class ip_ecn(oxm): |
| 1454 | type_len = 2147488257 |
| 1455 | |
| 1456 | def __init__(self, value=None): |
| 1457 | if value != None: |
| 1458 | self.value = value |
| 1459 | else: |
| 1460 | self.value = 0 |
| 1461 | return |
| 1462 | |
| 1463 | def pack(self): |
| 1464 | packed = [] |
| 1465 | packed.append(struct.pack("!L", self.type_len)) |
| 1466 | packed.append(struct.pack("!B", self.value)) |
| 1467 | return ''.join(packed) |
| 1468 | |
| 1469 | @staticmethod |
| 1470 | def unpack(reader): |
| 1471 | obj = ip_ecn() |
| 1472 | _type_len = reader.read("!L")[0] |
| 1473 | assert(_type_len == 2147488257) |
| 1474 | obj.value = reader.read("!B")[0] |
| 1475 | return obj |
| 1476 | |
| 1477 | def __eq__(self, other): |
| 1478 | if type(self) != type(other): return False |
| 1479 | if self.value != other.value: return False |
| 1480 | return True |
| 1481 | |
| 1482 | def pretty_print(self, q): |
| 1483 | q.text("ip_ecn {") |
| 1484 | with q.group(): |
| 1485 | with q.indent(2): |
| 1486 | q.breakable() |
| 1487 | q.text("value = "); |
| 1488 | q.text("%#x" % self.value) |
| 1489 | q.breakable() |
| 1490 | q.text('}') |
| 1491 | |
| 1492 | oxm.subtypes[2147488257] = ip_ecn |
| 1493 | |
| 1494 | class ip_ecn_masked(oxm): |
| 1495 | type_len = 2147488514 |
| 1496 | |
| 1497 | def __init__(self, value=None, value_mask=None): |
| 1498 | if value != None: |
| 1499 | self.value = value |
| 1500 | else: |
| 1501 | self.value = 0 |
| 1502 | if value_mask != None: |
| 1503 | self.value_mask = value_mask |
| 1504 | else: |
| 1505 | self.value_mask = 0 |
| 1506 | return |
| 1507 | |
| 1508 | def pack(self): |
| 1509 | packed = [] |
| 1510 | packed.append(struct.pack("!L", self.type_len)) |
| 1511 | packed.append(struct.pack("!B", self.value)) |
| 1512 | packed.append(struct.pack("!B", self.value_mask)) |
| 1513 | return ''.join(packed) |
| 1514 | |
| 1515 | @staticmethod |
| 1516 | def unpack(reader): |
| 1517 | obj = ip_ecn_masked() |
| 1518 | _type_len = reader.read("!L")[0] |
| 1519 | assert(_type_len == 2147488514) |
| 1520 | obj.value = reader.read("!B")[0] |
| 1521 | obj.value_mask = reader.read("!B")[0] |
| 1522 | return obj |
| 1523 | |
| 1524 | def __eq__(self, other): |
| 1525 | if type(self) != type(other): return False |
| 1526 | if self.value != other.value: return False |
| 1527 | if self.value_mask != other.value_mask: return False |
| 1528 | return True |
| 1529 | |
| 1530 | def pretty_print(self, q): |
| 1531 | q.text("ip_ecn_masked {") |
| 1532 | with q.group(): |
| 1533 | with q.indent(2): |
| 1534 | q.breakable() |
| 1535 | q.text("value = "); |
| 1536 | q.text("%#x" % self.value) |
| 1537 | q.text(","); q.breakable() |
| 1538 | q.text("value_mask = "); |
| 1539 | q.text("%#x" % self.value_mask) |
| 1540 | q.breakable() |
| 1541 | q.text('}') |
| 1542 | |
| 1543 | oxm.subtypes[2147488514] = ip_ecn_masked |
| 1544 | |
| 1545 | class ip_proto(oxm): |
| 1546 | type_len = 2147488769 |
| 1547 | |
| 1548 | def __init__(self, value=None): |
| 1549 | if value != None: |
| 1550 | self.value = value |
| 1551 | else: |
| 1552 | self.value = 0 |
| 1553 | return |
| 1554 | |
| 1555 | def pack(self): |
| 1556 | packed = [] |
| 1557 | packed.append(struct.pack("!L", self.type_len)) |
| 1558 | packed.append(struct.pack("!B", self.value)) |
| 1559 | return ''.join(packed) |
| 1560 | |
| 1561 | @staticmethod |
| 1562 | def unpack(reader): |
| 1563 | obj = ip_proto() |
| 1564 | _type_len = reader.read("!L")[0] |
| 1565 | assert(_type_len == 2147488769) |
| 1566 | obj.value = reader.read("!B")[0] |
| 1567 | return obj |
| 1568 | |
| 1569 | def __eq__(self, other): |
| 1570 | if type(self) != type(other): return False |
| 1571 | if self.value != other.value: return False |
| 1572 | return True |
| 1573 | |
| 1574 | def pretty_print(self, q): |
| 1575 | q.text("ip_proto {") |
| 1576 | with q.group(): |
| 1577 | with q.indent(2): |
| 1578 | q.breakable() |
| 1579 | q.text("value = "); |
| 1580 | q.text("%#x" % self.value) |
| 1581 | q.breakable() |
| 1582 | q.text('}') |
| 1583 | |
| 1584 | oxm.subtypes[2147488769] = ip_proto |
| 1585 | |
| 1586 | class ip_proto_masked(oxm): |
| 1587 | type_len = 2147489026 |
| 1588 | |
| 1589 | def __init__(self, value=None, value_mask=None): |
| 1590 | if value != None: |
| 1591 | self.value = value |
| 1592 | else: |
| 1593 | self.value = 0 |
| 1594 | if value_mask != None: |
| 1595 | self.value_mask = value_mask |
| 1596 | else: |
| 1597 | self.value_mask = 0 |
| 1598 | return |
| 1599 | |
| 1600 | def pack(self): |
| 1601 | packed = [] |
| 1602 | packed.append(struct.pack("!L", self.type_len)) |
| 1603 | packed.append(struct.pack("!B", self.value)) |
| 1604 | packed.append(struct.pack("!B", self.value_mask)) |
| 1605 | return ''.join(packed) |
| 1606 | |
| 1607 | @staticmethod |
| 1608 | def unpack(reader): |
| 1609 | obj = ip_proto_masked() |
| 1610 | _type_len = reader.read("!L")[0] |
| 1611 | assert(_type_len == 2147489026) |
| 1612 | obj.value = reader.read("!B")[0] |
| 1613 | obj.value_mask = reader.read("!B")[0] |
| 1614 | return obj |
| 1615 | |
| 1616 | def __eq__(self, other): |
| 1617 | if type(self) != type(other): return False |
| 1618 | if self.value != other.value: return False |
| 1619 | if self.value_mask != other.value_mask: return False |
| 1620 | return True |
| 1621 | |
| 1622 | def pretty_print(self, q): |
| 1623 | q.text("ip_proto_masked {") |
| 1624 | with q.group(): |
| 1625 | with q.indent(2): |
| 1626 | q.breakable() |
| 1627 | q.text("value = "); |
| 1628 | q.text("%#x" % self.value) |
| 1629 | q.text(","); q.breakable() |
| 1630 | q.text("value_mask = "); |
| 1631 | q.text("%#x" % self.value_mask) |
| 1632 | q.breakable() |
| 1633 | q.text('}') |
| 1634 | |
| 1635 | oxm.subtypes[2147489026] = ip_proto_masked |
| 1636 | |
| 1637 | class ipv4_dst(oxm): |
| 1638 | type_len = 2147489796 |
| 1639 | |
| 1640 | def __init__(self, value=None): |
| 1641 | if value != None: |
| 1642 | self.value = value |
| 1643 | else: |
| 1644 | self.value = 0 |
| 1645 | return |
| 1646 | |
| 1647 | def pack(self): |
| 1648 | packed = [] |
| 1649 | packed.append(struct.pack("!L", self.type_len)) |
| 1650 | packed.append(struct.pack("!L", self.value)) |
| 1651 | return ''.join(packed) |
| 1652 | |
| 1653 | @staticmethod |
| 1654 | def unpack(reader): |
| 1655 | obj = ipv4_dst() |
| 1656 | _type_len = reader.read("!L")[0] |
| 1657 | assert(_type_len == 2147489796) |
| 1658 | obj.value = reader.read("!L")[0] |
| 1659 | return obj |
| 1660 | |
| 1661 | def __eq__(self, other): |
| 1662 | if type(self) != type(other): return False |
| 1663 | if self.value != other.value: return False |
| 1664 | return True |
| 1665 | |
| 1666 | def pretty_print(self, q): |
| 1667 | q.text("ipv4_dst {") |
| 1668 | with q.group(): |
| 1669 | with q.indent(2): |
| 1670 | q.breakable() |
| 1671 | q.text("value = "); |
| 1672 | q.text(util.pretty_ipv4(self.value)) |
| 1673 | q.breakable() |
| 1674 | q.text('}') |
| 1675 | |
| 1676 | oxm.subtypes[2147489796] = ipv4_dst |
| 1677 | |
| 1678 | class ipv4_dst_masked(oxm): |
| 1679 | type_len = 2147490056 |
| 1680 | |
| 1681 | def __init__(self, value=None, value_mask=None): |
| 1682 | if value != None: |
| 1683 | self.value = value |
| 1684 | else: |
| 1685 | self.value = 0 |
| 1686 | if value_mask != None: |
| 1687 | self.value_mask = value_mask |
| 1688 | else: |
| 1689 | self.value_mask = 0 |
| 1690 | return |
| 1691 | |
| 1692 | def pack(self): |
| 1693 | packed = [] |
| 1694 | packed.append(struct.pack("!L", self.type_len)) |
| 1695 | packed.append(struct.pack("!L", self.value)) |
| 1696 | packed.append(struct.pack("!L", self.value_mask)) |
| 1697 | return ''.join(packed) |
| 1698 | |
| 1699 | @staticmethod |
| 1700 | def unpack(reader): |
| 1701 | obj = ipv4_dst_masked() |
| 1702 | _type_len = reader.read("!L")[0] |
| 1703 | assert(_type_len == 2147490056) |
| 1704 | obj.value = reader.read("!L")[0] |
| 1705 | obj.value_mask = reader.read("!L")[0] |
| 1706 | return obj |
| 1707 | |
| 1708 | def __eq__(self, other): |
| 1709 | if type(self) != type(other): return False |
| 1710 | if self.value != other.value: return False |
| 1711 | if self.value_mask != other.value_mask: return False |
| 1712 | return True |
| 1713 | |
| 1714 | def pretty_print(self, q): |
| 1715 | q.text("ipv4_dst_masked {") |
| 1716 | with q.group(): |
| 1717 | with q.indent(2): |
| 1718 | q.breakable() |
| 1719 | q.text("value = "); |
| 1720 | q.text(util.pretty_ipv4(self.value)) |
| 1721 | q.text(","); q.breakable() |
| 1722 | q.text("value_mask = "); |
| 1723 | q.text(util.pretty_ipv4(self.value_mask)) |
| 1724 | q.breakable() |
| 1725 | q.text('}') |
| 1726 | |
| 1727 | oxm.subtypes[2147490056] = ipv4_dst_masked |
| 1728 | |
| 1729 | class ipv4_src(oxm): |
| 1730 | type_len = 2147489284 |
| 1731 | |
| 1732 | def __init__(self, value=None): |
| 1733 | if value != None: |
| 1734 | self.value = value |
| 1735 | else: |
| 1736 | self.value = 0 |
| 1737 | return |
| 1738 | |
| 1739 | def pack(self): |
| 1740 | packed = [] |
| 1741 | packed.append(struct.pack("!L", self.type_len)) |
| 1742 | packed.append(struct.pack("!L", self.value)) |
| 1743 | return ''.join(packed) |
| 1744 | |
| 1745 | @staticmethod |
| 1746 | def unpack(reader): |
| 1747 | obj = ipv4_src() |
| 1748 | _type_len = reader.read("!L")[0] |
| 1749 | assert(_type_len == 2147489284) |
| 1750 | obj.value = reader.read("!L")[0] |
| 1751 | return obj |
| 1752 | |
| 1753 | def __eq__(self, other): |
| 1754 | if type(self) != type(other): return False |
| 1755 | if self.value != other.value: return False |
| 1756 | return True |
| 1757 | |
| 1758 | def pretty_print(self, q): |
| 1759 | q.text("ipv4_src {") |
| 1760 | with q.group(): |
| 1761 | with q.indent(2): |
| 1762 | q.breakable() |
| 1763 | q.text("value = "); |
| 1764 | q.text(util.pretty_ipv4(self.value)) |
| 1765 | q.breakable() |
| 1766 | q.text('}') |
| 1767 | |
| 1768 | oxm.subtypes[2147489284] = ipv4_src |
| 1769 | |
| 1770 | class ipv4_src_masked(oxm): |
| 1771 | type_len = 2147489544 |
| 1772 | |
| 1773 | def __init__(self, value=None, value_mask=None): |
| 1774 | if value != None: |
| 1775 | self.value = value |
| 1776 | else: |
| 1777 | self.value = 0 |
| 1778 | if value_mask != None: |
| 1779 | self.value_mask = value_mask |
| 1780 | else: |
| 1781 | self.value_mask = 0 |
| 1782 | return |
| 1783 | |
| 1784 | def pack(self): |
| 1785 | packed = [] |
| 1786 | packed.append(struct.pack("!L", self.type_len)) |
| 1787 | packed.append(struct.pack("!L", self.value)) |
| 1788 | packed.append(struct.pack("!L", self.value_mask)) |
| 1789 | return ''.join(packed) |
| 1790 | |
| 1791 | @staticmethod |
| 1792 | def unpack(reader): |
| 1793 | obj = ipv4_src_masked() |
| 1794 | _type_len = reader.read("!L")[0] |
| 1795 | assert(_type_len == 2147489544) |
| 1796 | obj.value = reader.read("!L")[0] |
| 1797 | obj.value_mask = reader.read("!L")[0] |
| 1798 | return obj |
| 1799 | |
| 1800 | def __eq__(self, other): |
| 1801 | if type(self) != type(other): return False |
| 1802 | if self.value != other.value: return False |
| 1803 | if self.value_mask != other.value_mask: return False |
| 1804 | return True |
| 1805 | |
| 1806 | def pretty_print(self, q): |
| 1807 | q.text("ipv4_src_masked {") |
| 1808 | with q.group(): |
| 1809 | with q.indent(2): |
| 1810 | q.breakable() |
| 1811 | q.text("value = "); |
| 1812 | q.text(util.pretty_ipv4(self.value)) |
| 1813 | q.text(","); q.breakable() |
| 1814 | q.text("value_mask = "); |
| 1815 | q.text(util.pretty_ipv4(self.value_mask)) |
| 1816 | q.breakable() |
| 1817 | q.text('}') |
| 1818 | |
| 1819 | oxm.subtypes[2147489544] = ipv4_src_masked |
| 1820 | |
| 1821 | class ipv6_dst(oxm): |
| 1822 | type_len = 2147497488 |
| 1823 | |
| 1824 | def __init__(self, value=None): |
| 1825 | if value != None: |
| 1826 | self.value = value |
| 1827 | else: |
| 1828 | self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
| 1829 | return |
| 1830 | |
| 1831 | def pack(self): |
| 1832 | packed = [] |
| 1833 | packed.append(struct.pack("!L", self.type_len)) |
| 1834 | packed.append(struct.pack("!16s", self.value)) |
| 1835 | return ''.join(packed) |
| 1836 | |
| 1837 | @staticmethod |
| 1838 | def unpack(reader): |
| 1839 | obj = ipv6_dst() |
| 1840 | _type_len = reader.read("!L")[0] |
| 1841 | assert(_type_len == 2147497488) |
| 1842 | obj.value = reader.read('!16s')[0] |
| 1843 | return obj |
| 1844 | |
| 1845 | def __eq__(self, other): |
| 1846 | if type(self) != type(other): return False |
| 1847 | if self.value != other.value: return False |
| 1848 | return True |
| 1849 | |
| 1850 | def pretty_print(self, q): |
| 1851 | q.text("ipv6_dst {") |
| 1852 | with q.group(): |
| 1853 | with q.indent(2): |
| 1854 | q.breakable() |
| 1855 | q.text("value = "); |
| 1856 | q.pp(self.value) |
| 1857 | q.breakable() |
| 1858 | q.text('}') |
| 1859 | |
| 1860 | oxm.subtypes[2147497488] = ipv6_dst |
| 1861 | |
| 1862 | class ipv6_dst_masked(oxm): |
| 1863 | type_len = 2147497760 |
| 1864 | |
| 1865 | def __init__(self, value=None, value_mask=None): |
| 1866 | if value != None: |
| 1867 | self.value = value |
| 1868 | else: |
| 1869 | self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
| 1870 | if value_mask != None: |
| 1871 | self.value_mask = value_mask |
| 1872 | else: |
| 1873 | self.value_mask = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
| 1874 | return |
| 1875 | |
| 1876 | def pack(self): |
| 1877 | packed = [] |
| 1878 | packed.append(struct.pack("!L", self.type_len)) |
| 1879 | packed.append(struct.pack("!16s", self.value)) |
| 1880 | packed.append(struct.pack("!16s", self.value_mask)) |
| 1881 | return ''.join(packed) |
| 1882 | |
| 1883 | @staticmethod |
| 1884 | def unpack(reader): |
| 1885 | obj = ipv6_dst_masked() |
| 1886 | _type_len = reader.read("!L")[0] |
| 1887 | assert(_type_len == 2147497760) |
| 1888 | obj.value = reader.read('!16s')[0] |
| 1889 | obj.value_mask = reader.read('!16s')[0] |
| 1890 | return obj |
| 1891 | |
| 1892 | def __eq__(self, other): |
| 1893 | if type(self) != type(other): return False |
| 1894 | if self.value != other.value: return False |
| 1895 | if self.value_mask != other.value_mask: return False |
| 1896 | return True |
| 1897 | |
| 1898 | def pretty_print(self, q): |
| 1899 | q.text("ipv6_dst_masked {") |
| 1900 | with q.group(): |
| 1901 | with q.indent(2): |
| 1902 | q.breakable() |
| 1903 | q.text("value = "); |
| 1904 | q.pp(self.value) |
| 1905 | q.text(","); q.breakable() |
| 1906 | q.text("value_mask = "); |
| 1907 | q.pp(self.value_mask) |
| 1908 | q.breakable() |
| 1909 | q.text('}') |
| 1910 | |
| 1911 | oxm.subtypes[2147497760] = ipv6_dst_masked |
| 1912 | |
| 1913 | class ipv6_flabel(oxm): |
| 1914 | type_len = 2147497988 |
| 1915 | |
| 1916 | def __init__(self, value=None): |
| 1917 | if value != None: |
| 1918 | self.value = value |
| 1919 | else: |
| 1920 | self.value = 0 |
| 1921 | return |
| 1922 | |
| 1923 | def pack(self): |
| 1924 | packed = [] |
| 1925 | packed.append(struct.pack("!L", self.type_len)) |
| 1926 | packed.append(struct.pack("!L", self.value)) |
| 1927 | return ''.join(packed) |
| 1928 | |
| 1929 | @staticmethod |
| 1930 | def unpack(reader): |
| 1931 | obj = ipv6_flabel() |
| 1932 | _type_len = reader.read("!L")[0] |
| 1933 | assert(_type_len == 2147497988) |
| 1934 | obj.value = reader.read("!L")[0] |
| 1935 | return obj |
| 1936 | |
| 1937 | def __eq__(self, other): |
| 1938 | if type(self) != type(other): return False |
| 1939 | if self.value != other.value: return False |
| 1940 | return True |
| 1941 | |
| 1942 | def pretty_print(self, q): |
| 1943 | q.text("ipv6_flabel {") |
| 1944 | with q.group(): |
| 1945 | with q.indent(2): |
| 1946 | q.breakable() |
| 1947 | q.text("value = "); |
| 1948 | q.text("%#x" % self.value) |
| 1949 | q.breakable() |
| 1950 | q.text('}') |
| 1951 | |
| 1952 | oxm.subtypes[2147497988] = ipv6_flabel |
| 1953 | |
| 1954 | class ipv6_flabel_masked(oxm): |
| 1955 | type_len = 2147498248 |
| 1956 | |
| 1957 | def __init__(self, value=None, value_mask=None): |
| 1958 | if value != None: |
| 1959 | self.value = value |
| 1960 | else: |
| 1961 | self.value = 0 |
| 1962 | if value_mask != None: |
| 1963 | self.value_mask = value_mask |
| 1964 | else: |
| 1965 | self.value_mask = 0 |
| 1966 | return |
| 1967 | |
| 1968 | def pack(self): |
| 1969 | packed = [] |
| 1970 | packed.append(struct.pack("!L", self.type_len)) |
| 1971 | packed.append(struct.pack("!L", self.value)) |
| 1972 | packed.append(struct.pack("!L", self.value_mask)) |
| 1973 | return ''.join(packed) |
| 1974 | |
| 1975 | @staticmethod |
| 1976 | def unpack(reader): |
| 1977 | obj = ipv6_flabel_masked() |
| 1978 | _type_len = reader.read("!L")[0] |
| 1979 | assert(_type_len == 2147498248) |
| 1980 | obj.value = reader.read("!L")[0] |
| 1981 | obj.value_mask = reader.read("!L")[0] |
| 1982 | return obj |
| 1983 | |
| 1984 | def __eq__(self, other): |
| 1985 | if type(self) != type(other): return False |
| 1986 | if self.value != other.value: return False |
| 1987 | if self.value_mask != other.value_mask: return False |
| 1988 | return True |
| 1989 | |
| 1990 | def pretty_print(self, q): |
| 1991 | q.text("ipv6_flabel_masked {") |
| 1992 | with q.group(): |
| 1993 | with q.indent(2): |
| 1994 | q.breakable() |
| 1995 | q.text("value = "); |
| 1996 | q.text("%#x" % self.value) |
| 1997 | q.text(","); q.breakable() |
| 1998 | q.text("value_mask = "); |
| 1999 | q.text("%#x" % self.value_mask) |
| 2000 | q.breakable() |
| 2001 | q.text('}') |
| 2002 | |
| 2003 | oxm.subtypes[2147498248] = ipv6_flabel_masked |
| 2004 | |
| 2005 | class ipv6_nd_sll(oxm): |
| 2006 | type_len = 2147500038 |
| 2007 | |
| 2008 | def __init__(self, value=None): |
| 2009 | if value != None: |
| 2010 | self.value = value |
| 2011 | else: |
| 2012 | self.value = [0,0,0,0,0,0] |
| 2013 | return |
| 2014 | |
| 2015 | def pack(self): |
| 2016 | packed = [] |
| 2017 | packed.append(struct.pack("!L", self.type_len)) |
| 2018 | packed.append(struct.pack("!6B", *self.value)) |
| 2019 | return ''.join(packed) |
| 2020 | |
| 2021 | @staticmethod |
| 2022 | def unpack(reader): |
| 2023 | obj = ipv6_nd_sll() |
| 2024 | _type_len = reader.read("!L")[0] |
| 2025 | assert(_type_len == 2147500038) |
| 2026 | obj.value = list(reader.read('!6B')) |
| 2027 | return obj |
| 2028 | |
| 2029 | def __eq__(self, other): |
| 2030 | if type(self) != type(other): return False |
| 2031 | if self.value != other.value: return False |
| 2032 | return True |
| 2033 | |
| 2034 | def pretty_print(self, q): |
| 2035 | q.text("ipv6_nd_sll {") |
| 2036 | with q.group(): |
| 2037 | with q.indent(2): |
| 2038 | q.breakable() |
| 2039 | q.text("value = "); |
| 2040 | q.text(util.pretty_mac(self.value)) |
| 2041 | q.breakable() |
| 2042 | q.text('}') |
| 2043 | |
| 2044 | oxm.subtypes[2147500038] = ipv6_nd_sll |
| 2045 | |
| 2046 | class ipv6_nd_sll_masked(oxm): |
| 2047 | type_len = 2147500300 |
| 2048 | |
| 2049 | def __init__(self, value=None, value_mask=None): |
| 2050 | if value != None: |
| 2051 | self.value = value |
| 2052 | else: |
| 2053 | self.value = [0,0,0,0,0,0] |
| 2054 | if value_mask != None: |
| 2055 | self.value_mask = value_mask |
| 2056 | else: |
| 2057 | self.value_mask = [0,0,0,0,0,0] |
| 2058 | return |
| 2059 | |
| 2060 | def pack(self): |
| 2061 | packed = [] |
| 2062 | packed.append(struct.pack("!L", self.type_len)) |
| 2063 | packed.append(struct.pack("!6B", *self.value)) |
| 2064 | packed.append(struct.pack("!6B", *self.value_mask)) |
| 2065 | return ''.join(packed) |
| 2066 | |
| 2067 | @staticmethod |
| 2068 | def unpack(reader): |
| 2069 | obj = ipv6_nd_sll_masked() |
| 2070 | _type_len = reader.read("!L")[0] |
| 2071 | assert(_type_len == 2147500300) |
| 2072 | obj.value = list(reader.read('!6B')) |
| 2073 | obj.value_mask = list(reader.read('!6B')) |
| 2074 | return obj |
| 2075 | |
| 2076 | def __eq__(self, other): |
| 2077 | if type(self) != type(other): return False |
| 2078 | if self.value != other.value: return False |
| 2079 | if self.value_mask != other.value_mask: return False |
| 2080 | return True |
| 2081 | |
| 2082 | def pretty_print(self, q): |
| 2083 | q.text("ipv6_nd_sll_masked {") |
| 2084 | with q.group(): |
| 2085 | with q.indent(2): |
| 2086 | q.breakable() |
| 2087 | q.text("value = "); |
| 2088 | q.text(util.pretty_mac(self.value)) |
| 2089 | q.text(","); q.breakable() |
| 2090 | q.text("value_mask = "); |
| 2091 | q.text(util.pretty_mac(self.value_mask)) |
| 2092 | q.breakable() |
| 2093 | q.text('}') |
| 2094 | |
| 2095 | oxm.subtypes[2147500300] = ipv6_nd_sll_masked |
| 2096 | |
| 2097 | class ipv6_nd_target(oxm): |
| 2098 | type_len = 2147499536 |
| 2099 | |
| 2100 | def __init__(self, value=None): |
| 2101 | if value != None: |
| 2102 | self.value = value |
| 2103 | else: |
| 2104 | self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
| 2105 | return |
| 2106 | |
| 2107 | def pack(self): |
| 2108 | packed = [] |
| 2109 | packed.append(struct.pack("!L", self.type_len)) |
| 2110 | packed.append(struct.pack("!16s", self.value)) |
| 2111 | return ''.join(packed) |
| 2112 | |
| 2113 | @staticmethod |
| 2114 | def unpack(reader): |
| 2115 | obj = ipv6_nd_target() |
| 2116 | _type_len = reader.read("!L")[0] |
| 2117 | assert(_type_len == 2147499536) |
| 2118 | obj.value = reader.read('!16s')[0] |
| 2119 | return obj |
| 2120 | |
| 2121 | def __eq__(self, other): |
| 2122 | if type(self) != type(other): return False |
| 2123 | if self.value != other.value: return False |
| 2124 | return True |
| 2125 | |
| 2126 | def pretty_print(self, q): |
| 2127 | q.text("ipv6_nd_target {") |
| 2128 | with q.group(): |
| 2129 | with q.indent(2): |
| 2130 | q.breakable() |
| 2131 | q.text("value = "); |
| 2132 | q.pp(self.value) |
| 2133 | q.breakable() |
| 2134 | q.text('}') |
| 2135 | |
| 2136 | oxm.subtypes[2147499536] = ipv6_nd_target |
| 2137 | |
| 2138 | class ipv6_nd_target_masked(oxm): |
| 2139 | type_len = 2147499808 |
| 2140 | |
| 2141 | def __init__(self, value=None, value_mask=None): |
| 2142 | if value != None: |
| 2143 | self.value = value |
| 2144 | else: |
| 2145 | self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
| 2146 | if value_mask != None: |
| 2147 | self.value_mask = value_mask |
| 2148 | else: |
| 2149 | self.value_mask = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
| 2150 | return |
| 2151 | |
| 2152 | def pack(self): |
| 2153 | packed = [] |
| 2154 | packed.append(struct.pack("!L", self.type_len)) |
| 2155 | packed.append(struct.pack("!16s", self.value)) |
| 2156 | packed.append(struct.pack("!16s", self.value_mask)) |
| 2157 | return ''.join(packed) |
| 2158 | |
| 2159 | @staticmethod |
| 2160 | def unpack(reader): |
| 2161 | obj = ipv6_nd_target_masked() |
| 2162 | _type_len = reader.read("!L")[0] |
| 2163 | assert(_type_len == 2147499808) |
| 2164 | obj.value = reader.read('!16s')[0] |
| 2165 | obj.value_mask = reader.read('!16s')[0] |
| 2166 | return obj |
| 2167 | |
| 2168 | def __eq__(self, other): |
| 2169 | if type(self) != type(other): return False |
| 2170 | if self.value != other.value: return False |
| 2171 | if self.value_mask != other.value_mask: return False |
| 2172 | return True |
| 2173 | |
| 2174 | def pretty_print(self, q): |
| 2175 | q.text("ipv6_nd_target_masked {") |
| 2176 | with q.group(): |
| 2177 | with q.indent(2): |
| 2178 | q.breakable() |
| 2179 | q.text("value = "); |
| 2180 | q.pp(self.value) |
| 2181 | q.text(","); q.breakable() |
| 2182 | q.text("value_mask = "); |
| 2183 | q.pp(self.value_mask) |
| 2184 | q.breakable() |
| 2185 | q.text('}') |
| 2186 | |
| 2187 | oxm.subtypes[2147499808] = ipv6_nd_target_masked |
| 2188 | |
| 2189 | class ipv6_nd_tll(oxm): |
| 2190 | type_len = 2147500550 |
| 2191 | |
| 2192 | def __init__(self, value=None): |
| 2193 | if value != None: |
| 2194 | self.value = value |
| 2195 | else: |
| 2196 | self.value = [0,0,0,0,0,0] |
| 2197 | return |
| 2198 | |
| 2199 | def pack(self): |
| 2200 | packed = [] |
| 2201 | packed.append(struct.pack("!L", self.type_len)) |
| 2202 | packed.append(struct.pack("!6B", *self.value)) |
| 2203 | return ''.join(packed) |
| 2204 | |
| 2205 | @staticmethod |
| 2206 | def unpack(reader): |
| 2207 | obj = ipv6_nd_tll() |
| 2208 | _type_len = reader.read("!L")[0] |
| 2209 | assert(_type_len == 2147500550) |
| 2210 | obj.value = list(reader.read('!6B')) |
| 2211 | return obj |
| 2212 | |
| 2213 | def __eq__(self, other): |
| 2214 | if type(self) != type(other): return False |
| 2215 | if self.value != other.value: return False |
| 2216 | return True |
| 2217 | |
| 2218 | def pretty_print(self, q): |
| 2219 | q.text("ipv6_nd_tll {") |
| 2220 | with q.group(): |
| 2221 | with q.indent(2): |
| 2222 | q.breakable() |
| 2223 | q.text("value = "); |
| 2224 | q.text(util.pretty_mac(self.value)) |
| 2225 | q.breakable() |
| 2226 | q.text('}') |
| 2227 | |
| 2228 | oxm.subtypes[2147500550] = ipv6_nd_tll |
| 2229 | |
| 2230 | class ipv6_nd_tll_masked(oxm): |
| 2231 | type_len = 2147500812 |
| 2232 | |
| 2233 | def __init__(self, value=None, value_mask=None): |
| 2234 | if value != None: |
| 2235 | self.value = value |
| 2236 | else: |
| 2237 | self.value = [0,0,0,0,0,0] |
| 2238 | if value_mask != None: |
| 2239 | self.value_mask = value_mask |
| 2240 | else: |
| 2241 | self.value_mask = [0,0,0,0,0,0] |
| 2242 | return |
| 2243 | |
| 2244 | def pack(self): |
| 2245 | packed = [] |
| 2246 | packed.append(struct.pack("!L", self.type_len)) |
| 2247 | packed.append(struct.pack("!6B", *self.value)) |
| 2248 | packed.append(struct.pack("!6B", *self.value_mask)) |
| 2249 | return ''.join(packed) |
| 2250 | |
| 2251 | @staticmethod |
| 2252 | def unpack(reader): |
| 2253 | obj = ipv6_nd_tll_masked() |
| 2254 | _type_len = reader.read("!L")[0] |
| 2255 | assert(_type_len == 2147500812) |
| 2256 | obj.value = list(reader.read('!6B')) |
| 2257 | obj.value_mask = list(reader.read('!6B')) |
| 2258 | return obj |
| 2259 | |
| 2260 | def __eq__(self, other): |
| 2261 | if type(self) != type(other): return False |
| 2262 | if self.value != other.value: return False |
| 2263 | if self.value_mask != other.value_mask: return False |
| 2264 | return True |
| 2265 | |
| 2266 | def pretty_print(self, q): |
| 2267 | q.text("ipv6_nd_tll_masked {") |
| 2268 | with q.group(): |
| 2269 | with q.indent(2): |
| 2270 | q.breakable() |
| 2271 | q.text("value = "); |
| 2272 | q.text(util.pretty_mac(self.value)) |
| 2273 | q.text(","); q.breakable() |
| 2274 | q.text("value_mask = "); |
| 2275 | q.text(util.pretty_mac(self.value_mask)) |
| 2276 | q.breakable() |
| 2277 | q.text('}') |
| 2278 | |
| 2279 | oxm.subtypes[2147500812] = ipv6_nd_tll_masked |
| 2280 | |
| 2281 | class ipv6_src(oxm): |
| 2282 | type_len = 2147496976 |
| 2283 | |
| 2284 | def __init__(self, value=None): |
| 2285 | if value != None: |
| 2286 | self.value = value |
| 2287 | else: |
| 2288 | self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
| 2289 | return |
| 2290 | |
| 2291 | def pack(self): |
| 2292 | packed = [] |
| 2293 | packed.append(struct.pack("!L", self.type_len)) |
| 2294 | packed.append(struct.pack("!16s", self.value)) |
| 2295 | return ''.join(packed) |
| 2296 | |
| 2297 | @staticmethod |
| 2298 | def unpack(reader): |
| 2299 | obj = ipv6_src() |
| 2300 | _type_len = reader.read("!L")[0] |
| 2301 | assert(_type_len == 2147496976) |
| 2302 | obj.value = reader.read('!16s')[0] |
| 2303 | return obj |
| 2304 | |
| 2305 | def __eq__(self, other): |
| 2306 | if type(self) != type(other): return False |
| 2307 | if self.value != other.value: return False |
| 2308 | return True |
| 2309 | |
| 2310 | def pretty_print(self, q): |
| 2311 | q.text("ipv6_src {") |
| 2312 | with q.group(): |
| 2313 | with q.indent(2): |
| 2314 | q.breakable() |
| 2315 | q.text("value = "); |
| 2316 | q.pp(self.value) |
| 2317 | q.breakable() |
| 2318 | q.text('}') |
| 2319 | |
| 2320 | oxm.subtypes[2147496976] = ipv6_src |
| 2321 | |
| 2322 | class ipv6_src_masked(oxm): |
| 2323 | type_len = 2147497248 |
| 2324 | |
| 2325 | def __init__(self, value=None, value_mask=None): |
| 2326 | if value != None: |
| 2327 | self.value = value |
| 2328 | else: |
| 2329 | self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
| 2330 | if value_mask != None: |
| 2331 | self.value_mask = value_mask |
| 2332 | else: |
| 2333 | self.value_mask = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
| 2334 | return |
| 2335 | |
| 2336 | def pack(self): |
| 2337 | packed = [] |
| 2338 | packed.append(struct.pack("!L", self.type_len)) |
| 2339 | packed.append(struct.pack("!16s", self.value)) |
| 2340 | packed.append(struct.pack("!16s", self.value_mask)) |
| 2341 | return ''.join(packed) |
| 2342 | |
| 2343 | @staticmethod |
| 2344 | def unpack(reader): |
| 2345 | obj = ipv6_src_masked() |
| 2346 | _type_len = reader.read("!L")[0] |
| 2347 | assert(_type_len == 2147497248) |
| 2348 | obj.value = reader.read('!16s')[0] |
| 2349 | obj.value_mask = reader.read('!16s')[0] |
| 2350 | return obj |
| 2351 | |
| 2352 | def __eq__(self, other): |
| 2353 | if type(self) != type(other): return False |
| 2354 | if self.value != other.value: return False |
| 2355 | if self.value_mask != other.value_mask: return False |
| 2356 | return True |
| 2357 | |
| 2358 | def pretty_print(self, q): |
| 2359 | q.text("ipv6_src_masked {") |
| 2360 | with q.group(): |
| 2361 | with q.indent(2): |
| 2362 | q.breakable() |
| 2363 | q.text("value = "); |
| 2364 | q.pp(self.value) |
| 2365 | q.text(","); q.breakable() |
| 2366 | q.text("value_mask = "); |
| 2367 | q.pp(self.value_mask) |
| 2368 | q.breakable() |
| 2369 | q.text('}') |
| 2370 | |
| 2371 | oxm.subtypes[2147497248] = ipv6_src_masked |
| 2372 | |
| 2373 | class metadata(oxm): |
| 2374 | type_len = 2147484680 |
| 2375 | |
| 2376 | def __init__(self, value=None): |
| 2377 | if value != None: |
| 2378 | self.value = value |
| 2379 | else: |
| 2380 | self.value = 0 |
| 2381 | return |
| 2382 | |
| 2383 | def pack(self): |
| 2384 | packed = [] |
| 2385 | packed.append(struct.pack("!L", self.type_len)) |
| 2386 | packed.append(struct.pack("!Q", self.value)) |
| 2387 | return ''.join(packed) |
| 2388 | |
| 2389 | @staticmethod |
| 2390 | def unpack(reader): |
| 2391 | obj = metadata() |
| 2392 | _type_len = reader.read("!L")[0] |
| 2393 | assert(_type_len == 2147484680) |
| 2394 | obj.value = reader.read("!Q")[0] |
| 2395 | return obj |
| 2396 | |
| 2397 | def __eq__(self, other): |
| 2398 | if type(self) != type(other): return False |
| 2399 | if self.value != other.value: return False |
| 2400 | return True |
| 2401 | |
| 2402 | def pretty_print(self, q): |
| 2403 | q.text("metadata {") |
| 2404 | with q.group(): |
| 2405 | with q.indent(2): |
| 2406 | q.breakable() |
| 2407 | q.text("value = "); |
| 2408 | q.text("%#x" % self.value) |
| 2409 | q.breakable() |
| 2410 | q.text('}') |
| 2411 | |
| 2412 | oxm.subtypes[2147484680] = metadata |
| 2413 | |
| 2414 | class metadata_masked(oxm): |
| 2415 | type_len = 2147484944 |
| 2416 | |
| 2417 | def __init__(self, value=None, value_mask=None): |
| 2418 | if value != None: |
| 2419 | self.value = value |
| 2420 | else: |
| 2421 | self.value = 0 |
| 2422 | if value_mask != None: |
| 2423 | self.value_mask = value_mask |
| 2424 | else: |
| 2425 | self.value_mask = 0 |
| 2426 | return |
| 2427 | |
| 2428 | def pack(self): |
| 2429 | packed = [] |
| 2430 | packed.append(struct.pack("!L", self.type_len)) |
| 2431 | packed.append(struct.pack("!Q", self.value)) |
| 2432 | packed.append(struct.pack("!Q", self.value_mask)) |
| 2433 | return ''.join(packed) |
| 2434 | |
| 2435 | @staticmethod |
| 2436 | def unpack(reader): |
| 2437 | obj = metadata_masked() |
| 2438 | _type_len = reader.read("!L")[0] |
| 2439 | assert(_type_len == 2147484944) |
| 2440 | obj.value = reader.read("!Q")[0] |
| 2441 | obj.value_mask = reader.read("!Q")[0] |
| 2442 | return obj |
| 2443 | |
| 2444 | def __eq__(self, other): |
| 2445 | if type(self) != type(other): return False |
| 2446 | if self.value != other.value: return False |
| 2447 | if self.value_mask != other.value_mask: return False |
| 2448 | return True |
| 2449 | |
| 2450 | def pretty_print(self, q): |
| 2451 | q.text("metadata_masked {") |
| 2452 | with q.group(): |
| 2453 | with q.indent(2): |
| 2454 | q.breakable() |
| 2455 | q.text("value = "); |
| 2456 | q.text("%#x" % self.value) |
| 2457 | q.text(","); q.breakable() |
| 2458 | q.text("value_mask = "); |
| 2459 | q.text("%#x" % self.value_mask) |
| 2460 | q.breakable() |
| 2461 | q.text('}') |
| 2462 | |
| 2463 | oxm.subtypes[2147484944] = metadata_masked |
| 2464 | |
| 2465 | class mpls_bos(oxm): |
| 2466 | type_len = 2147502081 |
| 2467 | |
| 2468 | def __init__(self, value=None): |
| 2469 | if value != None: |
| 2470 | self.value = value |
| 2471 | else: |
| 2472 | self.value = 0 |
| 2473 | return |
| 2474 | |
| 2475 | def pack(self): |
| 2476 | packed = [] |
| 2477 | packed.append(struct.pack("!L", self.type_len)) |
| 2478 | packed.append(struct.pack("!B", self.value)) |
| 2479 | return ''.join(packed) |
| 2480 | |
| 2481 | @staticmethod |
| 2482 | def unpack(reader): |
| 2483 | obj = mpls_bos() |
| 2484 | _type_len = reader.read("!L")[0] |
| 2485 | assert(_type_len == 2147502081) |
| 2486 | obj.value = reader.read("!B")[0] |
| 2487 | return obj |
| 2488 | |
| 2489 | def __eq__(self, other): |
| 2490 | if type(self) != type(other): return False |
| 2491 | if self.value != other.value: return False |
| 2492 | return True |
| 2493 | |
| 2494 | def pretty_print(self, q): |
| 2495 | q.text("mpls_bos {") |
| 2496 | with q.group(): |
| 2497 | with q.indent(2): |
| 2498 | q.breakable() |
| 2499 | q.text("value = "); |
| 2500 | q.text("%#x" % self.value) |
| 2501 | q.breakable() |
| 2502 | q.text('}') |
| 2503 | |
| 2504 | oxm.subtypes[2147502081] = mpls_bos |
| 2505 | |
| 2506 | class mpls_bos_masked(oxm): |
| 2507 | type_len = 2147502338 |
| 2508 | |
| 2509 | def __init__(self, value=None, value_mask=None): |
| 2510 | if value != None: |
| 2511 | self.value = value |
| 2512 | else: |
| 2513 | self.value = 0 |
| 2514 | if value_mask != None: |
| 2515 | self.value_mask = value_mask |
| 2516 | else: |
| 2517 | self.value_mask = 0 |
| 2518 | return |
| 2519 | |
| 2520 | def pack(self): |
| 2521 | packed = [] |
| 2522 | packed.append(struct.pack("!L", self.type_len)) |
| 2523 | packed.append(struct.pack("!B", self.value)) |
| 2524 | packed.append(struct.pack("!B", self.value_mask)) |
| 2525 | return ''.join(packed) |
| 2526 | |
| 2527 | @staticmethod |
| 2528 | def unpack(reader): |
| 2529 | obj = mpls_bos_masked() |
| 2530 | _type_len = reader.read("!L")[0] |
| 2531 | assert(_type_len == 2147502338) |
| 2532 | obj.value = reader.read("!B")[0] |
| 2533 | obj.value_mask = reader.read("!B")[0] |
| 2534 | return obj |
| 2535 | |
| 2536 | def __eq__(self, other): |
| 2537 | if type(self) != type(other): return False |
| 2538 | if self.value != other.value: return False |
| 2539 | if self.value_mask != other.value_mask: return False |
| 2540 | return True |
| 2541 | |
| 2542 | def pretty_print(self, q): |
| 2543 | q.text("mpls_bos_masked {") |
| 2544 | with q.group(): |
| 2545 | with q.indent(2): |
| 2546 | q.breakable() |
| 2547 | q.text("value = "); |
| 2548 | q.text("%#x" % self.value) |
| 2549 | q.text(","); q.breakable() |
| 2550 | q.text("value_mask = "); |
| 2551 | q.text("%#x" % self.value_mask) |
| 2552 | q.breakable() |
| 2553 | q.text('}') |
| 2554 | |
| 2555 | oxm.subtypes[2147502338] = mpls_bos_masked |
| 2556 | |
| 2557 | class mpls_label(oxm): |
| 2558 | type_len = 2147501060 |
| 2559 | |
| 2560 | def __init__(self, value=None): |
| 2561 | if value != None: |
| 2562 | self.value = value |
| 2563 | else: |
| 2564 | self.value = 0 |
| 2565 | return |
| 2566 | |
| 2567 | def pack(self): |
| 2568 | packed = [] |
| 2569 | packed.append(struct.pack("!L", self.type_len)) |
| 2570 | packed.append(struct.pack("!L", self.value)) |
| 2571 | return ''.join(packed) |
| 2572 | |
| 2573 | @staticmethod |
| 2574 | def unpack(reader): |
| 2575 | obj = mpls_label() |
| 2576 | _type_len = reader.read("!L")[0] |
| 2577 | assert(_type_len == 2147501060) |
| 2578 | obj.value = reader.read("!L")[0] |
| 2579 | return obj |
| 2580 | |
| 2581 | def __eq__(self, other): |
| 2582 | if type(self) != type(other): return False |
| 2583 | if self.value != other.value: return False |
| 2584 | return True |
| 2585 | |
| 2586 | def pretty_print(self, q): |
| 2587 | q.text("mpls_label {") |
| 2588 | with q.group(): |
| 2589 | with q.indent(2): |
| 2590 | q.breakable() |
| 2591 | q.text("value = "); |
| 2592 | q.text("%#x" % self.value) |
| 2593 | q.breakable() |
| 2594 | q.text('}') |
| 2595 | |
| 2596 | oxm.subtypes[2147501060] = mpls_label |
| 2597 | |
| 2598 | class mpls_label_masked(oxm): |
| 2599 | type_len = 2147501320 |
| 2600 | |
| 2601 | def __init__(self, value=None, value_mask=None): |
| 2602 | if value != None: |
| 2603 | self.value = value |
| 2604 | else: |
| 2605 | self.value = 0 |
| 2606 | if value_mask != None: |
| 2607 | self.value_mask = value_mask |
| 2608 | else: |
| 2609 | self.value_mask = 0 |
| 2610 | return |
| 2611 | |
| 2612 | def pack(self): |
| 2613 | packed = [] |
| 2614 | packed.append(struct.pack("!L", self.type_len)) |
| 2615 | packed.append(struct.pack("!L", self.value)) |
| 2616 | packed.append(struct.pack("!L", self.value_mask)) |
| 2617 | return ''.join(packed) |
| 2618 | |
| 2619 | @staticmethod |
| 2620 | def unpack(reader): |
| 2621 | obj = mpls_label_masked() |
| 2622 | _type_len = reader.read("!L")[0] |
| 2623 | assert(_type_len == 2147501320) |
| 2624 | obj.value = reader.read("!L")[0] |
| 2625 | obj.value_mask = reader.read("!L")[0] |
| 2626 | return obj |
| 2627 | |
| 2628 | def __eq__(self, other): |
| 2629 | if type(self) != type(other): return False |
| 2630 | if self.value != other.value: return False |
| 2631 | if self.value_mask != other.value_mask: return False |
| 2632 | return True |
| 2633 | |
| 2634 | def pretty_print(self, q): |
| 2635 | q.text("mpls_label_masked {") |
| 2636 | with q.group(): |
| 2637 | with q.indent(2): |
| 2638 | q.breakable() |
| 2639 | q.text("value = "); |
| 2640 | q.text("%#x" % self.value) |
| 2641 | q.text(","); q.breakable() |
| 2642 | q.text("value_mask = "); |
| 2643 | q.text("%#x" % self.value_mask) |
| 2644 | q.breakable() |
| 2645 | q.text('}') |
| 2646 | |
| 2647 | oxm.subtypes[2147501320] = mpls_label_masked |
| 2648 | |
| 2649 | class mpls_tc(oxm): |
| 2650 | type_len = 2147501569 |
| 2651 | |
| 2652 | def __init__(self, value=None): |
| 2653 | if value != None: |
| 2654 | self.value = value |
| 2655 | else: |
| 2656 | self.value = 0 |
| 2657 | return |
| 2658 | |
| 2659 | def pack(self): |
| 2660 | packed = [] |
| 2661 | packed.append(struct.pack("!L", self.type_len)) |
| 2662 | packed.append(struct.pack("!B", self.value)) |
| 2663 | return ''.join(packed) |
| 2664 | |
| 2665 | @staticmethod |
| 2666 | def unpack(reader): |
| 2667 | obj = mpls_tc() |
| 2668 | _type_len = reader.read("!L")[0] |
| 2669 | assert(_type_len == 2147501569) |
| 2670 | obj.value = reader.read("!B")[0] |
| 2671 | return obj |
| 2672 | |
| 2673 | def __eq__(self, other): |
| 2674 | if type(self) != type(other): return False |
| 2675 | if self.value != other.value: return False |
| 2676 | return True |
| 2677 | |
| 2678 | def pretty_print(self, q): |
| 2679 | q.text("mpls_tc {") |
| 2680 | with q.group(): |
| 2681 | with q.indent(2): |
| 2682 | q.breakable() |
| 2683 | q.text("value = "); |
| 2684 | q.text("%#x" % self.value) |
| 2685 | q.breakable() |
| 2686 | q.text('}') |
| 2687 | |
| 2688 | oxm.subtypes[2147501569] = mpls_tc |
| 2689 | |
| 2690 | class mpls_tc_masked(oxm): |
| 2691 | type_len = 2147501826 |
| 2692 | |
| 2693 | def __init__(self, value=None, value_mask=None): |
| 2694 | if value != None: |
| 2695 | self.value = value |
| 2696 | else: |
| 2697 | self.value = 0 |
| 2698 | if value_mask != None: |
| 2699 | self.value_mask = value_mask |
| 2700 | else: |
| 2701 | self.value_mask = 0 |
| 2702 | return |
| 2703 | |
| 2704 | def pack(self): |
| 2705 | packed = [] |
| 2706 | packed.append(struct.pack("!L", self.type_len)) |
| 2707 | packed.append(struct.pack("!B", self.value)) |
| 2708 | packed.append(struct.pack("!B", self.value_mask)) |
| 2709 | return ''.join(packed) |
| 2710 | |
| 2711 | @staticmethod |
| 2712 | def unpack(reader): |
| 2713 | obj = mpls_tc_masked() |
| 2714 | _type_len = reader.read("!L")[0] |
| 2715 | assert(_type_len == 2147501826) |
| 2716 | obj.value = reader.read("!B")[0] |
| 2717 | obj.value_mask = reader.read("!B")[0] |
| 2718 | return obj |
| 2719 | |
| 2720 | def __eq__(self, other): |
| 2721 | if type(self) != type(other): return False |
| 2722 | if self.value != other.value: return False |
| 2723 | if self.value_mask != other.value_mask: return False |
| 2724 | return True |
| 2725 | |
| 2726 | def pretty_print(self, q): |
| 2727 | q.text("mpls_tc_masked {") |
| 2728 | with q.group(): |
| 2729 | with q.indent(2): |
| 2730 | q.breakable() |
| 2731 | q.text("value = "); |
| 2732 | q.text("%#x" % self.value) |
| 2733 | q.text(","); q.breakable() |
| 2734 | q.text("value_mask = "); |
| 2735 | q.text("%#x" % self.value_mask) |
| 2736 | q.breakable() |
| 2737 | q.text('}') |
| 2738 | |
| 2739 | oxm.subtypes[2147501826] = mpls_tc_masked |
| 2740 | |
| 2741 | class sctp_dst(oxm): |
| 2742 | type_len = 2147492866 |
| 2743 | |
| 2744 | def __init__(self, value=None): |
| 2745 | if value != None: |
| 2746 | self.value = value |
| 2747 | else: |
| 2748 | self.value = 0 |
| 2749 | return |
| 2750 | |
| 2751 | def pack(self): |
| 2752 | packed = [] |
| 2753 | packed.append(struct.pack("!L", self.type_len)) |
| 2754 | packed.append(struct.pack("!H", self.value)) |
| 2755 | return ''.join(packed) |
| 2756 | |
| 2757 | @staticmethod |
| 2758 | def unpack(reader): |
| 2759 | obj = sctp_dst() |
| 2760 | _type_len = reader.read("!L")[0] |
| 2761 | assert(_type_len == 2147492866) |
| 2762 | obj.value = reader.read("!H")[0] |
| 2763 | return obj |
| 2764 | |
| 2765 | def __eq__(self, other): |
| 2766 | if type(self) != type(other): return False |
| 2767 | if self.value != other.value: return False |
| 2768 | return True |
| 2769 | |
| 2770 | def pretty_print(self, q): |
| 2771 | q.text("sctp_dst {") |
| 2772 | with q.group(): |
| 2773 | with q.indent(2): |
| 2774 | q.breakable() |
| 2775 | q.text("value = "); |
| 2776 | q.text("%#x" % self.value) |
| 2777 | q.breakable() |
| 2778 | q.text('}') |
| 2779 | |
| 2780 | oxm.subtypes[2147492866] = sctp_dst |
| 2781 | |
| 2782 | class sctp_dst_masked(oxm): |
| 2783 | type_len = 2147493124 |
| 2784 | |
| 2785 | def __init__(self, value=None, value_mask=None): |
| 2786 | if value != None: |
| 2787 | self.value = value |
| 2788 | else: |
| 2789 | self.value = 0 |
| 2790 | if value_mask != None: |
| 2791 | self.value_mask = value_mask |
| 2792 | else: |
| 2793 | self.value_mask = 0 |
| 2794 | return |
| 2795 | |
| 2796 | def pack(self): |
| 2797 | packed = [] |
| 2798 | packed.append(struct.pack("!L", self.type_len)) |
| 2799 | packed.append(struct.pack("!H", self.value)) |
| 2800 | packed.append(struct.pack("!H", self.value_mask)) |
| 2801 | return ''.join(packed) |
| 2802 | |
| 2803 | @staticmethod |
| 2804 | def unpack(reader): |
| 2805 | obj = sctp_dst_masked() |
| 2806 | _type_len = reader.read("!L")[0] |
| 2807 | assert(_type_len == 2147493124) |
| 2808 | obj.value = reader.read("!H")[0] |
| 2809 | obj.value_mask = reader.read("!H")[0] |
| 2810 | return obj |
| 2811 | |
| 2812 | def __eq__(self, other): |
| 2813 | if type(self) != type(other): return False |
| 2814 | if self.value != other.value: return False |
| 2815 | if self.value_mask != other.value_mask: return False |
| 2816 | return True |
| 2817 | |
| 2818 | def pretty_print(self, q): |
| 2819 | q.text("sctp_dst_masked {") |
| 2820 | with q.group(): |
| 2821 | with q.indent(2): |
| 2822 | q.breakable() |
| 2823 | q.text("value = "); |
| 2824 | q.text("%#x" % self.value) |
| 2825 | q.text(","); q.breakable() |
| 2826 | q.text("value_mask = "); |
| 2827 | q.text("%#x" % self.value_mask) |
| 2828 | q.breakable() |
| 2829 | q.text('}') |
| 2830 | |
| 2831 | oxm.subtypes[2147493124] = sctp_dst_masked |
| 2832 | |
| 2833 | class sctp_src(oxm): |
| 2834 | type_len = 2147492354 |
| 2835 | |
| 2836 | def __init__(self, value=None): |
| 2837 | if value != None: |
| 2838 | self.value = value |
| 2839 | else: |
| 2840 | self.value = 0 |
| 2841 | return |
| 2842 | |
| 2843 | def pack(self): |
| 2844 | packed = [] |
| 2845 | packed.append(struct.pack("!L", self.type_len)) |
| 2846 | packed.append(struct.pack("!H", self.value)) |
| 2847 | return ''.join(packed) |
| 2848 | |
| 2849 | @staticmethod |
| 2850 | def unpack(reader): |
| 2851 | obj = sctp_src() |
| 2852 | _type_len = reader.read("!L")[0] |
| 2853 | assert(_type_len == 2147492354) |
| 2854 | obj.value = reader.read("!H")[0] |
| 2855 | return obj |
| 2856 | |
| 2857 | def __eq__(self, other): |
| 2858 | if type(self) != type(other): return False |
| 2859 | if self.value != other.value: return False |
| 2860 | return True |
| 2861 | |
| 2862 | def pretty_print(self, q): |
| 2863 | q.text("sctp_src {") |
| 2864 | with q.group(): |
| 2865 | with q.indent(2): |
| 2866 | q.breakable() |
| 2867 | q.text("value = "); |
| 2868 | q.text("%#x" % self.value) |
| 2869 | q.breakable() |
| 2870 | q.text('}') |
| 2871 | |
| 2872 | oxm.subtypes[2147492354] = sctp_src |
| 2873 | |
| 2874 | class sctp_src_masked(oxm): |
| 2875 | type_len = 2147492612 |
| 2876 | |
| 2877 | def __init__(self, value=None, value_mask=None): |
| 2878 | if value != None: |
| 2879 | self.value = value |
| 2880 | else: |
| 2881 | self.value = 0 |
| 2882 | if value_mask != None: |
| 2883 | self.value_mask = value_mask |
| 2884 | else: |
| 2885 | self.value_mask = 0 |
| 2886 | return |
| 2887 | |
| 2888 | def pack(self): |
| 2889 | packed = [] |
| 2890 | packed.append(struct.pack("!L", self.type_len)) |
| 2891 | packed.append(struct.pack("!H", self.value)) |
| 2892 | packed.append(struct.pack("!H", self.value_mask)) |
| 2893 | return ''.join(packed) |
| 2894 | |
| 2895 | @staticmethod |
| 2896 | def unpack(reader): |
| 2897 | obj = sctp_src_masked() |
| 2898 | _type_len = reader.read("!L")[0] |
| 2899 | assert(_type_len == 2147492612) |
| 2900 | obj.value = reader.read("!H")[0] |
| 2901 | obj.value_mask = reader.read("!H")[0] |
| 2902 | return obj |
| 2903 | |
| 2904 | def __eq__(self, other): |
| 2905 | if type(self) != type(other): return False |
| 2906 | if self.value != other.value: return False |
| 2907 | if self.value_mask != other.value_mask: return False |
| 2908 | return True |
| 2909 | |
| 2910 | def pretty_print(self, q): |
| 2911 | q.text("sctp_src_masked {") |
| 2912 | with q.group(): |
| 2913 | with q.indent(2): |
| 2914 | q.breakable() |
| 2915 | q.text("value = "); |
| 2916 | q.text("%#x" % self.value) |
| 2917 | q.text(","); q.breakable() |
| 2918 | q.text("value_mask = "); |
| 2919 | q.text("%#x" % self.value_mask) |
| 2920 | q.breakable() |
| 2921 | q.text('}') |
| 2922 | |
| 2923 | oxm.subtypes[2147492612] = sctp_src_masked |
| 2924 | |
| 2925 | class tcp_dst(oxm): |
| 2926 | type_len = 2147490818 |
| 2927 | |
| 2928 | def __init__(self, value=None): |
| 2929 | if value != None: |
| 2930 | self.value = value |
| 2931 | else: |
| 2932 | self.value = 0 |
| 2933 | return |
| 2934 | |
| 2935 | def pack(self): |
| 2936 | packed = [] |
| 2937 | packed.append(struct.pack("!L", self.type_len)) |
| 2938 | packed.append(struct.pack("!H", self.value)) |
| 2939 | return ''.join(packed) |
| 2940 | |
| 2941 | @staticmethod |
| 2942 | def unpack(reader): |
| 2943 | obj = tcp_dst() |
| 2944 | _type_len = reader.read("!L")[0] |
| 2945 | assert(_type_len == 2147490818) |
| 2946 | obj.value = reader.read("!H")[0] |
| 2947 | return obj |
| 2948 | |
| 2949 | def __eq__(self, other): |
| 2950 | if type(self) != type(other): return False |
| 2951 | if self.value != other.value: return False |
| 2952 | return True |
| 2953 | |
| 2954 | def pretty_print(self, q): |
| 2955 | q.text("tcp_dst {") |
| 2956 | with q.group(): |
| 2957 | with q.indent(2): |
| 2958 | q.breakable() |
| 2959 | q.text("value = "); |
| 2960 | q.text("%#x" % self.value) |
| 2961 | q.breakable() |
| 2962 | q.text('}') |
| 2963 | |
| 2964 | oxm.subtypes[2147490818] = tcp_dst |
| 2965 | |
| 2966 | class tcp_dst_masked(oxm): |
| 2967 | type_len = 2147491076 |
| 2968 | |
| 2969 | def __init__(self, value=None, value_mask=None): |
| 2970 | if value != None: |
| 2971 | self.value = value |
| 2972 | else: |
| 2973 | self.value = 0 |
| 2974 | if value_mask != None: |
| 2975 | self.value_mask = value_mask |
| 2976 | else: |
| 2977 | self.value_mask = 0 |
| 2978 | return |
| 2979 | |
| 2980 | def pack(self): |
| 2981 | packed = [] |
| 2982 | packed.append(struct.pack("!L", self.type_len)) |
| 2983 | packed.append(struct.pack("!H", self.value)) |
| 2984 | packed.append(struct.pack("!H", self.value_mask)) |
| 2985 | return ''.join(packed) |
| 2986 | |
| 2987 | @staticmethod |
| 2988 | def unpack(reader): |
| 2989 | obj = tcp_dst_masked() |
| 2990 | _type_len = reader.read("!L")[0] |
| 2991 | assert(_type_len == 2147491076) |
| 2992 | obj.value = reader.read("!H")[0] |
| 2993 | obj.value_mask = reader.read("!H")[0] |
| 2994 | return obj |
| 2995 | |
| 2996 | def __eq__(self, other): |
| 2997 | if type(self) != type(other): return False |
| 2998 | if self.value != other.value: return False |
| 2999 | if self.value_mask != other.value_mask: return False |
| 3000 | return True |
| 3001 | |
| 3002 | def pretty_print(self, q): |
| 3003 | q.text("tcp_dst_masked {") |
| 3004 | with q.group(): |
| 3005 | with q.indent(2): |
| 3006 | q.breakable() |
| 3007 | q.text("value = "); |
| 3008 | q.text("%#x" % self.value) |
| 3009 | q.text(","); q.breakable() |
| 3010 | q.text("value_mask = "); |
| 3011 | q.text("%#x" % self.value_mask) |
| 3012 | q.breakable() |
| 3013 | q.text('}') |
| 3014 | |
| 3015 | oxm.subtypes[2147491076] = tcp_dst_masked |
| 3016 | |
| 3017 | class tcp_src(oxm): |
| 3018 | type_len = 2147490306 |
| 3019 | |
| 3020 | def __init__(self, value=None): |
| 3021 | if value != None: |
| 3022 | self.value = value |
| 3023 | else: |
| 3024 | self.value = 0 |
| 3025 | return |
| 3026 | |
| 3027 | def pack(self): |
| 3028 | packed = [] |
| 3029 | packed.append(struct.pack("!L", self.type_len)) |
| 3030 | packed.append(struct.pack("!H", self.value)) |
| 3031 | return ''.join(packed) |
| 3032 | |
| 3033 | @staticmethod |
| 3034 | def unpack(reader): |
| 3035 | obj = tcp_src() |
| 3036 | _type_len = reader.read("!L")[0] |
| 3037 | assert(_type_len == 2147490306) |
| 3038 | obj.value = reader.read("!H")[0] |
| 3039 | return obj |
| 3040 | |
| 3041 | def __eq__(self, other): |
| 3042 | if type(self) != type(other): return False |
| 3043 | if self.value != other.value: return False |
| 3044 | return True |
| 3045 | |
| 3046 | def pretty_print(self, q): |
| 3047 | q.text("tcp_src {") |
| 3048 | with q.group(): |
| 3049 | with q.indent(2): |
| 3050 | q.breakable() |
| 3051 | q.text("value = "); |
| 3052 | q.text("%#x" % self.value) |
| 3053 | q.breakable() |
| 3054 | q.text('}') |
| 3055 | |
| 3056 | oxm.subtypes[2147490306] = tcp_src |
| 3057 | |
| 3058 | class tcp_src_masked(oxm): |
| 3059 | type_len = 2147490564 |
| 3060 | |
| 3061 | def __init__(self, value=None, value_mask=None): |
| 3062 | if value != None: |
| 3063 | self.value = value |
| 3064 | else: |
| 3065 | self.value = 0 |
| 3066 | if value_mask != None: |
| 3067 | self.value_mask = value_mask |
| 3068 | else: |
| 3069 | self.value_mask = 0 |
| 3070 | return |
| 3071 | |
| 3072 | def pack(self): |
| 3073 | packed = [] |
| 3074 | packed.append(struct.pack("!L", self.type_len)) |
| 3075 | packed.append(struct.pack("!H", self.value)) |
| 3076 | packed.append(struct.pack("!H", self.value_mask)) |
| 3077 | return ''.join(packed) |
| 3078 | |
| 3079 | @staticmethod |
| 3080 | def unpack(reader): |
| 3081 | obj = tcp_src_masked() |
| 3082 | _type_len = reader.read("!L")[0] |
| 3083 | assert(_type_len == 2147490564) |
| 3084 | obj.value = reader.read("!H")[0] |
| 3085 | obj.value_mask = reader.read("!H")[0] |
| 3086 | return obj |
| 3087 | |
| 3088 | def __eq__(self, other): |
| 3089 | if type(self) != type(other): return False |
| 3090 | if self.value != other.value: return False |
| 3091 | if self.value_mask != other.value_mask: return False |
| 3092 | return True |
| 3093 | |
| 3094 | def pretty_print(self, q): |
| 3095 | q.text("tcp_src_masked {") |
| 3096 | with q.group(): |
| 3097 | with q.indent(2): |
| 3098 | q.breakable() |
| 3099 | q.text("value = "); |
| 3100 | q.text("%#x" % self.value) |
| 3101 | q.text(","); q.breakable() |
| 3102 | q.text("value_mask = "); |
| 3103 | q.text("%#x" % self.value_mask) |
| 3104 | q.breakable() |
| 3105 | q.text('}') |
| 3106 | |
| 3107 | oxm.subtypes[2147490564] = tcp_src_masked |
| 3108 | |
| 3109 | class tunnel_id(oxm): |
| 3110 | type_len = 2147503112 |
| 3111 | |
| 3112 | def __init__(self, value=None): |
| 3113 | if value != None: |
| 3114 | self.value = value |
| 3115 | else: |
| 3116 | self.value = 0 |
| 3117 | return |
| 3118 | |
| 3119 | def pack(self): |
| 3120 | packed = [] |
| 3121 | packed.append(struct.pack("!L", self.type_len)) |
| 3122 | packed.append(struct.pack("!Q", self.value)) |
| 3123 | return ''.join(packed) |
| 3124 | |
| 3125 | @staticmethod |
| 3126 | def unpack(reader): |
| 3127 | obj = tunnel_id() |
| 3128 | _type_len = reader.read("!L")[0] |
| 3129 | assert(_type_len == 2147503112) |
| 3130 | obj.value = reader.read("!Q")[0] |
| 3131 | return obj |
| 3132 | |
| 3133 | def __eq__(self, other): |
| 3134 | if type(self) != type(other): return False |
| 3135 | if self.value != other.value: return False |
| 3136 | return True |
| 3137 | |
| 3138 | def pretty_print(self, q): |
| 3139 | q.text("tunnel_id {") |
| 3140 | with q.group(): |
| 3141 | with q.indent(2): |
| 3142 | q.breakable() |
| 3143 | q.text("value = "); |
| 3144 | q.text("%#x" % self.value) |
| 3145 | q.breakable() |
| 3146 | q.text('}') |
| 3147 | |
| 3148 | oxm.subtypes[2147503112] = tunnel_id |
| 3149 | |
| 3150 | class tunnel_id_masked(oxm): |
| 3151 | type_len = 2147503376 |
| 3152 | |
| 3153 | def __init__(self, value=None, value_mask=None): |
| 3154 | if value != None: |
| 3155 | self.value = value |
| 3156 | else: |
| 3157 | self.value = 0 |
| 3158 | if value_mask != None: |
| 3159 | self.value_mask = value_mask |
| 3160 | else: |
| 3161 | self.value_mask = 0 |
| 3162 | return |
| 3163 | |
| 3164 | def pack(self): |
| 3165 | packed = [] |
| 3166 | packed.append(struct.pack("!L", self.type_len)) |
| 3167 | packed.append(struct.pack("!Q", self.value)) |
| 3168 | packed.append(struct.pack("!Q", self.value_mask)) |
| 3169 | return ''.join(packed) |
| 3170 | |
| 3171 | @staticmethod |
| 3172 | def unpack(reader): |
| 3173 | obj = tunnel_id_masked() |
| 3174 | _type_len = reader.read("!L")[0] |
| 3175 | assert(_type_len == 2147503376) |
| 3176 | obj.value = reader.read("!Q")[0] |
| 3177 | obj.value_mask = reader.read("!Q")[0] |
| 3178 | return obj |
| 3179 | |
| 3180 | def __eq__(self, other): |
| 3181 | if type(self) != type(other): return False |
| 3182 | if self.value != other.value: return False |
| 3183 | if self.value_mask != other.value_mask: return False |
| 3184 | return True |
| 3185 | |
| 3186 | def pretty_print(self, q): |
| 3187 | q.text("tunnel_id_masked {") |
| 3188 | with q.group(): |
| 3189 | with q.indent(2): |
| 3190 | q.breakable() |
| 3191 | q.text("value = "); |
| 3192 | q.text("%#x" % self.value) |
| 3193 | q.text(","); q.breakable() |
| 3194 | q.text("value_mask = "); |
| 3195 | q.text("%#x" % self.value_mask) |
| 3196 | q.breakable() |
| 3197 | q.text('}') |
| 3198 | |
| 3199 | oxm.subtypes[2147503376] = tunnel_id_masked |
| 3200 | |
| 3201 | class udp_dst(oxm): |
| 3202 | type_len = 2147491842 |
| 3203 | |
| 3204 | def __init__(self, value=None): |
| 3205 | if value != None: |
| 3206 | self.value = value |
| 3207 | else: |
| 3208 | self.value = 0 |
| 3209 | return |
| 3210 | |
| 3211 | def pack(self): |
| 3212 | packed = [] |
| 3213 | packed.append(struct.pack("!L", self.type_len)) |
| 3214 | packed.append(struct.pack("!H", self.value)) |
| 3215 | return ''.join(packed) |
| 3216 | |
| 3217 | @staticmethod |
| 3218 | def unpack(reader): |
| 3219 | obj = udp_dst() |
| 3220 | _type_len = reader.read("!L")[0] |
| 3221 | assert(_type_len == 2147491842) |
| 3222 | obj.value = reader.read("!H")[0] |
| 3223 | return obj |
| 3224 | |
| 3225 | def __eq__(self, other): |
| 3226 | if type(self) != type(other): return False |
| 3227 | if self.value != other.value: return False |
| 3228 | return True |
| 3229 | |
| 3230 | def pretty_print(self, q): |
| 3231 | q.text("udp_dst {") |
| 3232 | with q.group(): |
| 3233 | with q.indent(2): |
| 3234 | q.breakable() |
| 3235 | q.text("value = "); |
| 3236 | q.text("%#x" % self.value) |
| 3237 | q.breakable() |
| 3238 | q.text('}') |
| 3239 | |
| 3240 | oxm.subtypes[2147491842] = udp_dst |
| 3241 | |
| 3242 | class udp_dst_masked(oxm): |
| 3243 | type_len = 2147492100 |
| 3244 | |
| 3245 | def __init__(self, value=None, value_mask=None): |
| 3246 | if value != None: |
| 3247 | self.value = value |
| 3248 | else: |
| 3249 | self.value = 0 |
| 3250 | if value_mask != None: |
| 3251 | self.value_mask = value_mask |
| 3252 | else: |
| 3253 | self.value_mask = 0 |
| 3254 | return |
| 3255 | |
| 3256 | def pack(self): |
| 3257 | packed = [] |
| 3258 | packed.append(struct.pack("!L", self.type_len)) |
| 3259 | packed.append(struct.pack("!H", self.value)) |
| 3260 | packed.append(struct.pack("!H", self.value_mask)) |
| 3261 | return ''.join(packed) |
| 3262 | |
| 3263 | @staticmethod |
| 3264 | def unpack(reader): |
| 3265 | obj = udp_dst_masked() |
| 3266 | _type_len = reader.read("!L")[0] |
| 3267 | assert(_type_len == 2147492100) |
| 3268 | obj.value = reader.read("!H")[0] |
| 3269 | obj.value_mask = reader.read("!H")[0] |
| 3270 | return obj |
| 3271 | |
| 3272 | def __eq__(self, other): |
| 3273 | if type(self) != type(other): return False |
| 3274 | if self.value != other.value: return False |
| 3275 | if self.value_mask != other.value_mask: return False |
| 3276 | return True |
| 3277 | |
| 3278 | def pretty_print(self, q): |
| 3279 | q.text("udp_dst_masked {") |
| 3280 | with q.group(): |
| 3281 | with q.indent(2): |
| 3282 | q.breakable() |
| 3283 | q.text("value = "); |
| 3284 | q.text("%#x" % self.value) |
| 3285 | q.text(","); q.breakable() |
| 3286 | q.text("value_mask = "); |
| 3287 | q.text("%#x" % self.value_mask) |
| 3288 | q.breakable() |
| 3289 | q.text('}') |
| 3290 | |
| 3291 | oxm.subtypes[2147492100] = udp_dst_masked |
| 3292 | |
| 3293 | class udp_src(oxm): |
| 3294 | type_len = 2147491330 |
| 3295 | |
| 3296 | def __init__(self, value=None): |
| 3297 | if value != None: |
| 3298 | self.value = value |
| 3299 | else: |
| 3300 | self.value = 0 |
| 3301 | return |
| 3302 | |
| 3303 | def pack(self): |
| 3304 | packed = [] |
| 3305 | packed.append(struct.pack("!L", self.type_len)) |
| 3306 | packed.append(struct.pack("!H", self.value)) |
| 3307 | return ''.join(packed) |
| 3308 | |
| 3309 | @staticmethod |
| 3310 | def unpack(reader): |
| 3311 | obj = udp_src() |
| 3312 | _type_len = reader.read("!L")[0] |
| 3313 | assert(_type_len == 2147491330) |
| 3314 | obj.value = reader.read("!H")[0] |
| 3315 | return obj |
| 3316 | |
| 3317 | def __eq__(self, other): |
| 3318 | if type(self) != type(other): return False |
| 3319 | if self.value != other.value: return False |
| 3320 | return True |
| 3321 | |
| 3322 | def pretty_print(self, q): |
| 3323 | q.text("udp_src {") |
| 3324 | with q.group(): |
| 3325 | with q.indent(2): |
| 3326 | q.breakable() |
| 3327 | q.text("value = "); |
| 3328 | q.text("%#x" % self.value) |
| 3329 | q.breakable() |
| 3330 | q.text('}') |
| 3331 | |
| 3332 | oxm.subtypes[2147491330] = udp_src |
| 3333 | |
| 3334 | class udp_src_masked(oxm): |
| 3335 | type_len = 2147491588 |
| 3336 | |
| 3337 | def __init__(self, value=None, value_mask=None): |
| 3338 | if value != None: |
| 3339 | self.value = value |
| 3340 | else: |
| 3341 | self.value = 0 |
| 3342 | if value_mask != None: |
| 3343 | self.value_mask = value_mask |
| 3344 | else: |
| 3345 | self.value_mask = 0 |
| 3346 | return |
| 3347 | |
| 3348 | def pack(self): |
| 3349 | packed = [] |
| 3350 | packed.append(struct.pack("!L", self.type_len)) |
| 3351 | packed.append(struct.pack("!H", self.value)) |
| 3352 | packed.append(struct.pack("!H", self.value_mask)) |
| 3353 | return ''.join(packed) |
| 3354 | |
| 3355 | @staticmethod |
| 3356 | def unpack(reader): |
| 3357 | obj = udp_src_masked() |
| 3358 | _type_len = reader.read("!L")[0] |
| 3359 | assert(_type_len == 2147491588) |
| 3360 | obj.value = reader.read("!H")[0] |
| 3361 | obj.value_mask = reader.read("!H")[0] |
| 3362 | return obj |
| 3363 | |
| 3364 | def __eq__(self, other): |
| 3365 | if type(self) != type(other): return False |
| 3366 | if self.value != other.value: return False |
| 3367 | if self.value_mask != other.value_mask: return False |
| 3368 | return True |
| 3369 | |
| 3370 | def pretty_print(self, q): |
| 3371 | q.text("udp_src_masked {") |
| 3372 | with q.group(): |
| 3373 | with q.indent(2): |
| 3374 | q.breakable() |
| 3375 | q.text("value = "); |
| 3376 | q.text("%#x" % self.value) |
| 3377 | q.text(","); q.breakable() |
| 3378 | q.text("value_mask = "); |
| 3379 | q.text("%#x" % self.value_mask) |
| 3380 | q.breakable() |
| 3381 | q.text('}') |
| 3382 | |
| 3383 | oxm.subtypes[2147491588] = udp_src_masked |
| 3384 | |
| 3385 | class vlan_pcp(oxm): |
| 3386 | type_len = 2147487233 |
| 3387 | |
| 3388 | def __init__(self, value=None): |
| 3389 | if value != None: |
| 3390 | self.value = value |
| 3391 | else: |
| 3392 | self.value = 0 |
| 3393 | return |
| 3394 | |
| 3395 | def pack(self): |
| 3396 | packed = [] |
| 3397 | packed.append(struct.pack("!L", self.type_len)) |
| 3398 | packed.append(struct.pack("!B", self.value)) |
| 3399 | return ''.join(packed) |
| 3400 | |
| 3401 | @staticmethod |
| 3402 | def unpack(reader): |
| 3403 | obj = vlan_pcp() |
| 3404 | _type_len = reader.read("!L")[0] |
| 3405 | assert(_type_len == 2147487233) |
| 3406 | obj.value = reader.read("!B")[0] |
| 3407 | return obj |
| 3408 | |
| 3409 | def __eq__(self, other): |
| 3410 | if type(self) != type(other): return False |
| 3411 | if self.value != other.value: return False |
| 3412 | return True |
| 3413 | |
| 3414 | def pretty_print(self, q): |
| 3415 | q.text("vlan_pcp {") |
| 3416 | with q.group(): |
| 3417 | with q.indent(2): |
| 3418 | q.breakable() |
| 3419 | q.text("value = "); |
| 3420 | q.text("%#x" % self.value) |
| 3421 | q.breakable() |
| 3422 | q.text('}') |
| 3423 | |
| 3424 | oxm.subtypes[2147487233] = vlan_pcp |
| 3425 | |
| 3426 | class vlan_pcp_masked(oxm): |
| 3427 | type_len = 2147487490 |
| 3428 | |
| 3429 | def __init__(self, value=None, value_mask=None): |
| 3430 | if value != None: |
| 3431 | self.value = value |
| 3432 | else: |
| 3433 | self.value = 0 |
| 3434 | if value_mask != None: |
| 3435 | self.value_mask = value_mask |
| 3436 | else: |
| 3437 | self.value_mask = 0 |
| 3438 | return |
| 3439 | |
| 3440 | def pack(self): |
| 3441 | packed = [] |
| 3442 | packed.append(struct.pack("!L", self.type_len)) |
| 3443 | packed.append(struct.pack("!B", self.value)) |
| 3444 | packed.append(struct.pack("!B", self.value_mask)) |
| 3445 | return ''.join(packed) |
| 3446 | |
| 3447 | @staticmethod |
| 3448 | def unpack(reader): |
| 3449 | obj = vlan_pcp_masked() |
| 3450 | _type_len = reader.read("!L")[0] |
| 3451 | assert(_type_len == 2147487490) |
| 3452 | obj.value = reader.read("!B")[0] |
| 3453 | obj.value_mask = reader.read("!B")[0] |
| 3454 | return obj |
| 3455 | |
| 3456 | def __eq__(self, other): |
| 3457 | if type(self) != type(other): return False |
| 3458 | if self.value != other.value: return False |
| 3459 | if self.value_mask != other.value_mask: return False |
| 3460 | return True |
| 3461 | |
| 3462 | def pretty_print(self, q): |
| 3463 | q.text("vlan_pcp_masked {") |
| 3464 | with q.group(): |
| 3465 | with q.indent(2): |
| 3466 | q.breakable() |
| 3467 | q.text("value = "); |
| 3468 | q.text("%#x" % self.value) |
| 3469 | q.text(","); q.breakable() |
| 3470 | q.text("value_mask = "); |
| 3471 | q.text("%#x" % self.value_mask) |
| 3472 | q.breakable() |
| 3473 | q.text('}') |
| 3474 | |
| 3475 | oxm.subtypes[2147487490] = vlan_pcp_masked |
| 3476 | |
| 3477 | class vlan_vid(oxm): |
| 3478 | type_len = 2147486722 |
| 3479 | |
| 3480 | def __init__(self, value=None): |
| 3481 | if value != None: |
| 3482 | self.value = value |
| 3483 | else: |
| 3484 | self.value = 0 |
| 3485 | return |
| 3486 | |
| 3487 | def pack(self): |
| 3488 | packed = [] |
| 3489 | packed.append(struct.pack("!L", self.type_len)) |
| 3490 | packed.append(struct.pack("!H", self.value)) |
| 3491 | return ''.join(packed) |
| 3492 | |
| 3493 | @staticmethod |
| 3494 | def unpack(reader): |
| 3495 | obj = vlan_vid() |
| 3496 | _type_len = reader.read("!L")[0] |
| 3497 | assert(_type_len == 2147486722) |
| 3498 | obj.value = reader.read("!H")[0] |
| 3499 | return obj |
| 3500 | |
| 3501 | def __eq__(self, other): |
| 3502 | if type(self) != type(other): return False |
| 3503 | if self.value != other.value: return False |
| 3504 | return True |
| 3505 | |
| 3506 | def pretty_print(self, q): |
| 3507 | q.text("vlan_vid {") |
| 3508 | with q.group(): |
| 3509 | with q.indent(2): |
| 3510 | q.breakable() |
| 3511 | q.text("value = "); |
| 3512 | q.text("%#x" % self.value) |
| 3513 | q.breakable() |
| 3514 | q.text('}') |
| 3515 | |
| 3516 | oxm.subtypes[2147486722] = vlan_vid |
| 3517 | |
| 3518 | class vlan_vid_masked(oxm): |
| 3519 | type_len = 2147486980 |
| 3520 | |
| 3521 | def __init__(self, value=None, value_mask=None): |
| 3522 | if value != None: |
| 3523 | self.value = value |
| 3524 | else: |
| 3525 | self.value = 0 |
| 3526 | if value_mask != None: |
| 3527 | self.value_mask = value_mask |
| 3528 | else: |
| 3529 | self.value_mask = 0 |
| 3530 | return |
| 3531 | |
| 3532 | def pack(self): |
| 3533 | packed = [] |
| 3534 | packed.append(struct.pack("!L", self.type_len)) |
| 3535 | packed.append(struct.pack("!H", self.value)) |
| 3536 | packed.append(struct.pack("!H", self.value_mask)) |
| 3537 | return ''.join(packed) |
| 3538 | |
| 3539 | @staticmethod |
| 3540 | def unpack(reader): |
| 3541 | obj = vlan_vid_masked() |
| 3542 | _type_len = reader.read("!L")[0] |
| 3543 | assert(_type_len == 2147486980) |
| 3544 | obj.value = reader.read("!H")[0] |
| 3545 | obj.value_mask = reader.read("!H")[0] |
| 3546 | return obj |
| 3547 | |
| 3548 | def __eq__(self, other): |
| 3549 | if type(self) != type(other): return False |
| 3550 | if self.value != other.value: return False |
| 3551 | if self.value_mask != other.value_mask: return False |
| 3552 | return True |
| 3553 | |
| 3554 | def pretty_print(self, q): |
| 3555 | q.text("vlan_vid_masked {") |
| 3556 | with q.group(): |
| 3557 | with q.indent(2): |
| 3558 | q.breakable() |
| 3559 | q.text("value = "); |
| 3560 | q.text("%#x" % self.value) |
| 3561 | q.text(","); q.breakable() |
| 3562 | q.text("value_mask = "); |
| 3563 | q.text("%#x" % self.value_mask) |
| 3564 | q.breakable() |
| 3565 | q.text('}') |
| 3566 | |
| 3567 | oxm.subtypes[2147486980] = vlan_vid_masked |
| 3568 | |
| 3569 | |