Wireshark-dev: [Wireshark-dev] asn2wry.py - showing protocol version ?
From: Martin Mathieson <martin.r.mathieson@xxxxxxxxxxxxxx>
Date: Wed, 17 Oct 2018 20:50:50 +0100
Hi,

I would like to be able to show, for the generated dissectors, the version of the protocol.  For 3GPP protocols, in theory they are backwards-compatible, but not at this point in the NR(5G) standards.

So for the 3GPP .asn files, the first line might be e.g.
    -- 3GPP TS 38.331 V15.3.0 (2018-09)
I would really like to be able to teach asn2wrs.py to try to find a suitable such comment and add this text as a generated field inside each external dissector.

So I am thinking of:
- looking at the first few lines of each .asn file that gets included and trying to find a suitably formatted version string
- if one is found, in the template file,  add the version protocol item
- for each entry listed under the EXPORTS(?) or  PDU(?) sections, add into the template file a version field with the chosen string constant.

Does this sound reasonable?
Martin