aboutsummaryrefslogtreecommitdiffstats
path: root/epan/stats_tree_priv.h
AgeCommit message (Collapse)AuthorFilesLines
2019-01-01Add a "failed" return for tap packet routines.Guy Harris1-1/+1
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>
2018-12-28Allow floating point values for stats_treeMichael Mann1-6/+17
Bug: 4234 Change-Id: Ibd59809b2dd9890a7851eb57ef7af384e280a74b Reviewed-on: https://code.wireshark.org/review/31222 Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-04-17Remove some GTK+-only code.Gerald Combs1-1/+0
Change-Id: Ic2498c7acd6a1a522be45094148402ee34a6b4d1 Reviewed-on: https://code.wireshark.org/review/26958 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08epan: use SPDX indentifiers.Dario Lombardo1-13/+1
Skipping dissectors dir for now. Change-Id: I717b66bfbc7cc81b83f8c2cbc011fcad643796aa Reviewed-on: https://code.wireshark.org/review/25694 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-26stats_tree: rename shadow variableDario Lombardo1-2/+2
Change-Id: I5b3272cc4df728c70d6b0370b0d8a6d3482a0c6c Reviewed-on: https://code.wireshark.org/review/16100 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-08Add TapParameterDialog.Gerald Combs1-1/+0
Split StatsTreeDialog into StatsTreeDialog and TapParameterDialog (its base class). This more closely matches the GTK+ UI and paves the way for more statistics dialogs. Change-Id: I2630385534e829d99724673ade372fcb33200d07 Reviewed-on: https://code.wireshark.org/review/8842 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-06-05Clean up stats_tree_presentation.Gerald Combs1-16/+1
Remove some unused struct members and accompanying callbacks. Change-Id: I64d32ddf886038e8f19bc3f88e86c8d7578db648 Reviewed-on: https://code.wireshark.org/review/8779 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-30Qt: Convert more dialogs to WiresharkDialog.Gerald Combs1-1/+1
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-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-02-25Remove trailing whitespaceBill Meier1-20/+20
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0 Reviewed-on: https://code.wireshark.org/review/385 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2013-12-08From Deon van der Westhuysen via ↵Alexis La Goutte1-20/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9452 Patch: Stats_tree enhancements for sorting, averages and burst rate Add sort, save-as and new columns to Qt ui, remove old functions stats_tree.c / stats_tree_priv.h: Make all columns sortable. Remove unneeded functions stats_tree_get_strs_from_node, stats_tree_branch_to_str and stats_tree_is_sortable_column. stats_tree_stat.c: Set all columns sortable. stats_tree_dialog.cpp / stats_tree_dialog.h: Add new stats_tree columns. Make columns sortable. Remove copy to csv and copy to yaml buttons. Add copy to clipboard as plain text and save as buttons. stats_tree_dialog.ui: Remove copy to csv and copy to yaml buttons. Add copy to clipboard as plain text and save as buttons. Only define one column in ui, rest are added dynmically. From me : fix trailing whitespace svn path=/trunk/; revision=53848
2013-12-02Make the declaration of stats_tree_format_node_as_str() match theGuy Harris1-1/+1
definition. svn path=/trunk/; revision=53727
2013-12-02Make the declaration of stats_tree_format_as_str() match the definition.Guy Harris1-1/+1
svn path=/trunk/; revision=53712
2013-12-01Patch to include YAML export. Bug 9452 ↵Michael Mann1-5/+5
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9452) From Deon van der Westhuysen From me: use switch statements instead of if-else svn path=/trunk/; revision=53698
2013-11-30Constify to squelch some warnings.Guy Harris1-2/+2
svn path=/trunk/; revision=53663
2013-11-29A typedef has to actually define a type.Guy Harris1-1/+1
svn path=/trunk/; revision=53659
2013-11-29Stats_tree enhancements for sorting, averages and burst rate. Bug 9452 ↵Michael Mann1-1/+83
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9452) From Deon van der Westhuysen - Bug fix: object leak in stats_tree after a tap reset (for example apply statistics preferences with a stats_tree window open) - Bug fix: correct sample code in README.stats_tree - Add: slash in plug-in name now creates submenu as docs describe (was a bug?) - Add: menu separator before the stat_tree registered plug-ins - Add: stats_tree can now calculate averages for nodes; automatically calculated for range nodes. Add section in README.stats_tree describing averages. - Add: stats_tree can now calculate burst rate of each node (like rate but with a shorter, sliding time window) - Add: sorting for stats_tree plug-ins. Can sort on node name, count, average, min, max values and burst rate. - Add: preferences for stats_tree system (default sort column, burst calc params) - Add: stats_tree window copy to clipboard and export and plain text, csv and XML. - Added sample of new functionality in $srcdir/plugins/stats_tree/pinfo_stats_tree.c - Moved all stats_tree sample plug-ins to "IP Statistics" submenu. svn path=/trunk/; revision=53657
2013-11-21Add a statistics tree dialog.Gerald Combs1-1/+9
Add menu items for each corresponding item in gtk/main_menubar.c that calls gtk_stats_tree_cb(). Hopefully that's everything. Note that we use quite a bit less code than the GTK+ flavor and why we might not want to do that. Change a few things in ui/qt/CMakeLists.txt to more closely match the GTK+ version. Add plumbing for tap registrations in CMakeLists.txt and Makefile.am. Add the ability to copy text as CSV or YAML. svn path=/trunk/; revision=53464
2013-03-01Export libwireshark symbols using WS_DLL_PUBLIC defineBalint Reczey1-13/+14
Also remove old WS_VAR_IMPORT define and related Makefile magic everywhere in the project. svn path=/trunk/; revision=47992
2012-07-15From Wonil Kim: Enable statistics menu register for the tap plug-in. Fixes ↵Anders Broman1-0/+5
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7466 svn path=/trunk/; revision=43726
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2010-08-29Doxygen changes.Anders Broman1-29/+29
svn path=/trunk/; revision=33990
2010-03-26Constify an argument.Guy Harris1-1/+1
svn path=/trunk/; revision=32303
2009-06-05Have tap listeners specify whether the "packet" routine requiresGuy Harris1-1/+4
a protocol tree; the column values. This includes stats-tree listeners. Have the routines to build the packet list, and to retap packets, honor those requirements. This means that cf_retap_packets() no longer needs an argument to specify whether to construct the column values or not, so get rid of that argument. This also means that there's no need for a tap to have a fake filter to ensure that the protocol tree will be built, so don't set up a fake "frame" filter. While we're at it, clean up some cases where "no filter" was represented as a null string rather than a null pointer. Have a routine to return an indication of the number of tap listeners with filters; use that rather than the global num_tap_filters. Clean up some indentation and some gboolean vs. gint items. svn path=/trunk/; revision=28645
2009-02-10Remove an ugly hack:Ulf Lamping1-0/+1
There was an ugly hack while creating the menu, that tried to detect the stat_group a stats_tree belongs to by looking at the name string. That makes it unnecessarily hard to understand how the menu is really created. Fix: Add a new function stats_tree_register_with_group() that takes the stat_group as a parameter. Use this function where a stats_tree doesn't fit into the default "unsorted" group. svn path=/trunk/; revision=27407
2008-07-12More (mostly stats tree) unsigned->signed char cleanupJeff Morriss1-3/+3
svn path=/trunk/; revision=25717
2008-07-11Change the stats tree API to use signed chars instead of guint8s for all itsJeff Morriss1-45/+45
strings; this should fix a number of signed/unsigned char warnings. Reindent a bunch, too. svn path=/trunk/; revision=25716
2006-05-21name changeRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18197
2006-03-15Fix bug 710 and avoid having it crash when more than one instance are open ↵Luis Ontanon1-1/+2
at once. I think that whoever wrote the whole stats_tree thing should rewrite it ASAP, because it sucks! I did ?!?!?? ooops! svn path=/trunk/; revision=17627
2005-09-22Instead of checking if this is a new packet at every call to avoid ↵Luis Ontanon1-1/+0
recounting the packets at every rerun remove the tap listener of this stats tree. fixes bug 474 svn path=/trunk/; revision=15960
2005-08-24EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry! Ulf Lamping1-2/+2
I've done more than a day to change the timestamp resolution from microseconds to nanoseconds. As I really don't want to loose those changes, I'm going to check in the changes I've done so far. Hopefully someone else will give me a helping hand with the things left ... What's done: I've changed the timestamp resolution from usec to nsec in almost any place in the sources. I've changed parts of the implementation in nstime.s/.h and a lot of places elsewhere. As I don't understand the editcap source (well, I'm maybe just too tired right now), hopefully someone else might be able to fix this soon. Doing all those changes, we get native nanosecond timestamp resolution in Ethereal. After fixing all the remaining issues, I'll take a look how to display this in a convenient way... As I've also changed the wiretap timestamp resolution from usec to nsec we might want to change the wiretap version number... svn path=/trunk/; revision=15520
2005-03-21Fix the names that were not consistent after the rename.Luis Ontanon1-0/+1
svn path=/trunk/; revision=13852
2005-03-21Add a cleanup call-back to the stats_tree.Luis Ontanon1-1/+1
svn path=/trunk/; revision=13851
2005-03-21Rename all stats_tree extern functions to start with stats_tree_Luis Ontanon1-13/+10
svn path=/trunk/; revision=13840
2005-03-20There was a design flaw that caused a crash on windows andLuis Ontanon1-21/+40
left uninitialized successive copies of the stats tree. Split the stats_tree data in two different structs one for data that's always needed and it's not going to change at every run and another for each run of the tap. svn path=/trunk/; revision=13816
2005-02-27Several fixes to the stats_treeLuis Ontanon1-1/+0
- Avoid creating a copy of every branch at reinitialization this used to cause some GTK warnings and a leakage of tree nodes - propperly check the optarg to avoid getting junk in the filter text this caused a crash svn path=/trunk/; revision=13534
2005-02-25some more work forLuis Ontanon1-0/+3
- beautify the text output - make gtk1 textbox implementation usable (I hope) svn path=/trunk/; revision=13506
2005-02-24Update to the stats_tree tapping APILuis Ontanon1-0/+1
- change the tap init_string to %s,tree instead of %s,stat - change the registration key (it used to be tapname, that disallowed to register more than one tap per protocol) - add a "pivot" node for convenience svn path=/trunk/; revision=13502
2005-02-20Fixes few things during reinitialization with gtk2 (it doesn't crash anymore),Luis Ontanon1-2/+5
there are still problems at reinit (gtk2 node->pr warns about an iterator not been OK) set up propperties of the given files svn path=/trunk/; revision=13448
2005-02-16Initial checkin of the stats-tree tap APILuis Ontanon1-0/+179
Makefiles have not been modified yet, there's still work to do. svn path=/trunk/; revision=13414