Commit Graph

38 Commits

Author SHA1 Message Date
Ulf Lamping ec246cae54 fix #148: (win32 only) use command line parameter -B to set capture buffer size
svn path=/trunk/; revision=14484
2005-05-30 04:46:25 +00:00
Ulf Lamping 6a853e1bc3 some cleanup of capture error notification handling
svn path=/trunk/; revision=14441
2005-05-26 19:06:01 +00:00
Ulf Lamping 5d404864f2 use the log features of the GLib to have verbose output of the capturing 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-26 17:50:27 +00:00
Ulf Lamping b3b72959a2 forgot to init savefilestring = NULL;
svn path=/trunk/; revision=14435
2005-05-25 22:20:46 +00:00
Ulf Lamping fbe12a9a22 fix #199: encapsulate capture filename, to avoid problems with spaces in the filename (win32 only)
svn path=/trunk/; revision=14432
2005-05-25 17:46:04 +00:00
Ulf Lamping be9bdd1fee (hopefully) removed various gcc warnings
svn path=/trunk/; revision=14241
2005-04-30 15:39:40 +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 61ccc8baf1 various capture code cleanup and fixes:
display filename in statusbar while capturing
print_usage banner fixed
cf_cb_live_capture_prepare no longer needed
rename sync_pipe_do_capture -> sync_pipe_start
bugfix: sync_pipe_input_wait_for_start replaced by former implementation
fix cleanup of old file in capture_input_new_file
fix a tempfile detection bug (named file showed up as tempfile after capture)

svn path=/trunk/; revision=14053
2005-04-11 18:57:19 +00:00
Ulf Lamping 7b7f7e7f9a Win32 only bugfix: as using TerminateProcess is the brute force way and 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-10 16:43:22 +00:00
Ulf Lamping 3ee155a90a refactoring of the capture startup (while the capture parent waits for the child to start)
svn path=/trunk/; revision=14038
2005-04-10 14:29:12 +00:00
Guy Harris 5e096c5c19 Clean up white space, and tweak a comment slightly ("message" in the
error message case referred to the error message text, not the message
on the pipe).

svn path=/trunk/; revision=14035
2005-04-10 08:51:46 +00:00
Ulf Lamping e548ddf904 some minor changes
svn path=/trunk/; revision=13962
2005-03-28 21:35:21 +00:00
Ulf Lamping 0b132c9b1d bugfixes: bring non real-time captures back to former behaviour, other minor fixes
svn path=/trunk/; revision=13961
2005-03-28 21:05:53 +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
Ulf Lamping 399c821254 Another step towards using the parent/child mode for ALL captures.
This is currently still disabled, as we cannot pass all required capture flags to the child process (lack of command line parameters).

svn path=/trunk/; revision=13558
2005-02-28 22:46:49 +00:00
Ulf Lamping f92477f793 if capture filename passed to parent, save it. Will currently take no effect.
svn path=/trunk/; revision=13487
2005-02-24 00:30:32 +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
Lars Roland f3294ee49a change nmake makefiles in /trunk and /trunk/epan so that
object code for libethereal.dll isn't generated by the
makefile in /trunk.

Having no code in /trunk linked into libethereal.dll
anymore, the definition of the macro _NEED_VAR_IMPORT_
can be moved from various source files in /trunk to /trunk/Makefile.nmake .
So do that, too.

svn path=/trunk/; revision=13389
2005-02-13 00:10:15 +00:00
Ulf Lamping 035dd093f7 when building the argv string, use save_file_fd_str instead of save_file_fd to avoid confusion with the capture_opts field
svn path=/trunk/; revision=13343
2005-02-07 20:14:22 +00:00
Guy Harris 9ab2eaa9ce In the child process, capture_opts->fork_child is 0, not -1, so, in that
case, don't attempt to send a signal to the child.

Expand a comment.

svn path=/trunk/; revision=13333
2005-02-07 03:13:51 +00:00
Guy Harris 641106f21d Declare "cf_callback_t" before using it in a further declaration.
Mark the "func" argument to "cf_callback_remove()" as unused.

Get rid of the "iface" argument to "cf_start_tail()", as it's no longer
used.

svn path=/trunk/; revision=13331
2005-02-07 01:32:53 +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 a1a2ae3180 rename kill_capture_child to capture_kill_child to have a common prefix
split drag and drop support out of main.c into new file drag_and_drop.c, to reduce the size of main.c a bit.

Hopefully this won't break unix builds because of missing #include's, I will keep an eye on the buildbot

svn path=/trunk/; revision=13308
2005-02-05 15:35:25 +00:00
Ulf Lamping 9d18adec33 minor enhancements to Guy's last update
svn path=/trunk/; revision=13304
2005-02-05 13:44:27 +00:00
Guy Harris fa3e5609ab Put "cf_status_t" back.
svn path=/trunk/; revision=13303
2005-02-05 12:50:47 +00:00
Ulf Lamping 0861927ce3 huge cleanup of capture file API (functions in file.c/file.h).
This includes: all functions in file.h now have a cf_ prefix, will have doxygen tags, will have the capture_file *cf as the first parameter and I tried to generalize the return values for non trivial functions.

Hopefully, I didn't introduced any new bugs, as I had to change a lot of files...

svn path=/trunk/; revision=13289
2005-02-04 18:44:44 +00:00
Ulf Lamping 3a7097a8fb remove access to global cfile, use access functions and capture_opts instead
svn path=/trunk/; revision=13285
2005-02-04 08:52:38 +00:00
Ronnie Sahlberg 3e80f3680a add missing conversion to new use of save_file and fork_child
svn path=/trunk/; revision=13279
2005-02-04 04:31:59 +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
Guy Harris 4faa0e365d Fix it to compile on systems without "pcap_datalink_val_to_name()" (or
with "pcap_datalink_val_to_name()" but without a declaration of it in
"pcap.h" *cough* Software Update *cough*).

svn path=/trunk/; revision=12858
2004-12-29 21:20:42 +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 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 3e5ac87520 code cleanup: split capture_sync from capture.c into it's own file.
That's the part used, when "Update list of packets in real time" is used while capturing.

svn path=/trunk/; revision=12445
2004-10-30 11:44:06 +00:00