Wireshark-dev: Re: [Wireshark-dev] Attempting new dissectors using ASN and asn2wrs under MSVC 2
From: Anders Broman <a.broman@xxxxxxxxx>
Date: Wed, 14 Apr 2010 17:58:47 +0200
Adrienne E. Siskind skrev 2010-04-14 15:35:
Thanks, Anders.  Both suggestions helped.

Turns out that's not the only ASN construct in the SLE specs that
asn2wrs doesn't like, so I'll be making a list of them as I progress.
If you intend to commit this to wireshark when you are finished we could add the files under
/asn1/xxx
while the work progresses in that way it may be easier to comment/help on any problems.
------------------
[snip - using foo example from wiki]
The resulting compile fails for the asn2wrs-generated packet-foo.c.
The compilation errors ostensibly occur in packet-per.h, and are of
the type I'd usually expect to see if there was a missing closing
brace somewhere above.  I did change the inclusion of packet-per.h to
packet-ber.h to see what would happen, but this simply replaced one
set of compile errors with another.

Did you #include<epan/asn1.h>?
BTW - this did need to be added to the output of asn2wrs, which supposedly
shouldn't be modified, and I'd have expected it to be in the generated
file.  Is it enough to mention that here, or should it be entered in
bugzilla also?

You need to add it in the xx-template.c so more of a thing for the wiki?
[snip - CCSDS SLE Forward CLTU def]
The spec is here (the asn definition is in Annex A at the end):
http://public.ccsds.org/publications/archive/912x1b2c1.pdf

The line in question reads:
     IdentifierString ::= VisibleString (FROM (ALL EXCEPT " "))

I think asn2wrs may not handle that construct, to get it to compile try
to replace it with:

IdentifierString ::= VisibleString
(later it could be replaced by a list of all VisibleString
chars except " "
--
Adrienne
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list<wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
              mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe