Commit Graph

4195 Commits

Author SHA1 Message Date
Tomasz Moń 4bd5830cda CMake: Add ENABLE_VLD option for MSVC
Calling cmake with -DENABLE_VLD=ON when building with Visual Studio,
results in debug configuration being linked to Visual Leak Detector.
By default, Visual Leak Detector outputs the leak summary to Visual
Studio debug window. When ENABLE_VLD is active, VLD is linked to all
wireshark libraries and executables.
2021-04-10 21:53:59 +00:00
Jirka Novak e35b6d4859 RTP Analysis: Fix of use of uninitialized structure
Fixes crash when RTP Analysis was called directly from Telephony menu.
2021-04-10 13:17:54 +00:00
j.novak@netsystem.cz 8c6a7c13f9 RTP Player: Fix of opening of multiple dialogs 2021-04-10 08:48:40 +00:00
John Thacker 67301b471a qcustomplot: Fix some clang code analysis warnings
Two dead stores and a possible call of memcpy with a null
destination.
2021-04-09 17:30:20 -04:00
Jirka Novak e462b2b1c2 RTP Player: Fixed issue with hanging the player at end of play on Windows
Changes:
- Fixed issue with hanging the player. The issue is in Qt - internal
  Mutex is locked when Qt calls outputStateChanged() and you can't call
  any other action on the audio object
- Fixed issue when play marker stream was running forever
- Removed !1855 because it introduces delay on play on Windows platform
2021-04-08 12:01:38 +00:00
Thomas Dreibholz 39fd3212b9
Added statistics group for RSerPool protocols. 2021-04-08 09:36:23 +02:00
j.novak@netsystem.cz 2b072b8e76 RTP Stream Analysis: Process more streams than two, audio save removed 2021-04-07 05:40:09 +00:00
John Thacker d0088585b3 qcustomplot: Fix some warnings in upstream code
QPainter::HighQualityAntialiasing is obsolete and ignored
(https://doc.qt.io/qt-5/qpainter.html#RenderHint-enum) since
at least 5.6, so use Antialiasing instead, as indicated by the docs.
(https://doc.qt.io/archives/qt-5.6/qpainter.html#RenderHint-enum)

Explicitly cast a long to an int, like already done on line 21080.

Put in a break to suppress an overly aggressive fallthrough warning
on g++ (all values of an enum are tested, so it cannot actually fall
through.)
2021-04-06 07:43:55 -04:00
j.novak@netsystem.cz fe98c68224 RTP Player: UI improvements 2021-04-06 11:23:00 +00:00
Jim Young 56c540159d packet_list: Promptly reflect changes to frame.marked field
Add redrawVisiblePackets() to respond to user triggered event to
promptly trigger updates to the frame.marked field text when displayed
in the packet list.

Without this patch, if frame.marked is added as a custom column, updates
to the packet lists's frame.marked field text of packets will not be
immediately reflected in the packet list until some other event such as
adding a packet comment or ignoring a frame ultimately triggers
redrawVisiblePackets().
2021-04-04 17:18:13 +00:00
John Thacker 35d47066b3 QCustomPlot: Update external library to version 2.1.0
QCustomPlot 2.1.0 was just released (Mar 29, 2021) and officially supports
Qt 5.12-6.0, which in order to support we've been patching it
internally. Update to this latest external version (after removing
the whitespace at the end of a bunch of lines internal to comments.)
(https://www.qcustomplot.com/index.php/download) Edited to include
the permission from the author Emanuel Eichhammer to use the GPLv2.
(Does someone need to ask if that permission applies to 2.1.0?)

Ping #17144 and #17163 but those bugs appear to still be here.
2021-04-03 17:56:01 +00:00
Uli Heilmeier 587198a4cc QT Print Dialog: Make header optional
Add a checkbox to make the file information header/banner optional.

Fixes: wireshark/wireshark#17322
2021-04-03 14:54:00 +00:00
Uli Heilmeier ea20002a07 QT: Fix printer dialog
Fix EXC_BAD_ACCESS error by using printer variable.
2021-04-01 08:45:46 +00:00
j.novak@netsystem.cz 4e5f0456c6 RTP Player: Added ability to save streams as .au and .wav
Features:
- saves multiple streams (all selected and unmuted)
- saves streams same way they are played (jitter buffer, sampling, ...)
- only streams with audio (play rate >0) are exported
  - streams with play rate == 0 are silently ignored even selected for
    export
- all exported streams must use same play rate (user can change it
  before save)
2021-04-01 08:07:22 +00:00
Gerald Combs a80ea46ff7 CMake: Enable AUTO{MOC,UIC,RCC} according to our CMake version.
As noted in be2b0fc810, we need to set CMAKE_AUTO* before searching for
Qt packages when using 3.20.0 and later. However, this fails if we're
using CMake 3.9.6 or earlier. Set CMAKE_AUTO* where needed depending on
our CMake version.

Ping #17314.
2021-03-31 20:02:18 +00:00
j.novak@netsystem.cz 7e39f4eb86 RTP Player: Added ability to save streams as .au and .wav
Features:
- saves multiple streams (all selected and unmuted)
- saves streams same way they are played (jitter buffer, sampling, ...)
- only streams with audio (play rate >0) are exported
  - streams with play rate == 0 are silently ignored even selected for
    export
- all exported streams must use same play rate (user can change it
  before save)
2021-03-31 14:52:06 +00:00
Jirka Novak 7445635fdc RTP Player: Allow a user to select output rate
Tool allows a user to replay at specific rate when there is any issue
with autodetected rate by payloads.
Offered rates are provided by selected audio device.
2021-03-30 19:17:28 +00:00
Jirka Novak 58ec37f093 RTP Player: Added play rate of decoded audio
It shows which rate wireshark really decoded the stream and how it will
be played.
2021-03-30 08:19:55 +00:00
Jirka Novak 47862d8fce RTP Player: Dialog is nonmodal now and can be called multiple ways
Changes:
- refactored main_dialog handling of telephony dialogs
- RTP Player dialog is nonmodal now and can be left open
- it is possible to issue three actions on RTP Player dialog from other
  dialogs (other dialog have selected set of RTP streams before action)
  - replace - removes existing streams from RTP dialog and shows new set
  - add - adds new set to existing list in RTP dialog
  - remove - remove streams in set from list in RTP dialog
- Sequence Dialog:
  - was modified to hold rtpstream_info_t for RTP streams
  - added Play button
  - VoIP features (RTP Play button, select/deselect RTP stream) are
    disabled after creation and must be enabled. It handles that RTP
Play button is not shown e.g. in TCP sequence show
2021-03-30 07:57:22 +00:00
João Valverde 7fee50274f Merge the caputils/ and capchild/ directories
The distinction between the different kinds of capture utility
may not warrant a special subfolfer for each, and sometimes the
distinction is not be clear or some functions could stradle
multiple "categories" (like capture_ifinfo.[ch]).

Simplify by having only a generic 'capture' subfolder. The
separate CMake libraries are kept as a way to reuse object code
efficiently.
2021-03-29 06:08:02 +01:00
Gerald Combs cc3ee84516 [Automatic update for 2021-03-28]
Update manuf, services enterprise numbers, translations, and other items.
2021-03-28 09:30:09 +00:00
Jirka Novak 1c59f7d9ac RTP Player: Decoding of audio improved
Changes:
In nearly all cases decoding match content of capture. The exception is #2270,
where timestamps do not match recorded time which causes discrepancy in
decoding.
Decoding of audio correctly follows different soundcard rates.
RTP Player shows first sample rate in each stream in place of rate of playing.
Fixed incorrect time axis calculation

Fixes #16837
Fixes #4960
Fixes #2270
2021-03-27 12:12:43 +00:00
Jirka Novak e75e1fb580 Follow SIP Call: Added Follow SIP Call to Follow menu
Changes:
- epan/follow.c: follow_conv_filter_func has new parameter
  epan_dissect_t *edt, so filter can be generated based on decoded tree
of packet below the cursor
- menu Follow/SIP Call is enabled when sip packet is selected
- value of sip.Call-ID is used as filter for SIP call
- for sharkd it generates filter just 'sip.Call-ID' with no value
2021-03-27 09:02:14 +00:00
Jirka Novak cd5b568233 RTP Player: Showing of setup frame for RTP stream fixed
When RTP stream has no setup frame, but is decoded by Decode as or
with rtp_udp active, setup frame was shown as SETUP <number>, but
correct is RTP <number>.
2021-03-27 08:45:22 +00:00
Gerald Combs be2b0fc810 CMake: Enable AUTO{MOC,UIC,RCC} earlier.
Enable CMAKE_AUTOMOC, CMAKE_AUTOUIC, and CMAKE_AUTORCC before searching
for Qt packages. This is apparently required for CMake 3.20.0 and later.
Fixes #17314.
2021-03-26 20:48:22 +00:00
Paul Weiß b0289c5aaf Regex text import: fixed ui deviations
disabled RichText in regex text input, to prevent invisible
formatting from getting passed to the regex engine
fixed a issue where fields matched by duplicate groups would
not be parsed
2021-03-26 06:44:25 +00:00
Paul Weiß 8c1b29a597 Regex based textfile import
Modularized the parser backend slightly to have the needed hooks
Modified the timestamp format slightly to enable arbitrary postion for
second fractions
Added a regex based seeking parser for textfiles as frontend alternative
to text_import_scanner.l
Regex is using the GLib implementation
Supported frame-data formats are bin, hex, oct and base64
Regex based importing UI
Fixed Meory-leak in ImportTextDialog::exec()
A new tab was added to the text_import ui to accomodate the new fields
Hints are available and styled accordingly
2021-03-26 06:44:25 +00:00
Dario Lombardo ea929d6401 wsutils: add local implementation of g_memdup2.
g_memdup() was deprecated and replaced with g_memdup2() in GLib 2.68,
we provide our own copy of g_memdup2() for older GLib versions.
2021-03-25 09:38:10 +00:00
Jirka Novak f10ebb959d VoIP UI: Added shortcuts for dialog buttons
VoIP/SIP Calls, Sequence, RTP Streams, RTP Player and RTP Analysis
dialogs have shortcuts assigned. Shortcuts are same over all dialogs.
2021-03-24 20:02:41 +00:00
Jirka Novak 2a4859bd14 RTP Player: UI improvements
Changes:
- all waveforms has common scale therefore louder/quiter signal is visible
- when stream/streams are deleted from view, Y axis is rescaled and
  waveforms are rearranged to reuse empty space
2021-03-24 09:23:52 +00:00
Jirka Novak 030fbc7740 RTP Player: Fixed incorrect handling of legend in graph
Legend and it's elements were shown only when first waveform requires it.
Patch fixes it and all legend elements are shown when required by any
waveform.
2021-03-22 12:33:43 +00:00
Jirka Novak a123578fd5 RTP Player: Visual waveform shows what is really played
Visual waveform is derived from decoded audio. When audio is decoded
incorrectly, waveform now shows it.
E.g. on issue 14401 is now audio play aligned with waveform, but it
exhibits that decoded audio is incorrect - about two times longer than
pcap!

Changes:
- samplefile_ renamed to sample_file_
- tempfile_ is renamed to temp_file_
- decode() is separated to decodeAudio and decodeVisual
- Frame info stores frame len and frame_num for every frame. We must hold
it per frame as it may change in time. Info is stored in separate temp file
as waveform samples.
2021-03-22 04:43:30 +00:00
Gerald Combs 7c0ca88170 [Automatic update for 2021-03-21]
Update manuf, services enterprise numbers, translations, and other items.
2021-03-21 17:13:10 +00:00
Guy Harris a7d98a2cc9 Expand a comment.
Give details on what happens when running Wireshark from a GUI on
UN*Xes, or, at least, on {macOS,Ubuntu+GNOME,Ubuntu+KDE}, although
it's probably similar on other UN*Xes and on other desktop environments.
2021-03-15 18:40:19 -07:00
Guy Harris c33e2f7b51 Add more error-reporting routines that call through a function pointer.
Have routines to report capture-file errors, using libwireshark error
codes and strings, that call through a pointer, so they can pop up
dialogs in GUI apps, print a message to the standard error on
command-line apps, and possibly do something different on server
programs.

Have init_report_message() take a pointer to structure containing those
function pointers, rather than the function pointers themselves, as
arguments.

Make other API changes to make that work.
2021-03-15 12:17:59 -07:00
Guy Harris 03d6f39a99 libwiretap: make wtap_wtap_encap_to_pcap_encap() private to the library.
Only a tiny amount of code outside libwiretap needs to know about
pcap/pcapng LINKTYPE_ values, and all that code needs to know is, for a
given LINKTYPE_ value, what the corresponding WTAP_ENCAP_ value is.
Nothing should need to know, for a given WTAP_ENCAP_ value, what its
LINKTYPE_ value is.

Make it the case that nothing *does* need to know, for a given
WTAP_ENCAP_ value, what its LINKTYPE_ value is.  Export
wtap_dump_can_write_encap() and use *that*, in the "import hex dump"
code, what formats can be written to a pcap file.
2021-03-14 14:22:16 -07:00
Jirka Novak 2e87c27ce1 Voice dialogs: Unified naming and order of buttons in dialogs
Dialogs has same order of buttons:
- dialog specific (Flow Sequence, Find Reverse, Analyze, Reset Diagram)
- common voice functions (Prepare Filter, Play Streams)
- exports (Copy, Export)
- Close of dialog

Names were unified:
- Copy really copying to clipboard
- Save/Export was unified to Export
2021-03-14 19:08:45 +01:00
Guy Harris 01151ec332 Clean up "Export PDUs to File" code.
Combine exp_pdu_file_open() is called only by do_export_pdu(); just
combine them into one routine.

Get rid of the exp_pdu_t * argument to do_export_pdu(); instead, have
the exp_pdu_t structure be a local variable in that routine.  There's no
need to initialize exp_pdu_data.pkt_encap in
ExportPDUDialog::on_buttonBox_accepted() - do_export_pdu() already does
so.

The return value of do_export_pdu() isn't used; don't return anything.
2021-03-14 06:51:36 -07:00
Jirka Novak 006f0ab571 Voice dialogs: Added Select All/None/Invert to all of it 2021-03-14 13:14:53 +00:00
Gerald Combs bc45d75608 [Automatic update for 2021-03-14]
Update manuf, services enterprise numbers, translations, and other items.
2021-03-14 09:49:44 +00:00
Jirka Novak 24d59017a6 RTP Player: Added additional shortcuts
Added shortcuts:
- Mute/Unmute/Invert Mute
- Play/Pause/Stop

Removed outdated help in tooltip text. It makes no sense to use it, all
actions are available in context menu.
2021-03-11 12:44:48 +00:00
Jirka Novak 649eab2dfe RTP player: It is possible to select SETUP packet related to RTP stream
When SETUP (or related signalling packet) exists, it is selected by
Shift+G. If RTP stream is "alone", first RTP packet of the stream is
selected.
2021-03-10 15:45:12 +00:00
Jirka Novak ce786ed265 Rtp player: It is possible to select multiple rows in stream's list and graph
Changes:
- It is possible to select multiple streams in list and in graph
- Select All/None/Invert implemented in list of streams and in graph
- Indication of "Selected" stream redesigned in graph
- Mouse hovering shows related row/wave
- All operations adapted to multiselection
2021-03-09 16:49:09 +00:00
Gerald Combs d3f17ee08a Remove modelines in ui/qt.
Remove the editor modeline blocks from most of the source files in ui/qt
by running

    perl -i -p0e 's{ \n+ /[ *\n]+ editor \s+ modelines .* shiftwidth= .* \*/ \s+ } {\n}gsix' $( ag -g '\.(cpp|h)' )

then cleaning up the remaining files by hand.

This *shouldn't* affect anyone since

- All of the source files in ui/qt use 4 space indentation, which
  matches the default in our top-level .editorconfig

- The one notable editor that's likely to be used on these files and
  *doesn't* support EditorConfig (Qt Creator) defaults to 4 space
  indentation.
2021-03-08 18:11:32 +00:00
Gerald Combs 095618ea87 [Automatic update for 2021-03-07]
Update manuf, services enterprise numbers, translations, and other items.
2021-03-07 09:49:41 +00:00
João Valverde 41a172cc95 if_capabilities: Use a structured error msg from dumpcap
Have dumpcap in child mode return an error message with a primary and
secondary string, instead of using stderr. When writing to the console
log we ignore the second message to prevent flooding the log with
tutorial-like info on permissions.
2021-03-06 12:56:11 +00:00
Guy Harris 25d44cde11 wsutil: rename frequency-utils.[ch] to 802_11-utils.[ch].
It's 802.11-specific, and may include non-frequency/channel-related
items in the future.
2021-03-04 15:41:00 -08:00
Gerald Combs 25edc7439b Make ui/*.[ch] indentation consistent.
Switch ui/clopts_common.c, ui/filter_files.[ch], and ui/summary.[ch] to
4 space indentation. This brings them in line with all of the other
files in that directory and with ui/qt.

Fix the modelines in ui/qt/models/filter_list_model.cpp.
2021-03-01 22:41:23 +00:00
Gerald Combs e075626611 [Automatic update for 2021-02-28]
Update manuf, services enterprise numbers, translations, and other items.
2021-02-28 12:45:18 +00:00
Guy Harris ab7375dc6b Check for CaptureFileDialog::selectedFileType() failing.
Have it return WTAP_FILE_TYPE_SUBTYPE_UNKNOWN, rather than an
undecorated -1, if the hash table lookup fails.

Check for that as a return value, and pop up a "file an issue" dialog if
WTAP_FILE_TYPE_SUBTYPE_UNKNOWN is returned.

This should squelch Coverity CID 1473325; the error Coverity reports is
bogus, as negative file type/subtype values are check for before we try
to use them as suffixes, but this should catch the "this should not
happen" case that caused the error to pop up.
2021-02-27 14:25:55 -08:00