How do I let the user specify for which UDP ports a dissector should be used?
I created a dissector under the assumption that a given dissector is applied to every packet picked up by Wireshark.
As such I created an .ini file to define the ports on which the dissector should operate.
More specifically, the .ini file is read at Wireshark startup by the dissector, and the dissector in turn passes ports one at a time into the function
dissector_add_uint("udp.port",...).
This limits the ports the dissector operates on to those in the .ini file. When Wireshark runs the dissector doesn't even see packets not intended for it.
Is the .ini file the way this should be handled or is there another way to do this? My users need a way to change the ports the dissector processes for a given run of Wireshark.
"My users need a way to change the ports the dissector processes for a given run of Wireshark."
Are the ports specific to the capture file or is it multiple runs against the same capture with different ports each run?