Commit Graph

5833 Commits

Author SHA1 Message Date
Guy Harris d7ce2bece8 Add a "Include column headings" checkbox in export dissections and print.
Bug: 14945
Change-Id: I1c5ed0bc7e738a5c8d65c09f25686549e1e6dd67
Reviewed-on: https://code.wireshark.org/review/28615
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-05 23:49:47 +00:00
Alexis La Goutte 750660d60f tap-rtp-common: fix comma at end of enumerator list [-Wpedantic]
Change-Id: I8b66da3dcb3ad0c8b99e196d0c8c882388f8c5db
Reviewed-on: https://code.wireshark.org/review/28593
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-05 02:45:16 +00:00
Guy Harris 1c6dc6d31f Some fixes.
For filePath() and fileName(), just return a null string if we can't
convert from the native encoding to UTF-8 - those aren't used for
displaying, those are used for setting the main window's file name and
for generating names of files to save based on the capture file name.

Have fileDisplayName() just return the display name, without
"[closing]"/"[closed]" decoration or a special case for no file being
open (just return a null string if there's no file open), and have
fileTitle() return the decorated display name.

Change-Id: I244f318d5444dcf58527e5d38c4d073c28b73810
Reviewed-on: https://code.wireshark.org/review/28594
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-04 17:45:47 +00:00
Guy Harris 9655acc757 fileTitle -> fileDisplayName.
That more closely matches the name of the file.h routine that it uses.

Change-Id: Ia206fb8331f4f3ad8035da9f6137ad2428d53a49
Reviewed-on: https://code.wireshark.org/review/28589
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-04 02:09:04 +00:00
Guy Harris 60d5c04dc3 We have cf_get_display_name(); use it to get the title bar string.
Change-Id: I318472670722d24c3d3896cbd1e88623f5adb297
Reviewed-on: https://code.wireshark.org/review/28588
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-04 01:41:33 +00:00
Guy Harris a442fd512b Set the file path for a main window if it's not a temporary file.
That's needed to support the "proxy icon", so it can be dragged.

Change-Id: I1ad209cd43a2a6df9c52d076f6513780b0ac51be
Reviewed-on: https://code.wireshark.org/review/28587
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-04 00:52:08 +00:00
Guy Harris 9541945aa2 Just use CaptureFile::fileTitle() in MainWindow::setTitlebarForCaptureFile().
It now does the heavy lifting, so MainWindow::setTitlebarForCaptureFile()
doesn't have to duplicate it.

Change-Id: I97ded85306e625b2c67c3fde62a636ec6818a6f5
Reviewed-on: https://code.wireshark.org/review/28586
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-03 22:52:37 +00:00
Guy Harris d76db1de78 CaptureFile.fileTitle() is for display, not for file name processing.
Don't use CaptureFile.fileTitle() if you're constructing a pathname; use
it only if you're constructing a window title.

Change-Id: I40f225ddb07be2f7dc3ae03108dae816846f20c7
Reviewed-on: https://code.wireshark.org/review/28582
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-03 22:41:18 +00:00
Guy Harris 670377f491 Don't show temporary file names in title bars.
For dialogs and auxiliary windows, if we have a live capture that hasn't
yet been saved to a permanent location, there's no good reason to show
the temporary file name in the title bar, as:

  it's a random string that doesn't indicate where the capture was done
  and that could confuse people (see, for example, the confusion in bug
  14929, in which somebody referred to the "Follow TCP Stream" window as
  the ".pcap dialog" because its title had ".pcap" at the end, due to
  the capture file being a temporary file and its name showing up in the
  title bar of that window);

  it differs from what the main window title bar shows.

While we're at it, don't assume that the file name in the capture_file
structure is a UTF-8 string - some UN*Xes might not use UTF-8 for file
names.

Change-Id: I0d3dfd5d7f896ea37533daf7089b688710dbabf0
Reviewed-on: https://code.wireshark.org/review/28581
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-03 22:17:15 +00:00
Peter Wu 536e26c55e Qt: fix crash on opening a capture file while loading/saving another
Closing a capture file while it is being loaded will result in a crash.
As a workaround, disallow closing the capture file. The requested action
(e.g. MainWindow::openCaptureFile) will be silently ignored.

While at it, protect process_specified_records (called when saving
files) similarly to cf_read and fix a crash that occurs when a capture
from the Capture Dialog is started while a file is being loaded:

    file.c:360:cf_close: assertion failed: (cf->state != FILE_READ_IN_PROGRESS)

Bug: 10870 # moving rapidly between large files in a file set
Bug: 13594 # start capture while loading/saving file
Bug: 14351 # open another file while loading file
Change-Id: I6ce8f3163c3fa4869f0299e49909a32594326ce4
Reviewed-on: https://code.wireshark.org/review/28541
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-03 07:58:00 +00:00
Guy Harris c87a6d364d Make arrays of 4 octets arrays of 4 guint8.
That makes it clearer that it's not a string, and avoids some type
complaints from change Ida7b98af8c44a52ddac2c4ab0702db2519a0c4af.

Update a comment while we're at it.

Change-Id: I6737bb2a7ff3b4d461700c641cb580194f7809e7
Reviewed-on: https://code.wireshark.org/review/28572
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-02 21:42:37 +00:00
Guy Harris a88126d91f Make an array of 4 octets an array of 4 guint8.
That makes it clearer that it's not a string, and avoids some type
complaints from change Ida7b98af8c44a52ddac2c4ab0702db2519a0c4af.

Update a comment while we're at it.

Change-Id: Idba56f38d58d87f73aee41a11195371021a1328d
Reviewed-on: https://code.wireshark.org/review/28571
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-02 20:49:17 +00:00
Jiri Novak 3937f65e67 RTP: If multiple codecs are used in RTP stream flow, all are shown in codecs column
Change-Id: Ica8b3bc2b6b59790805764ec88c6f4e3f8689a85
Reviewed-on: https://code.wireshark.org/review/28435
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-06-28 00:46:39 +00:00
Graham Bloice d8459d8930 packet export: Add default file extension
Adds a default file extension when exporting packet dissection
in various formats:

text       -> txt
postscript -> ps
csv        -> csv
pdml       -> pdml
psml       -> psml
c arrays   -> c
json       -> json

Change-Id: Ie5d942a3c694abd8edf9df184f6e219d4b870a1b
Reviewed-on: https://code.wireshark.org/review/28490
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-06-27 23:01:03 +00:00
Gerald Combs fe94133f0d Remove code specific to older versions of Visual Studio.
Remove -DBUILD_WINDOWS and sections of code that we no longer use.

Bug: 14715
Change-Id: Iae1a950e2f52f4ce45fcf0ae5dea06c1172c3a28
Reviewed-on: https://code.wireshark.org/review/28466
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-26 22:30:50 +00:00
Gerald Combs 67a3f83769 GTK+: Remove the last original bit of GTK+ code.
Change-Id: If1eedf278336494d6989515aa573ae1682851d44
Reviewed-on: https://code.wireshark.org/review/28464
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-26 21:30:06 +00:00
Gerald Combs c74dba69fc Windows: Fetch our version using RtlGetVersion.
GetVersionEx is deprecated. Use RtlGetVersion instead. Remove
get_windows_major_version since it's no longer needed.

Change-Id: I02f6458608c2328a96a0ac71c6b1f9187babd049
Reviewed-on: https://code.wireshark.org/review/28443
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-26 20:30:02 +00:00
Roland Knall 1437b421a2 Qt: Fix crash when starting to drag on the wrong position
When dragging on the wrong position in the toolbar, wireshark
crashes

Change-Id: I756e9caebc844d32e99e9fd3e338a872986b9e96
Reviewed-on: https://code.wireshark.org/review/28458
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-06-26 19:51:57 +00:00
Guy Harris 74d0be8201 Disable coloring rules with invalid packet-testing expressions.
If the packet-testing expression for a coloring rule is set to an
invalid expression, disable the filter; this should provide at least
*some* indication to the user that it's not valid, although we should
really pop up a dialog or something - the little small-type notice below
the list of filters is *really* not all that obvious.

Ping-Bug: 14906
Change-Id: I3c036c3509520913db0a64c30bc1c57c0c7667bc
Reviewed-on: https://code.wireshark.org/review/28444
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-06-26 03:24:53 +00:00
Gerald Combs 168ddd45c4 Try to fix the macOS builder.
Change-Id: I04cd70f43d86c6c8d59c7b5c843357f56490ef00
Reviewed-on: https://code.wireshark.org/review/28441
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-26 00:44:50 +00:00
Roland Knall 0c75ad97d5 Qt: Fix Filterexpression Toolbar
Fix the prepare possibility of applying a display filter button

Change-Id: I85364b40272139f0d0c69a2735a876a3a5f5db7a
Reviewed-on: https://code.wireshark.org/review/28440
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-06-26 00:02:46 +00:00
Roland Knall 3a514caaf1 Qt: Move FilterToolBar to a separate class
Remove all filter toolbar related stuff into a separate class
and away from MainWindow

Change-Id: I36d937be6c2686b16a8d494213dc740d8d28efcb
Reviewed-on: https://code.wireshark.org/review/28432
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-06-25 22:22:48 +00:00
Jiri Novak 87973bf516 RTP: Common functions for allocation/deallocation of rtpstream_info_t
Change-Id: I9a0a11d238473a7c57d85547dca0713ed421a500
Reviewed-on: https://code.wireshark.org/review/28417
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-25 14:16:26 +00:00
Jiri Novak 9f8c332c59 RTP: code cleanup 3
*rtp_stream* -> rtpstream to follow common name

Change-Id: I381bc1cdb8206c5cfe67e94dd7fb1a5cb25f9c16
Reviewed-on: https://code.wireshark.org/review/28394
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-23 10:03:54 +00:00
Guy Harris edc2bebcec Include <stdlib.h>, to declare exit().
Move the standard C includes up to the top, while we're at it.

Change-Id: I627536097955d96e7e5dcd48d9c1cc38a221fefb
Reviewed-on: https://code.wireshark.org/review/28375
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-06-22 07:14:14 +00:00
Jiri Novak db6d8ae80c tshark/RTP: GUI dependency removed from register_tap_listener_rtpstream. As consequence of it a few functions were moved from ui/rtp_stream to ui/tap-rtp-common.
Change-Id: I9dd0603a9742eb374e71e84d1380083d6c861166
Reviewed-on: https://code.wireshark.org/review/28368
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-22 05:35:43 +00:00
Gerald Combs 8a62ff570c WSUG: Update the Follow Stream documentation.
Update the Follow Stream documentation and screenshot.

Change-Id: I55e5e552d23b9676b23959ac07a480e0c7809ac4
Reviewed-on: https://code.wireshark.org/review/28366
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-21 18:38:55 +00:00
Guy Harris f61723d885 Squelch a warning from MSVC.
Cast the result of a floating-point calculation to guint32; presumably
it will have no fractional part or we're deliberately discarding the
fractional part, and will never be greater than 2^32-1, so tell the
compiler we mean to discard the fractional part and have no need to
worry about the integral part being too large.

Change-Id: I432df46b59fe3192cd0a804d3d1db1f95983abe2
Reviewed-on: https://code.wireshark.org/review/28367
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-06-21 18:20:09 +00:00
Jiri Novak d752f518cd RTP: Stats calculation unification
Changes:
    - rtpstream_info_calc_t created
    - rtpstream_info_calculate and rtpstream_info_calc_free functions created
    - RTP code updated to use such functions

Change-Id: I1053a46cbd0cdef9d70382135da46e732b5af8b8
Reviewed-on: https://code.wireshark.org/review/28361
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-21 13:34:09 +00:00
Jiri Novak c06bfeae0a RTP: Code cleanup 2
Removed unused items.

Change-Id: Ic83d7bfae12424f11e3fc2a9a678c28a0ff6b72e
Reviewed-on: https://code.wireshark.org/review/28345
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-20 13:19:46 +00:00
Jiri Novak 1b4b5e59e9 RTP: Encapsulation of comparsion of two rtpstreams
Changes:
- rtpstream_id_t is introduced and its related functions. It encapsulates comparsion of two rtpstreams.
- dest_* renamed to dst_*
- src_port and dst_port are 16bits only.
- sharkd_session.c use common id functions
- IAX2 part related to RTP updated to common *id* function

Change-Id: Id38728a4e5d80363480c7ce42ff9c6eaad069686
Reviewed-on: https://code.wireshark.org/review/28340
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-20 08:26:31 +00:00
Jiri Novak 27a1906c58 RTP: Code clean up
Changes:
- rtpstream_packet renamed to rtpstream_packet_cb to follow *_cb pattern
- variables/types used in iax2_analysis_dialog were created as copy of *rtp* ones, but names were left as *rtp* -> *iax2*
- struct _rtp_stream_info replaced with rtp_stream_info_t
- there was tap-rtp-analysis.h, but no tap-rtp-analysis.c - related content was moved from tap-rtp-common.c
- *rtp_stream* functions renamed to *rtpstream*
- renamed rtp_stream_info_t to rtpstream_info_t to follow *rtpstream* pattern.
- renamed ui/rtp_stream.c rtpstream_draw -> rtpstream_draw_cb

Change-Id: Ib11ff5367cc464ea1b0c73432bc50b0eb9cd203e
Reviewed-on: https://code.wireshark.org/review/28299
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-19 15:05:12 +00:00
Gerald Combs 23b09811b9 Remove an unused recent setting.
Change-Id: I071f47e21b8e7b18bc7411967d96cad05749c47e
Reviewed-on: https://code.wireshark.org/review/28332
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-18 22:59:41 +00:00
Joerg Mayer f1c410275f Get rid of some occurrences of Q_UNUSED
- Trivial by just doing it the C++ way
- Non-Trivial where the whole function can be put into the #ifdef instead of the variable use case

Change-Id: I034751b8a3c70211173f0c06c954def94450db46
Reviewed-on: https://code.wireshark.org/review/28311
Petri-Dish: Jörg Mayer <jmayer@loplof.de>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-06-18 16:22:43 +00:00
Gerald Combs 21a02e29de [Automatic update for 2018-06-17]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Iff1e25720254f07647efeb166178c5e6ea1c4234
Reviewed-on: https://code.wireshark.org/review/28305
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-17 08:15:03 +00:00
Joerg Mayer 866ddb1b18 Add -Wextra-semi to (clang) C and C++ flags to make sure the buildbots will find this.
Fix all warnings that come up.

Change-Id: Ib426e79f7c75152589a3c2af153de35ca5d63783
Reviewed-on: https://code.wireshark.org/review/28268
Petri-Dish: Jörg Mayer <jmayer@loplof.de>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-06-15 11:17:37 +00:00
Erika Szelleova 555067724a VoIP: fix in prepare filter for VOIP calls
Make sure that the filter for VoIP calls includes RTP streams when calling
Prepare filter.

Bug: 13440
Change-Id: Ia55073151817b88b3fa6a3fd30f98fdf683621a4
Reviewed-on: https://code.wireshark.org/review/27955
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>
2018-06-14 10:28:06 +00:00
Gerald Combs 53a1840626 Windows: HiDPI-ify our native print dialogs.
Call set_thread_per_monitor_v2_awareness and
revert_thread_per_monitor_v2_awareness when showing native print
dialogs.

Change-Id: I295540953e50547ee0bb0b162c805f2d568d88ba
Reviewed-on: https://code.wireshark.org/review/28208
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-11 19:36:37 +00:00
Gerald Combs e0b8837d9a [Automatic update for 2018-06-10]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I11da626692a0aedff9e58256e0e326fd1cb33123
Reviewed-on: https://code.wireshark.org/review/28190
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-10 08:16:13 +00:00
Guy Harris 3c9c2c6534 If device->active_dlt = -1, show "Unknown" rather than "DLT -1".
It means we don't know the active link-layer header type - probably
because the device can't be opened, so we can't get the default linktype
or the list of available linktypes - so show it as "Unknown".

Bug: 14847
Change-Id: I5a1ad360d2ae461e8db57e387679700a566b0949
Reviewed-on: https://code.wireshark.org/review/28185
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-06-10 02:43:15 +00:00
ruengeler e7c6576b51 SCTP: Add a checkbox to show relative TSNs
Change-Id: I296cc5801e8a5184aea6bdc7fb841cce0c4f7b1d
Reviewed-on: https://code.wireshark.org/review/28056
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>
2018-06-08 10:23:34 +00:00
Gerald Combs f8092f96b3 Qt: Move wireshark-qt.cpp back to ui/qt/main.cpp.
The Qt UI's main module started out as ui/qt/main.cpp but was moved to
the top-level directory in order to appease Autotools. We don't need to
do that any more, so move it back.

Change-Id: Ic5bc0ed5b754e36cc2b9e682f2ca097781233dfd
Reviewed-on: https://code.wireshark.org/review/28090
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-08 03:50:22 +00:00
Jaap Keuter 8f664a746c Preincrement iterators for better performance
Change-Id: I26853080bd0294a9058db99a30d1c06d6aac8e16
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/28083
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-07 18:18:04 +00:00
Gerald Combs 0882e94cff Qt: Set the ByteViewText field and protocol foreground.
Set a foreground color when we add a field and protocol format range. On
some systems the highlight background is darker or lighter than the
normal background, and we need to adjust the foreground to match.

Add a note about correctly handling our hover rect color.

Change-Id: Ib6b50403dec889280eb3d27f3deb10150d22a599
Reviewed-on: https://code.wireshark.org/review/28076
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-07 15:38:53 +00:00
ruengeler 1f6eb7d7a8 SCTP: Adjust minTSN
Change-Id: If2ccbd983a2a31441d1e882da65971860f5bec94
Reviewed-on: https://code.wireshark.org/review/28013
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
2018-06-04 20:49:36 +00:00
Gerald Combs f5faa1e12d [Automatic update for 2018-06-03]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Ie1c560eb53d3791443f1798b32ba819816896523
Reviewed-on: https://code.wireshark.org/review/27977
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-03 08:16:40 +00:00
Roland Knall f4e3d8cbf3 Qt: Rename MainWelcome
Currently exist two main pages within Wireshark. The first being
the main welcome page and the second the packet capture page. The
first is called "main_welcome.?" and the second is actually the
master_split_ object defined in main_window.h. The first being a
QFrame, the second not.

In preparation for future developments (dockable windows, multiple capture
files), this is being corrected, with the main welcome being renamed
as welcome_page as a first step

Change-Id: I40703e6ed15ff6f6b62b2a3cf31f5636ac6da9ec
Reviewed-on: https://code.wireshark.org/review/27949
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-06-01 22:01:20 +00:00
Roland Knall a1a56bd97d Qt: Move Layout and clear master_split use
master_split_ must be moved to a more prominent widget, as it is in actuality
the main widget of the application.

Change-Id: Id45b60f5f57c982c1890318eec9fa87ab61a9e19
Reviewed-on: https://code.wireshark.org/review/27942
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-06-01 17:01:34 +00:00
Jakub Zawadzki de447c1544 sharkd: add support for io graph.
Change-Id: I8d23a2b55024e2ef8c644dcef9176c7e3050a703
Reviewed-on: https://code.wireshark.org/review/27376
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-31 18:43:50 +00:00
João Valverde 64a2b4101a Move make-taps and make-dissectors to tools/
make-taps and make dissectors are build tools so that is the natural
location for them.

See also 99ec2b58eb68ab8530245dd13485612695ba064a and bug 14622.

Change-Id: I754848ea1c614bfa7121c44d89136ac3cba8a734
Reviewed-on: https://code.wireshark.org/review/27928
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-05-31 13:35:27 +00:00
Roland Knall 9e4f7dc50d Qt:Fix ProtoTree Copy
There was an issue, where siblings where not copied correctly.

Bug:14355
Change-Id: I31611a6731f3f4de6b204c7ee708e42f0b7b170c
Reviewed-on: https://code.wireshark.org/review/27802
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Kenneth Soerensen <knnthsrnsn@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-05-30 12:35:30 +00:00
Dario Lombardo 30ebff35e3 Qt: use data() instead of constData() in pcap_compile().
In different versions of libpcap, pcap_compile() has a 3rd parameter
with or without const. Using a non-const variable, allow the auto
promotion to const possible, but not the vice-versa.

Fixes compilation on OpenBSD.

Change-Id: I72162a4ea419668b6222e84bf5525a6c48fddd52
Reviewed-on: https://code.wireshark.org/review/27896
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-30 08:42:14 +00:00
Peter Wu 8da4777440 Qt: fix memleaks on opening a context menu
FrameInformation was never deallocated, leaking the whole pinfo scope.
Fix a dealloc-alloc-mismatch (packet_data_ was g_memdup'd). Attach the
DataPrinter menu actions to the action group instead of the singleton
DataPrinter instance, this enables freeing the actions when the submenu
is gone rather than clearing this at program exit.

Reported by ASAN.

Change-Id: If13af94a60b07b0e52973ccc5c437ef987bfb394
Fixes: v2.5.0rc0-1627-g8a6ea0e454 ("Qt: Further cleanup ByteView")
Reviewed-on: https://code.wireshark.org/review/27844
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-30 08:20:42 +00:00
Peter Wu 349c3aa3d5 Qt: fix memleaks in protocol preferences menu
Reported by ASAN.

Change-Id: I0e7578d6583dc11312d95108331b6a743d7d5514
Reviewed-on: https://code.wireshark.org/review/27832
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-30 08:19:15 +00:00
Peter Wu 7a59406e78 Qt: fix memleak in PacketList::contextMenuEvent
Change-Id: I925d2e1529a70aaf403896a4d7df3f491265916d
Fixes: v1.99.7rc0-225-g26dacfc8c3 ("Qt: Add protocol preferences menus.")
Reviewed-on: https://code.wireshark.org/review/27831
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-30 08:19:06 +00:00
Peter Wu ac041b9d0b Qt: fix memleak from cf_get_display_name
Free the memory as documented.

Change-Id: I8a8842160be676bb08f5b93e795b9ed8edef2ede
Reviewed-on: https://code.wireshark.org/review/27829
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-30 08:18:47 +00:00
Anders 07454464a4 sctp-analysis: Use g_list_free_full() in a couple of places.
Change-Id: Ifd9517c562660ddee59feac1a7c234b9cdbbdf98
Reviewed-on: https://code.wireshark.org/review/27867
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-28 11:57:14 +00:00
Peter Wu ea763a9638 Qt: select a better default Decode As table
USB has three possible tables, usb.device, usb.product and usb.protocol
(shown in that order in the Decode As dialog). For single packets with
no prior device descriptors, the last two tables have no valid selector
(integer zero). In such cases it seems more reasonable to use tables for
which a valid selector exists (for example, "usb.device").

Bug: 14717
Change-Id: I2319817fa11318a97519d8cfc912343b16224c12
Reviewed-on: https://code.wireshark.org/review/27820
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-28 08:19:43 +00:00
Peter Wu 2ef7e8cf42 SCTPAllAssocsDialog: fix memleak of "sctp_assocs"
"fillTable()" overwrites "sctp_assocs" with an external address.

Change-Id: I415d424f16a2306b1b79fde7b5f836458da14b16
Reviewed-on: https://code.wireshark.org/review/27833
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-28 08:19:02 +00:00
Gerald Combs af24816568 [Automatic update for 2018-05-27]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I6603cc4dd62ff1db23efa4374437ce9ebf7a81c8
Reviewed-on: https://code.wireshark.org/review/27840
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-27 08:16:34 +00:00
Pascal Quantin e299b4098b SCTP: plug the remaining memleaks in the tap
Change-Id: I50da5f8c54c7be49ad8339d22639605daf2c5616
Reviewed-on: https://code.wireshark.org/review/27821
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-26 14:20:49 +00:00
Pascal Quantin 06879e89c0 SCTP: fix crash when filtering an association
Do not free a tsn_t element if it has already been inserted in a GList.
The code structure is complex enough to add an explicit check before
calling g_free().
Fixes a regression introduced in gb19ca06fcc.

While we are at it, let's call the correct free function and plug some
memory leaks.

Bug: 14733
Change-Id: I071da96982da569083fd98b790e0d37ac0826ff1
Reviewed-on: https://code.wireshark.org/review/27808
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-26 11:23:51 +00:00
Peter Wu b078310bd0 Qt: fix use-after-free on error while saving exported packets
When an error occurs while saving packets using the Export Specified
Packets dialog (e.g. try to overwrite the opened capture file), the
dialog is displayed again. As PacketRangeGroupBox freed the packet
selection range, a crash (use-after-free) occurs.

Removes some unnecessary code in MainWindow::exportDissections as well.

Change-Id: I63898427eff7e71799d89c8a22246db8f93a9ff6
Fixes: v2.5.0rc0-968-g38b40acb2d ("Qt: fix a memory leak when exporting packets")
Reviewed-on: https://code.wireshark.org/review/27695
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-25 12:49:50 +00:00
Paul Zander 53dfec9b99 Qt: Configure the selection color via the preferences
The active selection color and inactive selection color can be configured via Edit / Preferences / Font and Colors
There are 3 styles that can be used for the selection color:
Default: legacy behavior
Flat: Use background and foreground color with no gradient.
Gradient: Use background and foreground color with a gradient.

Bug: 14714
Change-Id: Ieca293bb9830d2c5702949d0459d1d6f679e41e4
Reviewed-on: https://code.wireshark.org/review/27701
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-05-25 11:07:01 +00:00
Stig Bjørlykke 1b6c702226 Qt: Support search without a selected packet
Support doing Find Packet, search for next/previous marked packet and
search for next/previous time reference without having a packet selected
in the packet list.

Change-Id: I648b26365385d98155e905cda270e9e785b9f1da
Reviewed-on: https://code.wireshark.org/review/27752
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-24 04:10:14 +00:00
Stig Bjørlykke 603fe4c7ad Qt: Update menus when mark/ignore/timeref packet
Update menus when changing mark, ignore or time reference on a packet
to enable/disable entries accordingly.

Change-Id: Icb95b3371fe8183cdeea1b6b2c71d1d33f998dc0
Reviewed-on: https://code.wireshark.org/review/27737
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-23 13:23:12 +00:00
Stig Bjørlykke eadfd6d3c3 Qt: Default no selection in UAT dialog
Do not start editing the first column for the first item in a UAT dialog.
This is the same behaviour as in UAT frame.

Change-Id: If8dd90c90301b4af9108cc5286d99f83f613a19e
Reviewed-on: https://code.wireshark.org/review/27708
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-05-23 06:35:57 +00:00
Gerald Combs e4bca0316b Fix a typo.
Change-Id: Ia4c267bf6e0971511417e25f6fbf8fa9abdc1034
Reviewed-on: https://code.wireshark.org/review/27712
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-22 15:48:22 +00:00
Gerald Combs 50197b3023 Qt: Set a minimum width for the main window.
Set a minimum width for the main window so that we override the minimum
size set by the display filter combo.

Add a couple of comments and fixup a cast while we're here.

Bug: 13516
Change-Id: I6e994a7d06f5a966bb9bf8d3f4c4fc343cd466c8
Reviewed-on: https://code.wireshark.org/review/27697
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-22 07:34:41 +00:00
Gerald Combs 0afa145a4b [Automatic update for 2018-05-20]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Ied42aaad58b11ec1796d6c14c4981b8d54258769
Reviewed-on: https://code.wireshark.org/review/27665
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-20 08:17:39 +00:00
Peter Wu 71a240d611 cmake: remove dependency of i18n.qrc on .qm files
The i18n.qrc file is generated at cmake time while the .qm files are
also built as dependency of the AUTORCC process. The extraneous .qm
dependency of i18n.qrc possibly causes duplicate wireshark_zh_CN.qm
builds (see v2.9.0rc0-605-g644939ed9e), so remove it.

Change-Id: I629e7b809486a65b27158f66a7e62cfcf61657d3
Reviewed-on: https://code.wireshark.org/review/27633
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-18 13:25:50 +00:00
Peter Wu a52aacd716 CMake: cleanup ui/qt/CMakeLists.txt
Remove some unused variables, favor list(APPEND X Y) over set(X ${X} Y),
use consistent capitalization and whitespace.

Change-Id: I2a90b55d29899393019a1aee3394b87ab12dda5b
Reviewed-on: https://code.wireshark.org/review/27625
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-18 04:19:58 +00:00
Gerald Combs 699485fbab Qt: Make sure we destroy the Capture Information dialog.
Change-Id: Id45da4247aa3214227a96b77cb70b06f2edf38bf
Reviewed-on: https://code.wireshark.org/review/27623
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-18 04:16:43 +00:00
Gerald Combs a0b46a06f3 Win32: Add a missing check.
...otherwise we'll crash on older versions of Windows.

Change-Id: If9c1b653496930fbfad4e9e663a8340990f3f295
Reviewed-on: https://code.wireshark.org/review/27626
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-17 22:21:04 +00:00
Peter Wu 644939ed9e CMake: try to fix duplicate qm builds on Windows
The Windows buildbot showed that .qm files are generated twice. This
resulted in rebuilding i18n.cpp, which resulted in rebuilding qtui,
which finally resulted in Wireshark.exe being built twice for no reason.

Assuming it is the same issue as commit v2.3.0rc0-3078-gaa9a0b3bf8,
avoid having multiple targets depend on the same output (.qm files).
This patch requires CMake 3.1 or newer.

Change-Id: Iffd8946701553b89c09504278afa4b16d2a0b5b4
Fixes: v2.5.0rc0-1366-gdfa893b1cf ("cmake: set CMAKE_AUTOUIC and CMAKE_AUTORCC to avoid CMP0071 warning")
Reviewed-on: https://code.wireshark.org/review/27620
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-17 19:44:04 +00:00
Alexis La Goutte b5cba9ea11 qt_ui_utils: fix issue found by PVS Studio (V519)
The 'val_qstr' variable is assigned values twice successively

Change-Id: I5cc80a3e68c08330ac3bbb7c8c45db105d7fb865
Reviewed-on: https://code.wireshark.org/review/27599
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-17 04:25:42 +00:00
Alexis La Goutte 2fd5f93188 Qt: fix issue found by PVS Studio (V519)
The 'dp_ratio' variable is assigned values twice successively

Change-Id: Iac3bcefe61c3fe2f628f046ee6f77377fe7dd775
Reviewed-on: https://code.wireshark.org/review/27598
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-17 04:24:28 +00:00
Guy Harris d08d0a87c5 Eliminate some unneeded header checks.
sys/stat.h and sys/types.h date back to V7 UNIX, so they should be
present on all UN*Xes, and we're assuming they're available on Windows,
so, unless and until we ever support platforms that are neither UN*Xes
nor Windows, we don't need to check for them.

Remove the CMake checks for them, remove the HAVE_ values from
cmakeconfig.h.in, and remove all tests for the HAVE_ values.

Change-Id: I90bb2aab37958553673b03b52f4931d3b304b9d0
Reviewed-on: https://code.wireshark.org/review/27603
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-16 22:03:09 +00:00
Gerald Combs 054a7e4606 Qt: Fix a memory leak.
Make sure the Capture Information dialog deletes its UI data.

Change-Id: I2613cfb6ca4b1a72e9fcfaad5a7792d95ab4764c
Reviewed-on: https://code.wireshark.org/review/27588
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-16 20:34:15 +00:00
Gerald Combs 4edfcaa102 Qt: Save the Capture Information dialog geometry.
Change-Id: I0acaa54ebbe0e16a9ea486fcdf74329b6cc1aea7
Reviewed-on: https://code.wireshark.org/review/27579
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-16 18:44:59 +00:00
Guy Harris 37e4cf69f1 Not GTK+-only any more.
Change-Id: Ic4290fbaca37dd1353d44d9ab1ce29750aa4f747
Reviewed-on: https://code.wireshark.org/review/27574
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-16 08:23:40 +00:00
Gerald Combs 9ec5b2b0fe Qt: Implement the capture info dialog.
Add back the capture info dialog. Draw sparklines for each protocol.
Update the User's Guide.

Bug: 12004
Change-Id: I45be8a0df4752255831a8b139ee84bb34d675ba9
Reviewed-on: https://code.wireshark.org/review/27565
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-16 04:26:36 +00:00
Gerald Combs 62999cc677 Windows: Make sure more native dialogs handle HiDPI.
Add a WiresharkFileDialog class, which is a thin wrapper around a few
QFileDialog functions that sets per-monitor v2 DPI awareness before
showing native dialogs and resets the awareness context afterward.
Use it where we call QFileDialog::getXXX.

Change-Id: Ib711a70aa94b693a2515804a729f666ea7fbd673
Reviewed-on: https://code.wireshark.org/review/27568
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-16 04:22:20 +00:00
Peter Wu 4c1690ac47 CMake: require at least CMake 3.5
CMake 3.11 with the Ninja generator started complaining about CMP0058
related to ui/qt/CMakeFiles/qtui_autogen.dir/RCCstock_iconsInfo.cmake
amd other files (AUTORCC). While the policy could be set explicitly,
let's try to modernize the CMake configuration:

- Drop CMP0042, if this gives issues with macOS, then it must be solved
  in a different way using non-deprecated methods.
- Drop CMP0054 and ensure that all if("${foo}") and if(${foo}) are
  converted to if(foo).
- Remove string comparison against "-NOTFOUND", it already evaluates to
  false in an if condition.
- Use CXX_STANDARD/CXX_STANDARD_REQUIRED for Qt 5.7 and newer.
- Assume that copy_if_different can accept multiple sources (CMake 3.5).
- Consistency: Out of the 60 CMake 3.11 FindXxx.cmake files that use
  find_library, 34 contain "XXX_LIBRAR" while 16 contain "Xxx_LIBRAR".
  Let's assume uppercase variables (now custom MaxMindDB include dirs
  are correctly used).

CMake 3.5 was chosen as the next version because of its wide support.
Ubuntu 14.04 ships with cmake3 3.5.1, Debian jessie-backports has 3.6.2,
EPEL for CentOS/RHEL6 includes cmake3 3.6.1 and SLES12 SP2 has 3.5.

Change-Id: I2fa7b94bf8cc78411f414987d17bab3a33dfb360
Reviewed-on: https://code.wireshark.org/review/27444
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-15 10:28:09 +00:00
Gerald Combs f4724d0b37 Qt: MainWindow::dropEvent fixes.
Limit our dropped file count to 100. Make sure we always accept our
proposed action and either accept or ignore the event. Blind attempt at
fixing bug 14609.

Change-Id: Id08b179b6eb63529aa15bce7284460fbd19f7fec
Ping-Bug: 14609
Reviewed-on: https://code.wireshark.org/review/27462
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-14 15:43:32 +00:00
Peter Wu bb81e1807b Free g_ptr_array_free-related memory leaks
g_ptr_array_free(a, FALSE) returns "a->pdata". Callers that do not
handle this will leak memory (e.g. "tshark -G plugins"). Convert other
users to use the return value instead of direct access to "a->pdata".

Change-Id: I29835477d587f5f54bf0d94cdae9f375e3da3ce3
Reviewed-on: https://code.wireshark.org/review/27437
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-14 13:42:10 +00:00
Guy Harris 503dc214ad Remove a question from a comment.
Given that we're not using GTK+, the answer to the question is "no".

Change-Id: Ib0e512909993830b1462d1fe3eada9265d9b1cdf
Reviewed-on: https://code.wireshark.org/review/27515
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-13 20:24:59 +00:00
Guy Harris afad14dcfe Get rid of some GTK+-only stuff.
Change-Id: I85806476246a567f747e3911e3d15716e9cfe06b
Reviewed-on: https://code.wireshark.org/review/27514
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-13 20:21:14 +00:00
Guy Harris 4a3813984b Fix indentation.
Change-Id: I15ddf53938ea23fce655b8ec558855a5e2bedf0c
Reviewed-on: https://code.wireshark.org/review/27513
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-13 19:58:48 +00:00
Guy Harris 3a0dd69d04 Get rid of some GTK+-only stuff.
Change-Id: I841a1cdb637f37673466e4d065474c0f7e2dfc56
Reviewed-on: https://code.wireshark.org/review/27512
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-13 19:46:45 +00:00
Gerald Combs 5b385f3a4d [Automatic update for 2018-05-13]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Icf753ad9d075f2dd0688f0f58ce73d5e283dc10c
Reviewed-on: https://code.wireshark.org/review/27486
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-13 08:16:30 +00:00
Guy Harris fb877ef5da Get rid of some GTK+-only stuff.
Change-Id: I6c14429d4d473464ad7bea18dee07c3adf34664d
Reviewed-on: https://code.wireshark.org/review/27479
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-12 23:01:14 +00:00
Peter Wu b217c8fea1 cli: make "-z host,ipv4" filter actually work
Respect the "ipv4" and "ipv6" filters and actually restrict the output.

Change-Id: I06ee62ee2c85cb45fb33a52e86ce3698452d175f
Fixes: v1.11.0-rc1-2592-ge3cccd17f4 ("Get rid of some users the addrinfo_list.")
Reviewed-on: https://code.wireshark.org/review/27452
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-12 06:29:01 +00:00
Gerald Combs 23e1cde5e7 Windows: Make sure native dialogs handle HiDPI.
Enable per-monitor v2 DPI awareness before displaying native file
dialogs so that they will render correctly on HiDPI displays.
Add some notes about DPI awareness in our manifest and in
wireshark-qt.cpp.

Remove win32_get_ofnsize while we're here.

Change-Id: Ic553fdeea0c05020c3a7ff06f648692cb814b3eb
Reviewed-on: https://code.wireshark.org/review/27435
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-09 20:02:34 +00:00
Peter Wu e76ca2d3cb ui/tap-rtp-common: fix some memleaks
If a stream with the given parameters was already known, the addresses
and payload_type_name would be leaked. There are potential other leaks
for rtp_stream_info_t (also in Qt RtpAnalysisDialog::showPlayer), but
that requires a more careful analysis. Found by Clang Static Analyzer.

Change-Id: I2fb19464b4c0f89d597a7e6117d219111922b4f2
Reviewed-on: https://code.wireshark.org/review/27346
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-09 18:42:27 +00:00
Peter Wu 67ea8cb25f ui/voip_calls: fix memleak in is_mgcp_signal
Change-Id: I91226fc88f6e200c0c45ff74cc4232521e602fd3
Reviewed-on: https://code.wireshark.org/review/27345
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-09 18:41:46 +00:00
Peter Wu 5507a34d1f Qt: fix memleaks in CompiledFilterOutput
QString already copies the memory, no need to strdup it. Simplify use of
GString as well (str is NUL terminated). Found by Clang Static Analyzer.

Change-Id: Ic3ba3daa9121736529e0bee2d41adc95a55a3feb
Fixes: v1.99.0-rc1-253-gdf8c4bf264 ("Capture Interfaces Dialog:")
Reviewed-on: https://code.wireshark.org/review/27344
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-09 18:41:37 +00:00
Peter Wu 064c09a293 Qt: fix memleak of profile name on copying a profile
add_to_profile_list (via add_profile_entry) clones the name and does not
own it, so free it afterwards. Found by Clang Static Analyzer.

Change-Id: I340c91b65d97b24a52812fd6f4b85933cfb15f89
Reviewed-on: https://code.wireshark.org/review/27343
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-09 18:41:28 +00:00
Guy Harris e7d24c606c Always explicitly set tm_isdst before calling mktime().
Except in rare cases, we want to set it to -1 so that we let mktime()
determine whether DST/Summer Time was in effect at the given date and
time rather than pretending that we know whether it's in effect or not.

Change-Id: I0ea75317dd308a515cedf4d1260b583e1592cc9b
Reviewed-on: https://code.wireshark.org/review/27431
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-09 16:33:21 +00:00
Dario Lombardo 517e353e7f Qt: remove unused vars in main_window_preferences_frame (CID 1435498).
Change-Id: Ibd20bdb3f88b3800d2bfa93e32d41c4827e24dcb
Reviewed-on: https://code.wireshark.org/review/27421
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-09 13:58:58 +00:00
Roland Knall a5e3414fc6 extcap: Fix required indicator
Fix required indicator on reset and change an assert to a simple
drop-out

Change-Id: I355980223f213fef8ee4c6ac7d6bcb0fce1a7913
Reviewed-on: https://code.wireshark.org/review/27416
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-05-09 10:01:57 +00:00
Stig Bjørlykke bba0041bfd Qt: Add Show as UTF-16 in Show Packet Bytes
Change-Id: Ia7c7af162ac0010e2a5b83caf1ac467012432567
Reviewed-on: https://code.wireshark.org/review/27420
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-05-09 09:33:24 +00:00
Stig Bjørlykke a1f95b6458 Qt: Add plural translations
Add plural translations in capture file dialog preview.
Reworded text for "error after X records(s)" to use same format
as similar messages.

Change-Id: I7b2c8811a9c0c0f76587c5aad1a648a1b969f37a
Reviewed-on: https://code.wireshark.org/review/27412
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-05-09 07:40:19 +00:00
Stig Bjørlykke 612fb778f5 Qt: Update frame selected in several cases
Ensure that frameSelected(0) is emitted when not having a proto tree
field selected because of:

 1. No match when trying to restore selected field
 2. Search selects a packet with no field to select
 3. Current packet is deselected

This will disable functionality which requires a selected field
and updates the status bar according to selected field.

Bug: 14658
Change-Id: I158fae4f26c02f718cee0030ef9e38b597876381
Reviewed-on: https://code.wireshark.org/review/27395
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-05-09 06:20:58 +00:00
Pascal Quantin c2eb71c25c Qt: fix IPv4 GeoIP lookup in endpoints dialog
maxmind_db_lookup_ipv4() expects an address in network byte order

Bug: 14656
Change-Id: Ie47e3ae44d305d040e409d42f4398f55ae8c2395
Reviewed-on: https://code.wireshark.org/review/27391
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Christopher Maynard
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-05-08 13:29:40 +00:00
Roland Knall 0af6ba1a53 extcap: Group arguments
Group arguments together to better present them, as well as to
have the possibility to better facilitate settings categories.

The order of tabs is defined by the numbering of arguments and
their appearance. If no tab can be found or no group has been
defined for the argument, a default tab will be added.

Change-Id: I032881193e09d4ad5d65c9f73fede87695acdace
Reviewed-on: https://code.wireshark.org/review/27054
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-05-08 10:31:38 +00:00
Guy Harris 15cfc41e94 Don't use dladdr() to get a pathname for the current executable().
Change-Id: I24ad11a659c2cb936f873339dc2b36ac9944280a
Reviewed-on: https://code.wireshark.org/review/27359
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-05 08:06:35 +00:00
Peter Wu 8815ac76db CMake: fix build by not unnecessarily linking with wsutil
When built with -DCMAKE_BUILD_WITH_INSTALL_RPATH=1, make-taps and
make-dissectors fail to run because they cannot locate libwsutil.so.0.
Since v2.9.0rc0-178-gbb81bef535 ("glib: Get rid of GLIB_CHECK_VERSION as
we now require 2.32.0") wsutil is definitely no longer needed.

Change-Id: Ida269fdb5f2cba979e3776f57c1a6bf3d546fe5d
Reviewed-on: https://code.wireshark.org/review/27329
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-04 10:16:39 +00:00
Stig Bjørlykke 895cfbfd01 Qt: Add check for running toolbar reader thread
Check if the reader thread is running before calling requestInterruption()
in an attempt to avoid a crash when stop capture.

Change-Id: I07cdc19eb42413ce421f05186314fc34c33041e6
Ping-Bug: 14631
Reviewed-on: https://code.wireshark.org/review/27316
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-05-03 19:45:40 +00:00
Stig Bjørlykke 83b8c9c988 Qt: Fix toolbar signal on start capture
Always call toolbar->startCapture() when starting a capture even if
not having a list of interfaces. startCapture() will check for this.

Change-Id: Ifb654f403c72e1d687ae1f6471fc955aa4f6f23c
Ping-Bug: 14631
Reviewed-on: https://code.wireshark.org/review/27306
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-05-03 17:29:09 +00:00
Stig Bjørlykke c4ffae6aad Qt: Set margins in createEditor layout
Try to align the QComboBox with the other elements.

Change-Id: I63acdc2eb463e8806edffe27d67423dc37d161e5
Reviewed-on: https://code.wireshark.org/review/27305
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-03 13:40:12 +00:00
Gerald Combs d1a2b6973f Editorconfig: Add a filename match for Makefiles.
The "Autotools, Make" section in .editorconfig didn't have an associated
filepath glob pattern, which meant that it matched the preceding
pattern, which was "*". This would appear to explain why VS Code
mysteriously forced 8-character tabs for some files.

Remove ui/qt/Makefile_custom.common while we're here.

Change-Id: I5a84cc53c992bb2a95036cb98dc97cc7eb6b1299
Reviewed-on: https://code.wireshark.org/review/27281
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-03 04:07:25 +00:00
Pascal Quantin c514ad11d6 Qt: fix compilation with gcc 8
conversation_hash_tables_dialog.cpp:52:67: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers]

Change-Id: I07c815a7233af41c840087a35eaf9172c06161f3
Reviewed-on: https://code.wireshark.org/review/27268
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-02 20:55:41 +00:00
Peter Wu 4d2844ccec Qt: do not further modify filename from Save dialog
Let the Save dialog fixup the extension on accepting the dialog.
Otherwise it is possible that files are silently overwritten without
prompting. Additionally, if a user decides to save a pcapng file as
"foo.pcap", do not try to rename it to "foo.pcap.pcapng".

This change is limited to macOS and Linux because Windows uses a
different file dialog. Tested with both macOS and Linux.

Bug: 14600
Change-Id: Ie0bc1f579766a04f0aad96dcd5daba3fffef9764
Reviewed-on: https://code.wireshark.org/review/27188
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-01 10:24:47 +00:00
Peter Wu 552ef8b1f4 Qt: improve extension selection in Save As dialog
The default Qt behavior for extension adjustment is quite bad. When the
file type filter is changed, the extension always becomes "gz" because
"pcap.gz" happens to be the first extension in the list. It also did not
check that the last suffix is actually a valid extension (e.g.
"capture.2018.01" became "capture.2018.gz").

Improvements:
- Respect the "compression" checkbox when adjusting the filename.
- Replace the extension only if it is a known one, append otherwise.
- Use a better default extension (from "wtap_default_file_extension").

Affects only macOS and Linux since Windows has its own native dialog.
See also https://bugreports.qt.io/browse/QTBUG-67993

Bug: 14600
Change-Id: I8cd0788f2abac0c6d7e29490b1ebb381f5a926d0
Reviewed-on: https://code.wireshark.org/review/27186
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>
2018-05-01 10:24:07 +00:00
Stig Bjørlykke 14720ace06 Fix comment end after SPDX identifier
Move */ to a separate line below the SPDX identifier.

Change-Id: Id1032215449cfccae0933147b45e04b65e0b727f
Reviewed-on: https://code.wireshark.org/review/27211
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-01 06:56:37 +00:00
Paul Zander 00776f832a Qt: Make the selected packet in the packet list more clear.
When using coloring rules the selected packet is sometime hard to recognize. The stylesheet of the packet list is extended for this.

Bug: 14621
Change-Id: Ied465e0e211b3c11e69cb71f89988eb45622dd72
Reviewed-on: https://code.wireshark.org/review/27141
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-30 11:14:44 +00:00
Peter Wu f9522d8a23 Qt: fix crash on dragging in packet dialog
"packet_dialog.cpp" does not use setCaptureFile, resulting in a NULL
dereference while trying to obtain the dissection context. Apply a fix
similar to v2.5.1rc0-121-g9198448f9d (pass a fixed dissection context to
ProtoTree). Additionally, fix a memleak and correct documentation.

Why not add "proto_tree_->setCaptureFile(cap_file_.capFile())" in
PacketDialog? Well, it also uses "proto_tree_->setRootNode(edt_.tree)"
which means that "cf_->edt" would be different from "edt_". If that is
the case, then "proto_construct_match_selected_string" will not return a
filter for FT_NONE fields (see the call chain in proto.c).

Bug: 14620
Change-Id: I6eeaf32b650a2095e15f64bbe64b54cdd545c7a9
Fixes: v2.5.0rc0-1608-g4d6454e180 ("Qt: Drag n Drop Filter expression from Packet Tree")
Reviewed-on: https://code.wireshark.org/review/27160
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-04-26 16:41:34 +00:00
Roland Knall b8e8aa87f4 Qt: Fix various missing header includes
Qt 5.11 seems to have changed the include dependencies, so adding those, that are missing

Change-Id: I2b0482f7554467d6981be65bfd3fea1a3e118976
Reviewed-on: https://code.wireshark.org/review/27145
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-25 09:05:49 +00:00
chinarulezzz 993b47eb40 remove redundant break statement
Change-Id: Ib6d4bbb1662d921fc4b5920b50e47d2b30ebb95c
Reviewed-on: https://code.wireshark.org/review/27103
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-24 04:33:12 +00:00
Gerald Combs 194fcdcd80 [Automatic update for 2018-04-22]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I0769900c468b88eb19304e697d2faecddaeb4b11
Reviewed-on: https://code.wireshark.org/review/27072
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-04-22 08:20:41 +00:00
ruengeler ac7e609b9f SCTP: INIT collision
Change-Id: I283ce92048af39ff4cf54e5e401e714bf6ec308b
Reviewed-on: https://code.wireshark.org/review/27023
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-04-20 08:23:05 +00:00
Peter Wu 01a32a54a0 Qt: fix invalid member access within expert info dialog
Opening a context menu in the expert dialog resulted in an UBSAN warning
because ExpertInfoModel::data is invoked with a proxy model index. Rely
on the proxy to perform this mapping (change filterActionTriggered to
avoid direct model access while at it).

Change-Id: Id399f44b954b87d7d4dd0341fbedb391ab1b13da
Fixes: v2.5.0rc0-1966-gb0112e60ad ("Add a model to use for Expert Info dialog.")
Reviewed-on: https://code.wireshark.org/review/27025
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-20 07:46:00 +00:00
Peter Wu ad71a91540 Qt: expose CaptureEvent definition for MOC
All WiresharkDialog instances have a "captureEvent(CaptureEvent)" method
that requires the definition of "CaptureEvent" from capture_file.h.
By luck, this definition is available for CMake builds due to the
generated MOC headers being included in the right order, but this cannot
be relied on. On an autotools build with less luck:

    main_status_bar.moc.cpp: In static member function ‘static void MainStatusBar::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)’:
    main_status_bar.moc.cpp:241:86: error: invalid use of incomplete type ‘class CaptureEvent’
             case 28: _t->captureEventHandler((*reinterpret_cast< CaptureEvent(*)>(_a[1]))); break;

Create a new header file to limit exposure of the CaptureFile class.

Change-Id: I4ab609f13b9438797e39e7b98f367da35536979b
Fixes: v2.9.0rc0-186-g57bf7e4347 ("Qt: Fix memory leak for CaptureEvent")
Reviewed-on: https://code.wireshark.org/review/27003
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-18 12:06:21 +00:00
Dario Lombardo 4a156da068 Remove autotools build system.
It has been replaced by cmake.

Change-Id: I83a5eddb8645dbbf6bca9f026066d2e995d8e87a
Reviewed-on: https://code.wireshark.org/review/26969
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-18 03:46:17 +00:00
Peter Wu f2aa1cbdec Qt: fix remaining CaptureEvent signal connections
Converted all remaining "CaptureEvent *" to "CaptureEvent" using:

    sed -e 's/CaptureEvent *\*/CaptureEvent/g' $(git grep -le 'CaptureEvent *\*') -i

Change-Id: I328d2890ec3b5e6672fa3fab22e85063e8309574
Fixes: v2.9.0rc0-186-g57bf7e4347 ("Qt: Fix memory leak for CaptureEvent")
Reviewed-on: https://code.wireshark.org/review/26985
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-04-17 16:40:13 +00:00
Roland Knall 57bf7e4347 Qt: Fix memory leak for CaptureEvent
Make the argument to the events a non-memory object

Change-Id: I46d8c24415aa2bc48b2a2d3b1fccffa6956d08b5
Reviewed-on: https://code.wireshark.org/review/26671
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-17 13:16:46 +00:00
ruengeler febaa4f119 Qt: Fix segfault bug when analysing SCTP packets
Change-Id: Id444318621ffa61ee5edb84d40de372e8b7f60ef
Fixes: v2.5.2rc0-26-gecda3d0901 ("tap-sctp: remove guint32 unneeded allocations.")
Reviewed-on: https://code.wireshark.org/review/26977
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-04-17 12:50:42 +00:00
Gerald Combs ad84eec866 Switch the Doxygen API reference build to CMake.
Switch to a single Doyxgen configuration which was generated using a
recent version of Doxygen and customized to suit our needs. Add
wsar_html and wsar_html_zip targets to CMake. Update some Doxygen markup
and documentation as needed.

Change-Id: Ic8a424b292c35a26f74ae0b53322265683e56e69
Reviewed-on: https://code.wireshark.org/review/26976
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-17 03:46:05 +00:00
Gerald Combs 1d030928ef Remove some GTK+-only code.
Change-Id: Ic2498c7acd6a1a522be45094148402ee34a6b4d1
Reviewed-on: https://code.wireshark.org/review/26958
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-17 03:44:47 +00:00
Stig Bjørlykke 5e7cd2dfc6 Qt: Rename packet_list_enable_color
Rename packet_list_enable_color() to packet_list_recolor_packets()
to reflect what it does.

Remove the call from where it's not needed.

Change-Id: I55dd1a9af8f5b1dbd83b06136a5bbcfddea06cdb
Reviewed-on: https://code.wireshark.org/review/26959
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-16 20:16:00 +00:00
Anders bb81bef535 glib: Get rid of GLIB_CHECK_VERSION as we now require 2.32.0
Change-Id: Ie95cf37f9cd283545693e290340a7489cc989c95
Reviewed-on: https://code.wireshark.org/review/26970
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-16 16:07:46 +00:00
Stig Bjørlykke 5f145d4bf7 Qt: Do not show MaxMind DB path when not enabled
The About dialog should not show MaxMind DB path when built without
the MaxMind DB resolver.

Change-Id: Id5b51628a04005fc4dcaacea26abb3a0ddee9b66
Reviewed-on: https://code.wireshark.org/review/26886
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-04-16 06:57:11 +00:00
Gerald Combs 80256442af More PortAudio removal.
Change-Id: Ib56212e09d41fc76494d8186c77541302700104c
Reviewed-on: https://code.wireshark.org/review/26952
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-04-15 16:49:53 +00:00
Gerald Combs 1ab40c87ea [Automatic update for 2018-04-15]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I50b0c7211bfde3e0a17b4580e18fa423ab8fbdf1
Reviewed-on: https://code.wireshark.org/review/26953
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-04-15 16:19:41 +00:00
Roland Knall 9c5049a80b Gtk: Remove source code
Removing all gtk source code, except for main.? which will remain
for the official removal during SFUS18

Change-Id: I4273baf207df1eaaa4b94623cfd10bf74b1fc4a4
Reviewed-on: https://code.wireshark.org/review/26937
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-15 05:45:32 +00:00
Martin Kaiser f59be5cd53 qt: capture file properties: add a splitter
Add a splitter to the capture file properties dialog. This allows for
modifying the relative sizes of the details vs comment boxes. People who
paste lots of text into the capture file comment may want a lager box
for it.

Change-Id: Id79d9f5fd7e589a2ba88aa5f16b52bb37d7c47ae
Reviewed-on: https://code.wireshark.org/review/26845
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2018-04-11 02:16:34 +00:00
Gerald Combs 6208796b9e Qt: Disable collapsible children in the main window.
Set the childrenCollapsible property to false in the main window
splitters. Set the minimum size for the packet list, proto tree, and
byte views to a small (one em), consistent, and nonzero value. Otherwise
it's easy to inadvertently end up with a hidden main window view.

Bug: 14478
Change-Id: I07a352cf2cf0375829ae2e0cb53b2a7d717dbb7d
Reviewed-on: https://code.wireshark.org/review/26847
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2018-04-11 01:21:46 +00:00
Roland Knall b91fc6c1d9 Qt: Enable Emoji & Symbols selector again
Enable the emoji and symbols selector again.

Change-Id: I4ceb54ef2bdc0a268f9ec1ded597fdc01f2137c2
Reviewed-on: https://code.wireshark.org/review/26839
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-10 07:37:08 +00:00
Roland Knall d347091da9 Qt: Fix MacOSX menu entries
Remove various menu items added automatically on Mac OS X. The following
menu items have been removed:

- Edit / Start Dictation
- Edit / Emoji & Symbols
- View / Enter Fullscreen Mode
- View / Show Tab Bar - Hide Tab Bar

Bug: 13366
Change-Id: I44deae7ee8ea7a43926820e4f5d0517ece246939
Reviewed-on: https://code.wireshark.org/review/26823
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-09 15:44:22 +00:00
Michail Koreshkov 276d02a62b QT: keep cursor visible after completerion select
Before it was like this (display filter line edit "lost" focus)
After press Enter in completion pupup, line edit stop show cursor.
I was confused every time because without cursor it look like focus lost.
But in fact focus is not lost and only cursor was disappear.

Now cursor is not disappear

Change-Id: I56979a1a774b6fb0b8b8be8239c01f5034c42fc8
Reviewed-on: https://code.wireshark.org/review/26781
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-09 05:15:38 +00:00
Martin Kaiser f0fed34216 main window: don't keep a dangling freeze_focus_ pointer
Without this fix, Wireshark crashes when the user presses Ctrl-D or
selects Edit / Ignore Packet and the current focus is somewhere on the
bytes view.

To ignore a packet, we protect the actual ignore operation by calling
main window's freeze and thaw methods. We save a pointer freeze_focus_,
pointing to the widget that has the focus, and restore the focus during
thaw.

This causes a crash if the focused widget is part of ByteViewTab.
Ignoring the packet causes a redissection, the ByteViewTab and its
children are cleared. freeze_focus_ remains non-NULL but doesn't point
to a valid QWdiget any more. Calling freeze_focus_->setFocus() crashes.

Fix this by using a QPointer<QWdiget> for freeze_focus_. The pointer is
then reset to NULL when the QWdiget that it points to goes out of scope.

Change-Id: Icc1f71a9de971284c628b7815a7fc1a5cc0d5fe2
Reviewed-on: https://code.wireshark.org/review/26693
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-09 04:08:10 +00:00
Gerald Combs 432c3b2859 [Automatic update for 2018-04-08]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I85850833928dcf94e44957943c55126369c20905
Reviewed-on: https://code.wireshark.org/review/26799
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-04-08 08:15:51 +00:00
Gerald Combs 0cb3176ab7 Remove some references to Qt4.
Change-Id: I50f5abafb8adf18a5407427f7feb260301df45cc
Reviewed-on: https://code.wireshark.org/review/26771
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-06 03:11:52 +00:00
Michail Koreshkov 5fd4659164 QT: Copy as printable
Copy all printable characters (like in GTK-based) but not only letters

Change-Id: I5e431d0c52d65c5867f4893c86b6f0eb3f535972
Reviewed-on: https://code.wireshark.org/review/26757
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: Anders Broman <a.broman58@gmail.com>
2018-04-05 21:03:11 +00:00
Dario Lombardo c462fa8936 Qt: remove ws_buffer_start_ptr calls from clang-scan.
They are false positives.

Change-Id: I06b5c2d2f7f462143050ffd4a624f76a440d5d5a
Reviewed-on: https://code.wireshark.org/review/26729
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-04-05 18:51:09 +00:00
Roland Knall 3a928f1f87 Qt: Remove checks for version below 5.2
This stops the main source from being buildable by Qt 4.x

Change-Id: I61edbae04ac2b3bf0ae8ee8e09d335083945c176
Reviewed-on: https://code.wireshark.org/review/26756
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-04-05 18:48:57 +00:00
Roland Knall 6124ee2a1c extcap: Reload values on request
Allow certaing elements to be reloaded upon request. The way
this works is, certain elements can be configured to be reloadable.

By doing so, the extcap is asked once more just for the values
list of this item, together with all already set options, and
reloads the available options depending on the response.

Only supported for selector. Radio and Multiselect will need
additional patches, also moving those parts outside of extcap_argument.cpp
might make sense before hand.

Change-Id: I2e9e3d109b334bf878835a7cc9354f468bc22dee
Reviewed-on: https://code.wireshark.org/review/26223
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-05 09:31:23 +00:00
Gerald Combs 7ee07493cb [Automatic update for 2018-04-01]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I0db4c4cd78549ffca3f55a94de5279c7ad131647
Reviewed-on: https://code.wireshark.org/review/26699
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-04-01 15:46:26 +00:00
Moshe Kaplan e2ec760d5e Extend 'HTTP Referer statistics' to sequence HTTP Redirects
This patch adds support for sequencing HTTP Redirects. This enables
tracking of HTTP-based redirects, which may not have a Referer header.
As such, this patch also renames 'HTTP Referer statistics' to
'HTTP Request Sequences' to better reflect the more generic
functionality.

Note that this does not fully support RFC 3986. An external library like
uriparser.github.io may be a better option for efficient, full relative
HTTP URL resolution.

A Sample PCAP to test functionality is available here:
https://wiki.wireshark.org/SampleCaptures?action=AttachFile&do=get&target=http_redirects.pcapng

A sample PCAP to demonstrate usefulness is available here:
https://www.malware-traffic-analysis.net/2015/08/31/page2.html
(examine request to hxxp://lk2gaflsgh.jgy658snfyfnvh.com/service.php)

Change-Id: I9edd1a1de86228b0dcb1df9f6f30e24379684321
Reviewed-on: https://code.wireshark.org/review/26679
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-03-29 15:33:53 +00:00