Hi, I have a packet which has some header fields and some payload. I've successfully written a dissector for the packet. So now I can see my own protocol's and field values in Wireshark. Now, the payload data for my protocol is basically an IP Packet data. I want to parse that data as IP Packet and show as a subtree inside my protocol. Can somebody tell me how to parse my data with a pre defined IP Packet parser/dissector which wireshark already uses to parse IP Packets. Thanks This question is marked "community wiki". asked 16 Jul '13, 02:20 atanudey edited 16 Jul '13, 03:39 Kurt Knochner ♦ |
One Answer:
You call the standard IP dissector with the remaining bytes of your payload. See the l2tp dissector for an example:
See also these similar questions.
UPDATE
In Lua it works differently. See the following sample code.
First you create a variable and assign it a dissector reference. Then you call the dissector like this:
In your case, something like this:
See the Lua docs for more information about dissector calling and also this similar question:
Regards answered 16 Jul '13, 02:32 Kurt Knochner ♦ edited 16 Jul '13, 05:40 |
Hi Kurt,
Thanks for your quick reply. I've written my dissector in LUA. Will this work in LUA? When I'm trying it says -
Lua Error: ...\Program Files\Wireshark\plugins\netcode\netcode.lua:372: attempt to call global 'call_dissector' (a nil value)
Thanks
Hey Kurt, Thanks a lot. It's working perfectly :)
Great.
Hint: If a supplied answer resolves your question can you please "accept" it by clicking the checkmark icon next to it. This highlights good answers for the benefit of subsequent users with the same or similar questions.