Commit Graph

27 Commits

Author SHA1 Message Date
Guy Harris 39836021f7 Fix indentation.
svn path=/trunk/; revision=14034
2005-04-10 08:31:27 +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 9d6ac60cef remove capture_child flag from capture_opts as it's no longer required
svn path=/trunk/; revision=13954
2005-03-28 15:31:13 +00:00
Ulf Lamping daa67c79ba a lot more capture engine code cleanup
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-28 14:39:31 +00:00
Ulf Lamping 7e78ef354e major capture engine rework: use two task model for EVERY capture mode
rework of the -b command line parameter (for Ethereal and Tethereal)

svn path=/trunk/; revision=13949
2005-03-28 00:19:02 +00:00
Guy Harris 46e1907f13 If we have "pcap_freecode()", use it to free the instructions for a BPF
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-23 01:25:01 +00:00
Guy Harris 839dd9002c Add a capture_fr() routine when capturing on Frame Relay.
svn path=/trunk/; revision=13845
2005-03-21 03:55:50 +00:00
Ulf Lamping b6ab688e0a pass child capture filename to parent process (name currently unused) and some fork_child cleanup
svn path=/trunk/; revision=13482
2005-02-23 22:04:31 +00:00
Guy Harris 1aa4357464 WinPcap 3.0 might support PPP/WAN capturing on Windows OT, so lump it
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-15 03:49:12 +00:00
Guy Harris 60ad11d708 Get rid of a few cf_get_ references missed by the previous checkin.
svn path=/trunk/; revision=13325
2005-02-06 22:19:53 +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 10ee9093c8 remove #include "globals.h" and access to global cfile, use access functions and capture_opts instead
svn path=/trunk/; revision=13284
2005-02-04 08:42:39 +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 9ff19a4c94 move capture_file_fd field from capture_file to capture_opts type, as this is the place where it should be
svn path=/trunk/; revision=13268
2005-02-03 22:48:20 +00:00
Ulf Lamping be0e6a0631 prevent ringbuffer from having to know about capture_file type at all (decoupling dependencies)
svn path=/trunk/; revision=13266
2005-02-03 21:58:33 +00:00
Ulf Lamping cb9be2d997 fix a bug (reported by Greg Morris) caused by code cleanup (blame it on me):
as the total packet count wasn't updated, the capture_info dialog wasn't updated accordingly

svn path=/trunk/; revision=13021
2005-01-13 20:19:49 +00:00
Guy Harris 3defa3be20 From Thomas Boehne: fix a call to use errmsg_len rather than sizeof
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
2005-01-07 13:33:21 +00:00
Guy Harris 4c4d5783d0 Pass "capture_opts" to "capture_loop_dispatch()", as
"capture_loop_dispatch()" uses it.

svn path=/trunk/; revision=12859
2004-12-29 21:29:53 +00:00
Ulf Lamping d9be4670a7 move global capture_child flag into capture_options
svn path=/trunk/; revision=12855
2004-12-29 12:37:06 +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 f1deabed56 Make the tone of the error messages a bit less formal, by using
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-29 01:08:20 +00:00
Guy Harris 85a6bea56e Use the "errmsg_len" argument to "capture_loop_open_output()" -
"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-29 00:51:29 +00:00
Ulf Lamping e321859a86 some code cleanup (comments changed)
svn path=/trunk/; revision=12848
2004-12-28 00:36:06 +00:00
Ulf Lamping 7f666b77a5 a lot of code cleanup/refactoring
svn path=/trunk/; revision=12846
2004-12-27 22:04:49 +00:00
Guy Harris a522ab7fad Move some #defines and #includes around, and add some other #includes,
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-30 23:26:47 +00:00
Ulf Lamping 7445ecfd05 split capture_loop from capture.c, some more code cleanup
svn path=/trunk/; revision=12451
2004-10-30 17:50:51 +00:00