aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk
AgeCommit message (Collapse)AuthorFilesLines
2018-06-26GTK+: Remove the last original bit of GTK+ code.Gerald Combs2-3658/+0
Change-Id: If1eedf278336494d6989515aa573ae1682851d44 Reviewed-on: https://code.wireshark.org/review/28464 Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-05Don't use dladdr() to get a pathname for the current executable().Guy Harris1-1/+1
Change-Id: I24ad11a659c2cb936f873339dc2b36ac9944280a Reviewed-on: https://code.wireshark.org/review/27359 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-17Switch the Doxygen API reference build to CMake.Gerald Combs1-26/+0
Switch to a single Doyxgen configuration which was generated using a recent version of Doxygen and customized to suit our needs. Add wsar_html and wsar_html_zip targets to CMake. Update some Doxygen markup and documentation as needed. Change-Id: Ic8a424b292c35a26f74ae0b53322265683e56e69 Reviewed-on: https://code.wireshark.org/review/26976 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-15Gtk: Remove source codeRoland Knall228-142409/+0
Removing all gtk source code, except for main.? which will remain for the official removal during SFUS18 Change-Id: I4273baf207df1eaaa4b94623cfd10bf74b1fc4a4 Reviewed-on: https://code.wireshark.org/review/26937 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2018-03-27tap: fix remaining potential memleaks with register_tap_listenerPeter Wu1-1/+9
Additionally, add an attribute to the tap function to prevent future callers from leaking this memory. Change-Id: Ief6af2bbc74d19153628f09d7b273e85cb2284ab Reviewed-on: https://code.wireshark.org/review/26642 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-26Qt: TCP Stream Graphs dialog updates.Gerald Combs1-0/+1
Add duplicate ACK ticks to Statistics → TCP Stream Graphs → Time Sequence (tcptrace), which I missed when porting from GTK+. Add zero window crosses while we're here. Switch TCPStreamDialog to a subclass of GeometryStateDialog. Add a slot and URL for the Help button and a stub entry in the User's Guide. Bug: 12009 Change-Id: Idf2ddb9eb33d924d65998285b5cffc234156497c Reviewed-on: https://code.wireshark.org/review/26592 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-24OID name resolv: Fix MIB/PIB path presentationsJaap Keuter1-1/+1
oids.c: Sort out libsmi init, add user paths once. Qt, About WS: Stop memory leak of MIB/PIB paths. GTK, About WS: Allow for 20 individual paths. tshark, folders: init before getting paths, allow 20 individual. Bug: 14539 Change-Id: I113ee2dd4394d553a16b256e66fd840eeeec78ef Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl> Reviewed-on: https://code.wireshark.org/review/26555 Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-12Remove some unused or hard-coded header checks.Gerald Combs1-2/+0
Remove some unused checks and code found using grep -o 'HAVE_[A-Z0-9_]*' ConfigureChecks.cmake | sort -u \ | while read have_h ; do echo = $have_h ; git --no-pager grep -cl $have_h ; done Change-Id: I86bfcfdc4f60d9d7de87017a7bb00f833a79bd2c Reviewed-on: https://code.wireshark.org/review/26451 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-02Remove the endpoint "Map" feature.Gerald Combs1-101/+0
Remove the endpoint map and its button from the Qt and GTK+ UIs. It depends on GeoIP Legacy for coordinate information and those databases are being deprecated in favor of MaxMind DB. We *could* upgrade the code to use mmdbresolve, but according to https://dev.maxmind.com/geoip/geoip2/geolite2/ they're also going to remove coordinate information from GeoLite2: "In addition, in 2019, latitude and longitude coordinates in the GeoLite2 databases will be removed.* Latitude and longitude coordinates will continue to be provided in GeoIP2 databases. Please check back for updates." Change-Id: I43e1593d282a0f1aae897b1f4724117d1496b21e Reviewed-on: https://code.wireshark.org/review/26229 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-01Qt: Make we shut down cleanly when exiting early.Gerald Combs1-0/+5
Add an exit_application() routine that calls wsApp->quit() + exit() in the Qt UI and exit() in the GTK+ UI. Make sure we call it instead of exit() when needed. Bug: 14395 Change-Id: I171b5fd19ce4664db4a2ebb4b8c33e278dcec427 Reviewed-on: https://code.wireshark.org/review/26121 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-24Rename airpdcap to dot11decrypt.Gerald Combs3-42/+42
Our 802.11 decryption code isn't tied to any specific product. Change the file and API names to dot11decrypt. Change-Id: I14fd951be3ae9b656a4e1959067fc0bdcc681ee2 Reviewed-on: https://code.wireshark.org/review/26058 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-21Squelch some cating-away-constness warnings.Guy Harris1-11/+11
Change-Id: I1ebe9b42957e0db5cc04f44e31f291cb40ba14e1 Reviewed-on: https://code.wireshark.org/review/25960 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-19Get rid of more new_ prefixes for statistics functions and types.Guy Harris2-27/+27
There are no "old" versions of them that we're keeping around. Change-Id: I3c76a14d0ec1a06df39c547da37f4dea9987df4d Reviewed-on: https://code.wireshark.org/review/25892 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17Don't have CLEAN_FILES variables for the "clean" source files.Guy Harris1-14/+13
Except for the one directory that (currently) has "not yet clean" files, epan/dissectors, we don't need a separate variable to keep track of the "clean" source files. In the cases where not all files were in CLEAN_FILES, put them into the variable used to enable -Werror or its equivalent. Change-Id: Ic4119861c1d9e381adfe31e9977e1ac71d623f5b Reviewed-on: https://code.wireshark.org/review/25830 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-15Suppress more PortAudio + Win64 compiler warnings.Gerald Combs1-1/+4
Add C4311 and C4312 to the suppression list. Change-Id: I90c85ee5cd3f7c3f235ed89b78d04f34bf0db449 Reviewed-on: https://code.wireshark.org/review/25810 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-10Separately count all records and data records.Guy Harris1-23/+34
A file might contain only metadata records, which exist only to provide information needed to interpret data records; no point in showing them in record counts. Put the counts into the structure that we fill in, and rename the structure and the routine to reflect that it determines statistics other than just times. Speak of data records rather than packets; the file might be full of Sysdig event records but not have any packets in it, for example. Change-Id: I8553181dca4129736bdae2c0cbba92becc28d6ef Reviewed-on: https://code.wireshark.org/review/25722 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-09Put the preview-generation loop into a common routine.Guy Harris1-53/+19
Don't have all the file open dialogs have their own copies. Change-Id: Icd6f2fd44b081575e6481a134027c90046938c64 Reviewed-on: https://code.wireshark.org/review/25717 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-09Generalize wtap_pkthdr into a structure for packet and non-packet records.Guy Harris7-20/+20
Separate the stuff that any record could have from the stuff that only particular record types have; put the latter into a union, and put all that into a wtap_rec structure. Add some record-type checks as necessary. Change-Id: Id6b3486858f826fce4b096c59231f463e44bfaa2 Reviewed-on: https://code.wireshark.org/review/25696 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-08replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.Dario Lombardo1-1/+1
The first is deprecated, as per https://spdx.org/licenses/. Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed Reviewed-on: https://code.wireshark.org/review/25661 Petri-Dish: Anders Broman <a.broman58@gmail.com> Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08Get rid of unneeded #includes.Guy Harris2-4/+0
Change-Id: Ica457e3fb2a6e2318ca1e03fb7b2569c7d8e6aba Reviewed-on: https://code.wireshark.org/review/25679 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-07Move summary.[ch] to libui.Guy Harris5-5/+5
Change-Id: I49f1eeb4fc3a90e436da116577a7d0c5ba982eee Reviewed-on: https://code.wireshark.org/review/25657 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-07Don't assume all packets have time stamps.Guy Harris1-31/+43
We explicitly allow the not to, and, for example, Simple Packet Blocks in pcapng files don't have time stamps. Change-Id: If1db5747c9e06faa7550162df8e04dc60b71d954 Reviewed-on: https://code.wireshark.org/review/25650 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-01-22gtk: fix memory leak in profile dialog.Jakub Zawadzki1-0/+1
fill_list() don't break the loop when it founds first profile matching name, and it can memleak if somehow it found more than one. Don't break the loop to avoid regressions. Just g_free() previously found. Found by clang. Change-Id: I082b3f1d16f07580a6d7c814d2a8ee5463a44b0f Reviewed-on: https://code.wireshark.org/review/25422 Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl> Tested-by: Petri Dish Buildbot Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-01-22gtk: Fix memory error/double free.Jakub Zawadzki1-2/+1
pathname is freed by caller of firewall_save_as_ok_cb(). Make pathname const. Found by clang scan. Change-Id: I3a0ab85494a9194edb825bae33eca979c7f8faf3 Reviewed-on: https://code.wireshark.org/review/25417 Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl> Tested-by: Petri Dish Buildbot Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-01-22gtk: Fix memory leak.Jakub Zawadzki1-0/+1
free buffer in error path. Found by clang scan. Change-Id: I7c271b74e3e5ac9d4f2a550f3c83988a4594133d Reviewed-on: https://code.wireshark.org/review/25416 Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl> Tested-by: Petri Dish Buildbot Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-01-22gtk: fix multiple memory leaks in prefs_captureJakub Zawadzki1-26/+16
All leaks follow the same pattern if not gtk_tree_model_get_iter_first(), than memory allocated was not used/ freed. Put memory allocation under gtk_tree_model_get_iter_first() block. Found by clang scan. Change-Id: I8f9671ae5fb043343ab5dcdc39a57f1d28fec15b Reviewed-on: https://code.wireshark.org/review/25418 Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl> Tested-by: Petri Dish Buildbot Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-01-18Make apply_profile_changes() return a non-const pointer.Guy Harris1-2/+2
It returns a pointer to a g_mallocated string, which the caller has to free, so its return value shouldn't be a const pointer. Change-Id: I76f288379a5c1eff580c391bdc9019ab7fe8f336 Reviewed-on: https://code.wireshark.org/review/25364 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-01-10Fix build with GTK+ and without libsmi and GeoIP.Guy Harris1-2/+0
Bug: 14318 Change-Id: I2121f3fec3f366ff77615be5a4d6518e02e4d07d Reviewed-on: https://code.wireshark.org/review/25240 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-01-09wiretap: add a parameter to wtap_init() indicating whether plugins must be ↵Pascal Quantin1-1/+1
loaded g995812c5f1 moved wiretap plugins registration from applications to wiretap library init function. As we do not want to load plugins for all users of libwiretap, let's make it configurable. Bug: 14314 Change-Id: Id8fdcc484e2d0d31d3ab0bd357d3a6678570f700 Reviewed-on: https://code.wireshark.org/review/25194 Reviewed-by: Dario Lombardo <lomato@gmail.com> Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-09Use pcapng as the name of the file format.Guy Harris4-11/+11
At one point, I remember a discussion resulting in the official name of the next-generation replacement for pcap format being changed to "pcapng", with no hyphen. Make Wireshark reflect that. Change-Id: Ie66fb13a0fe3a8682143106dab601952e9154e2a Reviewed-on: https://code.wireshark.org/review/25214 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-01-08Copy preferences to capture options after the preferences are initially loaded.Guy Harris1-0/+1
We copy them after, for example, switching profiles; we should do so when they're initially loaded as well. Change-Id: Iadd67d20b1be8cc14be1b19543f914f71e4c9c00 Reviewed-on: https://code.wireshark.org/review/25208 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-01-08extcap: remove conditional compilation.Dario Lombardo6-55/+5
Change-Id: Ia54bba388755cf27a343fe6d69d244bf1ab897f9 Reviewed-on: https://code.wireshark.org/review/25186 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-06Add ability for preferences to determine what they can change.Michael Mann6-36/+36
Add flags field to preference structure to help determine what areas of Wireshark are affected by a preference changing. The intent is to be able to distinguish dissection from GUI or other changes that are not dissection. The default is to have all preferences affect dissection, but their flags can be changed. This patch doesn't change any flags from the default. Change-Id: Ied5ae961bc3f33f5b730b2892fff3fa0898380b8 Reviewed-on: https://code.wireshark.org/review/25171 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-05Qt: Move sized toolbar images to stock_icons.Gerald Combs6-51/+51
The sized (WWxHH) icons in the toolbar directory aren't limited to toolbars. Create a "stock_icons" directory and move them and their related SVGs there. Change-Id: I2c1852499594aa738371c79542f24bd3351653bb Reviewed-on: https://code.wireshark.org/review/25133 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-03[glib-compat] Include <wsutil/glib-compat.h>Anders1-0/+1
Change-Id: Id505f1dc8dbbeb241162156fc3ef557599a251fb Reviewed-on: https://code.wireshark.org/review/25123 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-29Populate Remote Interfaces with data from recent fileMichael Mann1-0/+45
Remote Interfaces have been saved in the recent_common file however they were never populated by the GUI. Bug: 8557 Change-Id: Ib68a75ce02f5b5e2c115b72d58c3e781a5122f9f Reviewed-on: https://code.wireshark.org/review/25039 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-14Remove a plugin_if_gui_cb type conversion.Gerald Combs3-14/+8
We always pass a GHashTable * to plugin_if_gui_cb so don't cast it to a gconstpointer. This should fix the following and related warnings: main_window.cpp: In function ‘void plugin_if_mainwindow_apply_filter(gconstpointer)’: main_window.cpp:121:44: warning: cast from type ‘gconstpointer {aka const void*}’ to type ‘GHashTable* {aka _GHashTable*}’ casts away qualifiers [-Wcast-qual] GHashTable * data_set = (GHashTable *) user_data; Fix another const warning while we're here. Change-Id: Ia9225188bfb913feb4fef4369f10fd5791fc8dc9 Reviewed-on: https://code.wireshark.org/review/24830 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-14Refactor plugin registration and loadingJoão Valverde1-19/+4
Put different types of plugins (libwiretap, libwireshark) in different subdirectories, give libwiretap and libwireshark init routines that load the plugins, and have them scan the appropriate subdirectories so that we don't even *try* to, for example, load libwireshark plugins in programs that only use libwiretap. Compiled plugins are stored in subfolders of the plugin folders, with the subfolder name being the Wireshark minor version number (X.Y). There is another hierarchical level for each Wireshark library (libwireshark, libwscodecs and libwiretap). The folder names are respectively plugins/X.Y/{epan,codecs,wiretap}. Currently we only distribute "epan" (libwireshark) plugins. Change-Id: I3438787a6f45820d64ba4ca91cbe3c8864708acb Reviewed-on: https://code.wireshark.org/review/23983 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2017-12-11Revert "Move fill_in_local_interfaces to a thread."Gerald Combs2-4/+2
Calling scan_local_interfaces ends up calling fork via extcap. Doing so from a thread is ill-adivsed: https://rachelbythebay.com/w/2014/08/16/forkenv/ http://www.linuxprogrammingblog.com/threads-and-fork-think-twice-before-using-them This reverts commit 5b4894b7959f44e077f36194c490cbf402e1e659. Revert "fix compilation without pcap." as well. This reverts commit 51300b3c834a3877d567fb57ae78ec74ec8ba80d. Change-Id: Ic80582b52398c44af73c6d74dbb3216c4d1b37fc Reviewed-on: https://code.wireshark.org/review/24772 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-11Fix make distcheckJoão Valverde1-5/+3
Change-Id: I0c5a31d423d19071dc6ed0a42b064271e5f63fd2 Reviewed-on: https://code.wireshark.org/review/24769 Reviewed-by: João Valverde <j@v6e.pt>
2017-12-11Move fill_in_local_interfaces to a thread.Gerald Combs2-2/+4
Move fill_in_local_interfaces to a worker thread and start it as early as possible. Add a mutex for global_capture_opts. Change-Id: I09beab751c9c2917f017b6c082166d86ca693544 Reviewed-on: https://code.wireshark.org/review/24757 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-11Rewrite make-tap-reg.py in CJoão Valverde3-48/+32
Change-Id: Ief5b1fffecc9712c01ff10292c403b7c84a5908a Reviewed-on: https://code.wireshark.org/review/24756 Reviewed-by: João Valverde <j@v6e.pt>
2017-12-08Have the frame_tvbuff.c routines not use the global cfile.Guy Harris61-28/+125
Have the routines that create them take a pointer to a struct packet_provider_data, store that in the tvbuff data, and use it to get the wtap from which packets are being read. While we're at it, don't include globals.h in any header files, and include it in source files iff the source file actually uses cfile. Add whatever includes that requires. Change-Id: I9f1ee391f951dc427ff62c80f67aa4877a37c229 Reviewed-on: https://code.wireshark.org/review/24733 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-08Move the frame_set stuff back into the capture_file structure.Guy Harris3-11/+11
libwireshark now expects an epan_t to be created with a pointer to a "packet provider" structure; that structure is opaque within libwireshark, and a pointer to it is passed to the callbacks that provide interface names, interface, descriptions, user comments, and packet time stamps, and that set user comments. The code that calls epan_new() is expected to provide those callbacks, and to define the structure, which can be used by the providers. If none of the callbacks need that extra information, the "packet provider" structure can be null. Have a "file" packet provider for all the programs that provide packets from a file. Change-Id: I4b5709a3dd7b098ebd7d2a7d95bcdd7b5903c1a0 Reviewed-on: https://code.wireshark.org/review/24731 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-05Convert the file set dialog treewidget to a treeview+model.Gerald Combs1-13/+3
Add a FilesetEntryModel and use it in FileSetDialog. This should be faster than using a QTreeWidget. Move dialog updates and date calculations out of the "add file" loop. Bug: 11280 Bug: 14242 Change-Id: I702cef4fe91e739695fe805dc5e496bf3db411f1 Reviewed-on: https://code.wireshark.org/review/24708 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-04Put the structure of a capture_file back in cfile.h.Guy Harris1-1/+0
The split isn't necessary now that epan no longer uses the capture_file structure. Change-Id: Ia232712a2fb5db511865805518e8d03509b2167f Reviewed-on: https://code.wireshark.org/review/24693 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-04Move the parts of a capture_file used by libwireshark to a new structure.Guy Harris3-11/+11
Embed one of those structures in a capture_file, and have a struct epan_session point to that structure rather than to a capture_file. Pass that structure to the routines that fetch data that libwireshark uses when dissecting. That separates the stuff that libwireshark expects from the stuff that it doesn't look at. Change-Id: Ia3cd28efb9622476437a2ce32204597fae720877 Reviewed-on: https://code.wireshark.org/review/24692 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-03Use cfile.h to define the capture_file type.Guy Harris1-0/+1
Have cfile-int.h declare the structure, and use it in files that directly access the structure. Have cfile.h just incompletely declare the structure and include it rather than explicitly declaring it in source files or other header files. Never directly refer to struct _capture_file except when typedeffing capture_file. Add #includes as necessary, now that cfile.h doesn't drag in a ton of Change-Id: I7931c8039d75ff7c980b0f2a6e221f20e602a556 Reviewed-on: https://code.wireshark.org/review/24686 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-11-29Threads: Set lifetimes and add a compatibility routine.Gerald Combs1-4/+0
Join the protocol registration threads so that they call g_thread_unref which in turn detaches/terminates the thread. This gets rid of many TSan and DRD errors here. The remaining ones appear to be false positives. Add g_thread_new to glib-compat (untested). Change-Id: I4beb6746ed08656715cf7870ac63ff80cf1ef871 Reviewed-on: https://code.wireshark.org/review/24619 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-26Bugfix DCE/RPC Decode As for GTK.Michael Mann1-2/+4
An attempt at optimization broke GTK DCE/RPC Decode As because DCE/RPC dissector tables aren't FT_UINT type. The "optimization" was trying to retrieve dissector handle from FT_UINT typed dissector table. Move retrieval of dissector handle to under FT_UINT check Change-Id: Id81cd79db60263155392aaac0c796a6484ef7504 Reviewed-on: https://code.wireshark.org/review/24589 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>