This is our old Q&A Site. Please post any new questions and answers at

Hi, I am trying to create a ASN.1 dissector using asn2wrs. To do so, I need a asn file. The asn protocol requires IMPORTS of definitions from several other asn files. Unfortunately the naming of some definitions is identical. Resulting in a 'Duplicate type' error

This problem could be circumvented using tags. eg. filename1.parameters filename2.parameters

Has anyone an idea how to deal with this? Can I rename parameters from filename1 to let's say 'parameters1' using the .cnf file? There is something like #.FIELD RENAME and #.TYPE RENAME

By the way, any additional documentation (next to on how to modify cnf files is welcome :-)

asked 11 Jul '12, 05:13

Michel's gravatar image

accept rate: 0%

That sounds weird - using the same name for different definitions? Perhaps you need to break it up into more than one dissector? You may need to comment out duplicated IMPORTS when using multiple ASN1 files however. Is this for a standard protcol for which you will offer the dissector back to Wireshark? If so you could open up an enhancement bug report in bugzilla and get help there.

(11 Jul '12, 06:04) Anders ♦

Weird? Its the new ETSI standard! :-) Anyway, the use of imports did not help me in the end, because when including the packet that was created by asn2wrs in the Wireshark build I end up with Undeclared Identifier errors. I fixed this by copying and paste all asn protocols into a single asn file, while renaming duplicate definitions. FYI: I need to build Wireshark because I am working on a reader and a packet encapsulation.

(12 Jul '12, 05:19) Michel
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 11 Jul '12, 05:13

question was seen: 2,515 times

last updated: 12 Jul '12, 05:19

p​o​w​e​r​e​d by O​S​Q​A