summaryrefslogtreecommitdiff
path: root/ui/gtk/io_stat.c
AgeCommit message (Collapse)AuthorFilesLines
2016-10-22More checks for localtime() and gmtime() returning NULL.Guy Harris1-9/+12
And some comments in the case where we're converting the result of time() - if your machine's idea of time predates January 1, 1970, 00:00:00 UTC, it'll crash on Windows, but that's not a case where a *file* can cause the problem due either to a bad file time stamp or bad time stamps in the file. Change-Id: I837a438e4b875dd8c4f3ec2137df7a16ee4e9498 Reviewed-on: https://code.wireshark.org/review/18369 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-24Pacify GTK checkAPIs.pl warnings.Michael Mann1-2/+2
Add "Wireshark" macros to old-gtk-compat.h for GTK APIs that have been deprecated. The macros are setup by version number to limit their proliferation (not that I suspect much development will really be done there since GTK is deprecated). Just want to make buildbots happy for the time being. Change-Id: I095f850065166a0bc2e2456fb2e886ab64fdd97d Reviewed-on: https://code.wireshark.org/review/16635 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Balint Reczey <balint@balintreczey.hu> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-19Revert "tap: change glib functions to wmem."Pascal Quantin1-3/+3
This reverts commit 2e9f3c5d366eaa7139fc877b5301392166b3f985. It breaks the registration of codec, dissector and libwiretap plugins. Change-Id: I4ef91dd192f765adf87ea9fe9f3693e25dbd24de Reviewed-on: https://code.wireshark.org/review/16012 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-17tap: change glib functions to wmem.Dario Lombardo1-3/+3
Change-Id: I878ae6b121a669f9b7f4e1e57bc079f0cb44c0bf Reviewed-on: https://code.wireshark.org/review/15270 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-23More pinfo->fd->abs_ts to pinfo->abs_ts.Guy Harris1-1/+1
Change-Id: I70db0a345cc4c5c57c454371deb4f92f9ac4b9ac Reviewed-on: https://code.wireshark.org/review/13501 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-07Get rid of an unused structure member.Guy Harris1-1/+0
Change-Id: I2941bb7e6dc0fce3e1256af6e5e19d2997de5801 Reviewed-on: https://code.wireshark.org/review/7573 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-15ui/gtk/*.c: Add editor modelines; As needed: Fix indentationBill Meier1-0/+13
Change-Id: I8cd9d9fe5f12c284f46b8f725766f681faccd753 Reviewed-on: https://code.wireshark.org/review/7138 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-27GTK: fix no previous prototype for ... [-Wmissing-prototypes]Alexis La Goutte1-0/+1
Add by commit g43f09e67b (Remove unneeded includes from ui folder) Change-Id: I7c9d9e2bbd76d062f96422c74ee8eb8c6ecd328b Reviewed-on: https://code.wireshark.org/review/6808 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-18Clean up ftype-conversion and dfilter error message string handling.Guy Harris1-2/+4
Have dfilter_compile() take an additional gchar ** argument, pointing to a gchar * item that, on error, gets set to point to a g_malloc()ed error string. That removes one bit of global state from the display filter parser, and doesn't impose a fixed limit on the error message strings. Have fvalue_from_string() and fvalue_from_unparsed() take a gchar ** argument, pointer to a gchar * item, rather than an error-reporting function, and set the gchar * item to point to a g_malloc()ed error string on an error. Allow either gchar ** argument to be null; if the argument is null, no error message is allocated or provided. Change-Id: Ibd36b8aaa9bf4234aa6efa1e7fb95f7037493b4c Reviewed-on: https://code.wireshark.org/review/6608 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-09Add missing #include ( "ui/gtk/old-gtk-compat.h" )AndersBroman1-0/+1
Change-Id: Ic53c3cd4a38c587ab3c0dcb9f8349ca50e338f80 Reviewed-on: https://code.wireshark.org/review/6443 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-01Remove unneeded includes from ui folderMartin Mathieson1-8/+0
Change-Id: Ifd1eebff9080cd3867e44e4dcb2d2681370ed60a Reviewed-on: https://code.wireshark.org/review/6128 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-28Removed duplicated #include linesDario Lombardo1-1/+0
Change-Id: I9cafa3cd5c74121168777d8c656e7e94e89efd3c Reviewed-on: https://code.wireshark.org/review/6065 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-11-14Rename stat_cmd_args.[ch] to stat_tap_ui.[ch].Guy Harris1-1/+1
The intent is to handle more than just command-line arguments; reflect that. Change-Id: Ia10efda85a9d11c6579d1bec6f789cee30d9e825 Reviewed-on: https://code.wireshark.org/review/5304 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-14tap_ui -> stat_tap_ui.Guy Harris1-2/+2
The old routine had stat_ in the name, as the expectation was that they were for statistics taps; that's still the expectation, so have stat_ in the data structure and routine names. Change-Id: Ic98d011012b8641173d41fa0ec4f4e625614370a Reviewed-on: https://code.wireshark.org/review/5303 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-14For tap UIs, register a list of parameters and some menu information.Guy Harris1-1/+11
The intent here is to centralize more UI information so that we can move more tap UI stuff to common code. This is a beginning. Change-Id: Ic35ac0c01bc7b942aab88177db4065847a5e6c30 Reviewed-on: https://code.wireshark.org/review/5301 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-17Remove unnecessary includes of <ctype.h>.Guy Harris1-1/+0
Change-Id: I8eacec5fa8d57b10d40a3627197461dae89c6cb2 Reviewed-on: https://code.wireshark.org/review/4768 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-09-16Fix spelling: cant-->can't, wont-->won't, etcBill Meier1-1/+1
Change-Id: Ia6c3e7a25615bf8e052c3bacf096d76df775c9c2 Reviewed-on: https://code.wireshark.org/review/4126 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-03Rename and move ui/stat_menu.h to epan/stat_groups.h.Guy Harris1-1/+1
The groups are, technically, independent of the notion of a menu, and, if we have mechanisms by which taps that are not only GUI toolkit-independent but independent of the *existence* of a GUI can be registered, they might want to register themselves in a group just in case they're running in a program that has a GUI. Also, this might fix the Debian package build. Change-Id: I29435681e79748fd4f2e0c5ac872cd11f831d172 Reviewed-on: https://code.wireshark.org/review/2830 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-01Log2() and exp2() are missing on WindowsBalint Reczey1-1/+1
Change-Id: I8a970f9030fafd8fdcb4e2a24620033ec8005da7 Reviewed-on: https://code.wireshark.org/review/2744 Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2014-07-01Squelch some warnings.Guy Harris1-3/+3
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-01Increase space allocated for IO Graph slower after 1 million itemsBalint Reczey1-1/+3
Change-Id: I691070b572e519f412a80db5d7415331f07e8e50 Reviewed-on: https://code.wireshark.org/review/2689 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2014-07-01GTK: Unlimited, dynamically allocated IO GraphBalint Reczey1-58/+44
Bug: 8460 Change-Id: Id9aad3f5f69bee9e5a62601ecac28a6a7019e623 Reviewed-on: https://code.wireshark.org/review/2672 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2014-07-01Fix access to uninitialised valuesBalint Reczey1-0/+2
Change-Id: Id3592fed0cca5133d493f26d3b8ce27a3cf8505c Reviewed-on: https://code.wireshark.org/review/2723 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-30Move stat_menu.h to libui.Guy Harris1-1/+1
Change-Id: I7bed7f7931845bc41035535cc62e1fe17c71047d Reviewed-on: https://code.wireshark.org/review/2726 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-07Add a Qt I/O Graph dialog.Gerald Combs1-324/+39
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-03-11Migrate GTK icon handling to GTK 3.10 APIBalint Reczey1-1/+1
GtkStockItem usage is deprecated with all the GTK_STOCK_.* stock ids. We keep a stock id based approach but without relying on GTK's GtkStockItem system. We create our own internal stock ids for {icon, label} tuples and keep the original GTK stock id #define-s and values to preserve backward compatibility. Change-Id: Ia0b35a5903f079e92c8026e3df21bbf0be2d06b0 Reviewed-on: https://code.wireshark.org/review/302 Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(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-01-17Fix [-Wmissing-prototypes]Anders Broman1-0/+2
svn path=/trunk/; revision=54833
2013-07-26Fix bug #8980 - IO graph/advanced, max/min/summ error on frames with ↵Jakub Zawadzki1-1/+1
multiple Diameter messages tap_iostat_packet() was fetching only first item for FT_RELATIVE_TIME. svn path=/trunk/; revision=50923
2013-07-21Replace relative timestamp with reference frame number. Saves 16B per frame.Jakub Zawadzki1-3/+3
svn path=/trunk/; revision=50772
2013-07-09Another change that should have been part of r50465, which removed the ↵Chris Maynard1-9/+14
limits to the number of characters in the display filter(s). [Technically, there is still the inherent 65535 limit.] #BACKPORT(1.10,1.8) svn path=/trunk/; revision=50469
2013-07-09Use sizeof() instead of hard-coded values. Other minor whitespace cleanup.Chris Maynard1-29/+28
svn path=/trunk/; revision=50466
2013-07-09Remove the advanced filter field arbitrary text limit of 100 and remove the ↵Chris Maynard1-3/+0
filter field arbitrary text limit of 256. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8909 #BACKPORT(1.10,1.8) svn path=/trunk/; revision=50465
2013-05-31IOSTAT: plot LOAD y-axis in number of I/O not number of I/O times 1000Ronnie Sahlberg1-0/+10
svn path=/trunk/; revision=49647
2013-04-17Cast scrolling values to gdoubles, not gfloats - GtkAdjustment haveEvan Huus1-7/+7
always taken doubles that I've been able to find, and casting to floats causes loss of precision and weird bugs when the values get enormous. Should fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8460 svn path=/trunk/; revision=48893
2013-04-16Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8583Evan Huus1-0/+14
IO graph was misbehaving if the packets covered too much real time. It's still ungodly slow, but at least it seems to work. svn path=/trunk/; revision=48882
2013-03-28Follow up on bug 8416.Jaap Keuter1-5/+5
Remove C++ incompatibilities in GTK+ 3 code. svn path=/trunk/; revision=48606
2013-03-21From beroset:Bill Meier1-33/+33
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10408 Note: The following parts of the patch had been previously done: asn1/snmp/packet-snmp-template.c epan/dissectors/packet-snmp.c epan/dissectors/packet-x11.c svn path=/trunk/; revision=48448
2013-01-15Cleanup: indentation, whitespace, long-lines, formatting & etc.Bill Meier1-1565/+1593
svn path=/trunk/; revision=47092
2013-01-15Minor cleanup:Bill Meier1-12/+4
- remove severl gtk_box_set_child_packing() statements which "do nothing"; - replace several gtk_container_add()/gtk_box_set_child_packing() sequences by gtk_box_pack_start(). svn path=/trunk/; revision=47087
2013-01-04Add a wrapper for gdk_cairo_set_source_rgba() in GTK2 and use it in io_stat.cAnders Broman1-10/+7
svn path=/trunk/; revision=46932
2012-12-26Fix a bunch of warnings.Guy Harris1-1/+1
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of sizeof. Cast away some implicit 64-bit-to-32-bit conversion errors due to use of strtol() and strtoul(). Change some data types to avoid those implicit conversion warnings. When assigning a constant to a float, make sure the constant isn't a double, by appending "f" to the constant. Constify a bunch of variables, parameters, and return values to eliminate warnings due to strings being given const qualifiers. Cast away those warnings in some cases where an API we don't control forces us to do so. Enable a bunch of additional warnings by default. Note why at least some of the other warnings aren't enabled. randpkt.c and text2pcap.c are used to build programs, so they don't need to be in EXTRA_DIST. If the user specifies --enable-warnings-as-errors, add -Werror *even if the user specified --enable-extra-gcc-flags; assume they know what they're doing and are willing to have the compile fail due to the extra GCC warnings being treated as errors. svn path=/trunk/; revision=46748
2012-12-20From Edwin Groothuis:Anders Broman1-5/+37
IO Stats - Smooth should be per graph. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8090 svn path=/trunk/; revision=46631
2012-12-05Fix numerous instances of a variable/parameter name "shadowing" a library ↵Bill Meier1-1/+1
function name; (At least some (gcc ?) compilers give a "shadow" warning for these). svn path=/trunk/; revision=46402
2012-11-08Remove one more instance of destroy/create cr.Anders Broman1-8/+0
svn path=/trunk/; revision=45972
2012-11-08Create cr once per axis when drawing x,y axels.Anders Broman1-37/+4
svn path=/trunk/; revision=45971
2012-11-08gdk_cairo_set_source_color() needs to be set inside the loop.Anders Broman1-1/+4
svn path=/trunk/; revision=45970
2012-11-08Create cr once when drawing the graphsAnders Broman1-31/+10
svn path=/trunk/; revision=45969
2012-11-08Reindent section.Anders Broman1-552/+552
svn path=/trunk/; revision=45968
2012-11-08Make the button box the last row in gtk3 too.Anders Broman1-1/+1
svn path=/trunk/; revision=45967