Commit Graph

795 Commits

Author SHA1 Message Date
Guy Harris 33bdfd46d7 From Lars Roland: load WinPcap *before* constructing the information
about library versions.

svn path=/trunk/; revision=7964
2003-07-04 23:50:10 +00:00
Ronnie Sahlberg e7e3fd7682 From Ian Schorr, limit the size of the (INFO) columns to prevent it from becoming
thousands of pixels wide.

Temporary fix until someone perhaps gets rid of the autoresize of columns completely.

svn path=/trunk/; revision=7947
2003-06-28 21:46:08 +00:00
Ronnie Sahlberg 2c95c28f0e Service Response Time measurements and statistics for Fibre Channel
svn path=/trunk/; revision=7932
2003-06-25 11:15:34 +00:00
Laurent Deniel 0afce7ca81 Ringbuffer rework.
Almost completely rewritten in order to:

- be able to use a unlimited number of ringbuffer files

  0 specified with -b argument or in the GUI, means that the number of file
  is unlimited.

  else the maximum number of ring buffer files is arbitrarily set to 1024.

- close the current file and open (truncating it) the next file at switch

- set the final file name once open (or reopen)

- avoid the deletion of files that could not be truncated (can't arise now)
  and do not erase empty files

The idea behind that is to remove the limitation of the maximum # of
ringbuffer files being less than the maximum # of open fd per process
and to be able to reduce the amount of virtual memory usage (having only
one file open at most) or the amount of file system usage (by truncating
the files at switch and not the capture stop, and by closing them which
makes possible their move or deletion after a switch).

svn path=/trunk/; revision=7912
2003-06-22 16:09:04 +00:00
Gerald Combs c150ac467b From Lars Roland: Fix the service response time functions to work with GTK2.
svn path=/trunk/; revision=7911
2003-06-22 04:00:21 +00:00
Guy Harris 7af67bda82 "gtk_window_set_default_size()" takes a GtkWindow *, not a GtkWidget *,
as its first argument.

svn path=/trunk/; revision=7909
2003-06-21 09:50:19 +00:00
Ronnie Sahlberg 8165fcdfe8 Cosmetic bug.
When creating a new CList to display SRT stats,  make the DECEND arrow for
the second column be displayed since this is how the table will be sorted
by default

svn path=/trunk/; revision=7908
2003-06-21 06:45:49 +00:00
Ronnie Sahlberg b04d1323fc Update SMB statistics tap to use the new CList helper routines.
svn path=/trunk/; revision=7907
2003-06-21 06:40:48 +00:00
Ronnie Sahlberg 99addd9f7a Make the default sorting for the list be column 2 in descending order so we
get the rocedures with the most number of calls at the top.

Fix a bug added in previous checkin.
When the table can be sorted in different ways than just the procedure number sorted in ascending order, the row for a specific procedure may change everytime we drawi/sort the table.
Add code to keep track of which row a procedure is currently positioned at in the list so that we statistics are added to the correct entry.

svn path=/trunk/; revision=7906
2003-06-21 05:57:34 +00:00
Ronnie Sahlberg f97314ba3d Update the ServiceResponseTime helper routines so that the columns
can be sorted.

"borrowed" lots of code for this from gtkclist.c

Columns 0,1  sort in ascending order by default
Columns 2-5 sort in ascending order by default

svn path=/trunk/; revision=7905
2003-06-21 05:39:45 +00:00
Ronnie Sahlberg 76a6027bf6 Update ONC-RPC response time tap to use the new helper function
that displays the data using a CList.

Renamed RTT to SRT (Service Response Time)

svn path=/trunk/; revision=7904
2003-06-21 03:24:06 +00:00
Ronnie Sahlberg dea1a0a6e4 Break out the code for the ahndling of the Service Response Time (formerly known as RoundTripTime) table and change the table into a scrollable
CList.

As a first conversion to use the helper routines, convert DCERPC SRT statistics to use the new interface.
This prevents some interfaces (SAMR/LSA) that contains a huge number of procedures from creating a huge table that does not fir on the screen.

Later changes to the helpers may be to make the different columns sortable
or to hide those procedures that has not been seen in the capture.

svn path=/trunk/; revision=7903
2003-06-21 01:42:46 +00:00
Guy Harris 71424053cd Define GLIB_CFLAGS and GTK_CFLAGS variables in config.nmake (based on
variables the user configures - the user isn't expected to change
GLIB_CFLAGS or GTK_CFLAGS, and there's a comment nothing that users
shouldn't have to do so), which contain the appropriate "/I" flags for
building stuff that requires only GLib, and stuff that required GTK+ and
GLib, respectively, and use those macros in the Makefile.nmake files.

svn path=/trunk/; revision=7884
2003-06-14 20:36:04 +00:00
Guy Harris ecf87b705c Clean up the usage message a bit (using the convention, adhered to by at
least some UNIX utilities, of listing all the flags with no arguments in
a single lump, and then listing the ones with arguments individually;
also, make lines as long as possible, as long as they fit in 80 columns).

svn path=/trunk/; revision=7815
2003-06-09 07:54:11 +00:00
Olivier Abad c4c4bb0d1a Add a "--enable-threads" option, which allows to build the gtk+ v2
ethereal with or without threads. The default is to use threads.
(see http://www.ethereal.com/lists/ethereal-dev/200210/msg00111.html and
http://www.ethereal.com/lists/ethereal-dev/200306/msg00061.html).

svn path=/trunk/; revision=7807
2003-06-08 09:12:23 +00:00
Gerald Combs 578640772d Use freopen() instead of worrying about whether a particular FILE pointer is
NULL.

svn path=/trunk/; revision=7754
2003-05-28 01:09:57 +00:00
Gerald Combs 5f289be167 Make the RTP tap analysis code use create_tempfile() instead of tmpnam().
svn path=/trunk/; revision=7748
2003-05-27 01:40:30 +00:00
Guy Harris 3d65182245 From Miha Jemec: clean up and simplify the RTP dissector and tap code.
svn path=/trunk/; revision=7701
2003-05-20 21:22:59 +00:00
Guy Harris 2689d287d4 Squelch some compiler complaints.
svn path=/trunk/; revision=7682
2003-05-16 00:48:26 +00:00
Laurent Deniel 3070b797d5 Implement a ring buffer switch duration:
when the new "Rotate capture file every n second(s)" checkbox or the
-b <# of file>[:<duration>] argument are used, [t]ethereal will skip to the
next ring buffer file if the specified duration has elapsed (even if the
specified capture size is not reached). This is useful when you want to have
separate capture files per hour or day for instance.

I let the autostop filesize parameter mandatory (i.e. the "rotate capture
file after n kilobytes") but this could be no longer strictly necessary when
that new feature is used ...

Another point: it might be interesting to really truncate the file at the
switch and not the closure ... According to user comments and my own real
case tests, I might plan to enhance this point and others (still ring buffer
related) in the future.

svn path=/trunk/; revision=7678
2003-05-15 13:40:20 +00:00
Guy Harris e1647e4504 From Richard Urwin:
add support for a system-wide color filter file;

	fix a bug where "read_filters()" didn't close the file handle.

Use the "get_datafile_path()" routine he added to construct the pathname
of the Diameter directory, the global preferences file, and the manuf
file.

svn path=/trunk/; revision=7677
2003-05-15 07:44:54 +00:00
Gerald Combs 1d9b54fc07 Add support for asynchronous DNS updates using the GNU ADNS library.
Support can be enabled at configure time by using "--with-adns=DIR".
If support is enabled, async queries happen whenever host name resolution
is enabled.  Do we need a separate preference for async queries?

Currently, only IPv4 reverse queries are supported.  I can add IPv4 forward
lookup support, but I don't have any way to test IPv6 queries.

svn path=/trunk/; revision=7640
2003-05-04 18:50:56 +00:00
Guy Harris ca318813a4 Rename "proto_alloc_dfilter_string()" to
"proto_construct_dfilter_string()", to more accurately reflect what it
does.

Give it, and "proto_can_match_selected()", an "epan_dissect_t *"
argument, which replaces the raw data pointer argument to
"proto_construct_dfilter_string()".

For fields that don't have a type we can directly filter on, we don't
support filtering on the field as raw data if:

	the "epan_dissect_t *" argument is null;

	the data source tvbuff for the field isn't the tvbuff for the
	"epan_dissect_t" in question (i.e., it's in the result of a
	reassembly, and "frame[N:M]" can't get at it).

Trim the length the raw data in the case of such a field to the length
of the tvbuff for the "epan_dissect_t" in question, so we don't go past
it.  Fetch the raw data bytes to match from that tvbuff.

Have "proto_construct_dfilter_string()" return a null pointer if it
can't construct the filter string, and have "protocolinfo_packet()" in
the tap-protocolinfo tap ignore a field if
"proto_construct_dfilter_string()" can't construct a filter string for
it - and have it pass NULL as the "epan_dissect_t *", for now.  If
somebody decides it makes sense to dump out a "frame[N:M] =" value for
non-registered fields, it can be changed to pass "edt".

svn path=/trunk/; revision=7635
2003-05-03 00:48:37 +00:00
Guy Harris 03446b0756 From Lars Roland: add routines to use when creating statistics windows
(at least with GTK+ 1.2[.x]), and make the MGCP statistics routine use
them.  The routines use a GtkCList and make it scrollable.

svn path=/trunk/; revision=7586
2003-04-27 21:50:59 +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 cbb30c24ed Fix a compiler warning.
svn path=/trunk/; revision=7556
2003-04-25 05:50:20 +00:00
Guy Harris 8db1b28e8d Fix a comment.
svn path=/trunk/; revision=7554
2003-04-24 23:18:07 +00:00
Guy Harris 8efc6912ef Make the dialog box "transient for" the main window, as we do with other
pop-up dialogs.

If thee's already one such dialog, and the user asks for another one,
reactivate the old one (so it gets un-minimized if necessary), don't
just raise it.

Put the "Create Stat" button in a box, so it doesn't widen to the full
width of the window, and add a "Cancel" button to dismiss the dialog
box.

Arrange that <ESC> dismisses the dialog box, and that typing <Enter> in
the filter dialog box activates the dialog box.

svn path=/trunk/; revision=7553
2003-04-24 23:17:43 +00:00
Guy Harris 5f13ab0115 From Didier Gautheron: the files being processed by make-tapreg-dotc are
in srcdir, not top_srcdir.

svn path=/trunk/; revision=7551
2003-04-24 18:30:52 +00:00
Laurent Deniel f8a077d10b Change copyright date to 2003.
svn path=/trunk/; revision=7545
2003-04-23 20:51:57 +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 81ebec370d Have "register_tap_menu_item()" create submenus as necessary for a menu
item.

Convert all Ethereal (GUI) taps to use "register_tap_menu_item()" rather
than having hardcoded menu items in "gtk/menu.c".

svn path=/trunk/; revision=7541
2003-04-23 05:37:23 +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
Guy Harris 6b0b09b402 Add a routine to create a new menu item under "/Tools/Statistics" for
taps.  (It has to be called after we've created the main menu, but GUI
taps are registered before that so that they can be referred to by
command-line arguments, so that routine will only be usable if we have a
"register menu item" routine for all GUI taps.)

Disable the entire "/Tools/Statistics/MGCP" menu item, not just the
"RTD" item under it, if we don't have an "mgcp" tap.

svn path=/trunk/; revision=7539
2003-04-23 03:13:16 +00:00
Ronnie Sahlberg 16e3a6ce6e Update to smb rtt stat for ethereal so that we can provide a filter for which
packets we have data.

Similar to oncrpc rtt stats smb rtt stats will also open a small window
where a filter string can be specified.
Only those packets matching the filter will be considered in calculating
the rtt statistics.

svn path=/trunk/; revision=7528
2003-04-22 09:30:59 +00:00
Guy Harris 7d29272f54 The main menu "/Display/{Match,Prepare}" menu items, and the tree view
"{Match,Prepare}" pop-up menu items, should be enabled only if we have a
field selected.

The main menu item "/Tools/Statistics" should be enabled only if we have
a capture.

The packet list "Show Packet In New Window" pop-up menu item should be
enabled only if there's a packet selected.

svn path=/trunk/; revision=7523
2003-04-22 04:49:17 +00:00
Guy Harris 3a4644bf42 "gtk_item_factory_get_widget()" returns, for a menu item with a submenu,
the submenu widget, not the menu item widget.  For items with submenus,
set the sensitivity on the menu item widget, not the submenu widget, so
that the menu item is grayed out when not sensitive.

svn path=/trunk/; revision=7522
2003-04-22 04:02:49 +00:00
Guy Harris 5b8500241e Have "set_menu_sensitivity()" take, as an argument, a pointer to the
GtkItemFactory for the item it's modifying, with NULL meaning "all
pop-up menus".  Use the full path for the menu item in all such calls;
have separate calls for the main menu item and pop-up menu items as
necessary.

svn path=/trunk/; revision=7521
2003-04-22 00:16:58 +00:00
Guy Harris ee1bc75c1b From Brad Hards: don't mention the "Add Expression" button in the
message box popped up if you try to add a new capture filter but haven't
specified a filter name or string, as there is no such button for
capture filters.

svn path=/trunk/; revision=7517
2003-04-21 19:43:44 +00:00
Guy Harris 7ddca7ecaf From Lars Roland:
Add Response-Time statistics for each known mgcp message-type.

	Fix a few bugs and remove trailing whitespace.

	Use "gdouble" for printing time-values and calculating the
	average.  It is easier to use and shouldn't overflow on big
	trace files like "guint32".

	Move some functions for time statistics into the new file
	timestats.c in the main directory.  This code may be useful in
	the rpc and smb rtt-taps as well.

svn path=/trunk/; revision=7469
2003-04-16 07:25:12 +00:00
Guy Harris 2678786425 Pull the stuff done in "dissect_packet()" to initialize a column_info
structure into its own routine; rename "col_init()" to "col_setup()",
and call the new routine "col_init()".

svn path=/trunk/; revision=7467
2003-04-16 05:55:41 +00:00
Guy Harris 24ec2110d1 Add the notion of a "fence" to columns. A dissector can set the fence
to "protect" what's currently in the column, so that attempts to clear
the column will only clear stuff after the fence and attempts to
overwrite the column will append stuff after the fence.  This, for
example, allows a dissector to arrange that the Info column contain
information for its protocol and for protocols running atop it.

svn path=/trunk/; revision=7466
2003-04-16 04:52:55 +00:00
Guy Harris d9cc10f2f5 From emre: add a "Filter out this stream" button to the "Follow TCP
Stream" window, which adds "and !(<filter for the stream>)" to the
display filter in effect before the stream was followed, removing that
stream from the display.

svn path=/trunk/; revision=7408
2003-04-06 22:41:34 +00:00
Guy Harris ab84d8be6e Change the version messages to put the "compiled with" stuff on a
separate line, and to put the "running with" info on a separate line
from that, to make the output narrower.

svn path=/trunk/; revision=7344
2003-03-12 00:07:46 +00:00
Guy Harris 50899dad38 When registering a string preference, if the value of the preference is
NULL, convert it to a copy of a null string, otherwise replace it with a
copy of the string, so that we know that the variable for the preference
always points to a string that can be freed.

That also obviates the need to worry about a null-pointer value for a
preference variable when checking to see whether a preference has changed.

When checking for a string preference not being set, check for an empty
string, not a null pointer - the above code turns null pointers into
pointers to empty strings, *and* the GUI code does (and always did!) the
same.

svn path=/trunk/; revision=7343
2003-03-11 23:14:42 +00:00
Ronnie Sahlberg 88959c985c Fixed two small bugs in tap_rtp.c
1, specify a tap filter that ignores all ICMP packets
2, specify a tap filter that only matches the same conversation ip/udp
as the selected packet.

svn path=/trunk/; revision=7341
2003-03-11 08:46:26 +00:00
Guy Harris 2a848c34ad Have the "Save voice data as..." button in the RTP analysis dialog box
pop up a file selection box with the save options, rather than a dialog
box with the save options, a file name, and a button to click to get the
file selection box.

svn path=/trunk/; revision=7331
2003-03-10 02:09:29 +00:00
Jörg Mayer 9281a04064 Pointer <--> int converions cause warnings on ia64.
Modified a patch originally contained in the SuSE distro
to do the conversions via glib macros.

svn path=/trunk/; revision=7330
2003-03-10 02:06:33 +00:00
Guy Harris 170b5028e9 Put the code to get version numbers of various libraries with which
Ethereal/Tethereal was linked into a common routine, and use that in
both Ethereal and Tethereal.

Add to that routine code to get OS version information.

svn path=/trunk/; revision=7320
2003-03-08 07:00:48 +00:00
Gerald Combs 40606a6ed2 Add an average packet size, as suggested by Daniel Jackson.
svn path=/trunk/; revision=7313
2003-03-07 20:27:02 +00:00