aboutsummaryrefslogtreecommitdiffstats
path: root/tap-iostat.c
AgeCommit message (Collapse)AuthorFilesLines
2009-10-19Made some functions static.stig1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30620 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-05Squelch a couple of Clang Static Analyzer warnings.gerald1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29304 f5534014-38df-0310-8fa8-9805f1628bb7
2009-06-05Have tap listeners specify whether the "packet" routine requiresguy1-6/+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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28645 f5534014-38df-0310-8fa8-9805f1628bb7
2009-03-12As suggested on wireshark-users, when using io,stat in tshark, make ansake1-7/+20
interval of 0 signify "all packets". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27715 f5534014-38df-0310-8fa8-9805f1628bb7
2008-03-02Rewrote to use g_strlcpy and g_strlcat.stig1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24531 f5534014-38df-0310-8fa8-9805f1628bb7
2008-02-03More rewrite of prohibited APIs (sprintf, strcpy, strcat).stig1-2/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24258 f5534014-38df-0310-8fa8-9805f1628bb7
2008-01-24Fixed some malloc -> g_malloc, free -> g_free, strdup -> g_strdup.stig1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24179 f5534014-38df-0310-8fa8-9805f1628bb7
2007-03-21fix MSVC warnings of / and set CFLAGS to block new warningsulfl1-4/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21098 f5534014-38df-0310-8fa8-9805f1628bb7
2007-01-18Add separate union entries to fvalue.value for signed and unsignedmartinm1-7/+23
32-bit numbers. Separate signed and unsigned accessors have been added and used where appropriate. Definitely not for 0.99.5. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20472 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-31Tethereal/tethereal -> TShark/tshark.gerald1-10/+10
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18268 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-28Ethereal->Wiresharketxrab1-10/+10
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18235 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-21name changesahlberg1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18197 f5534014-38df-0310-8fa8-9805f1628bb7
2006-02-11 add an userdata argument to register_stat_cmd_arg() and its callback to use ↵lego1-2/+2
the callback for multiple registrations. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17252 f5534014-38df-0310-8fa8-9805f1628bb7
2005-10-27Make the processing of "-z" arguments in the Tethereal I/O stat tap moreguy1-89/+102
like that of the Ethereal I/O stat tap. Improve error messages in both taps. Use nstime() routines and structure assignment to do operations on nstime_t values. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16346 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-24EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry! ulfl1-1/+1
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... git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15520 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-20Rename epan/stat.[ch] to epan/stat_cmd_args.[ch] - it only deals withguy1-1/+1
implementing the "-z" command-line arguments, it doesn't deal with *all* issues for stats. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15483 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-19Move the stats.[ch] stuff into epan, so plugins can use it.guy1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15429 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-19Move the APIs for registering and processing "-z" command-line argumentsguy1-1/+2
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>. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15427 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-06Last set of char -> const char trivial warning fixes.jmayer1-4/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15244 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-06Squelch more const warnings (and fix some memory leaks that found).guy1-3/+4
_U_-ify some unused arguments, rather than assigning them to themselves. Un-constify one variable that gets assigned a mallocated pointer. Clean up indentation. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15236 f5534014-38df-0310-8fa8-9805f1628bb7
2005-04-01Rename "register_ethereal_tap()" to "register_tap_listener_cmd_arg()" asguy1-1/+1
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13993 f5534014-38df-0310-8fa8-9805f1628bb7
2005-01-01Fix the signature of "iostat_packet()" - the pointer to data supplied byguy1-1/+1
the dissector is a const pointer. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12917 f5534014-38df-0310-8fa8-9805f1628bb7
2005-01-01Make the signatures of functions passed to "register_tap_listener()"guy1-4/+5
match what "register_tap_listener()" expects (rather than squelching warnings about the differences by casting function pointers to "void *"). Make static some functions not used outside the module in which they're defined. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12913 f5534014-38df-0310-8fa8-9805f1628bb7
2004-09-29Move the tap infrastructure to the epan directory.guy1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12128 f5534014-38df-0310-8fa8-9805f1628bb7
2004-07-18Set the svn:eol-style property on all text files to "native", so thatguy1-1/+1
they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11400 f5534014-38df-0310-8fa8-9805f1628bb7
2003-12-02From Didier Gautheron: put an "fvalue_t" structure into a "field_info"guy1-10/+10
structure, rather than separately allocating "fvalue_t"s and having the "field_info" structure point to them - this appears to speed up protocol tree construction a bit. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9146 f5534014-38df-0310-8fa8-9805f1628bb7
2003-04-29Fix display bug for interval. Interval was displayed as seconds and not insahlberg1-3/+3
ms units. Fix conversion bug when converting from float to integer. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7598 f5534014-38df-0310-8fa8-9805f1628bb7
2003-04-24Update to io-stat for tethereal.sahlberg1-57/+388
Make it able to calculate COUNT() SUM() MIN() MAX() and AVG() for integers and relative time fields. See tethereal manpage for examples. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7550 f5534014-38df-0310-8fa8-9805f1628bb7
2003-04-23Make "register_tap_listener()" return NULL on success and a "GString *"guy1-3/+8
referring to a GString containing an error message on failure, and don't have it print anything on failure. If it fails, have its Tethereal-tap callers print an error message before exiting, and have its Ethereal callers pop up a dialog box with the error (except in cases where the failure is guaranteed not to be the user's fault, and where we exit, in which case we just print an error message before we exit). In all cases, the error message includes the text of the GString. Fix a scanf format string in the DCE RPC statistics Ethereal tap, so that it properly skips the comma before the filter string. Fix some Ethereal error messages not to say "tethereal". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7542 f5534014-38df-0310-8fa8-9805f1628bb7
2003-04-23Allow taps to have menu item registration routines; the menu itemguy1-2/+2
registration routines, for taps with menu items (taps that can be run from the "Tools->Statistics" menu), create the menu item for the tap. "make-tapreg-dotc" constructs a "register_all_tap_menus()" function that calls all the tap menu item registration routines it finds, and Ethereal calls that routine after the main window has been constructed (so that the main menu exists, as the menu items are added to it). (Tethereal doesn't call it.) Get rid of the "menu" and "menu_init" arguments to "register_ethereal_tap"; the menu item is registered in the tap's menu item registration routine, not in its main registration routine. Have the RTP GUI tap register its menu item that way, rather than by having it compiled into "gtk/menu.c". (We're not ready yet to have taps whose menu items are under a submenu register themselves in that fashion, as "register_tap_menu_item()" can't yet create submenus.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7540 f5534014-38df-0310-8fa8-9805f1628bb7
2003-04-22Update to the io,stat tethereal tap.sahlberg1-12/+22
Make it possible to use subsecond granularity for the measurement intervals. io,stat is updated to accept the interval to be specified with ms resolution. Example -z io,stat,0.001,smb to generate 1ms statistics for all SMB traffic. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7527 f5534014-38df-0310-8fa8-9805f1628bb7
2002-11-15Gtk1 version of io-statsahlberg1-7/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6636 f5534014-38df-0310-8fa8-9805f1628bb7
2002-11-01Use "strchr()", not "index()"; MSVC++ doesn't declare "index()" orguy1-3/+3
"rindex()" if you include <string.h>, and they're non-standard routines (the ANSI C names for those functions are "strchr()" and "strrchr()"). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6538 f5534014-38df-0310-8fa8-9805f1628bb7
2002-11-01New tap for tethereal: io statistics that provides frames/bytes counts for ↵sahlberg1-0/+313
frames matching user specified filters. Try it with -z io,stat,1,nfs,smb,arp on a capture containing both nfs, cifs and arp traffic. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6531 f5534014-38df-0310-8fa8-9805f1628bb7