Commit Graph

3987 Commits

Author SHA1 Message Date
Gerald Combs 9b07412277 Qt: Add a packet diagram view.
Add a new top-level view that shows each packet as a series of diagrams
similar to what you'd find in a networking textook or an RFC.

Add proto_item_set_bits_offset_len so that we can display some diagram
fields correctly.

Bugs / to do:
  - Make this a separate dialog instead of a main window view?
  - Handle bitfields / flags

Change-Id: Iba4897a5bf1dcd73929dde6210d5483cf07f54df
Reviewed-on: https://code.wireshark.org/review/37497
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-08-10 18:17:50 +00:00
John Thacker 744c57b42c UI: Follow Stream "Show and save data as" -> "Show data as"
"Save as" in Follow Stream saves whatever is displayed (except for
Raw), and has long always saved in UTF-8 encoding. (A few things are always
ASCII, which is still valid UTF-8.) The older description of "Show data as"
makes more sense here, as otherwise it implies data will be saved in the
original encoding instead of UTF-8. A checkbox or similar to save in the
original encoding instead of UTF-8 is a possible future enhancement.

Change-Id: I2d5016e9a974d5d614ff93eab0301ea0ce96108e
Reviewed-on: https://code.wireshark.org/review/37771
Reviewed-by: Guy Harris <gharris@sonic.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2020-08-09 23:56:13 +00:00
Gerald Combs 5ca2327cc0 [Automatic update for 2020-08-09]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I447ea71cd55ad637f1792ad0224ba43435ce2769
Reviewed-on: https://code.wireshark.org/review/38091
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-08-09 08:17:38 +00:00
Stig Bjørlykke e189bd2996 Qt: Always pop empty filter syntax
When checking a filter the status message should always be pop'ed when
having an empty filter, regardless of having the clear button or not.

This will ensure the status message is removed when removing a display
filter using DisplayFilterEdit in other dialogs than Main.

Change-Id: I3c9a4933cd0c60ab624ea1939ffafecb58b3ffd5
Reviewed-on: https://code.wireshark.org/review/38052
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2020-08-06 05:27:27 +00:00
Stig Bjørlykke 4ac54e27b0 Qt: Fix status message issues in find packet search
Fix some status message and tooltip issues introduced when enabling
autocomplete on find packet search in g0162ba73.

1. Enable or disable completion only when search type is changed.
   This setting is used in checkDisplayFilter(), which used to be
   called *before* changing allowCompletion in updateWidgets(), and
   this was causing issues with wrong status messages.

2. Check filter (usually triggered by changes in the search line)
   or reset filter syntax (added by DisplayFilterEdit) when search
   type is changed. This will trigger an update of the status message
   and the tooltip.

3. Stop checking display filter if not doing completion (not display
   filter search). This will avoid setting a status message from a
   previous illegal display filter.

Ping-Bug: 16638
Change-Id: I1534d9494cc4d7b7a0583cb845c091ae709458ae
Reviewed-on: https://code.wireshark.org/review/38061
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-08-05 21:31:13 +00:00
Stig Bjørlykke f54611d110 Qt: Pop filter syntax in search frame
Pop the filter syntax message in search frame when changing search type
and when hiding the widget to avoid having outdated status messages.

Change-Id: I87c63c070621cff0d5ecebc2fcd41f9d7c02adec
Reviewed-on: https://code.wireshark.org/review/38051
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-08-05 14:59:15 +00:00
Gerald Combs 93260afcff [Automatic update for 2020-08-02]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I08367d6811db844df8eb78b3ddf71684a7d9f6ec
Reviewed-on: https://code.wireshark.org/review/38024
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-08-02 08:17:51 +00:00
Gerald Combs 898b00c9a1 Qt: Restore an attribution.
The ByteViewText widget has been refactored a few times. At one point it
was based on QHexView by Evan Teran, and had a comment saying so. A
later refactor removed the comment but didn't completely rewrite all of
the code. Put the comment back (and spell Evan's name correctly this
time around).

Change-Id: I2fe7779e1b6773a5e8b38d317ebfd26b07900272
Reviewed-on: https://code.wireshark.org/review/37989
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-07-30 05:31:06 +00:00
Guy Harris c68d36b173 wiretap: have the file's time stamp resolution be a dump parameter.
Add a tsprec value to the wtap_dump_params structure, giving the
per-file time stamp precision.

In wtap_dump_init_dumper(), when constructing a dummy IDB for files that
don't have one, fill in the tsprecision and time_units_per_second values
based on the tsprec value in the wtap_dump_params structure.

Change-Id: I3708b144d4d0ac0dfbe32bd1c16768a75c942141
Reviewed-on: https://code.wireshark.org/review/37979
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-29 13:49:09 +00:00
Gerald Combs 4805a70e0c [Automatic update for 2020-07-26]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I62571ee63f6d515024e9dfe2a2caeb5634510b8d
Reviewed-on: https://code.wireshark.org/review/37962
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-07-26 08:17:29 +00:00
Gerald Combs fcf787b408 [Automatic update for 2020-07-19]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Ibf53b551fdcaeb6aa90ab11ef9d8a2f48cde24c3
Reviewed-on: https://code.wireshark.org/review/37892
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-07-19 08:16:02 +00:00
Stig Bjørlykke e1df757c46 Qt: Improve status bar messages
Use pushStatus() in C++ code, improve translation support and end
each message with a dot.

Change-Id: I3f673da4736c3fe49203048da282afa1abf92337
Reviewed-on: https://code.wireshark.org/review/37887
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-18 04:02:23 +00:00
Roland Knall a5533561db Qt: Fix 5.15 deprecation warnings
QString is no longer allowed to be append()ed to QByteArray.

Change-Id: I177e271d01c51d190b57f679f38d11b31b1f96c4
Reviewed-on: https://code.wireshark.org/review/37879
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2020-07-16 08:09:28 +00:00
Stig Bjørlykke 3ff0a55d5c Qt: Check if "Apply as Column" column already exists
Use the existing (possible hidden) column when doing "Apply as Column"
on a field which is already used as a custom column. This will help
prevent having multiple equal custom columns, where all will be hidden
at startup and profile change when only one of them are configured as
hidden.

Multiple equal columns can always be manually configured using
"Preferences -> Appearance -> Columns" if this is intended.

Change-Id: Ib03893facfa3f194f3b3303645fb3f9313ec9e91
Reviewed-on: https://code.wireshark.org/review/37861
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-15 03:57:01 +00:00
David Perry 00b5c2809a Sort list of available filetypes when loading a capture
When loading a capture file in the GUI, this change causes the list of
available file types to be sorted alphabetically. "Automatically detect
file type", pcap, and pcapng remain at the top of the list.

Unlike my prior crack at this in change #36862, this is done directly in
the file open dialogs (open_file_hook_proc() for Windows,
CaptureFileDialog::addFormatTypeSelector() and CaptureFileDialog::open()
for Qt). No changes to wiretap.

It's not a huge deal if you folks decide this isn't necessary, I just
think this gives a bit of extra polish to the load-file dialog. It also
makes it easier for the user to spot the format they want if they aren't
aware that the file-format dropdown accepts keyboard input.

Change-Id: Ie81c6d99e83fe862f20b413318ac8ce76463a766
Reviewed-on: https://code.wireshark.org/review/37749
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-07-14 16:25:11 +00:00
Guy Harris 608835bf56 Don't call any routines from WinPcap/Npcap packet32.dll.
We aren't using them now; stick to libpcap APIs (including Windows-only
libpcap APIs).

Change-Id: I812eaa31ba1e6e611418853105d3e00c9130a420
Reviewed-on: https://code.wireshark.org/review/37852
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-07-14 07:30:59 +00:00
Stig Bjørlykke 4fc9098830 Qt: Keep pane sizes when quit without loading a file
Change from master_split_.show() to packet_list_->show() in layoutPanes()
to avoid an issue where the pane sizes was stored with wrong values when
quit just after startup without loading a file.

This fixes a regression issue from g5ce52f74 and g7ebd5405.

Change-Id: I7ba1b5f8c9440d41d58dfd729013a0fd1e16be07
Reviewed-on: https://code.wireshark.org/review/37839
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2020-07-13 16:16:25 +00:00
Gerald Combs 300099e9e2 [Automatic update for 2020-07-12]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I68419eed3c7d203b483f51f09f56b863fd65ffd0
Reviewed-on: https://code.wireshark.org/review/37832
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-07-12 08:17:56 +00:00
Gerald Combs d0cd357825 Qt: Remove some dead code.
We no longer support Qt 5.2 or earlier.

Change-Id: I94ba6df2120956dadfce407fd999d39250485bc6
Reviewed-on: https://code.wireshark.org/review/37821
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-11 06:02:28 +00:00
John Thacker e84d431e39 QT: Don't use qAsConst and C+11 on QT < 5.7
Introduced QT 5.7 calls in my recent change (also C+11, which is
required for QT >= 5.7). Providing an alternate code path for QT < 5.7

Change-Id: I866af35138d4691a659aee756ce9c3ce4ffb933f
Reviewed-on: https://code.wireshark.org/review/37779
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-07-08 05:51:06 +00:00
Gerald Combs 4dc3114c05 Windows: Set our locale to ".UTF-8".
In each of our executables we were calling "setlocale(LC_ALL, "")" at
startup. This told Windows that output was encoded using the current
system code page. Unless the code page was 65001 (UTF-8), this was a lie.

We write UTF-8 to stdout and stderr, so call "setlocale(LC_ALL, ".UTF-8)"
at startup on Windows. This lets the CRT translate our output correctly
in more cases.

Clarify and expand the OUTPUT section in the tshark man page.

Bug: 16649
Change-Id: If93231fe5b332c292946c7f8e5e813e2f543e799
Reviewed-on: https://code.wireshark.org/review/37560
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-07-06 16:20:25 +00:00
John Thacker 9fc054a65b Add all supported charsets to Show Packet Bytes/Follow Stream
Use the QT text codec support to add charset conversions for all character
encodings supported by QT to Show Packet Bytes and Follow Stream (Save As
will convert to UTF-8.) Note that this is dynamic and the exact list will
depend on the version of QT and if libicu support is enabled. This does
make the list of codecs pretty long, so hopefully it shows up well on all
the different QT styles.

This does not yet support when multibyte characters span more than one packet
in Follow Stream, though the current code doesn't do that for UTF-8 or UTF-16
already. This is probably most useful for HTTP captures.

Bug: 16137
Change-Id: I6d5cd761a5d9d914b7a787fe8eb02b07b19642e6
Ping-Bug: 16630
Reviewed-on: https://code.wireshark.org/review/37707
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2020-07-06 14:21:41 +00:00
Gerald Combs 5e05fe0421 [Automatic update for 2020-07-05]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I4a369852fe1fbe2917932ba2a1f56eeb0fc4db28
Reviewed-on: https://code.wireshark.org/review/37703
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-07-05 08:15:50 +00:00
Martin Mathieson 0162ba730a Enable display filter autocomplete on find packet search.
Bug: 16638
Change-Id: Ifd9c9e4392fdc3d32b2aa4466d5a7f2835893338
Reviewed-on: https://code.wireshark.org/review/37682
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-05 07:46:41 +00:00
Stig Bjørlykke daebdc4b1a Qt: Handle filenames in preference editor frame
Add support for handling PREF_SAVE_FILENAME, PREF_OPEN_FILENAME and
PREF_DIRNAME in a preference editor frame.

Change-Id: Ie9d1cc08bc79a0adefff344fd0d117405f86475c
Reviewed-on: https://code.wireshark.org/review/37669
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2020-07-03 06:12:48 +00:00
Stig Bjørlykke a6d8a2c118 Qt: List all protocols in PacketList "Protocol Preferences"
Show all protocols which has preferences in the packet list context
menu "Protocol Preferences".

Change-Id: I72e2ed95db36cc6d817ca44db214782f075d55d6
Reviewed-on: https://code.wireshark.org/review/37666
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2020-07-03 06:12:40 +00:00
Stig Bjørlykke b8a330d2d5 Qt: Update ByteView recent settings on all tabs
The ByteView recent settings are common for all tabs. Ensure all
tabs are updated when display format or character encoding is changed.

This fixes an issue where the row_width is wrong and the menu action
checkmarks are out of sync after switching ByteView tab.

Change-Id: Ied25ac41467143f37327ccadcb821262eb86ef0a
Reviewed-on: https://code.wireshark.org/review/37655
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2020-07-03 06:11:56 +00:00
Stig Bjørlykke dd247d821e Qt: Remove ellipsis from "Disable protocol" menu item
The protocol preferences menu item for disabling the protocol does
not bring up a new dialog, so remove the ellipsis.

Change-Id: I210bd6d5f76ce240f1d2a2d1a852e176a48ea1f0
Reviewed-on: https://code.wireshark.org/review/37667
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-02 11:17:09 +00:00
Stig Bjørlykke 408bc4cb1d Qt: Add keyboard shortcut for Decode As
Add keyboard shortcut Ctrl+Shift+U (User specified decodes) to bring
up the Decode As dialog.

Change-Id: Idd720431f87a5b645fdb151ef6d37347d26dbf1c
Reviewed-on: https://code.wireshark.org/review/37617
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2020-07-02 06:13:36 +00:00
Stig Bjørlykke 9a1a5fd22a Qt: Add copy from another profile for Decode As
Add a new button to the Decode As dialog to copy entries from
another profile.

Change-Id: Ia04edd063bd2eba14b2b14acfd53b03111646f7e
Reviewed-on: https://code.wireshark.org/review/37616
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2020-07-02 06:13:27 +00:00
Stig Bjørlykke cb5bb6c99b Qt: Use elided heading in filter menus
The heading in Apply as Filter and Prepare as Filter may be very
wide for byte arrays. Use ElideRight with an appropriate length
to limit the menu width.

Change-Id: I2b8f5c805d8fd180c23a211fb7a88d16591175d0
Reviewed-on: https://code.wireshark.org/review/37641
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-02 04:59:49 +00:00
Martin Mathieson 570a0cb301 Set member variables in initialiser list (rather than in CTOR bodies).
Also simplify some boolean logic in packet-dcerpc.c.
All reported by cppcheck.

Change-Id: I2075f2ec10dc777ad7635da4ef056d17fc5b0be0
Reviewed-on: https://code.wireshark.org/review/37609
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-06-30 12:11:15 +00:00
Stig Bjørlykke 52512329c2 Qt: Accept changes in Decode As when combo box has focus
Accept changes in the Decode As dialog on Save and Ok even when the
Field or Current combox box still has focus.

Change-Id: I9d6277ff57714679b574756cbc6d4c4dcb06f8e2
Reviewed-on: https://code.wireshark.org/review/37580
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2020-06-29 18:43:20 +00:00
rbroker 1f75d7b3b9 wslua: Add ability to query current temporary color filter text
The LUA API provides the "set_color_filter_slot" function, but without
a corresponding "get_" function, it's very hard for two LUA dissectors
to co-exist without one overwriting any color filters set by the other.

It also looks like the documentation comment for
"set_color_filter_slot" had an off-by-one error, which I've corrected
as I was adding almost identical documentation for the new API.

Change-Id: Ic54d23be555ec12e1830bbe6f84a1b04d04fd4f0
Reviewed-on: https://code.wireshark.org/review/37511
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-25 08:02:27 +00:00
Gerald Combs dad321fb0e [Automatic update for 2020-06-21]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I951278c0a2fc5feb434c093c3ad5f94c651ba498
Reviewed-on: https://code.wireshark.org/review/37531
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-06-21 08:16:16 +00:00
Roland Knall c0b7a1d6eb Qt: Fix separator for FilterExpressions
Change the separator from && to // due to popular support for
that separator instead.

Bug: 16498
Change-Id: I0ee934f3f8a7b9ff1c062b533046980e3feb3d99
Reviewed-on: https://code.wireshark.org/review/37465
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>
2020-06-15 05:03:35 +00:00
Gerald Combs 78bcdca8d3 [Automatic update for 2020-06-14]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I158820fb33a2148f1075a59e2fec50edf10b9ecf
Reviewed-on: https://code.wireshark.org/review/37471
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-06-14 08:15:57 +00:00
Pascal Quantin c97076b7d7 MAC LTE: add support for extended LCID
This feature introduced in V15.5.0 allows to have up to 15 DRBs by
adding LCID 32 to 38

Change-Id: I4442e26d115efe484eda4f2d8921483cf4278b99
Reviewed-on: https://code.wireshark.org/review/37462
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-06-12 04:13:25 +00:00
Roland Knall 6f700a9da6 Qt: Fix zip import/export on Windows
On Windows, cleaning up the filename inside the zip
failed due to the backslash not properly being recognized.
This lead to profiles, which could not be imported on another
machine, if the filename contained a path not existing there.

Bug: 16608
Change-Id: Ib30b2370e30c30ac60f283edf6376c07258c25b6
Reviewed-on: https://code.wireshark.org/review/37437
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2020-06-10 12:49:18 +00:00
Gerald Combs 668161f8dd [Automatic update for 2020-06-07]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I09905565b83aeb28c1976d321a32f616f4527e25
Reviewed-on: https://code.wireshark.org/review/37390
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-06-07 08:18:28 +00:00
Gerald Combs 2318cbd8bc Qt: Fix a Qt 5.15 deprecation warning for QProcess.
Move our explorer.exe selection to a separate argument.

Change-Id: Id1f3d565a567fef30190b6abd1ba8f7bc3805911
Reviewed-on: https://code.wireshark.org/review/37362
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-06-03 08:52:25 +00:00
Martin Mathieson e0eefe186a Fix some cppcheck issues:
- Some redundant assignments or tests.
- Some declarations were changed to match definitions in terms of
including _U_ for the same parameters
- Some parenthesis added/changed to made precedence more obvious

epan/color_filters.c:533: style: Variable 'name' is reassigned a value before the old one has been used.
epan/color_filters.c:534: style: Variable 'filter_exp' is reassigned a value before the old one has been used.
asn1/tcap/packet-tcap-template.c:2199: warning: Function 'dissect_tcap_ITU_ComponentPDU' argument order different: declaration '_U_, tvb, offset, _U_, tree, _U_' definition '_U_, tvb, offset, actx, tree, _U_'
epan/dissectors/packet-aim.c:2546: warning: Function 'dissect_aim_tlv_value_icq' argument order different: declaration 'ti, subtype, tvb, _U_' definition 'ti, _U_, tvb, pinfo'
epan/dissectors/packet-arp.c:1133: style: Clarify calculation precedence for '&' and '?'.
epan/dissectors/packet-arp.c:1143: style: Clarify calculation precedence for '&' and '?'.
epan/dissectors/packet-arp.c:1158: style: Clarify calculation precedence for '&' and '?'.
epan/dissectors/packet-arp.c:1168: style: Clarify calculation precedence for '&' and '?'.
epan/dissectors/packet-gtpv2.c:5997: warning: Function 'dissect_gtpv2_mbms_service_area' argument order different: declaration 'tvb, _U_, tree, _U_, _U_, _U_, _U_, _U_' definition 'tvb, _U_, tree, item, _U_, _U_, _U_, _U_'
epan/dissectors/packet-gtpv2.c:6291: warning: Function 'dissect_gtpv2_mbms_time_to_data_xfer' argument order different: declaration 'tvb, _U_, tree, _U_, _U_, _U_, _U_, _U_' definition 'tvb, _U_, tree, item, _U_, _U_, _U_, _U_'
epan/dissectors/packet-gtpv2.c:6369: warning: Function 'dissect_gtpv2_epc_timer' argument order different: declaration 'tvb, _U_, tree, _U_, _U_, _U_, _U_, _U_' definition 'tvb, _U_, tree, item, _U_, message_type, _U_, _U_'
epan/dissectors/packet-knxip.c:2939: style: Condition 'mac_error' is always false  (just added comment)
epan/dissectors/packet-mac-lte.c:4386: style: Clarify calculation precedence for '&' and '?'.
epan/dissectors/packet-nas_5gs.c:1828: style: Variable 'nas5gs_data->payload_container_type' is reassigned a value before the old one has been used. (noted confusing recursion)
epan/dissectors/packet-rpcrdma.c:587: warning: Identical condition 'offset>max_offset', second condition is always false
epan/dissectors/packet-rsl.c:2098: style: Assignment of function parameter has no effect outside the function.

Change-Id: Ib5c9a04cfb6e6233972bc041434601c8ef09c969
Reviewed-on: https://code.wireshark.org/review/37343
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-06-01 20:44:27 +00:00
Gerald Combs 2ca5a14513 Qt: Fix some Qt 5.15 deprecation warnings.
Use Qt::ItemFlags() instead of 0.

Use QFileDialog::Options() instead of 0.

Use QComboBox::textActivated instead of QComboBox::activated.

Switch to just using Qt::WindowFlags() in GeometryStateDialog. This
*should* work for Qt 5.5 and earlier, but if it doesn't we can switch
back.

Change-Id: Iaf4e7efa1a11fc7f3325b449eef1be308cd21b45
Reviewed-on: https://code.wireshark.org/review/37349
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-01 08:20:01 +00:00
Gerald Combs 5e0ebc9fc0 [Automatic update for 2020-05-31]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I85f6df38480057cab59cf3edc6b6fb12dd116afc
Reviewed-on: https://code.wireshark.org/review/37339
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-05-31 08:17:44 +00:00
Nardi Ivan c416e2ff37 Qt: improve performance of related packet delegate
Use proper functions to lookup/iterate elements in QHash
Avoid useless lookup

Change-Id: I7a115ae5ed35b31599f33050e36bf68007167a96
Reviewed-on: https://code.wireshark.org/review/37304
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2020-05-30 07:50:12 +00:00
Gerald Combs 4e6f47fa62 Qt: Make our exported and saved line endings consistent.
Make sure we set QIODevice::Text on our QTextStreams when saving and
exporting text so that we get native line endings on Windows.

Change-Id: I4602157d2d170eb9a2c79032254ea5be236c7589
Reviewed-on: https://code.wireshark.org/review/37336
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-05-30 06:46:01 +00:00
Gerald Combs 76d92ba7e7 Qt: Updates for 5.15.
Fix the following deprecation issues for Qt 5.15:

Use Qt::WindowFlags() instead of 0 in Qt >= 5.6.

Pass Qt::SkipEmptyParts instead of QString::SkipEmptyParts to QString::split() in Qt >= 5.15.

Use QMultiMap instead of QMap where we were using QMap::uniqeKeys().

Use QCP::Interactions() instead of 0.

Use '\n' instead of QTextStream::endl.

Use QWheelEvent::angleDelta() instead of QWheelEvent::angle().

Change-Id: Ie2d69d3a396c0821c2c34f506ddad6f8e22f7049
Reviewed-on: https://code.wireshark.org/review/37334
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-05-30 06:45:07 +00:00
Gerald Combs 567d9d38da [Automatic update for 2020-05-24]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: If34f97445bfdd336cd369567fbbd004129e487d5
Reviewed-on: https://code.wireshark.org/review/37293
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-05-24 08:17:19 +00:00
Gerald Combs 238781fe91 [Automatic update for 2020-05-17]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I48106b3648d1a699f3153210f68765604e226e8e
Reviewed-on: https://code.wireshark.org/review/37238
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-05-17 08:16:24 +00:00
Gerald Combs a941457d91 [Automatic update for 2020-05-10]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: If6b68e242160198aed0de5947813d0db20c799f2
Reviewed-on: https://code.wireshark.org/review/37173
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-05-10 18:18:48 +00:00