Commit Graph

67 Commits

Author SHA1 Message Date
Pascal Quantin a383e692c8 Revert "tap: change glib functions to wmem."
This reverts commit 2e9f3c5d36.

It breaks the registration of codec, dissector and libwiretap plugins.

Change-Id: I4ef91dd192f765adf87ea9fe9f3693e25dbd24de
Reviewed-on: https://code.wireshark.org/review/16012
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-19 10:47:10 +00:00
Guy Harris 8634cee96d Put #ifdef/#endif around a variable used only on Windows.
Change-Id: Ia6fed6db03cb88433469e758693fcc72c4bd9071
Reviewed-on: https://code.wireshark.org/review/16009
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-19 07:39:57 +00:00
Michael Mann 9b5b4443cf Refactor command-line handling of GUI options.
Both GTK and Qt both use the same command-line options, so refactor
the parsing and (possibly) applying of those arguments to a single
location.

Ping-Bug: 12546
Change-Id: Ib31e576c509c5d3d21c33d3247640d9f9c68661b
Reviewed-on: https://code.wireshark.org/review/16006
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-19 05:56:45 +00:00
Dario Lombardo 2e9f3c5d36 tap: change glib functions to wmem.
Change-Id: I878ae6b121a669f9b7f4e1e57bc079f0cb44c0bf
Reviewed-on: https://code.wireshark.org/review/15270
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-17 15:38:03 +00:00
Pascal Quantin f3e120816c Qt: add some cleanup function calls missing when leaving application
Change-Id: I8f22d321e84daa36d4a40856b61d0844d3489cc2
Reviewed-on: https://code.wireshark.org/review/15374
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-05-13 12:53:56 +00:00
Pascal Quantin 95f47187c7 Qt: fix loading of profile by command line
recent_read_static() must be called before processing the -C option
as it will select the last profile used.
While we are at it, add a missing profile_store_persconffiles(FALSE) call
to match what is done in GTK based UI

Bug: 12425
Change-Id: I9cfdca3ed25f0ed97535178973e3f0427b9ad2b1
Reviewed-on: https://code.wireshark.org/review/15371
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-11 14:19:33 +00:00
João Valverde 3db13a7fc9 Link version code statically again
This allows keeping the code-sharing with the static linking.

This "fixes" a hypothetical ABI mismatch with wsutil and avoids pulling more
external dependencies to wsutil than strictly necessary.

A nice side-effect is that libwsutil no longer depends on version.h.

Follow up to f95976eefc.

Change-Id: I8f0d6a557ab3f7ce6f0e2c269124c89f29d6ad23
Reviewed-on: https://code.wireshark.org/review/15002
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-04-21 18:59:56 +00:00
João Valverde ecb4dc396e Include ws_diag_control.h in config.h
Change-Id: Ia394071710ecda3b0e6686a51fbca45a8ff20317
Reviewed-on: https://code.wireshark.org/review/14749
Petri-Dish: João Valverde <j@v6e.pt>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-04-04 23:05:31 +00:00
João Valverde e005bc819c Remove synchronous DNS name resolution
Change-Id: Ie5e670b769eb0674950f3679ef511047641c2873
Reviewed-on: https://code.wireshark.org/review/14751
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-04-04 06:49:55 +00:00
João Valverde f95976eefc Move zlib version check to wsutil
Change-Id: I0950f61e90af5bb21c0017204de0c0b509616e5c
Reviewed-on: https://code.wireshark.org/review/14747
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-04-03 02:58:04 +00:00
Guy Harris f0ada20a91 Make failure_alert_box() be printf-like.
Have it be printf-like, and have vfailure_alert_box() be vprintf-like.

Rename a few variables to make it clearer what pointers point to
vprintf-like functions.

Change-Id: I960e2138a18edcc742c450d68a0c6f7248f50c3f
Reviewed-on: https://code.wireshark.org/review/14646
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-03-27 02:06:28 +00:00
Gerald Combs 6ed543dbe6 Remove the last remnants of U3 support.
Change-Id: Ide4c177e67a77c5f9495b3b4c0f817f40e6dde30
Reviewed-on: https://code.wireshark.org/review/14425
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-03-11 19:55:57 +00:00
Peter Wu 8899e006aa Fix memleaks related to get_dirname
get_dirname may return NULL instead of the original string, so avoid
patterns like get_dirname(strdup(x)). Writing to
cf_path.toUtf8().data() is fine btw, toUtf8() returns new memory.

This fixes two memleak reported by LeakSanitizer via fileset_add_dir and
MainWindow::captureFileReadFinished (both via cf_callback_invoke).

Change-Id: I0f1528763e77e1f55b54b6674c890a9d02302ee8
Reviewed-on: https://code.wireshark.org/review/13691
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-04 04:57:30 +00:00
Roland Knall 927ffaa794 extcap: Add Save functionality to options dialog
This patch creates the functionality of saving all parameters
for extcap devices in the general preference section.

For now, multiselect and fileselect do not save their values
but patches for this will be provided in the future

Also, all preferences are stored as strings to make handling
easier. This might change in the future, but for the first version
it will stick.

Restore to Defaults is not implemented as of yet, and will be
in a future version, once the preference storing is finalized

Bug: 11666
Change-Id: I178346405146d2e43f4f3481c05c92c0b3595af5
Reviewed-on: https://code.wireshark.org/review/13451
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-02-01 12:12:41 +00:00
Guy Harris ee9f102aa9 No need for toolkit-dependent color initialization.
We're not allocating colors ourselves in GTK+ (and haven't been doing so
since at least 1.12), and all color_t values are valid colors, so
we don't need any toolkit-specific processing to fill in a color_t.

While we're at it, catch read errors when reading color filter files.

Change-Id: Ieb520d141cf15e371a31a01459d466c95ba2209b
Reviewed-on: https://code.wireshark.org/review/12985
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-01 04:15:29 +00:00
Alexis La Goutte 6c42a103e8 Qt: Add support of gui.window_title
Ping-Bug: 11102
Bug: 11691
Change-Id: I7b1673ffafcda644f4905265061ba11733dd91d3
Reviewed-on: https://code.wireshark.org/review/12650
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-12-29 18:00:47 +00:00
Michael Mann 5e4bbcda98 Refactor GUI dependencies out of color_filters.[ch] and move it to epan directory.
This also moved color.h into color_filters.h

Change-Id: Ic19e27aa1b3ec67e764aa7ee8bbef7b1187bb12e
Reviewed-on: https://code.wireshark.org/review/12831
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-12-28 18:33:41 +00:00
Michael Mann 444dfda793 Allow "capture info data" to not be a singleton.
It was buried as a static variable in capture_info.c, and functions were refactored to allow a pointer to the info_data_t structure to be passed in. TShark and GTK will have their own single (global) copy of the structure, while it opens up Qt to have multiple instances.

Change-Id: Ic2d7a2ad574de43f457cb18b194d6bc3fffb6120
Reviewed-on: https://code.wireshark.org/review/12691
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-12-19 14:22:56 +00:00
Pascal Quantin bfe73e3ad7 Qt: save custom colors in recent_common file
This allows to save colors across sessions for systems other than
OSX that do not provide a system wide color picker

While we are at it, let's stop reading the recent file twice at startup

Bug: 11888
Change-Id: I69ff14d699d8111fe6a8bdac0157fcd115a60c2b
Reviewed-on: https://code.wireshark.org/review/12659
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-16 06:53:24 +00:00
Pascal Quantin 3efc87726c Qt: apply '-Y' display filter unconditionally and not only when opening a capture file
Bug: 11891
Change-Id: I20c4497bdf255627c845f5d6fba2ad7797815b08
Reviewed-on: https://code.wireshark.org/review/12645
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-12-15 10:34:49 +00:00
João Valverde fbf2e3cf8f Make init_progfile_dir() take a function pointer [-Wpedantic]
Change-Id: I45f8ea5ee6ccc5a484c60ad6e686aaf30f6b0c98
Reviewed-on: https://code.wireshark.org/review/12557
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-14 23:52:28 +00:00
Stig Bjørlykke cda4b0f4b7 Qt: Start with correct seconds format
Set seconds type from recent values at startup.

Change-Id: I761f4e25f41cf9eae666196fe5cd69ef9f87556f
Reviewed-on: https://code.wireshark.org/review/12582
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-13 11:57:01 +00:00
João Valverde 2aab706c5a Remove -Wwrite-strings compiler flag
The "-Wwrite-strings" flag produces nuisance warnings. These warnings are
not useful, they're impossible to fix in a sane way and therefore are being
handled with casts of static strings to (char *).

This just moves the warning to [-Wcast-qual] and a compiler pragma is
in turn required (and used) to squelch that warning.

Remove the Wwrite-strings warning. Let that responsibility fall on the
programmer (as is done by casting).

Change-Id: I5a44dfd9decd6d80797a521a3373593074962fb5
Reviewed-on: https://code.wireshark.org/review/12162
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-12 16:21:19 +00:00
Stig Bjørlykke bfcd1e6514 Qt: Reset preferences when reloading Lua plugins
Reading configuration files may duplicate some entries, so ensure
we reset preferences before reloading.

Change-Id: I746414cbc10c206ddf47669856f329b9e0202a0d
Reviewed-on: https://code.wireshark.org/review/12496
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-10 14:08:58 +00:00
Guy Harris 3a54b294df More libcodecs -> libwscodecs.
Change-Id: Ieb0bb131b6d141bf85997c9a0127e0eb11ea3a3b
Reviewed-on: https://code.wireshark.org/review/12420
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-04 00:10:28 +00:00
Pascal Quantin fb3d38225e Update user guide for development release
Change-Id: I9b4c5ab2e98ad6daa618bcda20b53a23467e16e0
Reviewed-on: https://code.wireshark.org/review/11734
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-11 17:31:31 +00:00
Guy Harris c7e42be2e5 Catch REPORT_DISSECTOR_BUG() calls in dissector registration routines.
Have epan_init() return a success/failure Boolean indication.  Catch
exceptions when calling the dissector registration routines and, if we
get one, report the error and return a failure indication.

If epan_init() fails, quit, but first make sure the reported error is
displayed.

Change-Id: I0300cbb1f66a5644f857a205235124909d684c50
Reviewed-on: https://code.wireshark.org/review/11340
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-28 00:44:26 +00:00
Peter Wu c647faa8a9 Fix various memleaks
Found by starting Wireshark within an empty profile, opening
Preferences, search for Protocol "IEEE 802.11" (because it has radio
buttons), then close everything again.

Many fixes are trivial, but the various recent_read_* functions in
recent.c were changed to return a boolean such that the result can
always be checked even if errno==0.

QButtonGroup leak was hinted by Clang Static Analyzer, all other
memleaks were found using ASAN/LSan.

Change-Id: Ia73f5d4c09d92f22e72377be59e23342f8ad7211
Reviewed-on: https://code.wireshark.org/review/10776
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-10-04 15:45:02 +00:00
Gerald Combs 9498c8d84a Qt: Show the QtMultimedia status.
Show the QtMultimedia status in the compiled version info instead of
PortAudio.

Change-Id: Id4a657b1a65e4d0127a3a36643d1c446ed79b8e5
Reviewed-on: https://code.wireshark.org/review/10742
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-02 18:29:41 +00:00
Gerald Combs b4e972b729 Fix a bunch of leaks found by Valgrind.
Change-Id: I8862ed15d354aee487bacd80ab5fb4918423287e
Reviewed-on: https://code.wireshark.org/review/10487
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-11 20:37:09 +00:00
Hadriel Kaplan 190e313e9d DNS: move DNS name resolution pref to Name Resolution prefs
Move the boolean flag for using captured DNS packet info for name resolution
to the Name Resolution preferences settings, as it was rather surprising to
disable Name Resolution preferences and still have names being resolved. Also
disble them all if the '-n' command line switch is used, and re-enable it for
a 'd' character in the '-N' option.

Bug: 10337
Change-Id: Ie4d47bab0100db3360cc447cd3e446b2e39aa917
Reviewed-on: https://code.wireshark.org/review/9786
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-07-25 17:05:01 +00:00
Pascal Quantin 6452caa3b3 Fix retrieval of data link type supported by remote interfaces with authentication
Make use of -A parameter when querying data link types supported by a given interface with dumpcap.
Ensure to pass the authentication parameters configured for a remote interface when calling capture_get_if_capabilities()

Bug: 11366
Change-Id: I4efea615084a82108e4a12a64e8c46817f30a5c6
Reviewed-on: https://code.wireshark.org/review/9690
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-22 07:10:10 +00:00
Jim Young ad82dfd554 Add new long options to GUIs to allow arbitrary protocols and heuristics to be disabled via command-line
Future: Allow multiple protocols to be disabled in one option statement
(perhaps using a comma or colon delmited set of names in <proto_name>)
instead of having to specify --disable-protocol <proto_name> multiple times.

Change-Id: I9b8f960acf75298ebb098d9b667fca49dca52306
Reviewed-on: https://code.wireshark.org/review/9631
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-07-17 11:27:52 +00:00
Pascal Quantin a41e8e6623 Qt: fix detection of WinPcap / AirPcap
Libraries must be loaded before calling get_runtime_version_info()

Change-Id: Ic95ccde4ce80338b058a22a653736b663c517b38
Reviewed-on: https://code.wireshark.org/review/9637
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-07-15 18:55:25 +00:00
Michael Mann cdeae7e72b Add a "heuristic dissectors" tab to the Enable Protocols dialog.
This allows for a global place to enable/disable all heuristic dissectors.  This removes the need for individual dissector preferences, but those will be removed at a later date.  The more important part is the epan code to save/restore the enabled state of the heuristic dissector.  The GTK dialog was more for quickly testing the feature (there was already some GTK code in place that started the heuristic dialog tab)

Change-Id: Ie10687505c27a4456c49d5c4c69a5fc5f6394275
Ping-Bug:11152
Reviewed-on: https://code.wireshark.org/review/9508
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-07-14 11:28:55 +00:00
Gerald Combs 4eca268935 Add SimpleStatisticsDialog.
To do:
- Refactor dynamic menu item placement.

Change-Id: I087de9f2fa3c2ff7dc08e5d54bc9c1b984fdd7b1
Reviewed-on: https://code.wireshark.org/review/9561
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-08 17:01:15 +00:00
Gerald Combs e93fa8a82d Add ResponseTimeDelayDialog.
Change-Id: Ie1ea316643a3465763aec71f4a3ef4bf1a5ae639
Reviewed-on: https://code.wireshark.org/review/9548
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-07 23:17:51 +00:00
Gerald Combs fdb85029fd Add ServiceResponseTimeDialog.
Add ServiceResponseTimeDialog as a subclass of TapParameterDialog,
similar to StatsTreeDialog. Add initial plumbing for statistics menu
items and command line invocation.

Don't append "..." to menu item names. Don't add menu icons. In each
case this avoids repetitive UI clutter.

Change-Id: I463b95c93090160bb81d2e80b16aad389dc0bd6c
Reviewed-on: https://code.wireshark.org/review/8864
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03 23:09:13 +00:00
Pascal Quantin 60f33b6581 Qt: fix a crash when closing application under Windows
QCoreApplication visits eldritch horrors upon argv on Windows. Keep a
local copy for our own processing.

---
[ Pascal's original comments ]
g6c4ec4a introduced the use of arg_list_utf_16to8 that triggers a crash on my
computer when freeing the g_allocated memory.
Let's do a similar work but with a memory allocator that does not trigger an exception.

Also fix a memory leak in arg_list_utf_16to8 while we are at it.

Change-Id: I93d899af20b09c9a5d584a46297f715591502df9
Reviewed-on: https://code.wireshark.org/review/8961
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-17 23:24:58 +00:00
Gerald Combs 6c4ec4aedb Qt: Make sure we have usable command line arguments.
Call arg_list_utf_16to8 in wireshark-qt.cpp on Windows. Set our default
codec in Qt4 to UTF-8 before doing so.

Bug: 11276
Change-Id: I8e0afb9523ddb5956d30424b7b7ad7f3ea0838c7
Reviewed-on: https://code.wireshark.org/review/8954
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-16 18:58:54 +00:00
Gerald Combs ece4b01f21 Add the wireless toolbar.
Add the wireless toolbar to the Qt UI.

Start adding AirPcap support to ui/80211_utils. Add FCS validation
routines to ws80211_utils.

Move a bunch of AirPcap routines that require epan from caputils to
ui/gtk. They were required for driver key management, which we'll
leave to the AirPcap Control Panel in the Qt UI.

Move frequency-utils to wsutil.

Change-Id: I44446758046621d183f5c2ba9f6526bf01e084f1
Reviewed-on: https://code.wireshark.org/review/8910
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-16 03:45:54 +00:00
Guy Harris effa6fc214 Don't create a GLib main loop.
In the Qt Wireshark, the main loop is a Qt main loop; no need for a GLib
one.

Change-Id: I65378eb9a73d145ef60389e5e02a128e2321c403
Reviewed-on: https://code.wireshark.org/review/8721
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-05-31 22:33:13 +00:00
Guy Harris 0f55a0f547 Have global_capture_opts if we either have pcap or extcap.
The extcap code uses it; if the intent is not to support extcap if you
don't have pcap, then don't enable it in the configure scripts/CMake.

Change-Id: I4af80a2e6f557134fa8c542ad3143f3e8ca555d4
Reviewed-on: https://code.wireshark.org/review/8318
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-05-06 19:53:46 +00:00
Pascal Quantin b07ffb0f58 Qt: remove a debug log showing the plugins path at startup
Change-Id: I357a7d0b32a6cb4e80711feee49046b13317ea14
Reviewed-on: https://code.wireshark.org/review/8277
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-05-03 16:51:54 +00:00
Guy Harris 083f6b6e6d Have a #define for whether the capture buffer size can be set.
It can be set if either 1) this is Windows (where we're assumed to be
using WinPcap, which includes calls to set the buffer size) or 2) we
have pcap_create() (in which case we also have pcap_set_buffer_size(),
at least in a normal libpcap release).

Use that rather than testing "defined(_WIN32) ||
defined(HAVE_PCAP_CREATE)"; that makes it a bit more obvious what's
being tested.

Change-Id: Id9f8455019d19206b04dd6820a748cb97ae5ad12
Reviewed-on: https://code.wireshark.org/review/7816
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-25 03:22:33 +00:00
Gerald Combs cac102eee3 Change a lot of http:// URLs to https://.
Most of our sites are now HTTPS-only. Update URLs accordingly. Update
other URLs while we're at it. Remove or comment out dead links.

Change-Id: I7c4f323e6585d22760bb90bf28fc0faa6b893a33
Reviewed-on: https://code.wireshark.org/review/7621
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-10 19:30:50 +00:00
Gerald Combs 30ed6a1d72 Qt: Apply recent settings.
Add PacketList::applyRecentColumnWidths which set the packet list
column widths from our recent settings. Make sure it gets called at
startup and when we change profiles.

Save the packet list header state so that we can restore it when we
reset the model (i.e. freezing and thawing) and load a new capture file.
Save the state when the user resizes a column. As a side effect this
works around a weird bug that adjusts the width of column 1 at an
inopportune time.

Add a profileChanging signal so that we can save the main window geometry
in each profile.

Get rid of MainWindow::configurationProfileChanged. It was unused.

Apply saved pane widths and heights. Note that we might want to add a
separate pair of recent settings for the Qt panes.

Use the last opened directory in the capture file dialog.

Git rid of some unneeded Q_UNUSEDs while we're here.

Bug: 10953
Change-Id: I812aff59818cf0b4d1598b580627d32728d2e9d7
Reviewed-on: https://code.wireshark.org/review/7247
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-24 09:58:03 +00:00
Guy Harris 9423a13b2d Just have init_progfile_dir() take a void pointer.
dladdr() takes a void * as a code pointer; have init_progfile_dir() do
so, and do the casting in the calls.  We don't care about the signature
of the function whose address we're passing, we just want to pass a
pointer to *something* in the main program.

Change-Id: I9372620a97b0eb53c2bb3c0c41a238b4408f3709
Reviewed-on: https://code.wireshark.org/review/7270
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-20 00:24:08 +00:00
Gerald Combs 630f54fbbc Fix various warnings in wireshark-qt.cpp.
Squelch warnings due to (char *) casts.

Use "include_directories(SYSTEM..." in CMakeLists.txt so that we
don't get pedantic warnings about things we can't easily fix such
as QList loop optimizations. Not sure if there's an easy way to do
this in Autotools.

Pass get_gui_compiled_info to init_progfile_dir. C++ don't have to
show you any stinkin' ::main.

    warning: ISO C++ forbids taking address of function ‘::main’ [-Wpedantic]

Change-Id: If1c77284ab0d1b4786bce4e926a4109dd9b1ae34
Reviewed-on: https://code.wireshark.org/review/7207
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-18 05:01:00 +00:00
Gerald Combs 931807ea61 Qt: Add the "new packet" window^Wdialog^Wwindow.
Allow persistence across files. Preserve the use of "window" even
though we're really a dialog.

Update ByteViewTab and ProtoTree to support multiple instances.

Remove the need for a cast in frame_data.

Add more forward declarations.

Change-Id: I50d3d9d1455b8ecc158a37218f9e41fe696d5ae2
Reviewed-on: https://code.wireshark.org/review/7086
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-12 23:32:54 +00:00