Commit Graph

43 Commits

Author SHA1 Message Date
Moshe Kaplan 1c3a9af869 Add files with WS_DLL_PUBLIC to Doxygen
Add @file markers for most files that
contain functions exported with
WS_DLL_PUBLIC so that Doxygen will
generate documentation for them.
2021-11-29 21:27:45 +00:00
John Thacker fd1c9b75ba doc: Update stats_tree README
Update README.stats_tree including the sample implementation for
changes in the API, such as the enum return value and needing to
set the node datatype as either int or float.

Also update the comments in the stats_tree header to make it clear
that abbrev and name refer to the abbreviation used in the tshark -z
option, and the name of the menu and window in the GUI for the stats
tree.
2021-11-23 22:20:16 -05:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
Change all wireshark.org URLs to use https.

Fix some broken links while we're at it.

Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26 18:44:40 +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
Michael Mann c10c7737cc Allow floating point values for stats_tree
Bug: 4234
Change-Id: Ibd59809b2dd9890a7851eb57ef7af384e280a74b
Reviewed-on: https://code.wireshark.org/review/31222
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-12-28 14:50:45 +00:00
João Valverde 8eddb1650d epan: Remove unnecessary all protocols registration callback
We are exporting a registration function from libwireshark just
to have it passed back as a callback. Seems unnecessary.

Change-Id: I7621005c9be11691d319102326824c5e3520a6f3
Reviewed-on: https://code.wireshark.org/review/29328
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-08-29 23:22:44 +00:00
Dario Lombardo 55c68ee69c epan: use SPDX indentifiers.
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>
2018-02-08 19:29:45 +00:00
Martin Kaiser d8903ce397 simplify some include file paths
For both autotools and cmake, the top-level source directory is always
part of the search path for include files. For include files in this
directory, we can simply use the file name. There's no need for a
relative path.

Change-Id: Ibf46265d91b5cb9bff4fa791e5b1d69ee3c1e165
Reviewed-on: https://code.wireshark.org/review/23798
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-01 15:10:19 +00:00
Dario Lombardo c31b8da721 stats_tree: add cleanup function.
Change-Id: Iefd264bdd79af172c245c3a30119999cca9d56c0
Reviewed-on: https://code.wireshark.org/review/19976
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-02-07 15:28:15 +00:00
Gerald Combs fdb85029fd Add ServiceResponseTimeDialog.
Add ServiceResponseTimeDialog as a subclass of TapParameterDialog,
similar to StatsTreeDialog. Add initial plumbing for statistics menu
items and command line invocation.

Don't append "..." to menu item names. Don't add menu icons. In each
case this avoids repetitive UI clutter.

Change-Id: I463b95c93090160bb81d2e80b16aad389dc0bd6c
Reviewed-on: https://code.wireshark.org/review/8864
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03 23:09:13 +00:00
Dario Lombardo b6cf61bfe3 Small parenthesis fix
Change-Id: I6bab238a37f7309daece7a7bfc062da41819d9ff
Reviewed-on: https://code.wireshark.org/review/6394
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-01-08 11:59:11 +00:00
Dario Lombardo 696fcdba21 Added DNS statistics support
This affects both the dissector (that has been added with a tap interface and a stats generator) and the UI (to recall the stats menu).

Change-Id: I90658f7aa6707aa39bdd787a51b20fed4dbddc53
Reviewed-on: https://code.wireshark.org/review/6236
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-01-05 09:06:32 +00:00
Bill Meier bfe3706035 Always put editor-modelines at the end of the file ...
... to ensure that there are no potential issues with respect to
editors limiting the number of lines scanned at the end of the file
when checking for editor modelines.

Change-Id: Ic85cbb108bb5159d6ec4116fea11f5eebb4e44a4
Reviewed-on: https://code.wireshark.org/review/4688
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-14 20:08:29 +00:00
Bill Meier 5051ae1cbe Convert "4 space tabs" to spaces; Adjust editor modelines.
Change-Id: I8d61d959c79e6aa9875c58680c54a331d18079cc
Reviewed-on: https://code.wireshark.org/review/4504
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-06 18:29:40 +00:00
Guy Harris 1c297771c3 Rename and move ui/stat_menu.h to epan/stat_groups.h.
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-03 20:30:42 +00:00
Guy Harris 5e28386540 Move stat_menu.h to libui.
Change-Id: I7bed7f7931845bc41035535cc62e1fe17c71047d
Reviewed-on: https://code.wireshark.org/review/2726
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-30 21:37:34 +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
Alexis La Goutte 2108ccad09 Fix indent (Use tabs) and add modelines
svn path=/trunk/; revision=54610
2014-01-05 18:39:50 +00:00
Michael Mann 60d6b05e23 Stats_tree enhancements for sorting, averages and burst rate. Bug 9452 (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-29 22:47:59 +00:00
Jakub Zawadzki 1899903f69 Include <epan/to_str.h> only when needed.
svn path=/trunk/; revision=53189
2013-11-09 13:41:10 +00:00
Balint Reczey 1ebdb2e521 Export libwireshark symbols using WS_DLL_PUBLIC define
Also remove old WS_VAR_IMPORT define and related Makefile magic
everywhere in the project.

svn path=/trunk/; revision=47992
2013-03-01 23:53:11 +00:00
Bill Meier 24eff41b08 it's ==> its & its ==> it's as needed.
svn path=/trunk/; revision=47896
2013-02-26 02:19:57 +00:00
Bill Meier 31f32d5e43 (Trivial) remove trailing whitespace.
svn path=/trunk/; revision=45616
2012-10-17 16:57:02 +00:00
Anders Broman 5d9d9b8221 From Wonil Kim: Enable statistics menu register for the tap plug-in. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7466
svn path=/trunk/; revision=43726
2012-07-15 16:24:35 +00:00
Guy Harris 85f219be2e From Michael Mann:
Add a preference for the packet length statistics.

Fixes bug 3239.

svn path=/trunk/; revision=43597
2012-07-07 08:15:41 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Guy Harris cf91fdf16b Have tap listeners specify whether the "packet" routine requires
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-06-05 22:42:47 +00:00
Ulf Lamping f904f42f9d Remove an ugly hack:
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
2009-02-10 03:54:55 +00:00
Jeff Morriss 71c1e4faf0 Change the stats tree API to use signed chars instead of guint8s for all its
strings; this should fix a number of signed/unsigned char warnings.
Reindent a bunch, too.

svn path=/trunk/; revision=25716
2008-07-11 21:13:39 +00:00
Ulf Lamping f7a6d27307 fix comments
svn path=/trunk/; revision=25084
2008-04-17 01:45:37 +00:00
Anders Broman 996d4db495 Ethereal->Wireshark
svn path=/trunk/; revision=18234
2006-05-28 19:49:07 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Jörg Mayer 30a8557868 More 'char*' -> 'const char*' changes to fix warnings.
svn path=/trunk/; revision=15015
2005-07-23 11:41:25 +00:00
Luis Ontanon 22084517ad Fix the names that were not consistent after the rename.
svn path=/trunk/; revision=13852
2005-03-21 17:51:07 +00:00
Luis Ontanon 3af24ce10a Add a cleanup call-back to the stats_tree.
svn path=/trunk/; revision=13851
2005-03-21 15:40:33 +00:00
Guy Harris d79eeaaa02 Declare "stats_tree_create_pivot_node()" and
"create_pivot_node_with_parent_name()".

svn path=/trunk/; revision=13846
2005-03-21 04:06:45 +00:00
Luis Ontanon 04dcf4e154 Rename all stats_tree extern functions to start with stats_tree_
svn path=/trunk/; revision=13840
2005-03-21 00:55:04 +00:00
Luis Ontanon 93c46dde91 Several fixes to the stats_tree
- 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-27 16:55:24 +00:00
Guy Harris 76ed6a51e1 There's no "tick_range_with_parent_name()" routine.
svn path=/trunk/; revision=13513
2005-02-25 09:56:04 +00:00
Luis Ontanon 8d189d27cc change to int the return type of manip_stat_node() so that it can be used as a parent
svn path=/trunk/; revision=13508
2005-02-25 05:14:38 +00:00
Luis Ontanon 00435bf390 Update to the stats_tree tapping API
- 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-24 22:02:31 +00:00
Luis Ontanon 9b02a501cd Fixes few things during reinitialization with gtk2 (it doesn't crash anymore),
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-20 17:43:38 +00:00
Luis Ontanon 43124c8744 Initial checkin of the stats-tree tap API
Makefiles have not been modified yet, there's still work to do.

svn path=/trunk/; revision=13414
2005-02-16 14:16:40 +00:00