Wireshark-dev: Re: [Wireshark-dev] Question regarding QT/future Wireshark version
From: Roland Knall <rknall@xxxxxxxxx>
Date: Fri, 6 Jan 2012 15:15:26 +0100
On Fri, Jan 6, 2012 at 1:46 AM, Gerald Combs <gerald@xxxxxxxxxxxxx> wrote:
> On 1/5/12 12:22 PM, Guy Harris wrote:
>> If the add-ons are in the dissecting code, there's no GUI code there; Wireshark handles the GUI display, and TShark handles the text output.  I doubt that we'll be linking TShark with Qt, so I don't think its non-GUI classes will be available for dissectors to use.  (Qt isn't, as far as I know, split into a "non-GUI utility library" like GLib and a "GUI toolkit" like GTK+.)
>
> From what I understand QtCore corresponds to GLib, providing basic data
> types and functionality (QString, QThread, etc) and QtGui corresponds to
> GTK+, providing the UI classes.

Ok, let me clarify the idea. Let's for instance say, that you want to
have a graphical representation of the inner-workings of a
communication of two machines. A scenario which comes up very often
using industrial ethernet protocols. Than you want to integrate such a
view into wireshark. Doing so requires a lot of changes all over the
GUI code, and implements code which others won't need, bloating the
overal gui interface. Other add-ons that come in mind here are all
things under the "Telephony" menu or most of the "Statistics" menu.

Now, if you could add gui plugins just on the base of dissectors
loaded, that would enhance the usability for the tool, and on the
other side would allow for a better development of such tools. Let's
call them interface plugins. Adding them into the dissectors is of
course not the way to go, as tshark for instance would not be able to
use them. Let's just add a plugin structure for generic interface
plugins, and they should be able to register, that if a certain
dissector is being used, they will be added to the menu structure.

On another note. If in the long term Qt is the way to go, should all
references to gtk usage be replaced by a more generic version of such
functions, which in the meantime call the gtk version as a first step?
That would allow for the future to prepare a wireshark without gtk and
glib. GHashTable for instance get's used quite a lot.

regards,
Roland