loxi-prep: rename error 'type' field to 'err_type'
diff --git a/src/python/of10/class_maps.py b/src/python/of10/class_maps.py
index 7e61571..668cd1b 100644
--- a/src/python/of10/class_maps.py
+++ b/src/python/of10/class_maps.py
@@ -242,7 +242,7 @@
                                        'flags'
                                       ],
     'ofp_error_msg'                 : [
-                                       'type',
+                                       'err_type',
                                        'code'
                                       ],
     '_ignore' : []
diff --git a/src/python/of10/cstruct.py b/src/python/of10/cstruct.py
index 06330e1..eb341a4 100644
--- a/src/python/of10/cstruct.py
+++ b/src/python/of10/cstruct.py
@@ -3474,7 +3474,7 @@
         """Initialize
         Declare members and default values
         """
-        self.type = 0
+        self.err_type = 0
         self.code = 0
 
     def __assert(self):
@@ -3490,7 +3490,7 @@
             if(not self.__assert()[0]):
                 return None
         packed = ""
-        packed += struct.pack("!HH", self.type, self.code)
+        packed += struct.pack("!HH", self.err_type, self.code)
         return packed
 
     def unpack(self, binaryString):
@@ -3503,7 +3503,7 @@
         fmt = '!HH'
         start = 0
         end = start + struct.calcsize(fmt)
-        (self.type, self.code) = struct.unpack(fmt,  binaryString[start:end])
+        (self.err_type, self.code) = struct.unpack(fmt,  binaryString[start:end])
         return binaryString[4:]
 
     def __len__(self):
@@ -3516,7 +3516,7 @@
         """Return True if self and other have same values
         """
         if type(self) != type(other): return False
-        if self.type !=  other.type: return False
+        if self.err_type !=  other.err_type: return False
         if self.code !=  other.code: return False
         return True
 
@@ -3526,7 +3526,7 @@
         """Generate string showing basic members of structure
         """
         outstr = ''
-        outstr += prefix + 'type: ' + str(self.type) + '\n'
+        outstr += prefix + 'err_type: ' + str(self.err_type) + '\n'
         outstr += prefix + 'code: ' + str(self.code) + '\n'
         return outstr
 
diff --git a/src/python/of10/message.py b/src/python/of10/message.py
index 76d7d30..41b6a83 100644
--- a/src/python/of10/message.py
+++ b/src/python/of10/message.py
@@ -538,7 +538,7 @@
     @arg type: The message type (OFPT_ERROR=1)
 
     Data members inherited from ofp_error_msg:
-    @arg type
+    @arg err_type
     @arg code
     @arg data: Binary string following message members
 
diff --git a/src/python/of10/parse.py b/src/python/of10/parse.py
index 5c3ce65..a399c68 100644
--- a/src/python/of10/parse.py
+++ b/src/python/of10/parse.py
@@ -118,7 +118,7 @@
     elif hdr.type == cstruct.OFPT_ERROR:
         sub_hdr = message.ofp_error_msg()
         sub_hdr.unpack(binary_string[cstruct.OFP_HEADER_BYTES:])
-        return error_to_class_map[sub_hdr.type]()
+        return error_to_class_map[sub_hdr.err_type]()
     else:
         parse_logger.error("Cannot parse pkt to message")
         return None
diff --git a/tests/basic.py b/tests/basic.py
index 82670b4..83291fc 100644
--- a/tests/basic.py
+++ b/tests/basic.py
@@ -394,7 +394,7 @@
         self.assertTrue(reply is not None, "Did not get response to bad req")
         self.assertTrue(reply.header.type == ofp.OFPT_ERROR,
                         "reply not an error message")
-        self.assertTrue(reply.type == ofp.OFPET_BAD_REQUEST,
+        self.assertTrue(reply.err_type == ofp.OFPET_BAD_REQUEST,
                         "reply error type is not bad request")
         self.assertTrue(reply.code == ofp.OFPBRC_BAD_TYPE,
                         "reply error code is not bad type")
diff --git a/tests/detailed_contr_sw_messages.py b/tests/detailed_contr_sw_messages.py
index 8cb8baa..65e7201 100644
--- a/tests/detailed_contr_sw_messages.py
+++ b/tests/detailed_contr_sw_messages.py
@@ -73,7 +73,7 @@
                                                timeout=5)
         self.assertTrue(response is not None, 
                                'Switch did not reply with error message') 
-        self.assertTrue(response.type==ofp.OFPET_FLOW_MOD_FAILED, 
+        self.assertTrue(response.err_type==ofp.OFPET_FLOW_MOD_FAILED, 
                                'Error message type is not flow mod failed ') 
         self.assertTrue(response.code==ofp.OFPFMFC_OVERLAP, 
                                'Error Message code is not overlap')
@@ -194,7 +194,7 @@
                                                timeout=5)
         self.assertTrue(response is not None, 
                                'Switch did not reply with error message') 
-        self.assertTrue(response.type==ofp.OFPET_FLOW_MOD_FAILED, 
+        self.assertTrue(response.err_type==ofp.OFPET_FLOW_MOD_FAILED, 
                                'Error message type is not flow mod failed ') 
         self.assertTrue(response.code==ofp.OFPFMFC_BAD_EMERG_TIMEOUT, 
                                'Error Message code is not bad emergency timeout')
diff --git a/tests/message_types.py b/tests/message_types.py
index 07e3e29..eacaee6 100644
--- a/tests/message_types.py
+++ b/tests/message_types.py
@@ -103,7 +103,7 @@
                                                timeout=5)
         self.assertTrue(response is not None, 
                                'Switch did not reply with error message')
-        self.assertTrue(response.type==ofp.OFPET_BAD_REQUEST, 
+        self.assertTrue(response.err_type==ofp.OFPET_BAD_REQUEST, 
                                'Message field type is not OFPET_BAD_REQUEST') 
         self.assertTrue(response.code==ofp.OFPBRC_BAD_VERSION,
                         'Message field code is not OFPBRC_BAD_VERSION')
diff --git a/tools/pylibopenflow/include/openflow.h b/tools/pylibopenflow/include/openflow.h
index 27aedde..bfbc2f7 100644
--- a/tools/pylibopenflow/include/openflow.h
+++ b/tools/pylibopenflow/include/openflow.h
@@ -688,7 +688,7 @@
 struct ofp_error_msg {
     struct ofp_header header;
 
-    uint16_t type;
+    uint16_t err_type;
     uint16_t code;
     uint8_t data[0];          /* Variable-length data.  Interpreted based
                                  on the type and code. */