plugin.c: register_handoff gets overwritten to NULL for custom plugin
Hello,
I have written a custom dissector on the latest version of Wireshark running on the Ubuntu GNU/Linux OS. I can see the protocol being registered with Wireshark but have a problem with dissecting the packets for my protocol. In the plugin.c file for my plugin, the register_handoff is always NULL and when I assign to my protocol hand_off and build it and on running I am able to see my protocol being dissected for a few seconds, after which Wireshark gets terminated with error: stack smashing detected ***; <unknown> terminated.
When Wireshark is build again, the register_handoff gets assigned to NULL again, after which I cannot dissect packets. Now, this overwrite does not happen when registering the protocol. Happens only for the reg_handoff part.
Please advice.
Stop referring to this as a 'problem in capturing the packets for my protocol'. You have problems dissecting the packets of your protocol. Edited accordingly.
Without any code to look at, I would suggest that you try reviewing the
README.plugins
file, and a sample plugin such as gryphon to help you resolve your problem.I think the issue is that in the make-plugin-reg.py the symbol for my plugin is not in the
regs['handoff_reg']
so it sets thereg_code
for theregister_handoff
to NULL. I understand make-plugin-reg.py automatically generates the plugin.c files so I was wondering where exactly does it gets all the settings from ?Really appreciate if someone could guide me. Thanks in advance.