Commit Graph

68 Commits

Author SHA1 Message Date
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
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
Gerald Combs 79ef36a5f0 Fix some scan-build warnings.
Fix a modeline while we're at it.

Change-Id: Ief6d5edbe33456170059cfab4f436f0844de32a1
Reviewed-on: https://code.wireshark.org/review/440
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-03-01 19:15:38 +00:00
Bill Meier 11b5c15fdb Remove trailing whitespace
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>
2014-02-25 20:46:49 +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
Jakub Zawadzki 3ae2e5ece2 Fix warnings
svn path=/trunk/; revision=53885
2013-12-09 20:15:47 +00:00
Alexis La Goutte 006f84a565 From Deon van der Westhuysen via 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-08 11:09:54 +00:00
Jakub Zawadzki c193f9c9e4 Use strutil xml_escape() function
svn path=/trunk/; revision=53832
2013-12-07 19:46:05 +00:00
Guy Harris 55544b5c39 Get rid of a stray semicolon, as it upsets Sun^WOracle Studio's C
compiler.

Clean up escape_xml_chars() a bit, so that there's no extra unreached
"return s;", and so that it's clearer that it runs until it hits a NUL. 
(XXX - are there GLib routines that will do this?)

svn path=/trunk/; revision=53716
2013-12-02 09:30:31 +00:00
Michael Mann 0c9aa51ec5 Patch to include YAML export. Bug 9452 (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-12-01 15:44:22 +00:00
Michael Mann ac9b982868 Better fix for uninitialized variable warning. Part of bug 9452 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9452)
From Peter Wu.
From me: Leave the "result" variable initialized because I'm not sure code analyzers will consider g_assert_not_reached() enough prevention from using uninitialized "result"

svn path=/trunk/; revision=53679
2013-11-30 21:00:21 +00:00
Pascal Quantin 021efe411c Try to please GCC 4.3.2
svn path=/trunk/; revision=53675
2013-11-30 12:31:36 +00:00
Guy Harris 216f631e8a Casts required from void * in C++.
svn path=/trunk/; revision=53664
2013-11-30 00:05:24 +00:00
Guy Harris 1d80b1e16c Constify to squelch some warnings.
svn path=/trunk/; revision=53663
2013-11-30 00:02:46 +00:00
Guy Harris 52cfff996e Squelch some "use parentheses" warnings.
Use tab indentation uniformly.

svn path=/trunk/; revision=53662
2013-11-29 23:57:23 +00:00
Guy Harris 488e61fea0 Rename variable to avoid collisions with standard function names.
Use the st_format_type type.

svn path=/trunk/; revision=53661
2013-11-29 23:54:12 +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
Gerald Combs ea28298e96 Add a statistics tree dialog.
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-11-21 01:28:17 +00:00
Jakub Zawadzki ae59b09443 Add missing includes in order to remove exceptions.h from proto.h (next commit).
svn path=/trunk/; revision=53230
2013-11-10 15:59:37 +00:00
Michael Mann 2657071e88 Don't allow invalid ranges to be specified for the stats tree. Bug 9130 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9130)
Not sure which memory allocation should be used here (using wmem caused crash), but this revision can at least be easily backported to 1.10 where the bug was reported.

Also allow a single number to be used in the stats range since it's considered a valid "range" by the UAT.

svn path=/trunk/; revision=52679
2013-10-18 21:17:01 +00:00
Guy Harris 34108edbd1 Get rid of -Wshadow warning - I guess we're including something that
gets <getopt.h>, so we get the optarg global.

svn path=/trunk/; revision=51348
2013-08-14 00:41:02 +00:00
Jakub Zawadzki c702e92121 Replace relative timestamp with reference frame number. Saves 16B per frame.
svn path=/trunk/; revision=50772
2013-07-21 23:07:33 +00:00
Anders Broman 27744ecc2d From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48337
2013-03-16 08:12:29 +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
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
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-26 05:57:06 +00:00
Jeff Morriss 3729335973 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45016
2012-09-20 01:48:30 +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
Gerald Combs a6bbdaa849 Fix some dead code and zero division issues found by Clang scan-build.
In convert_string_case() use g_utf8_strup() instead of converting each
character by hand. Hopefully this won't cause any unexpected changes in
behavior.

svn path=/trunk/; revision=36006
2011-02-18 22:43:48 +00:00
Guy Harris 285cd1fec7 Constify an argument.
svn path=/trunk/; revision=32303
2010-03-26 23:40:48 +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
Gerald Combs f0eeb0bdf1 More size_t fixes. Use a string buffer in range.c.
svn path=/trunk/; revision=27999
2009-04-08 16:50:20 +00:00
Stig Bjørlykke 62f60df6b4 From Jakub Zawadzki (bug 3331):
g_free() is NULL safe, so we don't need check against it.

svn path=/trunk/; revision=27718
2009-03-13 22:06:48 +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 c50b4aec09 More (mostly stats tree) unsigned->signed char cleanup
svn path=/trunk/; revision=25717
2008-07-12 01:48:24 +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
Anders Broman 9cc9c92e75 Fix some of the Errors/warnings detected by checkapi,
make non ASCII char a warning for now.

svn path=/trunk/; revision=25240
2008-05-05 20:38:27 +00:00
Stephen Fisher 726a1caaf1 - Remove GLIB1 code
- Change ugly GLIB version checking statements to GLIB_CHECK_VERSION
- Remove ws_strsplit files because we no longer need to borrow GLIB2's
  g_strsplit code for the no longer supported GLIB1 builds


svn path=/trunk/; revision=24829
2008-04-07 05:22:54 +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 46b8669566 Fix a bunch more warnings. Add -Werror when using --with-warnings-as-errors
under gcc to tools/lemon, plugins/mate and epan/


svn path=/trunk/; revision=21204
2007-03-26 06:10:52 +00:00
Stephen Fisher 0ebc01dc03 From Sebastien Tandel:
Create two new files (ws_strsplit.[ch]) that use GTK2 code to override
the buggy g_strsplit() function when compiling for GTK1.  Include this
work-around function (ws_strsplit) in libwireshark.def.  Add notes on usage
to README.developer.  Include epan/ws_strsplit.h in all files that use
g_strsplit().


svn path=/trunk/; revision=20804
2007-02-13 20:57:22 +00:00
Stephen Fisher d39a4f7aa7 From Sebastien Tandel:
patch against a crash of wireshark with gtk1.2 when using packet
length statistics window.  The crash was due to a difference of
implementation of g_strsplit between gtk1.2 and gtk2.


svn path=/trunk/; revision=20518
2007-01-21 22:45:58 +00:00
Gerald Combs 8958bab6de Tethereal/tethereal -> TShark/tshark.
svn path=/trunk/; revision=18268
2006-05-31 17:38:42 +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
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
Lars Roland 1816f28559 Fix a possible NULL pointer dereference (coverity bug id 32)
svn path=/trunk/; revision=17497
2006-03-07 14:44:25 +00:00
Guy Harris b95c767299 Get rid of unused function.
svn path=/trunk/; revision=16600
2005-11-26 03:08:17 +00:00
Luis Ontanon 925dd72039 one leak less...
svn path=/trunk/; revision=16046
2005-09-28 21:33:44 +00:00