Commit Graph

6584 Commits

Author SHA1 Message Date
Dylan Ulis 612568d7b3 Edit Resolved Name: Allow user to remove name
User can remove the previously set name, just by editing the current
name, and removing all text (empty string). Empty strings are skipped by
the name resolution code.

Bug: 11221
Change-Id: Id9c64885b5dd82fd72dd16b25a0f8046b8102a11
Reviewed-on: https://code.wireshark.org/review/36206
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-03-01 06:49:20 +00:00
Tomasz Moń 04a86e99e4 Qt: Fix import profile from directory crash
Do not append separator to import directory path. Calling QFileInfo()
constructor with string ending in directory separator results in
creating QFileInfo instance for file with empty filename.

Bug: 16410
Change-Id: I4fe248fcdb0c0c67843652475ae58c2a473a9fa8
Reviewed-on: https://code.wireshark.org/review/36238
Petri-Dish: Tomasz Moń <desowin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-03-01 06:48:21 +00:00
Tomasz Moń c07a48b6d3 Qt: Fix profile zip import on Windows
Do not use QDir::separator() as a directory separator. QT internally
uses "/" as separator on all systems, including Windows. The zip files
were not unzipped into target directory because splitting path on
QDir::separator() in ProfileModel::cleanName() returned only one part
(there weren't any "\' in file name, only "/").

Qt documentation for QDir::separator() mentions:
  "You do not need to use this function to build file paths.
   If you always use "/", Qt will translate your paths to conform to
   the underlying operating system. If you want to display paths to
   the user using their operating system's separator use
   toNativeSeparators()."

Bug: 16410
Change-Id: I9627684f58f4c1da24b6eec8958a2542fe07d915
Reviewed-on: https://code.wireshark.org/review/36237
Petri-Dish: Tomasz Moń <desowin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2020-02-29 10:15:29 +00:00
Roland Knall 4fe7fbd51d Qt: Changes ProfileModel assert
The assert mistakenly crashed the import

Bug: 16410
Change-Id: I385f4ba9b842f0f25d6ffe30db6065946fd55d84
Reviewed-on: https://code.wireshark.org/review/36233
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2020-02-28 20:34:03 +00:00
Gerald Combs cead73576d macOS: Expand a comment.
Change-Id: I4755c2ca44bc33954e3ea69c6ea2b7dc0983db4c
Reviewed-on: https://code.wireshark.org/review/36232
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-02-28 16:40:02 +00:00
Tomasz Moń eabc9356c2 Qt: Do not display alerts on repeated failed reads
If read from capture file fails, set a flag that result in subsequent
read attempts to not display alert box on read failure.

This solves endless "An error occurred while reading the capture file"
error when the underlying trace file becomes unavailable. Now it is
possible for the user to close the capture file.

Bug: 4811
Change-Id: I411bbb3fb717bc994ab1f5e3805e2c8b4ee09c5e
Reviewed-on: https://code.wireshark.org/review/36114
Petri-Dish: Tomasz Moń <desowin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-28 04:54:15 +00:00
Gerald Combs b3871fb864 macOS: Software update fixes.
Run our software update checks in the foreground.

Post NSApplicationWillTerminateNotification prior to exiting the
application. This *should* start the automatic updater if a new version
of Wireshark was downloaded in the background, but is difficult to test
without a fully signed and notarized application bundle.

Bug: 16416
Change-Id: I212dbb42e1cafff713ff195b448c2799750bc6ac
Reviewed-on: https://code.wireshark.org/review/36221
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>
2020-02-28 04:50:38 +00:00
Rasmus Jonsson b1a4aac543 Qt: fix packet list selection regression
When adding or removing a filter, the currently selected packet
is deselected. beginResetModel/ endResetModel were used which
reset the QModelIndex, now changed back to dataChanged/
headerDataChanged as before.

Bug: 16414
Change-Id: Ia8fa91e3378bdc0792382184e75e59900397e8b9
Reviewed-on: https://code.wireshark.org/review/36204
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2020-02-27 10:52:26 +00:00
Guy Harris 1ed9ddd26a Fix some typoes in comments.
Change-Id: I951e183e24bf77e0f2f09266e2dc5db7a4caf0ec
Reviewed-on: https://code.wireshark.org/review/36211
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2020-02-27 05:33:15 +00:00
Guy Harris cd6134da90 Add ws_strtoi() and ws_strtoui() routines and use them.
Those fetch gint and guint values, respectively, rather than values with
specified sizes in bits.

This should squelch Coverity CID 1457357.

Change-Id: Ia8f100bd3fe90c266e24a4346f80b2667c653b93
Reviewed-on: https://code.wireshark.org/review/36177
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2020-02-25 08:27:52 +00:00
Dylan Ulis 7b99a82bf8 Edit Resolved Name: Don't add duplicate IPs
1. Switch list of manually resolved names from a list to a map
   (IP Address --> Custom Hostname)
2. If an address was already in the list, just update the old entry.
Previously this added a new entry anytime somebody would edit a
hostname.
3. Display the previous hostname in the GUI
4. Remove unused manually_resolve_cleanup()

Bug: 11221
Change-Id: I42d5b6267eb6613bdf7783865bc2d30d6bda1147
Reviewed-on: https://code.wireshark.org/review/36059
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-24 07:45:00 +00:00
Martin Mathieson ce0d780c3f Some more issues spotted by PVS-Studio in bug 16335.
Trivial, mostly just redundant assignments or
format specifiers.

Change-Id: Iaf33f24d2af5a48a5e1b797e582bf936914c8daa
Reviewed-on: https://code.wireshark.org/review/36154
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-02-23 21:43:51 +00:00
Gerald Combs 7620ba7f72 [Automatic update for 2020-02-23]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I1293c3db1c2739a9db34507eba6f8ab5eea8005c
Reviewed-on: https://code.wireshark.org/review/36160
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-02-23 08:20:06 +00:00
Dario Lombardo c544f7e3f4 Qt: initialize members (CID: 1457926).
Change-Id: I4c890db567a3668525bcf9915cb5687e2019c5c1
Reviewed-on: https://code.wireshark.org/review/36125
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-02-17 20:52:43 +00:00
Tomasz Moń d400dbe476 Qt: Remove unnecessary processEvents() call
MainWindow::captureFileReadStarted() is called inside event handlers.
There isn't any actual processing after the captureFileReadStarted() is
called so in most cases the code will quickly return to the event loop.
In case of cf_read() callbacks, there is dedicated "slow processing"
detection implemented that eventually leads to processEvent() call in
update_progress_dlg().

Change-Id: Icfefa0ba7bf1bec43014e30756d0eec4078d389c
Reviewed-on: https://code.wireshark.org/review/36113
Petri-Dish: Tomasz Moń <desowin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-02-16 13:51:34 +00:00
Gerald Combs fbd88490dd [Automatic update for 2020-02-16]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Iafb3ddef40951bd50f2695ae87e6e9f7b9a0965e
Reviewed-on: https://code.wireshark.org/review/36116
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-02-16 08:19:46 +00:00
Tomasz Moń c129c28d3a Qt: Allow creating new files in extcap fileselect
If mustexist property is absent or set to false, allow the user to
specify the filename.

Add Clear button next to file selection. Previously cancelling file
selection when mustexist was false would clear the entry. However,
if mustexist was true, there was no easy way to clear the entry.

Change-Id: I367756fb868b4040a7203f1eb8c92b6bfaf29901
Reviewed-on: https://code.wireshark.org/review/35643
Petri-Dish: Tomasz Moń <desowin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2020-02-15 15:43:32 +00:00
Gerald Combs d7bbe384f5 Test+Qt: Add an automatic update check.
Add software_update_info() to the software update module, which returns
the name of our update library if we have one. Use it to add automatic
update information to the compiled information in `wireshark --version`.

Add a "release" test suite, which contains a test for automatic updates.

Ping-Bug: 16381
Change-Id: I867a96bdcfde8be541eca2dc0e84b5000276e7dd
Reviewed-on: https://code.wireshark.org/review/36107
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>
2020-02-15 11:13:25 +00:00
Tomasz Moń 2c1d660940 Qt: Access I/O Graph settings via UAT interface
All I/O Graph instances share the same configuration. The code was
accessing the UAT underlying number of items variable (num_io_graphs_)
directly but the actual rows were accessed indirectly via UAT interface.
This could lead to UAT missynchronization and in turn an out of range
index access in IOGraphDialog::createIOGraph().

Fix the issue by not using the num_io_graphs_ directly.

Bug: 16373
Change-Id: Ifbc0fddb619d23f31f32aa46c4ae613954a8b780
Reviewed-on: https://code.wireshark.org/review/36106
Petri-Dish: Tomasz Moń <desowin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-15 11:08:44 +00:00
Martin Mathieson e30f0d0920 Some issues spotted by PVS-Studio in bug 16335. Many more remain
Change-Id: If856e25af8e33eeef5b9e595f1f6820459892b17
Reviewed-on: https://code.wireshark.org/review/36110
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-15 11:06:41 +00:00
Jaap Keuter 74c2bcbe9b Qt: Restore space and add tooltips
Followup on commit 33bb4b0c22 adding back
the lower end spacer, moving the language selection to the bottom and
also adding tooltips with variable information.

Change-Id: I55c7e39d3a524bb17ccfad55a0e8bf844a500408
Reviewed-on: https://code.wireshark.org/review/36072
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-12 07:50:41 +00:00
Jaap Keuter 33bb4b0c22 Qt: Add window title settings the preferences dialog
In case of multiple instances it can be helpful to have an extra identifier
in the window title. These facilities are present and working, yet the
identifiers are not easily modifiable (only through the Advanced preference
page). This changes exposes these setting in the normal Appearance
preference page.

Change-Id: Ib6d7b18d29932edaed7419b44e4edc2f99134cbf
Reviewed-on: https://code.wireshark.org/review/36068
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-10 07:45:57 +00:00
Dario Lombardo a20fea02fc Qt: add initializers.
CID: 1457926, 1446253.

Change-Id: Ia9e727fd9d030b6a5db74aa5a9343c66df8c5e9b
Reviewed-on: https://code.wireshark.org/review/36065
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-02-09 17:27:48 +00:00
Gerald Combs 6e7918319b [Automatic update for 2020-02-09]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I717a08bf08aadac91f2a63b4681388bf0d038d7b
Reviewed-on: https://code.wireshark.org/review/36060
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-02-09 08:19:22 +00:00
Dario Lombardo fca18e2e5c Qt: fix compilation without pcap.
Fix a regression introduced in 1e4c4f2209
when compiling without pcap.

Change-Id: Ifda13a135285737a459155020134937069ac5d34
Reviewed-on: https://code.wireshark.org/review/36047
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-02-07 17:05:48 +00:00
Gerald Combs 1e4c4f2209 Qt: Make it possible to hide welcome screen warnings.
The "The NPF driver isn't running. You may have trouble" warning dialog
is now redundant, so remove it along with the "privs.warn_if_no_npf"
recent setting.

Add a more general "sys.warn_if_no_capture" recent setting along with a
getter for SimpleDialog's "Don't show this message again." string. Use
them to add a "Don't show this..." link to the main welcome warning
label.

Change-Id: Idffb800761eebf04b75e4be3f6bf7727dd468949
Reviewed-on: https://code.wireshark.org/review/36042
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Tomasz Moń <desowin@gmail.com>
2020-02-07 07:36:03 +00:00
Peter Wu 55f83324ef Qt: simplify decode_as_ action in the packet details view
Use the "create_new" property convention similar to PacketList. Fix a
"QWidget::insertAction: Attempt to insert null action" warning in the
packet dialog while at it.

Change-Id: I29b3b113aba92634b1b9a3427e2313fca30633eb
Reviewed-on: https://code.wireshark.org/review/36023
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-05 04:34:36 +00:00
Peter Wu 6bbd61860b Qt: make Decode As from packet list functional again
The "create_new" property was never set which prevented a new row from
being created once the dialog is opened.

Change-Id: I19c793ebd219bb58cb34f4d67451660ace51aa32
Fixes: v3.1.1rc0-254-gf402b4cdaa72 ("Qt: PacketList call DecodeAsDialog directly")
Reviewed-on: https://code.wireshark.org/review/36020
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-05 04:34:20 +00:00
Peter Wu 995672e8b6 Qt: allow Resolved Addresses search filter to be cleared
Allow the filter in the Resolved Address dialog to be cleared to disable
filtering without requiring the dialog to be reopened.

Change-Id: I8164d42ac763f8b7faf23821633e129feba69790
Fixes: v3.1.1rc0-244-g743f8598cd0b ("Qt: Rework Resolved Addresses dialog")
Reviewed-on: https://code.wireshark.org/review/36027
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2020-02-04 14:22:25 +00:00
Peter Wu 0596047e3f Qt: fix missing IP hosts in Resolved Addresses dialog
Fix several issues in the Resolved Addresses dialog:
 - Missing IP hosts because the list was populated with one
   tab-separated item while the caller expected space-separated items.
 - Fix duplicate entries due to the "values" list not being cleared.
 - Remove IPv4/IPv6 Hash Tables since these are a superset of IPv4/IPv6
   Hosts, except that the former also includes mappings without a known
   name (e.g. 8.8.8.8 -> 8.8.8.8).
 - Fold both IPv4 and IPv6 hosts into one as before. Users like me
   usually look for any IP match, regardless of the address family.
 - Minor optimizations: do not construct the label every time.
 - Rename "Mac Address" [sic] to simply "Address", that covers both IP
   addresses and MAC addresses.

Bug: 16366
Change-Id: I6253fc01da7b6429ce093e7db9fe58e235b7c137
Fixes: v3.1.1rc0-244-g743f8598cd0b ("Qt: Rework Resolved Addresses dialog")
Reviewed-on: https://code.wireshark.org/review/36022
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-04 04:12:11 +00:00
Gerald Combs b014062f07 [Automatic update for 2020-02-02]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: If4760fccbb8cf11750e307c7e1b0eb18af11e049
Reviewed-on: https://code.wireshark.org/review/36005
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-02-02 08:20:35 +00:00
Allan Møller Madsen 1592679ed8 Bluetooth HCI: Add support for Bluetooth v5.2
Dissection of all new HCI commands and events added in
the newly released Bluetooth specification version 5.2.
Bluetooth Device Dialog updated to also show ISO buffer
size and amount.

Change-Id: I3a459760cbe5f6c4f985621cee40dbbe5e473d39
Signed-off-by: Allan Møller Madsen <almomadk@gmail.com>
Reviewed-on: https://code.wireshark.org/review/35957
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-31 05:13:15 +00:00
Orgad Shaneh eb0dcc984f RTP: Fix rtpdump export
Broke by 87973bf516.

RtpStreamDialog allocates its own rtpstream_info_t, and copies the original stream's info.

Then RtpStreamDialog::on_actionExportAsRtpDump_triggered calls
rtpstream_save with this copy.

On save, reset_tap_listeners is called, and it clears all the tree items,
destroying the allocated copy *before* it is used for the actual export.

Trace:
1   rtpstream_info_free_all                             tap-rtp-common.c       104
2   RtpStreamTreeWidgetItem::~RtpStreamTreeWidgetItem   rtp_stream_dialog.cpp  85
3   RtpStreamTreeWidgetItem::~RtpStreamTreeWidgetItem   rtp_stream_dialog.cpp  86
4   QTreeModel::clear()
5   RtpStreamDialog::tapReset                           rtp_stream_dialog.cpp  309
6   rtpstream_reset_cb                                  tap-rtp-common.c       172
7   reset_tap_listeners                                 tap.c                  418
8   cf_retap_packets                                    file.c                 2243
9   rtpstream_save                                      rtp_stream.c           97
10  RtpStreamDialog::on_actionExportAsRtpDump_triggered rtp_stream_dialog.cpp  515

Bug: 16351
Change-Id: I54d37a2c97997395936df94ee5481b0d6d198aed
Reviewed-on: https://code.wireshark.org/review/35979
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-30 08:24:50 +00:00
Guy Harris 0c112e2e24 Fix indentation.
Change-Id: Ib80213ecb5c02d64f107706971c646decc601e8d
Reviewed-on: https://code.wireshark.org/review/35967
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2020-01-27 23:47:07 +00:00
Dario Lombardo 59108b1683 Qt: replace QRegExp with QRegularExpression in FilterListModel.
The new class has a more powerful support for non-greedy regexps
(required in this case).

See: https://doc.qt.io/qt-5/qregularexpression.html#notes-for-qregexp-users

Bug: 16336
Change-Id: I4684fbf6aeeb55707d325775de487246ac398c2d
Reviewed-on: https://code.wireshark.org/review/35858
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-26 19:32:58 +00:00
Gerald Combs 32fc20eef4 [Automatic update for 2020-01-26]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Ia2638e04521c540628ae47b275c4829b2f548b6c
Reviewed-on: https://code.wireshark.org/review/35949
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-01-26 08:19:58 +00:00
Alexander Meier eb4e2cca69 IO Graph does no return to 0 if there are no fields for y
IO Graph used to show a value of 0 if there are no relevant
fields/packets when using SUM, MAX, MIN or LOAD. This is an
issue because you can not distinguish if there was a value
of 0 or if there was not even a relevant field/packet. With
this patch IO Graph shows no point in the interval if there
is no relevant field/packet when using SUM, MAX, MIN or LOAD.

Change-Id: I9b17447cb38efe6dbf9299ec67aac999cfa744a3
Reviewed-on: https://code.wireshark.org/review/35859
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>
2020-01-25 10:04:50 +00:00
Martin Mathieson 0290bd3592 HTTP: share dissector status value_string array with tshark HTTP stats
Change-Id: I6de4a8b691922f7c4a8141b581b9f3c8ca112b60
Reviewed-on: https://code.wireshark.org/review/35942
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-01-24 22:38:17 +00:00
Guy Harris 0b64a3afc0 Fix the check for ws_fdopen() failure.
If tf.handle() fails, it returns -1; we shouldn't call ws_fdopen() on
its return value.  (I'm not sure whether it can fail, but this code is
all a bit twisty.)

If tf.handle() succeeds, and we hand its return value to ws_fdopen(),
and we get back NULL, *that* indicates that ws_fdopen() failed.

This should fix Coverity CID 1457929, preventing a FILE leak.

Change-Id: I23bb04579d26928037f8b9284b7741affc3596f7
Reviewed-on: https://code.wireshark.org/review/35940
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2020-01-24 18:51:33 +00:00
Martin Mathieson 8a79d27010 SIP: share dissector status value_string array with tshark SIP stats
Change-Id: I8f12310f69aa5393ba8ad37e498845f2a1f17693
Reviewed-on: https://code.wireshark.org/review/35927
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-01-24 16:10:43 +00:00
Aymeric Moizard 6fceff7240 RTP Stream Analysis: fix wrong values for clock drift and freq drift.
The drift values should use the relative time (arrivaltime) instead
of the absolute time (current_time) otherwise, the values are wrong.

Bug: 16343
Change-Id: Icdc65476ab68ce51088314b7c9de939c86472ae9
Reviewed-on: https://code.wireshark.org/review/35908
Reviewed-by: Aymeric Moizard <amoizard@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-24 13:36:13 +00:00
Dario Lombardo 084a887a30 Fix compilation with gcc-9.
gcc-9 spotted some NULL pointer usages.

Bug: 16319
Change-Id: I3e4ac57705f1852c43299f5e924fc642a2c56a3a
Reviewed-on: https://code.wireshark.org/review/35733
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-21 04:44:31 +00:00
Alexis La Goutte 6693067290 rtp_play_dialog(.cpp): avoid Dead Store false positive
Value stored to 'left' is never read

Change-Id: I6d1a996427d26a2a16510ed6446749aed23cca39
Reviewed-on: https://code.wireshark.org/review/35871
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-20 14:07:43 +00:00
Jeroen Roovers f605e9466b ui: Define plugins_add_description() unconditionally
Since commit 5dfde7ff ("Print extcap plugins with "tshark -G
plugins"."), compiling with -DENABLE_LUA=no -DENABLE_PLUGINS=no fails.
The definition of plugins_add_description() is guarded by HAVE_PLUGINS
|| HAVE_LUA, but that definition is used without such guards for extcap
right below, resulting in:

ui/qt/about_dialog.cpp:137:29: error: 'plugins_add_description' was not
declared in this scope

Fix this by removing the guards around plugins_add_description().

Change-Id: Ieaddfed923ae3782ade28b2f5004b6a34220659a
Fixes: 5dfde7ff83
Reviewed-on: https://code.wireshark.org/review/35852
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-20 07:50:37 +00:00
Gerald Combs 7f45131a4d [Automatic update for 2020-01-19]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I4b4f69d4e797a49e627932adab8bcc5b75767f34
Reviewed-on: https://code.wireshark.org/review/35863
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-01-19 08:19:42 +00:00
Stig Bjørlykke e9031028fc Qt: Support ampersand in profile name
An ampersand in the menu item text is used as shortcut, so use "&&" to
get a real ampersand.

Change-Id: I333c65bb55cfa01ab60d41df20f443701067e42d
Reviewed-on: https://code.wireshark.org/review/35851
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2020-01-18 17:46:20 +00:00
Alexander Meier 0f57ad35c8 IO Graph shows unsigned values correctly
IO Graph used to show unsigned integer values not correctly when using
SUM, MAX, MIN or LOAD. For example was the uint32 0x9b37d2b8 shown as
about -1_679_000_000 while it should be shown as 2_604_126_904.
This patch fixes the incorrect type conversions so that unsigned
integer are shown properly in IO Graph.

Change-Id: Ib361e63cce9e088bfdd4b3d3186725c67d33f1bd
Reviewed-on: https://code.wireshark.org/review/35550
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-18 12:17:24 +00:00
Gerald Combs 82032fe375 Qt+Windows: Remove the DBAR check.
Remove the check for Dell Backup and Recovery. The check was hacky and
obnoxious. At this point it's hopefully safe to assume systems with DBAR
installed are either running Windows 7 and no longer supported or have
upgraded to a safer version.

Change-Id: I458172885870edc34ec707a7748280e0eeed59b9
Reviewed-on: https://code.wireshark.org/review/35815
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>
2020-01-15 04:48:04 +00:00
Stig Bjørlykke e816edd1ea Qt: Add a missing separator in packet tree context menu
The packet tree context menu for Copy should have a separator after
the "As Filter" entry. This is a regression from a previous refactoring.

Change-Id: Ie43ae71019608d28af0eed8490aab654c7e6d6f1
Reviewed-on: https://code.wireshark.org/review/35802
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2020-01-14 09:48:52 +00:00
Jim Young e85cbd57c6 Qt: Suppress warning: unused parameter 'actions'
In set_action_shortcuts_visible_in_context_menu() the parameter
'actions' is only used by a subset of Qt versions. Mark it unused
in the other cases.

Change-Id: I210eafcdffb8484751b656f58cc7813cb98d259f
Reviewed-on: https://code.wireshark.org/review/35800
Petri-Dish: Jim Young <jim.young.ws@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-01-14 06:33:49 +00:00
Gerald Combs 8b9f718dee Qt: Set AA_DisableWindowContextHelpButton.
Set the Qt::AA_DisableWindowContextHelpButton attribute so that dialogs
don't show a help button in their title bars.

Bug: 16327
Change-Id: Iae1005cc9bd1b426ab6b3144ae54964171322419
Reviewed-on: https://code.wireshark.org/review/35781
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-01-13 20:57:16 +00:00
Gerald Combs 48024b102d Qt: Make sure shortcuts are visible in context menus.
As of Qt 5.10, context menu shortcuts can be hidden:

https://bugreports.qt.io/browse/QTBUG-61181

Add set_action_shortcuts_visible_in_context_menu to qt_ui_utils and call
it for our context menus as needed. For Qt 5.{10,11,12} it calls
QAction::setShortcutVisibleInContextMenu(true).

For Qt 5.13 and later, call
QStyleHints::setShowShortcutsInContextMenus(true) in
WiresharkApplication.

Change-Id: Ie8941951c3a9801b4642f4ce15ac217e37d1300f
Reviewed-on: https://code.wireshark.org/review/35761
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-01-13 18:58:28 +00:00
Gerald Combs e7a8c94aa7 Qt: Add a splitter to the I/O Graphs dialog.
Add a vertical splitter, with the graph and hint label in the top part
and the graph list in the bottom.

Change-Id: Ib297b5c9c7da121b86bf3c5c4299985882ca5b8d
Reviewed-on: https://code.wireshark.org/review/35765
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>
2020-01-13 07:42:55 +00:00
Gerald Combs b92bf7c981 Qt: Update our main window capture warnings.
Check to see if npcap.sys or npf.sys are running and show a warning if
they aren't. Don't show any warnings if we were compiled without libpcap.

Separate the "show a warning" logic from the "show the interface list"
logic.

Change-Id: I86f2fdc17d02fc0c87004c936c8a78f65ae2dd28
Reviewed-on: https://code.wireshark.org/review/35739
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2020-01-12 22:48:53 +00:00
Dylan Ulis d5cfa99217 Allow Multiselection of packets to work during live captures
During live capture, the previous logic was to jump to row 1 when there is no
'current_frame'. When multiselect is active, there is no 'current_frame', so
it would always jump back to row 1, when >1 packet was selected.

Bug: 16293
Change-Id: Id1c9eb36fcae83f67ae342be6f9dfc1405ce7025
Reviewed-on: https://code.wireshark.org/review/35747
Reviewed-by: Michael Mann <mmann78@netscape.net>
2020-01-12 22:33:42 +00:00
Stig Bjørlykke c84bbf4853 Qt: Add error message when create profiles dir fails
Include the error message when creating the profiles directory fails.

Change-Id: I00157282b16e5152632a208357695047bed55539
Reviewed-on: https://code.wireshark.org/review/35759
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2020-01-12 21:17:44 +00:00
Gerald Combs a8c90e1767 [Automatic update for 2020-01-12]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Ie93b6e343a90ab33b15e5be1814e9b988101ee28
Reviewed-on: https://code.wireshark.org/review/35750
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-01-12 08:19:18 +00:00
Orgad Shaneh bc8140be0b Fix build and deprecation warnings with Qt 5.14
Change-Id: I1fa6b5d3105288d25717a9fe4ae93ad3f471aaca
Reviewed-on: https://code.wireshark.org/review/35727
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2020-01-10 08:42:21 +00:00
Roland Knall 1bbac91d33 Qt: Fix related packet delegate
Recent updates broke the related packet delegate in such a way,
that the direction arrow for the current packet was shown, but
no indicator for any other packet. This fix resets the packet
indicator properly, if a new frame is selected.

Note: This means, that the caller has to reset the delegate,
but this was the original behavior anyway

Bug: 16316
Change-Id: Ief2396c65303a2226ad9fdd87969b667b2f1274d
Reviewed-on: https://code.wireshark.org/review/35720
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-10 04:59:07 +00:00
Gerald Combs e3a92cf8f6 Qt+Win32: Tell the user to install Npcap/WinPcap if needed.
If we don't have local interfaces on Windows, show a message in the main
welcome screen and link to Npcap and WinPcap. Use consistent wording
and layout in the macOS equivalent.

Change-Id: Ifc9ee2e29ba197667bd95f39390be5684bb334ae
Reviewed-on: https://code.wireshark.org/review/35724
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>
2020-01-10 04:58:45 +00:00
Gerald Combs 999e63543f Qt: Add elements back to the tcptrace graph.
Segment and SACK elements in the tcptrace graph are plotted using
QCustomPlot's error bars. This part of QCP's API changed from version 1
to 2, and were #ifdef'ed out as part of the switch to QCP 2.0.1. Update
our code to use the new API.

Bug: 16281
Change-Id: Ieae2808686ddc631e0cd18c0c32fc7a2c0f396b7
Reviewed-on: https://code.wireshark.org/review/35726
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>
2020-01-10 04:57:52 +00:00
Roland Knall 936a844cc3 Qt: Fix PacketListHeader column
Due to changes in #35206, if you have a lot of columns the display
of all columns may be hindered depending on your screen resolution.

With this change, displaying the column information can be disabled
via a Preferences->Layout checkbox element. Additionaly, the column
information will always be displayed as a tooltip element

Bug: 16317
Change-Id: Ib8c0fc0a84deaca96631270b320f3a530ba87d89
Reviewed-on: https://code.wireshark.org/review/35706
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2020-01-09 12:32:34 +00:00
Pascal Quantin 23a6fab52e Qt: remove codecs from about Wireshark dialog
Codecs were moved to plugins in g63af1da7e7, they are no more embedded in a library.

Change-Id: Id5448d2f83b1b4f7b1aac2620390f99da9327167
Reviewed-on: https://code.wireshark.org/review/35701
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-09 07:15:11 +00:00
Jirka Novak 3b781dbab5 rtp_player_dialog: Route audio for a stream to left/right speaker in RTP player
Column 'Play' added to player. Double click on a stream in the column changes
audio routing for the stream.
When soundcard supports only one channel, there are Mute/Play option. When
soundcard supports two or more channels, there are Mute/L/L+R/R options.
Muted channel is drawn with dotted line.

Change-Id: If120c902195da46f98a1663c589f20c6a1da0ba7
Reviewed-on: https://code.wireshark.org/review/35687
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-08 11:50:16 +00:00
Gerald Combs 6785c9ad04 Qt: Don't plot zero values in I/O scatter plots
We don't currently distinguish between missing and zero values in I/O
graphs. This can be problematic in scatter plots since the plot points
tend to show up as chartjunk which overwhelms the X axis. In plain,
non-calculated plots assume that zero values mean "missing" and omit
those points.

Describe this in the User's Guide, but comment the text out for now
pending a full update to the I/O Graph section.

Switch to title case in our default graphs. Make the TCP Errors graph
red by default.

Change-Id: I92dcbf05f58ae0b7b7734fa8dfc342424bbea114
Reviewed-on: https://code.wireshark.org/review/35645
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>
2020-01-07 12:42:48 +00:00
Jirka Novak 71fb8bebfe rtp_player: Player is able to set start of audio play by double click
Patch adds ability to set start of audio play by double clicking on waveform.
Patch fixes unreported issue with placing waveform at incorrect place when switched relative/absolute time mode (check/uncheck Time of Day).

Change-Id: Ib8ce24aea870e2443e033afbb6d6e9fbcf222431
Reviewed-on: https://code.wireshark.org/review/35621
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-07 09:38:14 +00:00
Jirka Novak c1f5b4d2d9 rtp_analysis_dialog: Improved codec recognition during saving of audio to .au
I found that when codec is negotiated to nonstandard payload id, it was
reported as unsupported even was supported. Patch fixes it.

Change-Id: I4eb14fc22f83eb42300fc67baee8456dff65d191
Reviewed-on: https://code.wireshark.org/review/35575
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-07 09:18:59 +00:00
Jirka Novak 888137161c voip_calls_dialog/voip_calls: Fix for duplicated entries after retap
Issue seen from 2.6:
1) Open pcap with any VoIP call
2) Open Telephony->VoIP calls
3) Select one or more calls
4) Press Flow Sequence - sequence is shown
5) Close Flow Sequence
6) Press Play Streams - Play dialog is shown
7) Close Play dialog
8) Press Flow Sequence - sequence is shown, but all entries are duplicated

If you repeat 6-7 multiple times, all entries are shown multiple times in 8

Patch adds missing clear of graph_analysis before retaping the stream.
Tested on master, but should be backported to as many stable branches as possible.

Change-Id: I9793f6e874defde2f377732d78689e957df71b33
Reviewed-on: https://code.wireshark.org/review/35672
Petri-Dish: Jim Young <jim.young.ws@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-07 04:46:43 +00:00
Dario Lombardo 2060e02021 Qt: don't use monospace fonts for licence dialog.
Authors and licence dialogs were using monospace fonts to resemble
GTK interface. Authors is not monospace anymore. Not using monospace
for license dialog makes the text look more similar to other dialogs
and more readable.

Change-Id: I5a62f0993d579af5b1db7dea351d9a10175a069d
Reviewed-on: https://code.wireshark.org/review/35663
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-01-06 22:59:35 +00:00
Jirka Novak 17cd230a03 voip_calls_dialog: avoiding of 'remove_tap_listener(): no listener ...' warning
When voip_calls_dialog is opened and then closed, mentioned warning is shown
because voip_calls_remove_all_tap_listeners is called twice in two different
methods. Removing of the call from one of method is not possible therefore
I introduced variable which tracks whether voip_calls_remove_all_tap_listeners
was already called or not.

Change-Id: Ic3c206cb7baf6612958d383880af296af019ffd8
Reviewed-on: https://code.wireshark.org/review/35660
Petri-Dish: Jim Young <jim.young.ws@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jim Young <jim.young.ws@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-01-06 09:07:20 +00:00
Gerald Combs b401c92615 [Automatic update for 2020-01-05]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I871629b91d38be26bfe448bf90dfbb47a97acdfa
Reviewed-on: https://code.wireshark.org/review/35652
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-01-05 08:20:10 +00:00
Gerald Combs e0a4e0e123 Qt: Update translations.
We added wireshark_es.ts in gd832145366 / change 35620. Sync up with
Transifex by running `tools/update-tx`.

Change-Id: I3e565cbc227b124e79bc759ab6a6a095fed8ce5d
Reviewed-on: https://code.wireshark.org/review/35635
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-01-03 17:24:17 +00:00
Gerald Combs d832145366 Qt: Add Spanish (es) translation assets.
Add an initial "es" Qt translation file and an accompanying flag image.
The image came from

https://en.wikipedia.org/wiki/File:Flag_of_Spain.svg

and is in the public domain.

(We already had a debian/po/es.po.)

Change-Id: I5378ad2cbffb2267389fc8ae6af6d591071e0144
Reviewed-on: https://code.wireshark.org/review/35620
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-01-03 08:27:21 +00:00
Jirka Novak 8a3572997f codecs API: Added description of API usage
Added API description clarifies when bytes/samples are used. New variable names
proposed and all existing codecs are adapted to it. Change is just renaming...

Change-Id: I75dba64a49eb3f4369ec7160cb793dda4b44c810
Reviewed-on: https://code.wireshark.org/review/35576
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-12-30 15:41:00 +00:00
Gerald Combs 4d14586385 [Automatic update for 2019-12-29]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Iedf3b088beab75195cbf442854b1cae4d675db95
Reviewed-on: https://code.wireshark.org/review/35580
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-29 08:20:13 +00:00
Gerald Combs 17492b8a6b Qt: Use a neutral tone in an error message.
Don't yell at the user.

Change-Id: Ibedb0a1bf7ea13feeaf6fe4f2c78bd7f3d1e65b8
Reviewed-on: https://code.wireshark.org/review/35572
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2019-12-28 08:04:09 +00:00
dennisschagt b21276d9a0 Qt: Create directories recursively
Bug: 16143
Change-Id: Ibdd888157919315775637eb639158ea2e6cb26f0
Reviewed-on: https://code.wireshark.org/review/35561
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-12-25 22:44:53 +00:00
Alexander Meier 63a954320f Additional styles for IO Graph
This patch adds the styles Cross, Plus and Circle to IO Graph.

Change-Id: I72ff0134cd34a7e9b88a3e9c6a685526a0bca1db
Reviewed-on: https://code.wireshark.org/review/35555
Petri-Dish: Jim Young <jim.young.ws@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jim Young <jim.young.ws@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2019-12-24 13:38:24 +00:00
Gerald Combs 4df2bd988d Qt: Fix the Capture File Properties dropped format.
Fixup the formatting for the "Dropped packets" portion of the Capture
File Properties dialog. Fix a couple of other issues flagged by clang.

Change-Id: Ia1fad4bee37525a1a0cc25849abe34a0495f1ac8
Reviewed-on: https://code.wireshark.org/review/35552
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-23 18:16:17 +00:00
Jim Young 31570163d1 Revert "Qt: Fix dangling delete for sequence diagramm"
This reverts commit aa2145982f.

Each of the three delete calls added to the deconstructor
SequenceDialog::~SequenceDialog() results in Wireshark
crashing when the Flow dialog is closed.

Bug: 16260
Change-Id: Iecbd5dcc16be6eb451b8920b22ca2b9ccef7c7b0
Reviewed-on: https://code.wireshark.org/review/35521
Petri-Dish: Jim Young <jim.young.ws@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-12-22 12:08:44 +00:00
Orgad Shaneh 0442f7a2c3 UI: Fix compilation with Qt 5.14
Change-Id: I8adae4609ff2857cb12bc803839ebb2c6afbd264
Reviewed-on: https://code.wireshark.org/review/35517
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-21 20:25:51 +00:00
Michael Mann 2925fb0850 Use g_file_open_tmp within create_tempfile
Much better to use a known library than create it ourselves.

Also remove get_tempfile_path as it's not used.

Bug: 15992
Change-Id: I17b9bd879e8bdb540f79db83c6c138f8ee724764
Reviewed-on: https://code.wireshark.org/review/34420
Reviewed-by: Tomasz Moń <desowin@gmail.com>
Petri-Dish: Tomasz Moń <desowin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-12-20 19:26:38 +00:00
Huang Qiangxiong 623b347d1e Protobuf: add dissecting protobuf fields as wireshark fields preferences, etc.
Two enhancements and one fixed bug:

1. Add dissecting protobuf fields as wireshark (header) fields preferences. User
can input the full names of protobuf fields or messages in Filter toolbar for
searching.

2. Add 'protobuf_field' dissector table. Dissector based on protobuf can register
itself to 'protobuf_field' keyed with the full names of fields of BYETS or STRING
types.

3. A bug about search MESSAGE or ENUM type in context is fixed.

4. Another small enhancement is adding prefs_set_preference_effect_fields() which
can mark a preference that affects fields change (triggering FieldsChanged event).

See the linked bug for sample capture file and .proto files.

Ping-Bug: 16209
Change-Id: Ibc3c45a6d596a8bb983b0d847dd6a22801af7e04
Reviewed-on: https://code.wireshark.org/review/35111
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-12-19 05:04:17 +00:00
Gerald Combs b044c5f1de Qt: Don't crash when disabling all protocols.
Ensure that a protocol can be disabled before attempting to do so. Fixes
crash described at
https://ask.wireshark.org/question/13573/wireshark-crashes-in-the-enabled-protocols-dialog-box/

Change-Id: Ib774bb6d636e82b79c5a922272a39126da85b71d
Reviewed-on: https://code.wireshark.org/review/35489
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-18 17:34:24 +00:00
Gerald Combs d614ade782 De-camel-ize "Wireshark" in a few places.
The _wslua_main struct / WireShark class appears to have never been
used, so remove it.

Change-Id: Id80fb2c2065accedf632ea4cc467d566d10870de
Reviewed-on: https://code.wireshark.org/review/35480
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-12-18 04:31:03 +00:00
Peter Wu 5cfd8bca95 CMake: fix CMake 3.16 warning about CMP0071
Prevent a file from being processed by moc/uic as it is not needed. This
addresses a new CMake warning "Policy CMP0071 is not set: Let AUTOMOC
and AUTOUIC process GENERATED files."

Change-Id: I8ed458099cdf29472dad29168786cf16b95595fa
Reviewed-on: https://code.wireshark.org/review/35468
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-17 00:10:26 +00:00
Jim Young 8fbe28b1f0 profiles: Try to better sync on disk config state
Profile specific column settings are split across the `preferences'
file and the `recent' file.  At any given moment the GUI column
settings held within the `preferences' file and the `recent' file
may be inconsistent with one another and with the GUI itself. These
inconsistencies occur because of when the GUI chooses to write
config changes to disk.

If Wireshark is not shutdown gracefully (for example when killed
or should crash) the column preferences saved on disk may not be
consistent between the current profile's `preferences` and `recent`
files and the most recently used profile may not be recorded within
the `recent_common' file. On restarting Wireshark these config file
inconsistencies can lead to unexpected artifacts.

Normally the column config state saved within the current profile's
`preferences' and `recent` files are made consistent when a
different profile is selected or when Wireshark is closed
gracefully.

This patch set attempts to improve the constancy of the on disk
config state with the GUI state by invoking the functions to write
the `recent' and `recent_common' files in a more timely manner.

Fix a typo while here.

Change-Id: I2af9d9eb2dcf9cc0d422e9840aa05f4f6b1aa086
Reviewed-on: https://code.wireshark.org/review/35407
Petri-Dish: Jim Young <jim.young.ws@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jim Young <jim.young.ws@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-12-16 05:34:28 +00:00
Jaap Keuter d90a22c1cc Reorganize long option values
For long options, without corresponding short options, to be processed
they need to be assigned a value, preferably outside of the range of
all possible short options. The code in various places tries to stay
clear of these low values, but further coordination is missing, easily
leading to issues when option processing code gets extended and/or
reorganized.

This change introduces a single location from where each catagory of
command line long option can derive a base value, which should minimize
potential option value collisions.

Change-Id: Ic8861a347d0050f74002de3aa1fcfb01202866e5
Reviewed-on: https://code.wireshark.org/review/35459
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-12-15 20:02:09 +00:00
Gerald Combs effe6ddaca [Automatic update for 2019-12-15]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Id1d9cd2c1f311247df53f41397169ce0490bf7a7
Reviewed-on: https://code.wireshark.org/review/35443
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-15 08:20:38 +00:00
Jaap Keuter abd83d9961 cmdline: cleanup option string definitions
Option string composition has grown organically over time and is
depending on compilation options also. This results in somewhat complex
macro definitions and the use of the string concatenation feature of the
C compiler. This change tries to clean up some of this magic by removing
definitions of empty strings and merging of adjacent strings.

Change-Id: I968449ea9b564915bee468a0cac0e114983ceebe
Reviewed-on: https://code.wireshark.org/review/35429
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-13 22:29:01 +00:00
Gerald Combs 90e80ac6af Qt: Add some null checks.
Add some null checks identified by scan-build. Switch some dynamic_casts
to qobject_casts.

Change-Id: I2b97ee8cb71db4fc883b4081568f9a5db8af85b3
Reviewed-on: https://code.wireshark.org/review/35403
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-12-11 05:12:17 +00:00
Gerald Combs c5093fb227 Qt: Remove a comment.
Remove a comment that's no longer relevant as of g14e4759b56.

Change-Id: I919631810c37e34ebc0cf5b78ab4dfbee5f5c687
Reviewed-on: https://code.wireshark.org/review/35390
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-10 16:37:44 +00:00
Gerald Combs 14e4759b56 Qt: Bump our minimum Qt version from 5.2. to 5.3.
Change-Id: Id6b39125a56b95b94d6a0bb6436bf7b2d131f924
Reviewed-on: https://code.wireshark.org/review/35385
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>
2019-12-10 08:48:57 +00:00
Gerald Combs 50713161c3 Win32: Remove win32_save_as_statstree.
win32_save_as_statstree was GTK+-only.

Change-Id: Ief029cd1a702b0c17d9602bee8a2d75ee4c3c393
Reviewed-on: https://code.wireshark.org/review/35384
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2019-12-10 01:05:43 +00:00
Gerald Combs dc19356be2 Win32: Fixup our file dialog titles.
Add a "title" argument to each of the Win32 file dialog routines, and
pass in one constructed using wsApp->windowTitleString.

Change-Id: I5ff862bd28cd16093d99ae1559ecbaca907350da
Reviewed-on: https://code.wireshark.org/review/35383
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2019-12-10 01:04:47 +00:00
Dario Lombardo d884ff2cdc Qt: fix wrong checks.
If actions_ is NULL, it will be dereferenced in the next check.
Found by clang.

Change-Id: I11f1620fae0e330dbbb7e0cc57b398f473261899
Reviewed-on: https://code.wireshark.org/review/35373
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2019-12-10 01:01:53 +00:00
Gerald Combs ef67401c33 Win32: Remove some unused code.
Remove some code that's been #if 0'ed out since 2006 and 2012. Include
file.h instead of globals.h.

Change-Id: Ib4a84c03e112d732b25df4b7b26b54e029f717a4
Reviewed-on: https://code.wireshark.org/review/35378
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2019-12-10 01:00:18 +00:00
Gerald Combs 7c883dd771 Win32: Factor out win32_check_save_as_with_comments.
Stop using win32_check_save_as_with_comments and just use the
Qt equivalent on Windows. It started out as a static funtion in
file_dlg_win32.c and using the native Windows event loop may have been
required for GTK+, but neither of those apply now.

Change-Id: I66d7f1c6346df65b0fadb3aa9cba823c0e457703
Reviewed-on: https://code.wireshark.org/review/35382
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2019-12-10 00:59:00 +00:00
Gerald Combs fe647fb085 Win32: Fix the Export Packet Dissections dialog title.
Change-Id: I25c40511b369ce93e1be2887488fc5389fdafd07
Reviewed-on: https://code.wireshark.org/review/35346
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>
2019-12-08 15:05:09 +00:00
Gerald Combs 3bf0163506 [Automatic update for 2019-12-08]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I0e2ac1a7ba3c512926a8a66255416ef74dc59591
Reviewed-on: https://code.wireshark.org/review/35348
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-08 08:20:44 +00:00
Jim Young 1e3db49f05 recent.c: cfield might be NULL
Avoid crash in GUI when using Edit Column widget.

Bug: 16245
Change-Id: Ic98be3f98144dcfa9796fadd142180e3aaf84a9e
Reviewed-on: https://code.wireshark.org/review/35301
Petri-Dish: Jim Young <jim.young.ws@gmail.com>
Reviewed-by: Jim Young <jim.young.ws@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Craig Jackson <cejackson51@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-06 21:24:41 +00:00
Gerald Combs 839e615fcb WSUG: Update the capture chapter.
Update the capture interface and options portions of the capture
chapter.

Change-Id: Ie50731264dacba2663e1de8ae5fdda7f5fbae1e9
Reviewed-on: https://code.wireshark.org/review/35281
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>
2019-12-05 05:36:43 +00:00
Gerald Combs 7be2d964f0 Qt: We show preference panes using their module names.
PreferencesDialog::setPane takes a preference module name. Fix a
comparison in PrefModuleTreeView::setPane and update some variable names
in order to make things a bit more obvious.

Modernize some related code while we're here.

Bug: 16250
Change-Id: I8f4c7e5261a219e3f32e6e9a71574d81b1852219
Reviewed-on: https://code.wireshark.org/review/35304
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-04 20:31:59 +00:00
Michael Mann e253e62750 Use human-readable numbers for conversation stats
Bug: 15360
Change-Id: Iceaa5c2336cfb58966ef12f4267fcd09ae48bfe7
Reviewed-on: https://code.wireshark.org/review/31234
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>
2019-12-03 03:17:52 +00:00
Gerald Combs 997e21d1e9 Qt: Rename the Capture Interfaces dialog to Capture Options.
Rename Capture Interfaces to Capture Options to match its main menu
item. "Options" also more closely matches what the dialog actually does.

Fixup a help item URL while we're here.

Change-Id: Iec8bdfc9f7ae6fc4fd9e97bb366b63cff139f3a6
Reviewed-on: https://code.wireshark.org/review/35294
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>
2019-12-03 03:16:16 +00:00
Gerald Combs faf3118d45 [Automatic update for 2019-12-01]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I3baf4cf43786b1680c02514f10c526cf8dca8536
Reviewed-on: https://code.wireshark.org/review/35269
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-01 08:20:14 +00:00
Gerald Combs f6953e378a Qt: Remove a couple of private variables.
ByteViewText and ProtoTree only use mono_font_ in setMonospaceFont, so
there's not much use in declaring it private in each case.

Change-Id: I3ad986052f6e013988ce851420f7f6e7b47b7ea8
Reviewed-on: https://code.wireshark.org/review/35255
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-11-28 22:54:46 +00:00
Roland Knall 57d4161a66 Qt: Remove unneeded method
This is no longer needed, as it is handled by setMonospaceFont

Change-Id: I9834bcd1a188cd6f1cb8ad1abe568a9a50d831bc
Reviewed-on: https://code.wireshark.org/review/35253
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-28 15:54:37 +00:00
Peter Wu 2d12ec67a3 Qt: fix erratic expansion of tree item when switching packets
ProtoTree::setRootNode() is designed to update the model with the new
packet tree, and additionally expand tree items in its view. When the
current selected packet is changed, it must use this method to ensure
that collapsed trees are properly expanded. Fix this regression.

It was not entirely clear that framesSelected can no longer use previous
state, so document it explicitly. Remove the call to QTreeView::reset(),
it ends up calling QAbstractItemView::reset() which touches the
selection model that refers invalidated proto_node memory. The reset
function of the view is automatically called the model is reset, so the
call was not needed anyway.

Test: open test/captures/tls13-rfc8446.pcap, expand TLS, TLS Record, and
select "Content Type". Change from frame 1 to 2, and then 3. Observe
that the expanded state remains constant with no flickering. In frame 3,
observe that the tree remains expanded even if no item is selected.

Change-Id: I0c820711f1a62aa51ac100f8ac5c89265c51eb18
Fixes: v3.3.0rc0-6-gcfee0f8082 ("Qt: Remove frameSelect signal")
Reviewed-on: https://code.wireshark.org/review/35230
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-28 14:13:57 +00:00
Peter Wu 07a1753d44 Qt: focus the correct field when switching packets
Instead of just visually marking a field after switching packets, make
sure that it is also focused such that arrow up/down keys select the
expected fields instead of the root node (the Frame layer).

Change-Id: Ic16462198fb2189496f0cceeb5a5e885673636d2
Reviewed-on: https://code.wireshark.org/review/35236
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-27 06:35:13 +00:00
Gerald Combs f2dce23b40 Qt+macOS: Add /Volumes to the file dialog sidebar.
/Volumes is hidden on macOS, which means that it doesn't show up in Qt's
non-native file dialog. Add a constructor to WiresharkFileDialog that
adds /Volumes to the file dialog sidebar. Make CaptureFileDialog and
ExportDissectionDialog subclasses of WiresharkFileDialog.

Bug: 13840
Change-Id: I4d7da3948b203eb11fb64fa056eb42a448edf914
Reviewed-on: https://code.wireshark.org/review/35201
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>
2019-11-26 05:37:37 +00:00
Peter Wu 076334a70c Qt: fix packet selection when modifiers are pressed
When the Conversation Shortcut (Ctrl-1) was pressed, the current packet
suddenly became deselected. Similarly for Go to First Packet (Ctrl-Home)
and Go To Next Packet (Ctrl-.).

Changing the selection mode to ExtendedSelection has as side-effect that
setCurrentIndex is affected by modifiers such as Ctrl and Shift. Since
Ctrl acts as a toggle, the current selection becomes empty and no
packets are selected. Fix this by explicitly requesting the selection to
be replaced.

Tested as follows:

 1. wireshark -r test/captures/dhcp.pcap
 2. Select packet 3.
 3. Press Ctrl-1, Ctrl-2. (Colors change, the packet remains selected.)
 4. Press Ctrl-Home, Ctrl-Down, Ctrl-.
 5. Observe that the packet details list is populated.

Change-Id: I17f00e7fbc6e63ad52b6a0543fd850b473e506a2
Fixes: v3.1.1rc0-762-gb3f240dbf8 ("Qt: Multiselection in PacketList")
Reviewed-on: https://code.wireshark.org/review/35203
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-25 13:38:37 +00:00
Stig Bjørlykke 6433e12474 Qt: Show all column types in context menu
Show all column types in the column context menu to improve usability
even more when show/hide columns. This is a follow-up to the improvement
to show custom column field names.

Change-Id: I0838c7ae6eec59960a0a70b485c372855e242dc0
Reviewed-on: https://code.wireshark.org/review/35206
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-25 12:17:10 +00:00
Peter Wu 40897b0234 Qt: prevent inline completion from happening for filters
Commit v3.1.0rc0-1170-ga854811c4a replaced the deprecated
`setAutoCompletion(false)` call by `setCompleter(0)`. However, the
former has as side-effect that it prevents setLineEdit from creating a
custom completer. setCompleter on the other hand had no effect since
there was no existing completer.

To fix the issue, remove the completer after it is set by setLineEdit.
This has no effect on the completer from CaptureFilterEdit and
DisplayFilterEdit instances since they override the completer from
QLineEdit. To avoid any confusion, SyntaxLineEdit::setCompleter (and
completer) should probably be renamed, these are not used by QComboBox
since it is not marked as virtual method.

Bug: 16132
Change-Id: Iad619122eddb43eb4963347982bf65dacd29629b
Fixes: v3.1.0rc0-1170-ga854811c4a ("Qt: fix more more Qt 5.13 deprecation warnings")
Reviewed-on: https://code.wireshark.org/review/35198
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-25 12:16:34 +00:00
Peter Wu c9bb676118 Qt: fix crash on Next/Previous Packet in Conversation without selection
Protect against a NULL edt pointer. That can occur when the packet
details view is empty, e.g. when no packet is selected.

Bug: 16228
Change-Id: Ie9621db4b84b504e4d9cee2add5004df2e383970
Reviewed-on: https://code.wireshark.org/review/35204
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-25 06:42:54 +00:00
Peter Wu 27f9606932 Qt: fix display filter completion with few recent entries
If 1) the recent filters menu has less than 10 entries and 2) the cursor
position is not at the end of the filter, then completion would fail.
Additionally, pressing Enter on filters with syntax errors would also
end up being saved, unintentionally.

Fix these by disabling automatic addition of entries by Qt.

Change-Id: I612c6cb8f317beb5459919b5c65b837db6150d07
Reviewed-on: https://code.wireshark.org/review/35150
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-11-24 18:28:23 +00:00
Gerald Combs a700bb9acb [Automatic update for 2019-11-24]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Ice92b8e00fdab9b0a3eccf817734cf08ea14fbe1
Reviewed-on: https://code.wireshark.org/review/35192
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-24 08:20:43 +00:00
Roland Knall 8f90446db5 Qt: Refactor ExportObjectsDialog
Add the following features:

- search now operates live (enter text changes the list live)
- filter by content-types
- Preview certain content types directly from the dialog

Change-Id: If47b64d475dd3e77485a28e8443a3e139e9bd1a4
Reviewed-on: https://code.wireshark.org/review/35182
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-11-22 05:10:16 +00:00
Jirka Novak 37f3c65ca5 rtp_analysis_dialog.cpp: save any supported codec as .au
Change improves Wireshark ability to save rtp streams. It allows a user
to save any supported codec with 8 kHz rate. In real, it means G.711 and
G.729 for now.
There is no hardcoded codec limitation during save anymore. If code detects
unsupported codec or rate during save, it replaces samples with silence and
reports it. Therefore any added codec in future will be supported.

Note to RTP saving:
RTP streams (there can be up to two of them for save) can contain multiple
codecs in each direction - some of it can be supported and some
unsupported. What should be exported then?
Till my patch save do not run and a user received nothing even part of stream
was OK/encoded with supported codec.
Therefore I managed the code to start with export and do its best.
Unknown codec/part is replaced with silence and user is warned after
export. Therefore a user will get:
a) audio - when all codecs are supported (no warning)
b) mix audio/silence - when some codecs are supported (warning)
c) only silence - when no codec is supported (warning)

BTW same output user sees/gets in RTP player for years.

Change-Id: Id938d419f5841af46d2d2d3ddfaf1ec9a0235bcc
Reviewed-on: https://code.wireshark.org/review/35105
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-21 16:06:49 +00:00
Roland Knall c55dd79d2c Qt: Further cleanup goToPacket
Change-Id: Idf98deb3f7c34adff8e58ea243c63aa094234f46
Reviewed-on: https://code.wireshark.org/review/35181
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-21 15:28:23 +00:00
Roland Knall 59ce14522b Qt: Fix nullpointer access
Due to changes with the frameSelect, this null pointer check
now fails or more on the point is more obvious. It was masked
previous

Change-Id: I11c3f3440e39742bce963d1ef8bdd27076baa700
Reviewed-on: https://code.wireshark.org/review/35177
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-21 12:05:56 +00:00
Roland Knall cfee0f8082 Qt: Remove frameSelect signal
As all frameSelect signals now transport a QList<int> of selected
frames, use this instead

Change-Id: I1888e45a4df997920aebde9706ca0ae803bdba03
Reviewed-on: https://code.wireshark.org/review/35176
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-21 10:59:05 +00:00
Gerald Combs 48725641c9 Qt: Remove a duplicate variable.
WiresharkDialog defines cap_file_, so there's no need to define it in
TrafficTableDialog.

Change-Id: I71e50da152de619fea71382400820990a05febc1
Reviewed-on: https://code.wireshark.org/review/35169
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-21 00:18:29 +00:00
Roland Knall f211624fa6 Qt: Display selected rows in overlay bar
Indicate all selected rows in the overlay bar for the PacketList

Change-Id: Icddf8607b59bde12701a7e7983df6acbf26e0d23
Reviewed-on: https://code.wireshark.org/review/35161
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-20 16:22:02 +00:00
Roland Knall 0d534873dc Qt: Speed up selection handling
Improve the speed for selection checks in PacketList and MainWindow

Change-Id: Ic3a413624463a798b5d13102965f75c7b1347b5f
Reviewed-on: https://code.wireshark.org/review/35160
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-20 16:21:51 +00:00
Mike78 b7ce4e3f7a Qt: Include Column Headings with Edit -> Copy -> Plain Text / CSV
Bug: 16215
Change-Id: Ie59aa354be055831055a294724f8d7b800d35d90
Reviewed-on: https://code.wireshark.org/review/35153
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-20 15:04:15 +00:00
Guy Harris 9de7cd9f03 Remove "..." from end of Edit > Copy > As XXX menu items.
"..." at the end of a menu item means "this pops up a dialog, asking you
for more information so it can do XXX"; those items just copy without
asking the user anything.

Change-Id: I8bc42a468d4c5605a27ae3414ecabd30ea97d87e
Reviewed-on: https://code.wireshark.org/review/35148
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-11-20 04:25:59 +00:00
Guy Harris 309bf5b547 Make sure Copy > As Text and Copy > As CSV add a final newline.
Bug: 16214
Change-Id: Idb691c1fbb33b2fabca5726c159b1f754668c1ae
Reviewed-on: https://code.wireshark.org/review/35147
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-11-20 02:46:45 +00:00
Guy Harris 141e2ffcf0 Note that Qt imposes a maximum frame number of 2^31-1.
Nothing in libwireshark limits frame numbers to 2^31-1 - they're stored
as unsigned ints and thus can go up to 2^32-1.  That doesn't fit with
the way QTreeView works, as the model is ultimately from a subclass of
QAbstractItemModel, and that uses ints, not unsigned ints, for row
numbers.

Change-Id: I174c3ccdb5e86ea5897643560936c301fcc78c54
Reviewed-on: https://code.wireshark.org/review/35141
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-11-19 22:03:52 +00:00
Guy Harris fc18fbd522 Raise a question in a comment.
In PacketList::selectedRow, will we ever have a current index but not a
selection model?

Change-Id: Ie4a4a78b836876d6a890b2a0a5e5cba2de02a870
Reviewed-on: https://code.wireshark.org/review/35140
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-11-19 21:22:34 +00:00
Roland Knall 193150fdb7 Qt: Fix compile order for PacketListRecord
Change-Id: I58f125d7d883652ac3de019bbf3b64986fd1c642
Reviewed-on: https://code.wireshark.org/review/35137
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-19 15:26:34 +00:00
Roland Knall c07aad1015 Qt: Speedup Packetlist
Make dataChanged more specific and remove unnecessary iteration
in case of recoloring

Change-Id: I1ee270623b1cb8ac3907a5d45d6a8c4c5027c322
Reviewed-on: https://code.wireshark.org/review/35135
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-19 14:18:11 +00:00
Roland Knall 1078904981 Qt: Remove unnecessary parent check
parent.column() will allways be -1, due to ::parent returning
QModelIndex() and therefore parent being invalid all the time.

Change-Id: Ibb0482b4204523dba71a2be4f078da4f11fcaf71
Reviewed-on: https://code.wireshark.org/review/35134
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-19 12:08:15 +00:00
Roland Knall effbcdcbfb Qt: Remove unused progress update
The progress update is no longer being used, due to the
fact that dissection is handled differently. Removing it,
as well as corresponding signals

The code was removed in https://code.wireshark.org/review/c/34679/

Change-Id: I043c4535ce3dbec66c5822ddbad8e648307d0738
Reviewed-on: https://code.wireshark.org/review/35133
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-19 11:55:16 +00:00
Roland Knall 962f8d0c7e Qt: Handle emptying selections
Clicking in an empty area of the Packet List to "unselect" the packet
selection, left one packet indicated as selected (by having a single
field active, but not highlighted). This is fixed, by selecting this
entry.

If the last line is being deselected, not index is set as active, as
it has been in previous versions of the Qt interface

Bug: 16216
Change-Id: Ib5353a7e59b09a4f816655e1dd65a20d6c6d1a13
Reviewed-on: https://code.wireshark.org/review/35132
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-19 09:37:06 +00:00
Gerald Combs 5b78bbfc02 Qt: Update ColorUtils::themeLinkBrush.
Qt 5.12.6 fixed the dark mode link color on macOS. Update themeLinkBrush
accordingly.

Ping-Bug: 15511
Change-Id: I9d89bf3ef9c8a9b8c14dc5f435b9cdbb30fca2aa
Reviewed-on: https://code.wireshark.org/review/35126
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>
2019-11-18 21:23:51 +00:00
Gerald Combs e8ef656842 Qt: Remove an unneeded connection.
Fixes

Change-Id: I259e5bea0d0475d1bbb0c584b125a4ea819dda64
12:31:07.342     Main Warn QObject::connect: No such slot AboutDialog::copyToClipboardTriggered() in ../ui/qt/about_dialog.cpp:300
12:31:07.342     Main Warn QObject::connect:  (sender name:   'copyToClipboard')
12:31:07.342     Main Warn QObject::connect:  (receiver name: 'AboutDialog')
Reviewed-on: https://code.wireshark.org/review/35129
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-18 21:23:08 +00:00
Roland Knall aa2145982f Qt: Fix dangling delete for sequence diagramm
Change-Id: I452bc718988dbb2f4dfbba037320b7b914efe380
Reviewed-on: https://code.wireshark.org/review/35120
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-17 23:32:45 +00:00
Roland Knall c8b0968c77 Qt: Drag and drop label text changed
The name was used instead of the filter

Change-Id: Id27d7ac45ecc9487183b33d56bea3f99290ce410
Reviewed-on: https://code.wireshark.org/review/35121
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-17 23:17:34 +00:00
Roland Knall 8633ca6a88 Qt: Correct drag and drop with column header
Drag and Drop used the wrong filter name, fixing by using the correct one
and re-establish the feature

Change-Id: I7b3722c8087b4af7f2ea74f833ea130cbec0d19e
Reviewed-on: https://code.wireshark.org/review/35118
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-17 22:44:48 +00:00
Stig Bjørlykke a51c58fa1b Qt: Cleanup space inside parentheses
Remove randomly used space inside parentheses to make the coding
style uniform. Add space after if, for and while.

Change-Id: I519f5994b6f73d8a57a5004d51ca460276c618fe
Reviewed-on: https://code.wireshark.org/review/35112
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-17 20:43:10 +00:00
Roland Knall b3f240dbf8 Qt: Multiselection in PacketList
This implements multi-selection for the PacketList. It
allows multiple lines to be selected, and either drag/drop
them to a text editor or use Ctrl/Cmd+C to copy the content
to a clipboard.

Opening the context menu disables the selection, and it
does not change the underlying currently selection. This is
done on purpose, as multi-selection is a copy-task only
functionality at this point

Export & Print work as expected, exporting just the selected
items. Same goes for the copy menu, which has the additional
entries for copying the list elements

Bug: 14612
Change-Id: I77960aa1ab1d172a21abfa469baac0cd57f9f9d9
Reviewed-on: https://code.wireshark.org/review/35073
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-17 12:20:29 +00:00
Gerald Combs 7d2e3fa8f5 [Automatic update for 2019-11-17]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I5a453e0aeb29491152bce579ba11d65d0b05acc8
Reviewed-on: https://code.wireshark.org/review/35108
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-17 08:20:23 +00:00
Graham Bloice 81b97d04a9 About Dialog: Add a copy to clipboard button for the version info
Make life a little simpler when asking for the version info on Ask

Change-Id: I51fd8a390398f7e42e3edcc889d9e53dbfd0980c
Reviewed-on: https://code.wireshark.org/review/35104
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-16 23:20:43 +00:00
Gerald Combs 6a8963b57f Software update: Make our architecture detection more strict.
Change-Id: I1fd0de42aa33f18905b2ed80588c279fb5ae8ead
Reviewed-on: https://code.wireshark.org/review/35098
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-15 22:46:22 +00:00
Gerald Combs 5cd561829e Software update: Fix a copy+paste error.
Change-Id: Id122e67df5ba662f0da84f5b412165c92460f223
Reviewed-on: https://code.wireshark.org/review/35096
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-15 21:00:23 +00:00
Gerald Combs 02057200fd macOS: Add support for automatic updates using Sparkle.
Add support for automatic updates using the Sparkle framework. Add
FindSparkle.cmake and associated CMake plumbing. Add a public key and
other info to Info.plist.in. Add ui/macosx/sparkle_bridge.{h,m}, which
wraps the Sparkle API. Make code that's specific to WinSparkle
Windows-only.

Add Sparkle installation steps to the macos-setup scripts. Sparkle
prints a warning if your bundle is unsigned (which is the case during
development) so disable installing it by default.

Updating here takes a long time. We might be able to fix that by
shipping our DSYMs separately.

Change-Id: I6cc6671db5657dadc514bda6bf6e1c8bbc9468a5
Reviewed-on: https://code.wireshark.org/review/35090
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-15 18:39:04 +00:00
Roland Knall 5f8ed1126a Qt: Fix various LGTM.com reported issues
Mostly shadowed variables or similar minor issues

Change-Id: I98a76eb4cac1ba1356a239a0ed7beb550ced0651
Reviewed-on: https://code.wireshark.org/review/35091
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-14 22:54:29 +00:00
Stig Bjørlykke 9dbf684c71 Qt: Show custom column fields in context menu
Show the custom column field name in the column context menu to
improve usability when show/hide columns. The column title alone
may not be sufficient to separate different columns.

Change-Id: I52f249433b8090249af87725fa97eba302692918
Reviewed-on: https://code.wireshark.org/review/35088
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-14 09:53:25 +00:00
Stig Bjørlykke 7da6109f3b Qt: Fix column alignment check in context menu
Don't indicate "Align Left" when the column has default alignment,
because that may be wrong. Add back support for turning off custom
column alignment.

This is a regression from ge39f2bb5.

Change-Id: Ib9dc24067b02a44ffb2f3cd387f1c1c2a5c780ab
Reviewed-on: https://code.wireshark.org/review/35087
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-14 09:50:22 +00:00