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