loxi-prep: move header fields into the message classes
diff --git a/tools/pylibopenflow/pylib/cheader.py b/tools/pylibopenflow/pylib/cheader.py
index a23e1eb..2d67206 100644
--- a/tools/pylibopenflow/pylib/cheader.py
+++ b/tools/pylibopenflow/pylib/cheader.py
@@ -286,8 +286,8 @@
self.is_primitive(typename),size)
else:
#Not array
- if IGNORE_OFP_HEADER and typename == "ofp_header":
- return None
+ if typename == "ofp_header":
+ return "ofp_header"
if (self.is_primitive(typename)):
return cprimitive(typename, name)
else:
@@ -382,7 +382,12 @@
cstru = cstruct(structname)
for val in values:
presult = typeparser.parse_type(val)
- if (presult != None):
+ if presult == "ofp_header":
+ cstru.members.append(cprimitive("uint8_t", "version"))
+ cstru.members.append(cprimitive("uint8_t", "type"))
+ cstru.members.append(cprimitive("uint16_t", "length"))
+ cstru.members.append(cprimitive("uint32_t", "xid"))
+ elif (presult != None):
cstru.members.append(presult)
self.structs[structname] = cstru
#Expand all structs