aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-12-20 05:35:29 +0000
committerGuy Harris <guy@alum.mit.edu>2010-12-20 05:35:29 +0000
commita8bc4a0d136d7a68e8f006aec75a8e63191948c9 (patch)
tree2587cbb5c31f65afc60711d38d5dcc79a5a689e6 /tools
parent7e16ec5b991b12020f7bdc135fd4943858bc3218 (diff)
Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle dissector tables with string keys. (Using _port can confuse people into thinking they're intended solely for use with TCP/UDP/etc. ports when, in fact, they work better for things such as Ethernet types, where the binding of particular values to particular protocols are a lot stronger.) svn path=/trunk/; revision=35224
Diffstat (limited to 'tools')
-rwxr-xr-xtools/asn2wrs.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/asn2wrs.py b/tools/asn2wrs.py
index 86e89e249d..7302d78450 100755
--- a/tools/asn2wrs.py
+++ b/tools/asn2wrs.py
@@ -1833,7 +1833,10 @@ class EthCtx:
if (pdu['new']): new_prefix = 'new_'
if (reg['rtype'] in ('NUM', 'STR')):
rstr = ''
- if (reg['rtype'] == 'STR'): rstr = '_string'
+ if (reg['rtype'] == 'STR'):
+ rstr = 'string'
+ else:
+ rstr = 'uint'
if (pdu['reg']):
dis = self.proto
if (pdu['reg'] != '.'): dis += '.' + pdu['reg']
@@ -1844,7 +1847,7 @@ class EthCtx:
else:
hnd = '%screate_dissector_handle(dissect_%s, proto_%s)' % (new_prefix, f, self.eproto)
rport = self.value_get_eth(reg['rport'])
- fx.write(' dissector_add%s("%s", %s, %s);\n' % (rstr, reg['rtable'], rport, hnd))
+ fx.write(' dissector_add_%s("%s", %s, %s);\n' % (rstr, reg['rtable'], rport, hnd))
elif (reg['rtype'] in ('BER', 'PER')):
roid = self.value_get_eth(reg['roid'])
fx.write(' %sregister_%s_oid_dissector(%s, dissect_%s, proto_%s, %s);\n' % (new_prefix, reg['rtype'].lower(), roid, f, self.eproto, reg['roidname']))