aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/utils/asn1tostruct.py
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2016-02-19 16:53:43 +0100
committerDaniel Willmann <dwillmann@sysmocom.de>2016-02-22 11:15:04 +0100
commit19dea8b49b538a1918bd25d814c212fe397b3cad (patch)
treebdf6f0c0f71780637411f35c79638e7f585a0949 /asn1/utils/asn1tostruct.py
parentce5b9965f94839c79128c6ff72034995022db1de (diff)
asn1: Generate _free_*ies function declarations
ranap_ies_defs.h is checked in so update it hnbap_ies_defs.h and rua_ies_defs.h need to be regenerated
Diffstat (limited to 'asn1/utils/asn1tostruct.py')
-rwxr-xr-xasn1/utils/asn1tostruct.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/asn1/utils/asn1tostruct.py b/asn1/utils/asn1tostruct.py
index d1b5292..3519407 100755
--- a/asn1/utils/asn1tostruct.py
+++ b/asn1/utils/asn1tostruct.py
@@ -260,6 +260,18 @@ for key in iesDefs:
f.write("int %s_decode_%s(\n" % (fileprefix, firstlower.lower()))
f.write(" %sIEs_t *%sIEs,\n" % (asn1cStruct, firstlower))
f.write(" %s_t *%s);\n\n" % (asn1cStruct, lowerFirstCamelWord(asn1cStruct)))
+
+for key in iesDefs:
+ keyupperunderscore = re.sub('-', '_', key.upper())
+ keylowerunderscore = re.sub('-', '_', key.lower())
+ structName = re.sub('ies', '', key)
+
+ if len(iesDefs[key]["ies"]) == 0:
+ continue
+
+ f.write("int %s_free_%s(\n" % (fileprefix, re.sub('-', '_', structName.lower())))
+ if len(iesDefs[key]["ies"]) != 0:
+ f.write(" %s_t *%s);\n\n" % (prefix + re.sub('-', '_', key), lowerFirstCamelWord(re.sub('-', '_', key))))
f.write("#endif /* %s_IES_DEFS_H_ */\n\n" % (fileprefix.upper()))
#Generate Decode functions