diff --git a/src/python/oftest/controller.py b/src/python/oftest/controller.py
index 4d44c14..6fd88f5 100644
--- a/src/python/oftest/controller.py
+++ b/src/python/oftest/controller.py
@@ -224,12 +224,12 @@
                 continue
 
             self.logger.debug("Msg in: buf len %d. hdr.type %s. hdr.len %d hdr.version %d hdr.xid %d" %
-                              (len(pkt), ofp.cstruct.ofp_type_map[hdr.type], hdr.length, hdr.version, hdr.xid))
-            if hdr.version < ofp.cstruct.OFP_VERSION:
+                              (len(pkt), ofp.ofp_type_map[hdr.type], hdr.length, hdr.version, hdr.xid))
+            if hdr.version < ofp.OFP_VERSION:
                 self.logger.error("Switch only supports up to OpenFlow version %d (OFTest version is %d)",
-                                  hdr.version, ofp.cstruct.OFP_VERSION)
+                                  hdr.version, ofp.OFP_VERSION)
                 print "Switch only supports up to OpenFlow version %d (OFTest version is %d)" % \
-                    (hdr.version, ofp.cstruct.OFP_VERSION)
+                    (hdr.version, ofp.OFP_VERSION)
                 self.disconnect()
                 return
 
@@ -251,7 +251,7 @@
 
                 # Check if keep alive is set; if so, respond to echo requests
                 if self.keep_alive:
-                    if hdr.type == ofp.cstruct.OFPT_ECHO_REQUEST:
+                    if hdr.type == ofp.OFPT_ECHO_REQUEST:
                         self.logger.debug("Responding to echo request")
                         rep = ofp.message.echo_reply()
                         rep.header.xid = hdr.xid
@@ -296,7 +296,7 @@
                     handled = self.handlers["all"](self, msg, rawmsg)
 
                 if not handled: # Not handled, enqueue
-                    self.logger.debug("Enqueuing pkt type " + ofp.cstruct.ofp_type_map[hdr.type])
+                    self.logger.debug("Enqueuing pkt type " + ofp.ofp_type_map[hdr.type])
                     with self.packets_cv:
                         if len(self.packets) >= self.max_pkts:
                             self.packets.pop(0)
@@ -577,7 +577,7 @@
         """
 
         if exp_msg is not None:
-            self.logger.debug("Poll for %s" % ofp.cstruct.ofp_type_map[exp_msg])
+            self.logger.debug("Poll for %s" % ofp.ofp_type_map[exp_msg])
         else:
             self.logger.debug("Poll for any OF message")
 
@@ -589,10 +589,10 @@
                     (msg, pkt) = self.packets.pop(0)
                     return (msg, pkt)
                 else:
-                    self.logger.debug("Looking for %s" % ofp.cstruct.ofp_type_map[exp_msg])
+                    self.logger.debug("Looking for %s" % ofp.ofp_type_map[exp_msg])
                     for i in range(len(self.packets)):
                         msg = self.packets[i][0]
-                        self.logger.debug("Checking packets[%d] (%s)" % (i, ofp.cstruct.ofp_type_map[msg.header.type]))
+                        self.logger.debug("Checking packets[%d] (%s)" % (i, ofp.ofp_type_map[msg.header.type]))
                         if msg.header.type == exp_msg:
                             (msg, pkt) = self.packets.pop(i)
                             return (msg, pkt)
@@ -679,7 +679,7 @@
         msg_version, msg_type, msg_len, msg_xid = struct.unpack_from("!BBHL", outpkt)
         self.logger.debug("Msg out: buf len %d. hdr.type %s. hdr.len %d hdr.version %d hdr.xid %d",
                           len(outpkt),
-                          ofp.cstruct.ofp_type_map.get(msg_type, "unknown (%d)" % msg_type),
+                          ofp.ofp_type_map.get(msg_type, "unknown (%d)" % msg_type),
                           msg_len,
                           msg_version,
                           msg_xid)
diff --git a/src/python/oftest/illegal_message.py b/src/python/oftest/illegal_message.py
index 0c6a878..eeb5022 100644
--- a/src/python/oftest/illegal_message.py
+++ b/src/python/oftest/illegal_message.py
@@ -2,7 +2,7 @@
 Support an illegal message
 """
 
-from cstruct import *
+import of10
 
 ILLEGAL_MESSAGE_TYPE=217
 
@@ -23,7 +23,7 @@
     """
 
     def __init__(self):
-        self.header = ofp_header()
+        self.header = of10.ofp_header()
         self.header.type = ILLEGAL_MESSAGE_TYPE
         self.data = ""
 
@@ -63,7 +63,7 @@
         string.
 
         """
-        length = OFP_HEADER_BYTES
+        length = of10.OFP_HEADER_BYTES
 
         length += len(self.data)
         return length
diff --git a/src/python/oftest/testutils.py b/src/python/oftest/testutils.py
index fcd8f21..fd7d4b2 100644
--- a/src/python/oftest/testutils.py
+++ b/src/python/oftest/testutils.py
@@ -16,7 +16,7 @@
 import oftest
 import oftest.controller
 import oftest.dataplane
-import of10.cstruct
+import of10
 import of10.message
 import of10.action
 import of10.parse
@@ -41,9 +41,9 @@
 
     logging.info("Deleting all flows")
     msg = of10.message.flow_mod()
-    msg.match.wildcards = of10.cstruct.OFPFW_ALL
-    msg.out_port = of10.cstruct.OFPP_NONE
-    msg.command = of10.cstruct.OFPFC_DELETE
+    msg.match.wildcards = of10.OFPFW_ALL
+    msg.out_port = of10.OFPP_NONE
+    msg.command = of10.OFPFC_DELETE
     msg.buffer_id = 0xffffffff
     ctrl.message_send(msg)
     return 0 # for backwards compatibility
@@ -51,8 +51,8 @@
 def required_wildcards(parent):
     w = test_param_get('required_wildcards', default='default')
     if w == 'l3-l4':
-        return (of10.cstruct.OFPFW_NW_SRC_ALL | of10.cstruct.OFPFW_NW_DST_ALL | of10.cstruct.OFPFW_NW_TOS
-                | of10.cstruct.OFPFW_NW_PROTO | of10.cstruct.OFPFW_TP_SRC | of10.cstruct.OFPFW_TP_DST)
+        return (of10.OFPFW_NW_SRC_ALL | of10.OFPFW_NW_DST_ALL | of10.OFPFW_NW_TOS
+                | of10.OFPFW_NW_PROTO | of10.OFPFW_TP_SRC | of10.OFPFW_TP_DST)
     else:
         return 0
 
@@ -461,7 +461,7 @@
     # Expect a packet from each port on egr port list
     for egr_port in egr_port_list:
         check_port = egr_port
-        if egr_port == of10.cstruct.OFPP_IN_PORT:
+        if egr_port == of10.OFPP_IN_PORT:
             check_port = ing_port
         (rcv_port, rcv_pkt, pkt_time) = parent.dataplane.poll(
             port_number=check_port, exp_pkt=exp_pkt_arg)
@@ -517,7 +517,7 @@
                        'Match failed: dl_type: ' + str(req_match.dl_type) +
                        " != " + str(res_match.dl_type))
 
-    if (not(req_match.wildcards & of10.cstruct.OFPFW_DL_TYPE)
+    if (not(req_match.wildcards & of10.OFPFW_DL_TYPE)
         and (req_match.dl_type == IP_ETHERTYPE)):
         parent.assertEqual(req_match.nw_tos, res_match.nw_tos,
                            'Match failed: nw_tos: ' + str(req_match.nw_tos) +
@@ -532,7 +532,7 @@
                            'Match failed: nw_dst: ' + str(req_match.nw_dst) +
                            " != " + str(res_match.nw_dst))
 
-        if (not(req_match.wildcards & of10.cstruct.OFPFW_NW_PROTO)
+        if (not(req_match.wildcards & of10.OFPFW_NW_PROTO)
             and ((req_match.nw_proto == TCP_PROTOCOL)
                  or (req_match.nw_proto == UDP_PROTOCOL))):
             parent.assertEqual(req_match.tp_src, res_match.tp_src,
@@ -565,7 +565,7 @@
     if wildcards is None:
         wildcards = required_wildcards(parent)
     if in_band:
-        wildcards &= ~of10.cstruct.OFPFW_IN_PORT
+        wildcards &= ~of10.OFPFW_IN_PORT
     match.wildcards = wildcards
     match.in_port = ing_port
 
@@ -578,7 +578,7 @@
     request.match = match
     request.buffer_id = 0xffffffff
     if check_expire:
-        request.flags |= of10.cstruct.OFPFF_SEND_FLOW_REM
+        request.flags |= of10.OFPFF_SEND_FLOW_REM
         request.hard_timeout = 1
 
     if action_list is not None:
@@ -750,7 +750,7 @@
         egr_ports = get_egr_list(parent, of_ports, egr_count, 
                                  exclude_list=[ingress_port])
         if ing_port:
-            egr_ports.append(of10.cstruct.OFPP_IN_PORT)
+            egr_ports.append(of10.OFPP_IN_PORT)
         if len(egr_ports) == 0:
             parent.assertTrue(0, "Failed to generate egress port list")
 
@@ -770,7 +770,7 @@
     egr_ports = get_egr_list(parent, of_ports, egr_count,
                              exclude_list=[ingress_port])
     if ing_port:
-        egr_ports.append(of10.cstruct.OFPP_IN_PORT)
+        egr_ports.append(of10.OFPP_IN_PORT)
     flow_match_test_pktout(parent, ingress_port, egr_ports,
                            dl_vlan=dl_vlan,
                            pkt=pkt, exp_pkt=exp_pkt,
@@ -970,9 +970,9 @@
 # If in_band is true, then only drop from first test port
 def flow_mod_gen(port_map, in_band):
     request = of10.message.flow_mod()
-    request.match.wildcards = of10.cstruct.OFPFW_ALL
+    request.match.wildcards = of10.OFPFW_ALL
     if in_band:
-        request.match.wildcards = of10.cstruct.OFPFW_ALL - of10.cstruct.OFPFW_IN_PORT
+        request.match.wildcards = of10.OFPFW_ALL - of10.OFPFW_IN_PORT
         for of_port, ifname in port_map.items(): # Grab first port
             break
         request.match.in_port = of_port
@@ -1003,10 +1003,10 @@
     lookups, matched
     """
     stat_req = of10.message.aggregate_stats_request()
-    stat_req.match = of10.cstruct.ofp_match()
-    stat_req.match.wildcards = of10.cstruct.OFPFW_ALL
+    stat_req.match = of10.ofp_match()
+    stat_req.match.wildcards = of10.OFPFW_ALL
     stat_req.table_id = 0xff
-    stat_req.out_port = of10.cstruct.OFPP_NONE
+    stat_req.out_port = of10.OFPP_NONE
 
     rv = {}
 
@@ -1154,7 +1154,7 @@
         stats.extend(reply.stats)
     return stats
 
-def get_flow_stats(test, match, table_id=0xff, out_port=of10.cstruct.OFPP_NONE):
+def get_flow_stats(test, match, table_id=0xff, out_port=of10.OFPP_NONE):
     """
     Retrieve a list of flow stats entries.
     """
@@ -1178,7 +1178,7 @@
     return get_stats(test, req)
 
 def verify_flow_stats(test, match, table_id=0xff,
-                      out_port=of10.cstruct.OFPP_NONE,
+                      out_port=of10.OFPP_NONE,
                       initial=[],
                       pkts=None, bytes=None):
     """
