We are using PER per the foo example (Simple ASN.1-based dissector). Wow, I never about all these different encodings.
Maybe we should be using something other than PER? We think we like PER because the dissected values agree with what we can see in the raw UDP data.
On Jun 21, 2021, at 11:54 PM, Vincent Randal <vtrandal@xxxxxxxxx> wrote:
> The primary question in this email (but I think it requires some explanation below): How does one write an ASN.1-based dissector such that the generated code (per "make asn1") does indeed decode the first octet as the message type using C-style switch/case construct?
"ASN.1-based" in what sense?
If the data to be dissected is *entirely* specified by an ASN.1 specification, using one of the representations for ASN.1, then the way it should decode the first octet depends on the representation - BER or one of its derived variants (DER, CER), PER or one of its derived variants (CPER), XER, OER, etc..
> In May I sat in (online) at an online Wireshark Developer Den meeting. I asked about encoding schemes like that in IEEE 1451.0 where the first octet is used to decode the message.
...and which does not appear to use any ASN.1 encoding, so it may not be relevant in your case.
So what is the encoding of this protocol/data format?
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives: https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe