aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2013-11-17 13:31:32 +0000
committerPascal Quantin <pascal.quantin@gmail.com>2013-11-17 13:31:32 +0000
commitea45be32c510b9dd4279648c777b07dee9c3296a (patch)
treead3f05a53270a8a3f4df3273b08713f0b3ba2735 /tools
parented80b06a78ed479b4970fe61230e27477e2a8559 (diff)
Add a way to retrieve a PER variable bit string length
svn path=/trunk/; revision=53382
Diffstat (limited to 'tools')
-rwxr-xr-xtools/asn2wrs.py3
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