aboutsummaryrefslogtreecommitdiffstats
path: root/capture.h
AgeCommit message (Collapse)AuthorFilesLines
2012-03-13Add an explicit capture_cb_capture_failed indication for the case whereGuy Harris1-1/+2
we weren't even able to start a capture, rather than delivering a fake "capture start" indication and relying on a later "capture file closed" indication - for a capture that was never opened in the first place - to handle GUI cleanups. Don't deliver any GUI indications in cf_close() if we didn't have a capture file open in the first place. Clear the status bar and welcome header if that indication is delivered. If we start a capture from the command line with the -k flag, don't show the captured packet information unless the capture actually starts. svn path=/trunk/; revision=41521
2012-01-25Third try. This time pipes and stdin are supported and theMichael Tüxen1-1/+1
test scripts are passed. Use a global list containing all interfaces and only change properties of the entries when changes are made in the GUI. Do not misuse the list of interfaces specified on the command line anymore. This patch does not provide any new functionality, it just provides the base for future extensions like removing remote interface, mulitple airpcap devices and multiple pipes. This patch was provided by Irene Ruengeler. svn path=/trunk/; revision=40715
2012-01-24We need a 3rd try. (After learning how to run the testuite on Windows locally).Michael Tüxen1-1/+1
svn path=/trunk/; revision=40695
2012-01-24Second try. This time pipes and stdin are supported.Michael Tüxen1-1/+1
Use a global list containing all interfaces and only change properties of the entries when changes are made in the GUI. Do not misuse the list of interfaces specified on the command line anymore. This patch does not provide any new functionality, it just provides the base for future extensions like removing remote interface, mulitple airpcap devices and multiple pipes. This patch was provided by Irene Ruengeler. svn path=/trunk/; revision=40693
2011-12-29Add 'extern "C"' wrappers and #include guards to various header files.Gerald Combs1-0/+8
svn path=/trunk/; revision=40321
2011-10-20Back out infrastructure change. We missed supportingMichael Tüxen1-1/+1
stdin and pipes. svn path=/trunk/; revision=39498
2011-10-20Use a global list containing all interfaces and only changeMichael Tüxen1-1/+1
properties of the entries when changes are made in the GUI. Do not misuse the list of interfaces specified on the command line anymore. This patch does not provide any new functionality, it just provides the base for future extensions like removing remote interface, mulitple airpcap devices and multiple pipes. This patch was provided by Irene Ruengeler. svn path=/trunk/; revision=39495
2011-06-27Get rid of old non-interface specific settings which are now interfaceMichael Tüxen1-1/+1
specifc. This finalizes the change of the infrastructure. This patch is based on work by Irene Ruengeler. svn path=/trunk/; revision=37794
2010-08-26Doxygen fixes.Anders Broman1-1/+1
svn path=/trunk/; revision=33942
2010-05-26If dumpcap exits abnormally, report the error.Guy Harris1-2/+3
svn path=/trunk/; revision=32964
2010-05-14If something is only supposed to be included if we have libpcap, don'tGuy Harris1-3/+0
put #ifdef HAVE_LIBPCAP in it. Add multiple-inclusion protection to capture_errs.h. svn path=/trunk/; revision=32803
2010-03-04In Wireshark and TShark, run dumpcap to get interface lists and lists ofGuy Harris1-10/+0
link-layer header types for interfaces; if special privileges are necessary to open capture devices, Wireshark and TShark shouldn't have those privileges, but dumpcap should. svn path=/trunk/; revision=32104
2008-08-19The packet counts and drop counts reported by libpcap are unsigned.Guy Harris1-1/+1
Clean up indentation a bit. svn path=/trunk/; revision=26037
2008-06-24Have separate callback mechanisms in file.c and capture.c; pass theGuy Harris1-0/+20
capture callbacks the capture_options * as its second argument in all cases. This makes it a bit clearer what arguments callbacks take, and means we can get rid of all global_capture_opts references in gtk/main_statusbar.c. Put the interface between gtk/main.c and gtk/main_statusbar.c into a private header. svn path=/trunk/; revision=25576
2008-02-21Constify some arguments.Guy Harris1-1/+1
svn path=/trunk/; revision=24407
2007-08-02Add a "-S" flag to dumpcap, which prints out interface statistics. UseGerald Combs1-0/+23
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. svn path=/trunk/; revision=22443
2007-07-20Remove the "-I" flag from dumpcap, and add a "-M" flag used to specifyGerald Combs1-0/+5
that "-D" and "-L" should produce machine-readable output. Use this to move an indirect get_pcap_linktype() call from the GUI to dumpcap. svn path=/trunk/; revision=22367
2007-06-11One more step in privilege separation.Gerald Combs1-1/+6
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. svn path=/trunk/; revision=22071
2006-05-21name changeRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18197
2006-03-13fix bug #803: sync pipe on Win32 wasn't set to binary mode, so error message ↵Ulf Lamping1-1/+1
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-05Pass two strings in capture child messages, so the child can sendGuy Harris1-5/+11
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
2005-12-03split capture.h into capture.h, capture_loop.h and capture_opts.h and place ↵Ulf Lamping1-117/+1
the parts into the corresponding files svn path=/trunk/; revision=16664
2005-12-03add missing functions (to complete/cleanup of interface):Ulf Lamping1-0/+10
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-11-17Handle "-G" only in Tethereal - it doesn't work in Ethereal, and isn'tGuy Harris1-1/+1
necessary there. Add a "cmdarg_err()" routine to report command-line option errors; it creates a console if necessary, and prints the command name and the trailing newline. Also add "cmdarg_err_cont()", which also creates a console if necessary, and prints a trailing newline but no command name; it's used to continue the message. Use those, rather than "g_warning()", for errors. That means that we no longer need to pass the command name to various command-line argument parsing routines. svn path=/trunk/; revision=16526
2005-05-26use the log features of the GLib to have verbose output of the capturing ↵Ulf Lamping1-0/+6
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-04-27add a state member to the capture_opts, and set it according to the capture ↵Ulf Lamping1-0/+10
engine svn path=/trunk/; revision=14205
2005-04-16rename capture_clear() to capture_restart()Ulf Lamping1-2/+2
statusbar update should work now even in capture error case svn path=/trunk/; revision=14105
2005-04-12capture engine: Ulf Lamping1-2/+6
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-10Win32 only bugfix: as using TerminateProcess is the brute force way and ↵Ulf Lamping1-0/+3
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-03-28various (minor) capture code cleanupUlf Lamping1-17/+9
svn path=/trunk/; revision=13957
2005-03-28fix Solaris build (I've removed O_BINARY)Ulf Lamping1-2/+1
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-28remove capture_child flag from capture_opts as it's no longer requiredUlf Lamping1-5/+9
svn path=/trunk/; revision=13954
2005-03-28a lot more capture engine code cleanupUlf Lamping1-4/+12
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-07- pcap.h needs to be included before capture.hJörg Mayer1-4/+2
- As capture.h is empty without libpcap defined, only include it in that case and don't protect the file internally against libpcap any more. svn path=/trunk/; revision=13648
2005-02-28Another step towards using the parent/child mode for ALL captures.Ulf Lamping1-0/+6
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-27some clarification of the capture child thingUlf Lamping1-1/+1
svn path=/trunk/; revision=13535
2005-02-27minor comment additionsUlf Lamping1-2/+4
svn path=/trunk/; revision=13533
2005-02-23CHILD_NAME is only used #ifdef HAVE_LIBPCAPUlf Lamping1-2/+2
svn path=/trunk/; revision=13481
2005-02-23use the applications name (currently "ethereal" or "tethereal") in ↵Ulf Lamping1-1/+1
capture_opts, instead of hardcoded "ethereal" for both. svn path=/trunk/; revision=13476
2005-02-06Clean up indentation.Guy Harris1-24/+24
svn path=/trunk/; revision=13323
2005-02-06another two steps towards privilege seperation:Ulf Lamping1-3/+8
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-06instead of initializing the capture_options in main.c, use the new function ↵Ulf Lamping1-0/+4
capture_opts_init svn path=/trunk/; revision=13315
2005-02-05rename kill_capture_child to capture_kill_child to have a common prefixUlf Lamping1-1/+1
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-05updated some commentsUlf Lamping1-4/+8
svn path=/trunk/; revision=13301
2005-02-04(some) redesign of capture data structures.Ulf Lamping1-2/+7
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-03move capture_file_fd field from capture_file to capture_opts type, as this ↵Ulf Lamping1-0/+1
is the place where it should be svn path=/trunk/; revision=13268
2004-12-29move global capture_child flag into capture_optionsUlf Lamping1-3/+1
svn path=/trunk/; revision=12855
2004-12-29Don't use a global capture_opts in the capturing engine (this isn't a good ↵Ulf Lamping1-11/+8
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-10-30split capture_loop from capture.c, some more code cleanupUlf Lamping1-10/+16
svn path=/trunk/; revision=12451
2004-10-30move quit_after_cap into capture_optsUlf Lamping1-4/+8
svn path=/trunk/; revision=12449