aboutsummaryrefslogtreecommitdiffstats
path: root/capture_sync.h
AgeCommit message (Collapse)AuthorFilesLines
2008-06-23Rename an argument to avoid colliding with pipe().guy1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25556 f5534014-38df-0310-8fa8-9805f1628bb7
2008-02-21Constify some arguments.guy1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24407 f5534014-38df-0310-8fa8-9805f1628bb7
2008-02-16Pull capture_loop.c into dumpcap.c, as dumpcap is the only program thatguy1-2/+0
does capturing any more. (We will be inserting a call to give up privileges after the pcap_open_live(), which should fix 2273; we're currently only giving up privileges on platforms with libcap.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24345 f5534014-38df-0310-8fa8-9805f1628bb7
2007-10-26For the Wireshark/TShark -> dumpcap signal pipe on Windows, use a namedgerald1-0/+2
pipe instead of stdin. Add an argument (currently the parent PID) back to the "-Z" flag and use it to construct the pipe name. This lets us pass the parent's stdin handle to dumpcap, which lets us capture from stdin on Windows. Add a comment about checking for the parent process. In capture_loop.c, remove the wait_forever argument from cap_pipe_select() since it was always FALSE. Set the timeout under Windows to 250 ms instead of 250000 ms. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23279 f5534014-38df-0310-8fa8-9805f1628bb7
2007-08-02Add a "-S" flag to dumpcap, which prints out interface statistics. Usegerald1-0/+13
this in the GUI rather than calling pcap_stats() directly. This gets rid of the last pcap_open_live() call in the GUI code. Update README.packaging. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22443 f5534014-38df-0310-8fa8-9805f1628bb7
2007-07-20Remove the "-I" flag from dumpcap, and add a "-M" flag used to specifygerald1-0/+3
that "-D" and "-L" should produce machine-readable output. Use this to move an indirect get_pcap_linktype() call from the GUI to dumpcap. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22367 f5534014-38df-0310-8fa8-9805f1628bb7
2007-06-11One more step in privilege separation.gerald1-7/+12
Add a capture_interface_list(), which works similar to get_interface_list() except that it forks dumpcap instead of calling the pcap routines directly. Use it in the GUI. Add a "-I" flag to dumpcap, which prints out verbose interface information. Tested under Windows and Linux. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22071 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-28Ethereal->Wiresharketxrab1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18235 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-21name changesahlberg1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18197 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-03Put the low-level sync routines into a common file so they can be sharedguy1-53/+0
by dumpcap and Ethereal (so that, on UN*X, the child process can report a detailed "can't exec dumpcap" error). Rename most of the "sync_pipe_XXX_to_parent()" routines, as they're also in Tethereal, which doesn't have a sync pipe. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17789 f5534014-38df-0310-8fa8-9805f1628bb7
2006-03-24Various code cleanup in the capture pipe stuffulfl1-0/+10
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17714 f5534014-38df-0310-8fa8-9805f1628bb7
2006-03-05Pass two strings in capture child messages, so the child can sendguy1-1/+7
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!). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17465 f5534014-38df-0310-8fa8-9805f1628bb7
2006-02-17remove dependencies to pcap.h, so getting an idea what needs to be done by ↵ulfl1-0/+6
dumpcap in addition to the things already done now various dumpcap related code cleanup: mainly #include's and capture engine related stuff git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17327 f5534014-38df-0310-8fa8-9805f1628bb7
2006-02-11the point of no return ...ulfl1-3/+0
using dumpcap as the capture child for Ethereal. dumpcap is a plain console application now, even for Win32 (so no WinMain, create_console and special piping stuff reguired). The undocumented command line option -Z will switch dumpcap into "child mode", using binary instead of plain text output messages to communicate with a parent Ethereal. Ethereal's main.c no longer needs to distinguish between child mode or not, so some simplifying here. capture_sync.c has to call dumpcap in a "hidden window" mode using CreateProcess instead of spawnvp, otherwise an uggly console window would appear. The handles created by _pipe doesn't seem to be inheritable for this function, using CreatePipe instead. The file capture_loop.c is only needed by dumpcap, removed from Ethereal link objects. Some debugging aid added and other minor cleanup done. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17256 f5534014-38df-0310-8fa8-9805f1628bb7
2005-12-04move the complete functionality of the capture info dialog from ↵ulfl1-0/+19
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). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16669 f5534014-38df-0310-8fa8-9805f1628bb7
2005-12-03split capture.h into capture.h, capture_loop.h and capture_opts.h and place ↵ulfl1-0/+4
the parts into the corresponding files git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16664 f5534014-38df-0310-8fa8-9805f1628bb7
2005-04-30(hopefully) removed various gcc warningsulfl1-2/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14241 f5534014-38df-0310-8fa8-9805f1628bb7
2005-04-12capture engine: ulfl1-4/+0
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) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14059 f5534014-38df-0310-8fa8-9805f1628bb7
2005-04-11various capture code cleanup and fixes: ulfl1-2/+5
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) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14053 f5534014-38df-0310-8fa8-9805f1628bb7
2005-03-28various (minor) capture code cleanupulfl1-10/+8
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13957 f5534014-38df-0310-8fa8-9805f1628bb7
2005-02-23pass child capture filename to parent process (name currently unused) and ↵ulfl1-0/+4
some fork_child cleanup git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13482 f5534014-38df-0310-8fa8-9805f1628bb7
2005-02-04(some) redesign of capture data structures.ulfl1-2/+2
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 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13276 f5534014-38df-0310-8fa8-9805f1628bb7
2004-12-29Don't use a global capture_opts in the capturing engine (this isn't a good ↵ulfl1-1/+2
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12853 f5534014-38df-0310-8fa8-9805f1628bb7
2004-10-30code cleanup: split capture_sync from capture.c into it's own file. ulfl1-0/+76
That's the part used, when "Update list of packets in real time" is used while capturing. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12445 f5534014-38df-0310-8fa8-9805f1628bb7