how can i add additional preferences for some protocols programmically?
how can i change the interface for some protocols programmically?
how can i change the interface for some protocols programmically?
OK, those are preferences, as the "Preferences" in the menu path should suggest.
What you need to do is to use the preferences API in Wireshark. The QUIC dissector isn't using the regular preferences API; see, for example, proto_register_smtp()
in epan/dissectors/packet-smtp.c
, and the calls to prefs_register_protocol()
and prefs_register_bool_preference()
in that routine.
thanks a lot for the help @Harris. Do you know where i can found some documentations about the preferences API in Wireshark?
See section 2.6 "User Preferences" of the doc/README.dissector
file in the source tree (or in the online Git repository).
thank you. can you know approximately how long it can take to reolve my task?
Depending on whether you have a Wireshark build environment already setup or not, the task of adding a preference shouldn't take too long, the API is rather simple. Doing something useful with the preference can be a whole other matter.
To enter a block of code:
Comments
Your question is a bit vague and unclear, at least to me. Can you please elaborate?
For example, what do you mean by an "interface for some protocols"?
For example, with quic protocol, we just have one input field, but I need to extend this user interface with QT. Where can I find the source code for every dialog?@cmaynard, @Guy Harris.
I'm still not exactly sure what you're asking for, but I guess you're trying to add a new preference to the QUIC protocol dissector? Assuming so, you will need to modify the packet-quic.c file and then compile Wireshark. How you do that depends on what platform you're working on, but since you haven't indicated what that is, the best that I can do is to point you to the Wireshark Developer's Guide. Also have a look at the README.dissector file, and in particular section 2.6 of that file.
What do you mean by "input field"? Do you, as Chris Maynard suggests, mean a preference for the protocol?