aboutsummaryrefslogtreecommitdiffstats
path: root/tools/asn2wrs.py
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2019-04-04 13:00:35 +0200
committerAnders Broman <a.broman58@gmail.com>2019-04-04 12:28:11 +0000
commitca694eb078ac710b9e9bd3d1b0f8dc80af185a31 (patch)
treec84b52318c555f1e1460eb7b74d30f035e7c46d1 /tools/asn2wrs.py
parent24ef40990020d06884ee4164b723a345e9985907 (diff)
PER: Use proto_tree_add_bitmask... () for named bits.
Change-Id: I2f4258e2f4fd11c26bdc101e1375d0b5708610b7 Reviewed-on: https://code.wireshark.org/review/32713 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'tools/asn2wrs.py')
-rwxr-xr-xtools/asn2wrs.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/asn2wrs.py b/tools/asn2wrs.py
index d9e7e86e54..aa978b25fa 100755
--- a/tools/asn2wrs.py
+++ b/tools/asn2wrs.py
@@ -5563,13 +5563,13 @@ class BitStringType (Type):
#print ("eth_type_default_table(tname='%s')" % (tname))
table = ''
bits = self.eth_named_bits()
- if (bits and ectx.Ber()):
+ if (bits):
table = ectx.eth_bits(tname, bits)
return table
def eth_type_default_body(self, ectx, tname):
+ bits = self.eth_named_bits()
if (ectx.Ber()):
- bits = self.eth_named_bits()
if (ectx.constraints_check and self.HasSizeConstraint()):
body = ectx.eth_fn_call('dissect_%(ER)s_constrained_bitstring', ret='offset',
par=(('%(IMPLICIT_TAG)s', '%(ACTX)s', '%(TREE)s', '%(TVB)s', '%(OFFSET)s'),
@@ -5588,7 +5588,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', '%(LEN_PTR)s'),))
+ ('%(MIN_VAL)s', '%(MAX_VAL)s', '%(EXT)s','%(TABLE)s', '%s' % len(bits), '%(VAL_PTR)s', '%(LEN_PTR)s'),))
else:
body = '#error Can not decode %s' % (tname)
return body