From Pascal Quantin:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 1 Nov 2008 22:28:56 +0000 (22:28 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 1 Nov 2008 22:28:56 +0000 (22:28 +0000)
ASN.1: display the real name of SEQUENCE/TYPE OF parameters

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26669 f5534014-38df-0310-8fa8-9805f1628bb7

tools/asn2wrs.py

index ddcbbfa116af772dd85aaba4e40eeabc82ab9f87..15ae1acacf8b2ec57cb31c425e4b19a691e098c3 100755 (executable)
@@ -959,8 +959,8 @@ class EthCtx:
     self.field[ident] = {'type' : type, 'idx' : idx, 'impl' : impl, 'pdu' : pdu,
                          'modified' : '', 'attr' : {} }
     name = ident.split('/')[-1]
-    if len(ident.split('/')) > 1 and name == '_item':  # Sequnce/Set of type
-      self.field[ident]['attr']['NAME'] = '"Item"'
+    if len(ident.split('/')) > 1 and name == '_item':  # Sequence/Set of type
+      self.field[ident]['attr']['NAME'] = '"%s"' % ident.split('/')[-2]
       self.field[ident]['attr']['ABBREV'] = asn2c(ident.split('/')[-2] + name)
     else:
       self.field[ident]['attr']['NAME'] = '"%s"' % name