Wireshark-commits: [Wireshark-commits] rev 53446: /trunk/ /trunk/epan/dissectors/: packet-dcerpc.c

Date: Wed, 20 Nov 2013 19:23:03 GMT
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=53446

User: mmann
Date: 2013/11/20 07:23 PM

Log:
 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.

Directory: /trunk/epan/dissectors/
  Changes    Path               Action
  +306 -80   packet-dcerpc.c    Modified
  +5 -9      packet-dcerpc.h    Modified

Directory: /trunk/ui/gtk/
  Changes    Path                  Action
  +0 -4      Makefile.common       Modified
  +0 -137    decode_as_ber.c       Removed
  +0 -39     decode_as_ber.h       Removed
  +0 -422    decode_as_dcerpc.c    Removed
  +0 -156    decode_as_dcerpc.h    Removed
  +220 -744  decode_as_dlg.c       Modified
  +9 -8      decode_as_dlg.h       Modified
  +0 -1      main.c                Modified