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] What is best way to use other protocol subdissectors?

From: Dmitriy Linikov <dmitriy@xxxxxxxxxx>
Date: Tue, 29 Jan 2019 13:09:25 +0300
Hi, guys.

I'm adding support for CAN messages over IEEE1722 control frames. What is the best way to decode CAN message and payload?

Up to now I have found the following approaches:
- like in packet-caneth.c, adding fake "can.flags.xxx" to the list of protocol fields and explicit using "can.subdissectors" table.
- using the composite tvb to combine real payload with a fake socketcan header.

The first approach has failed for me because during commit i have several errors like the following: "can.flags.rtr doesn't match PROTOABBREV of ieee1722".

But the second approach seems a bit unnatural for me.

What would you suggest?

Best regards,
Dmitriy Linikov.