Commit Graph

258 Commits

Author SHA1 Message Date
Guy Harris bbe7f89742 Move prefs.c and prefs.h into the epan subdirectory.
svn path=/trunk/; revision=12115
2004-09-27 22:55:15 +00:00
Guy Harris 01f8ed1c48 If we have "pcap_datalink_val_to_name()", use it when we construct a
"-y" argument for the capture subprocess - the capture subprocess will
expect a symbolic value, not a numeric value, if we have
"pcap_datalink_name_to_val()".  (We assume that if one is present the
other will be present as well.)

svn path=/trunk/; revision=12064
2004-09-22 09:42:57 +00:00
Gilbert Ramirez 669db206cb 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.

svn path=/trunk/; revision=11410
2004-07-18 18:06:47 +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 272a2055ab On at least some platforms, a #define of O_BINARY is needed even if
<fcntl.h> is included, as <fcntl.h> doesn't define it.

svn path=/trunk/; revision=11276
2004-06-30 06:58:59 +00:00
Ulf Lamping a24b176c32 define of O_BINARY not needed, if fcntl.h is included
other #include related cleanups

svn path=/trunk/; revision=11272
2004-06-29 20:51:26 +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
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
Guy Harris 76a4b357d8 Failures when capturing should be reported as errors.
svn path=/trunk/; revision=10620
2004-04-17 01:07:47 +00:00
Michael Tüxen 254aba8282 From Jon Oberheide: Add interface name to the capture and ethereal window
while capturing.

svn path=/trunk/; revision=10594
2004-04-13 18:01:40 +00:00
Guy Harris d1738a8af1 Include "packet-ap1394.h" to declare "capture_ap1394()".
svn path=/trunk/; revision=10451
2004-03-23 06:48:31 +00:00
Guy Harris 30b2831847 Add support for DLT_APPLE_IP_OVER_IEEE_1394.
svn path=/trunk/; revision=10446
2004-03-23 01:02:41 +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 672ec45f9e capture dialog limits now with units.
no gint "wrap around" tests implemented yet

svn path=/trunk/; revision=10304
2004-03-04 21:27:55 +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
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
Ulf Lamping b45b0f5547 bugfix from previous check in
svn path=/trunk/; revision=10170
2004-02-21 14:04:17 +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
Ulf Lamping ba50469654 rework of capture.c: better seperation of sync and capture pipe by using
explicit names and seperated functionality of do_capture(),
but no functional change!

svn path=/trunk/; revision=10168
2004-02-21 12:58:42 +00:00
Guy Harris 727b913bbd Add an "open_failure_alert_box()" routine to pop up an alert box for a
failed attempt to open/create a file.

Fix one call to pass the right value for the "for_writing" flag.

svn path=/trunk/; revision=10026
2004-02-11 01:23:25 +00:00
Ulf Lamping 1987113fa6 bugfix: close capture file again, if empty after capturing
(bug appears only, if "update list of packets ..." not used)

svn path=/trunk/; revision=10017
2004-02-09 19:19:19 +00:00
Guy Harris 4b5d510056 Tweak the error messages for bad capture filters.
svn path=/trunk/; revision=9974
2004-02-03 20:48:50 +00:00
Ulf Lamping 41cd2385c3 ups, moved previously missing %s to the right place
svn path=/trunk/; revision=9970
2004-02-03 19:54:08 +00:00
Guy Harris 1d7a46d039 Add a missing "%s" to the format string.
svn path=/trunk/; revision=9967
2004-02-03 18:39:52 +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
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
Guy Harris 61e26a56ba Add some more information to the error message for invalid capture
filters that look like display filters.

svn path=/trunk/; revision=9914
2004-01-31 02:29:19 +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
Guy Harris d90d26ece2 If "pcap_compile()" fails to compile an empty filter string (because,
for example, the libpcap code generator doesn't support the link-layer
type for the capture), "dfilter_compile()" will succeed but return a
null rfcode pointer.

In that case, instead of telling people that it looks like a valid
display filter (which it does, but it also looks like a complete list of
all the Basque words likely to be known by Hammurabi :-)), and then
crashing when we try to "free" that non-existent dfilter code, we just
report it as a "sorry, couldn't compile that capture filter.

svn path=/trunk/; revision=9912
2004-01-31 01:32:51 +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
Guy Harris 46848f0a9e Add a new "file_open_error_message()" routine in "epan/filesystem.c", to
translate UNIX errno values to a somewhat friendly message format
string.

Rename "file_open_error_message()" in "file.c" to
"cf_open_error_message()", make "cf_open_error_message()" use the new
"file_open_error_message()" for UNIX errno values, have "do_capture()"
in "capture.c" use "file_open_error_message()" to report errors from
"open()", and make "cf_open_error_message()" static as nothing outside
"file.c" uses it.

Do similar stuff in "tethereal.c".

svn path=/trunk/; revision=9821
2004-01-24 01:44:29 +00:00
Guy Harris 71887f8792 Use "fork_child" rather than "child_process" - on Win32, "child_process"
tracks "fork_child", and, on UNIX, "child_process" doesn't exist.

svn path=/trunk/; revision=9783
2004-01-22 20:45:49 +00:00
Ulf Lamping cf57056f70 bugfix: wrong parameter name
svn path=/trunk/; revision=9778
2004-01-22 19:25:36 +00:00
Ulf Lamping a0f78e3b8f moved GTK specific parts from capture.c to ui_util.c,
implemented Win32 "Capture Stop" when using
"update list of packets in realtime" while capturing

svn path=/trunk/; revision=9777
2004-01-22 18:13:57 +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
Guy Harris 6033a79387 Update the Win32 information given when we fail to open a capture device
to note that the 3.0 and later versions of WinPcap don't support PPP/WAN
captures even on Windows OT.

svn path=/trunk/; revision=9709
2004-01-18 04:13:44 +00:00
Ulf Lamping 0d9679de8d removed some MSVC warnings (level 3)
svn path=/trunk/; revision=9561
2004-01-05 19:31:44 +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
Guy Harris e65abd0ef4 Top-of-tree and top-of-0.8-branch libpcap support limited filtering on
DLT_LINUX_IRDA (empty expression and "link[M:N]" expressions), so don't
special-case IRDA adapters.

svn path=/trunk/; revision=9349
2003-12-18 21:18:34 +00:00
Guy Harris b8299f0b98 From Jan Kiszka: IrDA support.
svn path=/trunk/; revision=9345
2003-12-18 19:07:14 +00:00
Guy Harris 08f3ea2cf3 Fix a typo.
svn path=/trunk/; revision=8983
2003-11-17 19:40:09 +00:00
Guy Harris d9ad0a2062 Get rid of a no-longer-used variable.
svn path=/trunk/; revision=8980
2003-11-17 00:26:30 +00:00
Ulf Lamping bca18fcf68 seperated capture dialog from capture.c and put into new gtk/capture_info_dlg.c
svn path=/trunk/; revision=8968
2003-11-15 08:48:14 +00:00
Guy Harris f4d0c0d9c2 When it comes to whether to use "select()" or not, even if you're
building in Cygwin's pretend-it's-UNIX environment, we need to treat the
platform as Windows.

Get rid of the BSD #define - just check for the platforms on which we
mustn't use "select()".

svn path=/trunk/; revision=8967
2003-11-14 21:18:06 +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
Jörg Mayer 5d4949f2dd Part 3 of display vs. capture syntax confusion patches: Detect probable
use of display filter syntax where capture filter syntax need to be used
in Ethereal.

svn path=/trunk/; revision=8677
2003-10-11 21:49:56 +00:00
Guy Harris b4746f3546 Make sure we return FALSE in all the failure paths in "do_capture()".
svn path=/trunk/; revision=8483
2003-09-15 23:48:42 +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