Commit Graph

551 Commits

Author SHA1 Message Date
Ulf Lamping e26fa0cbbb bugfix to a bug reported by dave.nicoson@thomson.net:
if reopening the capture options dialog, use the same values as before and
don't mess them caused by the units used.

svn path=/trunk/; revision=11283
2004-06-30 17:53:52 +00:00
Ulf Lamping 24527148ab close temporary merge output file, if merging failed
svn path=/trunk/; revision=11275
2004-06-30 05:49:30 +00:00
Ulf Lamping 19c7f04794 avoid using tmpnam() for security reasons.
instead of giving the merge stuff a filename,
give it an already opened file descriptor

svn path=/trunk/; revision=11273
2004-06-29 20:59:24 +00:00
Jörg Mayer 4bbb32eaaa The patch to fix the race condition introduced by using tmpnam replaced
insecure code by not-working code.  As I currently lack the time to fix
this properly until Monday as the earliest possible date I undo the patch.

Please note that Ethereal should not be used on multiuser systems with
untrusted users until a proper fix has been applied.

svn path=/trunk/; revision=11263
2004-06-29 03:27:52 +00:00
Jörg Mayer 0195deceae tmpnam() really should not be used for security reasons.
Replace it where used and update README.developer accordingly.

svn path=/trunk/; revision=11235
2004-06-25 07:04:03 +00:00
Ulf Lamping 5c061e582e if more than one file is (drag and) dropped into the program,
merge them together into a new temporary file
(and notice the user by a simple_dialog about it)

svn path=/trunk/; revision=11205
2004-06-21 16:45:07 +00:00
Ulf Lamping c5bae1f7e3 preference setting, so "ask for unsaved capture files" can be switched off
svn path=/trunk/; revision=11196
2004-06-20 15:57:11 +00:00
Ulf Lamping 17ca623b0f preference setting for the option to "avoid" the capture info dialog
svn path=/trunk/; revision=11195
2004-06-20 14:48:24 +00:00
Ulf Lamping 7e8187df20 added an option to "avoid" the capture info dialog completely.
This matters for "update of list in real time" (sync_mode) only,
as in normal mode you wouldn't otherwise have the possibility
to stop the capture.

svn path=/trunk/; revision=11194
2004-06-20 13:39:44 +00:00
Ulf Lamping 25e6749eb4 move font related stuff to new file font_utils.c/.h
do some font related renaming/code cleanup

svn path=/trunk/; revision=11166
2004-06-17 16:35:26 +00:00
Guy Harris f9be24cd13 On Windows, if "get_interface_list()" returns CANT_GET_INTERFACE_LIST
and the error message includes "Not enough storage is available
to process this command" or "The operation completed successfully",
suggest that the user install a WinPcap version later than 3.0 - this is
definitely a Frequently Asked Question on the Ethereal list.

svn path=/trunk/; revision=11143
2004-06-12 07:47:14 +00:00
Ulf Lamping 14bf83c340 add details for doxygen, various code cleanups as a result of this
svn path=/trunk/; revision=11052
2004-06-01 17:33:37 +00:00
Ulf Lamping 01c236864a next step to save the size and postition of the dialogs (using a hashtable)
move the get/set window size functionality from main to ui_util,
add some functions to handle windows/dialogs.

changed help and about dialog to suit the current window API

svn path=/trunk/; revision=10974
2004-05-23 17:37:36 +00:00
Guy Harris 88d2d10fb4 Don't put a newline at the end of the compiled-with version information
- we don't put it at the end of the run-time version information.

Add newlines into formats used with that information where appropriate
(the "About" dialog box already had a newline in the format).

svn path=/trunk/; revision=10950
2004-05-22 04:15:01 +00:00
Guy Harris 6e014216a9 Tag unused parameters with _U_ to squelch GCC compiler warnings (they're
GTK+ callbacks so we don't get to change the calling sequence).

svn path=/trunk/; revision=10934
2004-05-21 00:18:46 +00:00
Ulf Lamping ad85db871f moved the about dialog from main.c to it's own new about_dlg.c,
added a notebook tab with some directory infos (still incomplete and ugly)
cleaned up #includes in main.c (hoping this didn't break the build on unix)

svn path=/trunk/; revision=10925
2004-05-20 12:01:13 +00:00
Ulf Lamping 9ade33284d GTK2 only: catch window state event, and call display_queued_messages()
if window not iconified any longer.
Queue up simple_dialog messages, if window *is* iconified

svn path=/trunk/; revision=10914
2004-05-17 21:15:28 +00:00
Ulf Lamping e1fef4b5ca Win32 only: Preference setting to open a console window, one of:
never (default), automatic (like before), always

svn path=/trunk/; revision=10870
2004-05-13 15:28:02 +00:00
Ulf Lamping bd96071d8c rename context menu items:
Match -> Apply as Filter
Prepare -> Prepare a Filter
and prepended a ... at appropriate submenu items

svn path=/trunk/; revision=10814
2004-05-07 12:15:24 +00:00
Guy Harris b42f088ae5 Note that hiding panes in the paned widgets doesn't do what we want with
GTK+ 1.2[.x], although it does so with GTK+ 2.x.

svn path=/trunk/; revision=10801
2004-05-05 08:49:24 +00:00
Guy Harris 70e4f7ff87 Use "main_widgets_show_or_hide()" to control the visibility of all the
main window widgets, rather than requiring a relayout if the visibility
of the main toolbar, filter toolbar, or statusbar is changed.

Clean up indentation.

svn path=/trunk/; revision=10796
2004-05-04 21:08:03 +00:00
Guy Harris 76574b554b If all we're doing is changing the visibility of a pane, we don't have
to re-lay-out the main window, we just need to change the visibility of
the appropriate widgets - that reduces the amount of drawing done,
speeding things up a little and reducing flicker.

svn path=/trunk/; revision=10795
2004-05-04 20:49:33 +00:00
Guy Harris 6ae8786e94 Display "main_second_pane" if, and only if, both widgets in it are
displayed; otherwise, if you hide both of them (e.g., hiding the packet
details and packet data panes in the default layout), "main_second_pane"
remains but as a gray blob, rather than having the remaining pane take
over the entire window.

svn path=/trunk/; revision=10794
2004-05-04 20:40:08 +00:00
Guy Harris 9831d86922 Squelch some compiler warnings.
Clean up white space.

svn path=/trunk/; revision=10735
2004-04-30 00:22:46 +00:00
Ulf Lamping 414b631700 added selection of different main window pane layouts,
also added some preferences and a new preference page for this

svn path=/trunk/; revision=10729
2004-04-29 17:03:27 +00:00
Ulf Lamping 727b63bd8c Freely adjustable status line separations.
svn path=/trunk/; revision=10715
2004-04-27 19:16:11 +00:00
Ulf Lamping f59f209d4f save the position of the main window panes in the recent file,
and restore their position when program is started again (GTK2 only)

svn path=/trunk/; revision=10706
2004-04-25 23:45:12 +00:00
Guy Harris 5d9b301783 Report errors in opening various configuration files at the time the
failure occurs; now that "simple_dialog()" queues up messages if we
don't yet have the main window, those messages will be queued up until
then.

Move the point at which we pop up those queued messages after the
"process all pending GUI events" is done, so that those messages are
properly displayed on top of the main window.

svn path=/trunk/; revision=10617
2004-04-16 23:57:54 +00:00
Guy Harris d209115ba3 Add a "report_failure()" routine to allow dissectors to report arbitrary
errors to the user.  Use that, rather than "g_warning()", in the
Diameter dissector to report errors reading the dictionary.

Make the format argument to "simple_dialog()" a "const" pointer.

Fix up the read-error message in Tethereal to end with a newline.

If a simple dialog is requested before the main window or the
capture-control window is popped up, queue it up and pop the queued
messages up once the main or capture-control window is displayed.

svn path=/trunk/; revision=10616
2004-04-16 23:17:13 +00:00
Ulf Lamping cbcacf7e48 from Thomas Palmer: add a preference setting for filter toolbar placement
svn path=/trunk/; revision=10555
2004-04-06 19:02:18 +00:00
Gerald Combs 38f778743a Remove an extraneous 'break'.
svn path=/trunk/; revision=10554
2004-04-06 16:08:56 +00:00
Guy Harris 121f06fab7 Make "epan_init()" take, as additional arguments, pointers to routines
that dissectors should call to report file open and read errors, and
have "report_open_failure()" and "report_read_failure()" call through
those pointers, rather than being defined and exported by the
application using libethereal - instead, the application would define
those functions and pass pointers to them to 'epan_init()".

Move "report_err.h" to the epan directory, as the functions it declares
are now part of the libethereal API.

svn path=/trunk/; revision=10470
2004-03-23 21:19:58 +00:00
Guy Harris ddc5a1773a From Tomas Kukosa:
add Expand Tree to the View menu;

	make the Expand Tree context menu active iff the
	currently-selected item has a subtree;

	fix the GTK2 code for Expand Tree.

svn path=/trunk/; revision=10415
2004-03-20 06:34:09 +00:00
Guy Harris e59b9abbb4 From Tomas Kukosa: add a new "Expand Tree" context menu item, which
expands the selected item and all items below it.

svn path=/trunk/; revision=10407
2004-03-19 06:23:38 +00:00
Olivier Biot 11f9232336 From Lars Roland: Move timestamp_type into libethereal and provide accessor
methods for getting and setting the timestamp type.

This is a move towards a real libethereal shared library.

svn path=/trunk/; revision=10402
2004-03-18 19:04:33 +00:00
Guy Harris aaa184c98d Cast a "char" to "guchar" before passing it to the ctype macros, so that
it doesn't get sign-extended.

svn path=/trunk/; revision=10389
2004-03-17 08:59:28 +00:00
Ulf Lamping 6c9a1dc093 experimental: make usage of pcap_setbuff to increase the kernel buffer size
svn path=/trunk/; revision=10377
2004-03-13 22:49:30 +00:00
Ulf Lamping 7b62a629e8 replaced sprintf / snprintf by g_snprintf,
various other string related changes

svn path=/trunk/; revision=10373
2004-03-13 15:15:26 +00:00
Ulf Lamping 47b176f983 various string related changes
svn path=/trunk/; revision=10372
2004-03-13 14:07:14 +00:00
Ulf Lamping cb5a386901 fixed differences between capture GUI frontend and backend
svn path=/trunk/; revision=10303
2004-03-04 19:31:21 +00:00
Ulf Lamping ecf2665992 implemented capture dialog 3rd (+x) proposal
svn path=/trunk/; revision=10279
2004-03-02 22:07:23 +00:00
Guy Harris d9a9be352c Default to not using the ring buffer (as the default number of files is
1 file, i.e. the simple "just keep capturing until told to stop" mode,
you can't use a ring buffer).

svn path=/trunk/; revision=10259
2004-02-28 21:55:13 +00:00
Ulf Lamping b151b6d215 Capturing: "Number of files" switches between normal and multiple mode,
"Use ring buffer" switches between multiple single run and real ring buffer

svn path=/trunk/; revision=10257
2004-02-28 16:21:11 +00:00
Guy Harris 6064ef84c2 Add a "force" argument to "filter_packets()" and
"main_filter_packets()", to force the filtering to be done even if the
filter is the same as the current one; this is necessary in order to
make sure "Follow TCP Stream" gets the packets processed even if you're
filtering the stream that's currently filtered in.

svn path=/trunk/; revision=10209
2004-02-23 22:48:52 +00:00
Ulf Lamping ed6148660b statistics menu redesigned, now looking more like the former menu,
items now again grouped by function, not by ISO layer

svn path=/trunk/; revision=10202
2004-02-23 19:19:39 +00:00
Gerald Combs fc60101a9f Move cvsversion.h from BUILT_INCLUDES to BUILT_SOURCES. This tells automake
to create cvsversion.h before any "all" or "check" targets are built.

Clean up a few CVS version strings that I missed last week.

svn path=/trunk/; revision=10199
2004-02-23 16:12:52 +00:00
Ulf Lamping 62d083525e statistics menu structure proposal:
renamed "Watch Protocol" to "Statistics",
Made two new toplevel menu items "Transport" and "Application"

svn path=/trunk/; revision=10183
2004-02-22 21:35:58 +00:00
Ulf Lamping cdebea69ce Redesigned the menu structure of the former statistics stuff,
now sorted by ISO-layer, than alphabetically (now longer by functionality).
Seperated the tap registering from the actual menu making stuff,
so the seperate step of registering the tap and the menu is no longer needed.
Removed all things related to this double registering.

svn path=/trunk/; revision=10180
2004-02-22 18:47:04 +00:00
Ulf Lamping 2509c20b61 quit_after_cap should be a gboolean, not an int, and it should be initialized
svn path=/trunk/; revision=10169
2004-02-21 13:40:06 +00:00
Gerald Combs 058dbba4b9 Add support for a "version.conf" file in the main directory which can
be used to adjust version preferences.  It understands two configuration
directives: "enable", which can be 0 or 1, and "format", which can be any
strftime()-compatible string, e.g. "V12-powered on %A %Y-%m-%d %H:%M:%S".

If no configuration file is present, the configuration defaults to

enable: 1
format: CVS %Y%m%d%H%M%S

svn path=/trunk/; revision=10139
2004-02-20 20:36:14 +00:00
Ulf Lamping 6b03887732 minor bugfix from recent check in
svn path=/trunk/; revision=10137
2004-02-20 18:37:00 +00:00
Ulf Lamping ec03b28e12 bugfix: resizing (values from recent) must be done, before the
top_level window is shown, otherwise it has no effect!

svn path=/trunk/; revision=10136
2004-02-20 17:43:50 +00:00
Ulf Lamping fed61823c6 win32 drag-n-drop: corrected handling of UNC filenames "\\host\share\dir..."
svn path=/trunk/; revision=10135
2004-02-20 17:36:37 +00:00
Ulf Lamping d50cbeb79a bugfix: use last_open_dir for the recent file,
instead of the somewhat duplicated value in the recent struct

svn path=/trunk/; revision=10077
2004-02-17 14:49:11 +00:00
Guy Harris 36ece5a17a Add a "window_new()" routine that creates a window of a given type, sets
the title, and arranges to set the icon for it.  Use that instead of
"gtk_window_new()" and separate calls to set the title and arrange to
set the icon.

Regularize #includes a bit.

Clean up white space.

svn path=/trunk/; revision=10054
2004-02-13 00:53:37 +00:00
Guy Harris c5b4dad036 Create only one "About Ethereal" window per process.
svn path=/trunk/; revision=10052
2004-02-13 00:00:25 +00:00
Guy Harris 90cf9a6b7b The HIG's and/or GUI toolkit documentation for:
Mac OS X

	GNOME

	Qt

	KDE

	Windows

all indicate that {message,alert} boxes are modal, at least for the
window to which they apply.  (Presumably the idea is that not forcing
the user to pay attention to the alert box, and allowing more than one
alert box to be up for a given window, causes more problems than not
letting the user do stuff to that window in order to figure out what the
underlying problem is or figure out what to do to fix it - the message
should be sufficient, in most if not all cases, to let you know what the
problem is.)

Make "simple_dialog()" unconditionally make the alert box modal, and get
rid of ESD_TYPE_MODAL.  XXX - we need to make it possible to make an
alert box modal for a given window, rather than just the top-level
window.

svn path=/trunk/; revision=10051
2004-02-12 22:24:28 +00:00
Guy Harris f99bb93e55 Cast "char" values to "guchar" before passing them to <ctype.h> macros,
so that characters with the 8th bit set don't get sign-extended and
cause the macros not to return the right answer.

svn path=/trunk/; revision=10036
2004-02-11 09:19:54 +00:00
Guy Harris 2e4e229739 Get rid of the "Question" alert box type - rename it to "Confirmation",
as that seems to be the name used in the GNOME HIG, at least.  Make it
use the Warning icon (that's what the GNOME HIG says - and it's also
what's used for the equivalent on Windows), and use it for the "Save
current capture?" alert boxes.

svn path=/trunk/; revision=10030
2004-02-11 03:55:48 +00:00
Guy Harris c7fd1b2b13 Add a routine to be used to put up alert boxes for invalid display
filter expressions; use that in a number of places, so we use the same
alert box.  (More work is needed to figure out the right way to handle
some other "dfilter_compile()" failures.)

Use the error message from the display filter as the primary error, as
that's the message that tells you what the underlying problem is.  (The
GNOME HIG says "In most situations the user should only need the primary
text to make a quick decision", so the primary text should tell you
what's wrong with the filter, not just that it's invalid.  If there are
messages from the display filter code that don't give enough
information, or are a bit cryptic, such as "Unexpected end of filter
string," those should be fixed in the display filter code.)

Improve the error used if an empty filter is used for "find frame".

svn path=/trunk/; revision=10025
2004-02-11 00:55:28 +00:00
Jörg Mayer 348c83db8c Fix a few warnings
svn path=/trunk/; revision=9997
2004-02-06 14:59:52 +00:00
Guy Harris 372e6b2da0 Add some comments about the types of alert boxes you get with the
simple_dialog routines (which are really just message box/alert box
routines).

Add some macros for combinations of buttons (corresponding to
combinations that some GUI toolkits, which only support some
combinations, allow).

svn path=/trunk/; revision=9977
2004-02-04 01:10:37 +00:00
Ulf Lamping 1d2c791ab6 enhanced some dialog messages,
close capture file when user told so

svn path=/trunk/; revision=9965
2004-02-03 17:59:01 +00:00
Ulf Lamping 3f2f2929eb added some more info to the statusbar (filesize, packet count, ..),
fixed a minor bug in the cfile handling (file length in summary dialog)

svn path=/trunk/; revision=9961
2004-02-03 00:16:59 +00:00
Guy Harris 7b5e98bf8e Mark the "widget" argument to "main_load_window_geometry()" as unused
when building for GTK+ 1.2[.x].

svn path=/trunk/; revision=9955
2004-02-01 22:43:34 +00:00
Ulf Lamping d11080a09f moved window geometry values from prefs to recent,
added new pref / recent setting: "maximized main window",
which will save, if the main window is maximized or not,
this will take effect on GTK version 2 only, but is saved nonetheless

svn path=/trunk/; revision=9949
2004-02-01 20:28:11 +00:00
Ulf Lamping db13141aab DND: also unescape URI characters (e.g. %20 -> ' ')
svn path=/trunk/; revision=9940
2004-02-01 10:01:19 +00:00
Guy Harris e1e17ea8b2 Konqueror, in KDE 3.0, appears to drop file names of the form
"file:/foo/bar/...", so that only the "file:" should be stripped off.

Note that we should probably look for "file:" followed by an arbitrary
number of "/"s, and, at least on UNIX, strip off all but the last of
those "/"s.

svn path=/trunk/; revision=9932
2004-02-01 02:59:20 +00:00
Ulf Lamping 5b38a022e4 Implemented rudimentary Drag and Drop support.
svn path=/trunk/; revision=9926
2004-01-31 18:32:37 +00:00
Ulf Lamping d244cd82f5 cleanup of new "question dialogs",
using GTK2 primary/secondary message text from GNOME HIG for simple_dialogs,
added a "question dialog" for the coloring rules "Clear" button

svn path=/trunk/; revision=9921
2004-01-31 12:13:23 +00:00
Guy Harris 1980fa5dbf Pass ESD_BTN_OK rather than NULL as a second argument to
"simple_dialog()"; NULL might be #defined to be a pointer expression on
some platforms, causing compiler warnings (and, on platforms where a
null pointer doesn't have all its bits 0, possibly causing misbehavior,
although I don't think there are any such platforms on which Ethereal
runs).

Don't allow 0 as button mask argument to "simple_dialog()".

Squelch a compiler warning.

Report fatal problems as errors, not warnings.

Report file I/O errors with "file_open_error_message()".

Report file write errors (including those reported by "close()", e.g.
some errors writing to an NFS server) when saving raw packet data to a
file.

svn path=/trunk/; revision=9915
2004-01-31 03:22:42 +00:00
Ulf Lamping 25edd1c53e renamed ESD_TYPE_CRIT to ESD_TYPE_ERROR to
better reflect the real error text

svn path=/trunk/; revision=9913
2004-01-31 02:25:46 +00:00
Ulf Lamping 3c76ec1aa2 every GUI action, which will erease a currently unsaved capture file,
will now raise a dialog "Save xy before z?" with Yes/No/Cancel buttons.

svn path=/trunk/; revision=9908
2004-01-29 23:11:38 +00:00
Guy Harris a06e94af42 "gtk/main.c" no longer has any code to manage the packet list, so it no
longer needs to define the "column_arrows" structure.

svn path=/trunk/; revision=9894
2004-01-28 09:10:50 +00:00
Ulf Lamping c1a7c24df3 added a tooltip to explain the behaviour of the syntax check in the filter toolbar
svn path=/trunk/; revision=9861
2004-01-26 18:40:44 +00:00
Guy Harris e608fdfda3 In "main_filter_packets()", use the "cf" argument rather than always
passing "&cfile" to "filter_packets()".

Mark the "w" argument to "filter_activate_cb()" as unused.

svn path=/trunk/; revision=9853
2004-01-25 22:20:21 +00:00
Guy Harris d6cd61061e Have the Wiretap open, read, and seek-and-read routines return, in
addition to an error code, an error info string, for
WTAP_ERR_UNSUPPORTED, WTAP_ERR_UNSUPPORTED_ENCAP, and
WTAP_ERR_BAD_RECORD errors.  Replace the error messages logged with
"g_message()" for those errors with g_strdup()ed or g_strdup_printf()ed
strings returned as the error info string, and change the callers of
those routines to, for those errors, put the info string into the
printed message or alert box for the error.

Add messages for cases where those errors were returned without printing
an additional message.

Nobody uses the error code from "cf_read()" - "cf_read()" puts up the
alert box itself for failures; get rid of the error code, so it just
returns a success/failure indication.

Rename "file_read_error_message()" to "cf_read_error_message()", as it
handles read errors from Wiretap, and have it take an error info string
as an argument.  (That handles a lot of the work of putting the info
string into the error message.)

Make some variables in "ascend-grammar.y" static.

Check the return value of "erf_read_header()" in "erf_seek_read()".

Get rid of an unused #define in "i4btrace.c".

svn path=/trunk/; revision=9852
2004-01-25 21:55:17 +00:00
Ulf Lamping c890e29a99 apply automatically generated filters strings to the recent dropdown list,
e.g. when applying a "Follow TCP stream",
fix a bug in the recent function, discarding the newest entries when
saving a full list (now discarding the oldest).

svn path=/trunk/; revision=9849
2004-01-25 18:51:26 +00:00
Ulf Lamping 24eb4363ef add syntax check and an "Add Expression" button to the filter toolbar
svn path=/trunk/; revision=9839
2004-01-25 15:10:36 +00:00
Guy Harris 89c529db8e Have "font_apply()" return an indication as to whether it succeeded or
failed and, if it failed, how it failed.  Have it leave up to its caller
the job of reporting that it couldn't load the requested font; have its
callers do that, and have them set the zoom level on failure so that we
have a zoom level that is at least more likely to work.  Make the alert
boxes for "font_apply()" failures be error boxes, not warning boxes.

svn path=/trunk/; revision=9818
2004-01-24 01:02:54 +00:00
Guy Harris 89edd94cb3 Do the font loading code as two larger sections of code, one for GTK+
1.2[.x] and one for GTK+ 2.x, rather than as one section peppered with
#ifdefs.

svn path=/trunk/; revision=9817
2004-01-23 21:22:18 +00:00
Guy Harris b64241c4a6 Include the AddStyleName information in the zoomed font name.
svn path=/trunk/; revision=9816
2004-01-23 20:34:11 +00:00
Guy Harris 32e5a4bdbc If the zoom factor is zero, don't construct a new font name - the
supplied font name is correct.  That lets us handle fonts whose size we
can't change because this is GTK+ 1.2[.x] and the name isn't an XLFD
name so we don't know where the size is.

In "font_zoom()", remove some code from the GTK+ 1.2[.x] vs. GTK+ 2.x
#ifdefs.

Fix the comment for "font_zoom()".

Get rid of a no-longer-used "simple_dialog()" argument.

svn path=/trunk/; revision=9814
2004-01-23 20:11:59 +00:00
Guy Harris d10d0f20f2 Clean up indentation.
Make "font_zoom()" static - it's not used outside gtk/main.c.

Use "g_strdup()" rather than "strdup()", as we use "g_free()" to free
the result.

Put in a little more information when "font_zoom()" fails due to the
font name not being an XLFD font name, and don't continue if it fails.

Don't continue if the attempt to load the fonts fails, either.

svn path=/trunk/; revision=9813
2004-01-23 19:53:10 +00:00
Ulf Lamping 6551f25ee9 fix assert, when failed loading zoomed font,
prepare possibility to put filter toolbar just below the main toolbar

svn path=/trunk/; revision=9807
2004-01-23 16:07:37 +00:00
Ulf Lamping 8e2a930023 implemented dlg_button_row_new to get a standard function for
layouting the dialog buttons, and use it where appropriate.
This will help us with the GTK1/2 conflict on button layouts and
will also result in a more consistent look of the dialogs at all.

svn path=/trunk/; revision=9771
2004-01-21 21:19:34 +00:00
Guy Harris 9c9fd17906 Squelch some compiler warnings.
"font_point_size_l" is a "long", so use "strtol()" to set it (note that
even "strtoul()", for some not-entirely-obvious reason, accepts numbers
starting with a "-" as input - ANSI C requires it!).

svn path=/trunk/; revision=9767
2004-01-21 09:00:48 +00:00
Ulf Lamping 76910636e0 don't try to set font size <= 0
svn path=/trunk/; revision=9762
2004-01-21 03:02:19 +00:00
Ulf Lamping ef57df088f a.) saving GTK1 and GTK2 fontnames in different preference setting, to prevent problems when switching between GTK1 and GTK2 ethereal versions
b.) added new feature "Edit->Go To First Packet" "Edit->Go To Last Packet" with corresponding menu and toolbar items
c.) added new feature "View->Zoom In" / "View->Zoom Out" / View->Normal Size" with corresponding menu and toolbar items
This feature will act as a "size offset" to the current fontsize, so that the packet list/tree view/... will have a larger/smaller font size.
The value is stored inside the recent file.
d.) Win32 only: Try to get the win32 system font and fontsize at program startup and show the menus/dialogs and such with the same font and fontsize like other win32 windows.
This makes the program make a *lot* more feel like a normal win32 program.

svn path=/trunk/; revision=9753
2004-01-20 18:47:25 +00:00
Ulf Lamping 1b852172e2 minor tooltip changes
svn path=/trunk/; revision=9748
2004-01-20 02:26:00 +00:00
Guy Harris d4ab584f0f Move "ts_type_text" out of "epan/timestamp.h into "gtk/recent.c", as
it's only used in the latter; that avoids lots of warnings about
"ts_type_text" being defined but not used in other source files that
include "epan/timestamp.h".  (If it's going to be used in more than one
file, make it non-static and declare it "extern" in "epan/timestamp.h".)

Define TS_NOT_SET as ((ts_type)-1), and use that when initializing
"timestamp_type" in Ethereal and when checking to see whether
"timestamp_type" was set, to avoid signed vs. unsigned comparison
warnings.

Clean up indentation.

svn path=/trunk/; revision=9740
2004-01-19 23:03:20 +00:00
Jörg Mayer da5f6f9472 The current year is 2004
svn path=/trunk/; revision=9731
2004-01-19 18:21:18 +00:00
Ulf Lamping 0353c5823f move timestamp format options from "View->Options" dialog into
menuitems under "View->Time Display Format".
renamed timestamp enum items e.g. from ABSOLUTE to TS_ABSOLUTE,
to prevent conflicting definitions with MSVC

svn path=/trunk/; revision=9729
2004-01-19 03:46:43 +00:00
Ulf Lamping 453309c0c6 added some menuitems "View->Show" including show/hide of all main widgets,
saving the states in the recent file

svn path=/trunk/; revision=9726
2004-01-19 00:42:12 +00:00
Jörg Mayer 5972f31427 Output the result of -h to stdout, not stderr
svn path=/trunk/; revision=9703
2004-01-18 02:19:07 +00:00
Olivier Biot 8db6fb47cd Nice rendering of the CVS version as "(cvs 200401181200003000)".
The make-version.pl script only defines CVSVERSION if this was a build
from CVS.

svn path=/trunk/; revision=9701
2004-01-18 01:41:14 +00:00
Ulf Lamping 59125a7304 no more differences, wether display filter dialog is called from
menu "Analyze->Display Filter" or statusbar "Filter:" button.

svn path=/trunk/; revision=9698
2004-01-18 00:40:39 +00:00
Jörg Mayer 0ac74ed036 In case of CVS sources, add the date of the last change to the version
number.

2do: Add support to Makefile.nmake
     Enforce the generation of cvsversion.h on each run of make

svn path=/trunk/; revision=9679
2004-01-16 20:04:21 +00:00
Guy Harris b97626862e Rename DISSECTOR_HELPER_{SRC,OBJECTS} to
DISSECTOR_SUPPORT_{SRC,OBJECTS}.

Add some additional files, required by dissectors, to those lists.

Extract the stuff to get version information strings for libraries and
the OS, which is *not* needed by dissectors, from "util.c", which
contains routines that *are* needed by dissectors, and put it into a
separate file.

Make "dftest" link only with the dissector support stuff, not with all
of the Ethereal common files.

svn path=/trunk/; revision=9645
2004-01-11 22:17:43 +00:00
Ulf Lamping 949f1f2d07 using button compatibility macros
svn path=/trunk/; revision=9636
2004-01-10 16:27:43 +00:00
Guy Harris 563f423d76 Turn the GTK+ 1.2.10 clist code into our own widget; that lets us modify it
to add functionality or improve performance, although, until we make it
work on GTK+ 1.3[.x] and 2.x, we shouldn't count on the performance
improvements, or make its API different from that of the GtkClist API
(other than names).

Move all the code that knows about the packet list into
gtk/packet_list.c, so that the GtkClist vs. EthClist stuff is
encapsulated inside it.

svn path=/trunk/; revision=9608
2004-01-09 08:36:23 +00:00
Olivier Biot f5f60f1ba3 Fix the "unmarking a packet matching a color filter does not apply the color
filter's colors" bug, by storing the pointer to the matching color_filter_t
structure in the frame_data structure.

Replace "frame" and "frames" by "packet" and "packets" in many places.

svn path=/trunk/; revision=9607
2004-01-09 02:57:54 +00:00
Guy Harris c0b33a22f9 If building without libpcap, exclude some stuff that builds only if
you're building with libpcap or that's not necessary if you're not
building with libpcap.

svn path=/trunk/; revision=9601
2004-01-08 20:39:51 +00:00
Richard Sharpe fa9874ef73 Apply the patches from Tadaaki Nagao for a global version of disabled
protocols ...

svn path=/trunk/; revision=9538
2004-01-03 18:40:08 +00:00
Ulf Lamping 14e2a790f9 From Dick Gooris (and me :-)
more ways to choose which packets can be saved,
in the save(as) dialog box

svn path=/trunk/; revision=9476
2003-12-29 20:05:59 +00:00
Ulf Lamping 3b77bfee59 removed some MSVC warnings (moved pcap.h before glib.h)
svn path=/trunk/; revision=9393
2003-12-21 12:19:39 +00:00
Ulf Lamping 1a2ecc19c3 removed some more MSVC warnings (type casting), GTK2 specific
svn path=/trunk/; revision=9333
2003-12-17 23:41:10 +00:00
Ulf Lamping 1f97bdc27a removed some more MSVC warnings (type casting)
svn path=/trunk/; revision=9326
2003-12-17 22:11:43 +00:00
Olivier Abad abb4aec1fe Use gtk compatibility macros (from compat_macros.h) instead of some gtk+
v1.2 functions which are deprecated in gtk+ v2.

Update OBJECT_SET_DATA macros to cast "data" to (gpointer).

svn path=/trunk/; revision=9296
2003-12-16 18:43:35 +00:00
Guy Harris 7cae9249aa Squelch some compiler warnings.
Clean up white space.

svn path=/trunk/; revision=9278
2003-12-13 22:05:08 +00:00
Ulf Lamping 156be8aa9f added "most recently used" lists for
"opened capture files" and "display filter used",
the settings will be saved in the file "recent" in the users config path

svn path=/trunk/; revision=9275
2003-12-13 18:01:30 +00:00
Ulf Lamping 8e43886258 mention the GPL license in the Help->About dialog
svn path=/trunk/; revision=9272
2003-12-13 16:30:10 +00:00
Gerald Combs 9ed6beff38 In "dlg_window_new()" check to see if "top_level" has been initialized,
as is the case for the spawned capture process.

svn path=/trunk/; revision=9245
2003-12-12 02:50:04 +00:00
Guy Harris 11d8817da0 Don't automatically size the columns - that's expensive in large
captures, as it has to compute the width of an auto-resizing column in
every row.  Just pick fixed widths for the columns (and tune the width
of the "Protocol" column so that it's not narrower than the column
title).

svn path=/trunk/; revision=9219
2003-12-09 06:48:40 +00:00
Olivier Abad 96acd9f8bf Update various set_menu_object_data() calls to reflect recent menu
hierarchy changes. This avoids a crash when selecting "Folow TCP stream"
from the "Analyze" menu.

svn path=/trunk/; revision=9193
2003-12-07 09:43:53 +00:00
Guy Harris dcd98ae8d3 The "ptr_u" unions no longer have a "next" pointer - they now just have
one member - or have one that's not used, so get rid of those unions.

svn path=/trunk/; revision=9151
2003-12-03 09:28:26 +00:00
Guy Harris 0c84e1c329 From Didier Gautheron: for each column format type, save the first and
last columns, if any, with that format, and use that to speed up
processing of columns with a particular format and checking whether
we're displaying a column with a particular format.

svn path=/trunk/; revision=9147
2003-12-02 23:14:32 +00:00
Guy Harris bd9f96738c From Didier Gautheron: put an "fvalue_t" structure into a "field_info"
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.

svn path=/trunk/; revision=9146
2003-12-02 21:15:49 +00:00
Ulf Lamping cd01ca6cb0 using dlg_utils.c functions to catch the ESC key to close the dialog
svn path=/trunk/; revision=9110
2003-11-28 00:13:08 +00:00
Guy Harris 41cedaa088 Show the -z flag in the usage message.
svn path=/trunk/; revision=9105
2003-11-27 22:12:18 +00:00
Guy Harris 122dd3959c Make the recent epan/proto.{c,h} change compile.
svn path=/trunk/; revision=9075
2003-11-24 22:11:55 +00:00
Gerald Combs fee0d98c18 Check the environment variables SSH_CONNECTION, SSH_CLIENT, REMOTEHOST,
DISPLAY, and CLIENTNAME (in that order).  If any of them are set, create
a capture filter that excludes their traffic and set it as the default.
The longer filters should be efficient without being overly long; they
may need some tweaking.

svn path=/trunk/; revision=8994
2003-11-18 04:16:28 +00:00
Gerald Combs 2bdac88860 The recent link-layer type additions broke "-r". Make it work again.
svn path=/trunk/; revision=8857
2003-11-02 19:31:20 +00:00
Guy Harris 3c2706c338 Return FALSE from the configure event handler, so that anybody else
who's registered for it can get notified about it.

svn path=/trunk/; revision=8849
2003-11-01 03:03:25 +00:00
Guy Harris 219b6cefa2 Based on a patch from Brian Fundakowski Feldman, add support for setting
link-layer type when capturing, using the "pcap_set_datalink()" and
related APIs.

svn path=/trunk/; revision=8848
2003-11-01 02:30:18 +00:00
Guy Harris ef74a0b574 If a tap menu item doesn't have a "selected_packet_enabled()" or
"selected_tree_row_enabled()" routine, enable it by default, so that
tap windows can be popped up even if you have no capture file.

Assorted code cleanups.

svn path=/trunk/; revision=8740
2003-10-20 22:28:22 +00:00
Olivier Abad 67e641ff5f - use stock icons in the toolbar when using GTK2
- use GTK1/2 compatibility macros [GS]ET_OBJECT_DATA where needed
- add a set_toolbar_object_data() function which associates the display
  filter entry (from the main window) with the E_DFILTER_TE_KEY for the
  open and reload buttons (it is needed by the open and reload
  callbacks). The function is called in create_main_window()
- reindent

svn path=/trunk/; revision=8718
2003-10-16 20:56:07 +00:00
Guy Harris 18556fed07 There doesn't seem to be any need to set "cfile.dfilter" to the contents
of the filter text entry when reloading the file, and:

	1) that doesn't work with the toolbar "reload" button (the
	   widget passed in for that button doesn't have a
	   E_DFILTER_TE_KEY data item pointing to the text entry);

	2) that causes the Tools > Summary dialog box to report what
	   you've typed in that box, not the filter that's actually in
	   effect (i.e., it causes "cfile.dfilter" to reflect what's
	   been typed, not what's been applied);

so don't bother doing so.  That also means that the "/File/Reload" menu
item doesn't need a E_DFILTER_TE_KEY data item, so don't give it one.

svn path=/trunk/; revision=8713
2003-10-16 00:45:12 +00:00
Guy Harris a27dcb4e3f From Ulf Lamping: toolbar.
svn path=/trunk/; revision=8707
2003-10-15 19:40:42 +00:00
Guy Harris ffa3ad8ef5 From Ian Schorr:
Add a preference to control whether the "File > Open" dialog box
	should start out in the last directory in which it looked - and
	save that in the preferences file across invocations - or should
	always start out in a user-specified directory, and add another
	preference to specify that directory.

	Write out section name comments into the preferences file.

Clean up white space a bit.

svn path=/trunk/; revision=8699
2003-10-14 23:20:17 +00:00
Ronnie Sahlberg 3d32354336 Updates to TimeReference Frames
Add a Goto Next/Previous  time reference menu option

svn path=/trunk/; revision=8657
2003-10-10 08:39:24 +00:00
Guy Harris cace3b6df9 Make the window geometry information static - it's not used outside this
file.

Fetch the geometry information whenever we get a configure_notify event,
i.e. if it actually changes, rather than doing so when we get asked to
delete the main window or we exit.  Don't save the geometry if we've
never gotten such an event, as it presumably means the size and position
haven't changed.

svn path=/trunk/; revision=8634
2003-10-07 04:36:36 +00:00
Olivier Abad 959850bf16 In packet_list_button_pressed_cb (gtk2 version) :
- put back the event_button->window == GTK_CLIST(w)->clist_window test
  now that we use the correct structure definition for GtkCList (from
  the right include file, not from our version of gtkclist.h).

svn path=/trunk/; revision=8528
2003-09-24 06:18:20 +00:00
Guy Harris 4e64afcb25 Pass a pointer to a "capture_file" structure to
"set_menus_for_selected_packet()" and
"set_menus_for_selected_tree_row()", and have them decide whether to
enable or disable menu items based on whether that structure indicates
that a packet or field is selected and, if one is, on its properties.

Pass to the "selected packet enabled" routine for a menu item the
"frame_data" and "edt" members of the "capture_file" structure, and pass
to the "selected tree row enabled" routine the "field_info" member of
that structure.

Clear "cf->current_frame" if no packet is selected.

svn path=/trunk/; revision=8525
2003-09-24 02:36:35 +00:00
Guy Harris dd628e00c7 Make "finfo_selected" a member of a "capture_file" structure rather than
an independent global variable.

svn path=/trunk/; revision=8524
2003-09-24 00:47:37 +00:00
Olivier Abad 1ba0dfec6f Temporary patch for the packet_list column resize problem in gtk2.
We should use the same test (event_button->window == GTK_CLIST(w)->clist_window)
we already use in gtk v1.2 code but in doesn't seem to work in gtk2.

svn path=/trunk/; revision=8515
2003-09-23 06:25:10 +00:00
Guy Harris f3dd4b5eec Clean up an error message.
svn path=/trunk/; revision=8481
2003-09-15 23:20:34 +00:00
Guy Harris 2e98c97118 Don't pop up tap windows specified with "-z" options until we have a
capture file open.

svn path=/trunk/; revision=8480
2003-09-15 23:15:32 +00:00
Guy Harris 14509164fc Rename various capture file routines to have names starting with "cf_".
svn path=/trunk/; revision=8479
2003-09-15 22:48:42 +00:00
Guy Harris 0d87da9c92 Don't allow -k and a capture file to both be specified on the command
line - either we're doing a live capture or we're reading a saved
capture file, we can't do both at the same time.

svn path=/trunk/; revision=8475
2003-09-15 20:45:19 +00:00
Ronnie Sahlberg 007d873671 Added TimeReference frames.
One can now select a packet and mark it as a TimeReference packet using the menu.
A TimeReference packet will be indicated by having all timestamp related column entries replaced by the string *REF*
A TimeReference packet will always be displayed in the packet pane, and overrides any display filters.

When a frame is a TimeReference frame, all later frames will calculate the TimeRelativeToFirstPacket  relative to the timestamp of the TimeReference frame instead of the first frame of the capture.

You can have any number of TimeReference frames you like.

svn path=/trunk/; revision=8459
2003-09-12 02:48:23 +00:00
Guy Harris 27ea7816ee Have "get_interface_list()" return a list of "if_info_t" structures
containing a pointer to an interface name and possibly a pointer to an
interface description (although that pointer might be null if no
description is available), rather than having the Windows version glue
together the name and description into a single string.

Supply for the Linux "any" device the same description that libpcap's
"pcap_findalldevs()" returns.

svn path=/trunk/; revision=8440
2003-09-10 05:35:26 +00:00
Guy Harris d7c622e309 Check for "wtap_seek_read()" failing.
svn path=/trunk/; revision=8364
2003-09-03 23:32:40 +00:00
Ronnie Sahlberg b9ce30cd35 And for Cal,
Ethereal presents   a column to display culmulative bytes into the capture.

A new column type is added : Culmulative Bytes.
While PacketLength column type specifies the number of bytes in the current packet,
Culmulative Bytes specifies the culmulative number of bytes from the start of the capture.

svn path=/trunk/; revision=8359
2003-09-03 10:49:03 +00:00
Olivier Abad 0c678f74c7 Marking packets with the middle mouse button works now with GTK2.
svn path=/trunk/; revision=8301
2003-08-28 20:33:14 +00:00
Guy Harris 23f105da58 Construct the About box ourselves, so it has the title "About Ethereal"
and doesn't have a message-box-type icon.

This might want to be tweaked further, to more closely resemble various
desktop environments' About boxes (although what's appropriate might
depend on the environment).

svn path=/trunk/; revision=8194
2003-08-19 20:35:33 +00:00
Ronnie Sahlberg 4ea90cdabc Update to the Response Time Statistics taps.
SMB/FC/ONC-RPC/DCE-RPC now all use the default tap filter string as the
same filter string as is used in the main window instead of using a default
NULL filter string.

The idea is that if you have applied a certain filter to your main window, it
is likely that if you want to invoke the response time statistics feature you
probably want to do the response time statistics over the same set of packets, i.e. the ones you see in the main window.

svn path=/trunk/; revision=8192
2003-08-19 10:09:20 +00:00
Guy Harris ddf6a8acf2 From Michael Lum: add the ability to have a preferences file containing
a list of disabled protocols, and to save that list from the Edit >
Protocols dialog box.

Add checks for read errors in "read_prefs()".

Clean up white space.

svn path=/trunk/; revision=8144
2003-08-07 00:41:28 +00:00
Gilbert Ramirez c91b8e713f Fix signed/unsigned comparison warnings.
svn path=/trunk/; revision=8084
2003-07-25 04:11:51 +00:00
Olivier Abad bf36806318 In packet_list_button_pressed_cb :
we must check if the event occured in the clist_window (because the x,y
pixel positions of the event are relative to this window), before
calling gtk_clist_get_selection_info()

Fixes debian bug #199763

svn path=/trunk/; revision=8053
2003-07-19 10:25:59 +00:00