Commit Graph

30 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
Bill Meier 224b638586 #include <emem.h> not req'd
svn path=/trunk/; revision=26093
2008-08-26 02:38:57 +00:00
Stig Bjørlykke 47d744b59d More rewrite of prohibited APIs (sprintf, strcpy, strcat).
svn path=/trunk/; revision=24258
2008-02-03 15:38:20 +00:00
Guy Harris 924c1bbf71 Use G_GINT64_MODIFIER rather than PRI[duox]64 to print gint64's and
guint64's.

svn path=/trunk/; revision=23781
2007-12-06 08:32:38 +00:00
Jeff Morriss 1295039ee9 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.

svn path=/trunk/; revision=21442
2007-04-16 04:34:07 +00:00
Ronnie Sahlberg 5d045b15d9 include emem
svn path=/trunk/; revision=18510
2006-06-18 05:39:49 +00:00
Gerald Combs 8958bab6de Tethereal/tethereal -> TShark/tshark.
svn path=/trunk/; revision=18268
2006-05-31 17:38:42 +00:00
Anders Broman f68d6e4c8c Ethereal->Wireshark
svn path=/trunk/; revision=18235
2006-05-28 20:28:20 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Luis Ontanon fcf7b3789c add an userdata argument to register_stat_cmd_arg() and its callback to use the callback for multiple registrations.
svn path=/trunk/; revision=17252
2006-02-11 13:05:24 +00:00
Guy Harris ab2dca9114 Move some headers for stuff defined by a dissector into epan/dissectors
- and rename smb.h to packet-smb.h, as it's packet-smb.c's header file.

svn path=/trunk/; revision=15845
2005-09-17 00:31:15 +00:00
Guy Harris b7b80d94be Move a pile of protocol-related headers from the top-level source
directory to the epan directory.  Some of them should perhaps ultimately
be moved to epan/dissectors, if they pertain only to stuff exported by a
particular dissector.

Fix Gerald's e-mail address in files we're moving.

svn path=/trunk/; revision=15844
2005-09-17 00:02:31 +00:00
Ulf Lamping 6f43fbb2f0 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...

svn path=/trunk/; revision=15520
2005-08-24 21:31:56 +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
Guy Harris e5c09b21aa Use get_timedelta() to get the difference between two times.
svn path=/trunk/; revision=15455
2005-08-20 02:15:02 +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
Gerald Combs 83f3aa6e08 Add an extra_info_type field to smb_extra_info_t so that we can make
sure we're not referencing a fid when we think we're referencing an
smb_nt_transact_info_t pointer.  (A fuzzed capture I have triggers
this behavior).


svn path=/trunk/; revision=14107
2005-04-16 21:54:32 +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
Lars Roland f3294ee49a change nmake makefiles in /trunk and /trunk/epan so that
object code for libethereal.dll isn't generated by the
makefile in /trunk.

Having no code in /trunk linked into libethereal.dll
anymore, the definition of the macro _NEED_VAR_IMPORT_
can be moved from various source files in /trunk to /trunk/Makefile.nmake .
So do that, too.

svn path=/trunk/; revision=13389
2005-02-13 00:10:15 +00:00
Guy Harris 71217a8007 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.)

svn path=/trunk/; revision=12910
2005-01-01 02:57:02 +00:00
Guy Harris 6472876ab3 Move the tap infrastructure to the epan directory.
svn path=/trunk/; revision=12128
2004-09-29 00:06:36 +00:00
Guy Harris 8a8b883450 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.

svn path=/trunk/; revision=11400
2004-07-18 00:24:25 +00:00
Guy Harris 15af0f656f From Lars Roland: add support for building a libethereal.dll with MSVC:
add a config.nmake option to control whether to build
	libethereal.dll or not;

	remove "./wiretap" from PATH to prevent problems due to
	wrongly-loaded files;

	build dissector.lib with MSVC;

	move "print.c" and "ps.c" to the dissector helpers, as "print.c"
	imports variables from packet-frame.c and packet-data.c, which
	are in libethereal;

	move "g711.c" out of the dissector helpers, as they're used only
	by Ethereal in a tap, not in Tethereal or in any dissector;

	add a .def file for libethereal;

	arrange to declare global variables exported from libethereal
	with "__declspec(dllimport)" when building programs that import
	those variables;

	update the NSIS installer.

Make the "configure" script define ETH_VAR_IMPORT as "extern".

svn path=/trunk/; revision=10834
2004-05-09 10:03:41 +00:00
Ronnie Sahlberg 8b7b1ff28e Update to SMB service response time stats.
For short packets, we might not have enough of the payload to decode
the transaction info levels  and thus that data structure is NULL.

check the pointer to this struct first before we try to dereference it.

svn path=/trunk/; revision=8558
2003-09-28 00:00:36 +00:00
Guy Harris c1b7eb399a From Lars Roland:
Filter dialog for the MGCP statistics tap.

	Routines for building GUI table displays for statistics taps.

	Use the timestats.c routines in the SMB statistics tap.

svn path=/trunk/; revision=7561
2003-04-25 20:54:18 +00:00
Guy Harris 1b872b3648 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".

svn path=/trunk/; revision=7542
2003-04-23 08:20:06 +00:00
Guy Harris 4cfd8b0f36 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.)

svn path=/trunk/; revision=7540
2003-04-23 03:51:03 +00:00
Ronnie Sahlberg 87c67ddce1 New files for the SMB RTT statistics feature
svn path=/trunk/; revision=6967
2003-01-22 00:42:05 +00:00