From ea45be32c510b9dd4279648c777b07dee9c3296a Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Sun, 17 Nov 2013 13:31:32 +0000 Subject: Add a way to retrieve a PER variable bit string length svn path=/trunk/; revision=53382 --- tools/asn2wrs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/asn2wrs.py b/tools/asn2wrs.py index 32d7375bb6..1e596364fc 100755 --- a/tools/asn2wrs.py +++ b/tools/asn2wrs.py @@ -5487,6 +5487,7 @@ class BitStringType (Type): def eth_type_default_pars(self, ectx, tname): pars = Type.eth_type_default_pars(self, ectx, tname) + pars['LEN_PTR'] = 'NULL' (pars['MIN_VAL'], pars['MAX_VAL'], pars['EXT']) = self.eth_get_size_constr(ectx) if 'ETT_INDEX' not in pars: pars['ETT_INDEX'] = '-1' @@ -5539,7 +5540,7 @@ class BitStringType (Type): else: body = ectx.eth_fn_call('dissect_%(ER)s_bit_string', ret='offset', par=(('%(TVB)s', '%(OFFSET)s', '%(ACTX)s', '%(TREE)s', '%(HF_INDEX)s'), - ('%(MIN_VAL)s', '%(MAX_VAL)s', '%(EXT)s', '%(VAL_PTR)s'),)) + ('%(MIN_VAL)s', '%(MAX_VAL)s', '%(EXT)s', '%(VAL_PTR)s', '%(LEN_PTR)s'),)) else: body = '#error Can not decode %s' % (tname) return body -- cgit v1.2.3