Ask Your Question
0

Extending canfd Dissector in Lua

asked 2023-06-21 00:14:28 +0000

emrainey gravatar image

updated 2023-06-21 15:23:59 +0000

I'm curious to know if it's possible to extend the existing CANFD dissector in a Lua plugin and how that would work. I've asked ChatGPT as many different ways as I can but I think it's knowledge is exhausted in this area (It thought you could just clone() the proto and add fields).

Here's the socketcan plugin in C: https://github.com/wireshark/wireshar...

Chained Dissectors: https://wiki.wireshark.org/Lua/Dissec...

Other information: https://www.wireshark.org/lists/wires...

CANFD Dissector (in C though): https://github.com/wireshark/wireshar...

UAVCAN/CAN Dissector (in C though): https://raw.githubusercontent.com/Pet...

Merging in the other can sub dissectors? https://gitlab.com/wireshark/wireshar...

Is this possible in Lua? My feeling is that it should be possible, but my experiments aren't working.

This may be a similar question to https://osqa-ask.wireshark.org/questi...

edit retag flag offensive close merge delete

Comments

There is a sample capture (vcan0-canfd-mixed-traffic.pcapng) attached to 12687: SocketCAN dissector does not support CAN FD

How about a post dissector that looks for canfd and if can.len is greater than 0 it grabs data.data then processes it adding additional fields for a new protocol?

Chuckc gravatar imageChuckc ( 2023-06-21 02:36:38 +0000 )edit

extend the existing CANFD dissector

By "extending" do you mean "dissecting CANFD headers that the existing CANFD dissector doesn't dissect", or do you mean "dissecting the CANFD data field as a particular protocol that runs atop CAN"? The latter isn't "extending the existing CAN/CANFD dissector", it's "adding support for a new protocol that runs on top of CAN/CANFD".

Guy Harris gravatar imageGuy Harris ( 2023-06-21 05:29:18 +0000 )edit

I need to decode both the CANFD header (subfields of the Node ID) and the data payload too. Thanks for your comments! I'll check out those links!

emrainey gravatar imageemrainey ( 2023-06-21 15:15:59 +0000 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-06-21 18:56:59 +0000

Guy Harris gravatar image

See the email thread that begin with this message. Read that message and the messages that the "Thread Next" links at the top of email message pages show you.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2023-06-21 00:14:28 +0000

Seen: 358 times

Last updated: Jun 21 '23