Commit Graph

162 Commits

Author SHA1 Message Date
Ulf Lamping 3a63719e38 another two steps towards privilege seperation:
move another two capture related fields (iface and cfilter) from cfile to capture_opts

also move the handling of capture related command line options from main.c to capture.c, that way a future privilege seperated capture program can use the same code to parse it's command line than Ethereal. 
It might be even possible to share this parser code even with Tethereal, didn't took a closer look at this.

svn path=/trunk/; revision=13320
2005-02-06 21:20:35 +00:00
Ulf Lamping dd71ad695f (some) redesign of capture data structures.
don't use global cfile at all but only an untpyed handle to call the cf_... functions in file.c
move the save_file member from capture_file to capture_opts, as it's only used while capturing and while preparing it

svn path=/trunk/; revision=13276
2005-02-04 01:29:29 +00:00
Ulf Lamping 66ce7f3623 add some more online help functionality and help buttons at various dialog boxes, if a help page *is* available. However, the new help system needs a lot more work before completed.
svn path=/trunk/; revision=13152
2005-01-20 23:17:23 +00:00
Guy Harris 43869b46a8 Rename capture_combo_utils.{c,h} to capture_ui_utils.{c,h}, as the code
in there is for UI functions including, but not limited to, the combo
box in capture dialogs.

svn path=/trunk/; revision=13061
2005-01-16 02:56:28 +00:00
Ulf Lamping 2ed93e96bd Don't use a global capture_opts in the capturing engine (this isn't a good idea). Do some more "housekeeping" in the capturing part.
Hopefully the unspecified forward declaration of capture_options_t in main.h is portable, but buildbot will tell me. This way I need the internals of that struct only at the places I really use it.

svn path=/trunk/; revision=12853
2004-12-29 09:09:35 +00:00
Guy Harris 395bb21901 From Nathan Jennings: add a preference that supplies a prefix for window
titles.

svn path=/trunk/; revision=12657
2004-12-02 11:30:24 +00:00
Guy Harris c0ad4beb9c Change some code that affects g_resolv_flags to set a flag if the check
box for the flag is active and clear it if it's inactive, rather than
clearing all but RESOLV_CONCURRENT and then setting flags if the check
box is active - or, in one case, not clearing any flags due to a typo
and then setting them, so they never get cleared.  This matches what's
done with theresolution flags in some other places.

svn path=/trunk/; revision=12375
2004-10-22 07:07:08 +00:00
Guy Harris 1cc64fbf11 The top-level window's list of capture filter expressions might not yet
exist if no filters have been remembered; don't set the popdown string
list for the filter combo box if the list is empty.

svn path=/trunk/; revision=12367
2004-10-21 19:12:22 +00:00
Ulf Lamping d1a769c20b fix a bug reported by venkata sandeep: capture->start->capture files dialog browse function used FILE_SELECTION_OPEN instead of the correct FILE_SELECTION_WRITE_BROWSE. Now you can (again) select and enter the filename to write capture data to.
svn path=/trunk/; revision=12272
2004-10-12 06:11:30 +00:00
Guy Harris ab9b8d36b5 Save the capture filter in the recent list iff the capture succeeds.
Checking the syntax involves opening a device, which

	1) might not succeed

and

	2) might tie up a BPF device or otherwise consume resources

so we leave it up to the capture operation to do the checking.

svn path=/trunk/; revision=12225
2004-10-07 03:50:16 +00:00
Ulf Lamping 25acc5cd72 Fix a bug reported by Keith A French: No "OK" button for Capture Filter dialog.
Probably caused by the changes of the capture filter drop down box in the capture prepare dialog.

svn path=/trunk/; revision=12222
2004-10-06 17:29:53 +00:00
Guy Harris 51dd2ac334 Make the default capture filter be the last one used, as it was before -
it's a pain to have to keep typing the same filter over and over again
if you're trying multiple captures of the same type of traffic.  At
least with GTK+ 2.x, the text of the filter is selected, so if you start
typing a new filter it'll replace the default filter.

svn path=/trunk/; revision=12212
2004-10-05 23:34:53 +00:00
Ulf Lamping 28c4511d07 from Thomas Palmer: add a combobox for the recently used capture filter strings
svn path=/trunk/; revision=12123
2004-09-28 18:04:15 +00:00
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
Ulf Lamping bec5f63f1c as the interface is usually fixed, or it can be selected by the interface drop down list, grab the keyboard focus at the filter string field.
svn path=/trunk/; revision=12091
2004-09-24 21:19:48 +00:00
Ulf Lamping 6cd11f14ef first steps towards using the User's Guide as Ethereal's help system
svn path=/trunk/; revision=12021
2004-09-16 22:07:03 +00:00
Gerald Combs 4e3b6fb315 Move get_if_name() from gtk/capture_dlg.c to capture_combo_utils.c.
svn path=/trunk/; revision=11888
2004-09-02 21:49:36 +00:00
Guy Harris 3a583aeb59 From Albert Chin: rename resolv.{ch} to addr_resolv.{ch}, so that an
include of <resolv.h> in any system header file gets the system
<resolv.h> (needed for builds on Tru64 with GTK+ 1.2[.x]).

svn path=/trunk/; revision=11615
2004-08-06 19:57:49 +00:00
Ulf Lamping bfd6ace52e renamed filter_prefs to filter_dlg, as the filter settings are (well, for a long time) no longer part of the preferences dialog.
svn path=/trunk/; revision=11436
2004-07-19 21:42:01 +00:00
Guy Harris 2ad97737fe Pull the address (and port and circuit type) stuff out of
"epan/packet_info.h" and put it in "epan/address.h".

Use the AT_ values from "epan/address.h" for address types in the
interface lists rather than having our own FAM_ enums.

svn path=/trunk/; revision=11427
2004-07-19 02:27:17 +00:00
Guy Harris 2aec055c79 Add support for IPv6 addresses for interfaces.
svn path=/trunk/; revision=11411
2004-07-18 18:47:44 +00:00
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