diff --git a/src/python/loxi/of13/oxm.py b/src/python/loxi/of13/oxm.py
index d3bc046..fb1291d 100644
--- a/src/python/loxi/of13/oxm.py
+++ b/src/python/loxi/of13/oxm.py
@@ -1,6 +1,7 @@
 # Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
 # Copyright (c) 2011, 2012 Open Networking Foundation
 # Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+# See the file LICENSE.pyloxi which should have been included in the source distribution
 
 # Automatically generated by LOXI from template oxm.py
 # Do not modify
@@ -26,7 +27,7 @@
     pass
 
 class arp_op(OXM):
-    type_len = 0x80002a02
+    type_len = 2147494402
 
     def __init__(self, value=None):
         if value != None:
@@ -47,9 +48,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80002a02)
-        obj.value = reader.read('!H')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147494402)
+        obj.value = reader.read("!H")[0]
         return obj
 
     def __eq__(self, other):
@@ -75,7 +76,7 @@
         q.text('}')
 
 class arp_op_masked(OXM):
-    type_len = 0x80002b04
+    type_len = 2147494660
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -101,10 +102,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80002b04)
-        obj.value = reader.read('!H')[0]
-        obj.value_mask = reader.read('!H')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147494660)
+        obj.value = reader.read("!H")[0]
+        obj.value_mask = reader.read("!H")[0]
         return obj
 
     def __eq__(self, other):
@@ -134,7 +135,7 @@
         q.text('}')
 
 class arp_sha(OXM):
-    type_len = 0x80003006
+    type_len = 2147495942
 
     def __init__(self, value=None):
         if value != None:
@@ -155,8 +156,8 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80003006)
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147495942)
         obj.value = list(reader.read('!6B'))
         return obj
 
@@ -183,7 +184,7 @@
         q.text('}')
 
 class arp_sha_masked(OXM):
-    type_len = 0x8000310c
+    type_len = 2147496204
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -209,8 +210,8 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x8000310c)
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147496204)
         obj.value = list(reader.read('!6B'))
         obj.value_mask = list(reader.read('!6B'))
         return obj
@@ -242,7 +243,7 @@
         q.text('}')
 
 class arp_spa(OXM):
-    type_len = 0x80002c04
+    type_len = 2147494916
 
     def __init__(self, value=None):
         if value != None:
@@ -263,9 +264,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80002c04)
-        obj.value = reader.read('!L')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147494916)
+        obj.value = reader.read("!L")[0]
         return obj
 
     def __eq__(self, other):
@@ -291,7 +292,7 @@
         q.text('}')
 
 class arp_spa_masked(OXM):
-    type_len = 0x80002d08
+    type_len = 2147495176
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -317,10 +318,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80002d08)
-        obj.value = reader.read('!L')[0]
-        obj.value_mask = reader.read('!L')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147495176)
+        obj.value = reader.read("!L")[0]
+        obj.value_mask = reader.read("!L")[0]
         return obj
 
     def __eq__(self, other):
@@ -350,7 +351,7 @@
         q.text('}')
 
 class arp_tha(OXM):
-    type_len = 0x80003206
+    type_len = 2147496454
 
     def __init__(self, value=None):
         if value != None:
@@ -371,8 +372,8 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80003206)
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147496454)
         obj.value = list(reader.read('!6B'))
         return obj
 
@@ -399,7 +400,7 @@
         q.text('}')
 
 class arp_tha_masked(OXM):
-    type_len = 0x8000330c
+    type_len = 2147496716
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -425,8 +426,8 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x8000330c)
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147496716)
         obj.value = list(reader.read('!6B'))
         obj.value_mask = list(reader.read('!6B'))
         return obj
@@ -458,7 +459,7 @@
         q.text('}')
 
 class arp_tpa(OXM):
-    type_len = 0x80002e04
+    type_len = 2147495428
 
     def __init__(self, value=None):
         if value != None:
@@ -479,9 +480,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80002e04)
-        obj.value = reader.read('!L')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147495428)
+        obj.value = reader.read("!L")[0]
         return obj
 
     def __eq__(self, other):
@@ -507,7 +508,7 @@
         q.text('}')
 
 class arp_tpa_masked(OXM):
-    type_len = 0x80002f08
+    type_len = 2147495688
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -533,10 +534,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80002f08)
-        obj.value = reader.read('!L')[0]
-        obj.value_mask = reader.read('!L')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147495688)
+        obj.value = reader.read("!L")[0]
+        obj.value_mask = reader.read("!L")[0]
         return obj
 
     def __eq__(self, other):
@@ -565,8 +566,116 @@
             q.breakable()
         q.text('}')
 
+class dst_meta_id(OXM):
+    type_len = 258561
+
+    def __init__(self, value=None):
+        if value != None:
+            self.value = value
+        else:
+            self.value = 0
+
+    def pack(self):
+        packed = []
+        packed.append(struct.pack("!L", self.type_len))
+        packed.append(struct.pack("!B", self.value))
+        return ''.join(packed)
+
+    @staticmethod
+    def unpack(buf):
+        obj = dst_meta_id()
+        if type(buf) == loxi.generic_util.OFReader:
+            reader = buf
+        else:
+            reader = loxi.generic_util.OFReader(buf)
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 258561)
+        obj.value = reader.read("!B")[0]
+        return obj
+
+    def __eq__(self, other):
+        if type(self) != type(other): return False
+        if self.value != other.value: return False
+        return True
+
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
+    def show(self):
+        import loxi.pp
+        return loxi.pp.pp(self)
+
+    def pretty_print(self, q):
+        q.text("dst_meta_id {")
+        with q.group():
+            with q.indent(2):
+                q.breakable()
+                q.text("value = ");
+                q.text("%#x" % self.value)
+            q.breakable()
+        q.text('}')
+
+class dst_meta_id_masked(OXM):
+    type_len = 258818
+
+    def __init__(self, value=None, value_mask=None):
+        if value != None:
+            self.value = value
+        else:
+            self.value = 0
+        if value_mask != None:
+            self.value_mask = value_mask
+        else:
+            self.value_mask = 0
+
+    def pack(self):
+        packed = []
+        packed.append(struct.pack("!L", self.type_len))
+        packed.append(struct.pack("!B", self.value))
+        packed.append(struct.pack("!B", self.value_mask))
+        return ''.join(packed)
+
+    @staticmethod
+    def unpack(buf):
+        obj = dst_meta_id_masked()
+        if type(buf) == loxi.generic_util.OFReader:
+            reader = buf
+        else:
+            reader = loxi.generic_util.OFReader(buf)
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 258818)
+        obj.value = reader.read("!B")[0]
+        obj.value_mask = reader.read("!B")[0]
+        return obj
+
+    def __eq__(self, other):
+        if type(self) != type(other): return False
+        if self.value != other.value: return False
+        if self.value_mask != other.value_mask: return False
+        return True
+
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
+    def show(self):
+        import loxi.pp
+        return loxi.pp.pp(self)
+
+    def pretty_print(self, q):
+        q.text("dst_meta_id_masked {")
+        with q.group():
+            with q.indent(2):
+                q.breakable()
+                q.text("value = ");
+                q.text("%#x" % self.value)
+                q.text(","); q.breakable()
+                q.text("value_mask = ");
+                q.text("%#x" % self.value_mask)
+            q.breakable()
+        q.text('}')
+
 class eth_dst(OXM):
-    type_len = 0x80000606
+    type_len = 2147485190
 
     def __init__(self, value=None):
         if value != None:
@@ -587,8 +696,8 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80000606)
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147485190)
         obj.value = list(reader.read('!6B'))
         return obj
 
@@ -615,7 +724,7 @@
         q.text('}')
 
 class eth_dst_masked(OXM):
-    type_len = 0x8000070c
+    type_len = 2147485452
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -641,8 +750,8 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x8000070c)
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147485452)
         obj.value = list(reader.read('!6B'))
         obj.value_mask = list(reader.read('!6B'))
         return obj
@@ -674,7 +783,7 @@
         q.text('}')
 
 class eth_src(OXM):
-    type_len = 0x80000806
+    type_len = 2147485702
 
     def __init__(self, value=None):
         if value != None:
@@ -695,8 +804,8 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80000806)
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147485702)
         obj.value = list(reader.read('!6B'))
         return obj
 
@@ -723,7 +832,7 @@
         q.text('}')
 
 class eth_src_masked(OXM):
-    type_len = 0x8000090c
+    type_len = 2147485964
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -749,8 +858,8 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x8000090c)
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147485964)
         obj.value = list(reader.read('!6B'))
         obj.value_mask = list(reader.read('!6B'))
         return obj
@@ -782,7 +891,7 @@
         q.text('}')
 
 class eth_type(OXM):
-    type_len = 0x80000a02
+    type_len = 2147486210
 
     def __init__(self, value=None):
         if value != None:
@@ -803,9 +912,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80000a02)
-        obj.value = reader.read('!H')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147486210)
+        obj.value = reader.read("!H")[0]
         return obj
 
     def __eq__(self, other):
@@ -831,7 +940,7 @@
         q.text('}')
 
 class eth_type_masked(OXM):
-    type_len = 0x80000b04
+    type_len = 2147486468
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -857,10 +966,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80000b04)
-        obj.value = reader.read('!H')[0]
-        obj.value_mask = reader.read('!H')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147486468)
+        obj.value = reader.read("!H")[0]
+        obj.value_mask = reader.read("!H")[0]
         return obj
 
     def __eq__(self, other):
@@ -890,7 +999,7 @@
         q.text('}')
 
 class icmpv4_code(OXM):
-    type_len = 0x80002801
+    type_len = 2147493889
 
     def __init__(self, value=None):
         if value != None:
@@ -911,9 +1020,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80002801)
-        obj.value = reader.read('!B')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147493889)
+        obj.value = reader.read("!B")[0]
         return obj
 
     def __eq__(self, other):
@@ -939,7 +1048,7 @@
         q.text('}')
 
 class icmpv4_code_masked(OXM):
-    type_len = 0x80002902
+    type_len = 2147494146
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -965,10 +1074,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80002902)
-        obj.value = reader.read('!B')[0]
-        obj.value_mask = reader.read('!B')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147494146)
+        obj.value = reader.read("!B")[0]
+        obj.value_mask = reader.read("!B")[0]
         return obj
 
     def __eq__(self, other):
@@ -998,7 +1107,7 @@
         q.text('}')
 
 class icmpv4_type(OXM):
-    type_len = 0x80002601
+    type_len = 2147493377
 
     def __init__(self, value=None):
         if value != None:
@@ -1019,9 +1128,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80002601)
-        obj.value = reader.read('!B')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147493377)
+        obj.value = reader.read("!B")[0]
         return obj
 
     def __eq__(self, other):
@@ -1047,7 +1156,7 @@
         q.text('}')
 
 class icmpv4_type_masked(OXM):
-    type_len = 0x80002702
+    type_len = 2147493634
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -1073,10 +1182,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80002702)
-        obj.value = reader.read('!B')[0]
-        obj.value_mask = reader.read('!B')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147493634)
+        obj.value = reader.read("!B")[0]
+        obj.value_mask = reader.read("!B")[0]
         return obj
 
     def __eq__(self, other):
@@ -1106,7 +1215,7 @@
         q.text('}')
 
 class icmpv6_code(OXM):
-    type_len = 0x80003c01
+    type_len = 2147499009
 
     def __init__(self, value=None):
         if value != None:
@@ -1127,9 +1236,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80003c01)
-        obj.value = reader.read('!B')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147499009)
+        obj.value = reader.read("!B")[0]
         return obj
 
     def __eq__(self, other):
@@ -1155,7 +1264,7 @@
         q.text('}')
 
 class icmpv6_code_masked(OXM):
-    type_len = 0x80003d02
+    type_len = 2147499266
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -1181,10 +1290,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80003d02)
-        obj.value = reader.read('!B')[0]
-        obj.value_mask = reader.read('!B')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147499266)
+        obj.value = reader.read("!B")[0]
+        obj.value_mask = reader.read("!B")[0]
         return obj
 
     def __eq__(self, other):
@@ -1214,7 +1323,7 @@
         q.text('}')
 
 class icmpv6_type(OXM):
-    type_len = 0x80003a01
+    type_len = 2147498497
 
     def __init__(self, value=None):
         if value != None:
@@ -1235,9 +1344,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80003a01)
-        obj.value = reader.read('!B')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147498497)
+        obj.value = reader.read("!B")[0]
         return obj
 
     def __eq__(self, other):
@@ -1263,7 +1372,7 @@
         q.text('}')
 
 class icmpv6_type_masked(OXM):
-    type_len = 0x80003b02
+    type_len = 2147498754
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -1289,10 +1398,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80003b02)
-        obj.value = reader.read('!B')[0]
-        obj.value_mask = reader.read('!B')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147498754)
+        obj.value = reader.read("!B")[0]
+        obj.value_mask = reader.read("!B")[0]
         return obj
 
     def __eq__(self, other):
@@ -1322,7 +1431,7 @@
         q.text('}')
 
 class in_phy_port(OXM):
-    type_len = 0x80000204
+    type_len = 2147484164
 
     def __init__(self, value=None):
         if value != None:
@@ -1333,7 +1442,7 @@
     def pack(self):
         packed = []
         packed.append(struct.pack("!L", self.type_len))
-        packed.append(struct.pack("!L", self.value))
+        packed.append(util.pack_port_no(self.value))
         return ''.join(packed)
 
     @staticmethod
@@ -1343,9 +1452,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80000204)
-        obj.value = reader.read('!L')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147484164)
+        obj.value = util.unpack_port_no(reader)
         return obj
 
     def __eq__(self, other):
@@ -1371,7 +1480,7 @@
         q.text('}')
 
 class in_phy_port_masked(OXM):
-    type_len = 0x80000308
+    type_len = 2147484424
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -1386,8 +1495,8 @@
     def pack(self):
         packed = []
         packed.append(struct.pack("!L", self.type_len))
-        packed.append(struct.pack("!L", self.value))
-        packed.append(struct.pack("!L", self.value_mask))
+        packed.append(util.pack_port_no(self.value))
+        packed.append(util.pack_port_no(self.value_mask))
         return ''.join(packed)
 
     @staticmethod
@@ -1397,10 +1506,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80000308)
-        obj.value = reader.read('!L')[0]
-        obj.value_mask = reader.read('!L')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147484424)
+        obj.value = util.unpack_port_no(reader)
+        obj.value_mask = util.unpack_port_no(reader)
         return obj
 
     def __eq__(self, other):
@@ -1430,7 +1539,7 @@
         q.text('}')
 
 class in_port(OXM):
-    type_len = 0x80000004
+    type_len = 2147483652
 
     def __init__(self, value=None):
         if value != None:
@@ -1441,7 +1550,7 @@
     def pack(self):
         packed = []
         packed.append(struct.pack("!L", self.type_len))
-        packed.append(struct.pack("!L", self.value))
+        packed.append(util.pack_port_no(self.value))
         return ''.join(packed)
 
     @staticmethod
@@ -1451,9 +1560,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80000004)
-        obj.value = reader.read('!L')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147483652)
+        obj.value = util.unpack_port_no(reader)
         return obj
 
     def __eq__(self, other):
@@ -1479,7 +1588,7 @@
         q.text('}')
 
 class in_port_masked(OXM):
-    type_len = 0x80000108
+    type_len = 2147483912
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -1494,8 +1603,8 @@
     def pack(self):
         packed = []
         packed.append(struct.pack("!L", self.type_len))
-        packed.append(struct.pack("!L", self.value))
-        packed.append(struct.pack("!L", self.value_mask))
+        packed.append(util.pack_port_no(self.value))
+        packed.append(util.pack_port_no(self.value_mask))
         return ''.join(packed)
 
     @staticmethod
@@ -1505,10 +1614,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80000108)
-        obj.value = reader.read('!L')[0]
-        obj.value_mask = reader.read('!L')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147483912)
+        obj.value = util.unpack_port_no(reader)
+        obj.value_mask = util.unpack_port_no(reader)
         return obj
 
     def __eq__(self, other):
@@ -1538,7 +1647,7 @@
         q.text('}')
 
 class ip_dscp(OXM):
-    type_len = 0x80001001
+    type_len = 2147487745
 
     def __init__(self, value=None):
         if value != None:
@@ -1559,9 +1668,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80001001)
-        obj.value = reader.read('!B')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147487745)
+        obj.value = reader.read("!B")[0]
         return obj
 
     def __eq__(self, other):
@@ -1587,7 +1696,7 @@
         q.text('}')
 
 class ip_dscp_masked(OXM):
-    type_len = 0x80001102
+    type_len = 2147488002
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -1613,10 +1722,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80001102)
-        obj.value = reader.read('!B')[0]
-        obj.value_mask = reader.read('!B')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147488002)
+        obj.value = reader.read("!B")[0]
+        obj.value_mask = reader.read("!B")[0]
         return obj
 
     def __eq__(self, other):
@@ -1646,7 +1755,7 @@
         q.text('}')
 
 class ip_ecn(OXM):
-    type_len = 0x80001201
+    type_len = 2147488257
 
     def __init__(self, value=None):
         if value != None:
@@ -1667,9 +1776,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80001201)
-        obj.value = reader.read('!B')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147488257)
+        obj.value = reader.read("!B")[0]
         return obj
 
     def __eq__(self, other):
@@ -1695,7 +1804,7 @@
         q.text('}')
 
 class ip_ecn_masked(OXM):
-    type_len = 0x80001302
+    type_len = 2147488514
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -1721,10 +1830,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80001302)
-        obj.value = reader.read('!B')[0]
-        obj.value_mask = reader.read('!B')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147488514)
+        obj.value = reader.read("!B")[0]
+        obj.value_mask = reader.read("!B")[0]
         return obj
 
     def __eq__(self, other):
@@ -1754,7 +1863,7 @@
         q.text('}')
 
 class ip_proto(OXM):
-    type_len = 0x80001401
+    type_len = 2147488769
 
     def __init__(self, value=None):
         if value != None:
@@ -1775,9 +1884,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80001401)
-        obj.value = reader.read('!B')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147488769)
+        obj.value = reader.read("!B")[0]
         return obj
 
     def __eq__(self, other):
@@ -1803,7 +1912,7 @@
         q.text('}')
 
 class ip_proto_masked(OXM):
-    type_len = 0x80001502
+    type_len = 2147489026
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -1829,10 +1938,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80001502)
-        obj.value = reader.read('!B')[0]
-        obj.value_mask = reader.read('!B')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147489026)
+        obj.value = reader.read("!B")[0]
+        obj.value_mask = reader.read("!B")[0]
         return obj
 
     def __eq__(self, other):
@@ -1862,7 +1971,7 @@
         q.text('}')
 
 class ipv4_dst(OXM):
-    type_len = 0x80001804
+    type_len = 2147489796
 
     def __init__(self, value=None):
         if value != None:
@@ -1883,9 +1992,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80001804)
-        obj.value = reader.read('!L')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147489796)
+        obj.value = reader.read("!L")[0]
         return obj
 
     def __eq__(self, other):
@@ -1911,7 +2020,7 @@
         q.text('}')
 
 class ipv4_dst_masked(OXM):
-    type_len = 0x80001908
+    type_len = 2147490056
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -1937,10 +2046,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80001908)
-        obj.value = reader.read('!L')[0]
-        obj.value_mask = reader.read('!L')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147490056)
+        obj.value = reader.read("!L")[0]
+        obj.value_mask = reader.read("!L")[0]
         return obj
 
     def __eq__(self, other):
@@ -1970,7 +2079,7 @@
         q.text('}')
 
 class ipv4_src(OXM):
-    type_len = 0x80001604
+    type_len = 2147489284
 
     def __init__(self, value=None):
         if value != None:
@@ -1991,9 +2100,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80001604)
-        obj.value = reader.read('!L')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147489284)
+        obj.value = reader.read("!L")[0]
         return obj
 
     def __eq__(self, other):
@@ -2019,7 +2128,7 @@
         q.text('}')
 
 class ipv4_src_masked(OXM):
-    type_len = 0x80001708
+    type_len = 2147489544
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -2045,10 +2154,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80001708)
-        obj.value = reader.read('!L')[0]
-        obj.value_mask = reader.read('!L')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147489544)
+        obj.value = reader.read("!L")[0]
+        obj.value_mask = reader.read("!L")[0]
         return obj
 
     def __eq__(self, other):
@@ -2078,7 +2187,7 @@
         q.text('}')
 
 class ipv6_dst(OXM):
-    type_len = 0x80003610
+    type_len = 2147497488
 
     def __init__(self, value=None):
         if value != None:
@@ -2099,8 +2208,8 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80003610)
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147497488)
         obj.value = reader.read('!16s')[0]
         return obj
 
@@ -2127,7 +2236,7 @@
         q.text('}')
 
 class ipv6_dst_masked(OXM):
-    type_len = 0x80003720
+    type_len = 2147497760
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -2153,8 +2262,8 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80003720)
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147497760)
         obj.value = reader.read('!16s')[0]
         obj.value_mask = reader.read('!16s')[0]
         return obj
@@ -2186,7 +2295,7 @@
         q.text('}')
 
 class ipv6_flabel(OXM):
-    type_len = 0x80003804
+    type_len = 2147497988
 
     def __init__(self, value=None):
         if value != None:
@@ -2207,9 +2316,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80003804)
-        obj.value = reader.read('!L')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147497988)
+        obj.value = reader.read("!L")[0]
         return obj
 
     def __eq__(self, other):
@@ -2235,7 +2344,7 @@
         q.text('}')
 
 class ipv6_flabel_masked(OXM):
-    type_len = 0x80003908
+    type_len = 2147498248
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -2261,10 +2370,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80003908)
-        obj.value = reader.read('!L')[0]
-        obj.value_mask = reader.read('!L')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147498248)
+        obj.value = reader.read("!L")[0]
+        obj.value_mask = reader.read("!L")[0]
         return obj
 
     def __eq__(self, other):
@@ -2294,7 +2403,7 @@
         q.text('}')
 
 class ipv6_nd_sll(OXM):
-    type_len = 0x80004006
+    type_len = 2147500038
 
     def __init__(self, value=None):
         if value != None:
@@ -2315,8 +2424,8 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80004006)
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147500038)
         obj.value = list(reader.read('!6B'))
         return obj
 
@@ -2343,7 +2452,7 @@
         q.text('}')
 
 class ipv6_nd_sll_masked(OXM):
-    type_len = 0x8000410c
+    type_len = 2147500300
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -2369,8 +2478,8 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x8000410c)
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147500300)
         obj.value = list(reader.read('!6B'))
         obj.value_mask = list(reader.read('!6B'))
         return obj
@@ -2402,7 +2511,7 @@
         q.text('}')
 
 class ipv6_nd_target(OXM):
-    type_len = 0x80003e10
+    type_len = 2147499536
 
     def __init__(self, value=None):
         if value != None:
@@ -2423,8 +2532,8 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80003e10)
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147499536)
         obj.value = reader.read('!16s')[0]
         return obj
 
@@ -2451,7 +2560,7 @@
         q.text('}')
 
 class ipv6_nd_target_masked(OXM):
-    type_len = 0x80003f20
+    type_len = 2147499808
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -2477,8 +2586,8 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80003f20)
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147499808)
         obj.value = reader.read('!16s')[0]
         obj.value_mask = reader.read('!16s')[0]
         return obj
@@ -2510,7 +2619,7 @@
         q.text('}')
 
 class ipv6_nd_tll(OXM):
-    type_len = 0x80004206
+    type_len = 2147500550
 
     def __init__(self, value=None):
         if value != None:
@@ -2531,8 +2640,8 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80004206)
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147500550)
         obj.value = list(reader.read('!6B'))
         return obj
 
@@ -2559,7 +2668,7 @@
         q.text('}')
 
 class ipv6_nd_tll_masked(OXM):
-    type_len = 0x8000430c
+    type_len = 2147500812
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -2585,8 +2694,8 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x8000430c)
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147500812)
         obj.value = list(reader.read('!6B'))
         obj.value_mask = list(reader.read('!6B'))
         return obj
@@ -2618,7 +2727,7 @@
         q.text('}')
 
 class ipv6_src(OXM):
-    type_len = 0x80003410
+    type_len = 2147496976
 
     def __init__(self, value=None):
         if value != None:
@@ -2639,8 +2748,8 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80003410)
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147496976)
         obj.value = reader.read('!16s')[0]
         return obj
 
@@ -2667,7 +2776,7 @@
         q.text('}')
 
 class ipv6_src_masked(OXM):
-    type_len = 0x80003520
+    type_len = 2147497248
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -2693,8 +2802,8 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80003520)
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147497248)
         obj.value = reader.read('!16s')[0]
         obj.value_mask = reader.read('!16s')[0]
         return obj
@@ -2726,7 +2835,7 @@
         q.text('}')
 
 class metadata(OXM):
-    type_len = 0x80000408
+    type_len = 2147484680
 
     def __init__(self, value=None):
         if value != None:
@@ -2747,9 +2856,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80000408)
-        obj.value = reader.read('!Q')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147484680)
+        obj.value = reader.read("!Q")[0]
         return obj
 
     def __eq__(self, other):
@@ -2775,7 +2884,7 @@
         q.text('}')
 
 class metadata_masked(OXM):
-    type_len = 0x80000510
+    type_len = 2147484944
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -2801,10 +2910,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80000510)
-        obj.value = reader.read('!Q')[0]
-        obj.value_mask = reader.read('!Q')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147484944)
+        obj.value = reader.read("!Q")[0]
+        obj.value_mask = reader.read("!Q")[0]
         return obj
 
     def __eq__(self, other):
@@ -2834,7 +2943,7 @@
         q.text('}')
 
 class mpls_label(OXM):
-    type_len = 0x80004404
+    type_len = 2147501060
 
     def __init__(self, value=None):
         if value != None:
@@ -2855,9 +2964,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80004404)
-        obj.value = reader.read('!L')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147501060)
+        obj.value = reader.read("!L")[0]
         return obj
 
     def __eq__(self, other):
@@ -2883,7 +2992,7 @@
         q.text('}')
 
 class mpls_label_masked(OXM):
-    type_len = 0x80004508
+    type_len = 2147501320
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -2909,10 +3018,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80004508)
-        obj.value = reader.read('!L')[0]
-        obj.value_mask = reader.read('!L')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147501320)
+        obj.value = reader.read("!L")[0]
+        obj.value_mask = reader.read("!L")[0]
         return obj
 
     def __eq__(self, other):
@@ -2942,7 +3051,7 @@
         q.text('}')
 
 class mpls_tc(OXM):
-    type_len = 0x80004601
+    type_len = 2147501569
 
     def __init__(self, value=None):
         if value != None:
@@ -2963,9 +3072,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80004601)
-        obj.value = reader.read('!B')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147501569)
+        obj.value = reader.read("!B")[0]
         return obj
 
     def __eq__(self, other):
@@ -2991,7 +3100,7 @@
         q.text('}')
 
 class mpls_tc_masked(OXM):
-    type_len = 0x80004702
+    type_len = 2147501826
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -3017,10 +3126,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80004702)
-        obj.value = reader.read('!B')[0]
-        obj.value_mask = reader.read('!B')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147501826)
+        obj.value = reader.read("!B")[0]
+        obj.value_mask = reader.read("!B")[0]
         return obj
 
     def __eq__(self, other):
@@ -3050,7 +3159,7 @@
         q.text('}')
 
 class sctp_dst(OXM):
-    type_len = 0x80002402
+    type_len = 2147492866
 
     def __init__(self, value=None):
         if value != None:
@@ -3071,9 +3180,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80002402)
-        obj.value = reader.read('!H')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147492866)
+        obj.value = reader.read("!H")[0]
         return obj
 
     def __eq__(self, other):
@@ -3099,7 +3208,7 @@
         q.text('}')
 
 class sctp_dst_masked(OXM):
-    type_len = 0x80002504
+    type_len = 2147493124
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -3125,10 +3234,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80002504)
-        obj.value = reader.read('!H')[0]
-        obj.value_mask = reader.read('!H')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147493124)
+        obj.value = reader.read("!H")[0]
+        obj.value_mask = reader.read("!H")[0]
         return obj
 
     def __eq__(self, other):
@@ -3158,7 +3267,7 @@
         q.text('}')
 
 class sctp_src(OXM):
-    type_len = 0x80002202
+    type_len = 2147492354
 
     def __init__(self, value=None):
         if value != None:
@@ -3179,9 +3288,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80002202)
-        obj.value = reader.read('!H')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147492354)
+        obj.value = reader.read("!H")[0]
         return obj
 
     def __eq__(self, other):
@@ -3207,7 +3316,7 @@
         q.text('}')
 
 class sctp_src_masked(OXM):
-    type_len = 0x80002304
+    type_len = 2147492612
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -3233,10 +3342,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80002304)
-        obj.value = reader.read('!H')[0]
-        obj.value_mask = reader.read('!H')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147492612)
+        obj.value = reader.read("!H")[0]
+        obj.value_mask = reader.read("!H")[0]
         return obj
 
     def __eq__(self, other):
@@ -3265,8 +3374,116 @@
             q.breakable()
         q.text('}')
 
+class src_meta_id(OXM):
+    type_len = 258049
+
+    def __init__(self, value=None):
+        if value != None:
+            self.value = value
+        else:
+            self.value = 0
+
+    def pack(self):
+        packed = []
+        packed.append(struct.pack("!L", self.type_len))
+        packed.append(struct.pack("!B", self.value))
+        return ''.join(packed)
+
+    @staticmethod
+    def unpack(buf):
+        obj = src_meta_id()
+        if type(buf) == loxi.generic_util.OFReader:
+            reader = buf
+        else:
+            reader = loxi.generic_util.OFReader(buf)
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 258049)
+        obj.value = reader.read("!B")[0]
+        return obj
+
+    def __eq__(self, other):
+        if type(self) != type(other): return False
+        if self.value != other.value: return False
+        return True
+
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
+    def show(self):
+        import loxi.pp
+        return loxi.pp.pp(self)
+
+    def pretty_print(self, q):
+        q.text("src_meta_id {")
+        with q.group():
+            with q.indent(2):
+                q.breakable()
+                q.text("value = ");
+                q.text("%#x" % self.value)
+            q.breakable()
+        q.text('}')
+
+class src_meta_id_masked(OXM):
+    type_len = 258306
+
+    def __init__(self, value=None, value_mask=None):
+        if value != None:
+            self.value = value
+        else:
+            self.value = 0
+        if value_mask != None:
+            self.value_mask = value_mask
+        else:
+            self.value_mask = 0
+
+    def pack(self):
+        packed = []
+        packed.append(struct.pack("!L", self.type_len))
+        packed.append(struct.pack("!B", self.value))
+        packed.append(struct.pack("!B", self.value_mask))
+        return ''.join(packed)
+
+    @staticmethod
+    def unpack(buf):
+        obj = src_meta_id_masked()
+        if type(buf) == loxi.generic_util.OFReader:
+            reader = buf
+        else:
+            reader = loxi.generic_util.OFReader(buf)
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 258306)
+        obj.value = reader.read("!B")[0]
+        obj.value_mask = reader.read("!B")[0]
+        return obj
+
+    def __eq__(self, other):
+        if type(self) != type(other): return False
+        if self.value != other.value: return False
+        if self.value_mask != other.value_mask: return False
+        return True
+
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
+    def show(self):
+        import loxi.pp
+        return loxi.pp.pp(self)
+
+    def pretty_print(self, q):
+        q.text("src_meta_id_masked {")
+        with q.group():
+            with q.indent(2):
+                q.breakable()
+                q.text("value = ");
+                q.text("%#x" % self.value)
+                q.text(","); q.breakable()
+                q.text("value_mask = ");
+                q.text("%#x" % self.value_mask)
+            q.breakable()
+        q.text('}')
+
 class tcp_dst(OXM):
-    type_len = 0x80001c02
+    type_len = 2147490818
 
     def __init__(self, value=None):
         if value != None:
@@ -3287,9 +3504,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80001c02)
-        obj.value = reader.read('!H')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147490818)
+        obj.value = reader.read("!H")[0]
         return obj
 
     def __eq__(self, other):
@@ -3315,7 +3532,7 @@
         q.text('}')
 
 class tcp_dst_masked(OXM):
-    type_len = 0x80001d04
+    type_len = 2147491076
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -3341,10 +3558,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80001d04)
-        obj.value = reader.read('!H')[0]
-        obj.value_mask = reader.read('!H')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147491076)
+        obj.value = reader.read("!H")[0]
+        obj.value_mask = reader.read("!H")[0]
         return obj
 
     def __eq__(self, other):
@@ -3374,7 +3591,7 @@
         q.text('}')
 
 class tcp_src(OXM):
-    type_len = 0x80001a02
+    type_len = 2147490306
 
     def __init__(self, value=None):
         if value != None:
@@ -3395,9 +3612,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80001a02)
-        obj.value = reader.read('!H')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147490306)
+        obj.value = reader.read("!H")[0]
         return obj
 
     def __eq__(self, other):
@@ -3423,7 +3640,7 @@
         q.text('}')
 
 class tcp_src_masked(OXM):
-    type_len = 0x80001b04
+    type_len = 2147490564
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -3449,10 +3666,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80001b04)
-        obj.value = reader.read('!H')[0]
-        obj.value_mask = reader.read('!H')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147490564)
+        obj.value = reader.read("!H")[0]
+        obj.value_mask = reader.read("!H")[0]
         return obj
 
     def __eq__(self, other):
@@ -3482,7 +3699,7 @@
         q.text('}')
 
 class udp_dst(OXM):
-    type_len = 0x80002002
+    type_len = 2147491842
 
     def __init__(self, value=None):
         if value != None:
@@ -3503,9 +3720,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80002002)
-        obj.value = reader.read('!H')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147491842)
+        obj.value = reader.read("!H")[0]
         return obj
 
     def __eq__(self, other):
@@ -3531,7 +3748,7 @@
         q.text('}')
 
 class udp_dst_masked(OXM):
-    type_len = 0x80002104
+    type_len = 2147492100
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -3557,10 +3774,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80002104)
-        obj.value = reader.read('!H')[0]
-        obj.value_mask = reader.read('!H')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147492100)
+        obj.value = reader.read("!H")[0]
+        obj.value_mask = reader.read("!H")[0]
         return obj
 
     def __eq__(self, other):
@@ -3590,7 +3807,7 @@
         q.text('}')
 
 class udp_src(OXM):
-    type_len = 0x80001e02
+    type_len = 2147491330
 
     def __init__(self, value=None):
         if value != None:
@@ -3611,9 +3828,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80001e02)
-        obj.value = reader.read('!H')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147491330)
+        obj.value = reader.read("!H")[0]
         return obj
 
     def __eq__(self, other):
@@ -3639,7 +3856,7 @@
         q.text('}')
 
 class udp_src_masked(OXM):
-    type_len = 0x80001f04
+    type_len = 2147491588
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -3665,10 +3882,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80001f04)
-        obj.value = reader.read('!H')[0]
-        obj.value_mask = reader.read('!H')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147491588)
+        obj.value = reader.read("!H")[0]
+        obj.value_mask = reader.read("!H")[0]
         return obj
 
     def __eq__(self, other):
@@ -3698,7 +3915,7 @@
         q.text('}')
 
 class vlan_pcp(OXM):
-    type_len = 0x80000e01
+    type_len = 2147487233
 
     def __init__(self, value=None):
         if value != None:
@@ -3719,9 +3936,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80000e01)
-        obj.value = reader.read('!B')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147487233)
+        obj.value = reader.read("!B")[0]
         return obj
 
     def __eq__(self, other):
@@ -3747,7 +3964,7 @@
         q.text('}')
 
 class vlan_pcp_masked(OXM):
-    type_len = 0x80000f02
+    type_len = 2147487490
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -3773,10 +3990,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80000f02)
-        obj.value = reader.read('!B')[0]
-        obj.value_mask = reader.read('!B')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147487490)
+        obj.value = reader.read("!B")[0]
+        obj.value_mask = reader.read("!B")[0]
         return obj
 
     def __eq__(self, other):
@@ -3806,7 +4023,7 @@
         q.text('}')
 
 class vlan_vid(OXM):
-    type_len = 0x80000c02
+    type_len = 2147486722
 
     def __init__(self, value=None):
         if value != None:
@@ -3827,9 +4044,9 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80000c02)
-        obj.value = reader.read('!H')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147486722)
+        obj.value = reader.read("!H")[0]
         return obj
 
     def __eq__(self, other):
@@ -3855,7 +4072,7 @@
         q.text('}')
 
 class vlan_vid_masked(OXM):
-    type_len = 0x80000d04
+    type_len = 2147486980
 
     def __init__(self, value=None, value_mask=None):
         if value != None:
@@ -3881,10 +4098,10 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _type_len = reader.read('!L')[0]
-        assert(_type_len == 0x80000d04)
-        obj.value = reader.read('!H')[0]
-        obj.value_mask = reader.read('!H')[0]
+        _type_len = reader.read("!L")[0]
+        assert(_type_len == 2147486980)
+        obj.value = reader.read("!H")[0]
+        obj.value_mask = reader.read("!H")[0]
         return obj
 
     def __eq__(self, other):
@@ -3915,6 +4132,10 @@
 
 
 parsers = {
+    258049 : src_meta_id.unpack,
+    258306 : src_meta_id_masked.unpack,
+    258561 : dst_meta_id.unpack,
+    258818 : dst_meta_id_masked.unpack,
     2147483652 : in_port.unpack,
     2147483912 : in_port_masked.unpack,
     2147484164 : in_phy_port.unpack,
