hi all, I have created two plugin dissectors for two different packets of a same protocol. But i cant use the wireshark to dissect both of the packets at the same time, i need to run the wireshark separately for each of the packet using the plugins for those packets. There is no issue in dissecting the packets, But now i want to run the wireshark in such a way that it can use both the plugins at the same time and call the plugin according to the packet. So in order to do this thing i used "call_dissector(plugin_handle, tvb, pinfo, tree);" in one of my plugin which calls second plugin if the packet is for second plugin. And to detect the type of packet i have the msgid which i can use successfully to know that which packet is this, Now the problem is that when i trying to dissect the packet in wireshark it giving me the following error, "ERROR:packet.c:2281:call_dissector_only: assertion failed: (handle != NULL)" i have used find_dissector("dissector_name"); to get the refernce of the plugin dissector.. please help me on this and tell me how i can do this .. Thanks asked 12 Aug '15, 05:36 zombimind edited 12 Aug '15, 05:40 |
One Answer:
You're passing in a NULL handle as the first parameter, it should be the handle of the dissector you wish to call. I suspect the result of It's possible that the second dissector hasn't registered when you make the find_dissector call. answered 13 Aug '15, 01:00 grahamb ♦ yeah thats true, the result of find_dissector() is NULL and the reason i think is that, it is not registered, thanks for your reply (13 Aug '15, 01:33) zombimind |
anybody please help on this, i am not finding any way to do this, suggest me something
many thanks in advance
I don't see why you should have two dissectors for the same protocol, that sounds wierd but:
Did you register the dissector name in the register routine with new_register_dissector(); or register_dissector(); and have the find_dissector() call in the handoff routine?
thanks for replying anders, actually the single dissector which i was having before for my protocol can dissect a particular packet, but now i have another packet which comes under the same protocol and needed to be dissect. so i created a plugin dissector for the 2nd packet so whenever the 2nd packet is there, this plugin dissector can be used by the previously existed dissector.
And yeah i didnt register my plugin dissector as you said with either "register_dissector" nor with "new_register_dissector", i will try this way,
thanks