aboutsummaryrefslogtreecommitdiffstats
path: root/capture.c
AgeCommit message (Collapse)AuthorFilesLines
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45015
2012-08-06Don't call main_window_update() from capture_input_new_packets()Gerald Combs1-0/+3
on Windows. Otherwise we end up looping forever on a NULL event in main_window_update(). svn path=/trunk/; revision=44283
2012-07-28Add handling of ringbuffer support when packets are not updatedMichael Tüxen1-3/+9
in realtime. This should fix: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7423 svn path=/trunk/; revision=44089
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-05-16Fix a bunch of uninitialized variables found by Coverity Scan. CIDsGerald Combs1-3/+3
702403, 702404, 702405, 702406, 702407, 702408, 702409, 702410, 702411, and 702412. svn path=/trunk/; revision=42658
2012-03-13Add an explicit capture_cb_capture_failed indication for the case whereGuy Harris1-63/+61
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-03-11Don't close the currently loaded capture file in capture_start(), do soGuy Harris1-6/+4
in its callers; when starting a capture with "wireshark -k", there's no capture file to close, and closing it might be provoking some UI actions that cause crashes on Windows. Don't copy the list of selected interfaces to the list of capture interfaces in capture_start(), either, do that in the callers; we were already doing that in one place and, in one of the remaining cases, namely "wireshark -k", we should do so only if no capture interfaces were supplied on the command line. (I.e., the set of interfaces on which we want to capture depends on where in the UI the capture is being started.) svn path=/trunk/; revision=41491
2012-02-21From Irene Ruengeler:Michael Tüxen1-1/+1
* Add support in the GUI for pipes. * Allow the local interfaces to be rescanned via the GUI. * Allow remote interfaces to be added and deleted. The GUI can be extended to support other ways of capturing. svn path=/trunk/; revision=41105
2012-02-17Start moving files to ui/ and ui/cli/Jörg Mayer1-1/+1
svn path=/trunk/; revision=41047
2012-01-25Third try. This time pipes and stdin are supported and theMichael Tüxen1-221/+222
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-222/+220
svn path=/trunk/; revision=40695
2012-01-24Second try. This time pipes and stdin are supported.Michael Tüxen1-220/+222
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
2012-01-16Move some headers for UI stuff, and the alert_box.c UI-specific file, toGuy Harris1-2/+4
the ui directory. (Perhaps some other files that would be used by all flavors of Wireshark, for any GUI toolkit or for someting such as ncurses, and not for any command-line tool such as TShark, should be moved there as well.) Shuffle some #includes to put the "ui/XXX.h" includes together. svn path=/trunk/; revision=40529
2011-10-20Back out infrastructure change. We missed supportingMichael Tüxen1-11/+7
stdin and pipes. svn path=/trunk/; revision=39498
2011-10-20Use a global list containing all interfaces and only changeMichael Tüxen1-7/+11
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-08-05Add support for multiple interfaces to the capture options dialog.Michael Tüxen1-3/+5
Obtained from Irene Ruengeler. svn path=/trunk/; revision=38350
2011-06-27Improve the report of illegal capture filters. Also show the interface ↵Michael Tüxen1-4/+7
description. svn path=/trunk/; revision=37802
2011-06-27Get rid of old non-interface specific settings which are now interfaceMichael Tüxen1-12/+12
specifc. This finalizes the change of the infrastructure. This patch is based on work by Irene Ruengeler. svn path=/trunk/; revision=37794
2011-05-19In case we have no interface information in the array, use the global value.Michael Tüxen1-2/+7
This fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5935. svn path=/trunk/; revision=37307
2011-05-19When capturing from multiple interfaces, indicate this in the windowMichael Tüxen1-3/+27
title of the wireshark main window. svn path=/trunk/; revision=37289
2011-01-13Add "break;" to end of last case statement.Stephen Fisher1-0/+1
svn path=/trunk/; revision=35522
2010-11-28Clean up white space.Guy Harris1-9/+9
svn path=/trunk/; revision=35047
2010-08-24From Gregor Beck:Anders Broman1-3/+4
ERROR:capture.c:141:capture_start: assertion failed: (capture_opts->state == CAPTURE_STOPPED) https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5126 svn path=/trunk/; revision=33906
2010-05-27Add cf_fake_continue_tail() which is called when real-time captureGerald Combs1-0/+1
updates are off and which sets the capture file state to a value that won't cause an assertion when the user stops capturing. Fixes bug 4035. svn path=/trunk/; revision=33005
2010-05-26If dumpcap exits abnormally, report the error.Guy Harris1-1/+4
svn path=/trunk/; revision=32964
2010-05-17When dumpcap is run to get an interface list, interface capabilities, orGuy Harris1-1/+6
interface statistics, have its error messages come out as sync-pipe errors, have it send a sync-pipe "success" message on success, and have the callers get that message and display it. svn path=/trunk/; revision=32843
2010-04-01Keep a copy of the interface description and capture filter around so thatGerald Combs1-4/+9
we can use it in the main window title during and after capture. Add a "-X" option for providing a description for stdin. svn path=/trunk/; revision=32357
2010-03-04In Wireshark and TShark, run dumpcap to get interface lists and lists ofGuy Harris1-194/+1
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
2009-12-15Behave more gracefully if WinPcap isn't installed. Don't assert ifGerald Combs1-2/+2
we call pcap_open or pcap_open_live when WinPcap isn't loaded - just return NULL. Don't display the "NPF driver isn't running" dialog if we're capturing from stdin or a file. Fix a cut-and-paste error in capture_pcap_linktype_list. svn path=/trunk/; revision=31275
2009-12-14From Valerio Messina:Jaap Keuter1-1/+1
As now, when Wireshark save capture files, it show "Loading" in status bar and in the dialog box, warning many users of lost them packets. Saving work as expected. Is simply a GUI use interaction problem. svn path=/trunk/; revision=31269
2009-08-26(FWIW) One step towards including stdio.h & stdlib.h only when req'd.Bill Meier1-0/+1
svn path=/trunk/; revision=29568
2009-06-11(Minor) #include "alert_box.h" not req'dBill Meier1-1/+0
svn path=/trunk/; revision=28707
2009-01-04Minor rewording of a few comments; fix a few typos.Bill Meier1-17/+16
svn path=/trunk/; revision=27151
2008-08-19The packet counts and drop counts reported by libpcap are unsigned.Guy Harris1-2/+2
Clean up indentation a bit. svn path=/trunk/; revision=26037
2008-08-15Fix some incorrect code (found by valgrind).Bill Meier1-7/+5
svn path=/trunk/; revision=26032
2008-06-24Have separate callback mechanisms in file.c and capture.c; pass theGuy Harris1-11/+67
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-06-24Have capture_info_ui_create() and capture_info_open() take a pointer toGuy Harris1-1/+1
the capture_opts structure as an argument, rather than just a pointer to the interface name. Don't declare a global "capture_opts" pointer, as we don't define it any more. svn path=/trunk/; revision=25570
2008-06-02Don't include \r in linktype on win32, it looks weird in the combo box.Stig Bjørlykke1-0/+8
svn path=/trunk/; revision=25410
2008-05-22Move the file utility functions from wiretap to libwsutil so thatJeff Morriss1-2/+2
libwireshark (and the plugins using those functions) do not depend on wiretap on Windows. While doing that, rename the eth_* functions to ws_*. svn path=/trunk/; revision=25354
2008-04-07- Remove GLIB1 codeStephen Fisher1-1/+0
- Change ugly GLIB version checking statements to GLIB_CHECK_VERSION - Remove ws_strsplit files because we no longer need to borrow GLIB2's g_strsplit code for the no longer supported GLIB1 builds svn path=/trunk/; revision=24829
2008-02-21Constify some arguments.Guy Harris1-1/+1
svn path=/trunk/; revision=24407
2008-02-07Removed some more "statement not reached" warnings.Stig Bjørlykke1-1/+0
svn path=/trunk/; revision=24283
2007-09-25as "advertised" some days ago:Ulf Lamping1-2/+0
rewrite the tshark capture code almost completely, to use dumpcap instead of it's own pcap functionality. This works on Win32 and should work on unix/linux (but I'm not sure here). Some stuff needs to be cleaned up, some more may need to be rewritten to specifically work with unix/win32. Futher work needs to be done at: 1. read filters (simply document current behaviour?) 2. event loop polling 3. privileges 4. code cleanup (e.g. in capture_loop.c) Be prepared that tshark might not work as before / expected at least in the next days! svn path=/trunk/; revision=22969
2007-08-02Add a "-S" flag to dumpcap, which prints out interface statistics. UseGerald Combs1-6/+133
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/+57
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-11Fix compilation under VS6 (hopefully without breaking compilationGerald Combs1-25/+25
anywhere else). Instead of using getaddrinfo() and getnameinfo(), promote inet_pton.c and inet_ntop.c to the top level and use those routines instead. (It's 2007, for crying out loud. Why is this even an issue?) svn path=/trunk/; revision=22075
2007-06-11Fix segmentation fault when NULL err_msg pointer passed to ↵Jaap Keuter1-4/+8
capture_interface_list() and sync_list_interface_open() fails. svn path=/trunk/; revision=22073
2007-06-11One more step in privilege separation.Gerald Combs1-10/+125
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
2007-05-17Minor fix: For "wireshark -Q ..." show "no packets captured" popup only when ↵Bill Meier1-3/+5
valid. svn path=/trunk/; revision=21810
2006-05-28Ethereal->WiresharkAnders Broman1-2/+2
svn path=/trunk/; revision=18235