loxi-prep: rename stats request/type field 'type' to 'stats_type'
diff --git a/src/python/of10/class_maps.py b/src/python/of10/class_maps.py
index 668cd1b..89226b4 100644
--- a/src/python/of10/class_maps.py
+++ b/src/python/of10/class_maps.py
@@ -68,7 +68,7 @@
                                        'port_no'
                                       ],
     'ofp_stats_request'             : [
-                                       'type',
+                                       'stats_type',
                                        'flags'
                                       ],
     'ofp_aggregate_stats_request'   : [
@@ -144,7 +144,7 @@
                                        'vendor'
                                       ],
     'ofp_stats_reply'               : [
-                                       'type',
+                                       'stats_type',
                                        'flags'
                                       ],
     'ofp_queue_stats_request'       : [
diff --git a/src/python/of10/cstruct.py b/src/python/of10/cstruct.py
index eb341a4..3d2c638 100644
--- a/src/python/of10/cstruct.py
+++ b/src/python/of10/cstruct.py
@@ -797,7 +797,7 @@
         """Initialize
         Declare members and default values
         """
-        self.type = 0
+        self.stats_type = 0
         self.flags = 0
 
     def __assert(self):
@@ -813,7 +813,7 @@
             if(not self.__assert()[0]):
                 return None
         packed = ""
-        packed += struct.pack("!HH", self.type, self.flags)
+        packed += struct.pack("!HH", self.stats_type, self.flags)
         return packed
 
     def unpack(self, binaryString):
@@ -826,7 +826,7 @@
         fmt = '!HH'
         start = 0
         end = start + struct.calcsize(fmt)
-        (self.type, self.flags) = struct.unpack(fmt,  binaryString[start:end])
+        (self.stats_type, self.flags) = struct.unpack(fmt,  binaryString[start:end])
         return binaryString[4:]
 
     def __len__(self):
@@ -839,7 +839,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.stats_type !=  other.stats_type: return False
         if self.flags !=  other.flags: return False
         return True
 
@@ -849,7 +849,7 @@
         """Generate string showing basic members of structure
         """
         outstr = ''
-        outstr += prefix + 'type: ' + str(self.type) + '\n'
+        outstr += prefix + 'stats_type: ' + str(self.stats_type) + '\n'
         outstr += prefix + 'flags: ' + str(self.flags) + '\n'
         return outstr
 
@@ -2010,7 +2010,7 @@
         """Initialize
         Declare members and default values
         """
-        self.type = 0
+        self.stats_type = 0
         self.flags = 0
 
     def __assert(self):
@@ -2026,7 +2026,7 @@
             if(not self.__assert()[0]):
                 return None
         packed = ""
-        packed += struct.pack("!HH", self.type, self.flags)
+        packed += struct.pack("!HH", self.stats_type, self.flags)
         return packed
 
     def unpack(self, binaryString):
@@ -2039,7 +2039,7 @@
         fmt = '!HH'
         start = 0
         end = start + struct.calcsize(fmt)
-        (self.type, self.flags) = struct.unpack(fmt,  binaryString[start:end])
+        (self.stats_type, self.flags) = struct.unpack(fmt,  binaryString[start:end])
         return binaryString[4:]
 
     def __len__(self):
@@ -2052,7 +2052,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.stats_type !=  other.stats_type: return False
         if self.flags !=  other.flags: return False
         return True
 
@@ -2062,7 +2062,7 @@
         """Generate string showing basic members of structure
         """
         outstr = ''
-        outstr += prefix + 'type: ' + str(self.type) + '\n'
+        outstr += prefix + 'stats_type: ' + str(self.stats_type) + '\n'
         outstr += prefix + 'flags: ' + str(self.flags) + '\n'
         return outstr
 
diff --git a/src/python/of10/message.py b/src/python/of10/message.py
index 41b6a83..d614110 100644
--- a/src/python/of10/message.py
+++ b/src/python/of10/message.py
@@ -2247,7 +2247,7 @@
     @arg type: The message type (OFPT_STATS_REPLY=17)
 
     Data members inherited from ofp_stats_reply:
-    @arg type
+    @arg stats_type
     @arg flags
 
     """
@@ -2354,7 +2354,7 @@
     @arg type: The message type (OFPT_STATS_REQUEST=16)
 
     Data members inherited from ofp_stats_request:
-    @arg type
+    @arg stats_type
     @arg flags
 
     """
@@ -2696,7 +2696,7 @@
         ofp_stats_request.__init__(self)
         ofp_aggregate_stats_request.__init__(self)
         self.header.type = OFPT_STATS_REQUEST
-        self.type = OFPST_AGGREGATE
+        self.stats_type = OFPST_AGGREGATE
         for (k, v) in kwargs.items():
             if hasattr(self, k):
                 setattr(self, k, v)
@@ -2805,7 +2805,7 @@
         ofp_stats_request.__init__(self)
         ofp_desc_stats_request.__init__(self)
         self.header.type = OFPT_STATS_REQUEST
-        self.type = OFPST_DESC
+        self.stats_type = OFPST_DESC
         for (k, v) in kwargs.items():
             if hasattr(self, k):
                 setattr(self, k, v)
@@ -2914,7 +2914,7 @@
         ofp_stats_request.__init__(self)
         ofp_flow_stats_request.__init__(self)
         self.header.type = OFPT_STATS_REQUEST
-        self.type = OFPST_FLOW
+        self.stats_type = OFPST_FLOW
         for (k, v) in kwargs.items():
             if hasattr(self, k):
                 setattr(self, k, v)
@@ -3023,7 +3023,7 @@
         ofp_stats_request.__init__(self)
         ofp_port_stats_request.__init__(self)
         self.header.type = OFPT_STATS_REQUEST
-        self.type = OFPST_PORT
+        self.stats_type = OFPST_PORT
         for (k, v) in kwargs.items():
             if hasattr(self, k):
                 setattr(self, k, v)
@@ -3132,7 +3132,7 @@
         ofp_stats_request.__init__(self)
         ofp_queue_stats_request.__init__(self)
         self.header.type = OFPT_STATS_REQUEST
-        self.type = OFPST_QUEUE
+        self.stats_type = OFPST_QUEUE
         for (k, v) in kwargs.items():
             if hasattr(self, k):
                 setattr(self, k, v)
@@ -3241,7 +3241,7 @@
         ofp_stats_request.__init__(self)
         ofp_table_stats_request.__init__(self)
         self.header.type = OFPT_STATS_REQUEST
-        self.type = OFPST_TABLE
+        self.stats_type = OFPST_TABLE
         for (k, v) in kwargs.items():
             if hasattr(self, k):
                 setattr(self, k, v)
diff --git a/src/python/of10/parse.py b/src/python/of10/parse.py
index a399c68..63d17c9 100644
--- a/src/python/of10/parse.py
+++ b/src/python/of10/parse.py
@@ -103,7 +103,7 @@
         sub_hdr = message.ofp_stats_request()
         sub_hdr.unpack(binary_string[cstruct.OFP_HEADER_BYTES:])
         try:
-            obj = stats_request_to_class_map[sub_hdr.type]()
+            obj = stats_request_to_class_map[sub_hdr.stats_type]()
         except KeyError:
             obj = None
         return obj
@@ -111,7 +111,7 @@
         sub_hdr = message.ofp_stats_reply()
         sub_hdr.unpack(binary_string[cstruct.OFP_HEADER_BYTES:])
         try:
-            obj = stats_reply_to_class_map[sub_hdr.type]()
+            obj = stats_reply_to_class_map[sub_hdr.stats_type]()
         except KeyError:
             obj = None
         return obj