Commit Graph

19 Commits

Author SHA1 Message Date
Moshe Kaplan 3953ddcf57 Add UI header files to Doxygen
Add @file markers for UI
header files so that Doxygen will
generate documentation for them.
2021-11-30 08:01:36 -05:00
Guy Harris eb4d68033e Don't cast away upper bits when assigning to a nstime_t's secs field.
The secs field is a time_t, which is not necessarily 32 bits.  If it's
not, casting away the upper bits, by casting to guint32, introduces a
Y2.038K bug.

Either cast to time_t or, if you're assigning a time_t to it, don't
bother with the cast.
2021-04-28 21:31:15 +00:00
Gerald Combs 9222bd77cd Remove unneeded modelines in ui.
Remove the editor modeline blocks from the source files in ui that use 4
space indentation by running

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

This gives us one source of indentation truth for these files, and it
*shouldn't* affect anyone since

- These files match 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-04-20 07:43:39 +00:00
Stig Bjørlykke 6b589151a2 Qt: Fix memory leak in TCP Stream Dialog
Do not copy addresses at when dialog opens, they will be initialized
in tapall_tcpip_packet(). Do not clear addresses when switching stream,
they will be properly removed in graph_segment_list_free().

Correctly free addresses in graph_segment_list_free() which is called
when switching stream and when closing the dialog. Free copied addresses
when switching direction (address swap).

Remove redundant and unused code.

Change-Id: I4328aa4df333f59c587f841b74a24dc71d329079
Reviewed-on: https://code.wireshark.org/review/36840
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Tomasz Moń <desowin@gmail.com>
2020-04-14 15:35:55 +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 e5f4ef0c42 ui: use SPDX identifiers.
Change-Id: I6b05399395bcc35e59b73b4030ba4a05711a7b1a
Reviewed-on: https://code.wireshark.org/review/25565
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-02 13:39:04 +00:00
Kevin Hogan 799827b503 Qt: Add Goodput graph (ACK rate), and minor bug fixes
Add Goodput graph:
 - measures rate of ACKed bytes (including SACKed bytes)
 - useful to compare to throughput during slow-start to estimate
     bottleneck rate

Add graph selection checkboxes to multi-plot graphs:
 - most important for Throughput, since there are good cases
     for showing a subset of graphs at once
 - also added for Window Scale, since the addition is similar
     to that for Throughput

Minor bug fixes:
 - allow zoom rect to work when growing in any direction
     (not just right and up)
 - keep stray mouse clicks from re-doing a previous zoom
 - hide rubber band if active when keypress changes mouse mode
     to drag
 - allow mouse clicks on open space or grpah to return to default focus
     (i.e. focus on graph)

Change-Id: Id29356ceec810ebdbed9c3c0d8415416401fe643
Reviewed-on: https://code.wireshark.org/review/19718
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2017-01-22 14:41:49 +00:00
Pascal Quantin 387e7af218 tap-tcp-stream.h: fix double declaration introduced in g73b5e3d
Change-Id: I2656e323b9ea6d41566ab0cef1e4a94e3591b08c
Reviewed-on: https://code.wireshark.org/review/19687
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-01-20 07:15:00 +00:00
Kevin Hogan 73b5e3d008 Qt: modify RTT graph (handle GSO, SACK, etc), plus bug fixes
Modifications to RTT graph:
 - change x-axis to time (s) rather than sequence number
    [ avoids sequence number wraparound ambiguity, plus
       easier to correlate RTT changes to tcptrace graph ]
 - change RTT computation to properly handle acks to GSO packets
 - change RTT computation to take SACK blocks into account

Bug fixes:
 - eliminate potential memory leak if some packets are unacked
 - ensure RTT graph is shown if TCPGraph window is opened to it directly

Change-Id: I2bdcab97399ebde0f15c78fa19c882529a814580
Reviewed-on: https://code.wireshark.org/review/19662
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-01-20 00:35:34 +00:00
Kevin Hogan 259a3e508f Qt: add graph of unacked (outstanding) bytes to window scale graph
This metric is commonly used as an estimate of the sender's congestion window.
[ when examining a capture taken from the sender ]

Change-Id: I812d5556cef477c08ef1e5d396fbdddda9a6751e
Reviewed-on: https://code.wireshark.org/review/19661
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-01-19 10:00:23 +00:00
Dario Lombardo 50d1d59213 Qt: add initializers (CID 1162824).
Change-Id: Ib570d3531bfdd35404b75d49dbd7dd43db4c30d9
Reviewed-on: https://code.wireshark.org/review/16310
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-07-06 06:48:10 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Gerald Combs 07c3d057b8 Add previous/next stream navigation to the TCP stream graph dialog.
Add get_tcp_stream_count() to the TCP dissector and modify
graph_segment_list_get() to allow matching based solely on a stream.

Use text instead of icons for the mouse click behavior buttons. Remove
their PNG resources since we aren't using them any more. Fix setting the
cursor in the graph widget.

svn path=/trunk/; revision=51989
2013-09-12 21:37:47 +00:00
Gerald Combs 829c1ed25e Add the TCP window scaling graph. Add zoom selections.
Rename some methods. Add the ability to toggle time and sequence number
origins. Add more keyboard shortcuts. Comment out abs_secs abs_usecs in
the segment struct since it looks like we aren't using them. Make sure
we stay in the same TCP stream.

svn path=/trunk/; revision=51856
2013-09-09 01:40:06 +00:00
Gerald Combs abdac5bfac Add the TCP RTT graph.
Show the time values in ms instead of s. Add a button and keyboard
shortcut to switch the connection direction. Move more code to
tap-tcp-stream.c. Update our axis labels.

svn path=/trunk/; revision=51832
2013-09-08 01:25:27 +00:00
Gerald Combs 03fd39d7f0 Throughput graph updates.
GTK+: Fix what appears to be an off-by-one error in the MA period (21
segments instead of 20). Throw away our initial segment length instead
of subtracting it from the moving sum, which skews the sum.

Qt: Add the througput graph. Use bits/s for the throughput y axis. Let
the user switch between graph types. The dialog hangs when doing this. I
haven't been able to track down the cause. Remove some unused code.

Both: Tell the user that we're using a 20 segment moving average. Move
more routines to tap-tcp-stream.[ch].

svn path=/trunk/; revision=51759
2013-09-04 23:15:59 +00:00
Gerald Combs 1d27c70838 Add an item tracer to the TCP stream graph. Enable packet selection.
QCustomPlot data sets are made up of keys (x axis by default) and values
(y axis). It looks like we can have multiple values for a given key
(i.e. we can show multiple sequence numbers for a given timestamp) but
QCPItemTracers can only be positioned by a key and not a key+value pair.
This makes our graph selection behavior a bit different compared to the
GTK+ version. We can only select one segment for a give timestamp but
our selection targets are much larger (the height of the graph).

Add a map for segment data so we don't have to iterate to find them. Use
UTF8_RIGHTWARDS_ARROW where appropriate. Set a window title. Tell the
user what will happen if he or she clicks. Disable graph selection.

svn path=/trunk/; revision=51604
2013-08-30 21:15:24 +00:00
Gerald Combs 6d731a3e79 Add TCP sequence number (Stevens-style) graphs.
Add the QCustomPlot widget. Thanks to Emanuel Eichhammer for granting a
license change. Move some common code from ui/gtk/tcp_graph.c to
ui/tap-tcp-stream.[ch]. Get rid of tcp_graph_selected_packet_enabled().
It was only used in the menu code and didn't match what we were doing
elsewhere.

Still quite a bit of work to do but it's a promising start.

svn path=/trunk/; revision=51538
2013-08-27 18:13:20 +00:00