Commit Graph

333 Commits

Author SHA1 Message Date
Anders Broman f68d6e4c8c Ethereal->Wireshark
svn path=/trunk/; revision=18235
2006-05-28 20:28:20 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Ulf Lamping 069b26b2d9 fix bug #803: sync pipe on Win32 wasn't set to binary mode, so error message transport failed between Ethereal and dumpcap.
I've also changed the way the secondary error message is transported from former "header message 0 secondary 0" to "header header message 0 header secondary 0" as that might be a bit more clearer, and I'll need it for further development anyway.

I was using this while debugging and not recognizing the real problem - for about four hours :-(. I'll need this feature when doing the interface (and link layer type) browsing later (transferring this data from dumpcap to Ethereal) to get a full blown privilege seperation.

svn path=/trunk/; revision=17608
2006-03-13 00:30:51 +00:00
Guy Harris cbe69401cc Pass two strings in capture child messages, so the child can send
primary and secondary error messages and let the parent worry about how
to display them.  This means dumpcap doesn't need stub routines for
generating the formatting tags for the primary and secondary messages.

Have a separate message for capture filter errors, so that the parent
can check whether the capture filter looks like a display filter and
report the appropriate message.  This means that dumpcap doesn't need a
stub routine for compiling display filters (a stub routine also means
that Ethereal won't do the check for capture filters that look like
display filters!).

svn path=/trunk/; revision=17465
2006-03-05 03:14:16 +00:00
Guy Harris 8ac0325b2b Clean up indentation a bit.
In "capture_input_new_file()", don't call the callbacks unless we
succeed in opening the new file.  Have "capture_info_new_file()" return
a success/failure indication.

Improve the message logged when we fail to open the new file if we're
only opening it for the quick packet counts.  We really should put up an
alert box and give up on the capture at that point.

svn path=/trunk/; revision=17437
2006-03-01 01:46:52 +00:00
Ulf Lamping 6378f9c30a add a log message, if capture start failed
svn path=/trunk/; revision=17340
2006-02-17 22:36:59 +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
Ulf Lamping 35dd233580 show the number of packets captured, if "Update list of packets ..." isn't used
svn path=/trunk/; revision=17071
2006-01-22 16:26:41 +00:00
Ulf Lamping 5ae90828ae we can even get error messages while we are capturing (e.g. when a network cable is unplugged)
problem found by Joerg Mayer

svn path=/trunk/; revision=16704
2005-12-06 19:41:45 +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 e829856c0c move the complete functionality of the capture info dialog from capture_loop.c to capture_info.c and call it from capture.c (instead of capture_loop.c).
This way, the capture child don't need to now any of the packet_counter things (no epan/packet.h and all alike).

Currently the capture_info code will always open another wiretap file instance to build it's own counter values. This isn't optimized for now (next step: use data from cf_continue_tail() somehow).

svn path=/trunk/; revision=16669
2005-12-04 02:04:18 +00:00
Ulf Lamping 8fdb9b2df9 clarify a comment
svn path=/trunk/; revision=16667
2005-12-03 21:12:59 +00:00
Ulf Lamping 0a2188eed6 add missing functions (to complete/cleanup of interface):
capture_input_drops
capture_input_error_message

and move the functionality from capture_sync.c to capture.c (just where it belongs)

svn path=/trunk/; revision=16663
2005-12-03 18:15:02 +00:00
Ulf Lamping 680cab1226 add some more help text to the "no packets captured" error dialog:
link to CaptureSetup wiki page
Win32 only: wireless: "try switch off promicuous mode"

This way we might get less user questions on the users-mailing list ...

Especially the second one hopefully could save us from a lot of support mails :-)

svn path=/trunk/; revision=16591
2005-11-25 22:27:27 +00:00
Ulf Lamping c3187174bf replace *a lot* of file related calls by their GLib counterparts. This is necessary for the switch to GTK 2.6 (at least on WIN32).
to do this, I've added file_util.h to wiretap (would file_compat.h be a better name?), and provide compat_macros like eth_open() instead of open(). While at it, move other file related things there, like #include <io.h>, definition of O_BINARY and alike, so it's all in one place.

deleted related things from config.h.win32

As of these massive changes, I'm almost certain that this will break the Unix build. I'll keep an eye on the buildbot so hopefully everything is working again soon.

svn path=/trunk/; revision=16403
2005-11-06 22:43:25 +00:00
Ulf Lamping 8fc87ba3ba minor fix: fix the sequence while finishing a live capture, so the statusbar information about the file size is correct
svn path=/trunk/; revision=16148
2005-10-07 03:24:14 +00:00
Ulf Lamping 831c54c4f5 add two new callbacks:
cf_cb_file_closing (called before closing a capture file) cf_cb_file_closed will be called afterwards, but both only if a file is really closed as cf_close is called more often ...

If we are closing large capture files (~20MB), the screen looks ugly while the file is closed. Change this so the screen will immediately go back to initial state and a dialog (without buttons) is shown that the file is currently closed. As the operation which takes most of the time to close the file is a single eth_clist_clear call, we can't use a progress bar here.

cf_cb_live_capture_stopping: called when the user wants to stop the capture (toolbar or menu clicked). At least on Win32, the time between this and the actual stop completed can be noticeable (1-2 seconds), so the user doesn't know if the button press did anything at all. Do something similar as above, show a dialog box without buttons to inform that the close is in progress.

svn path=/trunk/; revision=15891
2005-09-20 08:42:35 +00:00
Ulf Lamping f04a2a23ba changed the loglevel of "capture kill" from message to info (it's no action that the user directly triggered)
svn path=/trunk/; revision=14446
2005-05-26 21:45:58 +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 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