aboutsummaryrefslogtreecommitdiffstats
path: root/capture_loop.c
AgeCommit message (Collapse)AuthorFilesLines
2005-05-26fix #125: as suggested, the data in rechdr has to be kept over several calls ↵Ulf Lamping1-2/+2
to capture_loop_dispatch, so put it in the loop_data svn path=/trunk/; revision=14442
2005-05-26some cleanup of capture error notification handlingUlf Lamping1-1/+1
svn path=/trunk/; revision=14441
2005-05-26use the log features of the GLib to have verbose output of the capturing ↵Ulf Lamping1-8/+83
engine, e.g. GLib provides different domains for different submodules. Output more verbose than warning level will be disabled by default (just like before). use the console_log_handler in main.c for win32 AND unix now Currently use the log for the capturing engine (only), as I desperately needed a log output for debugging. svn path=/trunk/; revision=14438
2005-05-12Use "pcap_get_selectable_fd()" if we have it, and if it returns -1,Guy Harris1-32/+52
don't do a "select()". svn path=/trunk/; revision=14358
2005-04-30(hopefully) removed various gcc warningsUlf Lamping1-1/+1
svn path=/trunk/; revision=14241
2005-04-16beautify an error messageUlf Lamping1-7/+11
svn path=/trunk/; revision=14101
2005-04-12capture engine: Ulf Lamping1-24/+38
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-12it should now be possible to use "Update packets in real time" even if used ↵Ulf Lamping1-0/+5
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-11fix some error handlingUlf Lamping1-5/+17
fflush new output file (to have at least the pcap header on disk) before sending the corresponding message to the capture parent svn path=/trunk/; revision=14052
2005-04-10fix a typoUlf Lamping1-1/+1
svn path=/trunk/; revision=14041
2005-04-10Win32 only bugfix: as using TerminateProcess is the brute force way and ↵Ulf Lamping1-0/+17
sometimes clipped packets in the middle, now using a pipe called signal_pipe from the parent to the child for this. On unix we're using kill() for this, which simply signals the child, but this isn't available on win32. svn path=/trunk/; revision=14040
2005-04-10Fix indentation.Guy Harris1-10/+10
svn path=/trunk/; revision=14034
2005-03-28various (minor) capture code cleanupUlf Lamping1-0/+16
svn path=/trunk/; revision=13957
2005-03-28fix Solaris build (I've removed O_BINARY)Ulf Lamping1-13/+10
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-28remove capture_child flag from capture_opts as it's no longer requiredUlf Lamping1-37/+8
svn path=/trunk/; revision=13954
2005-03-28a lot more capture engine code cleanupUlf Lamping1-21/+76
most notably: - moved opening of safe_file to the capture child (capture_loop.c) - removed save_file_fd from capture_opts (no longer need to have it global) svn path=/trunk/; revision=13953
2005-03-28major capture engine rework: use two task model for EVERY capture modeUlf Lamping1-0/+26
rework of the -b command line parameter (for Ethereal and Tethereal) svn path=/trunk/; revision=13949
2005-03-23If we have "pcap_freecode()", use it to free the instructions for a BPFGuy Harris1-0/+6
filter after installing the filter. Set HAVE_PCAP_LIB_VERSION if we're building with WinPcap 3.1; it's not present in earlier versions, but is present in current 3.1 betas. Check HAVE_PCAP_LIB_VERSION when building capture-wpcap.c. svn path=/trunk/; revision=13872
2005-03-21Add a capture_fr() routine when capturing on Frame Relay.Guy Harris1-0/+5
svn path=/trunk/; revision=13845
2005-02-23pass child capture filename to parent process (name currently unused) and ↵Ulf Lamping1-0/+1
some fork_child cleanup svn path=/trunk/; revision=13482
2005-02-15WinPcap 3.0 might support PPP/WAN capturing on Windows OT, so lump itGuy Harris1-7/+11
together with the pre-3.0 releases. Mention 3.1 beta's support, noting that it's a beta. svn path=/trunk/; revision=13406
2005-02-06Get rid of a few cf_get_ references missed by the previous checkin.Guy Harris1-1/+1
svn path=/trunk/; revision=13325
2005-02-06another two steps towards privilege seperation:Ulf Lamping1-5/+5
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-04remove #include "globals.h" and access to global cfile, use access functions ↵Ulf Lamping1-17/+16
and capture_opts instead svn path=/trunk/; revision=13284
2005-02-04(some) redesign of capture data structures.Ulf Lamping1-10/+10
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-03move capture_file_fd field from capture_file to capture_opts type, as this ↵Ulf Lamping1-4/+4
is the place where it should be svn path=/trunk/; revision=13268
2005-02-03prevent ringbuffer from having to know about capture_file type at all ↵Ulf Lamping1-3/+3
(decoupling dependencies) svn path=/trunk/; revision=13266
2005-01-13fix a bug (reported by Greg Morris) caused by code cleanup (blame it on me): Ulf Lamping1-1/+2
as the total packet count wasn't updated, the capture_info dialog wasn't updated accordingly svn path=/trunk/; revision=13021
2005-01-07From Thomas Boehne: fix a call to use errmsg_len rather than sizeofGuy Harris1-1/+1
errmsg - errmsg is a pointer, so sizeof errmsg is the size of the pointer, not the size of what it points to. svn path=/trunk/; revision=12983
2004-12-29Pass "capture_opts" to "capture_loop_dispatch()", asGuy Harris1-3/+3
"capture_loop_dispatch()" uses it. svn path=/trunk/; revision=12859
2004-12-29move global capture_child flag into capture_optionsUlf Lamping1-17/+18
svn path=/trunk/; revision=12855
2004-12-29Don't use a global capture_opts in the capturing engine (this isn't a good ↵Ulf Lamping1-33/+34
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-29Make the tone of the error messages a bit less formal, by usingGuy Harris1-2/+2
contractions. (Safari does, at least when you're trying to open a file to which you don't have read access.) svn path=/trunk/; revision=12852
2004-12-29Use the "errmsg_len" argument to "capture_loop_open_output()" -Guy Harris1-3/+3
"sizeof(errmsg)', when "errmsg" is a "char *", doesn't give the size of the string to which "errmsg" points, it gives the size of the pointer itself, which is too small. svn path=/trunk/; revision=12851
2004-12-28some code cleanup (comments changed)Ulf Lamping1-1/+7
svn path=/trunk/; revision=12848
2004-12-27a lot of code cleanup/refactoringUlf Lamping1-295/+393
svn path=/trunk/; revision=12846
2004-10-30Move some #defines and #includes around, and add some other #includes,Guy Harris1-2/+21
to make it compile on UN*X. Get rid of some #includes that don't appear to be needed, at least on OS X 10.3 (they might be needed on other platforms). svn path=/trunk/; revision=12453
2004-10-30split capture_loop from capture.c, some more code cleanupUlf Lamping1-0/+1355
svn path=/trunk/; revision=12451