Commit Graph

61 Commits

Author SHA1 Message Date
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
Gerald Combs 605ef095f9 Fix the last of the Win64 problems in the gtk directory.
svn path=/trunk/; revision=28063
2009-04-16 03:18:10 +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
Ulf Lamping 5375b5f476 add a new "Telephony" main menu entry and move the telephony specific statistics stuff over there
svn path=/trunk/; revision=27326
2009-01-29 01:38:08 +00:00
Stig Bjørlykke 8608c8f1de Fix some "format not a string literal and no format arguments" warnings.
svn path=/trunk/; revision=26641
2008-10-31 09:53:56 +00:00
Stig Bjørlykke 489b5e1fec Bring the windows to front when rescanning of packets are done.
svn path=/trunk/; revision=26435
2008-10-13 17:38:28 +00:00
Jeff Morriss dd6a15e1c7 Don't put (non-extern'd) prototypes for protect_thread_critical_region() and
unprotect_thread_critical_region() in every module in gtk/: instead have those
modules include main.h (which has the properly extern'd prototype).

This should fix the link error on HP-UX described in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2702

svn path=/trunk/; revision=25933
2008-08-05 17:33:14 +00:00
Jeff Morriss c50b4aec09 More (mostly stats tree) unsigned->signed char cleanup
svn path=/trunk/; revision=25717
2008-07-12 01:48:24 +00:00
Bill Meier 56206e0002 Fix some simple cases of GTK2 deprecated API usage by using a renamed or equivalent API
gtk_container_border_width()          ==> gtk_container_set_border_width()
  gtk_container_children()              ==> gtk_container_get_children()
  gtk_entry_new_with_max_length()       ==> gtk_entry_new(); gtk_entry_set_max_length()
  gtk_menu_append()                     ==> gtk_menu_shell_append()
  gtk_menu_prepend()                    ==> gtk_menu_shell_prepend()
  gtk_notebook_set_page()               ==> gtk_notebook_set_current_page()
  gtk_paned_gutter_size()               ==> gtk_paned_set_gutter_size()
  gtk_radio_button_group()              ==> gtk_radio_button_get_group()
  gtk_signal_connect()                  ==> g_signal_connect()
  gtk_signal_disconnect()               ==> g_signal_handler_disconnect()
  gtk_signal_emit_by_name()             ==> g_signal_emit_by_name()
  gtk_signal_handler_block_by_data()    ==> g_signal_handlers_block_matched()
  gtk_signal_handler_block_by_func()    ==> g_signal_handlers_block_by_func()
  gtk_signal_handler_unblock_by_data()  ==> g_signal-handlers_unblock_matched()
  gtk_signal_handler_unblock_by_func()  ==> g_signal-handlers_unblock_by_func()
  gtk_spin_button_get_value_as_float()  ==> gtk_spin_button_get_value()
  gtk_toggle_button_set_state()         ==> gtk_toggle_button_set_active()

svn path=/trunk/; revision=25634
2008-06-29 15:51:43 +00:00
Ulf Lamping 85e14ceb86 rename REGISTER_xxx_GROUP_NONE to REGISTER_xxx_GROUP_UNSORTED, as NONE seems a bit misleading
svn path=/trunk/; revision=25086
2008-04-17 02:16:39 +00:00
Ulf Lamping 644a474c95 sort #includes by directories
svn path=/trunk/; revision=24969
2008-04-13 03:32:24 +00:00
Ulf Lamping d91e0e350a move tap_dfilter_dlg.h from / to /gtk (and use the callback mechanism in main.c instead)
svn path=/trunk/; revision=24956
2008-04-12 20:31:18 +00:00
Ulf Lamping d4ccf577a8 where it's not necessary, remove #include "compat_macros.h"
svn path=/trunk/; revision=24922
2008-04-12 01:02:59 +00:00
Ulf Lamping 8e58ec7085 last round to replace SIGNAL_CONNECT with g_signal_connect
svn path=/trunk/; revision=24918
2008-04-11 23:16:06 +00:00
Bill Meier ab9c1b68fd OBJECT_..._DATA --> g_object_..._data
svn path=/trunk/; revision=24899
2008-04-11 17:26:09 +00:00
Ulf Lamping 49ad47d477 remove GTK1 code
svn path=/trunk/; revision=24824
2008-04-07 01:05:55 +00:00
Bill Meier 161eb8b6d7 Add missing g_object_unref for treeview models;
Remove not needed set_tree_model (stats_tree_stat.c)

svn path=/trunk/; revision=24230
2008-01-31 16:37:56 +00:00
Stephen Fisher 8fd3ee0560 Remove almost all of the casts I committed recently and in place of
them, add -Wno-pointer-sign to CFLAGS when gcc will accept it.


svn path=/trunk/; revision=21253
2007-03-28 21:55:11 +00:00
Stephen Fisher 1909b97d4d Remove all warnings under Unix for the gtk/ directory.
svn path=/trunk/; revision=21160
2007-03-24 00:45:11 +00:00
Anders Broman 2c525a1d73 Fixa a typo.
svn path=/trunk/; revision=19055
2006-08-27 19:15:20 +00:00
Ulf Lamping 36d80b8c8b squelch some compiler warnings
svn path=/trunk/; revision=19052
2006-08-27 11:27:47 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Luis Ontanon b3f862b7e5 fix for Bug 849
svn path=/trunk/; revision=17777
2006-03-30 20:29:36 +00:00
Jaap Keuter 4efe662b04 Check struct pointer before dereferencing it.
Coverity CID 142

svn path=/trunk/; revision=17644
2006-03-16 12:12:51 +00:00
Luis Ontanon c39b333072 Fix bug 710 and avoid having it crash when more than one instance are open 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
2006-03-15 01:41:39 +00:00
Guy Harris ea82d47d0c Add userdata arguments to a bunch of stat initialization routines to
squelch compiler warnings.  Tag one existing such argument as unused to
squelch another warning.

Fix up some indentation.

svn path=/trunk/; revision=17261
2006-02-12 00:54:56 +00:00
Luis Ontanon 35bd5bd854 Instead of checking if this is a new packet at every call to avoid recounting the packets at every rerun remove the tap listener of this stats tree.
fixes bug 474

svn path=/trunk/; revision=15960
2005-09-22 17:01:06 +00:00
Luis Ontanon fd05837613 leak fix
svn path=/trunk/; revision=15825
2005-09-15 19:26:05 +00:00
Guy Harris f34e1a97c6 Have cf_retap_packets() take an argument that indicates whether to
generate columns; use cf_retap_packets instead of cf_redissect_packets()
when running taps (the general flow graph stat uses the Info column).

svn path=/trunk/; revision=15793
2005-09-14 08:59:41 +00:00
Luis Ontanon f1ba6f515f http://bugs.ethereal.com/bugzilla/show_bug.cgi?id=377
svn path=/trunk/; revision=15530
2005-08-25 15:48:28 +00:00
Guy Harris b3562ac040 "gtk_tap_dfilter_dlg_cb()" is no longer used outside
gtk/tap_dfilter_dlg.c; don't export it.

That means that gtk/tap_dfilter_dlg.h is no longer useful; get rid of
it.

Rename "gtk_tap_dfilter_dlg_cb()" to "tap_dfilter_dlg_cb()", as it's
inside GTK+-specific code, so there's no need to distinguish it from
non-GTK+ callbacks.

Update some comments to reflect the name change and the new API for
registering tap_dfilter_dlg stats.

Make the AFP and SMB stats use the gtk/tap_dfilter_dlg.c stuff.

svn path=/trunk/; revision=15496
2005-08-21 11:09:36 +00:00
Guy Harris a0e68da918 Add a "register_dfilter_stat()", to register stats that take a display
filter as an argument on the command line and have a dialog box to enter
the display filter through the GUI.  Use it for all stats using
"gtk_tap_dfilter_dlg_cb()".

Add a top-level "stat_menu.h" file to declare "REGISTER_STAT_GROUP_E"
for the benefit of the declaration of "register_dfilter_stat()" in the
top-level "tap_dfilter_dlg.h".  Rename the "stat_menu.h" in the gtk
directory to "gtk_stat_menu.h", so as not to have two headers with the
same name.

Get rid of headers not declaring any functions not being used in the
module.

svn path=/trunk/; revision=15493
2005-08-21 09:48:27 +00:00
Guy Harris 50d77b113c Rename epan/stat.[ch] to epan/stat_cmd_args.[ch] - it only deals with
implementing the "-z" command-line arguments, it doesn't deal with *all*
issues for stats.

svn path=/trunk/; revision=15483
2005-08-20 20:06:05 +00:00
Ulf Lamping eafbbbcabb renamed ui_util.c/.h to gui_utils.c/.h to prevent confusion with identical named ui_util.h in / dir
svn path=/trunk/; revision=15465
2005-08-20 12:09:48 +00:00
Guy Harris 4ddd504bb4 Move the stats.[ch] stuff into epan, so plugins can use it.
svn path=/trunk/; revision=15429
2005-08-19 10:00:14 +00:00
Guy Harris b2807e2ab6 Move the APIs for registering and processing "-z" command-line arguments
and "Statistics" menu items into "stat.h" and "stat.c", to separate them
from the core tapping APIs.  A tap could conceivably not register as a
"-z" command-line argument or "Statistics" menu item, and a stat could
conceivably not be implemented as a tap, and dissectors that implement
tapping points don't need the UI-related stuff from "stat.h", they just
want the tap-related stuff in <epan/tap.h>.

svn path=/trunk/; revision=15427
2005-08-19 09:29:41 +00:00
Guy Harris 5fb6e97fb4 Squelch more const warnings (and fix some memory leaks that found).
_U_-ify some unused arguments, rather than assigning them to themselves.

Un-constify one variable that gets assigned a mallocated pointer.

Clean up indentation.

svn path=/trunk/; revision=15236
2005-08-06 03:44:55 +00:00
Guy Harris 80c1907a36 Rename "register_ethereal_tap()" to "register_tap_listener_cmd_arg()" as
it's used to register a callback for a tap listener invoked if the
specified command line argument is specified to the "-z" flag.

Move it, along with routines to:

	look up a "-z" argument in the table constructed by
	"register_tap_listener_cmd_arg()" and either save the full
	argument to "-z" and the corresponding listener if it's found or
	return a failure indication if it isn't;

	list the available tap listeners;

	call the "init" routines for the tap listeners saved in the
	table above;

and have Ethereal and Tethereal use those routines.

svn path=/trunk/; revision=13993
2005-04-01 09:08:27 +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
Guy Harris 536718bb6c Fix the expansion of the top-level nodes in GTK+ 1.2[.x].
svn path=/trunk/; revision=13837
2005-03-20 23:28:36 +00:00
Luis Ontanon d4f461c418 Expand the root nodes by default
svn path=/trunk/; revision=13833
2005-03-20 21:48:11 +00:00
Guy Harris 976666eb49 The GTK+ 2.x version doesn't automatically expand the root node; don't
do so in the GTK+ 1.2[.x] version.

svn path=/trunk/; revision=13831
2005-03-20 20:27:51 +00:00
Guy Harris 0f39d86edf Make columns in the GTK+ 1.2[.x] version auto-resizing.
svn path=/trunk/; revision=13830
2005-03-20 19:51:09 +00:00
Guy Harris e859032069 Make the top-level node start out expanded in GTK+ 1.2[.x].
svn path=/trunk/; revision=13829
2005-03-20 19:44:19 +00:00
Guy Harris 612b5f4fc6 Do a GTK+ 1.2[.x] version.
Clean up indentation.

Put the members of the _stat_tree_columns enum in order by column number.

svn path=/trunk/; revision=13822
2005-03-20 11:39:14 +00:00
Luis Ontanon 000ce4f915 st->name was moved to st->cfg->name
svn path=/trunk/; revision=13821
2005-03-20 11:12:21 +00:00
Luis Ontanon 9e9a658369 There was a design flaw that caused a crash on windows and
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-03-20 00:19:15 +00:00
Ulf Lamping bcaacc0569 Use capitalized words for column headers
svn path=/trunk/; revision=13812
2005-03-19 18:13:09 +00:00
Ulf Lamping ed0cdf9eb7 Add a "Close" button, as not everyone uses a window manager providing the 'X' to close a window.
In addition, this enables the ESC key to close the window

Slightly increase the initial window size

svn path=/trunk/; revision=13810
2005-03-19 16:43:30 +00:00
Ulf Lamping 2f73c1d242 removed some MSVC compiler warnings, mostly I've casted "downsized function parameters"
svn path=/trunk/; revision=13684
2005-03-09 23:00:21 +00:00