Extending canfd Dissector in Lua
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/wireshark/blob/master/epan/dissectors/packet-socketcan.c
Chained Dissectors: https://wiki.wireshark.org/Lua/Dissectors#chained_dissectors
Other information: https://www.wireshark.org/lists/wireshark-dev/201902/msg00000.html
CANFD Dissector (in C though): https://github.com/wireshark/wireshark/blob/master/epan/dissectors/packet-socketcan.c
UAVCAN/CAN Dissector (in C though): https://raw.githubusercontent.com/PetervdPerk-NXP/wireshark/d2b0614246af759158c86c91563cf53155ef4c40/epan/dissectors/packet-uavcan.c
Merging in the other can sub dissectors? https://gitlab.com/wireshark/wireshark/-/merge_requests/3289
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/questions/32288/can-over-ethernet-lua-dissector/