Commit Graph

29 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
João Valverde 133b0c583f Move epan/wmem/wmem_scopes.h to epan/
This header was installed incorrectly to epan/wmem_scopes.h.

Instead of creating additional installation rules for a single
header in a subfolder (kept for backward compatibility) just
rename the standard "epan/wmem/wmem.h" include to
"epan/wmem_scopes.h" and fix the documentation.

Now the header is installed *correctly* to epan/wmem_scopes.h.
2021-07-26 14:56:11 +00:00
Guy Harris 1e1f4e6b5f Move more headers outside 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 02:36:10 -07:00
Martin Kaiser f4ac70818a stat_tap_table_ui: create tables only once during init
If you load a capture file and open any statistics dialog, you'll see the
list of collected items. Each time you press the Apply button (without entering a
display filter) another list of items will be created as a top-level entry
of the statistics tree. Only the first list will have the correct values,
all subsequent lists will not be populated.

Each statistic module defines a stat_tap_table_ui structure that contains a
stat_tap_init_cb function. This init function is called by
SimpleStatisticsDialog::fillTree before the tap listener is registered. This
happens each time we collect the statistics.

However, it seems that all init functions create a new stat_tap_table each
time they are called, even if they already have an existing stat_tap_table
of the same name.

This patch adds a stat_tap_find_table function to find a table by name.

As a first step, we update the ANSI A-I/F BSMAP Statistics to check if its
table is already registered. If it is, the table will not be created again.
2021-01-28 13:41:08 +00:00
Peter Wu 7c890e3307 Do not modify optarg with -zfollow,ssl,ascii,0
Most callers (in tshark.c, ui/commandline.c, etc.) do not modify their
optarg argument, so don't do that here either.

Fixes: v2.9.0rc0-2110-g872b573381 ("Recognize -zfollow,ssl,ascii,0 for compatibility")
Change-Id: I80d56aee7ba80591b684d847a9cc95cf9a96c5dd
Reviewed-on: https://code.wireshark.org/review/30031
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-05 13:19:32 +00:00
Guy Harris afad14dcfe Get rid of some GTK+-only stuff.
Change-Id: I85806476246a567f747e3911e3d15716e9cfe06b
Reviewed-on: https://code.wireshark.org/review/27514
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-13 20:21:14 +00:00
Guy Harris c61b543e97 Get rid of more new_ prefixes for statistics functions and types.
There are no "old" versions of them that we're keeping around.

Change-Id: I3c76a14d0ec1a06df39c547da37f4dea9987df4d
Reviewed-on: https://code.wireshark.org/review/25892
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-19 00:12:51 +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
Jakub Zawadzki 60c8ada4c2 sharkd: output JSON for new_stat_ API.
Change-Id: I5b4b020029f3c1587f96ca1fcf5fbfa2ee78ac31
Reviewed-on: https://code.wireshark.org/review/21628
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2017-05-15 09:16:51 +00:00
Michael Mann 70381f774c Switch stat tap to use wmem_tree_t instead of (sorted) GSList.
Change-Id: I172167eb20793113562b69d1e0e93a4882200404
Reviewed-on: https://code.wireshark.org/review/20019
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-02-08 14:25:07 +00:00
Dario Lombardo fe89424160 stat_tap_ui: add cleanup function.
Change-Id: I0275a6e0d5d151f086d96c6388b9fa647ea0085c
Reviewed-on: https://code.wireshark.org/review/19654
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-01-18 08:25:33 +00:00
Dario Lombardo 4962ea601f qt: move free_stat_tables from SimpleStatisticsDialog::fillTree to ~SimpleStatisticsDialog.
Add a reference count to stat_tap_table_ui to prevent bad deallocations.

Bug: 12437
Change-Id: Ib9b1f929d08a574c306dc755ec416ab94a3fd6d3
Reviewed-on: https://code.wireshark.org/review/15920
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-16 04:01:57 +00:00
Guy Harris 63a1e4ad85 Get rid of another unnecessary new_ prefix.
Change-Id: I99522c1e5f2a4aac091cb19dd7fff450ddc2c26e
Reviewed-on: https://code.wireshark.org/review/12898
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-29 00:48:29 +00:00
Guy Harris 9067ee8f5a Rename new_stat_tap_ui to stat_tap_table_ui.
A "new" statistics tap UI is a statistics tap UI where the statistics
are maintained as tables and common code handles the tables; what
matters is the tables, not that it's "new".

Change-Id: I7a0e63cfac98c24cd5e7dce973b9a0cc5b6a03ba
Reviewed-on: https://code.wireshark.org/review/12897
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-29 00:31:37 +00:00
Guy Harris 0c156fec93 There's no "old" stat_tap_table, so remove "new_" from the name.
Change-Id: I1a0349d5d9d47210a97ff7a99fb358e59fd70e72
Reviewed-on: https://code.wireshark.org/review/12896
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-29 00:20:09 +00:00
Gerald Combs 5c80f08648 Add DCE-RPC and ONC-RPC service response time dialogs.
Add RpcServiceResponseTimeDialog, which handles DCE-RPC and ONC-RPC
service response time statistics. Try to make it as lightweight as
possible, since we might want to pull this into the RPC dissectors
similar to the other SRT statistics.

Allow program names on the command line in place of numbers or UUIDs. Make
matches case-insensitive. E.g. the following are equivalent:

    -z rpc,srt,100003,3
    -z rpc,srt,nfs,3
    -z rpc,srt,NFS,3

as are the following:

    -z dcerpc,srt,f5cc5a18-4264-101a-8c59-08002b2f8426,56
    -z dcerpc,srt,nspi,56
    -z dcerpc,srt,NSPI,56

Change-Id: Ie451c64bf6fbc776f27d81e3bc248435c5cbc9e4
Reviewed-on: https://code.wireshark.org/review/9981
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-08-12 20:17:35 +00:00
Gerald Combs 147ab19f08 Switch the floats in stat_tap table items to doubles.
Use doubles instead of floats in stat_tap_table_item_type. This should
make stat taps easier to use with a lot of our API (e.g. nstime) along
with Qt and the C math library.

This reverts commit 5bbb6ff5e4.

Change-Id: I113b44fb944a883cde016b7a8961597658be4c0a
Reviewed-on: https://code.wireshark.org/review/9912
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-08-07 16:45:58 +00:00
Gerald Combs fd19aafbe6 Add ONC RPC program stats.
Convert ONC RPC program stats to the stat_tap API.

Add a "user_data" member to the stat_tap_table_item_type struct.

Change-Id: I5cbf000a447ff93d30fa7f098124bdcbc34f2935
Reviewed-on: https://code.wireshark.org/review/9904
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-07 08:57:42 +00:00
Gerald Combs ff24ecceb9 Fixup stat_tap table freeing.
As it turns out we *do* need to free table elements. We also need to
free the tables themselves and clear the table array. Do so.

Change-Id: Ic1c81388eac8f47f74caea0169c79685a83aaff9
Reviewed-on: https://code.wireshark.org/review/9901
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-06 21:22:13 +00:00
Gerald Combs 03802cc53e Convert H.225 tap stats to new "generic stat API".
Migrate the H.225 stats similar to the recent BOOTP migration.

Change-Id: I70ff7ab6cf3e9796f257412ba7d65ec9fe7f77ad
Reviewed-on: https://code.wireshark.org/review/9859
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-08-04 16:36:22 +00:00
Gerald Combs 4eca268935 Add SimpleStatisticsDialog.
To do:
- Refactor dynamic menu item placement.

Change-Id: I087de9f2fa3c2ff7dc08e5d54bc9c1b984fdd7b1
Reviewed-on: https://code.wireshark.org/review/9561
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-08 17:01: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
Michael Mann a8ff1e2778 Create very basic "generic" stat tap API to create a "GUI" independent table.
A few sample tap/dissectors (ANSI/A, ANSI MAP) are also included to test the API.  The "GUI output" is a bit raw and could use some "prettying up", but all the basic hooks are there.

Telephony "stat grouping" needs to be better alphabetized to properly populate menu (on GTK, probably Qt)

Change-Id: I98514171f69c4ab3a304dccb26c71d629703c9ab
Reviewed-on: https://code.wireshark.org/review/9110
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03 23:08:28 +00:00
Gerald Combs f0c0081673 Mark items unused or rarely-used as appropriate.
Change-Id: Id9c046333dedd6f22d476083f395ef72a52c8439
Reviewed-on: https://code.wireshark.org/review/8888
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-11 17:22:17 +00:00
Guy Harris 5e67ae78ba Get rid of an unused structure member.
Change-Id: I2941bb7e6dc0fce3e1256af6e5e19d2997de5801
Reviewed-on: https://code.wireshark.org/review/7573
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-07 04:41:09 +00:00
Bill Meier 9c866ff971 Replace tabs by spaces when editor modelines has "expandtab"
Change-Id: If7a6f2697be732ae4f94ed8b845fd293c32510f7
Also: tabs-stops should be 8
Reviewed-on: https://code.wireshark.org/review/7100
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-02-13 17:34:53 +00:00
Guy Harris 99b6afbc28 Add a name field to tap_param, for use in error messages.
Change-Id: Ia4317b61ff30e269eba0ee2ea2c46f1668544b1b
Reviewed-on: https://code.wireshark.org/review/5309
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-14 20:21:57 +00:00
Guy Harris 4729e13df7 Add an optional flag and a type for UUID parameters for stat taps.
For future use, with common code to parse the -z argument.

Change-Id: Ib2a11bd5c91b5ac48ced2cd2d112b97c301ff72a
Reviewed-on: https://code.wireshark.org/review/5307
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-14 19:25:42 +00:00
Guy Harris 4d3c4c4f12 Rename stat_cmd_args.[ch] to stat_tap_ui.[ch].
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-14 18:52:06 +00:00