update pyloxi to floodlight/loxigen-artifacts @ cb7d6d4063ed4d311d105e20f0844a54c4bd9916
diff --git a/src/python/loxi/of13/action.py b/src/python/loxi/of13/action.py
index 5c1eda7..5065041 100644
--- a/src/python/loxi/of13/action.py
+++ b/src/python/loxi/of13/action.py
@@ -8,19 +8,12 @@
 
 import struct
 import loxi
-import const
-import bsn_tlv
-import meter_band
-import instruction
-import oxm
-import common
-import instruction_id
-import action
-import message
-import action_id
 import util
 import loxi.generic_util
 
+import sys
+ofp = sys.modules['loxi.of13']
+
 class action(loxi.OFObject):
     subtypes = {}
 
@@ -287,7 +280,7 @@
         _subtype = reader.read("!L")[0]
         assert(_subtype == 5)
         obj.table_id = reader.read("!L")[0]
-        obj.key = loxi.generic_util.unpack_list(reader, bsn_tlv.bsn_tlv.unpack)
+        obj.key = loxi.generic_util.unpack_list(reader, ofp.bsn_tlv.bsn_tlv.unpack)
         return obj
 
     def __eq__(self, other):
@@ -1124,7 +1117,7 @@
         _len = reader.read("!H")[0]
         orig_reader = reader
         reader = orig_reader.slice(_len, 4)
-        obj.field = oxm.oxm.unpack(reader)
+        obj.field = ofp.oxm.oxm.unpack(reader)
         return obj
 
     def __eq__(self, other):
diff --git a/src/python/loxi/of13/action_id.py b/src/python/loxi/of13/action_id.py
index b30383e..b63623e 100644
--- a/src/python/loxi/of13/action_id.py
+++ b/src/python/loxi/of13/action_id.py
@@ -8,19 +8,12 @@
 
 import struct
 import loxi
-import const
-import bsn_tlv
-import meter_band
-import instruction
-import oxm
-import common
-import instruction_id
-import action
-import message
-import action_id
 import util
 import loxi.generic_util
 
+import sys
+ofp = sys.modules['loxi.of13']
+
 class action_id(loxi.OFObject):
     subtypes = {}
 
diff --git a/src/python/loxi/of13/bsn_tlv.py b/src/python/loxi/of13/bsn_tlv.py
index 073d5c4..a1f39e7 100644
--- a/src/python/loxi/of13/bsn_tlv.py
+++ b/src/python/loxi/of13/bsn_tlv.py
@@ -8,19 +8,12 @@
 
 import struct
 import loxi
-import const
-import bsn_tlv
-import meter_band
-import instruction
-import oxm
-import common
-import instruction_id
-import action
-import message
-import action_id
 import util
 import loxi.generic_util
 
+import sys
+ofp = sys.modules['loxi.of13']
+
 class bsn_tlv(loxi.OFObject):
     subtypes = {}
 
@@ -424,7 +417,7 @@
         _length = reader.read("!H")[0]
         orig_reader = reader
         reader = orig_reader.slice(_length, 4)
-        obj.value = loxi.generic_util.unpack_list(reader, bsn_tlv.bsn_tlv.unpack)
+        obj.value = loxi.generic_util.unpack_list(reader, ofp.bsn_tlv.bsn_tlv.unpack)
         return obj
 
     def __eq__(self, other):
@@ -2489,7 +2482,7 @@
         orig_reader = reader
         reader = orig_reader.slice(_length, 4)
         obj.table_id = reader.read("!H")[0]
-        obj.key = loxi.generic_util.unpack_list(reader, bsn_tlv.bsn_tlv.unpack)
+        obj.key = loxi.generic_util.unpack_list(reader, ofp.bsn_tlv.bsn_tlv.unpack)
         return obj
 
     def __eq__(self, other):
@@ -2607,6 +2600,53 @@
 
 bsn_tlv.subtypes[11] = request_packets
 
+class rx_bytes(bsn_tlv):
+    type = 71
+
+    def __init__(self, value=None):
+        if value != None:
+            self.value = value
+        else:
+            self.value = 0
+        return
+
+    def pack(self):
+        packed = []
+        packed.append(struct.pack("!H", self.type))
+        packed.append(struct.pack("!H", 0)) # placeholder for length at index 1
+        packed.append(struct.pack("!Q", self.value))
+        length = sum([len(x) for x in packed])
+        packed[1] = struct.pack("!H", length)
+        return ''.join(packed)
+
+    @staticmethod
+    def unpack(reader):
+        obj = rx_bytes()
+        _type = reader.read("!H")[0]
+        assert(_type == 71)
+        _length = reader.read("!H")[0]
+        orig_reader = reader
+        reader = orig_reader.slice(_length, 4)
+        obj.value = reader.read("!Q")[0]
+        return obj
+
+    def __eq__(self, other):
+        if type(self) != type(other): return False
+        if self.value != other.value: return False
+        return True
+
+    def pretty_print(self, q):
+        q.text("rx_bytes {")
+        with q.group():
+            with q.indent(2):
+                q.breakable()
+                q.text("value = ");
+                q.text("%#x" % self.value)
+            q.breakable()
+        q.text('}')
+
+bsn_tlv.subtypes[71] = rx_bytes
+
 class rx_packets(bsn_tlv):
     type = 2
 
diff --git a/src/python/loxi/of13/common.py b/src/python/loxi/of13/common.py
index 72f6f85..450c9bb 100644
--- a/src/python/loxi/of13/common.py
+++ b/src/python/loxi/of13/common.py
@@ -8,19 +8,12 @@
 
 import struct
 import loxi
-import const
-import bsn_tlv
-import meter_band
-import instruction
-import oxm
-import common
-import instruction_id
-import action
-import message
-import action_id
 import util
 import loxi.generic_util
 
+import sys
+ofp = sys.modules['loxi.of13']
+
 class bsn_controller_connection(loxi.OFObject):
 
     def __init__(self, state=None, auxiliary_id=None, role=None, uri=None):
@@ -250,7 +243,7 @@
         _length = reader.read("!H")[0]
         orig_reader = reader
         reader = orig_reader.slice(_length, 2)
-        obj.tlvs = loxi.generic_util.unpack_list(reader, bsn_tlv.bsn_tlv.unpack)
+        obj.tlvs = loxi.generic_util.unpack_list(reader, ofp.bsn_tlv.bsn_tlv.unpack)
         return obj
 
     def __eq__(self, other):
@@ -416,8 +409,8 @@
         reader = orig_reader.slice(_length, 2)
         _key_length = reader.read("!H")[0]
         obj.checksum = util.unpack_checksum_128(reader)
-        obj.key = loxi.generic_util.unpack_list(reader.slice(_key_length), bsn_tlv.bsn_tlv.unpack)
-        obj.value = loxi.generic_util.unpack_list(reader, bsn_tlv.bsn_tlv.unpack)
+        obj.key = loxi.generic_util.unpack_list(reader.slice(_key_length), ofp.bsn_tlv.bsn_tlv.unpack)
+        obj.value = loxi.generic_util.unpack_list(reader, ofp.bsn_tlv.bsn_tlv.unpack)
         return obj
 
     def __eq__(self, other):
@@ -475,8 +468,8 @@
         orig_reader = reader
         reader = orig_reader.slice(_length, 2)
         _key_length = reader.read("!H")[0]
-        obj.key = loxi.generic_util.unpack_list(reader.slice(_key_length), bsn_tlv.bsn_tlv.unpack)
-        obj.stats = loxi.generic_util.unpack_list(reader, bsn_tlv.bsn_tlv.unpack)
+        obj.key = loxi.generic_util.unpack_list(reader.slice(_key_length), ofp.bsn_tlv.bsn_tlv.unpack)
+        obj.stats = loxi.generic_util.unpack_list(reader, ofp.bsn_tlv.bsn_tlv.unpack)
         return obj
 
     def __eq__(self, other):
@@ -806,7 +799,7 @@
         reader = orig_reader.slice(_length, 2)
         reader.skip(2)
         obj.port_no = util.unpack_port_no(reader)
-        obj.values = loxi.generic_util.unpack_list(reader, common.uint64.unpack)
+        obj.values = loxi.generic_util.unpack_list(reader, ofp.common.uint64.unpack)
         return obj
 
     def __eq__(self, other):
@@ -989,7 +982,7 @@
         reader = orig_reader.slice(_length, 2)
         obj.vlan_vid = reader.read("!H")[0]
         reader.skip(4)
-        obj.values = loxi.generic_util.unpack_list(reader, common.uint64.unpack)
+        obj.values = loxi.generic_util.unpack_list(reader, ofp.common.uint64.unpack)
         return obj
 
     def __eq__(self, other):
@@ -1299,7 +1292,7 @@
         reader = orig_reader.slice(_length, 2)
         reader.skip(2)
         obj.vrf = reader.read("!L")[0]
-        obj.values = loxi.generic_util.unpack_list(reader, common.uint64.unpack)
+        obj.values = loxi.generic_util.unpack_list(reader, ofp.common.uint64.unpack)
         return obj
 
     def __eq__(self, other):
@@ -1365,7 +1358,7 @@
         obj.watch_port = util.unpack_port_no(reader)
         obj.watch_group = reader.read("!L")[0]
         reader.skip(4)
-        obj.actions = loxi.generic_util.unpack_list(reader, action.action.unpack)
+        obj.actions = loxi.generic_util.unpack_list(reader, ofp.action.action.unpack)
         return obj
 
     def __eq__(self, other):
@@ -1488,7 +1481,7 @@
         if match != None:
             self.match = match
         else:
-            self.match = common.match()
+            self.match = ofp.match()
         if instructions != None:
             self.instructions = instructions
         else:
@@ -1534,8 +1527,8 @@
         obj.cookie = reader.read("!Q")[0]
         obj.packet_count = reader.read("!Q")[0]
         obj.byte_count = reader.read("!Q")[0]
-        obj.match = common.match.unpack(reader)
-        obj.instructions = loxi.generic_util.unpack_list(reader, instruction.instruction.unpack)
+        obj.match = ofp.match.unpack(reader)
+        obj.instructions = loxi.generic_util.unpack_list(reader, ofp.instruction.instruction.unpack)
         return obj
 
     def __eq__(self, other):
@@ -1635,7 +1628,7 @@
         obj.group_type = reader.read("!B")[0]
         reader.skip(1)
         obj.group_id = reader.read("!L")[0]
-        obj.buckets = loxi.generic_util.unpack_list(reader, common.bucket.unpack)
+        obj.buckets = loxi.generic_util.unpack_list(reader, ofp.common.bucket.unpack)
         return obj
 
     def __eq__(self, other):
@@ -1725,7 +1718,7 @@
         obj.byte_count = reader.read("!Q")[0]
         obj.duration_sec = reader.read("!L")[0]
         obj.duration_nsec = reader.read("!L")[0]
-        obj.bucket_stats = loxi.generic_util.unpack_list(reader, common.bucket_counter.unpack)
+        obj.bucket_stats = loxi.generic_util.unpack_list(reader, ofp.common.bucket_counter.unpack)
         return obj
 
     def __eq__(self, other):
@@ -1842,7 +1835,7 @@
         _length = reader.read("!H")[0]
         orig_reader = reader
         reader = orig_reader.slice(_length, 4)
-        obj.bitmaps = loxi.generic_util.unpack_list(reader, common.uint32.unpack)
+        obj.bitmaps = loxi.generic_util.unpack_list(reader, ofp.common.uint32.unpack)
         return obj
 
     def __eq__(self, other):
@@ -1890,7 +1883,7 @@
         _length = reader.read("!H")[0]
         orig_reader = reader
         reader = orig_reader.slice(_length, 4)
-        obj.oxm_list = loxi.generic_util.unpack_list(reader, oxm.oxm.unpack)
+        obj.oxm_list = loxi.generic_util.unpack_list(reader, ofp.oxm.oxm.unpack)
         orig_reader.skip_align()
         return obj
 
@@ -1991,7 +1984,7 @@
         reader = orig_reader.slice(_length, 2)
         obj.flags = reader.read("!H")[0]
         obj.meter_id = reader.read("!L")[0]
-        obj.entries = loxi.generic_util.unpack_list(reader, meter_band.meter_band.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.meter_band.meter_band.unpack)
         return obj
 
     def __eq__(self, other):
@@ -2157,7 +2150,7 @@
         obj.byte_in_count = reader.read("!Q")[0]
         obj.duration_sec = reader.read("!L")[0]
         obj.duration_nsec = reader.read("!L")[0]
-        obj.band_stats = loxi.generic_util.unpack_list(reader, common.meter_band_stats.unpack)
+        obj.band_stats = loxi.generic_util.unpack_list(reader, ofp.common.meter_band_stats.unpack)
         return obj
 
     def __eq__(self, other):
@@ -2237,7 +2230,7 @@
         orig_reader = reader
         reader = orig_reader.slice(_len, 10)
         reader.skip(6)
-        obj.properties = loxi.generic_util.unpack_list(reader, common.queue_prop.unpack)
+        obj.properties = loxi.generic_util.unpack_list(reader, ofp.common.queue_prop.unpack)
         return obj
 
     def __eq__(self, other):
@@ -2968,7 +2961,7 @@
         _length = reader.read("!H")[0]
         orig_reader = reader
         reader = orig_reader.slice(_length, 4)
-        obj.action_ids = loxi.generic_util.unpack_list(reader, action_id.action_id.unpack)
+        obj.action_ids = loxi.generic_util.unpack_list(reader, ofp.action_id.action_id.unpack)
         return obj
 
     def __eq__(self, other):
@@ -3015,7 +3008,7 @@
         _length = reader.read("!H")[0]
         orig_reader = reader
         reader = orig_reader.slice(_length, 4)
-        obj.action_ids = loxi.generic_util.unpack_list(reader, action_id.action_id.unpack)
+        obj.action_ids = loxi.generic_util.unpack_list(reader, ofp.action_id.action_id.unpack)
         return obj
 
     def __eq__(self, other):
@@ -3062,7 +3055,7 @@
         _length = reader.read("!H")[0]
         orig_reader = reader
         reader = orig_reader.slice(_length, 4)
-        obj.oxm_ids = loxi.generic_util.unpack_list(reader, common.uint32.unpack)
+        obj.oxm_ids = loxi.generic_util.unpack_list(reader, ofp.common.uint32.unpack)
         return obj
 
     def __eq__(self, other):
@@ -3109,7 +3102,7 @@
         _length = reader.read("!H")[0]
         orig_reader = reader
         reader = orig_reader.slice(_length, 4)
-        obj.oxm_ids = loxi.generic_util.unpack_list(reader, common.uint32.unpack)
+        obj.oxm_ids = loxi.generic_util.unpack_list(reader, ofp.common.uint32.unpack)
         return obj
 
     def __eq__(self, other):
@@ -3298,7 +3291,7 @@
         _length = reader.read("!H")[0]
         orig_reader = reader
         reader = orig_reader.slice(_length, 4)
-        obj.instruction_ids = loxi.generic_util.unpack_list(reader, instruction_id.instruction_id.unpack)
+        obj.instruction_ids = loxi.generic_util.unpack_list(reader, ofp.instruction_id.instruction_id.unpack)
         return obj
 
     def __eq__(self, other):
@@ -3345,7 +3338,7 @@
         _length = reader.read("!H")[0]
         orig_reader = reader
         reader = orig_reader.slice(_length, 4)
-        obj.instruction_ids = loxi.generic_util.unpack_list(reader, instruction_id.instruction_id.unpack)
+        obj.instruction_ids = loxi.generic_util.unpack_list(reader, ofp.instruction_id.instruction_id.unpack)
         return obj
 
     def __eq__(self, other):
@@ -3392,7 +3385,7 @@
         _length = reader.read("!H")[0]
         orig_reader = reader
         reader = orig_reader.slice(_length, 4)
-        obj.oxm_ids = loxi.generic_util.unpack_list(reader, common.uint32.unpack)
+        obj.oxm_ids = loxi.generic_util.unpack_list(reader, ofp.common.uint32.unpack)
         return obj
 
     def __eq__(self, other):
@@ -3439,7 +3432,7 @@
         _length = reader.read("!H")[0]
         orig_reader = reader
         reader = orig_reader.slice(_length, 4)
-        obj.next_table_ids = loxi.generic_util.unpack_list(reader, common.uint8.unpack)
+        obj.next_table_ids = loxi.generic_util.unpack_list(reader, ofp.common.uint8.unpack)
         return obj
 
     def __eq__(self, other):
@@ -3486,7 +3479,7 @@
         _length = reader.read("!H")[0]
         orig_reader = reader
         reader = orig_reader.slice(_length, 4)
-        obj.next_table_ids = loxi.generic_util.unpack_list(reader, common.uint8.unpack)
+        obj.next_table_ids = loxi.generic_util.unpack_list(reader, ofp.common.uint8.unpack)
         return obj
 
     def __eq__(self, other):
@@ -3533,7 +3526,7 @@
         _length = reader.read("!H")[0]
         orig_reader = reader
         reader = orig_reader.slice(_length, 4)
-        obj.oxm_ids = loxi.generic_util.unpack_list(reader, common.uint32.unpack)
+        obj.oxm_ids = loxi.generic_util.unpack_list(reader, ofp.common.uint32.unpack)
         return obj
 
     def __eq__(self, other):
@@ -3580,7 +3573,7 @@
         _length = reader.read("!H")[0]
         orig_reader = reader
         reader = orig_reader.slice(_length, 4)
-        obj.action_ids = loxi.generic_util.unpack_list(reader, action_id.action_id.unpack)
+        obj.action_ids = loxi.generic_util.unpack_list(reader, ofp.action_id.action_id.unpack)
         return obj
 
     def __eq__(self, other):
@@ -3627,7 +3620,7 @@
         _length = reader.read("!H")[0]
         orig_reader = reader
         reader = orig_reader.slice(_length, 4)
-        obj.action_ids = loxi.generic_util.unpack_list(reader, action_id.action_id.unpack)
+        obj.action_ids = loxi.generic_util.unpack_list(reader, ofp.action_id.action_id.unpack)
         return obj
 
     def __eq__(self, other):
@@ -3674,7 +3667,7 @@
         _length = reader.read("!H")[0]
         orig_reader = reader
         reader = orig_reader.slice(_length, 4)
-        obj.oxm_ids = loxi.generic_util.unpack_list(reader, common.uint32.unpack)
+        obj.oxm_ids = loxi.generic_util.unpack_list(reader, ofp.common.uint32.unpack)
         return obj
 
     def __eq__(self, other):
@@ -3721,7 +3714,7 @@
         _length = reader.read("!H")[0]
         orig_reader = reader
         reader = orig_reader.slice(_length, 4)
-        obj.oxm_ids = loxi.generic_util.unpack_list(reader, common.uint32.unpack)
+        obj.oxm_ids = loxi.generic_util.unpack_list(reader, ofp.common.uint32.unpack)
         return obj
 
     def __eq__(self, other):
@@ -3802,7 +3795,7 @@
         obj.metadata_write = reader.read("!Q")[0]
         obj.config = reader.read("!L")[0]
         obj.max_entries = reader.read("!L")[0]
-        obj.properties = loxi.generic_util.unpack_list(reader, common.table_feature_prop.unpack)
+        obj.properties = loxi.generic_util.unpack_list(reader, ofp.common.table_feature_prop.unpack)
         return obj
 
     def __eq__(self, other):
diff --git a/src/python/loxi/of13/instruction.py b/src/python/loxi/of13/instruction.py
index ef537dd..879b246 100644
--- a/src/python/loxi/of13/instruction.py
+++ b/src/python/loxi/of13/instruction.py
@@ -8,19 +8,12 @@
 
 import struct
 import loxi
-import const
-import bsn_tlv
-import meter_band
-import instruction
-import oxm
-import common
-import instruction_id
-import action
-import message
-import action_id
 import util
 import loxi.generic_util
 
+import sys
+ofp = sys.modules['loxi.of13']
+
 class instruction(loxi.OFObject):
     subtypes = {}
 
@@ -97,7 +90,7 @@
         orig_reader = reader
         reader = orig_reader.slice(_len, 4)
         reader.skip(4)
-        obj.actions = loxi.generic_util.unpack_list(reader, action.action.unpack)
+        obj.actions = loxi.generic_util.unpack_list(reader, ofp.action.action.unpack)
         return obj
 
     def __eq__(self, other):
@@ -977,7 +970,7 @@
         orig_reader = reader
         reader = orig_reader.slice(_len, 4)
         reader.skip(4)
-        obj.actions = loxi.generic_util.unpack_list(reader, action.action.unpack)
+        obj.actions = loxi.generic_util.unpack_list(reader, ofp.action.action.unpack)
         return obj
 
     def __eq__(self, other):
diff --git a/src/python/loxi/of13/instruction_id.py b/src/python/loxi/of13/instruction_id.py
index 4207f2a..a6c53a9 100644
--- a/src/python/loxi/of13/instruction_id.py
+++ b/src/python/loxi/of13/instruction_id.py
@@ -8,19 +8,12 @@
 
 import struct
 import loxi
-import const
-import bsn_tlv
-import meter_band
-import instruction
-import oxm
-import common
-import instruction_id
-import action
-import message
-import action_id
 import util
 import loxi.generic_util
 
+import sys
+ofp = sys.modules['loxi.of13']
+
 class instruction_id(loxi.OFObject):
     subtypes = {}
 
diff --git a/src/python/loxi/of13/message.py b/src/python/loxi/of13/message.py
index 85db91d..269d5a2 100644
--- a/src/python/loxi/of13/message.py
+++ b/src/python/loxi/of13/message.py
@@ -8,19 +8,12 @@
 
 import struct
 import loxi
-import const
-import bsn_tlv
-import meter_band
-import instruction
-import oxm
-import common
-import instruction_id
-import action
-import message
-import action_id
 import util
 import loxi.generic_util
 
+import sys
+ofp = sys.modules['loxi.of13']
+
 class message(loxi.OFObject):
     subtypes = {}
 
@@ -383,7 +376,7 @@
         if match != None:
             self.match = match
         else:
-            self.match = common.match()
+            self.match = ofp.match()
         return
 
     def pack(self):
@@ -429,7 +422,7 @@
         reader.skip(4)
         obj.cookie = reader.read("!Q")[0]
         obj.cookie_mask = reader.read("!Q")[0]
-        obj.match = common.match.unpack(reader)
+        obj.match = ofp.match.unpack(reader)
         return obj
 
     def __eq__(self, other):
@@ -2021,7 +2014,7 @@
         assert(_experimenter == 6035143)
         _subtype = reader.read("!L")[0]
         assert(_subtype == 57)
-        obj.connections = loxi.generic_util.unpack_list(reader, common.bsn_controller_connection.unpack)
+        obj.connections = loxi.generic_util.unpack_list(reader, ofp.common.bsn_controller_connection.unpack)
         return obj
 
     def __eq__(self, other):
@@ -2349,7 +2342,7 @@
         assert(_experimenter == 6035143)
         _subtype = reader.read("!L")[0]
         assert(_subtype == 13)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.bsn_debug_counter_desc_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.bsn_debug_counter_desc_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -2697,7 +2690,7 @@
         assert(_experimenter == 6035143)
         _subtype = reader.read("!L")[0]
         assert(_subtype == 12)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.bsn_debug_counter_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.bsn_debug_counter_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -2863,7 +2856,7 @@
         assert(_experimenter == 6035143)
         _subtype = reader.read("!L")[0]
         assert(_subtype == 10)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.bsn_flow_checksum_bucket_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.bsn_flow_checksum_bucket_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -3008,7 +3001,7 @@
         if match != None:
             self.match = match
         else:
-            self.match = common.match()
+            self.match = ofp.match()
         return
 
     def pack(self):
@@ -3047,7 +3040,7 @@
         obj.priority = reader.read("!H")[0]
         obj.table_id = reader.read("!B")[0]
         reader.skip(5)
-        obj.match = common.match.unpack(reader)
+        obj.match = ofp.match.unpack(reader)
         return obj
 
     def __eq__(self, other):
@@ -3431,7 +3424,7 @@
         assert(_experimenter == 6035143)
         _subtype = reader.read("!L")[0]
         assert(_subtype == 16)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.bsn_generic_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.bsn_generic_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -3525,7 +3518,7 @@
         _subtype = reader.read("!L")[0]
         assert(_subtype == 16)
         obj.name = reader.read("!64s")[0].rstrip("\x00")
-        obj.tlvs = loxi.generic_util.unpack_list(reader, bsn_tlv.bsn_tlv.unpack)
+        obj.tlvs = loxi.generic_util.unpack_list(reader, ofp.bsn_tlv.bsn_tlv.unpack)
         return obj
 
     def __eq__(self, other):
@@ -3617,7 +3610,7 @@
         assert(_experimenter == 6035143)
         _subtype = reader.read("!L")[0]
         assert(_subtype == 5)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.bsn_gentable_bucket_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.bsn_gentable_bucket_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -3981,7 +3974,7 @@
         assert(_experimenter == 6035143)
         _subtype = reader.read("!L")[0]
         assert(_subtype == 4)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.bsn_gentable_desc_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.bsn_gentable_desc_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -4155,8 +4148,8 @@
         obj.table_id = reader.read("!H")[0]
         _key_length = reader.read("!H")[0]
         obj.checksum = util.unpack_checksum_128(reader)
-        obj.key = loxi.generic_util.unpack_list(reader.slice(_key_length), bsn_tlv.bsn_tlv.unpack)
-        obj.value = loxi.generic_util.unpack_list(reader, bsn_tlv.bsn_tlv.unpack)
+        obj.key = loxi.generic_util.unpack_list(reader.slice(_key_length), ofp.bsn_tlv.bsn_tlv.unpack)
+        obj.value = loxi.generic_util.unpack_list(reader, ofp.bsn_tlv.bsn_tlv.unpack)
         return obj
 
     def __eq__(self, other):
@@ -4246,7 +4239,7 @@
         _subtype = reader.read("!L")[0]
         assert(_subtype == 47)
         obj.table_id = reader.read("!H")[0]
-        obj.key = loxi.generic_util.unpack_list(reader, bsn_tlv.bsn_tlv.unpack)
+        obj.key = loxi.generic_util.unpack_list(reader, ofp.bsn_tlv.bsn_tlv.unpack)
         return obj
 
     def __eq__(self, other):
@@ -4334,7 +4327,7 @@
         assert(_experimenter == 6035143)
         _subtype = reader.read("!L")[0]
         assert(_subtype == 2)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.bsn_gentable_entry_desc_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.bsn_gentable_entry_desc_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -4532,7 +4525,7 @@
         assert(_experimenter == 6035143)
         _subtype = reader.read("!L")[0]
         assert(_subtype == 3)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.bsn_gentable_entry_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.bsn_gentable_entry_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -4814,7 +4807,7 @@
         assert(_experimenter == 6035143)
         _subtype = reader.read("!L")[0]
         assert(_subtype == 7)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.bsn_gentable_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.bsn_gentable_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -4968,7 +4961,7 @@
         assert(_experimenter == 6035143)
         _subtype = reader.read("!L")[0]
         assert(_subtype == 10)
-        obj.interfaces = loxi.generic_util.unpack_list(reader, common.bsn_interface.unpack)
+        obj.interfaces = loxi.generic_util.unpack_list(reader, ofp.common.bsn_interface.unpack)
         return obj
 
     def __eq__(self, other):
@@ -5756,7 +5749,7 @@
         assert(_experimenter == 6035143)
         _subtype = reader.read("!L")[0]
         assert(_subtype == 1)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.bsn_lacp_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.bsn_lacp_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -6786,7 +6779,7 @@
         assert(_experimenter == 6035143)
         _subtype = reader.read("!L")[0]
         assert(_subtype == 8)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.bsn_port_counter_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.bsn_port_counter_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -7830,7 +7823,7 @@
         assert(_experimenter == 6035143)
         _subtype = reader.read("!L")[0]
         assert(_subtype == 6)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.bsn_switch_pipeline_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.bsn_switch_pipeline_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -7996,7 +7989,7 @@
         assert(_experimenter == 6035143)
         _subtype = reader.read("!L")[0]
         assert(_subtype == 11)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.bsn_table_checksum_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.bsn_table_checksum_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -8421,7 +8414,7 @@
         if vport != None:
             self.vport = vport
         else:
-            self.vport = common.bsn_vport()
+            self.vport = ofp.bsn_vport()
         return
 
     def pack(self):
@@ -8452,7 +8445,7 @@
         assert(_experimenter == 6035143)
         _subtype = reader.read("!L")[0]
         assert(_subtype == 15)
-        obj.vport = common.bsn_vport.unpack(reader)
+        obj.vport = ofp.bsn_vport.unpack(reader)
         return obj
 
     def __eq__(self, other):
@@ -8680,7 +8673,7 @@
         assert(_experimenter == 6035143)
         _subtype = reader.read("!L")[0]
         assert(_subtype == 9)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.bsn_vlan_counter_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.bsn_vlan_counter_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -8856,7 +8849,7 @@
         assert(_experimenter == 6035143)
         _subtype = reader.read("!L")[0]
         assert(_subtype == 15)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.bsn_vrf_counter_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.bsn_vrf_counter_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -9609,7 +9602,7 @@
         if match != None:
             self.match = match
         else:
-            self.match = common.match()
+            self.match = ofp.match()
         if instructions != None:
             self.instructions = instructions
         else:
@@ -9668,8 +9661,8 @@
         obj.out_group = reader.read("!L")[0]
         obj.flags = reader.read("!H")[0]
         reader.skip(2)
-        obj.match = common.match.unpack(reader)
-        obj.instructions = loxi.generic_util.unpack_list(reader, instruction.instruction.unpack)
+        obj.match = ofp.match.unpack(reader)
+        obj.instructions = loxi.generic_util.unpack_list(reader, ofp.instruction.instruction.unpack)
         return obj
 
     def __eq__(self, other):
@@ -9794,7 +9787,7 @@
         if match != None:
             self.match = match
         else:
-            self.match = common.match()
+            self.match = ofp.match()
         if instructions != None:
             self.instructions = instructions
         else:
@@ -9849,8 +9842,8 @@
         obj.out_group = reader.read("!L")[0]
         obj.flags = reader.read("!H")[0]
         reader.skip(2)
-        obj.match = common.match.unpack(reader)
-        obj.instructions = loxi.generic_util.unpack_list(reader, instruction.instruction.unpack)
+        obj.match = ofp.match.unpack(reader)
+        obj.instructions = loxi.generic_util.unpack_list(reader, ofp.instruction.instruction.unpack)
         return obj
 
     def __eq__(self, other):
@@ -9974,7 +9967,7 @@
         if match != None:
             self.match = match
         else:
-            self.match = common.match()
+            self.match = ofp.match()
         if instructions != None:
             self.instructions = instructions
         else:
@@ -10029,8 +10022,8 @@
         obj.out_group = reader.read("!L")[0]
         obj.flags = reader.read("!H")[0]
         reader.skip(2)
-        obj.match = common.match.unpack(reader)
-        obj.instructions = loxi.generic_util.unpack_list(reader, instruction.instruction.unpack)
+        obj.match = ofp.match.unpack(reader)
+        obj.instructions = loxi.generic_util.unpack_list(reader, ofp.instruction.instruction.unpack)
         return obj
 
     def __eq__(self, other):
@@ -10154,7 +10147,7 @@
         if match != None:
             self.match = match
         else:
-            self.match = common.match()
+            self.match = ofp.match()
         if instructions != None:
             self.instructions = instructions
         else:
@@ -10209,8 +10202,8 @@
         obj.out_group = reader.read("!L")[0]
         obj.flags = reader.read("!H")[0]
         reader.skip(2)
-        obj.match = common.match.unpack(reader)
-        obj.instructions = loxi.generic_util.unpack_list(reader, instruction.instruction.unpack)
+        obj.match = ofp.match.unpack(reader)
+        obj.instructions = loxi.generic_util.unpack_list(reader, ofp.instruction.instruction.unpack)
         return obj
 
     def __eq__(self, other):
@@ -10412,7 +10405,7 @@
         if match != None:
             self.match = match
         else:
-            self.match = common.match()
+            self.match = ofp.match()
         if instructions != None:
             self.instructions = instructions
         else:
@@ -10467,8 +10460,8 @@
         obj.out_group = reader.read("!L")[0]
         obj.flags = reader.read("!H")[0]
         reader.skip(2)
-        obj.match = common.match.unpack(reader)
-        obj.instructions = loxi.generic_util.unpack_list(reader, instruction.instruction.unpack)
+        obj.match = ofp.match.unpack(reader)
+        obj.instructions = loxi.generic_util.unpack_list(reader, ofp.instruction.instruction.unpack)
         return obj
 
     def __eq__(self, other):
@@ -10592,7 +10585,7 @@
         if match != None:
             self.match = match
         else:
-            self.match = common.match()
+            self.match = ofp.match()
         if instructions != None:
             self.instructions = instructions
         else:
@@ -10647,8 +10640,8 @@
         obj.out_group = reader.read("!L")[0]
         obj.flags = reader.read("!H")[0]
         reader.skip(2)
-        obj.match = common.match.unpack(reader)
-        obj.instructions = loxi.generic_util.unpack_list(reader, instruction.instruction.unpack)
+        obj.match = ofp.match.unpack(reader)
+        obj.instructions = loxi.generic_util.unpack_list(reader, ofp.instruction.instruction.unpack)
         return obj
 
     def __eq__(self, other):
@@ -10771,7 +10764,7 @@
         if match != None:
             self.match = match
         else:
-            self.match = common.match()
+            self.match = ofp.match()
         return
 
     def pack(self):
@@ -10816,7 +10809,7 @@
         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)
+        obj.match = ofp.match.unpack(reader)
         return obj
 
     def __eq__(self, other):
@@ -10932,7 +10925,7 @@
         assert(_stats_type == 1)
         obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.flow_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.flow_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -11000,7 +10993,7 @@
         if match != None:
             self.match = match
         else:
-            self.match = common.match()
+            self.match = ofp.match()
         return
 
     def pack(self):
@@ -11046,7 +11039,7 @@
         reader.skip(4)
         obj.cookie = reader.read("!Q")[0]
         obj.cookie_mask = reader.read("!Q")[0]
-        obj.match = common.match.unpack(reader)
+        obj.match = ofp.match.unpack(reader)
         return obj
 
     def __eq__(self, other):
@@ -11289,7 +11282,7 @@
         obj.group_type = reader.read("!B")[0]
         reader.skip(1)
         obj.group_id = reader.read("!L")[0]
-        obj.buckets = loxi.generic_util.unpack_list(reader, common.bucket.unpack)
+        obj.buckets = loxi.generic_util.unpack_list(reader, ofp.common.bucket.unpack)
         return obj
 
     def __eq__(self, other):
@@ -11380,7 +11373,7 @@
         obj.group_type = reader.read("!B")[0]
         reader.skip(1)
         obj.group_id = reader.read("!L")[0]
-        obj.buckets = loxi.generic_util.unpack_list(reader, common.bucket.unpack)
+        obj.buckets = loxi.generic_util.unpack_list(reader, ofp.common.bucket.unpack)
         return obj
 
     def __eq__(self, other):
@@ -11470,7 +11463,7 @@
         obj.group_type = reader.read("!B")[0]
         reader.skip(1)
         obj.group_id = reader.read("!L")[0]
-        obj.buckets = loxi.generic_util.unpack_list(reader, common.bucket.unpack)
+        obj.buckets = loxi.generic_util.unpack_list(reader, ofp.common.bucket.unpack)
         return obj
 
     def __eq__(self, other):
@@ -11554,7 +11547,7 @@
         assert(_stats_type == 7)
         obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.group_desc_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.group_desc_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -12028,7 +12021,7 @@
         obj.group_type = reader.read("!B")[0]
         reader.skip(1)
         obj.group_id = reader.read("!L")[0]
-        obj.buckets = loxi.generic_util.unpack_list(reader, common.bucket.unpack)
+        obj.buckets = loxi.generic_util.unpack_list(reader, ofp.common.bucket.unpack)
         return obj
 
     def __eq__(self, other):
@@ -12112,7 +12105,7 @@
         assert(_stats_type == 6)
         obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.group_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.group_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -12262,7 +12255,7 @@
         orig_reader = reader
         reader = orig_reader.slice(_length, 4)
         obj.xid = reader.read("!L")[0]
-        obj.elements = loxi.generic_util.unpack_list(reader, common.hello_elem.unpack)
+        obj.elements = loxi.generic_util.unpack_list(reader, ofp.common.hello_elem.unpack)
         return obj
 
     def __eq__(self, other):
@@ -12416,7 +12409,7 @@
         assert(_stats_type == 10)
         obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.entries = loxi.generic_util.unpack_list(reader, meter_band.meter_band.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.meter_band.meter_band.unpack)
         return obj
 
     def __eq__(self, other):
@@ -12546,7 +12539,7 @@
         if features != None:
             self.features = features
         else:
-            self.features = common.meter_features()
+            self.features = ofp.meter_features()
         return
 
     def pack(self):
@@ -12578,7 +12571,7 @@
         assert(_stats_type == 11)
         obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.features = common.meter_features.unpack(reader)
+        obj.features = ofp.meter_features.unpack(reader)
         return obj
 
     def __eq__(self, other):
@@ -12734,7 +12727,7 @@
         obj.command = reader.read("!H")[0]
         obj.flags = reader.read("!H")[0]
         obj.meter_id = reader.read("!L")[0]
-        obj.meters = loxi.generic_util.unpack_list(reader, meter_band.meter_band.unpack)
+        obj.meters = loxi.generic_util.unpack_list(reader, ofp.meter_band.meter_band.unpack)
         return obj
 
     def __eq__(self, other):
@@ -12900,7 +12893,7 @@
         assert(_stats_type == 9)
         obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.meter_stats.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.meter_stats.unpack)
         return obj
 
     def __eq__(self, other):
@@ -13117,7 +13110,7 @@
         if match != None:
             self.match = match
         else:
-            self.match = common.match()
+            self.match = ofp.match()
         if data != None:
             self.data = data
         else:
@@ -13158,7 +13151,7 @@
         obj.reason = reader.read("!B")[0]
         obj.table_id = reader.read("!B")[0]
         obj.cookie = reader.read("!Q")[0]
-        obj.match = common.match.unpack(reader)
+        obj.match = ofp.match.unpack(reader)
         reader.skip(2)
         obj.data = str(reader.read_all())
         return obj
@@ -13270,7 +13263,7 @@
         obj.in_port = util.unpack_port_no(reader)
         _actions_len = reader.read("!H")[0]
         reader.skip(6)
-        obj.actions = loxi.generic_util.unpack_list(reader.slice(_actions_len), action.action.unpack)
+        obj.actions = loxi.generic_util.unpack_list(reader.slice(_actions_len), ofp.action.action.unpack)
         obj.data = str(reader.read_all())
         return obj
 
@@ -13359,7 +13352,7 @@
         assert(_stats_type == 13)
         obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.port_desc.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.port_desc.unpack)
         return obj
 
     def __eq__(self, other):
@@ -13697,7 +13690,7 @@
         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)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.port_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -13826,7 +13819,7 @@
         if desc != None:
             self.desc = desc
         else:
-            self.desc = common.port_desc()
+            self.desc = ofp.port_desc()
         return
 
     def pack(self):
@@ -13855,7 +13848,7 @@
         obj.xid = reader.read("!L")[0]
         obj.reason = reader.read("!B")[0]
         reader.skip(7)
-        obj.desc = common.port_desc.unpack(reader)
+        obj.desc = ofp.port_desc.unpack(reader)
         return obj
 
     def __eq__(self, other):
@@ -13931,7 +13924,7 @@
         obj.xid = reader.read("!L")[0]
         obj.port = util.unpack_port_no(reader)
         reader.skip(4)
-        obj.queues = loxi.generic_util.unpack_list(reader, common.packet_queue.unpack)
+        obj.queues = loxi.generic_util.unpack_list(reader, ofp.common.packet_queue.unpack)
         return obj
 
     def __eq__(self, other):
@@ -14155,7 +14148,7 @@
         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)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.queue_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -14785,7 +14778,7 @@
         assert(_stats_type == 12)
         obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.table_features.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.table_features.unpack)
         return obj
 
     def __eq__(self, other):
@@ -14865,7 +14858,7 @@
         assert(_stats_type == 12)
         obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.table_features.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.table_features.unpack)
         return obj
 
     def __eq__(self, other):
@@ -15099,7 +15092,7 @@
         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)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.table_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -15208,8 +15201,8 @@
 
 def parse_message(buf):
     msg_ver, msg_type, msg_len, msg_xid = parse_header(buf)
-    if msg_ver != const.OFP_VERSION and msg_type != const.OFPT_HELLO:
-        raise loxi.ProtocolError("wrong OpenFlow version (expected %d, got %d)" % (const.OFP_VERSION, msg_ver))
+    if msg_ver != ofp.OFP_VERSION and msg_type != ofp.OFPT_HELLO:
+        raise loxi.ProtocolError("wrong OpenFlow version (expected %d, got %d)" % (ofp.OFP_VERSION, msg_ver))
     if len(buf) != msg_len:
         raise loxi.ProtocolError("incorrect message size")
     return message.unpack(loxi.generic_util.OFReader(buf))
diff --git a/src/python/loxi/of13/meter_band.py b/src/python/loxi/of13/meter_band.py
index 8efba54..d21b7d0 100644
--- a/src/python/loxi/of13/meter_band.py
+++ b/src/python/loxi/of13/meter_band.py
@@ -8,19 +8,12 @@
 
 import struct
 import loxi
-import const
-import bsn_tlv
-import meter_band
-import instruction
-import oxm
-import common
-import instruction_id
-import action
-import message
-import action_id
 import util
 import loxi.generic_util
 
+import sys
+ofp = sys.modules['loxi.of13']
+
 class meter_band(loxi.OFObject):
     subtypes = {}
 
diff --git a/src/python/loxi/of13/oxm.py b/src/python/loxi/of13/oxm.py
index cf8c59f..2ebde0d 100644
--- a/src/python/loxi/of13/oxm.py
+++ b/src/python/loxi/of13/oxm.py
@@ -8,19 +8,12 @@
 
 import struct
 import loxi
-import const
-import bsn_tlv
-import meter_band
-import instruction
-import oxm
-import common
-import instruction_id
-import action
-import message
-import action_id
 import util
 import loxi.generic_util
 
+import sys
+ofp = sys.modules['loxi.of13']
+
 class oxm(loxi.OFObject):
     subtypes = {}