aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/decode_as_dlg.c
AgeCommit message (Collapse)AuthorFilesLines
2015-12-23ui: Plug memory leak in decode_build_reset_list.Stig Bjørlykke1-1/+1
The strings passed to decode_build_reset_list() is not freed, so ensure we cleanup in decode_clear_all(). Change-Id: Ib68bde71403e260199482831272beb161fe033f9 Reviewed-on: https://code.wireshark.org/review/12836 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-04Refactor DCE/RPC dissection to include a real dissector table.Michael Mann1-2/+1
This is hopefully just the first step in getting DCE/RPC dissection to use "standard" APIs instead of homegrown ones. For starters, it allows Decode As functionality to be less hacky (although incomplete in Qt) Change-Id: Ia0923a3d8d514ab7acce32e26ee7e08f6e24feca Reviewed-on: https://code.wireshark.org/review/11468 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-05Move utf8_entities.h to wsutilJoão Valverde1-1/+1
Change-Id: I6298b3de5f0a1cb988014ff16082eaf8c2a3c3c0 Reviewed-on: https://code.wireshark.org/review/10786 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-19Fix 'Decode As' when used with IPv6-in-IPv6 packetsPascal Quantin1-4/+15
Add the ability to identify an instance of the dissector table to be modified by 'Decode As' thanks to pinfo->curr_layer_num For now only IPv6 makes use of it but it could be extended to any other protocol Also get rid of ipv6.nxt protocol: it is not required for 'Decode As' functionality and was colliding with ipv6.nxt field Change-Id: I3c7403c77328ad7170e13af028d178f962a2b508 Reviewed-on: https://code.wireshark.org/review/10552 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-07-01Explicitly check for DCE/RPC dissector name in the Decode As dialog because ↵Michael Mann1-3/+2
it doesn't have a specific subdissector table to invoke the DCE/RPC "Decode As" tab. bug:10368 Change-Id: Iff94ddaf0c9f4d002be89dab480b6f9550ebd82f Reviewed-on: https://code.wireshark.org/review/3575 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Cal Turney <cturney@charter.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-15ui/gtk/*.c: Add editor modelines; As needed: Fix indentationBill Meier1-62/+75
Change-Id: I8cd9d9fe5f12c284f46b8f725766f681faccd753 Reviewed-on: https://code.wireshark.org/review/7138 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-15Enable case-insensitive string dissector tablesEvan Huus1-1/+1
Permit passing TRUE as the parameter during table registration to achieve that effect. Use it in RTP media type table. Bug: 10708 Change-Id: I892fb1a421d349f0c05197dec90f14fc34ad6b97 Reviewed-on: https://code.wireshark.org/review/5695 Reviewed-by: Evan Huus <eapache@gmail.com> Petri-Dish: Evan Huus <eapache@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-08-04Write out decode_as entries from the actual dissector tables.Guy Harris1-21/+1
Have a save_decode_as_entries() routine in ui/decode_as_utils.c, that does all the work of saving the entries by iterating through all the changed entries with dissector_all_tables_foreach_changed(). When doing so, write out the selector for integral values in decimal, as older versions of Wireshark only handled decimal values, and some of those older versions are EOLed and won't be fixed. Change-Id: I2dab461604524b98e3515867839a4b86c86c5d7b Reviewed-on: https://code.wireshark.org/review/3426 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-12Get rid of more tvb_get_nstringz* calls.Guy Harris1-0/+2
Add an FT_STRINGZPAD type, for null-padded strings (typically fixed-length fields, where the string can be up to the length of the field, and is null-padded if it's shorter than that), and use it. Use IS_FT_STRING() in more cases, so that less code needs to know what types are string types. Add a tvb_get_stringzpad() routine, which gets null-padded strings. Currently, it does the same thing that tvb_get_string_enc() does, but that might change if we don't store string values as null-terminated strings. Change-Id: I46f56e130de8f419a19b56ded914e24cc7518a66 Reviewed-on: https://code.wireshark.org/review/1082 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-03-11Migrate GTK icon handling to GTK 3.10 APIBalint Reczey1-1/+2
GtkStockItem usage is deprecated with all the GTK_STOCK_.* stock ids. We keep a stock id based approach but without relying on GTK's GtkStockItem system. We create our own internal stock ids for {icon, label} tuples and keep the original GTK stock id #define-s and values to preserve backward compatibility. Change-Id: Ia0b35a5903f079e92c8026e3df21bbf0be2d06b0 Reviewed-on: https://code.wireshark.org/review/302 Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-02-25Remove trailing whitespaceBill Meier1-4/+4
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0 Reviewed-on: https://code.wireshark.org/review/385 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2013-12-10Get the "Decode As" dialog working, albeit with a few warts. It differsGerald Combs1-32/+8
from the GTK flavor in two major ways: - The "Decode As" and "User Specified Decodes" dialog have been unified. - You can modify the decode as behavior at any time, not just when you have a packet selected. Revert part of 53498 so that we can move items marked /*** THE FOLLOWING SHOULD NOT BE USED BY ANY DISSECTORS!!! ***/ from epan/decode_as.h to ui/decode_as_utils.h. Move "save" code from decode_as_dlg.c to decode_as_utils.c as well. In packet-dcerpc.c don't register a table named "ethertype". We might want to add checks for duplicate table names. To do: - Add support for ranges? - Either add support for DCERPC or make DCERPC use a regular dissector table. - Fix string selectors (i.e. BER). svn path=/trunk/; revision=53910
2013-11-29Restore disabled "decode as" settings.Gerald Combs1-3/+3
svn path=/trunk/; revision=53635
2013-11-22Remove a commented-out duplicate dissector_table definition.Gerald Combs1-11/+0
svn path=/trunk/; revision=53500
2013-11-22Add an initial "Decode As" dialog. Currently read-only.Gerald Combs1-2/+2
Fixup some of the Statistics menu items. svn path=/trunk/; revision=53499
2013-11-22Move common "decode as" preference code to epan.Gerald Combs1-239/+13
We presumably want "decode as" behavior to be consistent across UIs so call load_decode_as_entries() from read_prefs(). svn path=/trunk/; revision=53498
2013-11-20Provide "Decode As" functionality through dissectors themselves instead of ↵Michael Mann1-745/+221
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
2013-11-17Move the epan/filesystem.c routines to wsutil; they're not specific toGuy Harris1-1/+1
packet dissection, they're specific to the entire Wireshark suite of programs. svn path=/trunk/; revision=53377
2013-11-08Another one.Guy Harris1-1/+1
svn path=/trunk/; revision=53165
2013-11-08What matters is the encapsulation type, not the file type, so just testGuy Harris1-1/+1
for WTAP_ENCAP_BER, not for WTAP_FILE_BER. svn path=/trunk/; revision=53164
2013-05-22Make routines not used outside their source files static.Guy Harris1-5/+11
svn path=/trunk/; revision=49522
2013-04-09Don't try to open <home>/.wireshark on Windows: Wireshark hasn't written toJeff Morriss1-2/+2
that directory since 2001 and reading from that directory was only left in for backwards compatibility with versions prior to r4702. I think it's now safe to remove that backwards compatibility. This eliminates the last argument of get_persconffile_path(). https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8437 svn path=/trunk/; revision=48797
2013-03-28From Michal Labedzki via ↵Evan Huus1-1/+3
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8530 Enable "Decode As" for Bluetooth over USB. svn path=/trunk/; revision=48605
2013-03-24Redissect extra packet windows in all cases (that I know of) where weEvan Huus1-0/+4
redissect normal packet list. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8482 svn path=/trunk/; revision=48528
2013-03-21From beroset:Bill Meier1-8/+8
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10404 Note: The following parts of the patch had been previously done: asn1/snmp/packet-snmp-template.c epan/dissectors/packet-snmp.c epan/dissectors/packet-x11.c Also; hostlist_table.c: code under '#ifdef HAVE_GEOIP' didn't compile and needed a few additional patches. svn path=/trunk/; revision=48447
2013-03-07Use explicit casts.Anders Broman1-42/+42
svn path=/trunk/; revision=48179
2013-02-21Minor Bluetooth fixesMichael Mann1-2/+14
1. Allow to DecodeBy payload over AVCTP 2. Fix L2CAP CID payload recognize after disc 3. Removed unneeded _U_ 4. Fall back to control channel in AVRCP 5. Fix time-tracking for passthrough and capability AVRCP commands From Michal Labedzki, bug 8367 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8367) svn path=/trunk/; revision=47810
2013-01-14Fix Coverity CID 741991: Wrong sizeof argument.Chris Maynard1-1/+1
svn path=/trunk/; revision=47074
2012-12-26Fix a bunch of warnings.Guy Harris1-6/+6
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of sizeof. Cast away some implicit 64-bit-to-32-bit conversion errors due to use of strtol() and strtoul(). Change some data types to avoid those implicit conversion warnings. When assigning a constant to a float, make sure the constant isn't a double, by appending "f" to the constant. Constify a bunch of variables, parameters, and return values to eliminate warnings due to strings being given const qualifiers. Cast away those warnings in some cases where an API we don't control forces us to do so. Enable a bunch of additional warnings by default. Note why at least some of the other warnings aren't enabled. randpkt.c and text2pcap.c are used to build programs, so they don't need to be in EXTRA_DIST. If the user specifies --enable-warnings-as-errors, add -Werror *even if the user specified --enable-extra-gcc-flags; assume they know what they're doing and are willing to have the compile fail due to the extra GCC warnings being treated as errors. svn path=/trunk/; revision=46748
2012-12-22Remove unneeded initializations, and one redundant if condition.Evan Huus1-1/+1
svn path=/trunk/; revision=46702
2012-11-06Try to make the decode as window look a bit nicer.Anders Broman1-22/+22
svn path=/trunk/; revision=45947
2012-11-05Initialize variables.Anders Broman1-5/+5
svn path=/trunk/; revision=45916
2012-11-05From Michal Labedzki:Anders Broman1-5/+186
"Decode By" for Bluetooth support decoding by L2CAP service, L2CAP CID, L2CAP PSM, RFCOMM service and RFCOMM channel. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7754 svn path=/trunk/; revision=45913
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45016
2012-09-10From Rick Krull:Anders Broman1-0/+1
One can't resize the columns on several "tree views". The one that I ran into was "Decode As: Show". I added "set_resizable" to make it resizable. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7706 svn path=/trunk/; revision=44828
2012-08-01Move utf8_entities.h to the "ui" directory. Separate packet informationGerald Combs1-1/+1
items with MIDDLE DOTs. svn path=/trunk/; revision=44194
2012-08-01#include old-gtk-compat.h in order to get compilation working with older gtks.Jeff Morriss1-0/+1
svn path=/trunk/; revision=44188
2012-08-01Get rid of some GTK_CHECK_VERSION instances by using compabillity macros.Anders Broman1-8/+0
svn path=/trunk/; revision=44186
2012-07-20Decode as: Don't add notebook twice to hbox (fix r43825)Jakub Zawadzki1-2/+1
svn path=/trunk/; revision=43873
2012-07-19Shoul be gtk_box_pack_start(GTK_BOX (vbox), message_type_fr, TRUE, TRUE, 0);Anders Broman1-1/+1
svn path=/trunk/; revision=43828
2012-07-19gtk_container_add() -> gtk_box_pack_start().Anders Broman1-0/+1
svn path=/trunk/; revision=43825
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-06-01Only propose decoding PPID 0 if that PPID is in the currently-selected frame.Jeff Morriss1-21/+20
(I used PPID 0xffffffff as an end-of-list marker so that PPID can no longer be used in this dialog; if someone starts using that PPID then we'll have to put a count of PPIDs in pinfo.) svn path=/trunk/; revision=42991
2012-05-25If either create_persconffile_dir() or ws_fopen() fail, then bail out. This ↵Chris Maynard1-0/+2
avoids potentially dereferencing "daf" if it's NULL and fixes Coverity CID 281275. svn path=/trunk/; revision=42841
2012-04-20Replace gtk_vbox_new() and gtk_hbox_new() with ws_gtk_box_new().Anders Broman1-10/+10
svn path=/trunk/; revision=42161
2012-01-16Move some headers for UI stuff, and the alert_box.c UI-specific file, toGuy Harris1-1/+1
the ui directory. (Perhaps some other files that would be used by all flavors of Wireshark, for any GUI toolkit or for someting such as ncurses, and not for any command-line tool such as TShark, should be moved there as well.) Shuffle some #includes to put the "ui/XXX.h" includes together. svn path=/trunk/; revision=40529
2012-01-15Move gtk to ui/gtk.Jörg Mayer1-0/+2038
This looses the last checkin to gtk, will add this manually back. svn path=/trunk/; revision=40518