Ask Your Question
0

how can i add additional preferences for some protocols programmically?

asked 2019-03-05 16:46:50 +0000

arthurfos gravatar image

updated 2019-03-07 09:29:39 +0000

Guy Harris gravatar image

how can i change the interface for some protocols programmically?

edit retag flag offensive close merge delete

Comments

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

cmaynard gravatar imagecmaynard ( 2019-03-05 17:49:56 +0000 )edit

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

Guy Harris gravatar imageGuy 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 gravatar imagearthurfos ( 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 gravatar imagecmaynard ( 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 gravatar imageGuy Harris ( 2019-03-05 21:32:12 +0000 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-03-07 09:29:44 +0000

Guy Harris gravatar image

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.

edit flag offensive delete link more

Comments

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

arthurfos gravatar imagearthurfos ( 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 gravatar imageGuy 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 gravatar imagearthurfos ( 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 gravatar imageJaap ( 2019-03-07 16:03:06 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2019-03-05 16:46:50 +0000

Seen: 303 times

Last updated: Mar 07 '19