ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-users: [Wireshark-users] Custom CAN dissector script

From: Fabian Cenedese <Cenedese@xxxxxxxx>
Date: Mon, 05 Jun 2023 12:43:01 +0200
Hello

We're using CAN bus as protocol and I implemented a capture
to save the sent and received frames into a .pcapng file. I can
load it in Wireshark and the frames are displayed as CAN which
is correct. However the fields are only shown as identifier and
data bytes which doesn't say much yet.

I would like to add a custom dissector that will interpret the CAN
fields further down. The identifier needs to be broken down into
two separate fields as well as the first data byte.

How would I register this dissector as it doesn't use an Ethernet
port? I'm happy if I can use it in the "Decode As" menu, it
doesn't need to be applied automatically. The examples I've
seen use a port which makes sense for Wireshark but not in
my case. Would it need to be a CAN sub-protocol?

Thanks for any help.

bye  Fabi