Commit Graph

18 Commits

Author SHA1 Message Date
João Valverde 0615ba6317 ftypes: Make accessor functions type safe 2022-06-20 17:29:57 +00:00
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
João Valverde 0e50979b3f Replace g_assert() with ws_assert() 2021-06-19 01:23:31 +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
Guy Harris 2820156fbd Move still *more* headers outside of extern "C".
If a header declares a function, or anything else requiring the extern
"C" decoration, have it wrap the declaration itself; don't rely on the
header itself being included inside extern "C".
2021-03-16 13:50:13 -07:00
Alexander Meier 0f57ad35c8 IO Graph shows unsigned values correctly
IO Graph used to show unsigned integer values not correctly when using
SUM, MAX, MIN or LOAD. For example was the uint32 0x9b37d2b8 shown as
about -1_679_000_000 while it should be shown as 2_604_126_904.
This patch fixes the incorrect type conversions so that unsigned
integer are shown properly in IO Graph.

Change-Id: Ib361e63cce9e088bfdd4b3d3186725c67d33f1bd
Reviewed-on: https://code.wireshark.org/review/35550
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-18 12:17:24 +00:00
Dario Lombardo 7969c41519 Use I/O Graphs instead of IO graphs everywhere.
Change-Id: I6ce866b03632965dd1bad6eff361d91dd210c62b
Reviewed-on: https://code.wireshark.org/review/33680
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-20 20:01:00 +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
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
Peter Wu 023cf320eb Qt: support selecting the min/max packet from IO Graph
GTK+ supports selecting the first packet (via the "left mouse button")
and the last packet (via the "right mouse button") in an interval, and
Qt supports selecting the last packet of an interval. This patch enables
picking the packet matching the extreme value in Qt.

Bug: 12401
Change-Id: If0b7f2f1bf8c384ea0d68b5f5fae2d1e8b4b0ac2
Reviewed-on: https://code.wireshark.org/review/20769
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-04-05 09:27:32 +00:00
Gerald Combs 5c38838432 Place variable declarations where they're used.
Fix

    ../../ui/io_graph_item.h:251:29: warning: will never be executed [-Wunreachable-code]
                        guint64 t, pt; /* time in us */
                                ^

Change-Id: I0e861e892c2c03151d9f98e31ac68ce296baa26a
Reviewed-on: https://code.wireshark.org/review/17545
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: Michael Mann <mmann78@netscape.net>
2016-09-07 01:43:22 +00:00
Guy Harris bc5a0374bf Add the packet number to the packet_info structure, and use it.
That removes most of the uses of the frame number field in the
frame_data structure.

Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22
Reviewed-on: https://code.wireshark.org/review/13509
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-24 03:41:28 +00:00
JC Wren e2bcee6ac4 Make FT_{U}INT64 behave more like FT_{U}INT32, add support for FT_{U}INT{40,48,56}
Change-Id: I57354c309ecf3a0c8f0c7cff485638027f30bb19
Reviewed-on: https://code.wireshark.org/review/5813
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-21 16:57:52 +00:00
Bill Meier 9ed99d5c4e Strip some trailing whitespace; Fix some indentation; Add editor-modelines as needed.
Change-Id: I943153e28f468070d86535abad7be032e1386118
Reviewed-on: https://code.wireshark.org/review/2994
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-11 03:20:54 +00:00
Guy Harris deeb1de24c Squelch some warnings.
Make some arguments and structure members gsize, as that's what stored
into them or passed to them.  (And move a newly-widened-on-LP64 item, to
avoid extra structure padding.)

Add a cast, which also appears necessary to squelch a warning.

Clean up indentation while we're at it.

Change-Id: I0cc92e7d2904c5af1f3f3d93f51b6ecb3aed464d
Reviewed-on: https://code.wireshark.org/review/2741
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-01 10:03:20 +00:00
Gerald Combs a5cb72fe9e Add a Qt I/O Graph dialog.
For each graph you can set:
- Its visibility
- A name
- A display filter
- Color, from a fixed list
- Plot style: Line, Impulse, Bar, Stacked Bar, Dot, Square, Diamond
- Basic Y Axes (packets/s, bytes/s, bits/s)
- Computed Y Axes (SUM, MIN, AVG, MAX)
- Smoothing

You can pan and zoom using the mouse and keyboard. Clicking on a graph
selects the last packet for that interval. If all graphs have the same Y
axis a single label is shown, otherwise a legend is shown.

The time scale (X axis) can be toggled between relative seconds and the
time of day.

Graphs can be saved as PDF, PNG, BMP, and JPEG. Settings are "sticky"
via the io_graphs UAT.

To do:
- Minimize graph drawing delays.
- Figure out why smoothing differs from GTK+
- Everything else at the top of io_graph_dialog.cpp
- Fix empty resets.

A fair amount of code was copied from TCPStreamDialog. We might want to
subclass QCustomPlot and place the shared code there.

Move common syntax checking to SyntaxLineEdit.

Move some common code from ui/gtk/io_stat.c to ui/io_graph_item.[ch] and
use it in both GTK+ and Qt.

Make the io_graph_item_t array allocation in io_stat.c static. The
behavior should be identical and this gives us additional compile-time
checks.

Change-Id: I9a3d544469b7048f0761fdbf7bcf20f44ae76577
Reviewed-on: https://code.wireshark.org/review/435
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Gerald Combs <gerald@wireshark.org>
2014-04-07 20:56:42 +00:00