summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-dcerpc.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 /epan/dissectors/packet-dcerpc.h
parent76ab93ea94787605d4c829620b51ff4dee105cb1 (diff)
downloadwireshark-01c8945438a739d650514ca29bcb6fbfd521cabc.tar.gz
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 'epan/dissectors/packet-dcerpc.h')
-rw-r--r--epan/dissectors/packet-dcerpc.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/epan/dissectors/packet-dcerpc.h b/epan/dissectors/packet-dcerpc.h
index 2a26bfc91d..01435864fa 100644
--- a/epan/dissectors/packet-dcerpc.h
+++ b/epan/dissectors/packet-dcerpc.h
@@ -381,11 +381,12 @@ dcerpc_sub_dissector *dcerpc_get_proto_sub_dissector(e_uuid_t *uuid, guint16 ver
value_string *value_string_from_subdissectors(dcerpc_sub_dissector *sd);
+/* Decode As... functionality */
+/* remove all bindings */
+WS_DLL_PUBLIC void decode_dcerpc_reset_all(void);
+typedef void (*decode_add_show_list_func)(gpointer data, gpointer user_data);
+WS_DLL_PUBLIC void decode_dcerpc_add_show_list(decode_add_show_list_func func, gpointer user_data);
-/* the init_protocol hooks. With MSVC and a
- * libwireshark.dll, we need a special declaration.
- */
-WS_DLL_PUBLIC GHookList dcerpc_hooks_init_protos;
/* the registered subdissectors. With MSVC and a
* libwireshark.dll, we need a special declaration.
@@ -451,11 +452,6 @@ typedef struct decode_dcerpc_bind_values_s {
guint16 ver;
} decode_dcerpc_bind_values_t;
-/* Helper for "decode as" dialog to set up a UUID/conversation binding. */
-WS_DLL_PUBLIC
-struct _dcerpc_bind_value *
-dcerpc_add_conv_to_bind_table(decode_dcerpc_bind_values_t *binding);
-
WS_DLL_PUBLIC
guint16
dcerpc_get_transport_salt (packet_info *pinfo);