Wireshark mailing list archives

Re: Chained CAN dissecector: Can not get reference for CAN dissector


From: Sebastian Schildt <sebastian () frozenlight de>
Date: Mon, 21 Dec 2015 11:06:11 +0100

Hi,

I made a patch calling register_dissector for CAN (https://code.wireshark.org/review/#/c/12780/). Actually it was quite 
easy, 30% of the time was needed to make Wireshark build at all, 2% to make and test the patch and the rest to get this 
gerrit thingy running :D

If/when it gets applied all that is needed to get a reference to the CAN dissector is

original_can_dissector = Dissector.get("can")

However, for the benefit of people just googling it, if the patch is not accepted or you are using a stable version of 
Wireshark, this is a workaround for Lua:

local WTAP_ENCAP_SOCKETCAN = 125      --from wtap.h
wtap_tbl=DissectorTable.get("wtap_encap")
original_can_dissector = wtap_tbl:get_dissector(WTAP_ENCAP_SOCKETCAN)


Sebastian 

Am 15.12.2015 um 12:25 schrieb Pascal Quantin <pascal.quantin () gmail com>:




Hi Sebastian,

The CAN dissector does not register itself by name (no call to register_dissector() function), so as you noticed you 
will not find it on the list.
The best way to move forward would be be to contribute to Wireshark so as to add the missing register_dissector 
function call. But it will be only added to the development tree (Wireshark 2.1) and not backported to stable 
releases as I do not think it will be considered as a fix, but an enhancement.

Regards,
Pascal.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: