Commit Graph

241 Commits

Author SHA1 Message Date
Guy Harris 860750fb90 Squelch a compiler warning.
svn path=/trunk/; revision=11401
2004-07-18 02:32:19 +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
Ulf Lamping 357ebbca5a add a new dialog box to menu "Capture/Interfaces..." to show the current state of the interfaces and a quick way to start a capture.
added the IP address of the currently selected interface to the capture options dialog

svn path=/trunk/; revision=11396
2004-07-17 13:50:07 +00:00
Guy Harris fd262f1b97 From Daniel Thompson: add additional message/alert box options to
display "Save", "Continue without Saving", and "Cancel", for the "do you
want to save?" messages.

svn path=/trunk/; revision=11372
2004-07-13 07:15:45 +00:00
Ulf Lamping c6029c079a code cleanup
svn path=/trunk/; revision=11285
2004-06-30 18:24:56 +00:00
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 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 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 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
Guy Harris 9b6feaee20 Get rid of some declarations of routines that no longer exist.
Fix up some declarations of other routines to match the definitions of
those routines.

svn path=/trunk/; revision=11004
2004-05-26 04:21:49 +00:00
Ulf Lamping 7d37fc9d23 more code cleanup from dialog things:
changed window_xy (dialog) function calling in a lot of gtk files
cleanup of file selection code
cleanup in dlg_utils/file_dlg/ui_util
Please report any problems!!!

svn path=/trunk/; revision=11003
2004-05-26 03:49:24 +00:00
Guy Harris 9aa9177401 Change the punctuation in one tooltip (I think "select the desired one"
would be an independent clause, so it should be separate from the other
clause with a semicolon).

Note that, in that tooltip, in some cases "link-layer types" would be
appropriate and in others "link-layer header types" might be more
appropriate.

svn path=/trunk/; revision=10722
2004-04-28 20:47:43 +00:00
Gilbert Ramirez faa3b28970 Minor wording changes in tooltips.
svn path=/trunk/; revision=10721
2004-04-28 19:13:15 +00:00
Ulf Lamping 4ba94c6ebb added tooltips for various input fields
svn path=/trunk/; revision=10720
2004-04-28 18:39:46 +00:00
Guy Harris d4bb41b15d Failure to get the list of interfaces should be reported as an error.
svn path=/trunk/; revision=10621
2004-04-17 01:10:09 +00:00
Ulf Lamping 9ebddd2d71 catch the enter key from the interface drop-down list,
so pressing enter will really start a capture

svn path=/trunk/; revision=10566
2004-04-08 19:07:43 +00:00
Guy Harris 5d48b1f124 On Windows, when looking for the ":" that separates the interface
description from the interface name, don't count ":" followed by "//",
as it might be part of "rpcap://".

svn path=/trunk/; revision=10562
2004-04-08 08:05:20 +00:00
Guy Harris 29c644691b Make "file_selection_new()" take as its second argument an
Ethereal-defined indication of the action (open vs. save), regardless of
whether we're building for GTK+ >= 2.4 or not; we just ignore the
argument in pre-2.4 GTK+.

Use "file_selection_new()" rather than #if'ed code to use it or
"gtk_file_chooser_dialog_new()"  for GTK+ >= 2.4 and
"gtk_file_selection_new()" or it for pre-2.4 GTK+.

Add a "file_selection_set_current_folder()" routine that does the
appropriate thing depending on whether we're GTK+ >= 2.4 or not, and use
that rather than #if'ed code to use
"gtk_file_chooser_set_current_folder()" or
"gtk_file_selection_set_filename()".

svn path=/trunk/; revision=10511
2004-03-29 22:40:58 +00:00
Ulf Lamping 6af5992f02 minor code cleanup, including removed MSVC warnings
svn path=/trunk/; revision=10509
2004-03-27 12:18:40 +00:00
Olivier Abad cd19c5baf8 Use the new GtkFileChooserDialog when built with gtk+ 2.4
svn path=/trunk/; revision=10502
2004-03-27 11:16:58 +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 787205836c using a table for layout of stop capture fields,
added limitations corresponding to the maximum filesize (2GB)

svn path=/trunk/; revision=10333
2004-03-06 11:10:14 +00:00
Ulf Lamping e39aff29f9 using a table for layout of multi files fields, do some code cleanup
svn path=/trunk/; revision=10328
2004-03-06 06:50:34 +00:00
Ulf Lamping 6c04a837fc using a gtk_table instead of hbox'es for "multiple files" fields
svn path=/trunk/; revision=10306
2004-03-04 22:24:47 +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 6a977f13d9 replaced all seperate gtk_widget_show() by a single gtk_widget_show_all() call
svn path=/trunk/; revision=10278
2004-03-02 19:13:33 +00:00
Ulf Lamping 38f076a301 improved resizability
svn path=/trunk/; revision=10267
2004-02-29 10:41:03 +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 ea333f7219 removed "magically" label switching of "Stop capture after x kilobyte(s)" field,
put it into seperate fields.

svn path=/trunk/; revision=10256
2004-02-28 13:06:23 +00:00
Guy Harris 544818d97d Small cleanup - the for loop was left over from earlier code that kept
searching backwards for a backslash until it found one followed by
"Device\", and no longer looped.

svn path=/trunk/; revision=10217
2004-02-24 05:52:30 +00:00
Gerald Combs 15e982a749 In get_if_name(), return immediately once we've found our interface name
under Windows.

svn path=/trunk/; revision=10213
2004-02-24 02:19:16 +00:00
Guy Harris e0fae3ea78 Sigh. On Windows OT, device names don't have "\Device\" in front of
them, so we can't look for "\Device\" as the beginning of the interface
name.  Instead, on Windows, scan backwards for a colon and then skip the
colon and any subsequent blanks.  (I don't *think* interface names have
colons in them in Windows, even on NT 5.x with the GUID crapola in the
name.)

svn path=/trunk/; revision=10210
2004-02-23 23:13:36 +00:00
Ulf Lamping e6f75392c3 added a help button
svn path=/trunk/; revision=10174
2004-02-21 22:54:50 +00:00
Ulf Lamping a27d63b95b new somewhat improved layout of the capture options dialog
svn path=/trunk/; revision=10172
2004-02-21 22:28:59 +00:00
Gerald Combs 18d3d9ee71 Don't clobber the concurrent DNS resolution flag each time we start a
capture.

svn path=/trunk/; revision=10145
2004-02-20 22:56:00 +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 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 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 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 d9a836175f On Windows OT, interface names *can* have spaces in them; to find the
interface name, look forward in the interface string for "\Device\", not
backwards for a space, on Windows.  (Continue to look backwards for a
space on UNIX; names don't start with "\Device\", or even "/dev/", and
don't have spaces in them on any UNIX-flavored OS I know of.)

svn path=/trunk/; revision=9859
2004-01-26 09:05:59 +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
Ulf Lamping e3dd2f5472 use stock buttons whereever possible,
added some ethereal specific stock icons

svn path=/trunk/; revision=9763
2004-01-21 03:54:32 +00:00
Ulf Lamping ef9d4ada2d code cleanup and added some more
application specific stock items in toolbar.c,
use them where appropriate

svn path=/trunk/; revision=9747
2004-01-20 02:21:17 +00:00
Ulf Lamping 949f1f2d07 using button compatibility macros
svn path=/trunk/; revision=9636
2004-01-10 16:27:43 +00:00
Ulf Lamping b9cde84cac using button compatibility macros
svn path=/trunk/; revision=9633
2004-01-10 14:11:58 +00:00
Ulf Lamping 467c05b3ea removed some MSVC warnings (conversions between double/float and int)
svn path=/trunk/; revision=9422
2003-12-23 00:16:46 +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 16ca6bebf6 set link layer type sensitive only,
if the user has to choose between at least two choices

svn path=/trunk/; revision=9270
2003-12-13 11:00:04 +00:00
Ulf Lamping 1aacb3f060 removed MSVC compiler warnings
svn path=/trunk/; revision=9010
2003-11-18 19:29:07 +00:00
Ulf Lamping ee48f3052f added "#include <epan/packet.h>" to be able to include "capture.h"
svn path=/trunk/; revision=8969
2003-11-15 08:50:07 +00:00
Guy Harris ce51c5c700 Don't try to get the list of link-layer header types for an interface if
the interface isn't in the list of known (local) interfaces - that way
we don't try to get entries if the user's in the middle of changing the
"Interface:" text, or if the interface is an rpcap: URL (getting the
link-layer header type list for a remote interface is currently
impossible, and even just getting its *default* interface type could
hang for a long time if the remote machine isn't responding).

Free the link-layer header type list when we're done with it.

Label the option menu for that list "Link-layer header type", as it
doesn't control the data link type of the interface in the only case I
know of where it's settable, namely 802.11 interfaces - it just controls
whether the packets you get from the interface have a fake Ethernet
header or a real 802.11 header.

svn path=/trunk/; revision=8867
2003-11-03 10:40:51 +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 d0d3f842bb Add a "file_selection_new()" routine that does all the positioning (GTK+
2.x) and transient-for setting that's done for other dialogs, and use it
for dialogs that come from the main window or from children of the main
window.

svn path=/trunk/; revision=8531
2003-09-24 08:43:34 +00:00
Guy Harris ce166e6dfb If there's no saved interface name, set the interface name in the
Capture Options dialog box to the first string in the combo box, not to
the first interface name in the list, so we get the description.

svn path=/trunk/; revision=8444
2003-09-10 07:02:25 +00:00
Guy Harris 29ea42f868 If we have no interfaces, don't set the popdown list for interface combo
boxes.

svn path=/trunk/; revision=8443
2003-09-10 06:55:28 +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 81fc518ec6 From Nathan Jennings:
support for user-supplied interface descriptions;

	support for hiding interfaces in drop-down list in capture
	dialog.

Clean up comments written to preferences file.

svn path=/trunk/; revision=8419
2003-09-08 21:44:42 +00:00
Gilbert Ramirez c91b8e713f Fix signed/unsigned comparison warnings.
svn path=/trunk/; revision=8084
2003-07-25 04:11:51 +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 a2f01014c1 Add a new routine "filter_button_destroy_cb()", and make it the
"destroy" signal handler for any button that pops up a filter; if the
button has a filter dialog box associated with it, it destroys that
dialog box.

Have the routines that create filter dialog boxes asociate the dialog
box with the button that created it, so that if the button is destroyed
the filter dialog box can be destroyed as well, and associate the button
with the dialog box.

This means that if a dialog box has a button to create a filter, we no
longer have to have the destroy handler for the dialog box destroy any
filters - that'll happen when the button in the dialog box is destroyed
as part of the process of destroying the dialog box.

Don't make the "Filter" buttons in the io_stat dialog box insensitive if
there's already a filter dialog box open - we can have more than one
open per dialog box.

svn path=/trunk/; revision=6930
2003-01-15 05:20:19 +00:00
Olivier Abad 7a3de321f8 Helper macros fro gtk1.2/gtk2 compatibility.
It should reduce the number of #ifdefs in gtk source code.

svn path=/trunk/; revision=6596
2002-11-09 20:00:35 +00:00
Olivier Abad 05ef1fc475 Merge gtk and gtk2 directories.
svn path=/trunk/; revision=6552
2002-11-03 17:38:45 +00:00
Gerald Combs 7d7c2e075e From Graeme Hewson:
In my recent patches to set and use a default directory, I neglected
  to set the directory when the user enters a file name directly into the
  "Capture Options" and "Print" dialogs instead of using the file dialog.
  This set of patches corrects this.

svn path=/trunk/; revision=6318
2002-09-22 17:52:38 +00:00
Guy Harris 5e8ecbaf46 From Graeme Hewson:
Currently Ethereal sets and uses a default directory for reading
	and writing, but only in some places.  This set of patches extends
	the setting of the default directory to the -w option as well as
	the -r option, and causes all file dialogs to use and set the
	default consistently.  (I haven't changed the
	Preferences/Printing/File dialog, though, as that's a special
	case.)

	There's also a fix for a bug where Ethereal was issuing the
	message "Ring buffer requested, but capture isn't being saved to
	a permanent file" even though a file was specified with -w.

There also appear to be some other cleanups in his patch.

svn path=/trunk/; revision=6238
2002-09-09 20:39:01 +00:00
Jörg Mayer e4a2e2cefe Include cleanups in gtk and gtk2:
Remove unneded includes
Add include wrappers where missing

svn path=/trunk/; revision=6191
2002-09-05 18:48:52 +00:00
Jörg Mayer 7c4176d868 Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117
2002-08-28 21:04:11 +00:00
Guy Harris 77fa06b899 From Joerg Mayer:
dftest.c:
	     Remove #if-0-ed includes

	packet-ieee80211.c, packet-wtls.c, packet-afp.c, packet-wsp.c,
        packet-wtp.c, ethereal_gen.py:
	     Remove redundant include varargs (already in snprintf.h,
	     and required only for snprintf.h)

	Remove unused include of snprintf.h from files not using
	"snprintf()".

svn path=/trunk/; revision=5889
2002-07-17 00:43:03 +00:00
Guy Harris e46414058e Update the URL for WinPcap.
svn path=/trunk/; revision=5759
2002-06-24 20:56:15 +00:00
Gerald Combs 0bc4c2d329 In the Windows capture dialog, place the interface description before the
interface name.

svn path=/trunk/; revision=5499
2002-05-18 02:41:46 +00:00
Gerald Combs b6b2aa4906 Update wiretapped mirror links.
svn path=/trunk/; revision=5156
2002-04-14 20:06:04 +00:00
Gerald Combs 67250b71cc Change "http://netgroup-mirror.ethereal.com/winpcap" URLs to
"http://winpcap.mirror.ethereal.com/", since that's how we're mirroring
the Politecnico di Torino sites now.

svn path=/trunk/; revision=5155
2002-04-14 19:24:26 +00:00
Guy Harris e28f56867d From Joerg Mayer: remove unused variables.
svn path=/trunk/; revision=4879
2002-03-05 12:03:27 +00:00
Guy Harris 5fe414c555 From Joerg Mayer: use _U_ to flag unused arguments.
svn path=/trunk/; revision=4878
2002-03-05 11:56:00 +00:00
Guy Harris 2a2df000a5 Cut down the vertical spacing in the "Capture Options" dialog box.
svn path=/trunk/; revision=4870
2002-03-05 02:25:09 +00:00
Guy Harris 541c654ff0 Put all the capture options into a structure.
Move the ringbuffer capture options from the "capture_file" structure to
the structure for capture options, as they're a property of an
in-progress capture, not a property of a particular capture file.

svn path=/trunk/; revision=4799
2002-02-24 09:25:36 +00:00
Guy Harris b767826991 Have "get_positive_int()" really check for positive integers, not just
non-negative integers.

Get rid of unused "get_positive_int()" routine in "gtk/capture_dlg.c".

svn path=/trunk/; revision=4796
2002-02-24 06:01:03 +00:00
Guy Harris 8bd63530ed "autostop_filesize" and "autostop_duration" don't need to be in the
"capture_file" structure - they're a property of an in-progress capture,
not a property of an open capture file.  Make them just variables.

The maximum number of packets to be captured should be a variable
separate from the "count" field in the "capture_file" structure - the
latter is a count of the packets in the capture file in question.

Have Boolean variables indicating whether a maximum packet count,
maximum capture file size, and maximum capture duration were specified.
If an option isn't set, and we're doing an "update list of packets in
real time" capture, don't pass the option to the child process with a
command-line argument.

Don't create "stop when the capture file reaches this size" or "stop
when the capture's run for this long" conditions if a maximum capture
file size or a maximum capture duration, respectively, haven't been
specified.  Don't test or free a condition if it wasn't created.

Don't allow a 0 argument to the "-c" flag - the absence of a "-c" flag
is the way you specify "no limit on the number of packets".

Initialize the check boxes and spin buttons for the "maximum packets to
capture", "maximum capture size", and "maximum capture duration" options
to the values they had in the last capture.  If an option wasn't
specified, don't read its value from the dialog box and set the
variable.

svn path=/trunk/; revision=4795
2002-02-24 03:33:05 +00:00
Guy Harris fb5688bb93 Set "snaplen", not "has_snaplen", to the snapshot length specified in
the capture preferences dialog box.

svn path=/trunk/; revision=4783
2002-02-22 11:41:22 +00:00
Guy Harris 89a4acb438 Have Wiretap set the snapshot length to 0 if it can't be derived from
reading the capture file.  Have callers of "wtap_snapshot_length()"
treat a value of 0 as "unknown", and default to WTAP_MAX_PACKET_SIZE (so
that, when writing a capture file in a format that *does* store the
snapshot length, we can at least put *something* in the file).

If we don't know the snapshot length of the current capture file, don't
display a value in the summary window.

Don't use "cfile.snap" as the snapshot length option when capturing -
doing so causes Ethereal to default, when capturing, to the snapshot
length of the last capture file that you read in, rather than to the
snapshot length of the last capture you did (or the initial default of
"no snapshot length").

Redo the "Capture Options" dialog box to group options into sections
with frames around them, and add units to the snapshot length, maximum
file size, and capture duration options, as per a suggestion by Ulf
Lamping.  Also add units to the capture count option.

Make the snapshot length, capture count, maximum file size, and capture
duration options into a combination of a check box and a spin button.
If the check box is not checked, the limit in question is inactive
(snapshot length of 65535, no max packet count, no max file size, no max
capture duration); if it's checked, the spinbox specifies the limit.
Default all of the check boxes to "not checked" and all of the spin
boxes to small values.

Use "gtk_toggle_button_get_active()" rather than directly fetching the
state of a check box.

svn path=/trunk/; revision=4709
2002-02-08 10:07:41 +00:00
Guy Harris ee5ca25d31 Include files from the "epan" directory and subdirectories thereof with
"epan/..." pathnames, so as to avoid collisions with header files in any
of the directories in which we look (e.g., "proto.h", as some other
package has its own "proto.h" file which it installs in the top-level
include directory).

Don't add "-I" flags to search "epan", as that's no longer necessary
(and we want includes of "epan" headers to fail if the "epan/" is left
out, so that we don't re-introduce includes lacking "epan/").

svn path=/trunk/; revision=4586
2002-01-21 07:37:49 +00:00
Guy Harris 0a03b0f73e Add a preferences page for the name resolution flags.
Separate the preferences value for those flags and the name resolution
code's value into separate variables; this means that the resolution
code no longer depends on the preferences code, and may let us
eventually have the current setting and the preference setting differ
(so that a user can temporarily override the preference setting without
causing subsequent saves of the preferences to save the temporary
value).

Add routines to create various types of widgets for preferences, and to
fetch the values for "enumerated" preferences, and use them both in the
code to handle hardwired preference pages and table-driven preference
pages.

svn path=/trunk/; revision=4536
2002-01-13 20:35:12 +00:00
Guy Harris 1aadf9cfc2 Label the window popped up by "Capture->Start" "Capture Options", not
"Capture Preferences", to avoid confusion with the "Capture" item in the
"Preferences" dialog (which sets the initial default values for the
"Capture Options" dialog).

svn path=/trunk/; revision=4523
2002-01-11 08:55:02 +00:00
Guy Harris b3f81eb30c Separate the promiscuous mode, "Update list of packets in real time",
and "Automatic scrolling in live capture" options from the preference
settings for them, so that the preference settings affect the initial
values of those options, but changing those values in a capture don't
affect the preferences, and don't automatically get saved when you save
the preferences.

If we're building without libpcap, don't have an "Automatic scrolling in
live capture" option anywhere.

svn path=/trunk/; revision=4514
2002-01-10 11:05:50 +00:00
Guy Harris 9357047df5 Add a preferences page for capture preferences, so that the user can
directly edit the capture preferences, rather than only being able to
set them implicitly from the values for the most recent capture.

Add a preferences item for the interface on which to capture.

Get rid of some unused variables.

svn path=/trunk/; revision=4510
2002-01-10 07:43:39 +00:00
Guy Harris 5cc85c2426 Check for invalid maximum packet count values.
svn path=/trunk/; revision=4368
2001-12-09 03:20:19 +00:00
Guy Harris c95680e052 When making the "number of ring buffer files" spin button sensitive or
insensitive, make its label sensitive or insensitive too.

When "update list of packets in real time" mode is on, make the ring
buffer mode toggle button, and the "number of ring buffer files" spin
button, insensitive, as ring buffer mode is not supported in "update
list of packets in real time" captures.

When "update list of packets in real time" mode is off, make the
auto-scroll mode button insensitive, as auto-scroll mode is meaningless
unless you're doing an "update list of packets in real time" capture.

Bundle all the sensitivity setting into a single common routine.

Make "ring buffer" two words.

svn path=/trunk/; revision=4325
2001-12-04 09:46:01 +00:00
Guy Harris 8032fa8a1b Make the bytes-written information from Wiretap a long, as we allow
files to get that big.

From Thomas Wittwer and Matthias Nyffenegger:

Support for "ring buffer mode", wherein there's a ring buffer of N
capture files; as each capture file reaches its maximum size (the ring
buffer works only with a maximum capture file size specified), Ethereal
rolls over to the next capture file in the ring buffer, replacing
whatever packets might be in it with new packets.

svn path=/trunk/; revision=4323
2001-12-04 08:26:00 +00:00
Guy Harris a1660d6d3a Support for stopping capture at specified capture file size or capture
duration, from Thomas Wittwer and Matthias Nyffenegger.

svn path=/trunk/; revision=4322
2001-12-04 07:32:05 +00:00
Guy Harris 40b22f317b Wrap calls to "pcap_datalink()" in a routine that attempts to compensate
for AIX 5.x's non-standard libpcap, where "pcap_datalink()" doesn't
return DLT_ values, it returns RFC 1573 ifType values.

Put that wrapper, and the routine to get the interface list, in a
separate file, for packet-capture utility routines, so not everybody who
includes "util.h" needs to include <pcap.h>.

Fix up the Wiretap hack for dealing with said incompatibility to use the
correct ifType value for Token Ring.

svn path=/trunk/; revision=4184
2001-11-09 07:44:51 +00:00
Guy Harris 8b16a79d8f Add the Ethereal Web site's mirror of WinPcap to the dialog popped up if
you try to capture on Windows without having WinPcap installed.

svn path=/trunk/; revision=4113
2001-10-31 07:11:08 +00:00
Guy Harris f2cb0c704d The Wiretapped.net mirror is OK again (it was a problem with the
mirroring procedure, due to the Politecnico di Torino site's IIS not
being configured to allow the relevant "virtual directories" to be
listed, thus keeping Wiretapped.net from figuring out what files were
there and whether they've changed), so put back the references to it.

svn path=/trunk/; revision=3976
2001-09-29 19:56:08 +00:00
Guy Harris 6515004633 Sigh. The wiretapped.net site appears to have an old version of
WinPcap's installer (it dates back to May, meaning it may be a beta of
2.2 or may even be 2.1), so don't suggest that people go there.

svn path=/trunk/; revision=3964
2001-09-28 07:50:48 +00:00
Guy Harris c2d19c1ceb Make the message popped up if you try to do a capture on a Win32 machine
when wpcap.dll couldn't be loaded more detailed, in the hopes that it'll
reduce the chances that somebody will see that message and not know what
to do.  Also, mention the Wiretapped.net mirror of the WinPcap site, as
the WinPcap site is all-too-often down due to networking glitches.

svn path=/trunk/; revision=3955
2001-09-26 20:02:36 +00:00
Guy Harris 6ee04dad33 Support for "-N" flag enabling selected forms of name resolution, from
Joerg Meyer.

Support for saving to the preferences file the settings for all types of
name resolution.

Do a case-insensitive check for "true" and "false" in Boolean preference
settings.

svn path=/trunk/; revision=3489
2001-05-31 08:36:46 +00:00
Guy Harris 963de49427 Free the string you "g_strdup()"ed, rather than handing "g_free()" the
null pointer that provoked you to free the string.

svn path=/trunk/; revision=3485
2001-05-31 05:33:15 +00:00
Guy Harris f8c9764894 There's no "enable name resolution in captures" preference in Ethereal,
and never was - there's only an Ethereal-wide "enable name resolution"
preference.  Name it just "name_resolve".

Replace all tests of "g_resolving_actif" with tests of
"prefs.name_resolv", and replace all code that sets "g_resolving_actif"
with code that sets "prefs.name_resolv", so that the setting of
"prefs.name_resolv" actually affects whether names are resolved or not.

svn path=/trunk/; revision=3300
2001-04-15 03:37:16 +00:00
Jeff Foster 78ce39994c Added the ethereal capture preferences to the preference file.
svn path=/trunk/; revision=3298
2001-04-13 14:59:30 +00:00
Gilbert Ramirez 9fc1e0261b Win32 build fix, show "0.5.2 (WinPcap 2.1)" as the libpcap version
for Win32, and show a slightly more informative (i.e., geared to the
user) help message when trying to capture without having WinPcap installed.

svn path=/trunk/; revision=3261
2001-04-05 05:58:05 +00:00
Gilbert Ramirez a817e97015 Now that WinPcap is a DLL, I can load it at run-time rather than load-time.
That means that I no longer need to distribute capture and non-capture
versions of Ethereal for Win32; one version (compiled with WinPcap headers)
can run on systems with or without WinPcap.

For systems that don't have WinPcap, instead of disabling the Capture
menu, Capture|Start brings up a dialogue informing the user that wpcap.dll
was not loadable, and gives a URL to the WinPcap home page.

svn path=/trunk/; revision=3249
2001-04-03 05:26:27 +00:00
Guy Harris 00fcdc0900 There's no need for a member of a "capture_file" structure holding a
compiled capture filter program, so remove it, and remove the include of
<pcap.h> from "file.h"; instead, have local "struct bpf_program"
structures where needed, and have those files that need stuff from
<pcap.h> include it.

This cleans stuff up a bit, and should eliminate a pile of compile
warnings with Visual C++ due to <pcap.h> and some GTK+/GLib header file
(or files they include) both defining "inline".

svn path=/trunk/; revision=2954
2001-01-28 23:56:29 +00:00
Guy Harris 88d157ef96 Add a dialog box for constructing expressions that test a field in the
display tree, based on Jeff Foster's dialog box for selecting fields.

Make the dialog box for browsing filters into a dialog box for
constructing filters; make the "Apply" button and the "OK" button apply
the filter in the text entry box in the dialog, not the currently
selected filter (selecting a filter puts it in that text entry box, but
the user may edit it afterwards, or may use the aforementioned dialog
box to construct a filter not in the list).

Get rid of extra declarations of "m_r_font" and "m_b_font" in
"proto_draw.c"; they're declared in "gtk/gtkglobals.h", which it includes.

svn path=/trunk/; revision=2805
2001-01-02 01:32:21 +00:00
Guy Harris fb84384942 Move the declaration of "g_resolving_actif" from the top-level
"globals.h" file to "epan/resolv.h", as it's exported by
"epan/resolv.c", have files that use "g_resolving_actif" include
"resolv.h", and don't have "epan/resolv.c" include "globals.h" so that
it doesn't drag in, for example, headers that, in turn, drag in GTK+
headers.

svn path=/trunk/; revision=2517
2000-10-19 22:59:24 +00:00
Guy Harris 54ecbe2d4e Santeri Paavolainen's patch to add a "Capture->Stop" menu item to let
you stop an "Update list of packets in real time" capture from the main
window as well as from the capture statistics dialog.

svn path=/trunk/; revision=2487
2000-10-11 06:01:16 +00:00
Guy Harris 00b4224ee0 Add a "-p" command-line option, and a checkbox in the "Capture
Preferences" dialog box, to control whether to put the interface in
promiscuous mode or not; Debian bug #34376 asked for this.

svn path=/trunk/; revision=2439
2000-09-15 05:32:49 +00:00
Laurent Deniel a77af93938 Cosmetic changes.
Add a table so that the first 4 rows of the capture dialog
are correctly aligned.

Remove the unneeded hboxes.

svn path=/trunk/; revision=2353
2000-08-23 20:55:44 +00:00
Guy Harris 56697db466 Bleah. What was I thinking? "dlg_window_new()" should take the title
for the dialog window as an argument (as various dialog creators in GTK+
do), not oblige every caller of it to cut-and-paste a
"gtk_window_set_title()" call after it.

svn path=/trunk/; revision=2345
2000-08-23 06:56:31 +00:00
Laurent Deniel 6a480953a9 Miscellaneous code cleaning
- add <stdarg.h> or <varargs.h> in snprintf.h
  and remove those inclusions in the other #ifdef NEED_SNPRINTF_H codes

- remove the check of multiple inclusions in source (.c)  code
  (there is a bit loss of _cpp_ performance, but I prefer the gain of
   code reading and maintenance; and nowadays, disk caches and VM are
   correctly optimized ;-).

- protect all (well almost) header files against multiple inclusions

- add header (i.e. GPL license) in some include files

- reorganize a bit the way header files are included:

  First:
  #include <system_include_files>
  #include <external_package_include_files (e.g. gtk, glib etc.)>
  Then
  #include "ethereal_include_files"

  with the correct HAVE_XXX or NEED_XXX protections.

- add some HAVE_XXX checks before including some system header files

- add the same HAVE_XXX in wiretap as in ethereal

Please forgive me, if I break something (I've only compiled and regression
tested on Linux).

svn path=/trunk/; revision=2254
2000-08-11 13:37:21 +00:00
Guy Harris 024c2d72fe Use ESD_TYPE_CRIT for most errors (the model used by various GUIs seems
to use "warning" dialog boxes only to warn the user "if you do that, bad
things may happen" *and* to offer them the option either to drive on or
quit, so perhaps ESD_TYPE_CRIT should be used for all errors).

However, put "Ethereal: Error" rather than "Ethereal: Critical" in the
title bar, in the hopes that it'll make it clearer that Something Bad
Happened.

If the user specifies that captures should be saved to a user-specified
file rather than a temporary file, report errors trying to create that
file with "file_open_error_message()".

Make the "for_writing" argument to "file_open_error_message()" a
"gboolean", as it's either TRUE (if the file is being opened for
writing) or FALSE (if it's being opened for reading).

Report EISDIR as "XXX is a directory (folder), not a file.".

svn path=/trunk/; revision=2143
2000-07-20 05:10:02 +00:00
Guy Harris 105d0f4f70 Add a "dlg_window_new()" routine, which creates a GTK_WINDOW_DIALOG
window and makes it transient for the top-level window; the
transient-for at least provides a hint to X window managers to

	minimize the dialog if the main window is minimized;

	keep the dialog on top of the main window in the Z order for
	windows;

	perhaps (if there are any window managers that actually *do*
	this) even put it atop the main window in the X-Y plane (KWM
	doesn't and I seem to remember that the Exceed X server for
	Windows doesn't).

It's generally considered the Right Thing To Do for dialog boxes.

Use that routine to create dialog boxes, rather than doing it directly
in the code for that dialog box.

svn path=/trunk/; revision=2112
2000-07-05 02:45:42 +00:00
Guy Harris 7fbf320b8a Patch from Ben Fowler to rename the global variable "cf" to "cfile", to
make it easier to use grep to find all references to it without getting
a lot of false hits and to check, after allocating the memory chunk for
"frame_data" structures, that the allocation succeeded.

svn path=/trunk/; revision=2092
2000-06-27 04:36:03 +00:00
Guy Harris f3eddb46cc Changes from Graham Bloice to support "Update list of packets in real
time" during captures on Win32.

svn path=/trunk/; revision=2074
2000-06-15 08:02:43 +00:00
Guy Harris 9bb3a841e3 Catch the ESC key in the file selection dialog boxes popped up for
"File->Open", "File->Save As", and the "File:" buttons in the Capture
Preferences and Print dialog boxes, and make it cancel the file
selection dialog box.

svn path=/trunk/; revision=1921
2000-05-08 07:13:40 +00:00
Guy Harris be87df37bf Set up the buttons in the "Capture Preferences" dialog box to use
mnemonics.

Give the button, in the "Display Options" dialog box, that controls
whether name resolution is enabled or not the same label ("Enable name
resolution") as the equivalent button in the "Capture Preferencs" dialog
box.

svn path=/trunk/; revision=1920
2000-05-08 05:51:37 +00:00
Guy Harris f0991d4a51 Connect the capture preferences dialog box and any file selection dialog
box it has open, so that:

	if the capture preferences dialog box goes away, so does the
	file selection dialog box (as it no longer has a text widget
	into which it can stuff the selected file name);

	if the "File:" button is clicked when there's already a file
	selection dialog box open, we just reactivate that existing
	dialog box rather than popping up a new one.

svn path=/trunk/; revision=1919
2000-05-08 05:42:54 +00:00
Guy Harris 4509614da1 Make the "Capture Preferences" dialog box use the new utilities to make
the Return key start the capture and make the Esc key cancel the dialog
box.

svn path=/trunk/; revision=1904
2000-05-03 07:09:40 +00:00
Gilbert Ramirez 0bc96179d8 Disable "Update list of packets in real tiem" and
"Automatic scrolling in live capture" for Win32.

svn path=/trunk/; revision=1817
2000-04-07 15:37:59 +00:00
Guy Harris c6e50f9bc9 Split "filter_dialog_cb()" into "filter_dialog_cb()", which pops up a
"global" dialog box when "Edit:Filters" is selected, so that the list of
filters can be edited, and "filter_browse_cb()", which pops up a dialog
box associated with a "Filter:" button and a text entry widget attached
to that button, so that a filter can be selected or saved (although it
also supports the same editing that the "global" dialog box does).

Have "filter_dialog_cb()" connect the window in which the "Filter:"
button lives and the filter dialog box, so that:

	if the window in which the "Filter:" button lives goes away, so
	does the filter dialog box (as it no longer has a text widget
	into which it can stuff the selected filter);

	if the "Filter:" button is clicked when there's already a filter
	dialog box open, we just reactivate that existing dialog box
	rather than popping up a new one.

Also keep a pointer to the "global" filter dialog box, so that we also
arrange that there's only one of them (by reactivating the existing on
if "Edit:Filters" is selected when there's already a "global" filter
dialog box open).

Keep around pointers to the dialog boxes that contain the "Filter:"
buttons, so that we can arrange that there be only one of them (that was
a side-effect of an earlier attempt at fixing the problems described
above, but it's still useful for keeping multiple competing dialog boxes
from being open - there's more of that to be done).

Make the pointer to the "Open Capture File" dialog box widget static to
"file_dlg.c" - nobody outside of "file_dlg.c cares about it.

svn path=/trunk/; revision=1774
2000-04-01 12:03:42 +00:00
Guy Harris 2cad7bc346 Make the routines internal to the filter-editing dialog box static.
Declare the one routine exported by "gtk/filter_prefs.c" in
"gtk/filter_prefs.h" rather than in "gtk/main.h".  Declare
"E_FILT_TE_PTR_KEY" there, as well, rather than in "prefs_dlg.h", as the
filter-editing dialog box is no longer a preference tab.

Don't include "prefs_dlg.h" unless the stuff declared therein is of
interest.

Fix "gtk/find_dlg.c" to fire up the filter-editing dialog box, not the
no-longer-extant preferences tab for filters, if the "Filter:" button is
clicked.

svn path=/trunk/; revision=1619
2000-02-12 06:46:54 +00:00
Guy Harris 766e37db65 Put into the "Capture Preferences" dialog box a check box to control
whether, in a live capture that updates the display as packets arrive,
the packet list pane should scroll to show the most recently captured
packets or not.

svn path=/trunk/; revision=1506
2000-01-18 09:25:04 +00:00
Guy Harris 7f30e566a0 Move the routine to get a list of the network interfaces on the system
to "util.c", and provide a routine to free that list as well.

When picking an interface on which to do a capture (if no "-i" flag was
specified), use that routine, and pick the first interface on the list.

svn path=/trunk/; revision=1495
2000-01-16 02:48:12 +00:00
Guy Harris 9607209dcc Don't bother checking whether the filter string is empty - just use it
even if it's empty, rather than using an empty string instead of it if
it's empty.

Also, "gtk_entry_get_text()" appears, from the documentation, always to
return a non-null pointer (and it returned a non-null pointer when I
started a capture with an empty filter string); don't supply a null
string if it's null, just do a "g_assert()" to make sure it's non-null.

Put in a comment explaining why we aren't trying to be clever and
detecting an empty filter string and setting "cf.filter" to NULL if it's
empty.

svn path=/trunk/; revision=1423
2000-01-06 05:09:01 +00:00
Gerald Combs 5b8384f5e1 When initializing a capture filter, assign a pointer to an empty string
instead of NULL.

svn path=/trunk/; revision=1422
2000-01-05 22:31:46 +00:00
Guy Harris 4096029a66 Take the "simple_dialog()" stuff out of "ui_util.h" and "gtk/ui_util.c",
and move it to "simple_dialog.h" and "gtk/simple_dialog.c".

svn path=/trunk/; revision=1414
2000-01-03 06:59:25 +00:00
Guy Harris b96ac8c220 I thought I'd seen a problem with the combo box in the "Capture:Start"
dialog box if we hadn't found any interfaces on which we could capture,
but perhaps the problem was that "gtk_combo_set_popdown_strings()"
doesn't like it if you set the list of items to a NULL list - if you
don't set it at all, you get a combo box with only one blank entry in
the list, but you don't seem to get complaints from GTK+ 1.2.6, at
least.

Pop up the "Capture:Start" dialog box even if we don't find any
interfaces on which we could capture; at least this way, they won't just
get confronted with a

	There are no network interfaces that can be opened.
	Please check to make sure you have sufficient permission
	to capture packets.

message box and no way to give us any more information other than "it
said 'There are no network interfaces that can be opened...'" - they can
at least try the interfaces that *should* work, and report the error
messages they get, giving us a better chance at figuring out what the
problem is.

Trim white space from the entry in that combo box, and, if there isn't
anything other than possibly white space, pop up a

	You didn't specify an interface on which to capture packets.

message box and leave the dialog box up so that the user can supply an
interface name.

svn path=/trunk/; revision=1373
1999-12-23 09:31:09 +00:00
Guy Harris 7537c5cc73 Jerry Talkington's patch to remove the filter stuff from
"Edit:Preferences" and put it directly under "Edit:Filters", and to add
an "Apply" button to it, which makes the currently selected filter the
current filter and applies it to the current capture.

svn path=/trunk/; revision=1275
1999-12-10 06:28:24 +00:00
Guy Harris 80618858d6 Move the GTK+ implementations of various UI utilities out of "util.c"
into "gtk/ui_util.c", and move the declarations of those UI utilities
out of "util.h" into "ui_util.h".  (The header file is in the top-level
directory, rather than the "gtk" directory, because it declares
window-system-independent interfaces to routines with
window-system-dependent implementations.)

Add to "gtk/ui_util.c" a routine to set the window and icon title.

Use that routine to make the title of an Ethereal top-level window be

	{filename} - Ethereal

if there's a capture open, and have "{filename}" be "<capture>" if it's
a temporary capture file.

svn path=/trunk/; revision=1255
1999-12-09 07:19:20 +00:00
Guy Harris 4c691e81ad It appears that the IRIX SIOCSNOOPLEN "ioctl", as used by "libpcap" to
set the capture length on IRIX, may fail if the capture length supplied
is too large, rather than just truncating it.  Use MIN_PACKET_SIZE,
rather than WTAP_MAX_PACKET_SIZE, in our sample open.

Let's hope some *other* platform doesn't barf if the capture length is
too *small*....

(Sigh.  Would that "pcap_open_live()" accepted 0 as a capture size,
meaning "give me the whole packet".  Unfortunately, it doesn't, so IRIX
users may have to crank the capture size back in the capture dialog
box.)

svn path=/trunk/; revision=1239
1999-12-07 22:11:02 +00:00
Guy Harris cdee2e23cb Get rid of an unused #define.
svn path=/trunk/; revision=980
1999-11-06 02:05:32 +00:00
Guy Harris 37aa821603 Wrap stufff that's used only if we have "libpcap" in "#ifdef
HAVE_LIBPCAP"/"#endif".

svn path=/trunk/; revision=754
1999-10-02 19:33:14 +00:00
Guy Harris efe95352f9 Add a file name field to the "Capture/Start" dialog box; if it's blank,
the capture will be done to a temporary file, otherwise it'll be done to
the specified file.

svn path=/trunk/; revision=749
1999-10-02 07:13:20 +00:00
Guy Harris 3d2cc0cb06 Have "do_capture()" take, as an argument, a pointer to the name of the
file to which to write the capture; if it's NULL, create a temporary
file and use that.

Have "-w" set a local variable, which starts out null, and, for "-k"
captures, call "do_capture()" and pass it that local variable as an
argument; this lets you do "-k" without "-w", which makes it use a
temporary file for the capture.

This means "run_capture()" no longer serves a useful purpose, as its
only caller is "do_capture()"; swallow it into "do_capture()".

svn path=/trunk/; revision=748
1999-10-02 06:26:53 +00:00
Laurent Deniel a673e8bb2c Added name resolution in GUI part:
- Capture->Start->"Active name resolution"

Allows the user to turn on/off name resolution
during a live capture.

- Display->Options->"Name resolution"

Turn on/off name resolution for the displayed
data (or during the -S mode).
E.g. clicking on a packet captured with
resolution disabled will resolve names in
the detailed list if this option is set.
And applying or resetting a display filter
allows the update of the packet list as well.

svn path=/trunk/; revision=726
1999-09-26 14:40:01 +00:00
Guy Harris b2b8994f15 If we forcibly turn off "fork_mode" if the user doesn't enable "Update
list of packets in real time" in the "Capture/Start" dialog box,
"ethereal -F" won't work - you get your choice of non-forked capture or
"-S".

Don't have "fork_mode" track "sync_mode"; instead, in those places where
we check for "fork_mode", check for "sync_mode" as well.

svn path=/trunk/; revision=711
1999-09-23 07:20:20 +00:00
Guy Harris 12d3278d0b Move the toolkit-independent code to create a temporary capture file,
and to fork off and run a separate copy of "ethereal" for "-S" and "-F"
captures or just call "capture()" otherwise, out of "gtk/capture_dlg.c"
and into a routine in "capture.c".

If the attempt to create said temporary capture file fails, pop up a
dialog box and don't do the capture.

Have the child capture process send a message upstream after it either
successfully starts the capture and syncs out the header of the capture
file, or fails to start the capture; the message indicates whether it
succeeded or failed, and, if it failed, includes a failure message.
This:

	avoids the use of a signal, and thus means we don't have to
	worry about whether to capture the signal, or whether to start
	or stop capturing depending on whether this particular capture
	is in sync mode or not;

	lets us pop up the message box for the error in the parent
	process if we're in sync mode, rather than doing it in the
	child, which didn't work well.


Add a check button to the Capture/Start dialog box, so that we can
control, for each capture, whether it's to be done in sync mode or not.

svn path=/trunk/; revision=708
1999-09-23 06:27:27 +00:00
Guy Harris 4c6f416754 "capture.c" doesn't do socket "ioctl"s any more - the code to do that is
now in "gtk/capture_dlg.c" - so it doesn't need to include
<sys/sockio.h> on, for example, Solaris...

...but "gtk/capture_dlg.c" does need to include it.

"gtk/capture_dlg.c" also may need to include "snprintf.h", as it uses
"snprintf()".

svn path=/trunk/; revision=655
1999-09-11 06:23:28 +00:00
Gilbert Ramirez 8617c58f3c More shuffling of GTK-related routines to gtk subdirectory.
svn path=/trunk/; revision=636
1999-09-09 03:32:03 +00:00