aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/decode_as_dlg.h
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-11-20 19:23:02 +0000
committerMichael Mann <mmann78@netscape.net>2013-11-20 19:23:02 +0000
commit01c8945438a739d650514ca29bcb6fbfd521cabc (patch)
treefe9bf1c8239123109cd047303b4a43bb9309b531 /ui/gtk/decode_as_dlg.h
parent76ab93ea94787605d4c829620b51ff4dee105cb1 (diff)
Provide "Decode As" functionality through dissectors themselves instead of the GUI. Bug 9450 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9450)
The basic idea behind this design is to have dissectors register with a "decode as list" with their name and dissector table. When "Decode As" dialog is launched, any "registered" dissector found in the packet will cause a tab to be created in the dialog. Any GUI (GTK+/Qt/tshark) can just hook into the "decode as list" to see what can be provided. This patch includes the GUI portion of the functionality (including packet-dcerpc.[ch] because it had some GUI dependencies that are now removed). Other notes: 1. Some "GUI text" (UTF8_LEFTWARDS_ARROW and similar) made their way into the dissector code. Not sure how necessary it is and if reformatting the strings to avoid the macros is desired (TCP/UDP use it, SCTP doesn't). 2. I converted the SCTP functionality to have 2 tabs (instead of radio button), currently both are labeled "Transport" which could be confusing to users. Naming suggestions welcome (as well as for naming of tabs from other dissectors). 3. BER and DCERPC have more opportunity to use Decode As now that they are selected based on dissector presense, not packet_info values. 4. Catapult DCT2000 populates pinfo->ipproto, yet under new design will not show up to do Decode As. Should a "decode as item" be created for it? 5. BER dissector doesn't have Clear/Show Current functionality working (never did) 6. Bluetooth (in old design) could have been used "capture wide" instead of single packet (creating tabs of values not present in current packet), which goes against what I believe to be in the intent of Decode As, but I'm willing to hear counter-arguments. svn path=/trunk/; revision=53446
Diffstat (limited to 'ui/gtk/decode_as_dlg.h')
-rw-r--r--ui/gtk/decode_as_dlg.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/ui/gtk/decode_as_dlg.h b/ui/gtk/decode_as_dlg.h
index 1774162cfe..090d87e654 100644
--- a/ui/gtk/decode_as_dlg.h
+++ b/ui/gtk/decode_as_dlg.h
@@ -32,15 +32,16 @@
*/
/*
- * Filename of the "decode as" entry preferences
+ * Enum used to track which radio button is currently selected in the
+ * dialog. These buttons are labeled "Decode" and "Do not decode".
*/
-#define DECODE_AS_ENTRIES_FILE_NAME "decode_as_entries"
+enum action_type {
+ /* The "Decode" button is currently selected. */
+ E_DECODE_YES,
-#define DECODE_AS_ENTRY "decode_as_entry"
-
-/** Init the "Decode As" module
- */
-void decode_as_init(void);
+ /* The "Do not decode" button is currently selected. */
+ E_DECODE_NO
+};
/** User requested the "Decode As" dialog box by menu or toolbar.
*
@@ -64,7 +65,7 @@ void decode_show_cb(GtkWidget *widget, gpointer data);
gboolean decode_as_ok(void);
/*
- * Reset the "decode as"entries and reload ones of the current profile
+ * Reset the "decode as" entries and reload ones of the current profile
*/
void load_decode_as_entries(void);