ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: [Wireshark-dev] Question for data argument of dissector_try_heuristic

From: Roland Knall <rknall@xxxxxxxxx>
Date: Mon, 25 Mar 2013 21:57:36 +0100
Hi

Under Mac OS X some warnings came up, and among them is a repeated
warning about an unused *data parameter for every call to a heuristic
dissector. As I do use the heuristic dissector, but do not use the
data argument, I looked up every occurence, where dissection is passed
to a heuristic dissector. In every case, NULL is passed as *data
argument.

So my question is this: What is the *data arguments intention and who
uses it actually? As of right now I can only think of such a case,
that the same function pointer can be used for registering the same
function for heuristic dissection as well as normal dissection.

But from a software development point of view, this is faulty
behaviour. If we do have an argument we should use it or throw it
away. Or change the reason for the behaviour.

regards,
Roland