Commit Graph

188 Commits

Author SHA1 Message Date
Guy Harris 2de9620eea In Tethereal, don't save to a temporary file if "-w" isn't specified,
even if doing a live capture; just print the packets without saving
them.

In dumpcap:

	default to the capturing the entire packet;

	don't do the "Press any key" stuff when debugging on UN*X;

	do console logging (to the standard error) even when we're
	running as the capture child (the sync pipe should only be the
	standard output, not the standard error).

svn path=/trunk/; revision=17786
2006-04-03 00:52:59 +00:00
Ronnie Sahlberg e8c497c955 when including menu.h we also need to include stdio.h to get FILE
svn path=/trunk/; revision=17391
2006-02-23 21:33:59 +00:00
Jaap Keuter 1badd16e6b Fix bug 741. Menu/Toolbar follow auto scroll checkbox in capture options.
svn path=/trunk/; revision=17389
2006-02-23 20:53:20 +00:00
Ulf Lamping 79053183c5 remove dependencies to pcap.h, so getting an idea what needs to be done by dumpcap in addition to the things already done now
various dumpcap related code cleanup: mainly #include's and capture engine related stuff

svn path=/trunk/; revision=17327
2006-02-17 02:18:48 +00:00
Guy Harris eaee2b68c5 Constify a bunch of arguments and variables, to squelch compiler
warnings.

Include "wiretap/libpcap.h" in "capture_loop.h", to get its declarations
of data structures for headers in libpcap files.  This lets us remove
the includes of "wiretap/libpcap.h from files including
"capture_loop.h".

Make "log_func_ignore()" in "tethereal.c" static, and declare some of
its arguments unused.  Also get rid of an unused variable.

Include <pcap.h> before including "wiretap/wtap-capture.h", to declare
"struct pcap_pkthdr".

svn path=/trunk/; revision=16791
2005-12-14 07:29:38 +00:00
Ulf Lamping 47ae9fa7bd add a short comment to cant_load_winpcap_err() and use it in gtk/capture_dlg.c
svn path=/trunk/; revision=16693
2005-12-06 01:04:55 +00:00
Ulf Lamping 7e3a24418c rename pcap-....c/.h files to capture-pcap-....c/.h
this way, the capture prefix will "logically" group the files together and file browsers will also group them

we may want to move the files into a subdir capture later

svn path=/trunk/; revision=16691
2005-12-06 00:07:13 +00:00
Ulf Lamping 4443681a9e fix Ethereal so command line capture parameter will work with kilobytes (again)
remove Byte(s) from the dropdown list of filesizes, this doesn't make sense
replace 1000 with 1024, as all (modern?) file managers are based on 1024 bytes for a kilobyte (the old KB vs. KiB controversy)

svn path=/trunk/; revision=16149
2005-10-07 03:34:27 +00:00
Ulf Lamping aa7a238a42 fix cant_load_winpcap_err() parameter
svn path=/trunk/; revision=16123
2005-10-05 06:05:35 +00:00
Guy Harris bfcbcfb4ea Add a "capture_errs.c" routine to cough up error messages for capture
problems, and use the first routine in it in multiple places.

Get rid of DISSECTOR_SUPPORT_INCLUDES - just add its contents to
ETHEREAL_COMMON_INCLUDES.

svn path=/trunk/; revision=16109
2005-10-04 06:25:01 +00:00
Ulf Lamping 8b696f70b8 Win32: don't crash if Capture/Start is clicked and WinPcap is not installed.
svn path=/trunk/; revision=16093
2005-10-03 20:04:06 +00:00
Ulf Lamping eafbbbcabb renamed ui_util.c/.h to gui_utils.c/.h to prevent confusion with identical named ui_util.h in / dir
svn path=/trunk/; revision=15465
2005-08-20 12:09:48 +00:00
Jörg Mayer 4e1f4b18ab More char -> const char warning fixes.
Removed (very few) casts that only change the warning message
  but don't remove it (with gcc-4).

svn path=/trunk/; revision=15227
2005-08-05 20:59:08 +00:00
Guy Harris e6dfe72d71 Update URLs and domain names that refer to the WinPcap site.
svn path=/trunk/; revision=14540
2005-06-03 09:55:28 +00:00
Ulf Lamping 073da09b29 fix #117
give a warning, if user never selected an interface before

svn path=/trunk/; revision=14208
2005-04-27 20:52:56 +00:00
Ulf Lamping 5115a265a9 fix some minor bugs with the current interface name:
-always show descriptive string in combo box
-correct the initialization, so cancelling the option dialog won't make trouble

svn path=/trunk/; revision=14144
2005-04-19 22:32:52 +00:00
Ulf Lamping 9b5d52aab6 ask for unsaved file when using the new start capture feature,
ask for unsaved file when really starting the capture, not already when showing the options dialog,
use the start capture icon in the capture options dialog (instead of simply Ok)

svn path=/trunk/; revision=14142
2005-04-19 21:02:01 +00:00
Ulf Lamping 597305cb31 add some comments what all the functions going to do...
svn path=/trunk/; revision=14131
2005-04-19 00:23:31 +00:00
Ulf Lamping 83dc83abd8 rename capture_clear() to capture_restart()
statusbar update should work now even in capture error case

svn path=/trunk/; revision=14105
2005-04-16 20:08:00 +00:00
Ulf Lamping 9718569b63 add some new capture and filter related handcrafted (toolbar) icons
add "new" capture options feature, which will act like old capture start, and change capture start option (for immediately capture)

rename Capture/Clear to Capture/Restart

svn path=/trunk/; revision=14083
2005-04-15 07:41:15 +00:00
Ulf Lamping 7e9cedfed8 capture engine:
add a new feature to clear the currently captured packets and restart the capture with the previous parameters

various code cleanup and minor bugfixes

Win32: use millisecond resolution in capture_loop, to smooth screen update a bit (500ms instead of 1000ms)

svn path=/trunk/; revision=14059
2005-04-12 21:44:55 +00:00
Ulf Lamping 06ef0a3b52 it should now be possible to use "Update packets in real time" even if used with one of the "Multiple files" option.
If this is used together with an option where input files changes too fast (e.g. new file every second), capturing will be (hopefully) stopped.

I've replaced the former capture pipe message format into a somewhat more general format to remove a lot of confusion.


svn path=/trunk/; revision=14054
2005-04-12 00:54:52 +00:00
Ulf Lamping 2d1981f08b various (minor) capture code cleanup
svn path=/trunk/; revision=13957
2005-03-28 18:04:09 +00:00
Ulf Lamping b64ebb05c2 fix Solaris build (I've removed O_BINARY)
rename sync_mode to real_time_mode, as we using sync_mode all the time now, so the name is misleading

svn path=/trunk/; revision=13956
2005-03-28 16:14:34 +00:00
Ulf Lamping 008d4b8106 code cleanup: the term filter_list was used with different meanings throughout the code, and the filter_list of the color_filters is "global".
use appropriate prefixes to avoid confusion and bugs

svn path=/trunk/; revision=13905
2005-03-25 22:52:45 +00:00
Ulf Lamping 82977c867f make it possible to use multiple capture files with "duration based switching" only
svn path=/trunk/; revision=13893
2005-03-24 08:55:23 +00:00
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