changes from loxigen e8e6401509
diff --git a/src/python/loxi/of12/message.py b/src/python/loxi/of12/message.py
index f5b75e4..76424fe 100644
--- a/src/python/loxi/of12/message.py
+++ b/src/python/loxi/of12/message.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 message.py
 # Do not modify
@@ -20,9 +21,9 @@
     xid = None
 
 class aggregate_stats_reply(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_STATS_REPLY
-    stats_type = const.OFPST_AGGREGATE
+    version = 3
+    type = 19
+    stats_type = 2
 
     def __init__(self, xid=None, flags=None, packet_count=None, byte_count=None, flow_count=None):
         self.xid = xid
@@ -68,19 +69,19 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_STATS_REPLY)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _stats_type = reader.read('!H')[0]
-        assert(_stats_type == const.OFPST_AGGREGATE)
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 19)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _stats_type = reader.read("!H")[0]
+        assert(_stats_type == 2)
+        obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.packet_count = reader.read('!Q')[0]
-        obj.byte_count = reader.read('!Q')[0]
-        obj.flow_count = reader.read('!L')[0]
+        obj.packet_count = reader.read("!Q")[0]
+        obj.byte_count = reader.read("!Q")[0]
+        obj.flow_count = reader.read("!L")[0]
         reader.skip(4)
         return obj
 
@@ -131,9 +132,9 @@
         q.text('}')
 
 class aggregate_stats_request(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_STATS_REQUEST
-    stats_type = const.OFPST_AGGREGATE
+    version = 3
+    type = 18
+    stats_type = 2
 
     def __init__(self, xid=None, flags=None, table_id=None, out_port=None, out_group=None, cookie=None, cookie_mask=None, match=None):
         self.xid = xid
@@ -177,7 +178,7 @@
         packed.append('\x00' * 4)
         packed.append(struct.pack("!B", self.table_id))
         packed.append('\x00' * 3)
-        packed.append(struct.pack("!L", self.out_port))
+        packed.append(util.pack_port_no(self.out_port))
         packed.append(struct.pack("!L", self.out_group))
         packed.append('\x00' * 4)
         packed.append(struct.pack("!Q", self.cookie))
@@ -195,23 +196,23 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_STATS_REQUEST)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _stats_type = reader.read('!H')[0]
-        assert(_stats_type == const.OFPST_AGGREGATE)
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 18)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _stats_type = reader.read("!H")[0]
+        assert(_stats_type == 2)
+        obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.table_id = reader.read('!B')[0]
+        obj.table_id = reader.read("!B")[0]
         reader.skip(3)
-        obj.out_port = reader.read('!L')[0]
-        obj.out_group = reader.read('!L')[0]
+        obj.out_port = util.unpack_port_no(reader)
+        obj.out_group = reader.read("!L")[0]
         reader.skip(4)
-        obj.cookie = reader.read('!Q')[0]
-        obj.cookie_mask = reader.read('!Q')[0]
+        obj.cookie = reader.read("!Q")[0]
+        obj.cookie_mask = reader.read("!Q")[0]
         obj.match = common.match.unpack(reader)
         return obj
 
@@ -274,8 +275,8 @@
         q.text('}')
 
 class barrier_reply(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_BARRIER_REPLY
+    version = 3
+    type = 21
 
     def __init__(self, xid=None):
         self.xid = xid
@@ -298,12 +299,12 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_BARRIER_REPLY)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 21)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
         return obj
 
     def __eq__(self, other):
@@ -337,8 +338,8 @@
         q.text('}')
 
 class barrier_request(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_BARRIER_REQUEST
+    version = 3
+    type = 20
 
     def __init__(self, xid=None):
         self.xid = xid
@@ -361,12 +362,12 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_BARRIER_REQUEST)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 20)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
         return obj
 
     def __eq__(self, other):
@@ -399,10 +400,486 @@
             q.breakable()
         q.text('}')
 
+class bsn_bw_clear_data_reply(Message):
+    version = 3
+    type = 4
+    experimenter = 6035143
+    subtype = 22
+
+    def __init__(self, xid=None, status=None):
+        self.xid = xid
+        if status != None:
+            self.status = status
+        else:
+            self.status = 0
+
+    def pack(self):
+        packed = []
+        packed.append(struct.pack("!B", self.version))
+        packed.append(struct.pack("!B", self.type))
+        packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
+        packed.append(struct.pack("!L", self.xid))
+        packed.append(struct.pack("!L", self.experimenter))
+        packed.append(struct.pack("!L", self.subtype))
+        packed.append(struct.pack("!L", self.status))
+        length = sum([len(x) for x in packed])
+        packed[2] = struct.pack("!H", length)
+        return ''.join(packed)
+
+    @staticmethod
+    def unpack(buf):
+        if len(buf) < 8: raise loxi.ProtocolError("buffer too short to contain an OpenFlow message")
+        obj = bsn_bw_clear_data_reply()
+        if type(buf) == loxi.generic_util.OFReader:
+            reader = buf
+        else:
+            reader = loxi.generic_util.OFReader(buf)
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 4)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _experimenter = reader.read("!L")[0]
+        assert(_experimenter == 6035143)
+        _subtype = reader.read("!L")[0]
+        assert(_subtype == 22)
+        obj.status = reader.read("!L")[0]
+        return obj
+
+    def __eq__(self, other):
+        if type(self) != type(other): return False
+        if self.version != other.version: return False
+        if self.type != other.type: return False
+        if self.xid != other.xid: return False
+        if self.status != other.status: return False
+        return True
+
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
+    def __str__(self):
+        return self.show()
+
+    def show(self):
+        import loxi.pp
+        return loxi.pp.pp(self)
+
+    def pretty_print(self, q):
+        q.text("bsn_bw_clear_data_reply {")
+        with q.group():
+            with q.indent(2):
+                q.breakable()
+                q.text("xid = ");
+                if self.xid != None:
+                    q.text("%#x" % self.xid)
+                else:
+                    q.text('None')
+                q.text(","); q.breakable()
+                q.text("status = ");
+                q.text("%#x" % self.status)
+            q.breakable()
+        q.text('}')
+
+class bsn_bw_clear_data_request(Message):
+    version = 3
+    type = 4
+    experimenter = 6035143
+    subtype = 21
+
+    def __init__(self, xid=None):
+        self.xid = xid
+
+    def pack(self):
+        packed = []
+        packed.append(struct.pack("!B", self.version))
+        packed.append(struct.pack("!B", self.type))
+        packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
+        packed.append(struct.pack("!L", self.xid))
+        packed.append(struct.pack("!L", self.experimenter))
+        packed.append(struct.pack("!L", self.subtype))
+        length = sum([len(x) for x in packed])
+        packed[2] = struct.pack("!H", length)
+        return ''.join(packed)
+
+    @staticmethod
+    def unpack(buf):
+        if len(buf) < 8: raise loxi.ProtocolError("buffer too short to contain an OpenFlow message")
+        obj = bsn_bw_clear_data_request()
+        if type(buf) == loxi.generic_util.OFReader:
+            reader = buf
+        else:
+            reader = loxi.generic_util.OFReader(buf)
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 4)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _experimenter = reader.read("!L")[0]
+        assert(_experimenter == 6035143)
+        _subtype = reader.read("!L")[0]
+        assert(_subtype == 21)
+        return obj
+
+    def __eq__(self, other):
+        if type(self) != type(other): return False
+        if self.version != other.version: return False
+        if self.type != other.type: return False
+        if self.xid != other.xid: return False
+        return True
+
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
+    def __str__(self):
+        return self.show()
+
+    def show(self):
+        import loxi.pp
+        return loxi.pp.pp(self)
+
+    def pretty_print(self, q):
+        q.text("bsn_bw_clear_data_request {")
+        with q.group():
+            with q.indent(2):
+                q.breakable()
+                q.text("xid = ");
+                if self.xid != None:
+                    q.text("%#x" % self.xid)
+                else:
+                    q.text('None')
+            q.breakable()
+        q.text('}')
+
+class bsn_bw_enable_get_reply(Message):
+    version = 3
+    type = 4
+    experimenter = 6035143
+    subtype = 20
+
+    def __init__(self, xid=None, enabled=None):
+        self.xid = xid
+        if enabled != None:
+            self.enabled = enabled
+        else:
+            self.enabled = 0
+
+    def pack(self):
+        packed = []
+        packed.append(struct.pack("!B", self.version))
+        packed.append(struct.pack("!B", self.type))
+        packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
+        packed.append(struct.pack("!L", self.xid))
+        packed.append(struct.pack("!L", self.experimenter))
+        packed.append(struct.pack("!L", self.subtype))
+        packed.append(struct.pack("!L", self.enabled))
+        length = sum([len(x) for x in packed])
+        packed[2] = struct.pack("!H", length)
+        return ''.join(packed)
+
+    @staticmethod
+    def unpack(buf):
+        if len(buf) < 8: raise loxi.ProtocolError("buffer too short to contain an OpenFlow message")
+        obj = bsn_bw_enable_get_reply()
+        if type(buf) == loxi.generic_util.OFReader:
+            reader = buf
+        else:
+            reader = loxi.generic_util.OFReader(buf)
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 4)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _experimenter = reader.read("!L")[0]
+        assert(_experimenter == 6035143)
+        _subtype = reader.read("!L")[0]
+        assert(_subtype == 20)
+        obj.enabled = reader.read("!L")[0]
+        return obj
+
+    def __eq__(self, other):
+        if type(self) != type(other): return False
+        if self.version != other.version: return False
+        if self.type != other.type: return False
+        if self.xid != other.xid: return False
+        if self.enabled != other.enabled: return False
+        return True
+
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
+    def __str__(self):
+        return self.show()
+
+    def show(self):
+        import loxi.pp
+        return loxi.pp.pp(self)
+
+    def pretty_print(self, q):
+        q.text("bsn_bw_enable_get_reply {")
+        with q.group():
+            with q.indent(2):
+                q.breakable()
+                q.text("xid = ");
+                if self.xid != None:
+                    q.text("%#x" % self.xid)
+                else:
+                    q.text('None')
+                q.text(","); q.breakable()
+                q.text("enabled = ");
+                q.text("%#x" % self.enabled)
+            q.breakable()
+        q.text('}')
+
+class bsn_bw_enable_get_request(Message):
+    version = 3
+    type = 4
+    experimenter = 6035143
+    subtype = 19
+
+    def __init__(self, xid=None):
+        self.xid = xid
+
+    def pack(self):
+        packed = []
+        packed.append(struct.pack("!B", self.version))
+        packed.append(struct.pack("!B", self.type))
+        packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
+        packed.append(struct.pack("!L", self.xid))
+        packed.append(struct.pack("!L", self.experimenter))
+        packed.append(struct.pack("!L", self.subtype))
+        length = sum([len(x) for x in packed])
+        packed[2] = struct.pack("!H", length)
+        return ''.join(packed)
+
+    @staticmethod
+    def unpack(buf):
+        if len(buf) < 8: raise loxi.ProtocolError("buffer too short to contain an OpenFlow message")
+        obj = bsn_bw_enable_get_request()
+        if type(buf) == loxi.generic_util.OFReader:
+            reader = buf
+        else:
+            reader = loxi.generic_util.OFReader(buf)
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 4)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _experimenter = reader.read("!L")[0]
+        assert(_experimenter == 6035143)
+        _subtype = reader.read("!L")[0]
+        assert(_subtype == 19)
+        return obj
+
+    def __eq__(self, other):
+        if type(self) != type(other): return False
+        if self.version != other.version: return False
+        if self.type != other.type: return False
+        if self.xid != other.xid: return False
+        return True
+
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
+    def __str__(self):
+        return self.show()
+
+    def show(self):
+        import loxi.pp
+        return loxi.pp.pp(self)
+
+    def pretty_print(self, q):
+        q.text("bsn_bw_enable_get_request {")
+        with q.group():
+            with q.indent(2):
+                q.breakable()
+                q.text("xid = ");
+                if self.xid != None:
+                    q.text("%#x" % self.xid)
+                else:
+                    q.text('None')
+            q.breakable()
+        q.text('}')
+
+class bsn_bw_enable_set_reply(Message):
+    version = 3
+    type = 4
+    experimenter = 6035143
+    subtype = 23
+
+    def __init__(self, xid=None, enable=None, status=None):
+        self.xid = xid
+        if enable != None:
+            self.enable = enable
+        else:
+            self.enable = 0
+        if status != None:
+            self.status = status
+        else:
+            self.status = 0
+
+    def pack(self):
+        packed = []
+        packed.append(struct.pack("!B", self.version))
+        packed.append(struct.pack("!B", self.type))
+        packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
+        packed.append(struct.pack("!L", self.xid))
+        packed.append(struct.pack("!L", self.experimenter))
+        packed.append(struct.pack("!L", self.subtype))
+        packed.append(struct.pack("!L", self.enable))
+        packed.append(struct.pack("!L", self.status))
+        length = sum([len(x) for x in packed])
+        packed[2] = struct.pack("!H", length)
+        return ''.join(packed)
+
+    @staticmethod
+    def unpack(buf):
+        if len(buf) < 8: raise loxi.ProtocolError("buffer too short to contain an OpenFlow message")
+        obj = bsn_bw_enable_set_reply()
+        if type(buf) == loxi.generic_util.OFReader:
+            reader = buf
+        else:
+            reader = loxi.generic_util.OFReader(buf)
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 4)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _experimenter = reader.read("!L")[0]
+        assert(_experimenter == 6035143)
+        _subtype = reader.read("!L")[0]
+        assert(_subtype == 23)
+        obj.enable = reader.read("!L")[0]
+        obj.status = reader.read("!L")[0]
+        return obj
+
+    def __eq__(self, other):
+        if type(self) != type(other): return False
+        if self.version != other.version: return False
+        if self.type != other.type: return False
+        if self.xid != other.xid: return False
+        if self.enable != other.enable: return False
+        if self.status != other.status: return False
+        return True
+
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
+    def __str__(self):
+        return self.show()
+
+    def show(self):
+        import loxi.pp
+        return loxi.pp.pp(self)
+
+    def pretty_print(self, q):
+        q.text("bsn_bw_enable_set_reply {")
+        with q.group():
+            with q.indent(2):
+                q.breakable()
+                q.text("xid = ");
+                if self.xid != None:
+                    q.text("%#x" % self.xid)
+                else:
+                    q.text('None')
+                q.text(","); q.breakable()
+                q.text("enable = ");
+                q.text("%#x" % self.enable)
+                q.text(","); q.breakable()
+                q.text("status = ");
+                q.text("%#x" % self.status)
+            q.breakable()
+        q.text('}')
+
+class bsn_bw_enable_set_request(Message):
+    version = 3
+    type = 4
+    experimenter = 6035143
+    subtype = 18
+
+    def __init__(self, xid=None, enable=None):
+        self.xid = xid
+        if enable != None:
+            self.enable = enable
+        else:
+            self.enable = 0
+
+    def pack(self):
+        packed = []
+        packed.append(struct.pack("!B", self.version))
+        packed.append(struct.pack("!B", self.type))
+        packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
+        packed.append(struct.pack("!L", self.xid))
+        packed.append(struct.pack("!L", self.experimenter))
+        packed.append(struct.pack("!L", self.subtype))
+        packed.append(struct.pack("!L", self.enable))
+        length = sum([len(x) for x in packed])
+        packed[2] = struct.pack("!H", length)
+        return ''.join(packed)
+
+    @staticmethod
+    def unpack(buf):
+        if len(buf) < 8: raise loxi.ProtocolError("buffer too short to contain an OpenFlow message")
+        obj = bsn_bw_enable_set_request()
+        if type(buf) == loxi.generic_util.OFReader:
+            reader = buf
+        else:
+            reader = loxi.generic_util.OFReader(buf)
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 4)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _experimenter = reader.read("!L")[0]
+        assert(_experimenter == 6035143)
+        _subtype = reader.read("!L")[0]
+        assert(_subtype == 18)
+        obj.enable = reader.read("!L")[0]
+        return obj
+
+    def __eq__(self, other):
+        if type(self) != type(other): return False
+        if self.version != other.version: return False
+        if self.type != other.type: return False
+        if self.xid != other.xid: return False
+        if self.enable != other.enable: return False
+        return True
+
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
+    def __str__(self):
+        return self.show()
+
+    def show(self):
+        import loxi.pp
+        return loxi.pp.pp(self)
+
+    def pretty_print(self, q):
+        q.text("bsn_bw_enable_set_request {")
+        with q.group():
+            with q.indent(2):
+                q.breakable()
+                q.text("xid = ");
+                if self.xid != None:
+                    q.text("%#x" % self.xid)
+                else:
+                    q.text('None')
+                q.text(","); q.breakable()
+                q.text("enable = ");
+                q.text("%#x" % self.enable)
+            q.breakable()
+        q.text('}')
+
 class bsn_get_interfaces_reply(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_EXPERIMENTER
-    experimenter = 0x5c16c7
+    version = 3
+    type = 4
+    experimenter = 6035143
     subtype = 10
 
     def __init__(self, xid=None, interfaces=None):
@@ -420,7 +897,7 @@
         packed.append(struct.pack("!L", self.xid))
         packed.append(struct.pack("!L", self.experimenter))
         packed.append(struct.pack("!L", self.subtype))
-        packed.append("".join([x.pack() for x in self.interfaces]))
+        packed.append(util.pack_list(self.interfaces))
         length = sum([len(x) for x in packed])
         packed[2] = struct.pack("!H", length)
         return ''.join(packed)
@@ -433,15 +910,15 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_EXPERIMENTER)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _experimenter = reader.read('!L')[0]
-        assert(_experimenter == 0x5c16c7)
-        _subtype = reader.read('!L')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 4)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _experimenter = reader.read("!L")[0]
+        assert(_experimenter == 6035143)
+        _subtype = reader.read("!L")[0]
         assert(_subtype == 10)
         obj.interfaces = loxi.generic_util.unpack_list(reader, common.bsn_interface.unpack)
         return obj
@@ -481,9 +958,9 @@
         q.text('}')
 
 class bsn_get_interfaces_request(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_EXPERIMENTER
-    experimenter = 0x5c16c7
+    version = 3
+    type = 4
+    experimenter = 6035143
     subtype = 9
 
     def __init__(self, xid=None):
@@ -509,15 +986,15 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_EXPERIMENTER)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _experimenter = reader.read('!L')[0]
-        assert(_experimenter == 0x5c16c7)
-        _subtype = reader.read('!L')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 4)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _experimenter = reader.read("!L")[0]
+        assert(_experimenter == 6035143)
+        _subtype = reader.read("!L")[0]
         assert(_subtype == 9)
         return obj
 
@@ -552,9 +1029,9 @@
         q.text('}')
 
 class bsn_get_mirroring_reply(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_EXPERIMENTER
-    experimenter = 0x5c16c7
+    version = 3
+    type = 4
+    experimenter = 6035143
     subtype = 5
 
     def __init__(self, xid=None, report_mirror_ports=None):
@@ -586,17 +1063,17 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_EXPERIMENTER)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _experimenter = reader.read('!L')[0]
-        assert(_experimenter == 0x5c16c7)
-        _subtype = reader.read('!L')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 4)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _experimenter = reader.read("!L")[0]
+        assert(_experimenter == 6035143)
+        _subtype = reader.read("!L")[0]
         assert(_subtype == 5)
-        obj.report_mirror_ports = reader.read('!B')[0]
+        obj.report_mirror_ports = reader.read("!B")[0]
         reader.skip(3)
         return obj
 
@@ -635,9 +1112,9 @@
         q.text('}')
 
 class bsn_get_mirroring_request(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_EXPERIMENTER
-    experimenter = 0x5c16c7
+    version = 3
+    type = 4
+    experimenter = 6035143
     subtype = 4
 
     def __init__(self, xid=None, report_mirror_ports=None):
@@ -669,17 +1146,17 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_EXPERIMENTER)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _experimenter = reader.read('!L')[0]
-        assert(_experimenter == 0x5c16c7)
-        _subtype = reader.read('!L')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 4)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _experimenter = reader.read("!L")[0]
+        assert(_experimenter == 6035143)
+        _subtype = reader.read("!L")[0]
         assert(_subtype == 4)
-        obj.report_mirror_ports = reader.read('!B')[0]
+        obj.report_mirror_ports = reader.read("!B")[0]
         reader.skip(3)
         return obj
 
@@ -718,9 +1195,9 @@
         q.text('}')
 
 class bsn_set_mirroring(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_EXPERIMENTER
-    experimenter = 0x5c16c7
+    version = 3
+    type = 4
+    experimenter = 6035143
     subtype = 3
 
     def __init__(self, xid=None, report_mirror_ports=None):
@@ -752,17 +1229,17 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_EXPERIMENTER)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _experimenter = reader.read('!L')[0]
-        assert(_experimenter == 0x5c16c7)
-        _subtype = reader.read('!L')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 4)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _experimenter = reader.read("!L")[0]
+        assert(_experimenter == 6035143)
+        _subtype = reader.read("!L")[0]
         assert(_subtype == 3)
-        obj.report_mirror_ports = reader.read('!B')[0]
+        obj.report_mirror_ports = reader.read("!B")[0]
         reader.skip(3)
         return obj
 
@@ -800,10 +1277,91 @@
             q.breakable()
         q.text('}')
 
-class bsn_set_pktin_suppression(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_EXPERIMENTER
-    experimenter = 0x5c16c7
+class bsn_set_pktin_suppression_reply(Message):
+    version = 3
+    type = 4
+    experimenter = 6035143
+    subtype = 25
+
+    def __init__(self, xid=None, status=None):
+        self.xid = xid
+        if status != None:
+            self.status = status
+        else:
+            self.status = 0
+
+    def pack(self):
+        packed = []
+        packed.append(struct.pack("!B", self.version))
+        packed.append(struct.pack("!B", self.type))
+        packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
+        packed.append(struct.pack("!L", self.xid))
+        packed.append(struct.pack("!L", self.experimenter))
+        packed.append(struct.pack("!L", self.subtype))
+        packed.append(struct.pack("!L", self.status))
+        length = sum([len(x) for x in packed])
+        packed[2] = struct.pack("!H", length)
+        return ''.join(packed)
+
+    @staticmethod
+    def unpack(buf):
+        if len(buf) < 8: raise loxi.ProtocolError("buffer too short to contain an OpenFlow message")
+        obj = bsn_set_pktin_suppression_reply()
+        if type(buf) == loxi.generic_util.OFReader:
+            reader = buf
+        else:
+            reader = loxi.generic_util.OFReader(buf)
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 4)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _experimenter = reader.read("!L")[0]
+        assert(_experimenter == 6035143)
+        _subtype = reader.read("!L")[0]
+        assert(_subtype == 25)
+        obj.status = reader.read("!L")[0]
+        return obj
+
+    def __eq__(self, other):
+        if type(self) != type(other): return False
+        if self.version != other.version: return False
+        if self.type != other.type: return False
+        if self.xid != other.xid: return False
+        if self.status != other.status: return False
+        return True
+
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
+    def __str__(self):
+        return self.show()
+
+    def show(self):
+        import loxi.pp
+        return loxi.pp.pp(self)
+
+    def pretty_print(self, q):
+        q.text("bsn_set_pktin_suppression_reply {")
+        with q.group():
+            with q.indent(2):
+                q.breakable()
+                q.text("xid = ");
+                if self.xid != None:
+                    q.text("%#x" % self.xid)
+                else:
+                    q.text('None')
+                q.text(","); q.breakable()
+                q.text("status = ");
+                q.text("%#x" % self.status)
+            q.breakable()
+        q.text('}')
+
+class bsn_set_pktin_suppression_request(Message):
+    version = 3
+    type = 4
+    experimenter = 6035143
     subtype = 11
 
     def __init__(self, xid=None, enabled=None, idle_timeout=None, hard_timeout=None, priority=None, cookie=None):
@@ -850,27 +1408,27 @@
     @staticmethod
     def unpack(buf):
         if len(buf) < 8: raise loxi.ProtocolError("buffer too short to contain an OpenFlow message")
-        obj = bsn_set_pktin_suppression()
+        obj = bsn_set_pktin_suppression_request()
         if type(buf) == loxi.generic_util.OFReader:
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_EXPERIMENTER)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _experimenter = reader.read('!L')[0]
-        assert(_experimenter == 0x5c16c7)
-        _subtype = reader.read('!L')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 4)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _experimenter = reader.read("!L")[0]
+        assert(_experimenter == 6035143)
+        _subtype = reader.read("!L")[0]
         assert(_subtype == 11)
-        obj.enabled = reader.read('!B')[0]
+        obj.enabled = reader.read("!B")[0]
         reader.skip(1)
-        obj.idle_timeout = reader.read('!H')[0]
-        obj.hard_timeout = reader.read('!H')[0]
-        obj.priority = reader.read('!H')[0]
-        obj.cookie = reader.read('!Q')[0]
+        obj.idle_timeout = reader.read("!H")[0]
+        obj.hard_timeout = reader.read("!H")[0]
+        obj.priority = reader.read("!H")[0]
+        obj.cookie = reader.read("!Q")[0]
         return obj
 
     def __eq__(self, other):
@@ -896,7 +1454,7 @@
         return loxi.pp.pp(self)
 
     def pretty_print(self, q):
-        q.text("bsn_set_pktin_suppression {")
+        q.text("bsn_set_pktin_suppression_request {")
         with q.group():
             with q.indent(2):
                 q.breakable()
@@ -923,10 +1481,344 @@
             q.breakable()
         q.text('}')
 
+class bsn_virtual_port_create_reply(Message):
+    version = 3
+    type = 4
+    experimenter = 6035143
+    subtype = 16
+
+    def __init__(self, xid=None, status=None, vport_no=None):
+        self.xid = xid
+        if status != None:
+            self.status = status
+        else:
+            self.status = 0
+        if vport_no != None:
+            self.vport_no = vport_no
+        else:
+            self.vport_no = 0
+
+    def pack(self):
+        packed = []
+        packed.append(struct.pack("!B", self.version))
+        packed.append(struct.pack("!B", self.type))
+        packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
+        packed.append(struct.pack("!L", self.xid))
+        packed.append(struct.pack("!L", self.experimenter))
+        packed.append(struct.pack("!L", self.subtype))
+        packed.append(struct.pack("!L", self.status))
+        packed.append(struct.pack("!L", self.vport_no))
+        length = sum([len(x) for x in packed])
+        packed[2] = struct.pack("!H", length)
+        return ''.join(packed)
+
+    @staticmethod
+    def unpack(buf):
+        if len(buf) < 8: raise loxi.ProtocolError("buffer too short to contain an OpenFlow message")
+        obj = bsn_virtual_port_create_reply()
+        if type(buf) == loxi.generic_util.OFReader:
+            reader = buf
+        else:
+            reader = loxi.generic_util.OFReader(buf)
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 4)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _experimenter = reader.read("!L")[0]
+        assert(_experimenter == 6035143)
+        _subtype = reader.read("!L")[0]
+        assert(_subtype == 16)
+        obj.status = reader.read("!L")[0]
+        obj.vport_no = reader.read("!L")[0]
+        return obj
+
+    def __eq__(self, other):
+        if type(self) != type(other): return False
+        if self.version != other.version: return False
+        if self.type != other.type: return False
+        if self.xid != other.xid: return False
+        if self.status != other.status: return False
+        if self.vport_no != other.vport_no: return False
+        return True
+
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
+    def __str__(self):
+        return self.show()
+
+    def show(self):
+        import loxi.pp
+        return loxi.pp.pp(self)
+
+    def pretty_print(self, q):
+        q.text("bsn_virtual_port_create_reply {")
+        with q.group():
+            with q.indent(2):
+                q.breakable()
+                q.text("xid = ");
+                if self.xid != None:
+                    q.text("%#x" % self.xid)
+                else:
+                    q.text('None')
+                q.text(","); q.breakable()
+                q.text("status = ");
+                q.text("%#x" % self.status)
+                q.text(","); q.breakable()
+                q.text("vport_no = ");
+                q.text("%#x" % self.vport_no)
+            q.breakable()
+        q.text('}')
+
+class bsn_virtual_port_create_request(Message):
+    version = 3
+    type = 4
+    experimenter = 6035143
+    subtype = 15
+
+    def __init__(self, xid=None, vport=None):
+        self.xid = xid
+        if vport != None:
+            self.vport = vport
+        else:
+            self.vport = common.bsn_vport_q_in_q()
+
+    def pack(self):
+        packed = []
+        packed.append(struct.pack("!B", self.version))
+        packed.append(struct.pack("!B", self.type))
+        packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
+        packed.append(struct.pack("!L", self.xid))
+        packed.append(struct.pack("!L", self.experimenter))
+        packed.append(struct.pack("!L", self.subtype))
+        packed.append(self.vport.pack())
+        length = sum([len(x) for x in packed])
+        packed[2] = struct.pack("!H", length)
+        return ''.join(packed)
+
+    @staticmethod
+    def unpack(buf):
+        if len(buf) < 8: raise loxi.ProtocolError("buffer too short to contain an OpenFlow message")
+        obj = bsn_virtual_port_create_request()
+        if type(buf) == loxi.generic_util.OFReader:
+            reader = buf
+        else:
+            reader = loxi.generic_util.OFReader(buf)
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 4)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _experimenter = reader.read("!L")[0]
+        assert(_experimenter == 6035143)
+        _subtype = reader.read("!L")[0]
+        assert(_subtype == 15)
+        obj.vport = common.bsn_vport_q_in_q.unpack(reader)
+        return obj
+
+    def __eq__(self, other):
+        if type(self) != type(other): return False
+        if self.version != other.version: return False
+        if self.type != other.type: return False
+        if self.xid != other.xid: return False
+        if self.vport != other.vport: return False
+        return True
+
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
+    def __str__(self):
+        return self.show()
+
+    def show(self):
+        import loxi.pp
+        return loxi.pp.pp(self)
+
+    def pretty_print(self, q):
+        q.text("bsn_virtual_port_create_request {")
+        with q.group():
+            with q.indent(2):
+                q.breakable()
+                q.text("xid = ");
+                if self.xid != None:
+                    q.text("%#x" % self.xid)
+                else:
+                    q.text('None')
+                q.text(","); q.breakable()
+                q.text("vport = ");
+                q.pp(self.vport)
+            q.breakable()
+        q.text('}')
+
+class bsn_virtual_port_remove_reply(Message):
+    version = 3
+    type = 4
+    experimenter = 6035143
+    subtype = 26
+
+    def __init__(self, xid=None, status=None):
+        self.xid = xid
+        if status != None:
+            self.status = status
+        else:
+            self.status = 0
+
+    def pack(self):
+        packed = []
+        packed.append(struct.pack("!B", self.version))
+        packed.append(struct.pack("!B", self.type))
+        packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
+        packed.append(struct.pack("!L", self.xid))
+        packed.append(struct.pack("!L", self.experimenter))
+        packed.append(struct.pack("!L", self.subtype))
+        packed.append(struct.pack("!L", self.status))
+        length = sum([len(x) for x in packed])
+        packed[2] = struct.pack("!H", length)
+        return ''.join(packed)
+
+    @staticmethod
+    def unpack(buf):
+        if len(buf) < 8: raise loxi.ProtocolError("buffer too short to contain an OpenFlow message")
+        obj = bsn_virtual_port_remove_reply()
+        if type(buf) == loxi.generic_util.OFReader:
+            reader = buf
+        else:
+            reader = loxi.generic_util.OFReader(buf)
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 4)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _experimenter = reader.read("!L")[0]
+        assert(_experimenter == 6035143)
+        _subtype = reader.read("!L")[0]
+        assert(_subtype == 26)
+        obj.status = reader.read("!L")[0]
+        return obj
+
+    def __eq__(self, other):
+        if type(self) != type(other): return False
+        if self.version != other.version: return False
+        if self.type != other.type: return False
+        if self.xid != other.xid: return False
+        if self.status != other.status: return False
+        return True
+
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
+    def __str__(self):
+        return self.show()
+
+    def show(self):
+        import loxi.pp
+        return loxi.pp.pp(self)
+
+    def pretty_print(self, q):
+        q.text("bsn_virtual_port_remove_reply {")
+        with q.group():
+            with q.indent(2):
+                q.breakable()
+                q.text("xid = ");
+                if self.xid != None:
+                    q.text("%#x" % self.xid)
+                else:
+                    q.text('None')
+                q.text(","); q.breakable()
+                q.text("status = ");
+                q.text("%#x" % self.status)
+            q.breakable()
+        q.text('}')
+
+class bsn_virtual_port_remove_request(Message):
+    version = 3
+    type = 4
+    experimenter = 6035143
+    subtype = 17
+
+    def __init__(self, xid=None, vport_no=None):
+        self.xid = xid
+        if vport_no != None:
+            self.vport_no = vport_no
+        else:
+            self.vport_no = 0
+
+    def pack(self):
+        packed = []
+        packed.append(struct.pack("!B", self.version))
+        packed.append(struct.pack("!B", self.type))
+        packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
+        packed.append(struct.pack("!L", self.xid))
+        packed.append(struct.pack("!L", self.experimenter))
+        packed.append(struct.pack("!L", self.subtype))
+        packed.append(struct.pack("!L", self.vport_no))
+        length = sum([len(x) for x in packed])
+        packed[2] = struct.pack("!H", length)
+        return ''.join(packed)
+
+    @staticmethod
+    def unpack(buf):
+        if len(buf) < 8: raise loxi.ProtocolError("buffer too short to contain an OpenFlow message")
+        obj = bsn_virtual_port_remove_request()
+        if type(buf) == loxi.generic_util.OFReader:
+            reader = buf
+        else:
+            reader = loxi.generic_util.OFReader(buf)
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 4)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _experimenter = reader.read("!L")[0]
+        assert(_experimenter == 6035143)
+        _subtype = reader.read("!L")[0]
+        assert(_subtype == 17)
+        obj.vport_no = reader.read("!L")[0]
+        return obj
+
+    def __eq__(self, other):
+        if type(self) != type(other): return False
+        if self.version != other.version: return False
+        if self.type != other.type: return False
+        if self.xid != other.xid: return False
+        if self.vport_no != other.vport_no: return False
+        return True
+
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
+    def __str__(self):
+        return self.show()
+
+    def show(self):
+        import loxi.pp
+        return loxi.pp.pp(self)
+
+    def pretty_print(self, q):
+        q.text("bsn_virtual_port_remove_request {")
+        with q.group():
+            with q.indent(2):
+                q.breakable()
+                q.text("xid = ");
+                if self.xid != None:
+                    q.text("%#x" % self.xid)
+                else:
+                    q.text('None')
+                q.text(","); q.breakable()
+                q.text("vport_no = ");
+                q.text("%#x" % self.vport_no)
+            q.breakable()
+        q.text('}')
+
 class desc_stats_reply(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_STATS_REPLY
-    stats_type = const.OFPST_DESC
+    version = 3
+    type = 19
+    stats_type = 0
 
     def __init__(self, xid=None, flags=None, mfr_desc=None, hw_desc=None, sw_desc=None, serial_num=None, dp_desc=None):
         self.xid = xid
@@ -981,15 +1873,15 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_STATS_REPLY)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _stats_type = reader.read('!H')[0]
-        assert(_stats_type == const.OFPST_DESC)
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 19)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _stats_type = reader.read("!H")[0]
+        assert(_stats_type == 0)
+        obj.flags = reader.read("!H")[0]
         reader.skip(4)
         obj.mfr_desc = reader.read("!256s")[0].rstrip("\x00")
         obj.hw_desc = reader.read("!256s")[0].rstrip("\x00")
@@ -1053,9 +1945,9 @@
         q.text('}')
 
 class desc_stats_request(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_STATS_REQUEST
-    stats_type = const.OFPST_DESC
+    version = 3
+    type = 18
+    stats_type = 0
 
     def __init__(self, xid=None, flags=None):
         self.xid = xid
@@ -1085,15 +1977,15 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_STATS_REQUEST)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _stats_type = reader.read('!H')[0]
-        assert(_stats_type == const.OFPST_DESC)
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 18)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _stats_type = reader.read("!H")[0]
+        assert(_stats_type == 0)
+        obj.flags = reader.read("!H")[0]
         reader.skip(4)
         return obj
 
@@ -1132,15 +2024,15 @@
         q.text('}')
 
 class echo_reply(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_ECHO_REPLY
+    version = 3
+    type = 3
 
     def __init__(self, xid=None, data=None):
         self.xid = xid
         if data != None:
             self.data = data
         else:
-            self.data = ""
+            self.data = ''
 
     def pack(self):
         packed = []
@@ -1161,12 +2053,12 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_ECHO_REPLY)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 3)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
         obj.data = str(reader.read_all())
         return obj
 
@@ -1205,15 +2097,15 @@
         q.text('}')
 
 class echo_request(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_ECHO_REQUEST
+    version = 3
+    type = 2
 
     def __init__(self, xid=None, data=None):
         self.xid = xid
         if data != None:
             self.data = data
         else:
-            self.data = ""
+            self.data = ''
 
     def pack(self):
         packed = []
@@ -1234,12 +2126,12 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_ECHO_REQUEST)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 2)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
         obj.data = str(reader.read_all())
         return obj
 
@@ -1278,8 +2170,8 @@
         q.text('}')
 
 class error_msg(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_ERROR
+    version = 3
+    type = 1
 
     def __init__(self, xid=None, err_type=None, code=None, data=None):
         self.xid = xid
@@ -1294,7 +2186,7 @@
         if data != None:
             self.data = data
         else:
-            self.data = ""
+            self.data = ''
 
     def pack(self):
         packed = []
@@ -1317,14 +2209,14 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_ERROR)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        obj.err_type = reader.read('!H')[0]
-        obj.code = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 1)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        obj.err_type = reader.read("!H")[0]
+        obj.code = reader.read("!H")[0]
         obj.data = str(reader.read_all())
         return obj
 
@@ -1371,9 +2263,9 @@
         q.text('}')
 
 class experimenter_stats_reply(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_STATS_REPLY
-    stats_type = const.OFPST_EXPERIMENTER
+    version = 3
+    type = 19
+    stats_type = 65535
 
     def __init__(self, xid=None, flags=None, experimenter=None, subtype=None, data=None):
         self.xid = xid
@@ -1392,7 +2284,7 @@
         if data != None:
             self.data = data
         else:
-            self.data = ""
+            self.data = ''
 
     def pack(self):
         packed = []
@@ -1418,18 +2310,18 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_STATS_REPLY)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _stats_type = reader.read('!H')[0]
-        assert(_stats_type == const.OFPST_EXPERIMENTER)
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 19)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _stats_type = reader.read("!H")[0]
+        assert(_stats_type == 65535)
+        obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.experimenter = reader.read('!L')[0]
-        obj.subtype = reader.read('!L')[0]
+        obj.experimenter = reader.read("!L")[0]
+        obj.subtype = reader.read("!L")[0]
         obj.data = str(reader.read_all())
         return obj
 
@@ -1480,9 +2372,9 @@
         q.text('}')
 
 class experimenter_stats_request(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_STATS_REQUEST
-    stats_type = const.OFPST_EXPERIMENTER
+    version = 3
+    type = 18
+    stats_type = 65535
 
     def __init__(self, xid=None, flags=None, experimenter=None, subtype=None, data=None):
         self.xid = xid
@@ -1501,7 +2393,7 @@
         if data != None:
             self.data = data
         else:
-            self.data = ""
+            self.data = ''
 
     def pack(self):
         packed = []
@@ -1527,18 +2419,18 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_STATS_REQUEST)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _stats_type = reader.read('!H')[0]
-        assert(_stats_type == const.OFPST_EXPERIMENTER)
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 18)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _stats_type = reader.read("!H")[0]
+        assert(_stats_type == 65535)
+        obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.experimenter = reader.read('!L')[0]
-        obj.subtype = reader.read('!L')[0]
+        obj.experimenter = reader.read("!L")[0]
+        obj.subtype = reader.read("!L")[0]
         obj.data = str(reader.read_all())
         return obj
 
@@ -1589,8 +2481,8 @@
         q.text('}')
 
 class features_reply(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_FEATURES_REPLY
+    version = 3
+    type = 6
 
     def __init__(self, xid=None, datapath_id=None, n_buffers=None, n_tables=None, capabilities=None, reserved=None, ports=None):
         self.xid = xid
@@ -1631,7 +2523,7 @@
         packed.append('\x00' * 3)
         packed.append(struct.pack("!L", self.capabilities))
         packed.append(struct.pack("!L", self.reserved))
-        packed.append("".join([x.pack() for x in self.ports]))
+        packed.append(util.pack_list(self.ports))
         length = sum([len(x) for x in packed])
         packed[2] = struct.pack("!H", length)
         return ''.join(packed)
@@ -1644,18 +2536,18 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_FEATURES_REPLY)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        obj.datapath_id = reader.read('!Q')[0]
-        obj.n_buffers = reader.read('!L')[0]
-        obj.n_tables = reader.read('!B')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 6)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        obj.datapath_id = reader.read("!Q")[0]
+        obj.n_buffers = reader.read("!L")[0]
+        obj.n_tables = reader.read("!B")[0]
         reader.skip(3)
-        obj.capabilities = reader.read('!L')[0]
-        obj.reserved = reader.read('!L')[0]
+        obj.capabilities = reader.read("!L")[0]
+        obj.reserved = reader.read("!L")[0]
         obj.ports = loxi.generic_util.unpack_list(reader, common.port_desc.unpack)
         return obj
 
@@ -1714,8 +2606,8 @@
         q.text('}')
 
 class features_request(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_FEATURES_REQUEST
+    version = 3
+    type = 5
 
     def __init__(self, xid=None):
         self.xid = xid
@@ -1738,12 +2630,12 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_FEATURES_REQUEST)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 5)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
         return obj
 
     def __eq__(self, other):
@@ -1777,9 +2669,9 @@
         q.text('}')
 
 class flow_add(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_FLOW_MOD
-    _command = const.OFPFC_ADD
+    version = 3
+    type = 14
+    _command = 0
 
     def __init__(self, xid=None, cookie=None, cookie_mask=None, table_id=None, idle_timeout=None, hard_timeout=None, priority=None, buffer_id=None, out_port=None, out_group=None, flags=None, match=None, instructions=None):
         self.xid = xid
@@ -1841,17 +2733,17 @@
         packed.append(struct.pack("!Q", self.cookie))
         packed.append(struct.pack("!Q", self.cookie_mask))
         packed.append(struct.pack("!B", self.table_id))
-        packed.append(struct.pack("!B", self._command))
+        packed.append(util.pack_fm_cmd(self._command))
         packed.append(struct.pack("!H", self.idle_timeout))
         packed.append(struct.pack("!H", self.hard_timeout))
         packed.append(struct.pack("!H", self.priority))
         packed.append(struct.pack("!L", self.buffer_id))
-        packed.append(struct.pack("!L", self.out_port))
+        packed.append(util.pack_port_no(self.out_port))
         packed.append(struct.pack("!L", self.out_group))
         packed.append(struct.pack("!H", self.flags))
         packed.append('\x00' * 2)
         packed.append(self.match.pack())
-        packed.append("".join([x.pack() for x in self.instructions]))
+        packed.append(util.pack_list(self.instructions))
         length = sum([len(x) for x in packed])
         packed[2] = struct.pack("!H", length)
         return ''.join(packed)
@@ -1864,24 +2756,24 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_FLOW_MOD)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        obj.cookie = reader.read('!Q')[0]
-        obj.cookie_mask = reader.read('!Q')[0]
-        obj.table_id = reader.read('!B')[0]
-        __command = reader.read('!B')[0]
-        assert(__command == const.OFPFC_ADD)
-        obj.idle_timeout = reader.read('!H')[0]
-        obj.hard_timeout = reader.read('!H')[0]
-        obj.priority = reader.read('!H')[0]
-        obj.buffer_id = reader.read('!L')[0]
-        obj.out_port = reader.read('!L')[0]
-        obj.out_group = reader.read('!L')[0]
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 14)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        obj.cookie = reader.read("!Q")[0]
+        obj.cookie_mask = reader.read("!Q")[0]
+        obj.table_id = reader.read("!B")[0]
+        __command = util.unpack_fm_cmd(reader)
+        assert(__command == 0)
+        obj.idle_timeout = reader.read("!H")[0]
+        obj.hard_timeout = reader.read("!H")[0]
+        obj.priority = reader.read("!H")[0]
+        obj.buffer_id = reader.read("!L")[0]
+        obj.out_port = util.unpack_port_no(reader)
+        obj.out_group = reader.read("!L")[0]
+        obj.flags = reader.read("!H")[0]
         reader.skip(2)
         obj.match = common.match.unpack(reader)
         obj.instructions = instruction.unpack_list(reader)
@@ -1966,9 +2858,9 @@
         q.text('}')
 
 class flow_delete(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_FLOW_MOD
-    _command = const.OFPFC_DELETE
+    version = 3
+    type = 14
+    _command = 3
 
     def __init__(self, xid=None, cookie=None, cookie_mask=None, table_id=None, idle_timeout=None, hard_timeout=None, priority=None, buffer_id=None, out_port=None, out_group=None, flags=None, match=None, instructions=None):
         self.xid = xid
@@ -2030,17 +2922,17 @@
         packed.append(struct.pack("!Q", self.cookie))
         packed.append(struct.pack("!Q", self.cookie_mask))
         packed.append(struct.pack("!B", self.table_id))
-        packed.append(struct.pack("!B", self._command))
+        packed.append(util.pack_fm_cmd(self._command))
         packed.append(struct.pack("!H", self.idle_timeout))
         packed.append(struct.pack("!H", self.hard_timeout))
         packed.append(struct.pack("!H", self.priority))
         packed.append(struct.pack("!L", self.buffer_id))
-        packed.append(struct.pack("!L", self.out_port))
+        packed.append(util.pack_port_no(self.out_port))
         packed.append(struct.pack("!L", self.out_group))
         packed.append(struct.pack("!H", self.flags))
         packed.append('\x00' * 2)
         packed.append(self.match.pack())
-        packed.append("".join([x.pack() for x in self.instructions]))
+        packed.append(util.pack_list(self.instructions))
         length = sum([len(x) for x in packed])
         packed[2] = struct.pack("!H", length)
         return ''.join(packed)
@@ -2053,24 +2945,24 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_FLOW_MOD)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        obj.cookie = reader.read('!Q')[0]
-        obj.cookie_mask = reader.read('!Q')[0]
-        obj.table_id = reader.read('!B')[0]
-        __command = reader.read('!B')[0]
-        assert(__command == const.OFPFC_DELETE)
-        obj.idle_timeout = reader.read('!H')[0]
-        obj.hard_timeout = reader.read('!H')[0]
-        obj.priority = reader.read('!H')[0]
-        obj.buffer_id = reader.read('!L')[0]
-        obj.out_port = reader.read('!L')[0]
-        obj.out_group = reader.read('!L')[0]
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 14)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        obj.cookie = reader.read("!Q")[0]
+        obj.cookie_mask = reader.read("!Q")[0]
+        obj.table_id = reader.read("!B")[0]
+        __command = util.unpack_fm_cmd(reader)
+        assert(__command == 3)
+        obj.idle_timeout = reader.read("!H")[0]
+        obj.hard_timeout = reader.read("!H")[0]
+        obj.priority = reader.read("!H")[0]
+        obj.buffer_id = reader.read("!L")[0]
+        obj.out_port = util.unpack_port_no(reader)
+        obj.out_group = reader.read("!L")[0]
+        obj.flags = reader.read("!H")[0]
         reader.skip(2)
         obj.match = common.match.unpack(reader)
         obj.instructions = instruction.unpack_list(reader)
@@ -2155,9 +3047,9 @@
         q.text('}')
 
 class flow_delete_strict(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_FLOW_MOD
-    _command = const.OFPFC_DELETE_STRICT
+    version = 3
+    type = 14
+    _command = 4
 
     def __init__(self, xid=None, cookie=None, cookie_mask=None, table_id=None, idle_timeout=None, hard_timeout=None, priority=None, buffer_id=None, out_port=None, out_group=None, flags=None, match=None, instructions=None):
         self.xid = xid
@@ -2219,17 +3111,17 @@
         packed.append(struct.pack("!Q", self.cookie))
         packed.append(struct.pack("!Q", self.cookie_mask))
         packed.append(struct.pack("!B", self.table_id))
-        packed.append(struct.pack("!B", self._command))
+        packed.append(util.pack_fm_cmd(self._command))
         packed.append(struct.pack("!H", self.idle_timeout))
         packed.append(struct.pack("!H", self.hard_timeout))
         packed.append(struct.pack("!H", self.priority))
         packed.append(struct.pack("!L", self.buffer_id))
-        packed.append(struct.pack("!L", self.out_port))
+        packed.append(util.pack_port_no(self.out_port))
         packed.append(struct.pack("!L", self.out_group))
         packed.append(struct.pack("!H", self.flags))
         packed.append('\x00' * 2)
         packed.append(self.match.pack())
-        packed.append("".join([x.pack() for x in self.instructions]))
+        packed.append(util.pack_list(self.instructions))
         length = sum([len(x) for x in packed])
         packed[2] = struct.pack("!H", length)
         return ''.join(packed)
@@ -2242,24 +3134,24 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_FLOW_MOD)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        obj.cookie = reader.read('!Q')[0]
-        obj.cookie_mask = reader.read('!Q')[0]
-        obj.table_id = reader.read('!B')[0]
-        __command = reader.read('!B')[0]
-        assert(__command == const.OFPFC_DELETE_STRICT)
-        obj.idle_timeout = reader.read('!H')[0]
-        obj.hard_timeout = reader.read('!H')[0]
-        obj.priority = reader.read('!H')[0]
-        obj.buffer_id = reader.read('!L')[0]
-        obj.out_port = reader.read('!L')[0]
-        obj.out_group = reader.read('!L')[0]
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 14)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        obj.cookie = reader.read("!Q")[0]
+        obj.cookie_mask = reader.read("!Q")[0]
+        obj.table_id = reader.read("!B")[0]
+        __command = util.unpack_fm_cmd(reader)
+        assert(__command == 4)
+        obj.idle_timeout = reader.read("!H")[0]
+        obj.hard_timeout = reader.read("!H")[0]
+        obj.priority = reader.read("!H")[0]
+        obj.buffer_id = reader.read("!L")[0]
+        obj.out_port = util.unpack_port_no(reader)
+        obj.out_group = reader.read("!L")[0]
+        obj.flags = reader.read("!H")[0]
         reader.skip(2)
         obj.match = common.match.unpack(reader)
         obj.instructions = instruction.unpack_list(reader)
@@ -2344,9 +3236,9 @@
         q.text('}')
 
 class flow_modify(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_FLOW_MOD
-    _command = const.OFPFC_MODIFY
+    version = 3
+    type = 14
+    _command = 1
 
     def __init__(self, xid=None, cookie=None, cookie_mask=None, table_id=None, idle_timeout=None, hard_timeout=None, priority=None, buffer_id=None, out_port=None, out_group=None, flags=None, match=None, instructions=None):
         self.xid = xid
@@ -2408,17 +3300,17 @@
         packed.append(struct.pack("!Q", self.cookie))
         packed.append(struct.pack("!Q", self.cookie_mask))
         packed.append(struct.pack("!B", self.table_id))
-        packed.append(struct.pack("!B", self._command))
+        packed.append(util.pack_fm_cmd(self._command))
         packed.append(struct.pack("!H", self.idle_timeout))
         packed.append(struct.pack("!H", self.hard_timeout))
         packed.append(struct.pack("!H", self.priority))
         packed.append(struct.pack("!L", self.buffer_id))
-        packed.append(struct.pack("!L", self.out_port))
+        packed.append(util.pack_port_no(self.out_port))
         packed.append(struct.pack("!L", self.out_group))
         packed.append(struct.pack("!H", self.flags))
         packed.append('\x00' * 2)
         packed.append(self.match.pack())
-        packed.append("".join([x.pack() for x in self.instructions]))
+        packed.append(util.pack_list(self.instructions))
         length = sum([len(x) for x in packed])
         packed[2] = struct.pack("!H", length)
         return ''.join(packed)
@@ -2431,24 +3323,24 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_FLOW_MOD)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        obj.cookie = reader.read('!Q')[0]
-        obj.cookie_mask = reader.read('!Q')[0]
-        obj.table_id = reader.read('!B')[0]
-        __command = reader.read('!B')[0]
-        assert(__command == const.OFPFC_MODIFY)
-        obj.idle_timeout = reader.read('!H')[0]
-        obj.hard_timeout = reader.read('!H')[0]
-        obj.priority = reader.read('!H')[0]
-        obj.buffer_id = reader.read('!L')[0]
-        obj.out_port = reader.read('!L')[0]
-        obj.out_group = reader.read('!L')[0]
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 14)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        obj.cookie = reader.read("!Q")[0]
+        obj.cookie_mask = reader.read("!Q")[0]
+        obj.table_id = reader.read("!B")[0]
+        __command = util.unpack_fm_cmd(reader)
+        assert(__command == 1)
+        obj.idle_timeout = reader.read("!H")[0]
+        obj.hard_timeout = reader.read("!H")[0]
+        obj.priority = reader.read("!H")[0]
+        obj.buffer_id = reader.read("!L")[0]
+        obj.out_port = util.unpack_port_no(reader)
+        obj.out_group = reader.read("!L")[0]
+        obj.flags = reader.read("!H")[0]
         reader.skip(2)
         obj.match = common.match.unpack(reader)
         obj.instructions = instruction.unpack_list(reader)
@@ -2533,9 +3425,9 @@
         q.text('}')
 
 class flow_modify_strict(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_FLOW_MOD
-    _command = const.OFPFC_MODIFY_STRICT
+    version = 3
+    type = 14
+    _command = 2
 
     def __init__(self, xid=None, cookie=None, cookie_mask=None, table_id=None, idle_timeout=None, hard_timeout=None, priority=None, buffer_id=None, out_port=None, out_group=None, flags=None, match=None, instructions=None):
         self.xid = xid
@@ -2597,17 +3489,17 @@
         packed.append(struct.pack("!Q", self.cookie))
         packed.append(struct.pack("!Q", self.cookie_mask))
         packed.append(struct.pack("!B", self.table_id))
-        packed.append(struct.pack("!B", self._command))
+        packed.append(util.pack_fm_cmd(self._command))
         packed.append(struct.pack("!H", self.idle_timeout))
         packed.append(struct.pack("!H", self.hard_timeout))
         packed.append(struct.pack("!H", self.priority))
         packed.append(struct.pack("!L", self.buffer_id))
-        packed.append(struct.pack("!L", self.out_port))
+        packed.append(util.pack_port_no(self.out_port))
         packed.append(struct.pack("!L", self.out_group))
         packed.append(struct.pack("!H", self.flags))
         packed.append('\x00' * 2)
         packed.append(self.match.pack())
-        packed.append("".join([x.pack() for x in self.instructions]))
+        packed.append(util.pack_list(self.instructions))
         length = sum([len(x) for x in packed])
         packed[2] = struct.pack("!H", length)
         return ''.join(packed)
@@ -2620,24 +3512,24 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_FLOW_MOD)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        obj.cookie = reader.read('!Q')[0]
-        obj.cookie_mask = reader.read('!Q')[0]
-        obj.table_id = reader.read('!B')[0]
-        __command = reader.read('!B')[0]
-        assert(__command == const.OFPFC_MODIFY_STRICT)
-        obj.idle_timeout = reader.read('!H')[0]
-        obj.hard_timeout = reader.read('!H')[0]
-        obj.priority = reader.read('!H')[0]
-        obj.buffer_id = reader.read('!L')[0]
-        obj.out_port = reader.read('!L')[0]
-        obj.out_group = reader.read('!L')[0]
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 14)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        obj.cookie = reader.read("!Q")[0]
+        obj.cookie_mask = reader.read("!Q")[0]
+        obj.table_id = reader.read("!B")[0]
+        __command = util.unpack_fm_cmd(reader)
+        assert(__command == 2)
+        obj.idle_timeout = reader.read("!H")[0]
+        obj.hard_timeout = reader.read("!H")[0]
+        obj.priority = reader.read("!H")[0]
+        obj.buffer_id = reader.read("!L")[0]
+        obj.out_port = util.unpack_port_no(reader)
+        obj.out_group = reader.read("!L")[0]
+        obj.flags = reader.read("!H")[0]
         reader.skip(2)
         obj.match = common.match.unpack(reader)
         obj.instructions = instruction.unpack_list(reader)
@@ -2722,8 +3614,8 @@
         q.text('}')
 
 class flow_removed(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_FLOW_REMOVED
+    version = 3
+    type = 11
 
     def __init__(self, xid=None, cookie=None, priority=None, reason=None, table_id=None, duration_sec=None, duration_nsec=None, idle_timeout=None, hard_timeout=None, packet_count=None, byte_count=None, match=None):
         self.xid = xid
@@ -2801,22 +3693,22 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_FLOW_REMOVED)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        obj.cookie = reader.read('!Q')[0]
-        obj.priority = reader.read('!H')[0]
-        obj.reason = reader.read('!B')[0]
-        obj.table_id = reader.read('!B')[0]
-        obj.duration_sec = reader.read('!L')[0]
-        obj.duration_nsec = reader.read('!L')[0]
-        obj.idle_timeout = reader.read('!H')[0]
-        obj.hard_timeout = reader.read('!H')[0]
-        obj.packet_count = reader.read('!Q')[0]
-        obj.byte_count = reader.read('!Q')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 11)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        obj.cookie = reader.read("!Q")[0]
+        obj.priority = reader.read("!H")[0]
+        obj.reason = reader.read("!B")[0]
+        obj.table_id = reader.read("!B")[0]
+        obj.duration_sec = reader.read("!L")[0]
+        obj.duration_nsec = reader.read("!L")[0]
+        obj.idle_timeout = reader.read("!H")[0]
+        obj.hard_timeout = reader.read("!H")[0]
+        obj.packet_count = reader.read("!Q")[0]
+        obj.byte_count = reader.read("!Q")[0]
         obj.match = common.match.unpack(reader)
         return obj
 
@@ -2895,9 +3787,9 @@
         q.text('}')
 
 class flow_stats_reply(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_STATS_REPLY
-    stats_type = const.OFPST_FLOW
+    version = 3
+    type = 19
+    stats_type = 1
 
     def __init__(self, xid=None, flags=None, entries=None):
         self.xid = xid
@@ -2919,7 +3811,7 @@
         packed.append(struct.pack("!H", self.stats_type))
         packed.append(struct.pack("!H", self.flags))
         packed.append('\x00' * 4)
-        packed.append("".join([x.pack() for x in self.entries]))
+        packed.append(util.pack_list(self.entries))
         length = sum([len(x) for x in packed])
         packed[2] = struct.pack("!H", length)
         return ''.join(packed)
@@ -2932,15 +3824,15 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_STATS_REPLY)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _stats_type = reader.read('!H')[0]
-        assert(_stats_type == const.OFPST_FLOW)
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 19)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _stats_type = reader.read("!H")[0]
+        assert(_stats_type == 1)
+        obj.flags = reader.read("!H")[0]
         reader.skip(4)
         obj.entries = common.unpack_list_flow_stats_entry(reader)
         return obj
@@ -2984,9 +3876,9 @@
         q.text('}')
 
 class flow_stats_request(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_STATS_REQUEST
-    stats_type = const.OFPST_FLOW
+    version = 3
+    type = 18
+    stats_type = 1
 
     def __init__(self, xid=None, flags=None, table_id=None, out_port=None, out_group=None, cookie=None, cookie_mask=None, match=None):
         self.xid = xid
@@ -3030,7 +3922,7 @@
         packed.append('\x00' * 4)
         packed.append(struct.pack("!B", self.table_id))
         packed.append('\x00' * 3)
-        packed.append(struct.pack("!L", self.out_port))
+        packed.append(util.pack_port_no(self.out_port))
         packed.append(struct.pack("!L", self.out_group))
         packed.append('\x00' * 4)
         packed.append(struct.pack("!Q", self.cookie))
@@ -3048,23 +3940,23 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_STATS_REQUEST)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _stats_type = reader.read('!H')[0]
-        assert(_stats_type == const.OFPST_FLOW)
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 18)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _stats_type = reader.read("!H")[0]
+        assert(_stats_type == 1)
+        obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.table_id = reader.read('!B')[0]
+        obj.table_id = reader.read("!B")[0]
         reader.skip(3)
-        obj.out_port = reader.read('!L')[0]
-        obj.out_group = reader.read('!L')[0]
+        obj.out_port = util.unpack_port_no(reader)
+        obj.out_group = reader.read("!L")[0]
         reader.skip(4)
-        obj.cookie = reader.read('!Q')[0]
-        obj.cookie_mask = reader.read('!Q')[0]
+        obj.cookie = reader.read("!Q")[0]
+        obj.cookie_mask = reader.read("!Q")[0]
         obj.match = common.match.unpack(reader)
         return obj
 
@@ -3127,8 +4019,8 @@
         q.text('}')
 
 class get_config_reply(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_GET_CONFIG_REPLY
+    version = 3
+    type = 8
 
     def __init__(self, xid=None, flags=None, miss_send_len=None):
         self.xid = xid
@@ -3161,14 +4053,14 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_GET_CONFIG_REPLY)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        obj.flags = reader.read('!H')[0]
-        obj.miss_send_len = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 8)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        obj.flags = reader.read("!H")[0]
+        obj.miss_send_len = reader.read("!H")[0]
         return obj
 
     def __eq__(self, other):
@@ -3210,8 +4102,8 @@
         q.text('}')
 
 class get_config_request(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_GET_CONFIG_REQUEST
+    version = 3
+    type = 7
 
     def __init__(self, xid=None):
         self.xid = xid
@@ -3234,12 +4126,12 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_GET_CONFIG_REQUEST)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 7)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
         return obj
 
     def __eq__(self, other):
@@ -3273,9 +4165,9 @@
         q.text('}')
 
 class group_desc_stats_reply(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_STATS_REPLY
-    stats_type = const.OFPST_GROUP_DESC
+    version = 3
+    type = 19
+    stats_type = 7
 
     def __init__(self, xid=None, flags=None, entries=None):
         self.xid = xid
@@ -3297,7 +4189,7 @@
         packed.append(struct.pack("!H", self.stats_type))
         packed.append(struct.pack("!H", self.flags))
         packed.append('\x00' * 4)
-        packed.append("".join([x.pack() for x in self.entries]))
+        packed.append(util.pack_list(self.entries))
         length = sum([len(x) for x in packed])
         packed[2] = struct.pack("!H", length)
         return ''.join(packed)
@@ -3310,15 +4202,15 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_STATS_REPLY)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _stats_type = reader.read('!H')[0]
-        assert(_stats_type == const.OFPST_GROUP_DESC)
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 19)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _stats_type = reader.read("!H")[0]
+        assert(_stats_type == 7)
+        obj.flags = reader.read("!H")[0]
         reader.skip(4)
         obj.entries = common.unpack_list_group_desc_stats_entry(reader)
         return obj
@@ -3362,9 +4254,9 @@
         q.text('}')
 
 class group_desc_stats_request(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_STATS_REQUEST
-    stats_type = const.OFPST_GROUP_DESC
+    version = 3
+    type = 18
+    stats_type = 7
 
     def __init__(self, xid=None, flags=None):
         self.xid = xid
@@ -3394,15 +4286,15 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_STATS_REQUEST)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _stats_type = reader.read('!H')[0]
-        assert(_stats_type == const.OFPST_GROUP_DESC)
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 18)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _stats_type = reader.read("!H")[0]
+        assert(_stats_type == 7)
+        obj.flags = reader.read("!H")[0]
         reader.skip(4)
         return obj
 
@@ -3441,9 +4333,9 @@
         q.text('}')
 
 class group_features_stats_reply(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_STATS_REPLY
-    stats_type = const.OFPST_GROUP_FEATURES
+    version = 3
+    type = 19
+    stats_type = 8
 
     def __init__(self, xid=None, flags=None, types=None, capabilities=None, max_groups_all=None, max_groups_select=None, max_groups_indirect=None, max_groups_ff=None, actions_all=None, actions_select=None, actions_indirect=None, actions_ff=None):
         self.xid = xid
@@ -3523,26 +4415,26 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_STATS_REPLY)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _stats_type = reader.read('!H')[0]
-        assert(_stats_type == const.OFPST_GROUP_FEATURES)
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 19)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _stats_type = reader.read("!H")[0]
+        assert(_stats_type == 8)
+        obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.types = reader.read('!L')[0]
-        obj.capabilities = reader.read('!L')[0]
-        obj.max_groups_all = reader.read('!L')[0]
-        obj.max_groups_select = reader.read('!L')[0]
-        obj.max_groups_indirect = reader.read('!L')[0]
-        obj.max_groups_ff = reader.read('!L')[0]
-        obj.actions_all = reader.read('!L')[0]
-        obj.actions_select = reader.read('!L')[0]
-        obj.actions_indirect = reader.read('!L')[0]
-        obj.actions_ff = reader.read('!L')[0]
+        obj.types = reader.read("!L")[0]
+        obj.capabilities = reader.read("!L")[0]
+        obj.max_groups_all = reader.read("!L")[0]
+        obj.max_groups_select = reader.read("!L")[0]
+        obj.max_groups_indirect = reader.read("!L")[0]
+        obj.max_groups_ff = reader.read("!L")[0]
+        obj.actions_all = reader.read("!L")[0]
+        obj.actions_select = reader.read("!L")[0]
+        obj.actions_indirect = reader.read("!L")[0]
+        obj.actions_ff = reader.read("!L")[0]
         return obj
 
     def __eq__(self, other):
@@ -3620,9 +4512,9 @@
         q.text('}')
 
 class group_features_stats_request(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_STATS_REQUEST
-    stats_type = const.OFPST_GROUP_FEATURES
+    version = 3
+    type = 18
+    stats_type = 8
 
     def __init__(self, xid=None, flags=None):
         self.xid = xid
@@ -3652,15 +4544,15 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_STATS_REQUEST)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _stats_type = reader.read('!H')[0]
-        assert(_stats_type == const.OFPST_GROUP_FEATURES)
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 18)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _stats_type = reader.read("!H")[0]
+        assert(_stats_type == 8)
+        obj.flags = reader.read("!H")[0]
         reader.skip(4)
         return obj
 
@@ -3699,8 +4591,8 @@
         q.text('}')
 
 class group_mod(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_GROUP_MOD
+    version = 3
+    type = 15
 
     def __init__(self, xid=None, command=None, group_type=None, group_id=None, buckets=None):
         self.xid = xid
@@ -3731,7 +4623,7 @@
         packed.append(struct.pack("!B", self.group_type))
         packed.append('\x00' * 1)
         packed.append(struct.pack("!L", self.group_id))
-        packed.append("".join([x.pack() for x in self.buckets]))
+        packed.append(util.pack_list(self.buckets))
         length = sum([len(x) for x in packed])
         packed[2] = struct.pack("!H", length)
         return ''.join(packed)
@@ -3744,16 +4636,16 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_GROUP_MOD)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        obj.command = reader.read('!H')[0]
-        obj.group_type = reader.read('!B')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 15)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        obj.command = reader.read("!H")[0]
+        obj.group_type = reader.read("!B")[0]
         reader.skip(1)
-        obj.group_id = reader.read('!L')[0]
+        obj.group_id = reader.read("!L")[0]
         obj.buckets = common.unpack_list_bucket(reader)
         return obj
 
@@ -3804,9 +4696,9 @@
         q.text('}')
 
 class group_stats_reply(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_STATS_REPLY
-    stats_type = const.OFPST_GROUP
+    version = 3
+    type = 19
+    stats_type = 6
 
     def __init__(self, xid=None, flags=None, entries=None):
         self.xid = xid
@@ -3828,7 +4720,7 @@
         packed.append(struct.pack("!H", self.stats_type))
         packed.append(struct.pack("!H", self.flags))
         packed.append('\x00' * 4)
-        packed.append("".join([x.pack() for x in self.entries]))
+        packed.append(util.pack_list(self.entries))
         length = sum([len(x) for x in packed])
         packed[2] = struct.pack("!H", length)
         return ''.join(packed)
@@ -3841,15 +4733,15 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_STATS_REPLY)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _stats_type = reader.read('!H')[0]
-        assert(_stats_type == const.OFPST_GROUP)
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 19)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _stats_type = reader.read("!H")[0]
+        assert(_stats_type == 6)
+        obj.flags = reader.read("!H")[0]
         reader.skip(4)
         obj.entries = common.unpack_list_group_stats_entry(reader)
         return obj
@@ -3893,9 +4785,9 @@
         q.text('}')
 
 class group_stats_request(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_STATS_REQUEST
-    stats_type = const.OFPST_GROUP
+    version = 3
+    type = 18
+    stats_type = 6
 
     def __init__(self, xid=None, flags=None, group_id=None):
         self.xid = xid
@@ -3931,17 +4823,17 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_STATS_REQUEST)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _stats_type = reader.read('!H')[0]
-        assert(_stats_type == const.OFPST_GROUP)
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 18)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _stats_type = reader.read("!H")[0]
+        assert(_stats_type == 6)
+        obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.group_id = reader.read('!L')[0]
+        obj.group_id = reader.read("!L")[0]
         reader.skip(4)
         return obj
 
@@ -3984,8 +4876,8 @@
         q.text('}')
 
 class hello(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_HELLO
+    version = 3
+    type = 0
 
     def __init__(self, xid=None):
         self.xid = xid
@@ -4008,12 +4900,12 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_HELLO)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 0)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
         return obj
 
     def __eq__(self, other):
@@ -4047,8 +4939,8 @@
         q.text('}')
 
 class packet_in(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_PACKET_IN
+    version = 3
+    type = 10
 
     def __init__(self, xid=None, buffer_id=None, total_len=None, reason=None, table_id=None, match=None, data=None):
         self.xid = xid
@@ -4075,7 +4967,7 @@
         if data != None:
             self.data = data
         else:
-            self.data = ""
+            self.data = ''
 
     def pack(self):
         packed = []
@@ -4102,16 +4994,16 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_PACKET_IN)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        obj.buffer_id = reader.read('!L')[0]
-        obj.total_len = reader.read('!H')[0]
-        obj.reason = reader.read('!B')[0]
-        obj.table_id = reader.read('!B')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 10)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        obj.buffer_id = reader.read("!L")[0]
+        obj.total_len = reader.read("!H")[0]
+        obj.reason = reader.read("!B")[0]
+        obj.table_id = reader.read("!B")[0]
         obj.match = common.match.unpack(reader)
         reader.skip(2)
         obj.data = str(reader.read_all())
@@ -4172,8 +5064,8 @@
         q.text('}')
 
 class packet_out(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_PACKET_OUT
+    version = 3
+    type = 13
 
     def __init__(self, xid=None, buffer_id=None, in_port=None, actions=None, data=None):
         self.xid = xid
@@ -4192,7 +5084,7 @@
         if data != None:
             self.data = data
         else:
-            self.data = ""
+            self.data = ''
 
     def pack(self):
         packed = []
@@ -4201,10 +5093,10 @@
         packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
         packed.append(struct.pack("!L", self.xid))
         packed.append(struct.pack("!L", self.buffer_id))
-        packed.append(struct.pack("!L", self.in_port))
+        packed.append(util.pack_port_no(self.in_port))
         packed.append(struct.pack("!H", 0)) # placeholder for actions_len at index 6
         packed.append('\x00' * 6)
-        packed.append("".join([x.pack() for x in self.actions]))
+        packed.append(util.pack_list(self.actions))
         packed[6] = struct.pack("!H", len(packed[-1]))
         packed.append(self.data)
         length = sum([len(x) for x in packed])
@@ -4219,15 +5111,15 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_PACKET_OUT)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        obj.buffer_id = reader.read('!L')[0]
-        obj.in_port = reader.read('!L')[0]
-        _actions_len = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 13)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        obj.buffer_id = reader.read("!L")[0]
+        obj.in_port = util.unpack_port_no(reader)
+        _actions_len = reader.read("!H")[0]
         reader.skip(6)
         obj.actions = action.unpack_list(reader.slice(_actions_len))
         obj.data = str(reader.read_all())
@@ -4280,8 +5172,8 @@
         q.text('}')
 
 class port_mod(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_PORT_MOD
+    version = 3
+    type = 16
 
     def __init__(self, xid=None, port_no=None, hw_addr=None, config=None, mask=None, advertise=None):
         self.xid = xid
@@ -4312,7 +5204,7 @@
         packed.append(struct.pack("!B", self.type))
         packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
         packed.append(struct.pack("!L", self.xid))
-        packed.append(struct.pack("!L", self.port_no))
+        packed.append(util.pack_port_no(self.port_no))
         packed.append('\x00' * 4)
         packed.append(struct.pack("!6B", *self.hw_addr))
         packed.append('\x00' * 2)
@@ -4332,19 +5224,19 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_PORT_MOD)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        obj.port_no = reader.read('!L')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 16)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        obj.port_no = util.unpack_port_no(reader)
         reader.skip(4)
         obj.hw_addr = list(reader.read('!6B'))
         reader.skip(2)
-        obj.config = reader.read('!L')[0]
-        obj.mask = reader.read('!L')[0]
-        obj.advertise = reader.read('!L')[0]
+        obj.config = reader.read("!L")[0]
+        obj.mask = reader.read("!L")[0]
+        obj.advertise = reader.read("!L")[0]
         reader.skip(4)
         return obj
 
@@ -4399,9 +5291,9 @@
         q.text('}')
 
 class port_stats_reply(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_STATS_REPLY
-    stats_type = const.OFPST_PORT
+    version = 3
+    type = 19
+    stats_type = 4
 
     def __init__(self, xid=None, flags=None, entries=None):
         self.xid = xid
@@ -4423,7 +5315,7 @@
         packed.append(struct.pack("!H", self.stats_type))
         packed.append(struct.pack("!H", self.flags))
         packed.append('\x00' * 4)
-        packed.append("".join([x.pack() for x in self.entries]))
+        packed.append(util.pack_list(self.entries))
         length = sum([len(x) for x in packed])
         packed[2] = struct.pack("!H", length)
         return ''.join(packed)
@@ -4436,15 +5328,15 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_STATS_REPLY)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _stats_type = reader.read('!H')[0]
-        assert(_stats_type == const.OFPST_PORT)
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 19)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _stats_type = reader.read("!H")[0]
+        assert(_stats_type == 4)
+        obj.flags = reader.read("!H")[0]
         reader.skip(4)
         obj.entries = loxi.generic_util.unpack_list(reader, common.port_stats_entry.unpack)
         return obj
@@ -4488,9 +5380,9 @@
         q.text('}')
 
 class port_stats_request(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_STATS_REQUEST
-    stats_type = const.OFPST_PORT
+    version = 3
+    type = 18
+    stats_type = 4
 
     def __init__(self, xid=None, flags=None, port_no=None):
         self.xid = xid
@@ -4512,7 +5404,7 @@
         packed.append(struct.pack("!H", self.stats_type))
         packed.append(struct.pack("!H", self.flags))
         packed.append('\x00' * 4)
-        packed.append(struct.pack("!L", self.port_no))
+        packed.append(util.pack_port_no(self.port_no))
         packed.append('\x00' * 4)
         length = sum([len(x) for x in packed])
         packed[2] = struct.pack("!H", length)
@@ -4526,17 +5418,17 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_STATS_REQUEST)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _stats_type = reader.read('!H')[0]
-        assert(_stats_type == const.OFPST_PORT)
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 18)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _stats_type = reader.read("!H")[0]
+        assert(_stats_type == 4)
+        obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.port_no = reader.read('!L')[0]
+        obj.port_no = util.unpack_port_no(reader)
         reader.skip(4)
         return obj
 
@@ -4579,8 +5471,8 @@
         q.text('}')
 
 class port_status(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_PORT_STATUS
+    version = 3
+    type = 12
 
     def __init__(self, xid=None, reason=None, desc=None):
         self.xid = xid
@@ -4614,13 +5506,13 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_PORT_STATUS)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        obj.reason = reader.read('!B')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 12)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        obj.reason = reader.read("!B")[0]
         reader.skip(7)
         obj.desc = common.port_desc.unpack(reader)
         return obj
@@ -4664,8 +5556,8 @@
         q.text('}')
 
 class queue_get_config_reply(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_QUEUE_GET_CONFIG_REPLY
+    version = 3
+    type = 23
 
     def __init__(self, xid=None, port=None, queues=None):
         self.xid = xid
@@ -4684,9 +5576,9 @@
         packed.append(struct.pack("!B", self.type))
         packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
         packed.append(struct.pack("!L", self.xid))
-        packed.append(struct.pack("!L", self.port))
+        packed.append(util.pack_port_no(self.port))
         packed.append('\x00' * 4)
-        packed.append("".join([x.pack() for x in self.queues]))
+        packed.append(util.pack_list(self.queues))
         length = sum([len(x) for x in packed])
         packed[2] = struct.pack("!H", length)
         return ''.join(packed)
@@ -4699,13 +5591,13 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_QUEUE_GET_CONFIG_REPLY)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        obj.port = reader.read('!L')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 23)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        obj.port = util.unpack_port_no(reader)
         reader.skip(4)
         obj.queues = common.unpack_list_packet_queue(reader)
         return obj
@@ -4749,8 +5641,8 @@
         q.text('}')
 
 class queue_get_config_request(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_QUEUE_GET_CONFIG_REQUEST
+    version = 3
+    type = 22
 
     def __init__(self, xid=None, port=None):
         self.xid = xid
@@ -4765,7 +5657,7 @@
         packed.append(struct.pack("!B", self.type))
         packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
         packed.append(struct.pack("!L", self.xid))
-        packed.append(struct.pack("!L", self.port))
+        packed.append(util.pack_port_no(self.port))
         packed.append('\x00' * 4)
         length = sum([len(x) for x in packed])
         packed[2] = struct.pack("!H", length)
@@ -4779,13 +5671,13 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_QUEUE_GET_CONFIG_REQUEST)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        obj.port = reader.read('!L')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 22)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        obj.port = util.unpack_port_no(reader)
         reader.skip(4)
         return obj
 
@@ -4824,9 +5716,9 @@
         q.text('}')
 
 class queue_stats_reply(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_STATS_REPLY
-    stats_type = const.OFPST_QUEUE
+    version = 3
+    type = 19
+    stats_type = 5
 
     def __init__(self, xid=None, flags=None, entries=None):
         self.xid = xid
@@ -4848,7 +5740,7 @@
         packed.append(struct.pack("!H", self.stats_type))
         packed.append(struct.pack("!H", self.flags))
         packed.append('\x00' * 4)
-        packed.append("".join([x.pack() for x in self.entries]))
+        packed.append(util.pack_list(self.entries))
         length = sum([len(x) for x in packed])
         packed[2] = struct.pack("!H", length)
         return ''.join(packed)
@@ -4861,15 +5753,15 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_STATS_REPLY)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _stats_type = reader.read('!H')[0]
-        assert(_stats_type == const.OFPST_QUEUE)
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 19)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _stats_type = reader.read("!H")[0]
+        assert(_stats_type == 5)
+        obj.flags = reader.read("!H")[0]
         reader.skip(4)
         obj.entries = loxi.generic_util.unpack_list(reader, common.queue_stats_entry.unpack)
         return obj
@@ -4913,9 +5805,9 @@
         q.text('}')
 
 class queue_stats_request(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_STATS_REQUEST
-    stats_type = const.OFPST_QUEUE
+    version = 3
+    type = 18
+    stats_type = 5
 
     def __init__(self, xid=None, flags=None, port_no=None, queue_id=None):
         self.xid = xid
@@ -4941,7 +5833,7 @@
         packed.append(struct.pack("!H", self.stats_type))
         packed.append(struct.pack("!H", self.flags))
         packed.append('\x00' * 4)
-        packed.append(struct.pack("!L", self.port_no))
+        packed.append(util.pack_port_no(self.port_no))
         packed.append(struct.pack("!L", self.queue_id))
         length = sum([len(x) for x in packed])
         packed[2] = struct.pack("!H", length)
@@ -4955,18 +5847,18 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_STATS_REQUEST)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _stats_type = reader.read('!H')[0]
-        assert(_stats_type == const.OFPST_QUEUE)
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 18)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _stats_type = reader.read("!H")[0]
+        assert(_stats_type == 5)
+        obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.port_no = reader.read('!L')[0]
-        obj.queue_id = reader.read('!L')[0]
+        obj.port_no = util.unpack_port_no(reader)
+        obj.queue_id = reader.read("!L")[0]
         return obj
 
     def __eq__(self, other):
@@ -5012,15 +5904,15 @@
         q.text('}')
 
 class role_reply(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_ROLE_REPLY
+    version = 3
+    type = 25
 
     def __init__(self, xid=None, data=None):
         self.xid = xid
         if data != None:
             self.data = data
         else:
-            self.data = ""
+            self.data = ''
 
     def pack(self):
         packed = []
@@ -5041,12 +5933,12 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_ROLE_REPLY)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 25)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
         obj.data = str(reader.read_all())
         return obj
 
@@ -5085,8 +5977,8 @@
         q.text('}')
 
 class role_request(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_ROLE_REQUEST
+    version = 3
+    type = 24
 
     def __init__(self, xid=None, role=None, generation_id=None):
         self.xid = xid
@@ -5120,15 +6012,15 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_ROLE_REQUEST)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        obj.role = reader.read('!L')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 24)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        obj.role = reader.read("!L")[0]
         reader.skip(4)
-        obj.generation_id = reader.read('!Q')[0]
+        obj.generation_id = reader.read("!Q")[0]
         return obj
 
     def __eq__(self, other):
@@ -5170,8 +6062,8 @@
         q.text('}')
 
 class set_config(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_SET_CONFIG
+    version = 3
+    type = 9
 
     def __init__(self, xid=None, flags=None, miss_send_len=None):
         self.xid = xid
@@ -5204,14 +6096,14 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_SET_CONFIG)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        obj.flags = reader.read('!H')[0]
-        obj.miss_send_len = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 9)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        obj.flags = reader.read("!H")[0]
+        obj.miss_send_len = reader.read("!H")[0]
         return obj
 
     def __eq__(self, other):
@@ -5253,8 +6145,8 @@
         q.text('}')
 
 class table_mod(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_TABLE_MOD
+    version = 3
+    type = 17
 
     def __init__(self, xid=None, table_id=None, config=None):
         self.xid = xid
@@ -5288,15 +6180,15 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_TABLE_MOD)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        obj.table_id = reader.read('!B')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 17)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        obj.table_id = reader.read("!B")[0]
         reader.skip(3)
-        obj.config = reader.read('!L')[0]
+        obj.config = reader.read("!L")[0]
         return obj
 
     def __eq__(self, other):
@@ -5338,9 +6230,9 @@
         q.text('}')
 
 class table_stats_reply(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_STATS_REPLY
-    stats_type = const.OFPST_TABLE
+    version = 3
+    type = 19
+    stats_type = 3
 
     def __init__(self, xid=None, flags=None, entries=None):
         self.xid = xid
@@ -5362,7 +6254,7 @@
         packed.append(struct.pack("!H", self.stats_type))
         packed.append(struct.pack("!H", self.flags))
         packed.append('\x00' * 4)
-        packed.append("".join([x.pack() for x in self.entries]))
+        packed.append(util.pack_list(self.entries))
         length = sum([len(x) for x in packed])
         packed[2] = struct.pack("!H", length)
         return ''.join(packed)
@@ -5375,15 +6267,15 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_STATS_REPLY)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _stats_type = reader.read('!H')[0]
-        assert(_stats_type == const.OFPST_TABLE)
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 19)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _stats_type = reader.read("!H")[0]
+        assert(_stats_type == 3)
+        obj.flags = reader.read("!H")[0]
         reader.skip(4)
         obj.entries = loxi.generic_util.unpack_list(reader, common.table_stats_entry.unpack)
         return obj
@@ -5427,9 +6319,9 @@
         q.text('}')
 
 class table_stats_request(Message):
-    version = const.OFP_VERSION
-    type = const.OFPT_STATS_REQUEST
-    stats_type = const.OFPST_TABLE
+    version = 3
+    type = 18
+    stats_type = 3
 
     def __init__(self, xid=None, flags=None):
         self.xid = xid
@@ -5459,15 +6351,15 @@
             reader = buf
         else:
             reader = loxi.generic_util.OFReader(buf)
-        _version = reader.read('!B')[0]
-        assert(_version == const.OFP_VERSION)
-        _type = reader.read('!B')[0]
-        assert(_type == const.OFPT_STATS_REQUEST)
-        _length = reader.read('!H')[0]
-        obj.xid = reader.read('!L')[0]
-        _stats_type = reader.read('!H')[0]
-        assert(_stats_type == const.OFPST_TABLE)
-        obj.flags = reader.read('!H')[0]
+        _version = reader.read("!B")[0]
+        assert(_version == 3)
+        _type = reader.read("!B")[0]
+        assert(_type == 18)
+        _length = reader.read("!H")[0]
+        obj.xid = reader.read("!L")[0]
+        _stats_type = reader.read("!H")[0]
+        assert(_stats_type == 3)
+        obj.flags = reader.read("!H")[0]
         reader.skip(4)
         return obj
 
@@ -5567,32 +6459,32 @@
         raise loxi.ProtocolError("unexpected experimenter %#x subtype %#x" % (experimenter, subtype))
 
 parsers = {
-    const.OFPT_BARRIER_REPLY : barrier_reply.unpack,
-    const.OFPT_BARRIER_REQUEST : barrier_request.unpack,
-    const.OFPT_ECHO_REPLY : echo_reply.unpack,
-    const.OFPT_ECHO_REQUEST : echo_request.unpack,
-    const.OFPT_ERROR : error_msg.unpack,
-    const.OFPT_EXPERIMENTER : parse_experimenter,
-    const.OFPT_FEATURES_REPLY : features_reply.unpack,
-    const.OFPT_FEATURES_REQUEST : features_request.unpack,
-    const.OFPT_FLOW_MOD : parse_flow_mod,
-    const.OFPT_FLOW_REMOVED : flow_removed.unpack,
-    const.OFPT_GET_CONFIG_REPLY : get_config_reply.unpack,
-    const.OFPT_GET_CONFIG_REQUEST : get_config_request.unpack,
-    const.OFPT_GROUP_MOD : group_mod.unpack,
     const.OFPT_HELLO : hello.unpack,
-    const.OFPT_PACKET_IN : packet_in.unpack,
-    const.OFPT_PACKET_OUT : packet_out.unpack,
-    const.OFPT_PORT_MOD : port_mod.unpack,
-    const.OFPT_PORT_STATUS : port_status.unpack,
-    const.OFPT_QUEUE_GET_CONFIG_REPLY : queue_get_config_reply.unpack,
-    const.OFPT_QUEUE_GET_CONFIG_REQUEST : queue_get_config_request.unpack,
-    const.OFPT_ROLE_REPLY : role_reply.unpack,
-    const.OFPT_ROLE_REQUEST : role_request.unpack,
+    const.OFPT_ERROR : error_msg.unpack,
+    const.OFPT_ECHO_REQUEST : echo_request.unpack,
+    const.OFPT_ECHO_REPLY : echo_reply.unpack,
+    const.OFPT_EXPERIMENTER : parse_experimenter,
+    const.OFPT_FEATURES_REQUEST : features_request.unpack,
+    const.OFPT_FEATURES_REPLY : features_reply.unpack,
+    const.OFPT_GET_CONFIG_REQUEST : get_config_request.unpack,
+    const.OFPT_GET_CONFIG_REPLY : get_config_reply.unpack,
     const.OFPT_SET_CONFIG : set_config.unpack,
-    const.OFPT_STATS_REPLY : parse_stats_reply,
-    const.OFPT_STATS_REQUEST : parse_stats_request,
+    const.OFPT_PACKET_IN : packet_in.unpack,
+    const.OFPT_FLOW_REMOVED : flow_removed.unpack,
+    const.OFPT_PORT_STATUS : port_status.unpack,
+    const.OFPT_PACKET_OUT : packet_out.unpack,
+    const.OFPT_FLOW_MOD : parse_flow_mod,
+    const.OFPT_GROUP_MOD : group_mod.unpack,
+    const.OFPT_PORT_MOD : port_mod.unpack,
     const.OFPT_TABLE_MOD : table_mod.unpack,
+    const.OFPT_STATS_REQUEST : parse_stats_request,
+    const.OFPT_STATS_REPLY : parse_stats_reply,
+    const.OFPT_BARRIER_REQUEST : barrier_request.unpack,
+    const.OFPT_BARRIER_REPLY : barrier_reply.unpack,
+    const.OFPT_QUEUE_GET_CONFIG_REQUEST : queue_get_config_request.unpack,
+    const.OFPT_QUEUE_GET_CONFIG_REPLY : queue_get_config_reply.unpack,
+    const.OFPT_ROLE_REQUEST : role_request.unpack,
+    const.OFPT_ROLE_REPLY : role_reply.unpack,
 }
 
 flow_mod_parsers = {
@@ -5630,4 +6522,23 @@
 }
 
 experimenter_parsers = {
+    6035143 : {
+        22: bsn_bw_clear_data_reply.unpack,
+        21: bsn_bw_clear_data_request.unpack,
+        20: bsn_bw_enable_get_reply.unpack,
+        19: bsn_bw_enable_get_request.unpack,
+        23: bsn_bw_enable_set_reply.unpack,
+        18: bsn_bw_enable_set_request.unpack,
+        10: bsn_get_interfaces_reply.unpack,
+        9: bsn_get_interfaces_request.unpack,
+        5: bsn_get_mirroring_reply.unpack,
+        4: bsn_get_mirroring_request.unpack,
+        3: bsn_set_mirroring.unpack,
+        25: bsn_set_pktin_suppression_reply.unpack,
+        11: bsn_set_pktin_suppression_request.unpack,
+        16: bsn_virtual_port_create_reply.unpack,
+        15: bsn_virtual_port_create_request.unpack,
+        26: bsn_virtual_port_remove_reply.unpack,
+        17: bsn_virtual_port_remove_request.unpack,
+    },
 }