This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Wireshark 1.10 heur_dissector_t has an extra parameter void*

1

I have a plugin dissector and I'm upgrading to 1.10.

I ran across a compile warning where the definition of heur_dissector_t now has an extra parameter void* The header file doesn't have any documentation for the parameter. What is it for?

I grepped the other plugins and see that packet-esl.c as well as all the others that have heur_dissector_add which doesn't have the 4th parameter void*

asked 18 Oct '13, 15:23

tlann's gravatar image

tlann
76121419
accept rate: 100%


One Answer:

2

What is it for?

Passing private data from one dissector to another, rather than using the pinfo->private_data mechanism (if it's passed as an argument, you don't have to worry about overwriting somebody else's private data pointer). If you have no extra data to pass to a dissector, pass NULL; if you have no extra data to be passed to you, ignore the argument (and mark it with _U_ so that the compiler doesn't warn you it's unused).

answered 18 Oct '13, 17:16

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196
accept rate: 19%

Is there an example of how this is used in the source?

(21 Oct '13, 15:41) tlann