Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -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. |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4 | # See the file LICENSE.pyloxi which should have been included in the source distribution |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 5 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 6 | # Automatically generated by LOXI from template module.py |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 7 | # Do not modify |
| 8 | |
| 9 | import struct |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 10 | import loxi |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 11 | import const |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 12 | import common |
| 13 | import action |
| 14 | import instruction |
| 15 | import oxm |
| 16 | import action_id |
| 17 | import instruction_id |
| 18 | import meter_band |
Rich Lane | 5454b68 | 2014-01-14 17:07:36 -0800 | [diff] [blame] | 19 | import bsn_tlv |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 20 | import util |
| 21 | import loxi.generic_util |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 22 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 23 | class oxm(loxi.OFObject): |
| 24 | subtypes = {} |
Rich Lane | d53156a | 2013-08-05 17:17:33 -0700 | [diff] [blame] | 25 | |
Rich Lane | 95f7fc9 | 2014-01-27 17:08:16 -0800 | [diff] [blame] | 26 | |
| 27 | def __init__(self, type_len=None): |
| 28 | if type_len != None: |
| 29 | self.type_len = type_len |
| 30 | else: |
| 31 | self.type_len = 0 |
| 32 | return |
| 33 | |
| 34 | def pack(self): |
| 35 | packed = [] |
| 36 | packed.append(struct.pack("!L", self.type_len)) |
| 37 | return ''.join(packed) |
| 38 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 39 | @staticmethod |
| 40 | def unpack(reader): |
| 41 | subtype, = reader.peek('!L', 0) |
Rich Lane | 95f7fc9 | 2014-01-27 17:08:16 -0800 | [diff] [blame] | 42 | subclass = oxm.subtypes.get(subtype) |
| 43 | if subclass: |
| 44 | return subclass.unpack(reader) |
| 45 | |
| 46 | obj = oxm() |
| 47 | obj.type_len = reader.read("!L")[0] |
| 48 | return obj |
| 49 | |
| 50 | def __eq__(self, other): |
| 51 | if type(self) != type(other): return False |
| 52 | if self.type_len != other.type_len: return False |
| 53 | return True |
| 54 | |
| 55 | def pretty_print(self, q): |
| 56 | q.text("oxm {") |
| 57 | with q.group(): |
| 58 | with q.indent(2): |
| 59 | q.breakable() |
| 60 | q.breakable() |
| 61 | q.text('}') |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 62 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 63 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 64 | class arp_op(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 65 | type_len = 2147494402 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 66 | |
| 67 | def __init__(self, value=None): |
| 68 | if value != None: |
| 69 | self.value = value |
| 70 | else: |
| 71 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 72 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 73 | |
| 74 | def pack(self): |
| 75 | packed = [] |
| 76 | packed.append(struct.pack("!L", self.type_len)) |
| 77 | packed.append(struct.pack("!H", self.value)) |
| 78 | return ''.join(packed) |
| 79 | |
| 80 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 81 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 82 | obj = arp_op() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 83 | _type_len = reader.read("!L")[0] |
| 84 | assert(_type_len == 2147494402) |
| 85 | obj.value = reader.read("!H")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 86 | return obj |
| 87 | |
| 88 | def __eq__(self, other): |
| 89 | if type(self) != type(other): return False |
| 90 | if self.value != other.value: return False |
| 91 | return True |
| 92 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 93 | def pretty_print(self, q): |
| 94 | q.text("arp_op {") |
| 95 | with q.group(): |
| 96 | with q.indent(2): |
| 97 | q.breakable() |
| 98 | q.text("value = "); |
| 99 | q.text("%#x" % self.value) |
| 100 | q.breakable() |
| 101 | q.text('}') |
| 102 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 103 | oxm.subtypes[2147494402] = arp_op |
| 104 | |
| 105 | class arp_op_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 106 | type_len = 2147494660 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 107 | |
| 108 | def __init__(self, value=None, value_mask=None): |
| 109 | if value != None: |
| 110 | self.value = value |
| 111 | else: |
| 112 | self.value = 0 |
| 113 | if value_mask != None: |
| 114 | self.value_mask = value_mask |
| 115 | else: |
| 116 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 117 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 118 | |
| 119 | def pack(self): |
| 120 | packed = [] |
| 121 | packed.append(struct.pack("!L", self.type_len)) |
| 122 | packed.append(struct.pack("!H", self.value)) |
| 123 | packed.append(struct.pack("!H", self.value_mask)) |
| 124 | return ''.join(packed) |
| 125 | |
| 126 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 127 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 128 | obj = arp_op_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 129 | _type_len = reader.read("!L")[0] |
| 130 | assert(_type_len == 2147494660) |
| 131 | obj.value = reader.read("!H")[0] |
| 132 | obj.value_mask = reader.read("!H")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 133 | return obj |
| 134 | |
| 135 | def __eq__(self, other): |
| 136 | if type(self) != type(other): return False |
| 137 | if self.value != other.value: return False |
| 138 | if self.value_mask != other.value_mask: return False |
| 139 | return True |
| 140 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 141 | def pretty_print(self, q): |
| 142 | q.text("arp_op_masked {") |
| 143 | with q.group(): |
| 144 | with q.indent(2): |
| 145 | q.breakable() |
| 146 | q.text("value = "); |
| 147 | q.text("%#x" % self.value) |
| 148 | q.text(","); q.breakable() |
| 149 | q.text("value_mask = "); |
| 150 | q.text("%#x" % self.value_mask) |
| 151 | q.breakable() |
| 152 | q.text('}') |
| 153 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 154 | oxm.subtypes[2147494660] = arp_op_masked |
| 155 | |
| 156 | class arp_sha(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 157 | type_len = 2147495942 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 158 | |
| 159 | def __init__(self, value=None): |
| 160 | if value != None: |
| 161 | self.value = value |
| 162 | else: |
| 163 | self.value = [0,0,0,0,0,0] |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 164 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 165 | |
| 166 | def pack(self): |
| 167 | packed = [] |
| 168 | packed.append(struct.pack("!L", self.type_len)) |
| 169 | packed.append(struct.pack("!6B", *self.value)) |
| 170 | return ''.join(packed) |
| 171 | |
| 172 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 173 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 174 | obj = arp_sha() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 175 | _type_len = reader.read("!L")[0] |
| 176 | assert(_type_len == 2147495942) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 177 | obj.value = list(reader.read('!6B')) |
| 178 | return obj |
| 179 | |
| 180 | def __eq__(self, other): |
| 181 | if type(self) != type(other): return False |
| 182 | if self.value != other.value: return False |
| 183 | return True |
| 184 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 185 | def pretty_print(self, q): |
| 186 | q.text("arp_sha {") |
| 187 | with q.group(): |
| 188 | with q.indent(2): |
| 189 | q.breakable() |
| 190 | q.text("value = "); |
| 191 | q.text(util.pretty_mac(self.value)) |
| 192 | q.breakable() |
| 193 | q.text('}') |
| 194 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 195 | oxm.subtypes[2147495942] = arp_sha |
| 196 | |
| 197 | class arp_sha_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 198 | type_len = 2147496204 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 199 | |
| 200 | def __init__(self, value=None, value_mask=None): |
| 201 | if value != None: |
| 202 | self.value = value |
| 203 | else: |
| 204 | self.value = [0,0,0,0,0,0] |
| 205 | if value_mask != None: |
| 206 | self.value_mask = value_mask |
| 207 | else: |
| 208 | self.value_mask = [0,0,0,0,0,0] |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 209 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 210 | |
| 211 | def pack(self): |
| 212 | packed = [] |
| 213 | packed.append(struct.pack("!L", self.type_len)) |
| 214 | packed.append(struct.pack("!6B", *self.value)) |
| 215 | packed.append(struct.pack("!6B", *self.value_mask)) |
| 216 | return ''.join(packed) |
| 217 | |
| 218 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 219 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 220 | obj = arp_sha_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 221 | _type_len = reader.read("!L")[0] |
| 222 | assert(_type_len == 2147496204) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 223 | obj.value = list(reader.read('!6B')) |
| 224 | obj.value_mask = list(reader.read('!6B')) |
| 225 | return obj |
| 226 | |
| 227 | def __eq__(self, other): |
| 228 | if type(self) != type(other): return False |
| 229 | if self.value != other.value: return False |
| 230 | if self.value_mask != other.value_mask: return False |
| 231 | return True |
| 232 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 233 | def pretty_print(self, q): |
| 234 | q.text("arp_sha_masked {") |
| 235 | with q.group(): |
| 236 | with q.indent(2): |
| 237 | q.breakable() |
| 238 | q.text("value = "); |
| 239 | q.text(util.pretty_mac(self.value)) |
| 240 | q.text(","); q.breakable() |
| 241 | q.text("value_mask = "); |
| 242 | q.text(util.pretty_mac(self.value_mask)) |
| 243 | q.breakable() |
| 244 | q.text('}') |
| 245 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 246 | oxm.subtypes[2147496204] = arp_sha_masked |
| 247 | |
| 248 | class arp_spa(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 249 | type_len = 2147494916 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 250 | |
| 251 | def __init__(self, value=None): |
| 252 | if value != None: |
| 253 | self.value = value |
| 254 | else: |
| 255 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 256 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 257 | |
| 258 | def pack(self): |
| 259 | packed = [] |
| 260 | packed.append(struct.pack("!L", self.type_len)) |
| 261 | packed.append(struct.pack("!L", self.value)) |
| 262 | return ''.join(packed) |
| 263 | |
| 264 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 265 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 266 | obj = arp_spa() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 267 | _type_len = reader.read("!L")[0] |
| 268 | assert(_type_len == 2147494916) |
| 269 | obj.value = reader.read("!L")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 270 | return obj |
| 271 | |
| 272 | def __eq__(self, other): |
| 273 | if type(self) != type(other): return False |
| 274 | if self.value != other.value: return False |
| 275 | return True |
| 276 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 277 | def pretty_print(self, q): |
| 278 | q.text("arp_spa {") |
| 279 | with q.group(): |
| 280 | with q.indent(2): |
| 281 | q.breakable() |
| 282 | q.text("value = "); |
| 283 | q.text("%#x" % self.value) |
| 284 | q.breakable() |
| 285 | q.text('}') |
| 286 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 287 | oxm.subtypes[2147494916] = arp_spa |
| 288 | |
| 289 | class arp_spa_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 290 | type_len = 2147495176 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 291 | |
| 292 | def __init__(self, value=None, value_mask=None): |
| 293 | if value != None: |
| 294 | self.value = value |
| 295 | else: |
| 296 | self.value = 0 |
| 297 | if value_mask != None: |
| 298 | self.value_mask = value_mask |
| 299 | else: |
| 300 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 301 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 302 | |
| 303 | def pack(self): |
| 304 | packed = [] |
| 305 | packed.append(struct.pack("!L", self.type_len)) |
| 306 | packed.append(struct.pack("!L", self.value)) |
| 307 | packed.append(struct.pack("!L", self.value_mask)) |
| 308 | return ''.join(packed) |
| 309 | |
| 310 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 311 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 312 | obj = arp_spa_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 313 | _type_len = reader.read("!L")[0] |
| 314 | assert(_type_len == 2147495176) |
| 315 | obj.value = reader.read("!L")[0] |
| 316 | obj.value_mask = reader.read("!L")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 317 | return obj |
| 318 | |
| 319 | def __eq__(self, other): |
| 320 | if type(self) != type(other): return False |
| 321 | if self.value != other.value: return False |
| 322 | if self.value_mask != other.value_mask: return False |
| 323 | return True |
| 324 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 325 | def pretty_print(self, q): |
| 326 | q.text("arp_spa_masked {") |
| 327 | with q.group(): |
| 328 | with q.indent(2): |
| 329 | q.breakable() |
| 330 | q.text("value = "); |
| 331 | q.text("%#x" % self.value) |
| 332 | q.text(","); q.breakable() |
| 333 | q.text("value_mask = "); |
| 334 | q.text("%#x" % self.value_mask) |
| 335 | q.breakable() |
| 336 | q.text('}') |
| 337 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 338 | oxm.subtypes[2147495176] = arp_spa_masked |
| 339 | |
| 340 | class arp_tha(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 341 | type_len = 2147496454 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 342 | |
| 343 | def __init__(self, value=None): |
| 344 | if value != None: |
| 345 | self.value = value |
| 346 | else: |
| 347 | self.value = [0,0,0,0,0,0] |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 348 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 349 | |
| 350 | def pack(self): |
| 351 | packed = [] |
| 352 | packed.append(struct.pack("!L", self.type_len)) |
| 353 | packed.append(struct.pack("!6B", *self.value)) |
| 354 | return ''.join(packed) |
| 355 | |
| 356 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 357 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 358 | obj = arp_tha() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 359 | _type_len = reader.read("!L")[0] |
| 360 | assert(_type_len == 2147496454) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 361 | obj.value = list(reader.read('!6B')) |
| 362 | return obj |
| 363 | |
| 364 | def __eq__(self, other): |
| 365 | if type(self) != type(other): return False |
| 366 | if self.value != other.value: return False |
| 367 | return True |
| 368 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 369 | def pretty_print(self, q): |
| 370 | q.text("arp_tha {") |
| 371 | with q.group(): |
| 372 | with q.indent(2): |
| 373 | q.breakable() |
| 374 | q.text("value = "); |
| 375 | q.text(util.pretty_mac(self.value)) |
| 376 | q.breakable() |
| 377 | q.text('}') |
| 378 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 379 | oxm.subtypes[2147496454] = arp_tha |
| 380 | |
| 381 | class arp_tha_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 382 | type_len = 2147496716 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 383 | |
| 384 | def __init__(self, value=None, value_mask=None): |
| 385 | if value != None: |
| 386 | self.value = value |
| 387 | else: |
| 388 | self.value = [0,0,0,0,0,0] |
| 389 | if value_mask != None: |
| 390 | self.value_mask = value_mask |
| 391 | else: |
| 392 | self.value_mask = [0,0,0,0,0,0] |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 393 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 394 | |
| 395 | def pack(self): |
| 396 | packed = [] |
| 397 | packed.append(struct.pack("!L", self.type_len)) |
| 398 | packed.append(struct.pack("!6B", *self.value)) |
| 399 | packed.append(struct.pack("!6B", *self.value_mask)) |
| 400 | return ''.join(packed) |
| 401 | |
| 402 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 403 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 404 | obj = arp_tha_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 405 | _type_len = reader.read("!L")[0] |
| 406 | assert(_type_len == 2147496716) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 407 | obj.value = list(reader.read('!6B')) |
| 408 | obj.value_mask = list(reader.read('!6B')) |
| 409 | return obj |
| 410 | |
| 411 | def __eq__(self, other): |
| 412 | if type(self) != type(other): return False |
| 413 | if self.value != other.value: return False |
| 414 | if self.value_mask != other.value_mask: return False |
| 415 | return True |
| 416 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 417 | def pretty_print(self, q): |
| 418 | q.text("arp_tha_masked {") |
| 419 | with q.group(): |
| 420 | with q.indent(2): |
| 421 | q.breakable() |
| 422 | q.text("value = "); |
| 423 | q.text(util.pretty_mac(self.value)) |
| 424 | q.text(","); q.breakable() |
| 425 | q.text("value_mask = "); |
| 426 | q.text(util.pretty_mac(self.value_mask)) |
| 427 | q.breakable() |
| 428 | q.text('}') |
| 429 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 430 | oxm.subtypes[2147496716] = arp_tha_masked |
| 431 | |
| 432 | class arp_tpa(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 433 | type_len = 2147495428 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 434 | |
| 435 | def __init__(self, value=None): |
| 436 | if value != None: |
| 437 | self.value = value |
| 438 | else: |
| 439 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 440 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 441 | |
| 442 | def pack(self): |
| 443 | packed = [] |
| 444 | packed.append(struct.pack("!L", self.type_len)) |
| 445 | packed.append(struct.pack("!L", self.value)) |
| 446 | return ''.join(packed) |
| 447 | |
| 448 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 449 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 450 | obj = arp_tpa() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 451 | _type_len = reader.read("!L")[0] |
| 452 | assert(_type_len == 2147495428) |
| 453 | obj.value = reader.read("!L")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 454 | return obj |
| 455 | |
| 456 | def __eq__(self, other): |
| 457 | if type(self) != type(other): return False |
| 458 | if self.value != other.value: return False |
| 459 | return True |
| 460 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 461 | def pretty_print(self, q): |
| 462 | q.text("arp_tpa {") |
| 463 | with q.group(): |
| 464 | with q.indent(2): |
| 465 | q.breakable() |
| 466 | q.text("value = "); |
| 467 | q.text("%#x" % self.value) |
| 468 | q.breakable() |
| 469 | q.text('}') |
| 470 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 471 | oxm.subtypes[2147495428] = arp_tpa |
| 472 | |
| 473 | class arp_tpa_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 474 | type_len = 2147495688 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 475 | |
| 476 | def __init__(self, value=None, value_mask=None): |
| 477 | if value != None: |
| 478 | self.value = value |
| 479 | else: |
| 480 | self.value = 0 |
| 481 | if value_mask != None: |
| 482 | self.value_mask = value_mask |
| 483 | else: |
| 484 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 485 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 486 | |
| 487 | def pack(self): |
| 488 | packed = [] |
| 489 | packed.append(struct.pack("!L", self.type_len)) |
| 490 | packed.append(struct.pack("!L", self.value)) |
| 491 | packed.append(struct.pack("!L", self.value_mask)) |
| 492 | return ''.join(packed) |
| 493 | |
| 494 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 495 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 496 | obj = arp_tpa_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 497 | _type_len = reader.read("!L")[0] |
| 498 | assert(_type_len == 2147495688) |
| 499 | obj.value = reader.read("!L")[0] |
| 500 | obj.value_mask = reader.read("!L")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 501 | return obj |
| 502 | |
| 503 | def __eq__(self, other): |
| 504 | if type(self) != type(other): return False |
| 505 | if self.value != other.value: return False |
| 506 | if self.value_mask != other.value_mask: return False |
| 507 | return True |
| 508 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 509 | def pretty_print(self, q): |
| 510 | q.text("arp_tpa_masked {") |
| 511 | with q.group(): |
| 512 | with q.indent(2): |
| 513 | q.breakable() |
| 514 | q.text("value = "); |
| 515 | q.text("%#x" % self.value) |
| 516 | q.text(","); q.breakable() |
| 517 | q.text("value_mask = "); |
| 518 | q.text("%#x" % self.value_mask) |
| 519 | q.breakable() |
| 520 | q.text('}') |
| 521 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 522 | oxm.subtypes[2147495688] = arp_tpa_masked |
| 523 | |
Rich Lane | c0d05d1 | 2014-03-11 18:02:24 -0700 | [diff] [blame] | 524 | class bsn_egr_port_group_id(oxm): |
| 525 | type_len = 200196 |
| 526 | |
| 527 | def __init__(self, value=None): |
| 528 | if value != None: |
| 529 | self.value = value |
| 530 | else: |
| 531 | self.value = 0 |
| 532 | return |
| 533 | |
| 534 | def pack(self): |
| 535 | packed = [] |
| 536 | packed.append(struct.pack("!L", self.type_len)) |
| 537 | packed.append(struct.pack("!L", self.value)) |
| 538 | return ''.join(packed) |
| 539 | |
| 540 | @staticmethod |
| 541 | def unpack(reader): |
| 542 | obj = bsn_egr_port_group_id() |
| 543 | _type_len = reader.read("!L")[0] |
| 544 | assert(_type_len == 200196) |
| 545 | obj.value = reader.read("!L")[0] |
| 546 | return obj |
| 547 | |
| 548 | def __eq__(self, other): |
| 549 | if type(self) != type(other): return False |
| 550 | if self.value != other.value: return False |
| 551 | return True |
| 552 | |
| 553 | def pretty_print(self, q): |
| 554 | q.text("bsn_egr_port_group_id {") |
| 555 | with q.group(): |
| 556 | with q.indent(2): |
| 557 | q.breakable() |
| 558 | q.text("value = "); |
| 559 | q.text("%#x" % self.value) |
| 560 | q.breakable() |
| 561 | q.text('}') |
| 562 | |
| 563 | oxm.subtypes[200196] = bsn_egr_port_group_id |
| 564 | |
| 565 | class bsn_egr_port_group_id_masked(oxm): |
| 566 | type_len = 200456 |
| 567 | |
| 568 | def __init__(self, value=None, value_mask=None): |
| 569 | if value != None: |
| 570 | self.value = value |
| 571 | else: |
| 572 | self.value = 0 |
| 573 | if value_mask != None: |
| 574 | self.value_mask = value_mask |
| 575 | else: |
| 576 | self.value_mask = 0 |
| 577 | return |
| 578 | |
| 579 | def pack(self): |
| 580 | packed = [] |
| 581 | packed.append(struct.pack("!L", self.type_len)) |
| 582 | packed.append(struct.pack("!L", self.value)) |
| 583 | packed.append(struct.pack("!L", self.value_mask)) |
| 584 | return ''.join(packed) |
| 585 | |
| 586 | @staticmethod |
| 587 | def unpack(reader): |
| 588 | obj = bsn_egr_port_group_id_masked() |
| 589 | _type_len = reader.read("!L")[0] |
| 590 | assert(_type_len == 200456) |
| 591 | obj.value = reader.read("!L")[0] |
| 592 | obj.value_mask = reader.read("!L")[0] |
| 593 | return obj |
| 594 | |
| 595 | def __eq__(self, other): |
| 596 | if type(self) != type(other): return False |
| 597 | if self.value != other.value: return False |
| 598 | if self.value_mask != other.value_mask: return False |
| 599 | return True |
| 600 | |
| 601 | def pretty_print(self, q): |
| 602 | q.text("bsn_egr_port_group_id_masked {") |
| 603 | with q.group(): |
| 604 | with q.indent(2): |
| 605 | q.breakable() |
| 606 | q.text("value = "); |
| 607 | q.text("%#x" % self.value) |
| 608 | q.text(","); q.breakable() |
| 609 | q.text("value_mask = "); |
| 610 | q.text("%#x" % self.value_mask) |
| 611 | q.breakable() |
| 612 | q.text('}') |
| 613 | |
| 614 | oxm.subtypes[200456] = bsn_egr_port_group_id_masked |
| 615 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 616 | class bsn_global_vrf_allowed(oxm): |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 617 | type_len = 198145 |
| 618 | |
| 619 | def __init__(self, value=None): |
| 620 | if value != None: |
| 621 | self.value = value |
| 622 | else: |
| 623 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 624 | return |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 625 | |
| 626 | def pack(self): |
| 627 | packed = [] |
| 628 | packed.append(struct.pack("!L", self.type_len)) |
| 629 | packed.append(struct.pack("!B", self.value)) |
| 630 | return ''.join(packed) |
| 631 | |
| 632 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 633 | def unpack(reader): |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 634 | obj = bsn_global_vrf_allowed() |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 635 | _type_len = reader.read("!L")[0] |
| 636 | assert(_type_len == 198145) |
| 637 | obj.value = reader.read("!B")[0] |
| 638 | return obj |
| 639 | |
| 640 | def __eq__(self, other): |
| 641 | if type(self) != type(other): return False |
| 642 | if self.value != other.value: return False |
| 643 | return True |
| 644 | |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 645 | def pretty_print(self, q): |
| 646 | q.text("bsn_global_vrf_allowed {") |
| 647 | with q.group(): |
| 648 | with q.indent(2): |
| 649 | q.breakable() |
| 650 | q.text("value = "); |
| 651 | q.text("%#x" % self.value) |
| 652 | q.breakable() |
| 653 | q.text('}') |
| 654 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 655 | oxm.subtypes[198145] = bsn_global_vrf_allowed |
| 656 | |
| 657 | class bsn_global_vrf_allowed_masked(oxm): |
| 658 | type_len = 198402 |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 659 | |
| 660 | def __init__(self, value=None, value_mask=None): |
| 661 | if value != None: |
| 662 | self.value = value |
| 663 | else: |
| 664 | self.value = 0 |
| 665 | if value_mask != None: |
| 666 | self.value_mask = value_mask |
| 667 | else: |
| 668 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 669 | return |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 670 | |
| 671 | def pack(self): |
| 672 | packed = [] |
| 673 | packed.append(struct.pack("!L", self.type_len)) |
| 674 | packed.append(struct.pack("!B", self.value)) |
| 675 | packed.append(struct.pack("!B", self.value_mask)) |
| 676 | return ''.join(packed) |
| 677 | |
| 678 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 679 | def unpack(reader): |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 680 | obj = bsn_global_vrf_allowed_masked() |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 681 | _type_len = reader.read("!L")[0] |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 682 | assert(_type_len == 198402) |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 683 | obj.value = reader.read("!B")[0] |
| 684 | obj.value_mask = reader.read("!B")[0] |
| 685 | return obj |
| 686 | |
| 687 | def __eq__(self, other): |
| 688 | if type(self) != type(other): return False |
| 689 | if self.value != other.value: return False |
| 690 | if self.value_mask != other.value_mask: return False |
| 691 | return True |
| 692 | |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 693 | def pretty_print(self, q): |
| 694 | q.text("bsn_global_vrf_allowed_masked {") |
| 695 | with q.group(): |
| 696 | with q.indent(2): |
| 697 | q.breakable() |
| 698 | q.text("value = "); |
| 699 | q.text("%#x" % self.value) |
| 700 | q.text(","); q.breakable() |
| 701 | q.text("value_mask = "); |
| 702 | q.text("%#x" % self.value_mask) |
| 703 | q.breakable() |
| 704 | q.text('}') |
| 705 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 706 | oxm.subtypes[198402] = bsn_global_vrf_allowed_masked |
| 707 | |
| 708 | class bsn_in_ports_128(oxm): |
| 709 | type_len = 196624 |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 710 | |
| 711 | def __init__(self, value=None): |
| 712 | if value != None: |
| 713 | self.value = value |
| 714 | else: |
| 715 | self.value = set() |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 716 | return |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 717 | |
| 718 | def pack(self): |
| 719 | packed = [] |
| 720 | packed.append(struct.pack("!L", self.type_len)) |
| 721 | packed.append(util.pack_bitmap_128(self.value)) |
| 722 | return ''.join(packed) |
| 723 | |
| 724 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 725 | def unpack(reader): |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 726 | obj = bsn_in_ports_128() |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 727 | _type_len = reader.read("!L")[0] |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 728 | assert(_type_len == 196624) |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 729 | obj.value = util.unpack_bitmap_128(reader) |
| 730 | return obj |
| 731 | |
| 732 | def __eq__(self, other): |
| 733 | if type(self) != type(other): return False |
| 734 | if self.value != other.value: return False |
| 735 | return True |
| 736 | |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 737 | def pretty_print(self, q): |
| 738 | q.text("bsn_in_ports_128 {") |
| 739 | with q.group(): |
| 740 | with q.indent(2): |
| 741 | q.breakable() |
| 742 | q.text("value = "); |
| 743 | q.pp(self.value) |
| 744 | q.breakable() |
| 745 | q.text('}') |
| 746 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 747 | oxm.subtypes[196624] = bsn_in_ports_128 |
| 748 | |
| 749 | class bsn_in_ports_128_masked(oxm): |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 750 | type_len = 196896 |
| 751 | |
| 752 | def __init__(self, value=None, value_mask=None): |
| 753 | if value != None: |
| 754 | self.value = value |
| 755 | else: |
| 756 | self.value = set() |
| 757 | if value_mask != None: |
| 758 | self.value_mask = value_mask |
| 759 | else: |
| 760 | self.value_mask = set() |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 761 | return |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 762 | |
| 763 | def pack(self): |
| 764 | packed = [] |
| 765 | packed.append(struct.pack("!L", self.type_len)) |
| 766 | packed.append(util.pack_bitmap_128(self.value)) |
| 767 | packed.append(util.pack_bitmap_128(self.value_mask)) |
| 768 | return ''.join(packed) |
| 769 | |
| 770 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 771 | def unpack(reader): |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 772 | obj = bsn_in_ports_128_masked() |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 773 | _type_len = reader.read("!L")[0] |
| 774 | assert(_type_len == 196896) |
| 775 | obj.value = util.unpack_bitmap_128(reader) |
| 776 | obj.value_mask = util.unpack_bitmap_128(reader) |
| 777 | return obj |
| 778 | |
| 779 | def __eq__(self, other): |
| 780 | if type(self) != type(other): return False |
| 781 | if self.value != other.value: return False |
| 782 | if self.value_mask != other.value_mask: return False |
| 783 | return True |
| 784 | |
Rich Lane | 6f4978c | 2013-10-20 21:33:52 -0700 | [diff] [blame] | 785 | def pretty_print(self, q): |
| 786 | q.text("bsn_in_ports_128_masked {") |
| 787 | with q.group(): |
| 788 | with q.indent(2): |
| 789 | q.breakable() |
| 790 | q.text("value = "); |
| 791 | q.pp(self.value) |
| 792 | q.text(","); q.breakable() |
| 793 | q.text("value_mask = "); |
| 794 | q.pp(self.value_mask) |
| 795 | q.breakable() |
| 796 | q.text('}') |
| 797 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 798 | oxm.subtypes[196896] = bsn_in_ports_128_masked |
| 799 | |
| 800 | class bsn_l3_dst_class_id(oxm): |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 801 | type_len = 199684 |
| 802 | |
| 803 | def __init__(self, value=None): |
| 804 | if value != None: |
| 805 | self.value = value |
| 806 | else: |
| 807 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 808 | return |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 809 | |
| 810 | def pack(self): |
| 811 | packed = [] |
| 812 | packed.append(struct.pack("!L", self.type_len)) |
| 813 | packed.append(struct.pack("!L", self.value)) |
| 814 | return ''.join(packed) |
| 815 | |
| 816 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 817 | def unpack(reader): |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 818 | obj = bsn_l3_dst_class_id() |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 819 | _type_len = reader.read("!L")[0] |
| 820 | assert(_type_len == 199684) |
| 821 | obj.value = reader.read("!L")[0] |
| 822 | return obj |
| 823 | |
| 824 | def __eq__(self, other): |
| 825 | if type(self) != type(other): return False |
| 826 | if self.value != other.value: return False |
| 827 | return True |
| 828 | |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 829 | def pretty_print(self, q): |
| 830 | q.text("bsn_l3_dst_class_id {") |
| 831 | with q.group(): |
| 832 | with q.indent(2): |
| 833 | q.breakable() |
| 834 | q.text("value = "); |
| 835 | q.text("%#x" % self.value) |
| 836 | q.breakable() |
| 837 | q.text('}') |
| 838 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 839 | oxm.subtypes[199684] = bsn_l3_dst_class_id |
| 840 | |
| 841 | class bsn_l3_dst_class_id_masked(oxm): |
| 842 | type_len = 199944 |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 843 | |
| 844 | def __init__(self, value=None, value_mask=None): |
| 845 | if value != None: |
| 846 | self.value = value |
| 847 | else: |
| 848 | self.value = 0 |
| 849 | if value_mask != None: |
| 850 | self.value_mask = value_mask |
| 851 | else: |
| 852 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 853 | return |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 854 | |
| 855 | def pack(self): |
| 856 | packed = [] |
| 857 | packed.append(struct.pack("!L", self.type_len)) |
| 858 | packed.append(struct.pack("!L", self.value)) |
| 859 | packed.append(struct.pack("!L", self.value_mask)) |
| 860 | return ''.join(packed) |
| 861 | |
| 862 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 863 | def unpack(reader): |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 864 | obj = bsn_l3_dst_class_id_masked() |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 865 | _type_len = reader.read("!L")[0] |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 866 | assert(_type_len == 199944) |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 867 | obj.value = reader.read("!L")[0] |
| 868 | obj.value_mask = reader.read("!L")[0] |
| 869 | return obj |
| 870 | |
| 871 | def __eq__(self, other): |
| 872 | if type(self) != type(other): return False |
| 873 | if self.value != other.value: return False |
| 874 | if self.value_mask != other.value_mask: return False |
| 875 | return True |
| 876 | |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 877 | def pretty_print(self, q): |
| 878 | q.text("bsn_l3_dst_class_id_masked {") |
| 879 | with q.group(): |
| 880 | with q.indent(2): |
| 881 | q.breakable() |
| 882 | q.text("value = "); |
| 883 | q.text("%#x" % self.value) |
| 884 | q.text(","); q.breakable() |
| 885 | q.text("value_mask = "); |
| 886 | q.text("%#x" % self.value_mask) |
| 887 | q.breakable() |
| 888 | q.text('}') |
| 889 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 890 | oxm.subtypes[199944] = bsn_l3_dst_class_id_masked |
| 891 | |
| 892 | class bsn_l3_interface_class_id(oxm): |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 893 | type_len = 198660 |
| 894 | |
| 895 | def __init__(self, value=None): |
| 896 | if value != None: |
| 897 | self.value = value |
| 898 | else: |
| 899 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 900 | return |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 901 | |
| 902 | def pack(self): |
| 903 | packed = [] |
| 904 | packed.append(struct.pack("!L", self.type_len)) |
| 905 | packed.append(struct.pack("!L", self.value)) |
| 906 | return ''.join(packed) |
| 907 | |
| 908 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 909 | def unpack(reader): |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 910 | obj = bsn_l3_interface_class_id() |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 911 | _type_len = reader.read("!L")[0] |
| 912 | assert(_type_len == 198660) |
| 913 | obj.value = reader.read("!L")[0] |
| 914 | return obj |
| 915 | |
| 916 | def __eq__(self, other): |
| 917 | if type(self) != type(other): return False |
| 918 | if self.value != other.value: return False |
| 919 | return True |
| 920 | |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 921 | def pretty_print(self, q): |
| 922 | q.text("bsn_l3_interface_class_id {") |
| 923 | with q.group(): |
| 924 | with q.indent(2): |
| 925 | q.breakable() |
| 926 | q.text("value = "); |
| 927 | q.text("%#x" % self.value) |
| 928 | q.breakable() |
| 929 | q.text('}') |
| 930 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 931 | oxm.subtypes[198660] = bsn_l3_interface_class_id |
| 932 | |
| 933 | class bsn_l3_interface_class_id_masked(oxm): |
| 934 | type_len = 198920 |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 935 | |
| 936 | def __init__(self, value=None, value_mask=None): |
| 937 | if value != None: |
| 938 | self.value = value |
| 939 | else: |
| 940 | self.value = 0 |
| 941 | if value_mask != None: |
| 942 | self.value_mask = value_mask |
| 943 | else: |
| 944 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 945 | return |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 946 | |
| 947 | def pack(self): |
| 948 | packed = [] |
| 949 | packed.append(struct.pack("!L", self.type_len)) |
| 950 | packed.append(struct.pack("!L", self.value)) |
| 951 | packed.append(struct.pack("!L", self.value_mask)) |
| 952 | return ''.join(packed) |
| 953 | |
| 954 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 955 | def unpack(reader): |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 956 | obj = bsn_l3_interface_class_id_masked() |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 957 | _type_len = reader.read("!L")[0] |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 958 | assert(_type_len == 198920) |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 959 | obj.value = reader.read("!L")[0] |
| 960 | obj.value_mask = reader.read("!L")[0] |
| 961 | return obj |
| 962 | |
| 963 | def __eq__(self, other): |
| 964 | if type(self) != type(other): return False |
| 965 | if self.value != other.value: return False |
| 966 | if self.value_mask != other.value_mask: return False |
| 967 | return True |
| 968 | |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 969 | def pretty_print(self, q): |
| 970 | q.text("bsn_l3_interface_class_id_masked {") |
| 971 | with q.group(): |
| 972 | with q.indent(2): |
| 973 | q.breakable() |
| 974 | q.text("value = "); |
| 975 | q.text("%#x" % self.value) |
| 976 | q.text(","); q.breakable() |
| 977 | q.text("value_mask = "); |
| 978 | q.text("%#x" % self.value_mask) |
| 979 | q.breakable() |
| 980 | q.text('}') |
| 981 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 982 | oxm.subtypes[198920] = bsn_l3_interface_class_id_masked |
| 983 | |
| 984 | class bsn_l3_src_class_id(oxm): |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 985 | type_len = 199172 |
| 986 | |
| 987 | def __init__(self, value=None): |
| 988 | if value != None: |
| 989 | self.value = value |
| 990 | else: |
| 991 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 992 | return |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 993 | |
| 994 | def pack(self): |
| 995 | packed = [] |
| 996 | packed.append(struct.pack("!L", self.type_len)) |
| 997 | packed.append(struct.pack("!L", self.value)) |
| 998 | return ''.join(packed) |
| 999 | |
| 1000 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 1001 | def unpack(reader): |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 1002 | obj = bsn_l3_src_class_id() |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 1003 | _type_len = reader.read("!L")[0] |
| 1004 | assert(_type_len == 199172) |
| 1005 | obj.value = reader.read("!L")[0] |
| 1006 | return obj |
| 1007 | |
| 1008 | def __eq__(self, other): |
| 1009 | if type(self) != type(other): return False |
| 1010 | if self.value != other.value: return False |
| 1011 | return True |
| 1012 | |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 1013 | def pretty_print(self, q): |
| 1014 | q.text("bsn_l3_src_class_id {") |
| 1015 | with q.group(): |
| 1016 | with q.indent(2): |
| 1017 | q.breakable() |
| 1018 | q.text("value = "); |
| 1019 | q.text("%#x" % self.value) |
| 1020 | q.breakable() |
| 1021 | q.text('}') |
| 1022 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 1023 | oxm.subtypes[199172] = bsn_l3_src_class_id |
| 1024 | |
| 1025 | class bsn_l3_src_class_id_masked(oxm): |
| 1026 | type_len = 199432 |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 1027 | |
| 1028 | def __init__(self, value=None, value_mask=None): |
| 1029 | if value != None: |
| 1030 | self.value = value |
| 1031 | else: |
| 1032 | self.value = 0 |
| 1033 | if value_mask != None: |
| 1034 | self.value_mask = value_mask |
| 1035 | else: |
| 1036 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 1037 | return |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 1038 | |
| 1039 | def pack(self): |
| 1040 | packed = [] |
| 1041 | packed.append(struct.pack("!L", self.type_len)) |
| 1042 | packed.append(struct.pack("!L", self.value)) |
| 1043 | packed.append(struct.pack("!L", self.value_mask)) |
| 1044 | return ''.join(packed) |
| 1045 | |
| 1046 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 1047 | def unpack(reader): |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 1048 | obj = bsn_l3_src_class_id_masked() |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 1049 | _type_len = reader.read("!L")[0] |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 1050 | assert(_type_len == 199432) |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 1051 | obj.value = reader.read("!L")[0] |
| 1052 | obj.value_mask = reader.read("!L")[0] |
| 1053 | return obj |
| 1054 | |
| 1055 | def __eq__(self, other): |
| 1056 | if type(self) != type(other): return False |
| 1057 | if self.value != other.value: return False |
| 1058 | if self.value_mask != other.value_mask: return False |
| 1059 | return True |
| 1060 | |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 1061 | def pretty_print(self, q): |
| 1062 | q.text("bsn_l3_src_class_id_masked {") |
| 1063 | with q.group(): |
| 1064 | with q.indent(2): |
| 1065 | q.breakable() |
| 1066 | q.text("value = "); |
| 1067 | q.text("%#x" % self.value) |
| 1068 | q.text(","); q.breakable() |
| 1069 | q.text("value_mask = "); |
| 1070 | q.text("%#x" % self.value_mask) |
| 1071 | q.breakable() |
| 1072 | q.text('}') |
| 1073 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 1074 | oxm.subtypes[199432] = bsn_l3_src_class_id_masked |
| 1075 | |
| 1076 | class bsn_lag_id(oxm): |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 1077 | type_len = 197124 |
| 1078 | |
| 1079 | def __init__(self, value=None): |
| 1080 | if value != None: |
| 1081 | self.value = value |
| 1082 | else: |
| 1083 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 1084 | return |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 1085 | |
| 1086 | def pack(self): |
| 1087 | packed = [] |
| 1088 | packed.append(struct.pack("!L", self.type_len)) |
| 1089 | packed.append(struct.pack("!L", self.value)) |
| 1090 | return ''.join(packed) |
| 1091 | |
| 1092 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 1093 | def unpack(reader): |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 1094 | obj = bsn_lag_id() |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 1095 | _type_len = reader.read("!L")[0] |
| 1096 | assert(_type_len == 197124) |
| 1097 | obj.value = reader.read("!L")[0] |
| 1098 | return obj |
| 1099 | |
| 1100 | def __eq__(self, other): |
| 1101 | if type(self) != type(other): return False |
| 1102 | if self.value != other.value: return False |
| 1103 | return True |
| 1104 | |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 1105 | def pretty_print(self, q): |
| 1106 | q.text("bsn_lag_id {") |
| 1107 | with q.group(): |
| 1108 | with q.indent(2): |
| 1109 | q.breakable() |
| 1110 | q.text("value = "); |
| 1111 | q.text("%#x" % self.value) |
| 1112 | q.breakable() |
| 1113 | q.text('}') |
| 1114 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 1115 | oxm.subtypes[197124] = bsn_lag_id |
| 1116 | |
| 1117 | class bsn_lag_id_masked(oxm): |
| 1118 | type_len = 197384 |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 1119 | |
| 1120 | def __init__(self, value=None, value_mask=None): |
| 1121 | if value != None: |
| 1122 | self.value = value |
| 1123 | else: |
| 1124 | self.value = 0 |
| 1125 | if value_mask != None: |
| 1126 | self.value_mask = value_mask |
| 1127 | else: |
| 1128 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 1129 | return |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 1130 | |
| 1131 | def pack(self): |
| 1132 | packed = [] |
| 1133 | packed.append(struct.pack("!L", self.type_len)) |
| 1134 | packed.append(struct.pack("!L", self.value)) |
| 1135 | packed.append(struct.pack("!L", self.value_mask)) |
| 1136 | return ''.join(packed) |
| 1137 | |
| 1138 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 1139 | def unpack(reader): |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 1140 | obj = bsn_lag_id_masked() |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 1141 | _type_len = reader.read("!L")[0] |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 1142 | assert(_type_len == 197384) |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 1143 | obj.value = reader.read("!L")[0] |
| 1144 | obj.value_mask = reader.read("!L")[0] |
| 1145 | return obj |
| 1146 | |
| 1147 | def __eq__(self, other): |
| 1148 | if type(self) != type(other): return False |
| 1149 | if self.value != other.value: return False |
| 1150 | if self.value_mask != other.value_mask: return False |
| 1151 | return True |
| 1152 | |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 1153 | def pretty_print(self, q): |
| 1154 | q.text("bsn_lag_id_masked {") |
| 1155 | with q.group(): |
| 1156 | with q.indent(2): |
| 1157 | q.breakable() |
| 1158 | q.text("value = "); |
| 1159 | q.text("%#x" % self.value) |
| 1160 | q.text(","); q.breakable() |
| 1161 | q.text("value_mask = "); |
| 1162 | q.text("%#x" % self.value_mask) |
| 1163 | q.breakable() |
| 1164 | q.text('}') |
| 1165 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 1166 | oxm.subtypes[197384] = bsn_lag_id_masked |
| 1167 | |
Harshmeet Singh | c51f404 | 2014-05-21 13:32:52 -0700 | [diff] [blame] | 1168 | class bsn_tcp_flags(oxm): |
| 1169 | type_len = 204802 |
| 1170 | |
| 1171 | def __init__(self, value=None): |
| 1172 | if value != None: |
| 1173 | self.value = value |
| 1174 | else: |
| 1175 | self.value = 0 |
| 1176 | return |
| 1177 | |
| 1178 | def pack(self): |
| 1179 | packed = [] |
| 1180 | packed.append(struct.pack("!L", self.type_len)) |
| 1181 | packed.append(struct.pack("!H", self.value)) |
| 1182 | return ''.join(packed) |
| 1183 | |
| 1184 | @staticmethod |
| 1185 | def unpack(reader): |
| 1186 | obj = bsn_tcp_flags() |
| 1187 | _type_len = reader.read("!L")[0] |
| 1188 | assert(_type_len == 204802) |
| 1189 | obj.value = reader.read("!H")[0] |
| 1190 | return obj |
| 1191 | |
| 1192 | def __eq__(self, other): |
| 1193 | if type(self) != type(other): return False |
| 1194 | if self.value != other.value: return False |
| 1195 | return True |
| 1196 | |
| 1197 | def pretty_print(self, q): |
| 1198 | q.text("bsn_tcp_flags {") |
| 1199 | with q.group(): |
| 1200 | with q.indent(2): |
| 1201 | q.breakable() |
| 1202 | q.text("value = "); |
| 1203 | q.text("%#x" % self.value) |
| 1204 | q.breakable() |
| 1205 | q.text('}') |
| 1206 | |
| 1207 | oxm.subtypes[204802] = bsn_tcp_flags |
| 1208 | |
| 1209 | class bsn_tcp_flags_masked(oxm): |
| 1210 | type_len = 205060 |
| 1211 | |
| 1212 | def __init__(self, value=None, value_mask=None): |
| 1213 | if value != None: |
| 1214 | self.value = value |
| 1215 | else: |
| 1216 | self.value = 0 |
| 1217 | if value_mask != None: |
| 1218 | self.value_mask = value_mask |
| 1219 | else: |
| 1220 | self.value_mask = 0 |
| 1221 | return |
| 1222 | |
| 1223 | def pack(self): |
| 1224 | packed = [] |
| 1225 | packed.append(struct.pack("!L", self.type_len)) |
| 1226 | packed.append(struct.pack("!H", self.value)) |
| 1227 | packed.append(struct.pack("!H", self.value_mask)) |
| 1228 | return ''.join(packed) |
| 1229 | |
| 1230 | @staticmethod |
| 1231 | def unpack(reader): |
| 1232 | obj = bsn_tcp_flags_masked() |
| 1233 | _type_len = reader.read("!L")[0] |
| 1234 | assert(_type_len == 205060) |
| 1235 | obj.value = reader.read("!H")[0] |
| 1236 | obj.value_mask = reader.read("!H")[0] |
| 1237 | return obj |
| 1238 | |
| 1239 | def __eq__(self, other): |
| 1240 | if type(self) != type(other): return False |
| 1241 | if self.value != other.value: return False |
| 1242 | if self.value_mask != other.value_mask: return False |
| 1243 | return True |
| 1244 | |
| 1245 | def pretty_print(self, q): |
| 1246 | q.text("bsn_tcp_flags_masked {") |
| 1247 | with q.group(): |
| 1248 | with q.indent(2): |
| 1249 | q.breakable() |
| 1250 | q.text("value = "); |
| 1251 | q.text("%#x" % self.value) |
| 1252 | q.text(","); q.breakable() |
| 1253 | q.text("value_mask = "); |
| 1254 | q.text("%#x" % self.value_mask) |
| 1255 | q.breakable() |
| 1256 | q.text('}') |
| 1257 | |
| 1258 | oxm.subtypes[205060] = bsn_tcp_flags_masked |
| 1259 | |
Rich Lane | 93b3313 | 2014-04-21 12:20:58 -0700 | [diff] [blame] | 1260 | class bsn_udf0(oxm): |
| 1261 | type_len = 200708 |
| 1262 | |
| 1263 | def __init__(self, value=None): |
| 1264 | if value != None: |
| 1265 | self.value = value |
| 1266 | else: |
| 1267 | self.value = 0 |
| 1268 | return |
| 1269 | |
| 1270 | def pack(self): |
| 1271 | packed = [] |
| 1272 | packed.append(struct.pack("!L", self.type_len)) |
| 1273 | packed.append(struct.pack("!L", self.value)) |
| 1274 | return ''.join(packed) |
| 1275 | |
| 1276 | @staticmethod |
| 1277 | def unpack(reader): |
| 1278 | obj = bsn_udf0() |
| 1279 | _type_len = reader.read("!L")[0] |
| 1280 | assert(_type_len == 200708) |
| 1281 | obj.value = reader.read("!L")[0] |
| 1282 | return obj |
| 1283 | |
| 1284 | def __eq__(self, other): |
| 1285 | if type(self) != type(other): return False |
| 1286 | if self.value != other.value: return False |
| 1287 | return True |
| 1288 | |
| 1289 | def pretty_print(self, q): |
| 1290 | q.text("bsn_udf0 {") |
| 1291 | with q.group(): |
| 1292 | with q.indent(2): |
| 1293 | q.breakable() |
| 1294 | q.text("value = "); |
| 1295 | q.text("%#x" % self.value) |
| 1296 | q.breakable() |
| 1297 | q.text('}') |
| 1298 | |
| 1299 | oxm.subtypes[200708] = bsn_udf0 |
| 1300 | |
| 1301 | class bsn_udf0_masked(oxm): |
| 1302 | type_len = 200968 |
| 1303 | |
| 1304 | def __init__(self, value=None, value_mask=None): |
| 1305 | if value != None: |
| 1306 | self.value = value |
| 1307 | else: |
| 1308 | self.value = 0 |
| 1309 | if value_mask != None: |
| 1310 | self.value_mask = value_mask |
| 1311 | else: |
| 1312 | self.value_mask = 0 |
| 1313 | return |
| 1314 | |
| 1315 | def pack(self): |
| 1316 | packed = [] |
| 1317 | packed.append(struct.pack("!L", self.type_len)) |
| 1318 | packed.append(struct.pack("!L", self.value)) |
| 1319 | packed.append(struct.pack("!L", self.value_mask)) |
| 1320 | return ''.join(packed) |
| 1321 | |
| 1322 | @staticmethod |
| 1323 | def unpack(reader): |
| 1324 | obj = bsn_udf0_masked() |
| 1325 | _type_len = reader.read("!L")[0] |
| 1326 | assert(_type_len == 200968) |
| 1327 | obj.value = reader.read("!L")[0] |
| 1328 | obj.value_mask = reader.read("!L")[0] |
| 1329 | return obj |
| 1330 | |
| 1331 | def __eq__(self, other): |
| 1332 | if type(self) != type(other): return False |
| 1333 | if self.value != other.value: return False |
| 1334 | if self.value_mask != other.value_mask: return False |
| 1335 | return True |
| 1336 | |
| 1337 | def pretty_print(self, q): |
| 1338 | q.text("bsn_udf0_masked {") |
| 1339 | with q.group(): |
| 1340 | with q.indent(2): |
| 1341 | q.breakable() |
| 1342 | q.text("value = "); |
| 1343 | q.text("%#x" % self.value) |
| 1344 | q.text(","); q.breakable() |
| 1345 | q.text("value_mask = "); |
| 1346 | q.text("%#x" % self.value_mask) |
| 1347 | q.breakable() |
| 1348 | q.text('}') |
| 1349 | |
| 1350 | oxm.subtypes[200968] = bsn_udf0_masked |
| 1351 | |
| 1352 | class bsn_udf1(oxm): |
| 1353 | type_len = 201220 |
| 1354 | |
| 1355 | def __init__(self, value=None): |
| 1356 | if value != None: |
| 1357 | self.value = value |
| 1358 | else: |
| 1359 | self.value = 0 |
| 1360 | return |
| 1361 | |
| 1362 | def pack(self): |
| 1363 | packed = [] |
| 1364 | packed.append(struct.pack("!L", self.type_len)) |
| 1365 | packed.append(struct.pack("!L", self.value)) |
| 1366 | return ''.join(packed) |
| 1367 | |
| 1368 | @staticmethod |
| 1369 | def unpack(reader): |
| 1370 | obj = bsn_udf1() |
| 1371 | _type_len = reader.read("!L")[0] |
| 1372 | assert(_type_len == 201220) |
| 1373 | obj.value = reader.read("!L")[0] |
| 1374 | return obj |
| 1375 | |
| 1376 | def __eq__(self, other): |
| 1377 | if type(self) != type(other): return False |
| 1378 | if self.value != other.value: return False |
| 1379 | return True |
| 1380 | |
| 1381 | def pretty_print(self, q): |
| 1382 | q.text("bsn_udf1 {") |
| 1383 | with q.group(): |
| 1384 | with q.indent(2): |
| 1385 | q.breakable() |
| 1386 | q.text("value = "); |
| 1387 | q.text("%#x" % self.value) |
| 1388 | q.breakable() |
| 1389 | q.text('}') |
| 1390 | |
| 1391 | oxm.subtypes[201220] = bsn_udf1 |
| 1392 | |
| 1393 | class bsn_udf1_masked(oxm): |
| 1394 | type_len = 201480 |
| 1395 | |
| 1396 | def __init__(self, value=None, value_mask=None): |
| 1397 | if value != None: |
| 1398 | self.value = value |
| 1399 | else: |
| 1400 | self.value = 0 |
| 1401 | if value_mask != None: |
| 1402 | self.value_mask = value_mask |
| 1403 | else: |
| 1404 | self.value_mask = 0 |
| 1405 | return |
| 1406 | |
| 1407 | def pack(self): |
| 1408 | packed = [] |
| 1409 | packed.append(struct.pack("!L", self.type_len)) |
| 1410 | packed.append(struct.pack("!L", self.value)) |
| 1411 | packed.append(struct.pack("!L", self.value_mask)) |
| 1412 | return ''.join(packed) |
| 1413 | |
| 1414 | @staticmethod |
| 1415 | def unpack(reader): |
| 1416 | obj = bsn_udf1_masked() |
| 1417 | _type_len = reader.read("!L")[0] |
| 1418 | assert(_type_len == 201480) |
| 1419 | obj.value = reader.read("!L")[0] |
| 1420 | obj.value_mask = reader.read("!L")[0] |
| 1421 | return obj |
| 1422 | |
| 1423 | def __eq__(self, other): |
| 1424 | if type(self) != type(other): return False |
| 1425 | if self.value != other.value: return False |
| 1426 | if self.value_mask != other.value_mask: return False |
| 1427 | return True |
| 1428 | |
| 1429 | def pretty_print(self, q): |
| 1430 | q.text("bsn_udf1_masked {") |
| 1431 | with q.group(): |
| 1432 | with q.indent(2): |
| 1433 | q.breakable() |
| 1434 | q.text("value = "); |
| 1435 | q.text("%#x" % self.value) |
| 1436 | q.text(","); q.breakable() |
| 1437 | q.text("value_mask = "); |
| 1438 | q.text("%#x" % self.value_mask) |
| 1439 | q.breakable() |
| 1440 | q.text('}') |
| 1441 | |
| 1442 | oxm.subtypes[201480] = bsn_udf1_masked |
| 1443 | |
| 1444 | class bsn_udf2(oxm): |
| 1445 | type_len = 201732 |
| 1446 | |
| 1447 | def __init__(self, value=None): |
| 1448 | if value != None: |
| 1449 | self.value = value |
| 1450 | else: |
| 1451 | self.value = 0 |
| 1452 | return |
| 1453 | |
| 1454 | def pack(self): |
| 1455 | packed = [] |
| 1456 | packed.append(struct.pack("!L", self.type_len)) |
| 1457 | packed.append(struct.pack("!L", self.value)) |
| 1458 | return ''.join(packed) |
| 1459 | |
| 1460 | @staticmethod |
| 1461 | def unpack(reader): |
| 1462 | obj = bsn_udf2() |
| 1463 | _type_len = reader.read("!L")[0] |
| 1464 | assert(_type_len == 201732) |
| 1465 | obj.value = reader.read("!L")[0] |
| 1466 | return obj |
| 1467 | |
| 1468 | def __eq__(self, other): |
| 1469 | if type(self) != type(other): return False |
| 1470 | if self.value != other.value: return False |
| 1471 | return True |
| 1472 | |
| 1473 | def pretty_print(self, q): |
| 1474 | q.text("bsn_udf2 {") |
| 1475 | with q.group(): |
| 1476 | with q.indent(2): |
| 1477 | q.breakable() |
| 1478 | q.text("value = "); |
| 1479 | q.text("%#x" % self.value) |
| 1480 | q.breakable() |
| 1481 | q.text('}') |
| 1482 | |
| 1483 | oxm.subtypes[201732] = bsn_udf2 |
| 1484 | |
| 1485 | class bsn_udf2_masked(oxm): |
| 1486 | type_len = 201992 |
| 1487 | |
| 1488 | def __init__(self, value=None, value_mask=None): |
| 1489 | if value != None: |
| 1490 | self.value = value |
| 1491 | else: |
| 1492 | self.value = 0 |
| 1493 | if value_mask != None: |
| 1494 | self.value_mask = value_mask |
| 1495 | else: |
| 1496 | self.value_mask = 0 |
| 1497 | return |
| 1498 | |
| 1499 | def pack(self): |
| 1500 | packed = [] |
| 1501 | packed.append(struct.pack("!L", self.type_len)) |
| 1502 | packed.append(struct.pack("!L", self.value)) |
| 1503 | packed.append(struct.pack("!L", self.value_mask)) |
| 1504 | return ''.join(packed) |
| 1505 | |
| 1506 | @staticmethod |
| 1507 | def unpack(reader): |
| 1508 | obj = bsn_udf2_masked() |
| 1509 | _type_len = reader.read("!L")[0] |
| 1510 | assert(_type_len == 201992) |
| 1511 | obj.value = reader.read("!L")[0] |
| 1512 | obj.value_mask = reader.read("!L")[0] |
| 1513 | return obj |
| 1514 | |
| 1515 | def __eq__(self, other): |
| 1516 | if type(self) != type(other): return False |
| 1517 | if self.value != other.value: return False |
| 1518 | if self.value_mask != other.value_mask: return False |
| 1519 | return True |
| 1520 | |
| 1521 | def pretty_print(self, q): |
| 1522 | q.text("bsn_udf2_masked {") |
| 1523 | with q.group(): |
| 1524 | with q.indent(2): |
| 1525 | q.breakable() |
| 1526 | q.text("value = "); |
| 1527 | q.text("%#x" % self.value) |
| 1528 | q.text(","); q.breakable() |
| 1529 | q.text("value_mask = "); |
| 1530 | q.text("%#x" % self.value_mask) |
| 1531 | q.breakable() |
| 1532 | q.text('}') |
| 1533 | |
| 1534 | oxm.subtypes[201992] = bsn_udf2_masked |
| 1535 | |
| 1536 | class bsn_udf3(oxm): |
| 1537 | type_len = 202244 |
| 1538 | |
| 1539 | def __init__(self, value=None): |
| 1540 | if value != None: |
| 1541 | self.value = value |
| 1542 | else: |
| 1543 | self.value = 0 |
| 1544 | return |
| 1545 | |
| 1546 | def pack(self): |
| 1547 | packed = [] |
| 1548 | packed.append(struct.pack("!L", self.type_len)) |
| 1549 | packed.append(struct.pack("!L", self.value)) |
| 1550 | return ''.join(packed) |
| 1551 | |
| 1552 | @staticmethod |
| 1553 | def unpack(reader): |
| 1554 | obj = bsn_udf3() |
| 1555 | _type_len = reader.read("!L")[0] |
| 1556 | assert(_type_len == 202244) |
| 1557 | obj.value = reader.read("!L")[0] |
| 1558 | return obj |
| 1559 | |
| 1560 | def __eq__(self, other): |
| 1561 | if type(self) != type(other): return False |
| 1562 | if self.value != other.value: return False |
| 1563 | return True |
| 1564 | |
| 1565 | def pretty_print(self, q): |
| 1566 | q.text("bsn_udf3 {") |
| 1567 | with q.group(): |
| 1568 | with q.indent(2): |
| 1569 | q.breakable() |
| 1570 | q.text("value = "); |
| 1571 | q.text("%#x" % self.value) |
| 1572 | q.breakable() |
| 1573 | q.text('}') |
| 1574 | |
| 1575 | oxm.subtypes[202244] = bsn_udf3 |
| 1576 | |
| 1577 | class bsn_udf3_masked(oxm): |
| 1578 | type_len = 202504 |
| 1579 | |
| 1580 | def __init__(self, value=None, value_mask=None): |
| 1581 | if value != None: |
| 1582 | self.value = value |
| 1583 | else: |
| 1584 | self.value = 0 |
| 1585 | if value_mask != None: |
| 1586 | self.value_mask = value_mask |
| 1587 | else: |
| 1588 | self.value_mask = 0 |
| 1589 | return |
| 1590 | |
| 1591 | def pack(self): |
| 1592 | packed = [] |
| 1593 | packed.append(struct.pack("!L", self.type_len)) |
| 1594 | packed.append(struct.pack("!L", self.value)) |
| 1595 | packed.append(struct.pack("!L", self.value_mask)) |
| 1596 | return ''.join(packed) |
| 1597 | |
| 1598 | @staticmethod |
| 1599 | def unpack(reader): |
| 1600 | obj = bsn_udf3_masked() |
| 1601 | _type_len = reader.read("!L")[0] |
| 1602 | assert(_type_len == 202504) |
| 1603 | obj.value = reader.read("!L")[0] |
| 1604 | obj.value_mask = reader.read("!L")[0] |
| 1605 | return obj |
| 1606 | |
| 1607 | def __eq__(self, other): |
| 1608 | if type(self) != type(other): return False |
| 1609 | if self.value != other.value: return False |
| 1610 | if self.value_mask != other.value_mask: return False |
| 1611 | return True |
| 1612 | |
| 1613 | def pretty_print(self, q): |
| 1614 | q.text("bsn_udf3_masked {") |
| 1615 | with q.group(): |
| 1616 | with q.indent(2): |
| 1617 | q.breakable() |
| 1618 | q.text("value = "); |
| 1619 | q.text("%#x" % self.value) |
| 1620 | q.text(","); q.breakable() |
| 1621 | q.text("value_mask = "); |
| 1622 | q.text("%#x" % self.value_mask) |
| 1623 | q.breakable() |
| 1624 | q.text('}') |
| 1625 | |
| 1626 | oxm.subtypes[202504] = bsn_udf3_masked |
| 1627 | |
| 1628 | class bsn_udf4(oxm): |
| 1629 | type_len = 202756 |
| 1630 | |
| 1631 | def __init__(self, value=None): |
| 1632 | if value != None: |
| 1633 | self.value = value |
| 1634 | else: |
| 1635 | self.value = 0 |
| 1636 | return |
| 1637 | |
| 1638 | def pack(self): |
| 1639 | packed = [] |
| 1640 | packed.append(struct.pack("!L", self.type_len)) |
| 1641 | packed.append(struct.pack("!L", self.value)) |
| 1642 | return ''.join(packed) |
| 1643 | |
| 1644 | @staticmethod |
| 1645 | def unpack(reader): |
| 1646 | obj = bsn_udf4() |
| 1647 | _type_len = reader.read("!L")[0] |
| 1648 | assert(_type_len == 202756) |
| 1649 | obj.value = reader.read("!L")[0] |
| 1650 | return obj |
| 1651 | |
| 1652 | def __eq__(self, other): |
| 1653 | if type(self) != type(other): return False |
| 1654 | if self.value != other.value: return False |
| 1655 | return True |
| 1656 | |
| 1657 | def pretty_print(self, q): |
| 1658 | q.text("bsn_udf4 {") |
| 1659 | with q.group(): |
| 1660 | with q.indent(2): |
| 1661 | q.breakable() |
| 1662 | q.text("value = "); |
| 1663 | q.text("%#x" % self.value) |
| 1664 | q.breakable() |
| 1665 | q.text('}') |
| 1666 | |
| 1667 | oxm.subtypes[202756] = bsn_udf4 |
| 1668 | |
| 1669 | class bsn_udf4_masked(oxm): |
| 1670 | type_len = 203016 |
| 1671 | |
| 1672 | def __init__(self, value=None, value_mask=None): |
| 1673 | if value != None: |
| 1674 | self.value = value |
| 1675 | else: |
| 1676 | self.value = 0 |
| 1677 | if value_mask != None: |
| 1678 | self.value_mask = value_mask |
| 1679 | else: |
| 1680 | self.value_mask = 0 |
| 1681 | return |
| 1682 | |
| 1683 | def pack(self): |
| 1684 | packed = [] |
| 1685 | packed.append(struct.pack("!L", self.type_len)) |
| 1686 | packed.append(struct.pack("!L", self.value)) |
| 1687 | packed.append(struct.pack("!L", self.value_mask)) |
| 1688 | return ''.join(packed) |
| 1689 | |
| 1690 | @staticmethod |
| 1691 | def unpack(reader): |
| 1692 | obj = bsn_udf4_masked() |
| 1693 | _type_len = reader.read("!L")[0] |
| 1694 | assert(_type_len == 203016) |
| 1695 | obj.value = reader.read("!L")[0] |
| 1696 | obj.value_mask = reader.read("!L")[0] |
| 1697 | return obj |
| 1698 | |
| 1699 | def __eq__(self, other): |
| 1700 | if type(self) != type(other): return False |
| 1701 | if self.value != other.value: return False |
| 1702 | if self.value_mask != other.value_mask: return False |
| 1703 | return True |
| 1704 | |
| 1705 | def pretty_print(self, q): |
| 1706 | q.text("bsn_udf4_masked {") |
| 1707 | with q.group(): |
| 1708 | with q.indent(2): |
| 1709 | q.breakable() |
| 1710 | q.text("value = "); |
| 1711 | q.text("%#x" % self.value) |
| 1712 | q.text(","); q.breakable() |
| 1713 | q.text("value_mask = "); |
| 1714 | q.text("%#x" % self.value_mask) |
| 1715 | q.breakable() |
| 1716 | q.text('}') |
| 1717 | |
| 1718 | oxm.subtypes[203016] = bsn_udf4_masked |
| 1719 | |
| 1720 | class bsn_udf5(oxm): |
| 1721 | type_len = 203268 |
| 1722 | |
| 1723 | def __init__(self, value=None): |
| 1724 | if value != None: |
| 1725 | self.value = value |
| 1726 | else: |
| 1727 | self.value = 0 |
| 1728 | return |
| 1729 | |
| 1730 | def pack(self): |
| 1731 | packed = [] |
| 1732 | packed.append(struct.pack("!L", self.type_len)) |
| 1733 | packed.append(struct.pack("!L", self.value)) |
| 1734 | return ''.join(packed) |
| 1735 | |
| 1736 | @staticmethod |
| 1737 | def unpack(reader): |
| 1738 | obj = bsn_udf5() |
| 1739 | _type_len = reader.read("!L")[0] |
| 1740 | assert(_type_len == 203268) |
| 1741 | obj.value = reader.read("!L")[0] |
| 1742 | return obj |
| 1743 | |
| 1744 | def __eq__(self, other): |
| 1745 | if type(self) != type(other): return False |
| 1746 | if self.value != other.value: return False |
| 1747 | return True |
| 1748 | |
| 1749 | def pretty_print(self, q): |
| 1750 | q.text("bsn_udf5 {") |
| 1751 | with q.group(): |
| 1752 | with q.indent(2): |
| 1753 | q.breakable() |
| 1754 | q.text("value = "); |
| 1755 | q.text("%#x" % self.value) |
| 1756 | q.breakable() |
| 1757 | q.text('}') |
| 1758 | |
| 1759 | oxm.subtypes[203268] = bsn_udf5 |
| 1760 | |
| 1761 | class bsn_udf5_masked(oxm): |
| 1762 | type_len = 203528 |
| 1763 | |
| 1764 | def __init__(self, value=None, value_mask=None): |
| 1765 | if value != None: |
| 1766 | self.value = value |
| 1767 | else: |
| 1768 | self.value = 0 |
| 1769 | if value_mask != None: |
| 1770 | self.value_mask = value_mask |
| 1771 | else: |
| 1772 | self.value_mask = 0 |
| 1773 | return |
| 1774 | |
| 1775 | def pack(self): |
| 1776 | packed = [] |
| 1777 | packed.append(struct.pack("!L", self.type_len)) |
| 1778 | packed.append(struct.pack("!L", self.value)) |
| 1779 | packed.append(struct.pack("!L", self.value_mask)) |
| 1780 | return ''.join(packed) |
| 1781 | |
| 1782 | @staticmethod |
| 1783 | def unpack(reader): |
| 1784 | obj = bsn_udf5_masked() |
| 1785 | _type_len = reader.read("!L")[0] |
| 1786 | assert(_type_len == 203528) |
| 1787 | obj.value = reader.read("!L")[0] |
| 1788 | obj.value_mask = reader.read("!L")[0] |
| 1789 | return obj |
| 1790 | |
| 1791 | def __eq__(self, other): |
| 1792 | if type(self) != type(other): return False |
| 1793 | if self.value != other.value: return False |
| 1794 | if self.value_mask != other.value_mask: return False |
| 1795 | return True |
| 1796 | |
| 1797 | def pretty_print(self, q): |
| 1798 | q.text("bsn_udf5_masked {") |
| 1799 | with q.group(): |
| 1800 | with q.indent(2): |
| 1801 | q.breakable() |
| 1802 | q.text("value = "); |
| 1803 | q.text("%#x" % self.value) |
| 1804 | q.text(","); q.breakable() |
| 1805 | q.text("value_mask = "); |
| 1806 | q.text("%#x" % self.value_mask) |
| 1807 | q.breakable() |
| 1808 | q.text('}') |
| 1809 | |
| 1810 | oxm.subtypes[203528] = bsn_udf5_masked |
| 1811 | |
| 1812 | class bsn_udf6(oxm): |
| 1813 | type_len = 203780 |
| 1814 | |
| 1815 | def __init__(self, value=None): |
| 1816 | if value != None: |
| 1817 | self.value = value |
| 1818 | else: |
| 1819 | self.value = 0 |
| 1820 | return |
| 1821 | |
| 1822 | def pack(self): |
| 1823 | packed = [] |
| 1824 | packed.append(struct.pack("!L", self.type_len)) |
| 1825 | packed.append(struct.pack("!L", self.value)) |
| 1826 | return ''.join(packed) |
| 1827 | |
| 1828 | @staticmethod |
| 1829 | def unpack(reader): |
| 1830 | obj = bsn_udf6() |
| 1831 | _type_len = reader.read("!L")[0] |
| 1832 | assert(_type_len == 203780) |
| 1833 | obj.value = reader.read("!L")[0] |
| 1834 | return obj |
| 1835 | |
| 1836 | def __eq__(self, other): |
| 1837 | if type(self) != type(other): return False |
| 1838 | if self.value != other.value: return False |
| 1839 | return True |
| 1840 | |
| 1841 | def pretty_print(self, q): |
| 1842 | q.text("bsn_udf6 {") |
| 1843 | with q.group(): |
| 1844 | with q.indent(2): |
| 1845 | q.breakable() |
| 1846 | q.text("value = "); |
| 1847 | q.text("%#x" % self.value) |
| 1848 | q.breakable() |
| 1849 | q.text('}') |
| 1850 | |
| 1851 | oxm.subtypes[203780] = bsn_udf6 |
| 1852 | |
| 1853 | class bsn_udf6_masked(oxm): |
| 1854 | type_len = 204040 |
| 1855 | |
| 1856 | def __init__(self, value=None, value_mask=None): |
| 1857 | if value != None: |
| 1858 | self.value = value |
| 1859 | else: |
| 1860 | self.value = 0 |
| 1861 | if value_mask != None: |
| 1862 | self.value_mask = value_mask |
| 1863 | else: |
| 1864 | self.value_mask = 0 |
| 1865 | return |
| 1866 | |
| 1867 | def pack(self): |
| 1868 | packed = [] |
| 1869 | packed.append(struct.pack("!L", self.type_len)) |
| 1870 | packed.append(struct.pack("!L", self.value)) |
| 1871 | packed.append(struct.pack("!L", self.value_mask)) |
| 1872 | return ''.join(packed) |
| 1873 | |
| 1874 | @staticmethod |
| 1875 | def unpack(reader): |
| 1876 | obj = bsn_udf6_masked() |
| 1877 | _type_len = reader.read("!L")[0] |
| 1878 | assert(_type_len == 204040) |
| 1879 | obj.value = reader.read("!L")[0] |
| 1880 | obj.value_mask = reader.read("!L")[0] |
| 1881 | return obj |
| 1882 | |
| 1883 | def __eq__(self, other): |
| 1884 | if type(self) != type(other): return False |
| 1885 | if self.value != other.value: return False |
| 1886 | if self.value_mask != other.value_mask: return False |
| 1887 | return True |
| 1888 | |
| 1889 | def pretty_print(self, q): |
| 1890 | q.text("bsn_udf6_masked {") |
| 1891 | with q.group(): |
| 1892 | with q.indent(2): |
| 1893 | q.breakable() |
| 1894 | q.text("value = "); |
| 1895 | q.text("%#x" % self.value) |
| 1896 | q.text(","); q.breakable() |
| 1897 | q.text("value_mask = "); |
| 1898 | q.text("%#x" % self.value_mask) |
| 1899 | q.breakable() |
| 1900 | q.text('}') |
| 1901 | |
| 1902 | oxm.subtypes[204040] = bsn_udf6_masked |
| 1903 | |
| 1904 | class bsn_udf7(oxm): |
| 1905 | type_len = 204292 |
| 1906 | |
| 1907 | def __init__(self, value=None): |
| 1908 | if value != None: |
| 1909 | self.value = value |
| 1910 | else: |
| 1911 | self.value = 0 |
| 1912 | return |
| 1913 | |
| 1914 | def pack(self): |
| 1915 | packed = [] |
| 1916 | packed.append(struct.pack("!L", self.type_len)) |
| 1917 | packed.append(struct.pack("!L", self.value)) |
| 1918 | return ''.join(packed) |
| 1919 | |
| 1920 | @staticmethod |
| 1921 | def unpack(reader): |
| 1922 | obj = bsn_udf7() |
| 1923 | _type_len = reader.read("!L")[0] |
| 1924 | assert(_type_len == 204292) |
| 1925 | obj.value = reader.read("!L")[0] |
| 1926 | return obj |
| 1927 | |
| 1928 | def __eq__(self, other): |
| 1929 | if type(self) != type(other): return False |
| 1930 | if self.value != other.value: return False |
| 1931 | return True |
| 1932 | |
| 1933 | def pretty_print(self, q): |
| 1934 | q.text("bsn_udf7 {") |
| 1935 | with q.group(): |
| 1936 | with q.indent(2): |
| 1937 | q.breakable() |
| 1938 | q.text("value = "); |
| 1939 | q.text("%#x" % self.value) |
| 1940 | q.breakable() |
| 1941 | q.text('}') |
| 1942 | |
| 1943 | oxm.subtypes[204292] = bsn_udf7 |
| 1944 | |
| 1945 | class bsn_udf7_masked(oxm): |
| 1946 | type_len = 204552 |
| 1947 | |
| 1948 | def __init__(self, value=None, value_mask=None): |
| 1949 | if value != None: |
| 1950 | self.value = value |
| 1951 | else: |
| 1952 | self.value = 0 |
| 1953 | if value_mask != None: |
| 1954 | self.value_mask = value_mask |
| 1955 | else: |
| 1956 | self.value_mask = 0 |
| 1957 | return |
| 1958 | |
| 1959 | def pack(self): |
| 1960 | packed = [] |
| 1961 | packed.append(struct.pack("!L", self.type_len)) |
| 1962 | packed.append(struct.pack("!L", self.value)) |
| 1963 | packed.append(struct.pack("!L", self.value_mask)) |
| 1964 | return ''.join(packed) |
| 1965 | |
| 1966 | @staticmethod |
| 1967 | def unpack(reader): |
| 1968 | obj = bsn_udf7_masked() |
| 1969 | _type_len = reader.read("!L")[0] |
| 1970 | assert(_type_len == 204552) |
| 1971 | obj.value = reader.read("!L")[0] |
| 1972 | obj.value_mask = reader.read("!L")[0] |
| 1973 | return obj |
| 1974 | |
| 1975 | def __eq__(self, other): |
| 1976 | if type(self) != type(other): return False |
| 1977 | if self.value != other.value: return False |
| 1978 | if self.value_mask != other.value_mask: return False |
| 1979 | return True |
| 1980 | |
| 1981 | def pretty_print(self, q): |
| 1982 | q.text("bsn_udf7_masked {") |
| 1983 | with q.group(): |
| 1984 | with q.indent(2): |
| 1985 | q.breakable() |
| 1986 | q.text("value = "); |
| 1987 | q.text("%#x" % self.value) |
| 1988 | q.text(","); q.breakable() |
| 1989 | q.text("value_mask = "); |
| 1990 | q.text("%#x" % self.value_mask) |
| 1991 | q.breakable() |
| 1992 | q.text('}') |
| 1993 | |
| 1994 | oxm.subtypes[204552] = bsn_udf7_masked |
| 1995 | |
Rich Lane | 5587ab1 | 2014-06-30 11:19:09 -0700 | [diff] [blame] | 1996 | class bsn_vlan_xlate_port_group_id(oxm): |
| 1997 | type_len = 205316 |
| 1998 | |
| 1999 | def __init__(self, value=None): |
| 2000 | if value != None: |
| 2001 | self.value = value |
| 2002 | else: |
| 2003 | self.value = 0 |
| 2004 | return |
| 2005 | |
| 2006 | def pack(self): |
| 2007 | packed = [] |
| 2008 | packed.append(struct.pack("!L", self.type_len)) |
| 2009 | packed.append(struct.pack("!L", self.value)) |
| 2010 | return ''.join(packed) |
| 2011 | |
| 2012 | @staticmethod |
| 2013 | def unpack(reader): |
| 2014 | obj = bsn_vlan_xlate_port_group_id() |
| 2015 | _type_len = reader.read("!L")[0] |
| 2016 | assert(_type_len == 205316) |
| 2017 | obj.value = reader.read("!L")[0] |
| 2018 | return obj |
| 2019 | |
| 2020 | def __eq__(self, other): |
| 2021 | if type(self) != type(other): return False |
| 2022 | if self.value != other.value: return False |
| 2023 | return True |
| 2024 | |
| 2025 | def pretty_print(self, q): |
| 2026 | q.text("bsn_vlan_xlate_port_group_id {") |
| 2027 | with q.group(): |
| 2028 | with q.indent(2): |
| 2029 | q.breakable() |
| 2030 | q.text("value = "); |
| 2031 | q.text("%#x" % self.value) |
| 2032 | q.breakable() |
| 2033 | q.text('}') |
| 2034 | |
| 2035 | oxm.subtypes[205316] = bsn_vlan_xlate_port_group_id |
| 2036 | |
| 2037 | class bsn_vlan_xlate_port_group_id_masked(oxm): |
| 2038 | type_len = 205576 |
| 2039 | |
| 2040 | def __init__(self, value=None, value_mask=None): |
| 2041 | if value != None: |
| 2042 | self.value = value |
| 2043 | else: |
| 2044 | self.value = 0 |
| 2045 | if value_mask != None: |
| 2046 | self.value_mask = value_mask |
| 2047 | else: |
| 2048 | self.value_mask = 0 |
| 2049 | return |
| 2050 | |
| 2051 | def pack(self): |
| 2052 | packed = [] |
| 2053 | packed.append(struct.pack("!L", self.type_len)) |
| 2054 | packed.append(struct.pack("!L", self.value)) |
| 2055 | packed.append(struct.pack("!L", self.value_mask)) |
| 2056 | return ''.join(packed) |
| 2057 | |
| 2058 | @staticmethod |
| 2059 | def unpack(reader): |
| 2060 | obj = bsn_vlan_xlate_port_group_id_masked() |
| 2061 | _type_len = reader.read("!L")[0] |
| 2062 | assert(_type_len == 205576) |
| 2063 | obj.value = reader.read("!L")[0] |
| 2064 | obj.value_mask = reader.read("!L")[0] |
| 2065 | return obj |
| 2066 | |
| 2067 | def __eq__(self, other): |
| 2068 | if type(self) != type(other): return False |
| 2069 | if self.value != other.value: return False |
| 2070 | if self.value_mask != other.value_mask: return False |
| 2071 | return True |
| 2072 | |
| 2073 | def pretty_print(self, q): |
| 2074 | q.text("bsn_vlan_xlate_port_group_id_masked {") |
| 2075 | with q.group(): |
| 2076 | with q.indent(2): |
| 2077 | q.breakable() |
| 2078 | q.text("value = "); |
| 2079 | q.text("%#x" % self.value) |
| 2080 | q.text(","); q.breakable() |
| 2081 | q.text("value_mask = "); |
| 2082 | q.text("%#x" % self.value_mask) |
| 2083 | q.breakable() |
| 2084 | q.text('}') |
| 2085 | |
| 2086 | oxm.subtypes[205576] = bsn_vlan_xlate_port_group_id_masked |
| 2087 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2088 | class bsn_vrf(oxm): |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 2089 | type_len = 197636 |
| 2090 | |
| 2091 | def __init__(self, value=None): |
| 2092 | if value != None: |
| 2093 | self.value = value |
| 2094 | else: |
| 2095 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2096 | return |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 2097 | |
| 2098 | def pack(self): |
| 2099 | packed = [] |
| 2100 | packed.append(struct.pack("!L", self.type_len)) |
| 2101 | packed.append(struct.pack("!L", self.value)) |
| 2102 | return ''.join(packed) |
| 2103 | |
| 2104 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2105 | def unpack(reader): |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 2106 | obj = bsn_vrf() |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 2107 | _type_len = reader.read("!L")[0] |
| 2108 | assert(_type_len == 197636) |
| 2109 | obj.value = reader.read("!L")[0] |
| 2110 | return obj |
| 2111 | |
| 2112 | def __eq__(self, other): |
| 2113 | if type(self) != type(other): return False |
| 2114 | if self.value != other.value: return False |
| 2115 | return True |
| 2116 | |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 2117 | def pretty_print(self, q): |
| 2118 | q.text("bsn_vrf {") |
| 2119 | with q.group(): |
| 2120 | with q.indent(2): |
| 2121 | q.breakable() |
| 2122 | q.text("value = "); |
| 2123 | q.text("%#x" % self.value) |
| 2124 | q.breakable() |
| 2125 | q.text('}') |
| 2126 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2127 | oxm.subtypes[197636] = bsn_vrf |
| 2128 | |
| 2129 | class bsn_vrf_masked(oxm): |
| 2130 | type_len = 197896 |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 2131 | |
| 2132 | def __init__(self, value=None, value_mask=None): |
| 2133 | if value != None: |
| 2134 | self.value = value |
| 2135 | else: |
| 2136 | self.value = 0 |
| 2137 | if value_mask != None: |
| 2138 | self.value_mask = value_mask |
| 2139 | else: |
| 2140 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2141 | return |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 2142 | |
| 2143 | def pack(self): |
| 2144 | packed = [] |
| 2145 | packed.append(struct.pack("!L", self.type_len)) |
| 2146 | packed.append(struct.pack("!L", self.value)) |
| 2147 | packed.append(struct.pack("!L", self.value_mask)) |
| 2148 | return ''.join(packed) |
| 2149 | |
| 2150 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2151 | def unpack(reader): |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 2152 | obj = bsn_vrf_masked() |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 2153 | _type_len = reader.read("!L")[0] |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2154 | assert(_type_len == 197896) |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 2155 | obj.value = reader.read("!L")[0] |
| 2156 | obj.value_mask = reader.read("!L")[0] |
| 2157 | return obj |
| 2158 | |
| 2159 | def __eq__(self, other): |
| 2160 | if type(self) != type(other): return False |
| 2161 | if self.value != other.value: return False |
| 2162 | if self.value_mask != other.value_mask: return False |
| 2163 | return True |
| 2164 | |
Rich Lane | d9e3f7b | 2013-11-04 11:40:43 -0800 | [diff] [blame] | 2165 | def pretty_print(self, q): |
| 2166 | q.text("bsn_vrf_masked {") |
| 2167 | with q.group(): |
| 2168 | with q.indent(2): |
| 2169 | q.breakable() |
| 2170 | q.text("value = "); |
| 2171 | q.text("%#x" % self.value) |
| 2172 | q.text(","); q.breakable() |
| 2173 | q.text("value_mask = "); |
| 2174 | q.text("%#x" % self.value_mask) |
| 2175 | q.breakable() |
| 2176 | q.text('}') |
| 2177 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2178 | oxm.subtypes[197896] = bsn_vrf_masked |
| 2179 | |
| 2180 | class eth_dst(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2181 | type_len = 2147485190 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2182 | |
| 2183 | def __init__(self, value=None): |
| 2184 | if value != None: |
| 2185 | self.value = value |
| 2186 | else: |
| 2187 | self.value = [0,0,0,0,0,0] |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2188 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2189 | |
| 2190 | def pack(self): |
| 2191 | packed = [] |
| 2192 | packed.append(struct.pack("!L", self.type_len)) |
| 2193 | packed.append(struct.pack("!6B", *self.value)) |
| 2194 | return ''.join(packed) |
| 2195 | |
| 2196 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2197 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2198 | obj = eth_dst() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2199 | _type_len = reader.read("!L")[0] |
| 2200 | assert(_type_len == 2147485190) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2201 | obj.value = list(reader.read('!6B')) |
| 2202 | return obj |
| 2203 | |
| 2204 | def __eq__(self, other): |
| 2205 | if type(self) != type(other): return False |
| 2206 | if self.value != other.value: return False |
| 2207 | return True |
| 2208 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2209 | def pretty_print(self, q): |
| 2210 | q.text("eth_dst {") |
| 2211 | with q.group(): |
| 2212 | with q.indent(2): |
| 2213 | q.breakable() |
| 2214 | q.text("value = "); |
| 2215 | q.text(util.pretty_mac(self.value)) |
| 2216 | q.breakable() |
| 2217 | q.text('}') |
| 2218 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2219 | oxm.subtypes[2147485190] = eth_dst |
| 2220 | |
| 2221 | class eth_dst_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2222 | type_len = 2147485452 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2223 | |
| 2224 | def __init__(self, value=None, value_mask=None): |
| 2225 | if value != None: |
| 2226 | self.value = value |
| 2227 | else: |
| 2228 | self.value = [0,0,0,0,0,0] |
| 2229 | if value_mask != None: |
| 2230 | self.value_mask = value_mask |
| 2231 | else: |
| 2232 | self.value_mask = [0,0,0,0,0,0] |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2233 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2234 | |
| 2235 | def pack(self): |
| 2236 | packed = [] |
| 2237 | packed.append(struct.pack("!L", self.type_len)) |
| 2238 | packed.append(struct.pack("!6B", *self.value)) |
| 2239 | packed.append(struct.pack("!6B", *self.value_mask)) |
| 2240 | return ''.join(packed) |
| 2241 | |
| 2242 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2243 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2244 | obj = eth_dst_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2245 | _type_len = reader.read("!L")[0] |
| 2246 | assert(_type_len == 2147485452) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2247 | obj.value = list(reader.read('!6B')) |
| 2248 | obj.value_mask = list(reader.read('!6B')) |
| 2249 | return obj |
| 2250 | |
| 2251 | def __eq__(self, other): |
| 2252 | if type(self) != type(other): return False |
| 2253 | if self.value != other.value: return False |
| 2254 | if self.value_mask != other.value_mask: return False |
| 2255 | return True |
| 2256 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2257 | def pretty_print(self, q): |
| 2258 | q.text("eth_dst_masked {") |
| 2259 | with q.group(): |
| 2260 | with q.indent(2): |
| 2261 | q.breakable() |
| 2262 | q.text("value = "); |
| 2263 | q.text(util.pretty_mac(self.value)) |
| 2264 | q.text(","); q.breakable() |
| 2265 | q.text("value_mask = "); |
| 2266 | q.text(util.pretty_mac(self.value_mask)) |
| 2267 | q.breakable() |
| 2268 | q.text('}') |
| 2269 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2270 | oxm.subtypes[2147485452] = eth_dst_masked |
| 2271 | |
| 2272 | class eth_src(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2273 | type_len = 2147485702 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2274 | |
| 2275 | def __init__(self, value=None): |
| 2276 | if value != None: |
| 2277 | self.value = value |
| 2278 | else: |
| 2279 | self.value = [0,0,0,0,0,0] |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2280 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2281 | |
| 2282 | def pack(self): |
| 2283 | packed = [] |
| 2284 | packed.append(struct.pack("!L", self.type_len)) |
| 2285 | packed.append(struct.pack("!6B", *self.value)) |
| 2286 | return ''.join(packed) |
| 2287 | |
| 2288 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2289 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2290 | obj = eth_src() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2291 | _type_len = reader.read("!L")[0] |
| 2292 | assert(_type_len == 2147485702) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2293 | obj.value = list(reader.read('!6B')) |
| 2294 | return obj |
| 2295 | |
| 2296 | def __eq__(self, other): |
| 2297 | if type(self) != type(other): return False |
| 2298 | if self.value != other.value: return False |
| 2299 | return True |
| 2300 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2301 | def pretty_print(self, q): |
| 2302 | q.text("eth_src {") |
| 2303 | with q.group(): |
| 2304 | with q.indent(2): |
| 2305 | q.breakable() |
| 2306 | q.text("value = "); |
| 2307 | q.text(util.pretty_mac(self.value)) |
| 2308 | q.breakable() |
| 2309 | q.text('}') |
| 2310 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2311 | oxm.subtypes[2147485702] = eth_src |
| 2312 | |
| 2313 | class eth_src_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2314 | type_len = 2147485964 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2315 | |
| 2316 | def __init__(self, value=None, value_mask=None): |
| 2317 | if value != None: |
| 2318 | self.value = value |
| 2319 | else: |
| 2320 | self.value = [0,0,0,0,0,0] |
| 2321 | if value_mask != None: |
| 2322 | self.value_mask = value_mask |
| 2323 | else: |
| 2324 | self.value_mask = [0,0,0,0,0,0] |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2325 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2326 | |
| 2327 | def pack(self): |
| 2328 | packed = [] |
| 2329 | packed.append(struct.pack("!L", self.type_len)) |
| 2330 | packed.append(struct.pack("!6B", *self.value)) |
| 2331 | packed.append(struct.pack("!6B", *self.value_mask)) |
| 2332 | return ''.join(packed) |
| 2333 | |
| 2334 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2335 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2336 | obj = eth_src_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2337 | _type_len = reader.read("!L")[0] |
| 2338 | assert(_type_len == 2147485964) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2339 | obj.value = list(reader.read('!6B')) |
| 2340 | obj.value_mask = list(reader.read('!6B')) |
| 2341 | return obj |
| 2342 | |
| 2343 | def __eq__(self, other): |
| 2344 | if type(self) != type(other): return False |
| 2345 | if self.value != other.value: return False |
| 2346 | if self.value_mask != other.value_mask: return False |
| 2347 | return True |
| 2348 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2349 | def pretty_print(self, q): |
| 2350 | q.text("eth_src_masked {") |
| 2351 | with q.group(): |
| 2352 | with q.indent(2): |
| 2353 | q.breakable() |
| 2354 | q.text("value = "); |
| 2355 | q.text(util.pretty_mac(self.value)) |
| 2356 | q.text(","); q.breakable() |
| 2357 | q.text("value_mask = "); |
| 2358 | q.text(util.pretty_mac(self.value_mask)) |
| 2359 | q.breakable() |
| 2360 | q.text('}') |
| 2361 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2362 | oxm.subtypes[2147485964] = eth_src_masked |
| 2363 | |
| 2364 | class eth_type(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2365 | type_len = 2147486210 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2366 | |
| 2367 | def __init__(self, value=None): |
| 2368 | if value != None: |
| 2369 | self.value = value |
| 2370 | else: |
| 2371 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2372 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2373 | |
| 2374 | def pack(self): |
| 2375 | packed = [] |
| 2376 | packed.append(struct.pack("!L", self.type_len)) |
| 2377 | packed.append(struct.pack("!H", self.value)) |
| 2378 | return ''.join(packed) |
| 2379 | |
| 2380 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2381 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2382 | obj = eth_type() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2383 | _type_len = reader.read("!L")[0] |
| 2384 | assert(_type_len == 2147486210) |
| 2385 | obj.value = reader.read("!H")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2386 | return obj |
| 2387 | |
| 2388 | def __eq__(self, other): |
| 2389 | if type(self) != type(other): return False |
| 2390 | if self.value != other.value: return False |
| 2391 | return True |
| 2392 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2393 | def pretty_print(self, q): |
| 2394 | q.text("eth_type {") |
| 2395 | with q.group(): |
| 2396 | with q.indent(2): |
| 2397 | q.breakable() |
| 2398 | q.text("value = "); |
| 2399 | q.text("%#x" % self.value) |
| 2400 | q.breakable() |
| 2401 | q.text('}') |
| 2402 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2403 | oxm.subtypes[2147486210] = eth_type |
| 2404 | |
| 2405 | class eth_type_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2406 | type_len = 2147486468 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2407 | |
| 2408 | def __init__(self, value=None, value_mask=None): |
| 2409 | if value != None: |
| 2410 | self.value = value |
| 2411 | else: |
| 2412 | self.value = 0 |
| 2413 | if value_mask != None: |
| 2414 | self.value_mask = value_mask |
| 2415 | else: |
| 2416 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2417 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2418 | |
| 2419 | def pack(self): |
| 2420 | packed = [] |
| 2421 | packed.append(struct.pack("!L", self.type_len)) |
| 2422 | packed.append(struct.pack("!H", self.value)) |
| 2423 | packed.append(struct.pack("!H", self.value_mask)) |
| 2424 | return ''.join(packed) |
| 2425 | |
| 2426 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2427 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2428 | obj = eth_type_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2429 | _type_len = reader.read("!L")[0] |
| 2430 | assert(_type_len == 2147486468) |
| 2431 | obj.value = reader.read("!H")[0] |
| 2432 | obj.value_mask = reader.read("!H")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2433 | return obj |
| 2434 | |
| 2435 | def __eq__(self, other): |
| 2436 | if type(self) != type(other): return False |
| 2437 | if self.value != other.value: return False |
| 2438 | if self.value_mask != other.value_mask: return False |
| 2439 | return True |
| 2440 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2441 | def pretty_print(self, q): |
| 2442 | q.text("eth_type_masked {") |
| 2443 | with q.group(): |
| 2444 | with q.indent(2): |
| 2445 | q.breakable() |
| 2446 | q.text("value = "); |
| 2447 | q.text("%#x" % self.value) |
| 2448 | q.text(","); q.breakable() |
| 2449 | q.text("value_mask = "); |
| 2450 | q.text("%#x" % self.value_mask) |
| 2451 | q.breakable() |
| 2452 | q.text('}') |
| 2453 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2454 | oxm.subtypes[2147486468] = eth_type_masked |
| 2455 | |
| 2456 | class icmpv4_code(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2457 | type_len = 2147493889 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2458 | |
| 2459 | def __init__(self, value=None): |
| 2460 | if value != None: |
| 2461 | self.value = value |
| 2462 | else: |
| 2463 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2464 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2465 | |
| 2466 | def pack(self): |
| 2467 | packed = [] |
| 2468 | packed.append(struct.pack("!L", self.type_len)) |
| 2469 | packed.append(struct.pack("!B", self.value)) |
| 2470 | return ''.join(packed) |
| 2471 | |
| 2472 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2473 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2474 | obj = icmpv4_code() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2475 | _type_len = reader.read("!L")[0] |
| 2476 | assert(_type_len == 2147493889) |
| 2477 | obj.value = reader.read("!B")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2478 | return obj |
| 2479 | |
| 2480 | def __eq__(self, other): |
| 2481 | if type(self) != type(other): return False |
| 2482 | if self.value != other.value: return False |
| 2483 | return True |
| 2484 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2485 | def pretty_print(self, q): |
| 2486 | q.text("icmpv4_code {") |
| 2487 | with q.group(): |
| 2488 | with q.indent(2): |
| 2489 | q.breakable() |
| 2490 | q.text("value = "); |
| 2491 | q.text("%#x" % self.value) |
| 2492 | q.breakable() |
| 2493 | q.text('}') |
| 2494 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2495 | oxm.subtypes[2147493889] = icmpv4_code |
| 2496 | |
| 2497 | class icmpv4_code_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2498 | type_len = 2147494146 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2499 | |
| 2500 | def __init__(self, value=None, value_mask=None): |
| 2501 | if value != None: |
| 2502 | self.value = value |
| 2503 | else: |
| 2504 | self.value = 0 |
| 2505 | if value_mask != None: |
| 2506 | self.value_mask = value_mask |
| 2507 | else: |
| 2508 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2509 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2510 | |
| 2511 | def pack(self): |
| 2512 | packed = [] |
| 2513 | packed.append(struct.pack("!L", self.type_len)) |
| 2514 | packed.append(struct.pack("!B", self.value)) |
| 2515 | packed.append(struct.pack("!B", self.value_mask)) |
| 2516 | return ''.join(packed) |
| 2517 | |
| 2518 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2519 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2520 | obj = icmpv4_code_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2521 | _type_len = reader.read("!L")[0] |
| 2522 | assert(_type_len == 2147494146) |
| 2523 | obj.value = reader.read("!B")[0] |
| 2524 | obj.value_mask = reader.read("!B")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2525 | return obj |
| 2526 | |
| 2527 | def __eq__(self, other): |
| 2528 | if type(self) != type(other): return False |
| 2529 | if self.value != other.value: return False |
| 2530 | if self.value_mask != other.value_mask: return False |
| 2531 | return True |
| 2532 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2533 | def pretty_print(self, q): |
| 2534 | q.text("icmpv4_code_masked {") |
| 2535 | with q.group(): |
| 2536 | with q.indent(2): |
| 2537 | q.breakable() |
| 2538 | q.text("value = "); |
| 2539 | q.text("%#x" % self.value) |
| 2540 | q.text(","); q.breakable() |
| 2541 | q.text("value_mask = "); |
| 2542 | q.text("%#x" % self.value_mask) |
| 2543 | q.breakable() |
| 2544 | q.text('}') |
| 2545 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2546 | oxm.subtypes[2147494146] = icmpv4_code_masked |
| 2547 | |
| 2548 | class icmpv4_type(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2549 | type_len = 2147493377 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2550 | |
| 2551 | def __init__(self, value=None): |
| 2552 | if value != None: |
| 2553 | self.value = value |
| 2554 | else: |
| 2555 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2556 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2557 | |
| 2558 | def pack(self): |
| 2559 | packed = [] |
| 2560 | packed.append(struct.pack("!L", self.type_len)) |
| 2561 | packed.append(struct.pack("!B", self.value)) |
| 2562 | return ''.join(packed) |
| 2563 | |
| 2564 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2565 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2566 | obj = icmpv4_type() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2567 | _type_len = reader.read("!L")[0] |
| 2568 | assert(_type_len == 2147493377) |
| 2569 | obj.value = reader.read("!B")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2570 | return obj |
| 2571 | |
| 2572 | def __eq__(self, other): |
| 2573 | if type(self) != type(other): return False |
| 2574 | if self.value != other.value: return False |
| 2575 | return True |
| 2576 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2577 | def pretty_print(self, q): |
| 2578 | q.text("icmpv4_type {") |
| 2579 | with q.group(): |
| 2580 | with q.indent(2): |
| 2581 | q.breakable() |
| 2582 | q.text("value = "); |
| 2583 | q.text("%#x" % self.value) |
| 2584 | q.breakable() |
| 2585 | q.text('}') |
| 2586 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2587 | oxm.subtypes[2147493377] = icmpv4_type |
| 2588 | |
| 2589 | class icmpv4_type_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2590 | type_len = 2147493634 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2591 | |
| 2592 | def __init__(self, value=None, value_mask=None): |
| 2593 | if value != None: |
| 2594 | self.value = value |
| 2595 | else: |
| 2596 | self.value = 0 |
| 2597 | if value_mask != None: |
| 2598 | self.value_mask = value_mask |
| 2599 | else: |
| 2600 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2601 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2602 | |
| 2603 | def pack(self): |
| 2604 | packed = [] |
| 2605 | packed.append(struct.pack("!L", self.type_len)) |
| 2606 | packed.append(struct.pack("!B", self.value)) |
| 2607 | packed.append(struct.pack("!B", self.value_mask)) |
| 2608 | return ''.join(packed) |
| 2609 | |
| 2610 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2611 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2612 | obj = icmpv4_type_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2613 | _type_len = reader.read("!L")[0] |
| 2614 | assert(_type_len == 2147493634) |
| 2615 | obj.value = reader.read("!B")[0] |
| 2616 | obj.value_mask = reader.read("!B")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2617 | return obj |
| 2618 | |
| 2619 | def __eq__(self, other): |
| 2620 | if type(self) != type(other): return False |
| 2621 | if self.value != other.value: return False |
| 2622 | if self.value_mask != other.value_mask: return False |
| 2623 | return True |
| 2624 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2625 | def pretty_print(self, q): |
| 2626 | q.text("icmpv4_type_masked {") |
| 2627 | with q.group(): |
| 2628 | with q.indent(2): |
| 2629 | q.breakable() |
| 2630 | q.text("value = "); |
| 2631 | q.text("%#x" % self.value) |
| 2632 | q.text(","); q.breakable() |
| 2633 | q.text("value_mask = "); |
| 2634 | q.text("%#x" % self.value_mask) |
| 2635 | q.breakable() |
| 2636 | q.text('}') |
| 2637 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2638 | oxm.subtypes[2147493634] = icmpv4_type_masked |
| 2639 | |
| 2640 | class icmpv6_code(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2641 | type_len = 2147499009 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2642 | |
| 2643 | def __init__(self, value=None): |
| 2644 | if value != None: |
| 2645 | self.value = value |
| 2646 | else: |
| 2647 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2648 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2649 | |
| 2650 | def pack(self): |
| 2651 | packed = [] |
| 2652 | packed.append(struct.pack("!L", self.type_len)) |
| 2653 | packed.append(struct.pack("!B", self.value)) |
| 2654 | return ''.join(packed) |
| 2655 | |
| 2656 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2657 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2658 | obj = icmpv6_code() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2659 | _type_len = reader.read("!L")[0] |
| 2660 | assert(_type_len == 2147499009) |
| 2661 | obj.value = reader.read("!B")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2662 | return obj |
| 2663 | |
| 2664 | def __eq__(self, other): |
| 2665 | if type(self) != type(other): return False |
| 2666 | if self.value != other.value: return False |
| 2667 | return True |
| 2668 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2669 | def pretty_print(self, q): |
| 2670 | q.text("icmpv6_code {") |
| 2671 | with q.group(): |
| 2672 | with q.indent(2): |
| 2673 | q.breakable() |
| 2674 | q.text("value = "); |
| 2675 | q.text("%#x" % self.value) |
| 2676 | q.breakable() |
| 2677 | q.text('}') |
| 2678 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2679 | oxm.subtypes[2147499009] = icmpv6_code |
| 2680 | |
| 2681 | class icmpv6_code_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2682 | type_len = 2147499266 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2683 | |
| 2684 | def __init__(self, value=None, value_mask=None): |
| 2685 | if value != None: |
| 2686 | self.value = value |
| 2687 | else: |
| 2688 | self.value = 0 |
| 2689 | if value_mask != None: |
| 2690 | self.value_mask = value_mask |
| 2691 | else: |
| 2692 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2693 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2694 | |
| 2695 | def pack(self): |
| 2696 | packed = [] |
| 2697 | packed.append(struct.pack("!L", self.type_len)) |
| 2698 | packed.append(struct.pack("!B", self.value)) |
| 2699 | packed.append(struct.pack("!B", self.value_mask)) |
| 2700 | return ''.join(packed) |
| 2701 | |
| 2702 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2703 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2704 | obj = icmpv6_code_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2705 | _type_len = reader.read("!L")[0] |
| 2706 | assert(_type_len == 2147499266) |
| 2707 | obj.value = reader.read("!B")[0] |
| 2708 | obj.value_mask = reader.read("!B")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2709 | return obj |
| 2710 | |
| 2711 | def __eq__(self, other): |
| 2712 | if type(self) != type(other): return False |
| 2713 | if self.value != other.value: return False |
| 2714 | if self.value_mask != other.value_mask: return False |
| 2715 | return True |
| 2716 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2717 | def pretty_print(self, q): |
| 2718 | q.text("icmpv6_code_masked {") |
| 2719 | with q.group(): |
| 2720 | with q.indent(2): |
| 2721 | q.breakable() |
| 2722 | q.text("value = "); |
| 2723 | q.text("%#x" % self.value) |
| 2724 | q.text(","); q.breakable() |
| 2725 | q.text("value_mask = "); |
| 2726 | q.text("%#x" % self.value_mask) |
| 2727 | q.breakable() |
| 2728 | q.text('}') |
| 2729 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2730 | oxm.subtypes[2147499266] = icmpv6_code_masked |
| 2731 | |
| 2732 | class icmpv6_type(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2733 | type_len = 2147498497 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2734 | |
| 2735 | def __init__(self, value=None): |
| 2736 | if value != None: |
| 2737 | self.value = value |
| 2738 | else: |
| 2739 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2740 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2741 | |
| 2742 | def pack(self): |
| 2743 | packed = [] |
| 2744 | packed.append(struct.pack("!L", self.type_len)) |
| 2745 | packed.append(struct.pack("!B", self.value)) |
| 2746 | return ''.join(packed) |
| 2747 | |
| 2748 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2749 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2750 | obj = icmpv6_type() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2751 | _type_len = reader.read("!L")[0] |
| 2752 | assert(_type_len == 2147498497) |
| 2753 | obj.value = reader.read("!B")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2754 | return obj |
| 2755 | |
| 2756 | def __eq__(self, other): |
| 2757 | if type(self) != type(other): return False |
| 2758 | if self.value != other.value: return False |
| 2759 | return True |
| 2760 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2761 | def pretty_print(self, q): |
| 2762 | q.text("icmpv6_type {") |
| 2763 | with q.group(): |
| 2764 | with q.indent(2): |
| 2765 | q.breakable() |
| 2766 | q.text("value = "); |
| 2767 | q.text("%#x" % self.value) |
| 2768 | q.breakable() |
| 2769 | q.text('}') |
| 2770 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2771 | oxm.subtypes[2147498497] = icmpv6_type |
| 2772 | |
| 2773 | class icmpv6_type_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2774 | type_len = 2147498754 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2775 | |
| 2776 | def __init__(self, value=None, value_mask=None): |
| 2777 | if value != None: |
| 2778 | self.value = value |
| 2779 | else: |
| 2780 | self.value = 0 |
| 2781 | if value_mask != None: |
| 2782 | self.value_mask = value_mask |
| 2783 | else: |
| 2784 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2785 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2786 | |
| 2787 | def pack(self): |
| 2788 | packed = [] |
| 2789 | packed.append(struct.pack("!L", self.type_len)) |
| 2790 | packed.append(struct.pack("!B", self.value)) |
| 2791 | packed.append(struct.pack("!B", self.value_mask)) |
| 2792 | return ''.join(packed) |
| 2793 | |
| 2794 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2795 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2796 | obj = icmpv6_type_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2797 | _type_len = reader.read("!L")[0] |
| 2798 | assert(_type_len == 2147498754) |
| 2799 | obj.value = reader.read("!B")[0] |
| 2800 | obj.value_mask = reader.read("!B")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2801 | return obj |
| 2802 | |
| 2803 | def __eq__(self, other): |
| 2804 | if type(self) != type(other): return False |
| 2805 | if self.value != other.value: return False |
| 2806 | if self.value_mask != other.value_mask: return False |
| 2807 | return True |
| 2808 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2809 | def pretty_print(self, q): |
| 2810 | q.text("icmpv6_type_masked {") |
| 2811 | with q.group(): |
| 2812 | with q.indent(2): |
| 2813 | q.breakable() |
| 2814 | q.text("value = "); |
| 2815 | q.text("%#x" % self.value) |
| 2816 | q.text(","); q.breakable() |
| 2817 | q.text("value_mask = "); |
| 2818 | q.text("%#x" % self.value_mask) |
| 2819 | q.breakable() |
| 2820 | q.text('}') |
| 2821 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2822 | oxm.subtypes[2147498754] = icmpv6_type_masked |
| 2823 | |
| 2824 | class in_phy_port(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2825 | type_len = 2147484164 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2826 | |
| 2827 | def __init__(self, value=None): |
| 2828 | if value != None: |
| 2829 | self.value = value |
| 2830 | else: |
| 2831 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2832 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2833 | |
| 2834 | def pack(self): |
| 2835 | packed = [] |
| 2836 | packed.append(struct.pack("!L", self.type_len)) |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2837 | packed.append(util.pack_port_no(self.value)) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2838 | return ''.join(packed) |
| 2839 | |
| 2840 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2841 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2842 | obj = in_phy_port() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2843 | _type_len = reader.read("!L")[0] |
| 2844 | assert(_type_len == 2147484164) |
| 2845 | obj.value = util.unpack_port_no(reader) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2846 | return obj |
| 2847 | |
| 2848 | def __eq__(self, other): |
| 2849 | if type(self) != type(other): return False |
| 2850 | if self.value != other.value: return False |
| 2851 | return True |
| 2852 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2853 | def pretty_print(self, q): |
| 2854 | q.text("in_phy_port {") |
| 2855 | with q.group(): |
| 2856 | with q.indent(2): |
| 2857 | q.breakable() |
| 2858 | q.text("value = "); |
| 2859 | q.text(util.pretty_port(self.value)) |
| 2860 | q.breakable() |
| 2861 | q.text('}') |
| 2862 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2863 | oxm.subtypes[2147484164] = in_phy_port |
| 2864 | |
| 2865 | class in_phy_port_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2866 | type_len = 2147484424 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2867 | |
| 2868 | def __init__(self, value=None, value_mask=None): |
| 2869 | if value != None: |
| 2870 | self.value = value |
| 2871 | else: |
| 2872 | self.value = 0 |
| 2873 | if value_mask != None: |
| 2874 | self.value_mask = value_mask |
| 2875 | else: |
| 2876 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2877 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2878 | |
| 2879 | def pack(self): |
| 2880 | packed = [] |
| 2881 | packed.append(struct.pack("!L", self.type_len)) |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2882 | packed.append(util.pack_port_no(self.value)) |
| 2883 | packed.append(util.pack_port_no(self.value_mask)) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2884 | return ''.join(packed) |
| 2885 | |
| 2886 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2887 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2888 | obj = in_phy_port_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2889 | _type_len = reader.read("!L")[0] |
| 2890 | assert(_type_len == 2147484424) |
| 2891 | obj.value = util.unpack_port_no(reader) |
| 2892 | obj.value_mask = util.unpack_port_no(reader) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2893 | return obj |
| 2894 | |
| 2895 | def __eq__(self, other): |
| 2896 | if type(self) != type(other): return False |
| 2897 | if self.value != other.value: return False |
| 2898 | if self.value_mask != other.value_mask: return False |
| 2899 | return True |
| 2900 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2901 | def pretty_print(self, q): |
| 2902 | q.text("in_phy_port_masked {") |
| 2903 | with q.group(): |
| 2904 | with q.indent(2): |
| 2905 | q.breakable() |
| 2906 | q.text("value = "); |
| 2907 | q.text(util.pretty_port(self.value)) |
| 2908 | q.text(","); q.breakable() |
| 2909 | q.text("value_mask = "); |
| 2910 | q.text(util.pretty_port(self.value_mask)) |
| 2911 | q.breakable() |
| 2912 | q.text('}') |
| 2913 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2914 | oxm.subtypes[2147484424] = in_phy_port_masked |
| 2915 | |
| 2916 | class in_port(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2917 | type_len = 2147483652 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2918 | |
| 2919 | def __init__(self, value=None): |
| 2920 | if value != None: |
| 2921 | self.value = value |
| 2922 | else: |
| 2923 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2924 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2925 | |
| 2926 | def pack(self): |
| 2927 | packed = [] |
| 2928 | packed.append(struct.pack("!L", self.type_len)) |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2929 | packed.append(util.pack_port_no(self.value)) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2930 | return ''.join(packed) |
| 2931 | |
| 2932 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2933 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2934 | obj = in_port() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2935 | _type_len = reader.read("!L")[0] |
| 2936 | assert(_type_len == 2147483652) |
| 2937 | obj.value = util.unpack_port_no(reader) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2938 | return obj |
| 2939 | |
| 2940 | def __eq__(self, other): |
| 2941 | if type(self) != type(other): return False |
| 2942 | if self.value != other.value: return False |
| 2943 | return True |
| 2944 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2945 | def pretty_print(self, q): |
| 2946 | q.text("in_port {") |
| 2947 | with q.group(): |
| 2948 | with q.indent(2): |
| 2949 | q.breakable() |
| 2950 | q.text("value = "); |
| 2951 | q.text(util.pretty_port(self.value)) |
| 2952 | q.breakable() |
| 2953 | q.text('}') |
| 2954 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2955 | oxm.subtypes[2147483652] = in_port |
| 2956 | |
| 2957 | class in_port_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2958 | type_len = 2147483912 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2959 | |
| 2960 | def __init__(self, value=None, value_mask=None): |
| 2961 | if value != None: |
| 2962 | self.value = value |
| 2963 | else: |
| 2964 | self.value = 0 |
| 2965 | if value_mask != None: |
| 2966 | self.value_mask = value_mask |
| 2967 | else: |
| 2968 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2969 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2970 | |
| 2971 | def pack(self): |
| 2972 | packed = [] |
| 2973 | packed.append(struct.pack("!L", self.type_len)) |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2974 | packed.append(util.pack_port_no(self.value)) |
| 2975 | packed.append(util.pack_port_no(self.value_mask)) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2976 | return ''.join(packed) |
| 2977 | |
| 2978 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 2979 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2980 | obj = in_port_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 2981 | _type_len = reader.read("!L")[0] |
| 2982 | assert(_type_len == 2147483912) |
| 2983 | obj.value = util.unpack_port_no(reader) |
| 2984 | obj.value_mask = util.unpack_port_no(reader) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2985 | return obj |
| 2986 | |
| 2987 | def __eq__(self, other): |
| 2988 | if type(self) != type(other): return False |
| 2989 | if self.value != other.value: return False |
| 2990 | if self.value_mask != other.value_mask: return False |
| 2991 | return True |
| 2992 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 2993 | def pretty_print(self, q): |
| 2994 | q.text("in_port_masked {") |
| 2995 | with q.group(): |
| 2996 | with q.indent(2): |
| 2997 | q.breakable() |
| 2998 | q.text("value = "); |
| 2999 | q.text(util.pretty_port(self.value)) |
| 3000 | q.text(","); q.breakable() |
| 3001 | q.text("value_mask = "); |
| 3002 | q.text(util.pretty_port(self.value_mask)) |
| 3003 | q.breakable() |
| 3004 | q.text('}') |
| 3005 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3006 | oxm.subtypes[2147483912] = in_port_masked |
| 3007 | |
| 3008 | class ip_dscp(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3009 | type_len = 2147487745 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3010 | |
| 3011 | def __init__(self, value=None): |
| 3012 | if value != None: |
| 3013 | self.value = value |
| 3014 | else: |
| 3015 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3016 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3017 | |
| 3018 | def pack(self): |
| 3019 | packed = [] |
| 3020 | packed.append(struct.pack("!L", self.type_len)) |
| 3021 | packed.append(struct.pack("!B", self.value)) |
| 3022 | return ''.join(packed) |
| 3023 | |
| 3024 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3025 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3026 | obj = ip_dscp() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3027 | _type_len = reader.read("!L")[0] |
| 3028 | assert(_type_len == 2147487745) |
| 3029 | obj.value = reader.read("!B")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3030 | return obj |
| 3031 | |
| 3032 | def __eq__(self, other): |
| 3033 | if type(self) != type(other): return False |
| 3034 | if self.value != other.value: return False |
| 3035 | return True |
| 3036 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3037 | def pretty_print(self, q): |
| 3038 | q.text("ip_dscp {") |
| 3039 | with q.group(): |
| 3040 | with q.indent(2): |
| 3041 | q.breakable() |
| 3042 | q.text("value = "); |
| 3043 | q.text("%#x" % self.value) |
| 3044 | q.breakable() |
| 3045 | q.text('}') |
| 3046 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3047 | oxm.subtypes[2147487745] = ip_dscp |
| 3048 | |
| 3049 | class ip_dscp_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3050 | type_len = 2147488002 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3051 | |
| 3052 | def __init__(self, value=None, value_mask=None): |
| 3053 | if value != None: |
| 3054 | self.value = value |
| 3055 | else: |
| 3056 | self.value = 0 |
| 3057 | if value_mask != None: |
| 3058 | self.value_mask = value_mask |
| 3059 | else: |
| 3060 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3061 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3062 | |
| 3063 | def pack(self): |
| 3064 | packed = [] |
| 3065 | packed.append(struct.pack("!L", self.type_len)) |
| 3066 | packed.append(struct.pack("!B", self.value)) |
| 3067 | packed.append(struct.pack("!B", self.value_mask)) |
| 3068 | return ''.join(packed) |
| 3069 | |
| 3070 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3071 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3072 | obj = ip_dscp_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3073 | _type_len = reader.read("!L")[0] |
| 3074 | assert(_type_len == 2147488002) |
| 3075 | obj.value = reader.read("!B")[0] |
| 3076 | obj.value_mask = reader.read("!B")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3077 | return obj |
| 3078 | |
| 3079 | def __eq__(self, other): |
| 3080 | if type(self) != type(other): return False |
| 3081 | if self.value != other.value: return False |
| 3082 | if self.value_mask != other.value_mask: return False |
| 3083 | return True |
| 3084 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3085 | def pretty_print(self, q): |
| 3086 | q.text("ip_dscp_masked {") |
| 3087 | with q.group(): |
| 3088 | with q.indent(2): |
| 3089 | q.breakable() |
| 3090 | q.text("value = "); |
| 3091 | q.text("%#x" % self.value) |
| 3092 | q.text(","); q.breakable() |
| 3093 | q.text("value_mask = "); |
| 3094 | q.text("%#x" % self.value_mask) |
| 3095 | q.breakable() |
| 3096 | q.text('}') |
| 3097 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3098 | oxm.subtypes[2147488002] = ip_dscp_masked |
| 3099 | |
| 3100 | class ip_ecn(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3101 | type_len = 2147488257 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3102 | |
| 3103 | def __init__(self, value=None): |
| 3104 | if value != None: |
| 3105 | self.value = value |
| 3106 | else: |
| 3107 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3108 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3109 | |
| 3110 | def pack(self): |
| 3111 | packed = [] |
| 3112 | packed.append(struct.pack("!L", self.type_len)) |
| 3113 | packed.append(struct.pack("!B", self.value)) |
| 3114 | return ''.join(packed) |
| 3115 | |
| 3116 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3117 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3118 | obj = ip_ecn() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3119 | _type_len = reader.read("!L")[0] |
| 3120 | assert(_type_len == 2147488257) |
| 3121 | obj.value = reader.read("!B")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3122 | return obj |
| 3123 | |
| 3124 | def __eq__(self, other): |
| 3125 | if type(self) != type(other): return False |
| 3126 | if self.value != other.value: return False |
| 3127 | return True |
| 3128 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3129 | def pretty_print(self, q): |
| 3130 | q.text("ip_ecn {") |
| 3131 | with q.group(): |
| 3132 | with q.indent(2): |
| 3133 | q.breakable() |
| 3134 | q.text("value = "); |
| 3135 | q.text("%#x" % self.value) |
| 3136 | q.breakable() |
| 3137 | q.text('}') |
| 3138 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3139 | oxm.subtypes[2147488257] = ip_ecn |
| 3140 | |
| 3141 | class ip_ecn_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3142 | type_len = 2147488514 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3143 | |
| 3144 | def __init__(self, value=None, value_mask=None): |
| 3145 | if value != None: |
| 3146 | self.value = value |
| 3147 | else: |
| 3148 | self.value = 0 |
| 3149 | if value_mask != None: |
| 3150 | self.value_mask = value_mask |
| 3151 | else: |
| 3152 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3153 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3154 | |
| 3155 | def pack(self): |
| 3156 | packed = [] |
| 3157 | packed.append(struct.pack("!L", self.type_len)) |
| 3158 | packed.append(struct.pack("!B", self.value)) |
| 3159 | packed.append(struct.pack("!B", self.value_mask)) |
| 3160 | return ''.join(packed) |
| 3161 | |
| 3162 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3163 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3164 | obj = ip_ecn_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3165 | _type_len = reader.read("!L")[0] |
| 3166 | assert(_type_len == 2147488514) |
| 3167 | obj.value = reader.read("!B")[0] |
| 3168 | obj.value_mask = reader.read("!B")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3169 | return obj |
| 3170 | |
| 3171 | def __eq__(self, other): |
| 3172 | if type(self) != type(other): return False |
| 3173 | if self.value != other.value: return False |
| 3174 | if self.value_mask != other.value_mask: return False |
| 3175 | return True |
| 3176 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3177 | def pretty_print(self, q): |
| 3178 | q.text("ip_ecn_masked {") |
| 3179 | with q.group(): |
| 3180 | with q.indent(2): |
| 3181 | q.breakable() |
| 3182 | q.text("value = "); |
| 3183 | q.text("%#x" % self.value) |
| 3184 | q.text(","); q.breakable() |
| 3185 | q.text("value_mask = "); |
| 3186 | q.text("%#x" % self.value_mask) |
| 3187 | q.breakable() |
| 3188 | q.text('}') |
| 3189 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3190 | oxm.subtypes[2147488514] = ip_ecn_masked |
| 3191 | |
| 3192 | class ip_proto(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3193 | type_len = 2147488769 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3194 | |
| 3195 | def __init__(self, value=None): |
| 3196 | if value != None: |
| 3197 | self.value = value |
| 3198 | else: |
| 3199 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3200 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3201 | |
| 3202 | def pack(self): |
| 3203 | packed = [] |
| 3204 | packed.append(struct.pack("!L", self.type_len)) |
| 3205 | packed.append(struct.pack("!B", self.value)) |
| 3206 | return ''.join(packed) |
| 3207 | |
| 3208 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3209 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3210 | obj = ip_proto() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3211 | _type_len = reader.read("!L")[0] |
| 3212 | assert(_type_len == 2147488769) |
| 3213 | obj.value = reader.read("!B")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3214 | return obj |
| 3215 | |
| 3216 | def __eq__(self, other): |
| 3217 | if type(self) != type(other): return False |
| 3218 | if self.value != other.value: return False |
| 3219 | return True |
| 3220 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3221 | def pretty_print(self, q): |
| 3222 | q.text("ip_proto {") |
| 3223 | with q.group(): |
| 3224 | with q.indent(2): |
| 3225 | q.breakable() |
| 3226 | q.text("value = "); |
| 3227 | q.text("%#x" % self.value) |
| 3228 | q.breakable() |
| 3229 | q.text('}') |
| 3230 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3231 | oxm.subtypes[2147488769] = ip_proto |
| 3232 | |
| 3233 | class ip_proto_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3234 | type_len = 2147489026 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3235 | |
| 3236 | def __init__(self, value=None, value_mask=None): |
| 3237 | if value != None: |
| 3238 | self.value = value |
| 3239 | else: |
| 3240 | self.value = 0 |
| 3241 | if value_mask != None: |
| 3242 | self.value_mask = value_mask |
| 3243 | else: |
| 3244 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3245 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3246 | |
| 3247 | def pack(self): |
| 3248 | packed = [] |
| 3249 | packed.append(struct.pack("!L", self.type_len)) |
| 3250 | packed.append(struct.pack("!B", self.value)) |
| 3251 | packed.append(struct.pack("!B", self.value_mask)) |
| 3252 | return ''.join(packed) |
| 3253 | |
| 3254 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3255 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3256 | obj = ip_proto_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3257 | _type_len = reader.read("!L")[0] |
| 3258 | assert(_type_len == 2147489026) |
| 3259 | obj.value = reader.read("!B")[0] |
| 3260 | obj.value_mask = reader.read("!B")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3261 | return obj |
| 3262 | |
| 3263 | def __eq__(self, other): |
| 3264 | if type(self) != type(other): return False |
| 3265 | if self.value != other.value: return False |
| 3266 | if self.value_mask != other.value_mask: return False |
| 3267 | return True |
| 3268 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3269 | def pretty_print(self, q): |
| 3270 | q.text("ip_proto_masked {") |
| 3271 | with q.group(): |
| 3272 | with q.indent(2): |
| 3273 | q.breakable() |
| 3274 | q.text("value = "); |
| 3275 | q.text("%#x" % self.value) |
| 3276 | q.text(","); q.breakable() |
| 3277 | q.text("value_mask = "); |
| 3278 | q.text("%#x" % self.value_mask) |
| 3279 | q.breakable() |
| 3280 | q.text('}') |
| 3281 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3282 | oxm.subtypes[2147489026] = ip_proto_masked |
| 3283 | |
| 3284 | class ipv4_dst(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3285 | type_len = 2147489796 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3286 | |
| 3287 | def __init__(self, value=None): |
| 3288 | if value != None: |
| 3289 | self.value = value |
| 3290 | else: |
| 3291 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3292 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3293 | |
| 3294 | def pack(self): |
| 3295 | packed = [] |
| 3296 | packed.append(struct.pack("!L", self.type_len)) |
| 3297 | packed.append(struct.pack("!L", self.value)) |
| 3298 | return ''.join(packed) |
| 3299 | |
| 3300 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3301 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3302 | obj = ipv4_dst() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3303 | _type_len = reader.read("!L")[0] |
| 3304 | assert(_type_len == 2147489796) |
| 3305 | obj.value = reader.read("!L")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3306 | return obj |
| 3307 | |
| 3308 | def __eq__(self, other): |
| 3309 | if type(self) != type(other): return False |
| 3310 | if self.value != other.value: return False |
| 3311 | return True |
| 3312 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3313 | def pretty_print(self, q): |
| 3314 | q.text("ipv4_dst {") |
| 3315 | with q.group(): |
| 3316 | with q.indent(2): |
| 3317 | q.breakable() |
| 3318 | q.text("value = "); |
Rich Lane | d53156a | 2013-08-05 17:17:33 -0700 | [diff] [blame] | 3319 | q.text(util.pretty_ipv4(self.value)) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3320 | q.breakable() |
| 3321 | q.text('}') |
| 3322 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3323 | oxm.subtypes[2147489796] = ipv4_dst |
| 3324 | |
| 3325 | class ipv4_dst_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3326 | type_len = 2147490056 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3327 | |
| 3328 | def __init__(self, value=None, value_mask=None): |
| 3329 | if value != None: |
| 3330 | self.value = value |
| 3331 | else: |
| 3332 | self.value = 0 |
| 3333 | if value_mask != None: |
| 3334 | self.value_mask = value_mask |
| 3335 | else: |
| 3336 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3337 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3338 | |
| 3339 | def pack(self): |
| 3340 | packed = [] |
| 3341 | packed.append(struct.pack("!L", self.type_len)) |
| 3342 | packed.append(struct.pack("!L", self.value)) |
| 3343 | packed.append(struct.pack("!L", self.value_mask)) |
| 3344 | return ''.join(packed) |
| 3345 | |
| 3346 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3347 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3348 | obj = ipv4_dst_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3349 | _type_len = reader.read("!L")[0] |
| 3350 | assert(_type_len == 2147490056) |
| 3351 | obj.value = reader.read("!L")[0] |
| 3352 | obj.value_mask = reader.read("!L")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3353 | return obj |
| 3354 | |
| 3355 | def __eq__(self, other): |
| 3356 | if type(self) != type(other): return False |
| 3357 | if self.value != other.value: return False |
| 3358 | if self.value_mask != other.value_mask: return False |
| 3359 | return True |
| 3360 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3361 | def pretty_print(self, q): |
| 3362 | q.text("ipv4_dst_masked {") |
| 3363 | with q.group(): |
| 3364 | with q.indent(2): |
| 3365 | q.breakable() |
| 3366 | q.text("value = "); |
Rich Lane | d53156a | 2013-08-05 17:17:33 -0700 | [diff] [blame] | 3367 | q.text(util.pretty_ipv4(self.value)) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3368 | q.text(","); q.breakable() |
| 3369 | q.text("value_mask = "); |
Rich Lane | d53156a | 2013-08-05 17:17:33 -0700 | [diff] [blame] | 3370 | q.text(util.pretty_ipv4(self.value_mask)) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3371 | q.breakable() |
| 3372 | q.text('}') |
| 3373 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3374 | oxm.subtypes[2147490056] = ipv4_dst_masked |
| 3375 | |
| 3376 | class ipv4_src(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3377 | type_len = 2147489284 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3378 | |
| 3379 | def __init__(self, value=None): |
| 3380 | if value != None: |
| 3381 | self.value = value |
| 3382 | else: |
| 3383 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3384 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3385 | |
| 3386 | def pack(self): |
| 3387 | packed = [] |
| 3388 | packed.append(struct.pack("!L", self.type_len)) |
| 3389 | packed.append(struct.pack("!L", self.value)) |
| 3390 | return ''.join(packed) |
| 3391 | |
| 3392 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3393 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3394 | obj = ipv4_src() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3395 | _type_len = reader.read("!L")[0] |
| 3396 | assert(_type_len == 2147489284) |
| 3397 | obj.value = reader.read("!L")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3398 | return obj |
| 3399 | |
| 3400 | def __eq__(self, other): |
| 3401 | if type(self) != type(other): return False |
| 3402 | if self.value != other.value: return False |
| 3403 | return True |
| 3404 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3405 | def pretty_print(self, q): |
| 3406 | q.text("ipv4_src {") |
| 3407 | with q.group(): |
| 3408 | with q.indent(2): |
| 3409 | q.breakable() |
| 3410 | q.text("value = "); |
Rich Lane | d53156a | 2013-08-05 17:17:33 -0700 | [diff] [blame] | 3411 | q.text(util.pretty_ipv4(self.value)) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3412 | q.breakable() |
| 3413 | q.text('}') |
| 3414 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3415 | oxm.subtypes[2147489284] = ipv4_src |
| 3416 | |
| 3417 | class ipv4_src_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3418 | type_len = 2147489544 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3419 | |
| 3420 | def __init__(self, value=None, value_mask=None): |
| 3421 | if value != None: |
| 3422 | self.value = value |
| 3423 | else: |
| 3424 | self.value = 0 |
| 3425 | if value_mask != None: |
| 3426 | self.value_mask = value_mask |
| 3427 | else: |
| 3428 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3429 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3430 | |
| 3431 | def pack(self): |
| 3432 | packed = [] |
| 3433 | packed.append(struct.pack("!L", self.type_len)) |
| 3434 | packed.append(struct.pack("!L", self.value)) |
| 3435 | packed.append(struct.pack("!L", self.value_mask)) |
| 3436 | return ''.join(packed) |
| 3437 | |
| 3438 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3439 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3440 | obj = ipv4_src_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3441 | _type_len = reader.read("!L")[0] |
| 3442 | assert(_type_len == 2147489544) |
| 3443 | obj.value = reader.read("!L")[0] |
| 3444 | obj.value_mask = reader.read("!L")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3445 | return obj |
| 3446 | |
| 3447 | def __eq__(self, other): |
| 3448 | if type(self) != type(other): return False |
| 3449 | if self.value != other.value: return False |
| 3450 | if self.value_mask != other.value_mask: return False |
| 3451 | return True |
| 3452 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3453 | def pretty_print(self, q): |
| 3454 | q.text("ipv4_src_masked {") |
| 3455 | with q.group(): |
| 3456 | with q.indent(2): |
| 3457 | q.breakable() |
| 3458 | q.text("value = "); |
Rich Lane | d53156a | 2013-08-05 17:17:33 -0700 | [diff] [blame] | 3459 | q.text(util.pretty_ipv4(self.value)) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3460 | q.text(","); q.breakable() |
| 3461 | q.text("value_mask = "); |
Rich Lane | d53156a | 2013-08-05 17:17:33 -0700 | [diff] [blame] | 3462 | q.text(util.pretty_ipv4(self.value_mask)) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3463 | q.breakable() |
| 3464 | q.text('}') |
| 3465 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3466 | oxm.subtypes[2147489544] = ipv4_src_masked |
| 3467 | |
| 3468 | class ipv6_dst(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3469 | type_len = 2147497488 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3470 | |
| 3471 | def __init__(self, value=None): |
| 3472 | if value != None: |
| 3473 | self.value = value |
| 3474 | else: |
| 3475 | self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3476 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3477 | |
| 3478 | def pack(self): |
| 3479 | packed = [] |
| 3480 | packed.append(struct.pack("!L", self.type_len)) |
| 3481 | packed.append(struct.pack("!16s", self.value)) |
| 3482 | return ''.join(packed) |
| 3483 | |
| 3484 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3485 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3486 | obj = ipv6_dst() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3487 | _type_len = reader.read("!L")[0] |
| 3488 | assert(_type_len == 2147497488) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3489 | obj.value = reader.read('!16s')[0] |
| 3490 | return obj |
| 3491 | |
| 3492 | def __eq__(self, other): |
| 3493 | if type(self) != type(other): return False |
| 3494 | if self.value != other.value: return False |
| 3495 | return True |
| 3496 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3497 | def pretty_print(self, q): |
| 3498 | q.text("ipv6_dst {") |
| 3499 | with q.group(): |
| 3500 | with q.indent(2): |
| 3501 | q.breakable() |
| 3502 | q.text("value = "); |
| 3503 | q.pp(self.value) |
| 3504 | q.breakable() |
| 3505 | q.text('}') |
| 3506 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3507 | oxm.subtypes[2147497488] = ipv6_dst |
| 3508 | |
| 3509 | class ipv6_dst_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3510 | type_len = 2147497760 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3511 | |
| 3512 | def __init__(self, value=None, value_mask=None): |
| 3513 | if value != None: |
| 3514 | self.value = value |
| 3515 | else: |
| 3516 | self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
| 3517 | if value_mask != None: |
| 3518 | self.value_mask = value_mask |
| 3519 | else: |
| 3520 | self.value_mask = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3521 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3522 | |
| 3523 | def pack(self): |
| 3524 | packed = [] |
| 3525 | packed.append(struct.pack("!L", self.type_len)) |
| 3526 | packed.append(struct.pack("!16s", self.value)) |
| 3527 | packed.append(struct.pack("!16s", self.value_mask)) |
| 3528 | return ''.join(packed) |
| 3529 | |
| 3530 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3531 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3532 | obj = ipv6_dst_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3533 | _type_len = reader.read("!L")[0] |
| 3534 | assert(_type_len == 2147497760) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3535 | obj.value = reader.read('!16s')[0] |
| 3536 | obj.value_mask = reader.read('!16s')[0] |
| 3537 | return obj |
| 3538 | |
| 3539 | def __eq__(self, other): |
| 3540 | if type(self) != type(other): return False |
| 3541 | if self.value != other.value: return False |
| 3542 | if self.value_mask != other.value_mask: return False |
| 3543 | return True |
| 3544 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3545 | def pretty_print(self, q): |
| 3546 | q.text("ipv6_dst_masked {") |
| 3547 | with q.group(): |
| 3548 | with q.indent(2): |
| 3549 | q.breakable() |
| 3550 | q.text("value = "); |
| 3551 | q.pp(self.value) |
| 3552 | q.text(","); q.breakable() |
| 3553 | q.text("value_mask = "); |
| 3554 | q.pp(self.value_mask) |
| 3555 | q.breakable() |
| 3556 | q.text('}') |
| 3557 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3558 | oxm.subtypes[2147497760] = ipv6_dst_masked |
| 3559 | |
| 3560 | class ipv6_flabel(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3561 | type_len = 2147497988 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3562 | |
| 3563 | def __init__(self, value=None): |
| 3564 | if value != None: |
| 3565 | self.value = value |
| 3566 | else: |
| 3567 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3568 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3569 | |
| 3570 | def pack(self): |
| 3571 | packed = [] |
| 3572 | packed.append(struct.pack("!L", self.type_len)) |
| 3573 | packed.append(struct.pack("!L", self.value)) |
| 3574 | return ''.join(packed) |
| 3575 | |
| 3576 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3577 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3578 | obj = ipv6_flabel() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3579 | _type_len = reader.read("!L")[0] |
| 3580 | assert(_type_len == 2147497988) |
| 3581 | obj.value = reader.read("!L")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3582 | return obj |
| 3583 | |
| 3584 | def __eq__(self, other): |
| 3585 | if type(self) != type(other): return False |
| 3586 | if self.value != other.value: return False |
| 3587 | return True |
| 3588 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3589 | def pretty_print(self, q): |
| 3590 | q.text("ipv6_flabel {") |
| 3591 | with q.group(): |
| 3592 | with q.indent(2): |
| 3593 | q.breakable() |
| 3594 | q.text("value = "); |
| 3595 | q.text("%#x" % self.value) |
| 3596 | q.breakable() |
| 3597 | q.text('}') |
| 3598 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3599 | oxm.subtypes[2147497988] = ipv6_flabel |
| 3600 | |
| 3601 | class ipv6_flabel_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3602 | type_len = 2147498248 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3603 | |
| 3604 | def __init__(self, value=None, value_mask=None): |
| 3605 | if value != None: |
| 3606 | self.value = value |
| 3607 | else: |
| 3608 | self.value = 0 |
| 3609 | if value_mask != None: |
| 3610 | self.value_mask = value_mask |
| 3611 | else: |
| 3612 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3613 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3614 | |
| 3615 | def pack(self): |
| 3616 | packed = [] |
| 3617 | packed.append(struct.pack("!L", self.type_len)) |
| 3618 | packed.append(struct.pack("!L", self.value)) |
| 3619 | packed.append(struct.pack("!L", self.value_mask)) |
| 3620 | return ''.join(packed) |
| 3621 | |
| 3622 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3623 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3624 | obj = ipv6_flabel_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3625 | _type_len = reader.read("!L")[0] |
| 3626 | assert(_type_len == 2147498248) |
| 3627 | obj.value = reader.read("!L")[0] |
| 3628 | obj.value_mask = reader.read("!L")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3629 | return obj |
| 3630 | |
| 3631 | def __eq__(self, other): |
| 3632 | if type(self) != type(other): return False |
| 3633 | if self.value != other.value: return False |
| 3634 | if self.value_mask != other.value_mask: return False |
| 3635 | return True |
| 3636 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3637 | def pretty_print(self, q): |
| 3638 | q.text("ipv6_flabel_masked {") |
| 3639 | with q.group(): |
| 3640 | with q.indent(2): |
| 3641 | q.breakable() |
| 3642 | q.text("value = "); |
| 3643 | q.text("%#x" % self.value) |
| 3644 | q.text(","); q.breakable() |
| 3645 | q.text("value_mask = "); |
| 3646 | q.text("%#x" % self.value_mask) |
| 3647 | q.breakable() |
| 3648 | q.text('}') |
| 3649 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3650 | oxm.subtypes[2147498248] = ipv6_flabel_masked |
| 3651 | |
| 3652 | class ipv6_nd_sll(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3653 | type_len = 2147500038 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3654 | |
| 3655 | def __init__(self, value=None): |
| 3656 | if value != None: |
| 3657 | self.value = value |
| 3658 | else: |
| 3659 | self.value = [0,0,0,0,0,0] |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3660 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3661 | |
| 3662 | def pack(self): |
| 3663 | packed = [] |
| 3664 | packed.append(struct.pack("!L", self.type_len)) |
| 3665 | packed.append(struct.pack("!6B", *self.value)) |
| 3666 | return ''.join(packed) |
| 3667 | |
| 3668 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3669 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3670 | obj = ipv6_nd_sll() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3671 | _type_len = reader.read("!L")[0] |
| 3672 | assert(_type_len == 2147500038) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3673 | obj.value = list(reader.read('!6B')) |
| 3674 | return obj |
| 3675 | |
| 3676 | def __eq__(self, other): |
| 3677 | if type(self) != type(other): return False |
| 3678 | if self.value != other.value: return False |
| 3679 | return True |
| 3680 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3681 | def pretty_print(self, q): |
| 3682 | q.text("ipv6_nd_sll {") |
| 3683 | with q.group(): |
| 3684 | with q.indent(2): |
| 3685 | q.breakable() |
| 3686 | q.text("value = "); |
| 3687 | q.text(util.pretty_mac(self.value)) |
| 3688 | q.breakable() |
| 3689 | q.text('}') |
| 3690 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3691 | oxm.subtypes[2147500038] = ipv6_nd_sll |
| 3692 | |
| 3693 | class ipv6_nd_sll_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3694 | type_len = 2147500300 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3695 | |
| 3696 | def __init__(self, value=None, value_mask=None): |
| 3697 | if value != None: |
| 3698 | self.value = value |
| 3699 | else: |
| 3700 | self.value = [0,0,0,0,0,0] |
| 3701 | if value_mask != None: |
| 3702 | self.value_mask = value_mask |
| 3703 | else: |
| 3704 | self.value_mask = [0,0,0,0,0,0] |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3705 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3706 | |
| 3707 | def pack(self): |
| 3708 | packed = [] |
| 3709 | packed.append(struct.pack("!L", self.type_len)) |
| 3710 | packed.append(struct.pack("!6B", *self.value)) |
| 3711 | packed.append(struct.pack("!6B", *self.value_mask)) |
| 3712 | return ''.join(packed) |
| 3713 | |
| 3714 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3715 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3716 | obj = ipv6_nd_sll_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3717 | _type_len = reader.read("!L")[0] |
| 3718 | assert(_type_len == 2147500300) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3719 | obj.value = list(reader.read('!6B')) |
| 3720 | obj.value_mask = list(reader.read('!6B')) |
| 3721 | return obj |
| 3722 | |
| 3723 | def __eq__(self, other): |
| 3724 | if type(self) != type(other): return False |
| 3725 | if self.value != other.value: return False |
| 3726 | if self.value_mask != other.value_mask: return False |
| 3727 | return True |
| 3728 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3729 | def pretty_print(self, q): |
| 3730 | q.text("ipv6_nd_sll_masked {") |
| 3731 | with q.group(): |
| 3732 | with q.indent(2): |
| 3733 | q.breakable() |
| 3734 | q.text("value = "); |
| 3735 | q.text(util.pretty_mac(self.value)) |
| 3736 | q.text(","); q.breakable() |
| 3737 | q.text("value_mask = "); |
| 3738 | q.text(util.pretty_mac(self.value_mask)) |
| 3739 | q.breakable() |
| 3740 | q.text('}') |
| 3741 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3742 | oxm.subtypes[2147500300] = ipv6_nd_sll_masked |
| 3743 | |
| 3744 | class ipv6_nd_target(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3745 | type_len = 2147499536 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3746 | |
| 3747 | def __init__(self, value=None): |
| 3748 | if value != None: |
| 3749 | self.value = value |
| 3750 | else: |
| 3751 | self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3752 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3753 | |
| 3754 | def pack(self): |
| 3755 | packed = [] |
| 3756 | packed.append(struct.pack("!L", self.type_len)) |
| 3757 | packed.append(struct.pack("!16s", self.value)) |
| 3758 | return ''.join(packed) |
| 3759 | |
| 3760 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3761 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3762 | obj = ipv6_nd_target() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3763 | _type_len = reader.read("!L")[0] |
| 3764 | assert(_type_len == 2147499536) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3765 | obj.value = reader.read('!16s')[0] |
| 3766 | return obj |
| 3767 | |
| 3768 | def __eq__(self, other): |
| 3769 | if type(self) != type(other): return False |
| 3770 | if self.value != other.value: return False |
| 3771 | return True |
| 3772 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3773 | def pretty_print(self, q): |
| 3774 | q.text("ipv6_nd_target {") |
| 3775 | with q.group(): |
| 3776 | with q.indent(2): |
| 3777 | q.breakable() |
| 3778 | q.text("value = "); |
| 3779 | q.pp(self.value) |
| 3780 | q.breakable() |
| 3781 | q.text('}') |
| 3782 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3783 | oxm.subtypes[2147499536] = ipv6_nd_target |
| 3784 | |
| 3785 | class ipv6_nd_target_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3786 | type_len = 2147499808 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3787 | |
| 3788 | def __init__(self, value=None, value_mask=None): |
| 3789 | if value != None: |
| 3790 | self.value = value |
| 3791 | else: |
| 3792 | self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
| 3793 | if value_mask != None: |
| 3794 | self.value_mask = value_mask |
| 3795 | else: |
| 3796 | self.value_mask = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3797 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3798 | |
| 3799 | def pack(self): |
| 3800 | packed = [] |
| 3801 | packed.append(struct.pack("!L", self.type_len)) |
| 3802 | packed.append(struct.pack("!16s", self.value)) |
| 3803 | packed.append(struct.pack("!16s", self.value_mask)) |
| 3804 | return ''.join(packed) |
| 3805 | |
| 3806 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3807 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3808 | obj = ipv6_nd_target_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3809 | _type_len = reader.read("!L")[0] |
| 3810 | assert(_type_len == 2147499808) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3811 | obj.value = reader.read('!16s')[0] |
| 3812 | obj.value_mask = reader.read('!16s')[0] |
| 3813 | return obj |
| 3814 | |
| 3815 | def __eq__(self, other): |
| 3816 | if type(self) != type(other): return False |
| 3817 | if self.value != other.value: return False |
| 3818 | if self.value_mask != other.value_mask: return False |
| 3819 | return True |
| 3820 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3821 | def pretty_print(self, q): |
| 3822 | q.text("ipv6_nd_target_masked {") |
| 3823 | with q.group(): |
| 3824 | with q.indent(2): |
| 3825 | q.breakable() |
| 3826 | q.text("value = "); |
| 3827 | q.pp(self.value) |
| 3828 | q.text(","); q.breakable() |
| 3829 | q.text("value_mask = "); |
| 3830 | q.pp(self.value_mask) |
| 3831 | q.breakable() |
| 3832 | q.text('}') |
| 3833 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3834 | oxm.subtypes[2147499808] = ipv6_nd_target_masked |
| 3835 | |
| 3836 | class ipv6_nd_tll(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3837 | type_len = 2147500550 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3838 | |
| 3839 | def __init__(self, value=None): |
| 3840 | if value != None: |
| 3841 | self.value = value |
| 3842 | else: |
| 3843 | self.value = [0,0,0,0,0,0] |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3844 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3845 | |
| 3846 | def pack(self): |
| 3847 | packed = [] |
| 3848 | packed.append(struct.pack("!L", self.type_len)) |
| 3849 | packed.append(struct.pack("!6B", *self.value)) |
| 3850 | return ''.join(packed) |
| 3851 | |
| 3852 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3853 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3854 | obj = ipv6_nd_tll() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3855 | _type_len = reader.read("!L")[0] |
| 3856 | assert(_type_len == 2147500550) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3857 | obj.value = list(reader.read('!6B')) |
| 3858 | return obj |
| 3859 | |
| 3860 | def __eq__(self, other): |
| 3861 | if type(self) != type(other): return False |
| 3862 | if self.value != other.value: return False |
| 3863 | return True |
| 3864 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3865 | def pretty_print(self, q): |
| 3866 | q.text("ipv6_nd_tll {") |
| 3867 | with q.group(): |
| 3868 | with q.indent(2): |
| 3869 | q.breakable() |
| 3870 | q.text("value = "); |
| 3871 | q.text(util.pretty_mac(self.value)) |
| 3872 | q.breakable() |
| 3873 | q.text('}') |
| 3874 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3875 | oxm.subtypes[2147500550] = ipv6_nd_tll |
| 3876 | |
| 3877 | class ipv6_nd_tll_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3878 | type_len = 2147500812 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3879 | |
| 3880 | def __init__(self, value=None, value_mask=None): |
| 3881 | if value != None: |
| 3882 | self.value = value |
| 3883 | else: |
| 3884 | self.value = [0,0,0,0,0,0] |
| 3885 | if value_mask != None: |
| 3886 | self.value_mask = value_mask |
| 3887 | else: |
| 3888 | self.value_mask = [0,0,0,0,0,0] |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3889 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3890 | |
| 3891 | def pack(self): |
| 3892 | packed = [] |
| 3893 | packed.append(struct.pack("!L", self.type_len)) |
| 3894 | packed.append(struct.pack("!6B", *self.value)) |
| 3895 | packed.append(struct.pack("!6B", *self.value_mask)) |
| 3896 | return ''.join(packed) |
| 3897 | |
| 3898 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3899 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3900 | obj = ipv6_nd_tll_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3901 | _type_len = reader.read("!L")[0] |
| 3902 | assert(_type_len == 2147500812) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3903 | obj.value = list(reader.read('!6B')) |
| 3904 | obj.value_mask = list(reader.read('!6B')) |
| 3905 | return obj |
| 3906 | |
| 3907 | def __eq__(self, other): |
| 3908 | if type(self) != type(other): return False |
| 3909 | if self.value != other.value: return False |
| 3910 | if self.value_mask != other.value_mask: return False |
| 3911 | return True |
| 3912 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3913 | def pretty_print(self, q): |
| 3914 | q.text("ipv6_nd_tll_masked {") |
| 3915 | with q.group(): |
| 3916 | with q.indent(2): |
| 3917 | q.breakable() |
| 3918 | q.text("value = "); |
| 3919 | q.text(util.pretty_mac(self.value)) |
| 3920 | q.text(","); q.breakable() |
| 3921 | q.text("value_mask = "); |
| 3922 | q.text(util.pretty_mac(self.value_mask)) |
| 3923 | q.breakable() |
| 3924 | q.text('}') |
| 3925 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3926 | oxm.subtypes[2147500812] = ipv6_nd_tll_masked |
| 3927 | |
| 3928 | class ipv6_src(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3929 | type_len = 2147496976 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3930 | |
| 3931 | def __init__(self, value=None): |
| 3932 | if value != None: |
| 3933 | self.value = value |
| 3934 | else: |
| 3935 | self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3936 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3937 | |
| 3938 | def pack(self): |
| 3939 | packed = [] |
| 3940 | packed.append(struct.pack("!L", self.type_len)) |
| 3941 | packed.append(struct.pack("!16s", self.value)) |
| 3942 | return ''.join(packed) |
| 3943 | |
| 3944 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3945 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3946 | obj = ipv6_src() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3947 | _type_len = reader.read("!L")[0] |
| 3948 | assert(_type_len == 2147496976) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3949 | obj.value = reader.read('!16s')[0] |
| 3950 | return obj |
| 3951 | |
| 3952 | def __eq__(self, other): |
| 3953 | if type(self) != type(other): return False |
| 3954 | if self.value != other.value: return False |
| 3955 | return True |
| 3956 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3957 | def pretty_print(self, q): |
| 3958 | q.text("ipv6_src {") |
| 3959 | with q.group(): |
| 3960 | with q.indent(2): |
| 3961 | q.breakable() |
| 3962 | q.text("value = "); |
| 3963 | q.pp(self.value) |
| 3964 | q.breakable() |
| 3965 | q.text('}') |
| 3966 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3967 | oxm.subtypes[2147496976] = ipv6_src |
| 3968 | |
| 3969 | class ipv6_src_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3970 | type_len = 2147497248 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3971 | |
| 3972 | def __init__(self, value=None, value_mask=None): |
| 3973 | if value != None: |
| 3974 | self.value = value |
| 3975 | else: |
| 3976 | self.value = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
| 3977 | if value_mask != None: |
| 3978 | self.value_mask = value_mask |
| 3979 | else: |
| 3980 | self.value_mask = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3981 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3982 | |
| 3983 | def pack(self): |
| 3984 | packed = [] |
| 3985 | packed.append(struct.pack("!L", self.type_len)) |
| 3986 | packed.append(struct.pack("!16s", self.value)) |
| 3987 | packed.append(struct.pack("!16s", self.value_mask)) |
| 3988 | return ''.join(packed) |
| 3989 | |
| 3990 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 3991 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3992 | obj = ipv6_src_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 3993 | _type_len = reader.read("!L")[0] |
| 3994 | assert(_type_len == 2147497248) |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 3995 | obj.value = reader.read('!16s')[0] |
| 3996 | obj.value_mask = reader.read('!16s')[0] |
| 3997 | return obj |
| 3998 | |
| 3999 | def __eq__(self, other): |
| 4000 | if type(self) != type(other): return False |
| 4001 | if self.value != other.value: return False |
| 4002 | if self.value_mask != other.value_mask: return False |
| 4003 | return True |
| 4004 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4005 | def pretty_print(self, q): |
| 4006 | q.text("ipv6_src_masked {") |
| 4007 | with q.group(): |
| 4008 | with q.indent(2): |
| 4009 | q.breakable() |
| 4010 | q.text("value = "); |
| 4011 | q.pp(self.value) |
| 4012 | q.text(","); q.breakable() |
| 4013 | q.text("value_mask = "); |
| 4014 | q.pp(self.value_mask) |
| 4015 | q.breakable() |
| 4016 | q.text('}') |
| 4017 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4018 | oxm.subtypes[2147497248] = ipv6_src_masked |
| 4019 | |
| 4020 | class metadata(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4021 | type_len = 2147484680 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4022 | |
| 4023 | def __init__(self, value=None): |
| 4024 | if value != None: |
| 4025 | self.value = value |
| 4026 | else: |
| 4027 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4028 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4029 | |
| 4030 | def pack(self): |
| 4031 | packed = [] |
| 4032 | packed.append(struct.pack("!L", self.type_len)) |
| 4033 | packed.append(struct.pack("!Q", self.value)) |
| 4034 | return ''.join(packed) |
| 4035 | |
| 4036 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4037 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4038 | obj = metadata() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4039 | _type_len = reader.read("!L")[0] |
| 4040 | assert(_type_len == 2147484680) |
| 4041 | obj.value = reader.read("!Q")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4042 | return obj |
| 4043 | |
| 4044 | def __eq__(self, other): |
| 4045 | if type(self) != type(other): return False |
| 4046 | if self.value != other.value: return False |
| 4047 | return True |
| 4048 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4049 | def pretty_print(self, q): |
| 4050 | q.text("metadata {") |
| 4051 | with q.group(): |
| 4052 | with q.indent(2): |
| 4053 | q.breakable() |
| 4054 | q.text("value = "); |
| 4055 | q.text("%#x" % self.value) |
| 4056 | q.breakable() |
| 4057 | q.text('}') |
| 4058 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4059 | oxm.subtypes[2147484680] = metadata |
| 4060 | |
| 4061 | class metadata_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4062 | type_len = 2147484944 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4063 | |
| 4064 | def __init__(self, value=None, value_mask=None): |
| 4065 | if value != None: |
| 4066 | self.value = value |
| 4067 | else: |
| 4068 | self.value = 0 |
| 4069 | if value_mask != None: |
| 4070 | self.value_mask = value_mask |
| 4071 | else: |
| 4072 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4073 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4074 | |
| 4075 | def pack(self): |
| 4076 | packed = [] |
| 4077 | packed.append(struct.pack("!L", self.type_len)) |
| 4078 | packed.append(struct.pack("!Q", self.value)) |
| 4079 | packed.append(struct.pack("!Q", self.value_mask)) |
| 4080 | return ''.join(packed) |
| 4081 | |
| 4082 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4083 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4084 | obj = metadata_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4085 | _type_len = reader.read("!L")[0] |
| 4086 | assert(_type_len == 2147484944) |
| 4087 | obj.value = reader.read("!Q")[0] |
| 4088 | obj.value_mask = reader.read("!Q")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4089 | return obj |
| 4090 | |
| 4091 | def __eq__(self, other): |
| 4092 | if type(self) != type(other): return False |
| 4093 | if self.value != other.value: return False |
| 4094 | if self.value_mask != other.value_mask: return False |
| 4095 | return True |
| 4096 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4097 | def pretty_print(self, q): |
| 4098 | q.text("metadata_masked {") |
| 4099 | with q.group(): |
| 4100 | with q.indent(2): |
| 4101 | q.breakable() |
| 4102 | q.text("value = "); |
| 4103 | q.text("%#x" % self.value) |
| 4104 | q.text(","); q.breakable() |
| 4105 | q.text("value_mask = "); |
| 4106 | q.text("%#x" % self.value_mask) |
| 4107 | q.breakable() |
| 4108 | q.text('}') |
| 4109 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4110 | oxm.subtypes[2147484944] = metadata_masked |
| 4111 | |
| 4112 | class mpls_label(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4113 | type_len = 2147501060 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4114 | |
| 4115 | def __init__(self, value=None): |
| 4116 | if value != None: |
| 4117 | self.value = value |
| 4118 | else: |
| 4119 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4120 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4121 | |
| 4122 | def pack(self): |
| 4123 | packed = [] |
| 4124 | packed.append(struct.pack("!L", self.type_len)) |
| 4125 | packed.append(struct.pack("!L", self.value)) |
| 4126 | return ''.join(packed) |
| 4127 | |
| 4128 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4129 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4130 | obj = mpls_label() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4131 | _type_len = reader.read("!L")[0] |
| 4132 | assert(_type_len == 2147501060) |
| 4133 | obj.value = reader.read("!L")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4134 | return obj |
| 4135 | |
| 4136 | def __eq__(self, other): |
| 4137 | if type(self) != type(other): return False |
| 4138 | if self.value != other.value: return False |
| 4139 | return True |
| 4140 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4141 | def pretty_print(self, q): |
| 4142 | q.text("mpls_label {") |
| 4143 | with q.group(): |
| 4144 | with q.indent(2): |
| 4145 | q.breakable() |
| 4146 | q.text("value = "); |
| 4147 | q.text("%#x" % self.value) |
| 4148 | q.breakable() |
| 4149 | q.text('}') |
| 4150 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4151 | oxm.subtypes[2147501060] = mpls_label |
| 4152 | |
| 4153 | class mpls_label_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4154 | type_len = 2147501320 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4155 | |
| 4156 | def __init__(self, value=None, value_mask=None): |
| 4157 | if value != None: |
| 4158 | self.value = value |
| 4159 | else: |
| 4160 | self.value = 0 |
| 4161 | if value_mask != None: |
| 4162 | self.value_mask = value_mask |
| 4163 | else: |
| 4164 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4165 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4166 | |
| 4167 | def pack(self): |
| 4168 | packed = [] |
| 4169 | packed.append(struct.pack("!L", self.type_len)) |
| 4170 | packed.append(struct.pack("!L", self.value)) |
| 4171 | packed.append(struct.pack("!L", self.value_mask)) |
| 4172 | return ''.join(packed) |
| 4173 | |
| 4174 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4175 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4176 | obj = mpls_label_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4177 | _type_len = reader.read("!L")[0] |
| 4178 | assert(_type_len == 2147501320) |
| 4179 | obj.value = reader.read("!L")[0] |
| 4180 | obj.value_mask = reader.read("!L")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4181 | return obj |
| 4182 | |
| 4183 | def __eq__(self, other): |
| 4184 | if type(self) != type(other): return False |
| 4185 | if self.value != other.value: return False |
| 4186 | if self.value_mask != other.value_mask: return False |
| 4187 | return True |
| 4188 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4189 | def pretty_print(self, q): |
| 4190 | q.text("mpls_label_masked {") |
| 4191 | with q.group(): |
| 4192 | with q.indent(2): |
| 4193 | q.breakable() |
| 4194 | q.text("value = "); |
| 4195 | q.text("%#x" % self.value) |
| 4196 | q.text(","); q.breakable() |
| 4197 | q.text("value_mask = "); |
| 4198 | q.text("%#x" % self.value_mask) |
| 4199 | q.breakable() |
| 4200 | q.text('}') |
| 4201 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4202 | oxm.subtypes[2147501320] = mpls_label_masked |
| 4203 | |
| 4204 | class mpls_tc(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4205 | type_len = 2147501569 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4206 | |
| 4207 | def __init__(self, value=None): |
| 4208 | if value != None: |
| 4209 | self.value = value |
| 4210 | else: |
| 4211 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4212 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4213 | |
| 4214 | def pack(self): |
| 4215 | packed = [] |
| 4216 | packed.append(struct.pack("!L", self.type_len)) |
| 4217 | packed.append(struct.pack("!B", self.value)) |
| 4218 | return ''.join(packed) |
| 4219 | |
| 4220 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4221 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4222 | obj = mpls_tc() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4223 | _type_len = reader.read("!L")[0] |
| 4224 | assert(_type_len == 2147501569) |
| 4225 | obj.value = reader.read("!B")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4226 | return obj |
| 4227 | |
| 4228 | def __eq__(self, other): |
| 4229 | if type(self) != type(other): return False |
| 4230 | if self.value != other.value: return False |
| 4231 | return True |
| 4232 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4233 | def pretty_print(self, q): |
| 4234 | q.text("mpls_tc {") |
| 4235 | with q.group(): |
| 4236 | with q.indent(2): |
| 4237 | q.breakable() |
| 4238 | q.text("value = "); |
| 4239 | q.text("%#x" % self.value) |
| 4240 | q.breakable() |
| 4241 | q.text('}') |
| 4242 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4243 | oxm.subtypes[2147501569] = mpls_tc |
| 4244 | |
| 4245 | class mpls_tc_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4246 | type_len = 2147501826 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4247 | |
| 4248 | def __init__(self, value=None, value_mask=None): |
| 4249 | if value != None: |
| 4250 | self.value = value |
| 4251 | else: |
| 4252 | self.value = 0 |
| 4253 | if value_mask != None: |
| 4254 | self.value_mask = value_mask |
| 4255 | else: |
| 4256 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4257 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4258 | |
| 4259 | def pack(self): |
| 4260 | packed = [] |
| 4261 | packed.append(struct.pack("!L", self.type_len)) |
| 4262 | packed.append(struct.pack("!B", self.value)) |
| 4263 | packed.append(struct.pack("!B", self.value_mask)) |
| 4264 | return ''.join(packed) |
| 4265 | |
| 4266 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4267 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4268 | obj = mpls_tc_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4269 | _type_len = reader.read("!L")[0] |
| 4270 | assert(_type_len == 2147501826) |
| 4271 | obj.value = reader.read("!B")[0] |
| 4272 | obj.value_mask = reader.read("!B")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4273 | return obj |
| 4274 | |
| 4275 | def __eq__(self, other): |
| 4276 | if type(self) != type(other): return False |
| 4277 | if self.value != other.value: return False |
| 4278 | if self.value_mask != other.value_mask: return False |
| 4279 | return True |
| 4280 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4281 | def pretty_print(self, q): |
| 4282 | q.text("mpls_tc_masked {") |
| 4283 | with q.group(): |
| 4284 | with q.indent(2): |
| 4285 | q.breakable() |
| 4286 | q.text("value = "); |
| 4287 | q.text("%#x" % self.value) |
| 4288 | q.text(","); q.breakable() |
| 4289 | q.text("value_mask = "); |
| 4290 | q.text("%#x" % self.value_mask) |
| 4291 | q.breakable() |
| 4292 | q.text('}') |
| 4293 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4294 | oxm.subtypes[2147501826] = mpls_tc_masked |
| 4295 | |
| 4296 | class sctp_dst(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4297 | type_len = 2147492866 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4298 | |
| 4299 | def __init__(self, value=None): |
| 4300 | if value != None: |
| 4301 | self.value = value |
| 4302 | else: |
| 4303 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4304 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4305 | |
| 4306 | def pack(self): |
| 4307 | packed = [] |
| 4308 | packed.append(struct.pack("!L", self.type_len)) |
| 4309 | packed.append(struct.pack("!H", self.value)) |
| 4310 | return ''.join(packed) |
| 4311 | |
| 4312 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4313 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4314 | obj = sctp_dst() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4315 | _type_len = reader.read("!L")[0] |
| 4316 | assert(_type_len == 2147492866) |
| 4317 | obj.value = reader.read("!H")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4318 | return obj |
| 4319 | |
| 4320 | def __eq__(self, other): |
| 4321 | if type(self) != type(other): return False |
| 4322 | if self.value != other.value: return False |
| 4323 | return True |
| 4324 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4325 | def pretty_print(self, q): |
| 4326 | q.text("sctp_dst {") |
| 4327 | with q.group(): |
| 4328 | with q.indent(2): |
| 4329 | q.breakable() |
| 4330 | q.text("value = "); |
| 4331 | q.text("%#x" % self.value) |
| 4332 | q.breakable() |
| 4333 | q.text('}') |
| 4334 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4335 | oxm.subtypes[2147492866] = sctp_dst |
| 4336 | |
| 4337 | class sctp_dst_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4338 | type_len = 2147493124 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4339 | |
| 4340 | def __init__(self, value=None, value_mask=None): |
| 4341 | if value != None: |
| 4342 | self.value = value |
| 4343 | else: |
| 4344 | self.value = 0 |
| 4345 | if value_mask != None: |
| 4346 | self.value_mask = value_mask |
| 4347 | else: |
| 4348 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4349 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4350 | |
| 4351 | def pack(self): |
| 4352 | packed = [] |
| 4353 | packed.append(struct.pack("!L", self.type_len)) |
| 4354 | packed.append(struct.pack("!H", self.value)) |
| 4355 | packed.append(struct.pack("!H", self.value_mask)) |
| 4356 | return ''.join(packed) |
| 4357 | |
| 4358 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4359 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4360 | obj = sctp_dst_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4361 | _type_len = reader.read("!L")[0] |
| 4362 | assert(_type_len == 2147493124) |
| 4363 | obj.value = reader.read("!H")[0] |
| 4364 | obj.value_mask = reader.read("!H")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4365 | return obj |
| 4366 | |
| 4367 | def __eq__(self, other): |
| 4368 | if type(self) != type(other): return False |
| 4369 | if self.value != other.value: return False |
| 4370 | if self.value_mask != other.value_mask: return False |
| 4371 | return True |
| 4372 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4373 | def pretty_print(self, q): |
| 4374 | q.text("sctp_dst_masked {") |
| 4375 | with q.group(): |
| 4376 | with q.indent(2): |
| 4377 | q.breakable() |
| 4378 | q.text("value = "); |
| 4379 | q.text("%#x" % self.value) |
| 4380 | q.text(","); q.breakable() |
| 4381 | q.text("value_mask = "); |
| 4382 | q.text("%#x" % self.value_mask) |
| 4383 | q.breakable() |
| 4384 | q.text('}') |
| 4385 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4386 | oxm.subtypes[2147493124] = sctp_dst_masked |
| 4387 | |
| 4388 | class sctp_src(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4389 | type_len = 2147492354 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4390 | |
| 4391 | def __init__(self, value=None): |
| 4392 | if value != None: |
| 4393 | self.value = value |
| 4394 | else: |
| 4395 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4396 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4397 | |
| 4398 | def pack(self): |
| 4399 | packed = [] |
| 4400 | packed.append(struct.pack("!L", self.type_len)) |
| 4401 | packed.append(struct.pack("!H", self.value)) |
| 4402 | return ''.join(packed) |
| 4403 | |
| 4404 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4405 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4406 | obj = sctp_src() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4407 | _type_len = reader.read("!L")[0] |
| 4408 | assert(_type_len == 2147492354) |
| 4409 | obj.value = reader.read("!H")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4410 | return obj |
| 4411 | |
| 4412 | def __eq__(self, other): |
| 4413 | if type(self) != type(other): return False |
| 4414 | if self.value != other.value: return False |
| 4415 | return True |
| 4416 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4417 | def pretty_print(self, q): |
| 4418 | q.text("sctp_src {") |
| 4419 | with q.group(): |
| 4420 | with q.indent(2): |
| 4421 | q.breakable() |
| 4422 | q.text("value = "); |
| 4423 | q.text("%#x" % self.value) |
| 4424 | q.breakable() |
| 4425 | q.text('}') |
| 4426 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4427 | oxm.subtypes[2147492354] = sctp_src |
| 4428 | |
| 4429 | class sctp_src_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4430 | type_len = 2147492612 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4431 | |
| 4432 | def __init__(self, value=None, value_mask=None): |
| 4433 | if value != None: |
| 4434 | self.value = value |
| 4435 | else: |
| 4436 | self.value = 0 |
| 4437 | if value_mask != None: |
| 4438 | self.value_mask = value_mask |
| 4439 | else: |
| 4440 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4441 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4442 | |
| 4443 | def pack(self): |
| 4444 | packed = [] |
| 4445 | packed.append(struct.pack("!L", self.type_len)) |
| 4446 | packed.append(struct.pack("!H", self.value)) |
| 4447 | packed.append(struct.pack("!H", self.value_mask)) |
| 4448 | return ''.join(packed) |
| 4449 | |
| 4450 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4451 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4452 | obj = sctp_src_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4453 | _type_len = reader.read("!L")[0] |
| 4454 | assert(_type_len == 2147492612) |
| 4455 | obj.value = reader.read("!H")[0] |
| 4456 | obj.value_mask = reader.read("!H")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4457 | return obj |
| 4458 | |
| 4459 | def __eq__(self, other): |
| 4460 | if type(self) != type(other): return False |
| 4461 | if self.value != other.value: return False |
| 4462 | if self.value_mask != other.value_mask: return False |
| 4463 | return True |
| 4464 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4465 | def pretty_print(self, q): |
| 4466 | q.text("sctp_src_masked {") |
| 4467 | with q.group(): |
| 4468 | with q.indent(2): |
| 4469 | q.breakable() |
| 4470 | q.text("value = "); |
| 4471 | q.text("%#x" % self.value) |
| 4472 | q.text(","); q.breakable() |
| 4473 | q.text("value_mask = "); |
| 4474 | q.text("%#x" % self.value_mask) |
| 4475 | q.breakable() |
| 4476 | q.text('}') |
| 4477 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4478 | oxm.subtypes[2147492612] = sctp_src_masked |
| 4479 | |
| 4480 | class tcp_dst(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4481 | type_len = 2147490818 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4482 | |
| 4483 | def __init__(self, value=None): |
| 4484 | if value != None: |
| 4485 | self.value = value |
| 4486 | else: |
| 4487 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4488 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4489 | |
| 4490 | def pack(self): |
| 4491 | packed = [] |
| 4492 | packed.append(struct.pack("!L", self.type_len)) |
| 4493 | packed.append(struct.pack("!H", self.value)) |
| 4494 | return ''.join(packed) |
| 4495 | |
| 4496 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4497 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4498 | obj = tcp_dst() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4499 | _type_len = reader.read("!L")[0] |
| 4500 | assert(_type_len == 2147490818) |
| 4501 | obj.value = reader.read("!H")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4502 | return obj |
| 4503 | |
| 4504 | def __eq__(self, other): |
| 4505 | if type(self) != type(other): return False |
| 4506 | if self.value != other.value: return False |
| 4507 | return True |
| 4508 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4509 | def pretty_print(self, q): |
| 4510 | q.text("tcp_dst {") |
| 4511 | with q.group(): |
| 4512 | with q.indent(2): |
| 4513 | q.breakable() |
| 4514 | q.text("value = "); |
| 4515 | q.text("%#x" % self.value) |
| 4516 | q.breakable() |
| 4517 | q.text('}') |
| 4518 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4519 | oxm.subtypes[2147490818] = tcp_dst |
| 4520 | |
| 4521 | class tcp_dst_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4522 | type_len = 2147491076 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4523 | |
| 4524 | def __init__(self, value=None, value_mask=None): |
| 4525 | if value != None: |
| 4526 | self.value = value |
| 4527 | else: |
| 4528 | self.value = 0 |
| 4529 | if value_mask != None: |
| 4530 | self.value_mask = value_mask |
| 4531 | else: |
| 4532 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4533 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4534 | |
| 4535 | def pack(self): |
| 4536 | packed = [] |
| 4537 | packed.append(struct.pack("!L", self.type_len)) |
| 4538 | packed.append(struct.pack("!H", self.value)) |
| 4539 | packed.append(struct.pack("!H", self.value_mask)) |
| 4540 | return ''.join(packed) |
| 4541 | |
| 4542 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4543 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4544 | obj = tcp_dst_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4545 | _type_len = reader.read("!L")[0] |
| 4546 | assert(_type_len == 2147491076) |
| 4547 | obj.value = reader.read("!H")[0] |
| 4548 | obj.value_mask = reader.read("!H")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4549 | return obj |
| 4550 | |
| 4551 | def __eq__(self, other): |
| 4552 | if type(self) != type(other): return False |
| 4553 | if self.value != other.value: return False |
| 4554 | if self.value_mask != other.value_mask: return False |
| 4555 | return True |
| 4556 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4557 | def pretty_print(self, q): |
| 4558 | q.text("tcp_dst_masked {") |
| 4559 | with q.group(): |
| 4560 | with q.indent(2): |
| 4561 | q.breakable() |
| 4562 | q.text("value = "); |
| 4563 | q.text("%#x" % self.value) |
| 4564 | q.text(","); q.breakable() |
| 4565 | q.text("value_mask = "); |
| 4566 | q.text("%#x" % self.value_mask) |
| 4567 | q.breakable() |
| 4568 | q.text('}') |
| 4569 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4570 | oxm.subtypes[2147491076] = tcp_dst_masked |
| 4571 | |
| 4572 | class tcp_src(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4573 | type_len = 2147490306 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4574 | |
| 4575 | def __init__(self, value=None): |
| 4576 | if value != None: |
| 4577 | self.value = value |
| 4578 | else: |
| 4579 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4580 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4581 | |
| 4582 | def pack(self): |
| 4583 | packed = [] |
| 4584 | packed.append(struct.pack("!L", self.type_len)) |
| 4585 | packed.append(struct.pack("!H", self.value)) |
| 4586 | return ''.join(packed) |
| 4587 | |
| 4588 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4589 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4590 | obj = tcp_src() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4591 | _type_len = reader.read("!L")[0] |
| 4592 | assert(_type_len == 2147490306) |
| 4593 | obj.value = reader.read("!H")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4594 | return obj |
| 4595 | |
| 4596 | def __eq__(self, other): |
| 4597 | if type(self) != type(other): return False |
| 4598 | if self.value != other.value: return False |
| 4599 | return True |
| 4600 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4601 | def pretty_print(self, q): |
| 4602 | q.text("tcp_src {") |
| 4603 | with q.group(): |
| 4604 | with q.indent(2): |
| 4605 | q.breakable() |
| 4606 | q.text("value = "); |
| 4607 | q.text("%#x" % self.value) |
| 4608 | q.breakable() |
| 4609 | q.text('}') |
| 4610 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4611 | oxm.subtypes[2147490306] = tcp_src |
| 4612 | |
| 4613 | class tcp_src_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4614 | type_len = 2147490564 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4615 | |
| 4616 | def __init__(self, value=None, value_mask=None): |
| 4617 | if value != None: |
| 4618 | self.value = value |
| 4619 | else: |
| 4620 | self.value = 0 |
| 4621 | if value_mask != None: |
| 4622 | self.value_mask = value_mask |
| 4623 | else: |
| 4624 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4625 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4626 | |
| 4627 | def pack(self): |
| 4628 | packed = [] |
| 4629 | packed.append(struct.pack("!L", self.type_len)) |
| 4630 | packed.append(struct.pack("!H", self.value)) |
| 4631 | packed.append(struct.pack("!H", self.value_mask)) |
| 4632 | return ''.join(packed) |
| 4633 | |
| 4634 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4635 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4636 | obj = tcp_src_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4637 | _type_len = reader.read("!L")[0] |
| 4638 | assert(_type_len == 2147490564) |
| 4639 | obj.value = reader.read("!H")[0] |
| 4640 | obj.value_mask = reader.read("!H")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4641 | return obj |
| 4642 | |
| 4643 | def __eq__(self, other): |
| 4644 | if type(self) != type(other): return False |
| 4645 | if self.value != other.value: return False |
| 4646 | if self.value_mask != other.value_mask: return False |
| 4647 | return True |
| 4648 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4649 | def pretty_print(self, q): |
| 4650 | q.text("tcp_src_masked {") |
| 4651 | with q.group(): |
| 4652 | with q.indent(2): |
| 4653 | q.breakable() |
| 4654 | q.text("value = "); |
| 4655 | q.text("%#x" % self.value) |
| 4656 | q.text(","); q.breakable() |
| 4657 | q.text("value_mask = "); |
| 4658 | q.text("%#x" % self.value_mask) |
| 4659 | q.breakable() |
| 4660 | q.text('}') |
| 4661 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4662 | oxm.subtypes[2147490564] = tcp_src_masked |
| 4663 | |
Rich Lane | 5587ab1 | 2014-06-30 11:19:09 -0700 | [diff] [blame] | 4664 | class tunnel_id(oxm): |
| 4665 | type_len = 2147503112 |
| 4666 | |
| 4667 | def __init__(self, value=None): |
| 4668 | if value != None: |
| 4669 | self.value = value |
| 4670 | else: |
| 4671 | self.value = 0 |
| 4672 | return |
| 4673 | |
| 4674 | def pack(self): |
| 4675 | packed = [] |
| 4676 | packed.append(struct.pack("!L", self.type_len)) |
| 4677 | packed.append(struct.pack("!Q", self.value)) |
| 4678 | return ''.join(packed) |
| 4679 | |
| 4680 | @staticmethod |
| 4681 | def unpack(reader): |
| 4682 | obj = tunnel_id() |
| 4683 | _type_len = reader.read("!L")[0] |
| 4684 | assert(_type_len == 2147503112) |
| 4685 | obj.value = reader.read("!Q")[0] |
| 4686 | return obj |
| 4687 | |
| 4688 | def __eq__(self, other): |
| 4689 | if type(self) != type(other): return False |
| 4690 | if self.value != other.value: return False |
| 4691 | return True |
| 4692 | |
| 4693 | def pretty_print(self, q): |
| 4694 | q.text("tunnel_id {") |
| 4695 | with q.group(): |
| 4696 | with q.indent(2): |
| 4697 | q.breakable() |
| 4698 | q.text("value = "); |
| 4699 | q.text("%#x" % self.value) |
| 4700 | q.breakable() |
| 4701 | q.text('}') |
| 4702 | |
| 4703 | oxm.subtypes[2147503112] = tunnel_id |
| 4704 | |
| 4705 | class tunnel_id_masked(oxm): |
| 4706 | type_len = 2147503376 |
| 4707 | |
| 4708 | def __init__(self, value=None, value_mask=None): |
| 4709 | if value != None: |
| 4710 | self.value = value |
| 4711 | else: |
| 4712 | self.value = 0 |
| 4713 | if value_mask != None: |
| 4714 | self.value_mask = value_mask |
| 4715 | else: |
| 4716 | self.value_mask = 0 |
| 4717 | return |
| 4718 | |
| 4719 | def pack(self): |
| 4720 | packed = [] |
| 4721 | packed.append(struct.pack("!L", self.type_len)) |
| 4722 | packed.append(struct.pack("!Q", self.value)) |
| 4723 | packed.append(struct.pack("!Q", self.value_mask)) |
| 4724 | return ''.join(packed) |
| 4725 | |
| 4726 | @staticmethod |
| 4727 | def unpack(reader): |
| 4728 | obj = tunnel_id_masked() |
| 4729 | _type_len = reader.read("!L")[0] |
| 4730 | assert(_type_len == 2147503376) |
| 4731 | obj.value = reader.read("!Q")[0] |
| 4732 | obj.value_mask = reader.read("!Q")[0] |
| 4733 | return obj |
| 4734 | |
| 4735 | def __eq__(self, other): |
| 4736 | if type(self) != type(other): return False |
| 4737 | if self.value != other.value: return False |
| 4738 | if self.value_mask != other.value_mask: return False |
| 4739 | return True |
| 4740 | |
| 4741 | def pretty_print(self, q): |
| 4742 | q.text("tunnel_id_masked {") |
| 4743 | with q.group(): |
| 4744 | with q.indent(2): |
| 4745 | q.breakable() |
| 4746 | q.text("value = "); |
| 4747 | q.text("%#x" % self.value) |
| 4748 | q.text(","); q.breakable() |
| 4749 | q.text("value_mask = "); |
| 4750 | q.text("%#x" % self.value_mask) |
| 4751 | q.breakable() |
| 4752 | q.text('}') |
| 4753 | |
| 4754 | oxm.subtypes[2147503376] = tunnel_id_masked |
| 4755 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4756 | class udp_dst(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4757 | type_len = 2147491842 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4758 | |
| 4759 | def __init__(self, value=None): |
| 4760 | if value != None: |
| 4761 | self.value = value |
| 4762 | else: |
| 4763 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4764 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4765 | |
| 4766 | def pack(self): |
| 4767 | packed = [] |
| 4768 | packed.append(struct.pack("!L", self.type_len)) |
| 4769 | packed.append(struct.pack("!H", self.value)) |
| 4770 | return ''.join(packed) |
| 4771 | |
| 4772 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4773 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4774 | obj = udp_dst() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4775 | _type_len = reader.read("!L")[0] |
| 4776 | assert(_type_len == 2147491842) |
| 4777 | obj.value = reader.read("!H")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4778 | return obj |
| 4779 | |
| 4780 | def __eq__(self, other): |
| 4781 | if type(self) != type(other): return False |
| 4782 | if self.value != other.value: return False |
| 4783 | return True |
| 4784 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4785 | def pretty_print(self, q): |
| 4786 | q.text("udp_dst {") |
| 4787 | with q.group(): |
| 4788 | with q.indent(2): |
| 4789 | q.breakable() |
| 4790 | q.text("value = "); |
| 4791 | q.text("%#x" % self.value) |
| 4792 | q.breakable() |
| 4793 | q.text('}') |
| 4794 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4795 | oxm.subtypes[2147491842] = udp_dst |
| 4796 | |
| 4797 | class udp_dst_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4798 | type_len = 2147492100 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4799 | |
| 4800 | def __init__(self, value=None, value_mask=None): |
| 4801 | if value != None: |
| 4802 | self.value = value |
| 4803 | else: |
| 4804 | self.value = 0 |
| 4805 | if value_mask != None: |
| 4806 | self.value_mask = value_mask |
| 4807 | else: |
| 4808 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4809 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4810 | |
| 4811 | def pack(self): |
| 4812 | packed = [] |
| 4813 | packed.append(struct.pack("!L", self.type_len)) |
| 4814 | packed.append(struct.pack("!H", self.value)) |
| 4815 | packed.append(struct.pack("!H", self.value_mask)) |
| 4816 | return ''.join(packed) |
| 4817 | |
| 4818 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4819 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4820 | obj = udp_dst_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4821 | _type_len = reader.read("!L")[0] |
| 4822 | assert(_type_len == 2147492100) |
| 4823 | obj.value = reader.read("!H")[0] |
| 4824 | obj.value_mask = reader.read("!H")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4825 | return obj |
| 4826 | |
| 4827 | def __eq__(self, other): |
| 4828 | if type(self) != type(other): return False |
| 4829 | if self.value != other.value: return False |
| 4830 | if self.value_mask != other.value_mask: return False |
| 4831 | return True |
| 4832 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4833 | def pretty_print(self, q): |
| 4834 | q.text("udp_dst_masked {") |
| 4835 | with q.group(): |
| 4836 | with q.indent(2): |
| 4837 | q.breakable() |
| 4838 | q.text("value = "); |
| 4839 | q.text("%#x" % self.value) |
| 4840 | q.text(","); q.breakable() |
| 4841 | q.text("value_mask = "); |
| 4842 | q.text("%#x" % self.value_mask) |
| 4843 | q.breakable() |
| 4844 | q.text('}') |
| 4845 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4846 | oxm.subtypes[2147492100] = udp_dst_masked |
| 4847 | |
| 4848 | class udp_src(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4849 | type_len = 2147491330 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4850 | |
| 4851 | def __init__(self, value=None): |
| 4852 | if value != None: |
| 4853 | self.value = value |
| 4854 | else: |
| 4855 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4856 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4857 | |
| 4858 | def pack(self): |
| 4859 | packed = [] |
| 4860 | packed.append(struct.pack("!L", self.type_len)) |
| 4861 | packed.append(struct.pack("!H", self.value)) |
| 4862 | return ''.join(packed) |
| 4863 | |
| 4864 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4865 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4866 | obj = udp_src() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4867 | _type_len = reader.read("!L")[0] |
| 4868 | assert(_type_len == 2147491330) |
| 4869 | obj.value = reader.read("!H")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4870 | return obj |
| 4871 | |
| 4872 | def __eq__(self, other): |
| 4873 | if type(self) != type(other): return False |
| 4874 | if self.value != other.value: return False |
| 4875 | return True |
| 4876 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4877 | def pretty_print(self, q): |
| 4878 | q.text("udp_src {") |
| 4879 | with q.group(): |
| 4880 | with q.indent(2): |
| 4881 | q.breakable() |
| 4882 | q.text("value = "); |
| 4883 | q.text("%#x" % self.value) |
| 4884 | q.breakable() |
| 4885 | q.text('}') |
| 4886 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4887 | oxm.subtypes[2147491330] = udp_src |
| 4888 | |
| 4889 | class udp_src_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4890 | type_len = 2147491588 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4891 | |
| 4892 | def __init__(self, value=None, value_mask=None): |
| 4893 | if value != None: |
| 4894 | self.value = value |
| 4895 | else: |
| 4896 | self.value = 0 |
| 4897 | if value_mask != None: |
| 4898 | self.value_mask = value_mask |
| 4899 | else: |
| 4900 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4901 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4902 | |
| 4903 | def pack(self): |
| 4904 | packed = [] |
| 4905 | packed.append(struct.pack("!L", self.type_len)) |
| 4906 | packed.append(struct.pack("!H", self.value)) |
| 4907 | packed.append(struct.pack("!H", self.value_mask)) |
| 4908 | return ''.join(packed) |
| 4909 | |
| 4910 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4911 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4912 | obj = udp_src_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4913 | _type_len = reader.read("!L")[0] |
| 4914 | assert(_type_len == 2147491588) |
| 4915 | obj.value = reader.read("!H")[0] |
| 4916 | obj.value_mask = reader.read("!H")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4917 | return obj |
| 4918 | |
| 4919 | def __eq__(self, other): |
| 4920 | if type(self) != type(other): return False |
| 4921 | if self.value != other.value: return False |
| 4922 | if self.value_mask != other.value_mask: return False |
| 4923 | return True |
| 4924 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4925 | def pretty_print(self, q): |
| 4926 | q.text("udp_src_masked {") |
| 4927 | with q.group(): |
| 4928 | with q.indent(2): |
| 4929 | q.breakable() |
| 4930 | q.text("value = "); |
| 4931 | q.text("%#x" % self.value) |
| 4932 | q.text(","); q.breakable() |
| 4933 | q.text("value_mask = "); |
| 4934 | q.text("%#x" % self.value_mask) |
| 4935 | q.breakable() |
| 4936 | q.text('}') |
| 4937 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4938 | oxm.subtypes[2147491588] = udp_src_masked |
| 4939 | |
| 4940 | class vlan_pcp(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4941 | type_len = 2147487233 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4942 | |
| 4943 | def __init__(self, value=None): |
| 4944 | if value != None: |
| 4945 | self.value = value |
| 4946 | else: |
| 4947 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4948 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4949 | |
| 4950 | def pack(self): |
| 4951 | packed = [] |
| 4952 | packed.append(struct.pack("!L", self.type_len)) |
| 4953 | packed.append(struct.pack("!B", self.value)) |
| 4954 | return ''.join(packed) |
| 4955 | |
| 4956 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4957 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4958 | obj = vlan_pcp() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4959 | _type_len = reader.read("!L")[0] |
| 4960 | assert(_type_len == 2147487233) |
| 4961 | obj.value = reader.read("!B")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4962 | return obj |
| 4963 | |
| 4964 | def __eq__(self, other): |
| 4965 | if type(self) != type(other): return False |
| 4966 | if self.value != other.value: return False |
| 4967 | return True |
| 4968 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4969 | def pretty_print(self, q): |
| 4970 | q.text("vlan_pcp {") |
| 4971 | with q.group(): |
| 4972 | with q.indent(2): |
| 4973 | q.breakable() |
| 4974 | q.text("value = "); |
| 4975 | q.text("%#x" % self.value) |
| 4976 | q.breakable() |
| 4977 | q.text('}') |
| 4978 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4979 | oxm.subtypes[2147487233] = vlan_pcp |
| 4980 | |
| 4981 | class vlan_pcp_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 4982 | type_len = 2147487490 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4983 | |
| 4984 | def __init__(self, value=None, value_mask=None): |
| 4985 | if value != None: |
| 4986 | self.value = value |
| 4987 | else: |
| 4988 | self.value = 0 |
| 4989 | if value_mask != None: |
| 4990 | self.value_mask = value_mask |
| 4991 | else: |
| 4992 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 4993 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 4994 | |
| 4995 | def pack(self): |
| 4996 | packed = [] |
| 4997 | packed.append(struct.pack("!L", self.type_len)) |
| 4998 | packed.append(struct.pack("!B", self.value)) |
| 4999 | packed.append(struct.pack("!B", self.value_mask)) |
| 5000 | return ''.join(packed) |
| 5001 | |
| 5002 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 5003 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 5004 | obj = vlan_pcp_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 5005 | _type_len = reader.read("!L")[0] |
| 5006 | assert(_type_len == 2147487490) |
| 5007 | obj.value = reader.read("!B")[0] |
| 5008 | obj.value_mask = reader.read("!B")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 5009 | return obj |
| 5010 | |
| 5011 | def __eq__(self, other): |
| 5012 | if type(self) != type(other): return False |
| 5013 | if self.value != other.value: return False |
| 5014 | if self.value_mask != other.value_mask: return False |
| 5015 | return True |
| 5016 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 5017 | def pretty_print(self, q): |
| 5018 | q.text("vlan_pcp_masked {") |
| 5019 | with q.group(): |
| 5020 | with q.indent(2): |
| 5021 | q.breakable() |
| 5022 | q.text("value = "); |
| 5023 | q.text("%#x" % self.value) |
| 5024 | q.text(","); q.breakable() |
| 5025 | q.text("value_mask = "); |
| 5026 | q.text("%#x" % self.value_mask) |
| 5027 | q.breakable() |
| 5028 | q.text('}') |
| 5029 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 5030 | oxm.subtypes[2147487490] = vlan_pcp_masked |
| 5031 | |
| 5032 | class vlan_vid(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 5033 | type_len = 2147486722 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 5034 | |
| 5035 | def __init__(self, value=None): |
| 5036 | if value != None: |
| 5037 | self.value = value |
| 5038 | else: |
| 5039 | self.value = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 5040 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 5041 | |
| 5042 | def pack(self): |
| 5043 | packed = [] |
| 5044 | packed.append(struct.pack("!L", self.type_len)) |
| 5045 | packed.append(struct.pack("!H", self.value)) |
| 5046 | return ''.join(packed) |
| 5047 | |
| 5048 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 5049 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 5050 | obj = vlan_vid() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 5051 | _type_len = reader.read("!L")[0] |
| 5052 | assert(_type_len == 2147486722) |
| 5053 | obj.value = reader.read("!H")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 5054 | return obj |
| 5055 | |
| 5056 | def __eq__(self, other): |
| 5057 | if type(self) != type(other): return False |
| 5058 | if self.value != other.value: return False |
| 5059 | return True |
| 5060 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 5061 | def pretty_print(self, q): |
| 5062 | q.text("vlan_vid {") |
| 5063 | with q.group(): |
| 5064 | with q.indent(2): |
| 5065 | q.breakable() |
| 5066 | q.text("value = "); |
| 5067 | q.text("%#x" % self.value) |
| 5068 | q.breakable() |
| 5069 | q.text('}') |
| 5070 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 5071 | oxm.subtypes[2147486722] = vlan_vid |
| 5072 | |
| 5073 | class vlan_vid_masked(oxm): |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 5074 | type_len = 2147486980 |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 5075 | |
| 5076 | def __init__(self, value=None, value_mask=None): |
| 5077 | if value != None: |
| 5078 | self.value = value |
| 5079 | else: |
| 5080 | self.value = 0 |
| 5081 | if value_mask != None: |
| 5082 | self.value_mask = value_mask |
| 5083 | else: |
| 5084 | self.value_mask = 0 |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 5085 | return |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 5086 | |
| 5087 | def pack(self): |
| 5088 | packed = [] |
| 5089 | packed.append(struct.pack("!L", self.type_len)) |
| 5090 | packed.append(struct.pack("!H", self.value)) |
| 5091 | packed.append(struct.pack("!H", self.value_mask)) |
| 5092 | return ''.join(packed) |
| 5093 | |
| 5094 | @staticmethod |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 5095 | def unpack(reader): |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 5096 | obj = vlan_vid_masked() |
Dan Talayco | f620225 | 2013-07-02 01:00:29 -0700 | [diff] [blame] | 5097 | _type_len = reader.read("!L")[0] |
| 5098 | assert(_type_len == 2147486980) |
| 5099 | obj.value = reader.read("!H")[0] |
| 5100 | obj.value_mask = reader.read("!H")[0] |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 5101 | return obj |
| 5102 | |
| 5103 | def __eq__(self, other): |
| 5104 | if type(self) != type(other): return False |
| 5105 | if self.value != other.value: return False |
| 5106 | if self.value_mask != other.value_mask: return False |
| 5107 | return True |
| 5108 | |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 5109 | def pretty_print(self, q): |
| 5110 | q.text("vlan_vid_masked {") |
| 5111 | with q.group(): |
| 5112 | with q.indent(2): |
| 5113 | q.breakable() |
| 5114 | q.text("value = "); |
| 5115 | q.text("%#x" % self.value) |
| 5116 | q.text(","); q.breakable() |
| 5117 | q.text("value_mask = "); |
| 5118 | q.text("%#x" % self.value_mask) |
| 5119 | q.breakable() |
| 5120 | q.text('}') |
| 5121 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 5122 | oxm.subtypes[2147486980] = vlan_vid_masked |
Rich Lane | c2ee4b8 | 2013-04-24 17:12:38 -0700 | [diff] [blame] | 5123 | |
Rich Lane | 7dcdf02 | 2013-12-11 14:45:27 -0800 | [diff] [blame] | 5124 | |