Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] asn2wrs.py questions

From: Stig Bjørlykke <stig@xxxxxxxxxxxxx>
Date: Fri, 15 May 2009 14:16:58 +0200
Hi,

1. SEQUENCE OF Name

When using a SEQUENCE OF (and SEQ OF) the tree item get the same name
as the parent (introduced in r26669), which I think is not always
correct.  This patch fixes this, does it seem reasonable?

--- tools/asn2wrs.py	(revisjon 28370)
+++ tools/asn2wrs.py	(arbeidskopi)
@@ -985,7 +985,10 @@
                          'modified' : '', 'attr' : {} }
     name = ident.split('/')[-1]
     if len(ident.split('/')) > 1 and name == '_item':  # Sequence/Set of type
-      self.field[ident]['attr']['NAME'] = '"%s"' % ident.split('/')[-2]
+      if len(self.field[ident]['type'].split('/')) > 1:
+        self.field[ident]['attr']['NAME'] = '"%s item"' % ident.split('/')[-2]
+      else:
+        self.field[ident]['attr']['NAME'] = '"%s"' % self.field[ident]['type']
       self.field[ident]['attr']['ABBREV'] = asn2c(ident.split('/')[-2] + name)
     else:
       self.field[ident]['attr']['NAME'] = '"%s"' % name


2. I'm unable to build acp133.  Anyone able to rebuild this?


-- 
Stig Bjørlykke