Commit Graph

782 Commits

Author SHA1 Message Date
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
Guy Harris fb65eca073 Include <io.h>, if present, to get "_open()", "_close()", etc. declared.
svn path=/trunk/; revision=7312
2003-03-07 19:47:07 +00:00
Jörg Mayer d7bcd8e261 Declare f_tempname and r_tempname static
svn path=/trunk/; revision=7307
2003-03-07 01:18:21 +00:00
Guy Harris a7d60117c4 NO_DATA is apparently #defined by some header file when building with
MSVC++ on Windows - stick TAP_RTP_ in front of all the error enum
values, to avoid name collisions.

Do *NOT* allocate a zero-length array as an automatic variable,
especially if you're going to assign to the first element of that
array....

svn path=/trunk/; revision=7304
2003-03-07 00:03:47 +00:00
Guy Harris 60ab93fa97 Get rid of CRs.
Get rid of comments about the format string to use with guint16 and
guint32 - we're using the right string, which is neither "%lu" (as that
requires a 64-bit argument on platforms with 64-bit longs) nor "%d" (as
that expects a *signed* quantity, not an *unsigned* quantity), but "%u".

Protect the include of <unistd.h> with "#ifdef HAVE_UNISTD_H", as it's
not present on Windows if you're not building with a UNIXalike wrapper
library.

Use "wb", not "w", when creating binary files with "fopen()"; the "b" is
required on Windows.

Use O_BINARY when opening binary files, and #define it as 0 if it's not
defined; O_BINARY is required on Windows.

svn path=/trunk/; revision=7303
2003-03-06 23:09:09 +00:00
Guy Harris 4af8b71f79 Get rid of CRs.
svn path=/trunk/; revision=7301
2003-03-06 22:36:43 +00:00
Laurent Deniel 58a4a837e0 Move RTP Analysis to Statistics menu
(all taps should be located here especially
 very protocol specific ones)

svn path=/trunk/; revision=7299
2003-03-06 21:21:43 +00:00
Laurent Deniel d17a08f9cd - Protect tap_rtp.h against multiple inclusions
- Add $Id$ to tap_rtp.[hc]

svn path=/trunk/; revision=7298
2003-03-06 21:15:59 +00:00
Ronnie Sahlberg 05dad0c310 From Miha Jemec :
Functionality to reassemble a RTP stream and save it as a file.
Support for G.711 coded

svn path=/trunk/; revision=7297
2003-03-06 20:35:12 +00:00
Guy Harris 60de380663 From Devin Heitmueller: follow TCP Stream support for showing stream
data as C byte arrays.

svn path=/trunk/; revision=7291
2003-03-06 04:23:51 +00:00
Guy Harris ff1c297602 "gtk_box_pack_end()" expects a GtkBox, not a GtkContainer, as its first
argument.

svn path=/trunk/; revision=7289
2003-03-05 20:12:04 +00:00
Gerald Combs c0333e2784 Eliminate vertical padding in the IO Stat window.
svn path=/trunk/; revision=7286
2003-03-05 15:54:31 +00:00
Laurent Deniel 60c415087a - fix FAQ display (faq_help[] was not initialised before strcat
so random characters at first line display if not worst,
  finally remove this strcat stuff and directly call insert_text
  with each faq_part)

- add missing FAQ redraw in help_redraw

- put FAQ after Capture Filters to restore original order
  (i.e. Display near Capture Filters)

- udpate overview according to manual page

svn path=/trunk/; revision=7263
2003-03-03 21:59:42 +00:00
Guy Harris 300aa657cc Get rid of unneeded includes of "../ui_util.h".
svn path=/trunk/; revision=7257
2003-03-02 22:31:25 +00:00