First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

how can i add additional preferences for some protocols programmically?

how can i change the interface for some protocols programmically?

arthurfos's avatar
1
arthurfos
asked 2019-03-05 16:46:50 +0000
Guy Harris's avatar
19.9k
Guy Harris
updated 2019-03-07 09:29:39 +0000
edit flag offensive 0 remove flag close merge delete

Comments

Your question is a bit vague and unclear, at least to me. Can you please elaborate?

cmaynard's avatar cmaynard (2019-03-05 17:49:56 +0000) edit

For example, what do you mean by an "interface for some protocols"?

Guy Harris's avatar Guy Harris (2019-03-05 20:26:23 +0000) edit

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.

arthurfos's avatar arthurfos (2019-03-05 20:31:36 +0000) edit

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.

cmaynard's avatar cmaynard (2019-03-05 21:30:16 +0000) edit

What do you mean by "input field"? Do you, as Chris Maynard suggests, mean a preference for the protocol?

Guy Harris's avatar Guy Harris (2019-03-05 21:32:12 +0000) edit
add a comment see more comments

1 Answer

0

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.

Guy Harris's avatar
19.9k
Guy Harris
answered 2019-03-07 09:29:44 +0000
edit flag offensive 0 remove flag delete link

Comments

thanks a lot for the help @Harris. Do you know where i can found some documentations about the preferences API in Wireshark?

arthurfos's avatar arthurfos (2019-03-07 11:57:13 +0000) edit

See section 2.6 "User Preferences" of the doc/README.dissector file in the source tree (or in the online Git repository).

Guy Harris's avatar Guy Harris (2019-03-07 12:03:49 +0000) edit

thank you. can you know approximately how long it can take to reolve my task?

arthurfos's avatar arthurfos (2019-03-07 12:06:59 +0000) edit

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.

Jaap's avatar Jaap (2019-03-07 16:03:06 +0000) edit
add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer