I have made a custom dissector but do not know how to use it in wireshark. Is there a way to add this custom dissector to the decode as menu or simply use it some other way? asked 18 Jul '12, 08:48 bball2601 |
One Answer:
You should read README.developer, which shows you how to add your dissector to another dissector's table similar to this:
...where Also note that your dissector may not be automatically added to the "Decode As..." menu (see here). answered 18 Jul '12, 10:31 multipleinte... |
It's also possible to use
dissector_add_handle("tcp.port", myproto_handle);
instead ofdissector_add_uint(...);
if you want your protocol accessible only in the "decode as" menu.Look at
proto_reg_handoff...(){...}
in various dissectors inepan/dissectors
for examples.I tried the dissector_add_uint method, but my dissector only decodes a few UDP packets rather than all of them. Also wouldnt this method only decode UDP packets that use the same source port as "myport"?
What would I have to do to have it decode any UDP packet, regardless of the ports?
You could try a heuristic dissector but that means that your dissector will have to "look at" a number of bytes in the packet and determine if it's your protocol or not.