Commit Graph

27 Commits

Author SHA1 Message Date
Jirka Novak 2a5c96a799 Voice dialogs: Added option to apply display filter in VoIP/RTP dialogs
VoIP Calls dialog and RTP Streams dialog has now option to apply display
filter dialog during processing packets.
Filter checkbox is activated during dialog open when display filter is active.

New field apply_display_filter had to be added to voip_calls_tapinfo_t and
_rtpstream_tapinfo/rtpstream_tapinfo_t structures.
2021-01-01 19:06:58 +00:00
Jirka Novak ee78d8e616 VoIP Calls Dialog: List of calls is not cleared/refilled on retaps improved
I found that !1531 was too complex. For comparing calls we can use call_num.
Therefore I reverted creation of call_id for nonSIP call types.
2021-01-01 10:59:29 +00:00
Jirka Novak 41bf14a39d VoIP Calls Dialog: List of calls is not cleared/refilled on retaps
!1257 solved issue with duplication of information, but removed all
calls from VoIP Calls dialog. This patch solves the issue.
It was tested with many samples and provides same output as 3.4 branch.
2020-12-31 07:41:36 +00:00
j.novak@netsystem.cz 396baef3e5 voip_calls_dialog/voip_calls: Fix for #16952
The fix solves issue #16952. It reverts commit 88813716 which introduced memory leak which causes the issue. The original issue with duplicating entries is solved too.
Because commit was cherry picked to 3.4.0 (might be in more branches), this patch should be cherry picked too.
2020-12-30 08:51:00 +00:00
Jirka Novak ff3fffcf5c VoIP: VoIP calls statistics are cleared when retap is issued
Every press of Play Stream or Prepare Filter caused incorrect increasing
of Packets count and added Comments.
The reason was that callinfo statistics were not clear before recap
therefore all new values were added to exiting ones.
Patch solves it.
2020-12-14 13:29:38 +00:00
Jirka Novak 17cd230a03 voip_calls_dialog: avoiding of 'remove_tap_listener(): no listener ...' warning
When voip_calls_dialog is opened and then closed, mentioned warning is shown
because voip_calls_remove_all_tap_listeners is called twice in two different
methods. Removing of the call from one of method is not possible therefore
I introduced variable which tracks whether voip_calls_remove_all_tap_listeners
was already called or not.

Change-Id: Ic3c206cb7baf6612958d383880af296af019ffd8
Reviewed-on: https://code.wireshark.org/review/35660
Petri-Dish: Jim Young <jim.young.ws@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jim Young <jim.young.ws@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-01-06 09:07:20 +00:00
Roland Knall c5b158bec1 Qt: Rework VOIP Dialog context menu
Rework the context menu to have same functions behave the same
way and just create the menu while it is needed. Also, add switch
for setting the time of day to the context menu

Change-Id: Id813ff39431f6fad15887856f246d03f209e438d
Reviewed-on: https://code.wireshark.org/review/34165
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-02 19:14:55 +00:00
Guy Harris 2d41b15495 Add a "failed" return for tap packet routines.
This allows taps that can fail to report an error and fail; a failed
tap's packet routine won't be called again, so they don't have to keep
track of whether they've failed themselves.

We make the return value from the packet routine an enum.

Don't have a separate type for the per-packet routine for "follow" taps;
they're expected to act like tap packet routines, so just use the type
for tap packet routines.

One tap packet routine returned -1; that's not a valid return value, and
wasn't one before this change (the return value was a boolean), so
presume the intent was "don't redraw".

Another tap routine's early return, without doing any work, returned
TRUE; this is presumably an error (no work done, no need to redraw), so
presumably it should be "don't redraw".

Clean up some white space while we're at it.

Change-Id: Ia7d2b717b2cace4b13c2b886e699aa4d79cc82c8
Reviewed-on: https://code.wireshark.org/review/31283
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-01 05:03:42 +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
Dario Lombardo 8cd389e161 replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.
The first is deprecated, as per https://spdx.org/licenses/.

Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed
Reviewed-on: https://code.wireshark.org/review/25661
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08 14:57:36 +00:00
Dario Lombardo e52172c775 Qt: use SPDX identifiers.
Change-Id: I111945c08f99818c249a868c12d9a7b3a3df64b3
Reviewed-on: https://code.wireshark.org/review/25563
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-02 13:39:36 +00:00
Michael Mann 56a991710b Bugfix VoipCallsDialog tap handling
voip's special tap unregistering should be happening when
WiresharkDialog unregisters its taps.

Change-Id: I8f28b1ed31617b47870cb7a429d43f52fb8c4a86
Reviewed-on: https://code.wireshark.org/review/25294
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-15 09:46:01 +00:00
Guy Harris eb8ffb74e2 Use cfile.h to define the capture_file type.
Have cfile-int.h declare the structure, and use it in files that
directly access the structure.

Have cfile.h just incompletely declare the structure and include it
rather than explicitly declaring it in source files or other header
files.

Never directly refer to struct _capture_file except when typedeffing
capture_file.

Add #includes as necessary, now that cfile.h doesn't drag in a ton of

Change-Id: I7931c8039d75ff7c980b0f2a6e221f20e602a556
Reviewed-on: https://code.wireshark.org/review/24686
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-03 18:54:37 +00:00
Roland Knall 02e80019f2 Qt: Create models directory
Following the move for widgets and utils directory, moving models
and delegates to the utils directory. Guidelines for this directory are:

 - Implementation of a model
 - Implementation of a delegate
 - Utility class for data storage used by a model

Note: additionally all includes affected by this move have been changed
to absolute path includes, instead of relative ones.

Change-Id: I3bb868af7d3570437682b722a0cd46c906628570
Reviewed-on: https://code.wireshark.org/review/22790
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-07-26 12:22:04 +00:00
Peter Wu 370f3b358c Qt: add cache proxy model for Voip Calls dialog
When a capture file is reloaded, the information stored in
VoipCallsInfoModel is invalidated. Add another cache layer to fix this:

    VoipCallsInfoModel          wraps around raw data (invalid on close)
    CacheProxyModel             NEW: use prev. data or cache on close
    VoipCallsInfoSortedModel    provided sorting, etc.
    VoipCallsDialog             actual user of model (callTreeView)

This also fixes a UAF after a file was closed, and when a call is
selected (that got worse with the last model/view patch and is "fixed"
in this patch with the caching layer. Note that the Flow sequence and
Play Streams dialog are not that useful when the file is closed).

Change-Id: Ib4daff9dc01a54863fe1d943bdbdb876418924ee
Reviewed-on: https://code.wireshark.org/review/20574
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-03-24 23:02:43 +00:00
Peter Wu b4bc6c72c7 Qt: refactor Voip Calls Dialog into Model/View
Functional improvements:

 - "Time of day" option is now propagated to the CSV/YAML export.
 - The sorting order is preserved in the CSV/YAML export.

Other changes:

 - Convert column name identifiers to enum.
 - CSV output will now always be quoted (previously numbers like packet
   count were not quoted, but since CSV has no numeric type it should
   be OK to add quotes). Side-effect of model design decision.
 - Instead of clearing the widgets and re-adding all calls, now it will
   add new calls to the model. Not tested with a live capture, if the
   column data can change, maybe a dataChanged signal is needed.

Due to this patch, it should be easier to add a filter for finding calls
easier (e.g. by From, IP, etc.).

Note: extra QList is used in the model to ensure a O(1) lookup of calls
(rather than O(n) for GQueue).

Change-Id: Ie08462aae038d9c3daf1cc7a152b948724689017
Reviewed-on: https://code.wireshark.org/review/20084
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-03-24 23:02:30 +00:00
erikdejong ae88dbcc2a Qt: Enhancements to VoIP call dialog:
1) Added checkbox to toggle format in start and stop time columns from
relative time to time of day.
2) Added column to show duration of call in between the protocol and
packets column.

Change-Id: I56347fa36885e3a71646e2c9cdde2b8b5fb88846
Reviewed-on: https://code.wireshark.org/review/18383
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-25 04:14:59 +00:00
Gerald Combs 157721c0a9 Qt: Add "Copy As…" to VoIP Calls.
Bug: 4389
Change-Id: I88dba82bd63e8c3be2b6fac3eca88f810c62d8bd
Reviewed-on: https://code.wireshark.org/review/15985
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-06-16 22:25:05 +00:00
Pascal Quantin afaf929d0d Qt: various fixes to VoIP calls / RTP player windows
- Flush any remaining tapped packets before emitting captureFileRetapFinished().
  This ensures that all packets have been treated before returning from retapPackets().
- Remove VoIP tap listeners when captureFileRetapFinished() is emitted.
  This avoid summing stats each time the RTP player is opened, leading to wrong
  information in VoIP calls window
- Change voip_calls_tapinfo_t redraw member from a boolean to bitmap so as to identify
  which tap should call the tapinfo->tap_draw() callback. This allows fixing a race condition
  where the RTP player can be empty in Qt UI
- Reset some more statistics in voip_calls_reset_all_taps()

Change-Id: Ie7681702c81d338185c1813f2d340a437edf3a04
Reviewed-on: https://code.wireshark.org/review/12474
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-09 16:54:33 +00:00
Pascal Quantin 2773596970 Qt: add a reference counter to sequence analysis info
Increment the reference counter each time a flow sequence window is opened.
Free seq_analysis_info_t structure once the last flow sequence / VoIP calls / SIP flow window is closed.

Bug: 11712
Change-Id: I20fcb922b0516417d4bd74cdf75475dcb31f8b90
Reviewed-on: https://code.wireshark.org/review/11851
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-11-16 09:56:46 +00:00
Gerald Combs 3687d39304 Qt: Initial RTP playback.
Note the "initial". This is woefully incomplete.  See the "to do" lists
below and in the code.

This differs a bit from the GTK+ version in that you specify one or more
streams to be decoded.

Instead of showing waveforms in individual widgets, add them all to a
single QCustomPlot. This conserves screen real estate and lets us more
easily take advantage of the QCP API. It also looks better IMHO.

Change a bunch of checks for QtMultimediaWidgets to QtMultimedia. We
probably won't use the widgets until we make 5.0 our minimum Qt
version and plain old QtMultimedia lets us support Qt 4 more easily
(in theory at least).

Add resampling code from libspeex. I initially used this to resample
each packet to match the preferred rate of our output device, but this
resulted in poorer audio quality than expected. Leave it in and use to
create visual samples for QCP and to match rates any time the rate
changes. The latter is currently untested.

Add some debugging macros.

Note that both the RTP player and RTP analysis dialogs decode audio data
using different code.

Note that voip_calls_packet and voip_calls_init_tap appear to be dead
code.

To do:

- Add silence frames where needed.
- Implement the jitter buffer.
- Implement the playback timing controls.
- Tapping / scanning streams might be too slow.

Change-Id: I20dd3b66d3df53c9b1f3501262dc01458849f6b4
Bug: 9007
Reviewed-on: https://code.wireshark.org/review/10458
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-02 18:26:05 +00:00
Gerald Combs 7b7a7f198d Fix a VoipCallsDialog signal+slot mismatch.
Change-Id: I9c16cc138b55572aa19b6e02ca059ebde294bdbd
Reviewed-on: https://code.wireshark.org/review/10574
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-19 00:38:21 +00:00
Graham Bloice 2fde6ffc8f Fix out of tree builds
Stop out of tree builds picking up the in-tree version and config.h

Change-Id: Icadc46cab66db72af2d475eac31b28d0ca10df90
Reviewed-on: https://code.wireshark.org/review/8204
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-25 10:42:59 +00:00
Gerald Combs b5a3b65f7a Qt: Fix side effects of recent WiresharkDialog changes.
Quit the application when the main window closes. This cleans up any
other top-level windows that might be open.

Don't dereference a NULL pointer when opening the sequence dialog from
the VoIP calls dialog.

Change-Id: I9902d40ead1c5f2e541b6d79f3d957228e4e9687
Reviewed-on: https://code.wireshark.org/review/7107
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-14 00:19:58 +00:00
Gerald Combs 6e88978fd9 Qt: More #include → forward declarations.
Change-Id: Ib6de71f801cd3053374b6c867370acd594dcd396
Reviewed-on: https://code.wireshark.org/review/7089
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-13 02:31:16 +00:00
Gerald Combs 4556498f33 Qt: Convert more dialogs to WiresharkDialog.
Make the Sequence, IO Graph, Statistics Tree, and VoIP Calls dialogs
subclasses of WiresharkDialog.

Remove "Stats Tree" from Statistics Tree dialog titles. Don't complain
if the user opens more than one instance of the dialog.

Use the applicationName property in WiresharkApplication instead of a
separate variable.

Add a preexisting item to the IO Graph bug list (hovering when the file
is closed clears the graph).

Change-Id: I8411a25305d00b16e0d4a82fa50a9bad5c85b239
Reviewed-on: https://code.wireshark.org/review/6125
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-30 03:34:03 +00:00
Gerald Combs 4921e55990 Qt: Initial VoIP Calls dialog.
Add Telephony menu items for VoIP Calls and SIP Flows. Put VoIP Calls at
the top, since that seems to be the primary item.

Add configure-time checks for QtMultimediaWidgets in anticipation of
adding a VoIP playback dialog.

Add an icon for the playback button. (Yes, I've been avoiding
GNOME-level gratuitous icons so far but this is one of the rare
occiasions where it makes sense.)

Add a help link define for the VoIP calls dialog.

Change-Id: I5d0799685c598ad9af76fe9667f8ea7d14b66050
Reviewed-on: https://code.wireshark.org/review/5674
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-09 21:25:33 +00:00