Commit Graph

315 Commits

Author SHA1 Message Date
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 351214282d the capture child might not respond shortly after bringing it up (especially it will block, if no input coming from an input capture pipe (e.g. mkfifo) is coming in)
to prevent problems, bring the main GUI into "capture mode" right after successfully spawn/exec the capture child, without waiting for any response from it

svn path=/trunk/; revision=14436
2005-05-25 23:28:59 +00:00
Ulf Lamping 2777289f85 removed various gcc warnings
svn path=/trunk/; revision=14246
2005-04-30 17:23:33 +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 4852c618d8 add a state member to the capture_opts, and set it according to the capture engine
svn path=/trunk/; revision=14205
2005-04-27 19:43:02 +00:00
Ulf Lamping 7ee0db1080 statusbar changes:
-show the current capture file size, if capturing in real time mode.
-move the packet "Drops" count (if available) from file to packets statusbar part

svn path=/trunk/; revision=14130
2005-04-18 22:05:56 +00:00
Ulf Lamping 55e312bb41 bugfix: show the right filesize after a live capture finished
svn path=/trunk/; revision=14118
2005-04-17 22:44:13 +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 708dae1a17 bugfix: don't crash on error in normal mode capture
svn path=/trunk/; revision=14104
2005-04-16 19:31:06 +00:00
Ulf Lamping 24801e8e5f don't display "No packets captured" dialog, when using the new clear feature
svn path=/trunk/; revision=14060
2005-04-12 21:56:27 +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 5625c461d0 bugfix: call to cf_cb_live_capture_..._started with correct parameter
svn path=/trunk/; revision=14045
2005-04-10 21:03:31 +00:00
Ulf Lamping 163f2b61a8 fix statusbar messages by splitting into update and fixed messages between capture and main
svn path=/trunk/; revision=14044
2005-04-10 19:36:56 +00:00
Ulf Lamping adc2bf61a8 bugfix: hide panes if a non "Update" capture had no packets captured (hopefully it's working correct now...)
svn path=/trunk/; revision=14043
2005-04-10 17:36:36 +00:00
Ulf Lamping 63047dfdd5 bugfix: call cf_cb_live_capture_finished *if* some packets were captured
svn path=/trunk/; revision=14042
2005-04-10 17:18:45 +00:00
Ulf Lamping 78a7b0bcc0 bugfix: when no packets were captured, don't call cf_cb_live_capture_finished after closing the capture file
svn path=/trunk/; revision=14039
2005-04-10 15:35:41 +00:00
Guy Harris 5341ad2bba Clean up indentation.
svn path=/trunk/; revision=14036
2005-04-10 08:55:56 +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 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
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 972ca3c8c9 some more cleanup of the capturing code (e.g. split up of the code reading in the "normal mode" captured data)
svn path=/trunk/; revision=13538
2005-02-27 19:59:03 +00:00
Ulf Lamping 8011f18835 bugfix to bring up correct error message if capture file couldn't be openened.
some code cleanup

svn path=/trunk/; revision=13537
2005-02-27 18:52:05 +00:00
Ulf Lamping e7fafa28c6 some clarification of the capture child thing
svn path=/trunk/; revision=13535
2005-02-27 17:30:33 +00:00
Ulf Lamping d643a55488 move capture_opts related things (init, command line, ...) from capture.c to a new file capture_opts.c and let both ethereal and tethereal use it.
svn path=/trunk/; revision=13474
2005-02-23 01:01:19 +00:00
Ulf Lamping a25fd8d7ca add the number of autostop files to the command line parameters, e.g.:
-a files:20

also added this to the manpage, the user's guide will follow later

svn path=/trunk/; revision=13473
2005-02-22 23:46:54 +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 179d4cca95 fix a capture bug if the capture filter wasn't valid to get back to "empty" state.
instead of already invoking cf_cb_live_capture_started in capture.c, I've introduced the new event cf_cb_live_capture_prepare which only has to set the main windows title and nothing more.

svn path=/trunk/; revision=13355
2005-02-08 19:57:16 +00:00
Ulf Lamping d2cf31dc22 fix a bug if capturing into named files is used
svn path=/trunk/; revision=13345
2005-02-07 20:38:10 +00:00
Guy Harris 79a39eddbc Move the code to set the title on a window when a capture is in progress
to the "start live capture" callback, and call that from "do_capture()".

When opening a capture file, don't pop up the "What do you want to do?"
pane when closing any existing file you have open, as we're just going
to put the regular view up right after that.

svn path=/trunk/; revision=13332
2005-02-07 02:09:30 +00:00
Guy Harris 3b088c63d7 Include <ctype.h> for "isspace()".
#ifdef a variable used only if _WIN32 is defined.

svn path=/trunk/; revision=13324
2005-02-06 22:18:15 +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 3a9e847e27 some cleanup of the initial start sequence of Ethereal, filling in capture_opts and alike
svn path=/trunk/; revision=13317
2005-02-06 14:43:27 +00:00
Ulf Lamping ba04a65a6a fix bugs regarding the capture child
svn path=/trunk/; revision=13316
2005-02-06 12:21:27 +00:00
Ulf Lamping 97866a968b instead of initializing the capture_options in main.c, use the new function capture_opts_init
svn path=/trunk/; revision=13315
2005-02-06 00:13:00 +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
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 9f171b0485 remove #include "globals.h" and access to global cfile, use access functions and capture_opts instead
svn path=/trunk/; revision=13283
2005-02-04 08:27:41 +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 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
Guy Harris 709b556a78 Use a more descriptive name, if available, for the network interface in
window titles even on UN*X, and if the user's specified a description
for an interface, use that rather than the description supplied by
libpcap.

Put the interface name into the main window title when doing a live
capture.

svn path=/trunk/; revision=13060
2005-01-16 02:48:41 +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