diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2013-11-17 13:31:32 +0000 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2013-11-17 13:31:32 +0000 |
commit | ea45be32c510b9dd4279648c777b07dee9c3296a (patch) | |
tree | ad3f05a53270a8a3f4df3273b08713f0b3ba2735 /tools/asn2wrs.py | |
parent | ed80b06a78ed479b4970fe61230e27477e2a8559 (diff) |
Add a way to retrieve a PER variable bit string length
svn path=/trunk/; revision=53382
Diffstat (limited to 'tools/asn2wrs.py')
-rwxr-xr-x | tools/asn2wrs.py | 3 |
1 files changed, 2 insertions, 1 deletions
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 |