Wireshark mailing list archives
Re: Chained CAN dissecector: Can not get reference for CAN dissector
From: Sebastian Schildt <sebastian () frozenlight de>
Date: Tue, 15 Dec 2015 14:38:13 +0100
Hi, Thanks for the answers, now I at least understand what is going on. Unfortunately it seems, the data parameter in the dissector call is not promoted to Lua (maybe somthing for another enhancement :) ). So I will probably try to implement Pascal's solution first. Sebastian
Am 15.12.2015 um 12:53 schrieb Michael Mann <mmann78 () netscape net>: The CAN ID is passed as the "data" parameter to the subdissector from the CAN dissector. The C code of a subdissector to handle it would be as follows: struct can_identifier { guint32 id; }; static int subdissector_function(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { struct can_identifier can_id; can_id = *((struct can_identifier*)data); if (can_id.id != 42) { return 0; } ... } I'm not as familiar with Lua to know how to setup the equivalent, but you shouldn't need to "override" the CAN dissector to get the CAN ID.
___________________________________________________________________________ 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:
- Chained CAN dissecector: Can not get reference for CAN dissector Sebastian Schildt (Dec 15)
- Re: Chained CAN dissecector: Can not get reference for CAN dissector Pascal Quantin (Dec 15)
- Re: Chained CAN dissecector: Can not get reference for CAN dissector Sebastian Schildt (Dec 21)
- Re: Chained CAN dissecector: Can not get reference for CAN dissector Michael Mann (Dec 15)
- Re: Chained CAN dissecector: Can not get reference for CAN dissector Sebastian Schildt (Dec 15)
- Re: Chained CAN dissecector: Can not get reference for CAN dissector Pascal Quantin (Dec 15)