aboutsummaryrefslogtreecommitdiffstats
path: root/capture_opts.h
AgeCommit message (Collapse)AuthorFilesLines
2011-06-27Get rid of old non-interface specific settings which are now interfacetuexen1-59/+1
specifc. This finalizes the change of the infrastructure. This patch is based on work by Irene Ruengeler. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37794 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-31Get rid of has_cfilter to simplify the handling of multiple interfaces.tuexen1-1/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37478 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-16Make remote capturing settings a per interface thing. You can nowtuexen1-1/+12
configure that you want to capture on multiple remote interfaces on mulitple hosts. Improve some #ifdef mess in dumpcap. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37178 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-16Make pcap samping a per interface setting.tuexen1-4/+10
Use consistent naming of variables on capture_options. Make pcap sampling independent of remote capturing, since it seems to work local pcap devices using winpcap (at least that is what the documentation says). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37176 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-16* Fix a bug when printing a pointer.tuexen1-1/+0
* Remove number_of_ifaces, since ifaces->len can be used instead. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37174 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-13Get -L and -d working with multiple interface. Internally get some functionstuexen1-1/+1
using the array of interface data. Improve output of -L by printing the interface name. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37120 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-12Add support for handling multiple interfaces as command linetuexen1-8/+45
parameters. An array of interface specific data is handled in addition to the current way. This change should not have any effect right now, it will be used by dumpcap when supporting multiple interfaces (and tshark/wireshark... in the future). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37082 f5534014-38df-0310-8fa8-9805f1628bb7
2011-04-11Back out Jeff Morris's change to make the autostop file size 64-bit - itguy1-1/+1
didn't change the GUI code for setting the autostop file size, and that broke the build. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36552 f5534014-38df-0310-8fa8-9805f1628bb7
2011-04-11Jeff Morris's change to make the autostop file size 64-bit. Fixes bugguy1-1/+1
5691. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36551 f5534014-38df-0310-8fa8-9805f1628bb7
2011-03-01Make HAVE_PCAP_REMOTE and HAVE_PCAP_SETSAMPLING independenttuexen1-11/+10
as in other places of the code. Such that this is consistently used. While there, clean up some whitespaces. This fix was provided by Irene Ruengeler which testing remote capturing (with multiple interfaces). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36112 f5534014-38df-0310-8fa8-9805f1628bb7
2010-08-28As mentioned on the users-mailinglist[1], it could be useful to have groups ↵sake1-0/+1
read access to the ringbuffer that dumpcap creates. That way, a group of people can access the capture files without having to use root access. [1] http://www.wireshark.org/lists/wireshark-users/201008/msg00235.html git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33978 f5534014-38df-0310-8fa8-9805f1628bb7
2010-07-01From Petr Lautrbach: when capturing, return the exit status of dumpcap,guy1-0/+1
so we give a non-zero exit status for invalid interfaces or capture filters. From me: don't exit immediately if dumpcap failed, print out information from taps and the like. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33393 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-27Make -q not a capture option again - it's used by tshark even when notguy1-1/+0
capturing, and thus even when we build without pcap. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32988 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-26Add a -q flag to dumpcap, to squelch its reporting of the packet count,guy1-0/+1
and add support for SIGINFO, so, if your OS supports SIGINFO, you can get the packet count by typing ^T. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32958 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-14Um, no, the problem with the Leopard x86 build is that we first do aguy1-1/+1
build without libpcap, to make sure that works, and then do a build with libpcap, to put into a binary release. It's the former that's failing; I'll back out the previous change and then work on that. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32801 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-14See whether the Leopard x86 buildbot is upset because of the nameguy1-1/+1
if_capabilities_t - it doesn't fail on Snow Leopard, even if I undefine HAVE_PCAP_CREATE, and doesn't fail on the Leopard PPC buildbot, either. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32799 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-13Fetch an indication of whether the interface supports capturing inguy1-4/+4
monitor mode at the same time that we fetch its list of link-layer types. Support fetching that list in monitor mode, as the list may be different in regular and monitor mode. If the interface supports monitor mode, when printing the list of link-layer types, indicate whether they're fetched in monitor mode or not, as tcpdump 4.1.x does. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32789 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-07As with the list of data link types, so with the list of interfaces; moveguy1-3/+3
the code to print the machine-readable format into dumpcap, and have the code in capture_opts.c just print the human-readable format. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32714 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-07For TShark and Wireshark, get the list of link-layer types for anguy1-3/+3
interface by running dumpcap, so that if you need privileges to open an interface, and dumpcap has those privileges, neither TShark nor Wireshark need them. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32710 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-07Beginnings of monitor mode support with libpcap 1.x.guy1-0/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32702 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-06Just check for pcap_create(); it first appeared in libpcap 1.0.0, andguy1-1/+1
pcap_set_buffer_size() did as well, so there aren't any libpcap releases with pcap_create() but not pcap_set_buffer_size(). Only do one check for pcap_create. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32695 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-06Checking in Stigs changes frometxrab1-1/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=475 BUT not activating the check for pcap_create() pcap_set_buffer_size() This should make it possible to build with support for setting the buffersize if not capturing 802.11 traffic. The code for handling the 'B' option should be OK in any case. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32688 f5534014-38df-0310-8fa8-9805f1628bb7
2009-04-27Add -n option to dumpcap. It will save the capture files intuexen1-0/+1
pcapng format instead of pcap. The default is to use pcap. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28170 f5534014-38df-0310-8fa8-9805f1628bb7
2008-06-24Add gtk/capture_globals.h, to declare global_capture_opts, so files thatguy1-0/+4
don't need global_capture_opts don't need to have it declared and thus don't need capture_options defined. Include gtk/capture_globals in the files in question. Change some more capture_opts references to refer to global_capture_opts. Change some global_capture_opts references in routines with a capture_opts argument to refer to capture_opts. The structure type is capture_options, not capture_opts; fix some references. Include <sys/types.h>, if it's present, in capture_opts.h, so we get gid_t defined. Clean up indentation. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25574 f5534014-38df-0310-8fa8-9805f1628bb7
2008-06-23Rename a variable to avoid collisions with a global variable, as notedguy1-1/+1
by John Smith. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25549 f5534014-38df-0310-8fa8-9805f1628bb7
2008-06-20capture_opts_print_statistics() has nothing to do with capture optionsguy1-4/+0
setting, and is used only in dumpcap.c, and needs to get at information set by dumpcap's signal handlers so it can respond to ^C; move it to dumpcap.c, rename it print_statistics_loop(), and make it set ld.go to TRUE before looping and loop only as long as ld.go is TRUE. That fixes bug 2592 (at least on Mac OS X, and probably on other UN*Xes; it should fix it on Windows as well). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25492 f5534014-38df-0310-8fa8-9805f1628bb7
2007-12-04Support for RPCAP features in GUI (from Boris Misenov, see Bug 1366)kukosa1-1/+46
- retrieving the list of remote PCAP interfaces - password authentication support - UDP data fransfer - packet sampling (available in WinPcap 4.x) etc. fix problem if non-default rpcap port is used git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23750 f5534014-38df-0310-8fa8-9805f1628bb7
2007-08-30Change the "--enable-setuid-install" option to install dumpcap and TSharkgerald1-0/+4
setuid instead of Wireshark. Remove the "DANGEROUS" notices, but leave it disabled by default. Whine if the user runs Wireshark or TShark as root. Add a preference to disable the whining. Add a "setuid-root" script that can be used to switch dumpcap and TShark's setuid-ness on and off for development and testing. Update the release notes and README.packaging. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22733 f5534014-38df-0310-8fa8-9805f1628bb7
2007-08-22gcc 4 doesn't like my macro for getting the interface description: it says ↵morriss1-10/+2
there's an invalid lvalue in it. I don't see what's wrong with it, but replace the macro with a function. Also: don't include the .xpm files in gtk/main.c if we're building without PCAP (as they're not used in that configuration). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22588 f5534014-38df-0310-8fa8-9805f1628bb7
2007-08-22Fix bug http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1757 :morriss1-0/+14
Try to call get_interface_descriptive_name() as little as possible (storing the result in capture_opts) to avoid a performance hit during live capture (especially if you have lots of interfaces) and to avoid leaking memory. One issue with this is that capture_opts.c cannot (without adding significant dependencies) set the iface_descr so readers of that field (only gtk/main.c and tshark.c) use a macro to (set if not already set and) get the value of that field. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22587 f5534014-38df-0310-8fa8-9805f1628bb7
2007-08-02Add a "-S" flag to dumpcap, which prints out interface statistics. Usegerald1-0/+4
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-2/+2
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-4/+4
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-08-26Go back to setting the capture filter to an empty string when we start;guy1-38/+39
that obviates the need to check for a null capture filter string, and fixes bug 1055. Keep track of whether it was set from the command line, though, so we can catch attempts to set the filter more than once, and attempts to set it when we're not capturing. Clean up white space. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19047 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-03In Tethereal, don't save to a temporary file if "-w" isn't specified,guy1-7/+8
even if doing a live capture; just print the packets without saving them. In dumpcap: default to the capturing the entire packet; don't do the "Press any key" stuff when debugging on UN*X; do console logging (to the standard error) even when we're running as the capture child (the sync pipe should only be the standard output, not the standard error). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17786 f5534014-38df-0310-8fa8-9805f1628bb7
2006-02-11the point of no return ...ulfl1-1/+1
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
2006-02-10remove all calls to exit() from the capture_opts.c and replace them by ↵ulfl1-3/+3
status return values (0,1 or 2). This way makes it much easier to debug, e.g. to set a common breakpoint if a command line parameter fails. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17240 f5534014-38df-0310-8fa8-9805f1628bb7
2006-01-07move output_to_pipe flag from tethereal's loop_data into capture_opts, so it ↵ulfl1-0/+1
can be used by dumpcap (capture_loop.c) as well git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16972 f5534014-38df-0310-8fa8-9805f1628bb7
2005-12-18warning: function declaration isn't a prototypejmayer1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16852 f5534014-38df-0310-8fa8-9805f1628bb7
2005-12-13HUGE STEP (hopefully toward the right direction):ulfl1-4/+19
remove a lot of redundant code from tethereal and use (move) stuff from capture_loop.c instead. concentrate common capture related code in capture_opts.c, e.g. trying to find the right interface to capture from (command line option, preference, first usable) instead of duplicating this code over several files. remove redundant code from dumpcap.c this also implements command line option -D (and indexed interfaces at -i) for Ethereal and Dumpcap (as we have it in Tethereal already for a while) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16787 f5534014-38df-0310-8fa8-9805f1628bb7
2005-12-05add capture_opts_trim(), as this sequence is used three times now (will ↵ulfl1-0/+5
replace the other appearances later) ... git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16683 f5534014-38df-0310-8fa8-9805f1628bb7
2005-12-03split capture.h into capture.h, capture_loop.h and capture_opts.h and place ↵ulfl1-0/+112
the parts into the corresponding files git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16664 f5534014-38df-0310-8fa8-9805f1628bb7