This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Plugin - dlg_utils in dissector

0

I've been trying to incorporate some GUI utils in a dissector which is being developed as a plugin for Wireshark. The functionalities I need are the ones declared in ui/gtk/dlg_utils.h, specially the function dlg_window_new. I have linked libgtkui.lib (also present in ui/gtk) in the relevant Makefile, but this library apparently requires the linkage of many other ones. Should libgtkui.lib be kind of stand-alone? If it should, what's been done wrong? If it should not, which other libraries must be linked with it?

Thanks in advance!

asked 25 Sep '13, 01:51

Matheus%20Priebe%20Bertram's gravatar image

Matheus Prie...
6335
accept rate: 100%


One Answer:

0

GUI stuff in dissectors isn't supported as they must also be able to run from the command line with tshark, see this question for more info.

What exactly are you trying to do as there may be a more suitable way to achieve it?

answered 25 Sep '13, 02:08

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

edited 25 Sep '13, 02:09

Thanks for the prompt answer. I have registered a uat preference for the dissector and get some relevant data from there. The table is, in a first instance, empty. In this sense, I wanted to add a functionality to load default preferences into this table e.g. by clicking a button such as "Load default table". The button thing, however, wouldn't work. Therefore, I tried to create a new dialogue window to ask the user, when deleting an item from the table, if the current desire is loading the default table (i.e. deleting all entries) or just deleting the selected entry.

As I can see in the referenced post, that is not practicable. I've already come across things such as "report_failure", but I'd actually need a dialogue.

I guess the correct way would be registering one of the supported preference types (like a boolean value) which dictates the functioning of the preferences table.

(25 Sep '13, 02:28) Matheus Prie...

Therefore, I tried to create a new dialogue window to ask the user, when deleting an item from the table, if the current desire is loading the default table (i.e. deleting all entries) or just deleting the selected entry.

This suggests that there should, in the UI for UAT preferences, be a "revert to default" option. (There might be a global "revert to default" option that reverts all preferences, but that's presumably too much for what you want.)

(25 Sep '13, 16:43) Guy Harris ♦♦