Hey, I'm building a dissector which is the main dissector. After I read some variable, according to it, I want to continue dissecting with a suitable sub dissector. I didn't find any simple example about "sub dissectors". Alternatively, I thought about continue dissecting with the same dissector (because it is the same protocol, just different versions), with somehow writing inside the main dissector all of the dissecting options for each version. This solution doesn't seems right... Can someone please help me with that? asked 17 Dec '12, 09:04 hudac |
One Answer:
My inclination would be to suggest that dissecting variants of a protocol (e.g., different protocol versions) be done in one dissector. A number of Wireshark dissectors do just that. answered 17 Dec '12, 18:51 Bill Meier ♦♦ |
thanks,
"A number of Wireshark dissectors do just that."
What do you mean by that line?
The dissector has separate code which is executed depending upon the protocol version determined by the dissector.
That's a really interesting approach, would you be so kind to point out some of the dissectors doing that? I'm also reading the developer's readme, but I often get lost..
A very simple case is packet-bt-utp.c
It can be as simple as something like
and so on.
That's brilliant, exactly what I was asking for! Thank you so much, I would have never found it :)