Commit Graph

27 Commits

Author SHA1 Message Date
cmaynard 18355cb1bd From Cal Turney via bug 4964: Round & display 6 decimal places in tshark SRTs.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35537 f5534014-38df-0310-8fa8-9805f1628bb7
2011-01-14 17:06:53 +00:00
morriss 7922758c4a Remove unnecessary include: register.h
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34194 f5534014-38df-0310-8fa8-9805f1628bb7
2010-09-23 06:08:19 +00:00
stig 1bfb079484 Fix a possible dereference of null pointer.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30175 f5534014-38df-0310-8fa8-9805f1628bb7
2009-09-27 21:23:51 +00:00
guy fdaebbf497 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.


git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28645 f5534014-38df-0310-8fa8-9805f1628bb7
2009-06-05 22:42:47 +00:00
guy 68d9dc18a9 Use G_GINT64_MODIFIER rather than PRI[duox]64 to print gint64's and
guint64's.


git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23781 f5534014-38df-0310-8fa8-9805f1628bb7
2007-12-06 08:32:38 +00:00
morriss 964da9ce7f Wireshark now requires support for 64-bit types so there's no need to #ifdef
around them.  Print 64-bit types using the PRI macros; add inttypes.h to
tap.h (if necessary) to pick up those macros for all the taps.


git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21442 f5534014-38df-0310-8fa8-9805f1628bb7
2007-04-16 04:34:07 +00:00
gerald 05bc7d37bc Tethereal/tethereal -> TShark/tshark.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18268 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-31 17:38:42 +00:00
etxrab 88547059e5 Ethereal->Wireshark
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18235 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-28 20:28:20 +00:00
sahlberg 33270db64f name change
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18197 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-21 05:12:17 +00:00
lego 4cf0965e67 add an userdata argument to register_stat_cmd_arg() and its callback to use the callback for multiple registrations.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17252 f5534014-38df-0310-8fa8-9805f1628bb7
2006-02-11 13:05:24 +00:00
ulfl e7e62591fe EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry!
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-24 21:31:56 +00:00
guy 006cfcf692 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.


git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15483 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-20 20:06:05 +00:00
guy fafd13df75 Move the stats.[ch] stuff into epan, so plugins can use it.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15429 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-19 10:00:14 +00:00
guy f13dfe879e 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>.


git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15427 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-19 09:29:41 +00:00
ulfl d615067ecf various code cleanup:
-use g_snprintf instead of sprintf and snprintf
-use g_strdup_printf where appropriate
-remove #include "snprintf.h" (as only g_snprintf should be used)
-replace some more alloc/realloc/calloc/free with their glib pendants

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15264 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-08 18:50:39 +00:00
guy f026752489 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.


git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15236 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-06 03:44:55 +00:00
guy 6a33606bd0 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.


git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13993 f5534014-38df-0310-8fa8-9805f1628bb7
2005-04-01 09:08:27 +00:00
guy e363d0992e As we've made the tap_specific_data field of a tap_packet_t structure a
const pointer (so that we don't get complaints when we make the
tap-specific data argument to "tap_queue_packet()" a const pointer,
allowing dissectors to hand const data to a tap without a complaint), we
should make the tap per-packet function take a const pointer as an
argument as well.  Do so.

In some taps, use _U_, or actually use the argument, rather than
sticking in dummy "X = X" assignments to fake use of parameters.  (This
means that the tap functions in question no longer have the notion that
they act on a particular static structure wired in.)


git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12910 f5534014-38df-0310-8fa8-9805f1628bb7
2005-01-01 02:57:02 +00:00
guy 2cd9afcab8 Move the tap infrastructure to the epan directory.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12128 f5534014-38df-0310-8fa8-9805f1628bb7
2004-09-29 00:06:36 +00:00
gram 35a6e092c3 Move dissectors to epan/dissectors directory.
Also move ncp222.py, x11-fields, process-x11-fields.pl,
make-reg-dotc, and make-reg-dotc.py.

Adjust #include lines in files that include packet-*.h
files.


git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11410 f5534014-38df-0310-8fa8-9805f1628bb7
2004-07-18 18:06:47 +00:00
guy 0f43797234 Set the svn:eol-style property on all text files to "native", so that
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
2004-07-18 00:24:25 +00:00
sahlberg d15d3fb9c0 In rpc programs statistics, change RTT (RoundTripTime) to SRT
(ServiceResponseTime) since that is a more appropriate name for these stats.


git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10913 f5534014-38df-0310-8fa8-9805f1628bb7
2004-05-17 20:06:32 +00:00
guy ba91fe1919 Make "register_tap_listener()" return NULL on success and a "GString *"
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-23 08:20:06 +00:00
guy 9abce60635 Allow taps to have menu item registration routines; the menu item
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-23 03:51:03 +00:00
guy 8613ba388b From Ronnie Sahlberg: have a registration interface for tap listeners,
and generate the table of stuff to register from tap source files, so
Tethereal doesn't need to know what tap listeners exist.

Get rid of "tap-xxx.h" files, as they're now empty.

Add "tethereal-tap-register.c" to the .cvsignore file, as it's a new
generated file.

Update "Makefile.nmake" to generate "tethereal-tap-register.c".

Clean up "Makefile.am" and "Makefile.nmake" a bit.


git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6525 f5534014-38df-0310-8fa8-9805f1628bb7
2002-10-31 22:16:01 +00:00
guy 00c6d5b172 From Ronnie Sahlberg: pass a pointer to the epan_dissect_t for a packet
to taps.


git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6487 f5534014-38df-0310-8fa8-9805f1628bb7
2002-10-23 23:12:38 +00:00
sahlberg ef12a43092 New type of onc-rpc statistics.
try: -z rpc,programs


git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6190 f5534014-38df-0310-8fa8-9805f1628bb7
2002-09-05 09:27:56 +00:00