aboutsummaryrefslogtreecommitdiffstats
path: root/capture_opts.c
AgeCommit message (Collapse)AuthorFilesLines
2011-06-27Get rid of old non-interface specific settings which are now interfacetuexen1-131/+45
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-06-17Make pcap-ng the default. Add a compile-time option to prefer pcap-ng orgerald1-1/+8
pcap. Add a "-P" capture option which tries to use pcap instead of pcap-ng ("-P" seemed to be the best option but we may want to use a different letter). Update the documentation and release notes. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37696 f5534014-38df-0310-8fa8-9805f1628bb7
2011-06-16Really print the rpcap username when logging, nottuexen1-3/+3
the rpcap password. This only affects remote capturing. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37681 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-31Get rid of has_cfilter to simplify the handling of multiple interfaces.tuexen1-3/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37478 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-19It is not an error (anymore) to specify multiple capture filters.tuexen1-4/+0
This was wireshark -i lo0 -f sctp -i en0 -f udp -k will work. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37287 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-16Make remote capturing settings a per interface thing. You can nowtuexen1-0/+145
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-127/+187
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-27/+24
* 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-4/+4
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-13Use the same default value for the snaplen in the new array as in thetuexen1-1/+1
old way. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37113 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-12Add support for handling multiple interfaces as command linetuexen1-59/+194
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-05-12Another whitespace cleanup.tuexen1-32/+32
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37076 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-12Clean up some indentation. A purely whitespace change.tuexen1-61/+61
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37073 f5534014-38df-0310-8fa8-9805f1628bb7
2011-04-11Back out Jeff Morris's change to make the autostop file size 64-bit - itguy1-3/+3
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-3/+3
5691. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36551 f5534014-38df-0310-8fa8-9805f1628bb7
2011-04-10Rename ws_stat to ws_stat64, and make it take a pointer to a ws_statb64guy1-2/+2
as an argument, along the lines of ws_fstat64, and, on Windows, make it use _wstati64, to handle 64-bit file sizes. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36547 f5534014-38df-0310-8fa8-9805f1628bb7
2011-03-28Use fprintf_stderr() instead of printf() so "wireshark -D" works (on Windows).cmaynard1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36387 f5534014-38df-0310-8fa8-9805f1628bb7
2011-03-01Make HAVE_PCAP_REMOTE and HAVE_PCAP_SETSAMPLING independenttuexen1-25/+25
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-09-08Follow up to rev 34073: Since "-b files:0" is no longer necessary tosfisher1-1/+1
override the default of turning on a multiple file ring buffer, require a positive integer to be specified for the files value. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34082 f5534014-38df-0310-8fa8-9805f1628bb7
2010-08-28As mentioned on the users-mailinglist[1], it could be useful to have groups ↵sake1-0/+5
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-05-27Set RINGBUFFER_MAX_NUM_FILES to 100000. Use it to generate file names.gerald1-1/+6
Add RINGBUFFER_WARN_NUM_FILES and use it to print a warning. Print warnings when we change the number of ringbuffer files. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32998 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-27Make -q not a capture option again - it's used by tshark even when notguy1-4/+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/+4
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-5/+8
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-08Prune some includes.guy1-24/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32721 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-07As with the list of data link types, so with the list of interfaces; moveguy1-80/+8
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-07Add routines vfprintf_stderr() and fprintf_stderr() to print to theguy1-5/+6
standard error and, in Wireshark on Windows, create a console if necessary. Have the cmdarg_err routines use them. Use *fprintf_stderr() to print the output of -L, rather than using cmdarg_err_cont(), so that we don't get extra newlines in the output (it should look similar to the output of tcpdump). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32711 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-07For TShark and Wireshark, get the list of link-layer types for anguy1-44/+11
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-07Handle -I in the options processing.guy1-0/+8
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32703 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-06Just check for pcap_create(); it first appeared in libpcap 1.0.0, andguy1-3/+3
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-3/+3
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
2010-03-04Squelch some compiler warnings.guy1-7/+8
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32111 f5534014-38df-0310-8fa8-9805f1628bb7
2010-03-04In Wireshark and TShark, run dumpcap to get interface lists and lists ofguy1-15/+16
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32104 f5534014-38df-0310-8fa8-9805f1628bb7
2010-01-29Fix various gcc -Wshadow warnings.wmeier1-21/+21
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31729 f5534014-38df-0310-8fa8-9805f1628bb7
2009-04-27Add -n option to dumpcap. It will save the capture files intuexen1-0/+5
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
2009-02-23Have the minimum snapshot length be 1 byte, and have a snapshot lengthguy1-1/+7
of 0 mean 65535, similar to what tcpdump does. Fixes bug 2731. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27526 f5534014-38df-0310-8fa8-9805f1628bb7
2008-12-21If we don't have any of the pcap_datalink_XXX_to_YYY routines,guy1-5/+0
substitute our own (I wrote them all, so I can steal them from the BSD-licensed libpcap if I want :-)). This means that linktype_name_to_val() and linktype_val_to_name() are always available, and we don't need to #ifdef use of them. Use pcap_datalink_val_to_description() to get the description for a particular DLT_ value, rather than mapping the DLT_ value to a WTAP_ENCAP_ value and getting the description for the latter. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27074 f5534014-38df-0310-8fa8-9805f1628bb7
2008-11-03Use correct type when printing remote_port.stig1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26676 f5534014-38df-0310-8fa8-9805f1628bb7
2008-10-31Fix some "format not a string literal and no format arguments" warnings.stig1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26642 f5534014-38df-0310-8fa8-9805f1628bb7
2008-06-23Do not only update the argument name, but also where it's used.stig1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25566 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-93/+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
2008-05-22Move the file utility functions from wiretap to libwsutil so thatmorriss1-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_*. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25354 f5534014-38df-0310-8fa8-9805f1628bb7
2008-05-12If we have pcap_open, call it instead of pcap_open_live, otherwise we mightgerald1-1/+5
crash. The changes to trigcap.c haven't been tested, but _should_ work. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25279 f5534014-38df-0310-8fa8-9805f1628bb7
2008-04-09replace confusing #if checking for GlIB2.6.0 by #if GLIB_CHECK_VERSION(2,6,0)ulfl1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24855 f5534014-38df-0310-8fa8-9805f1628bb7
2008-02-23Ensure tshark/wireshark always get good err msgs from dumpcap:wmeier1-4/+3
1. Clean up dumpcap 'as a child' err msg handling so that: - all err msgs are properly formatted when being sent back to the parent. - any log Critical, Warning, etc messages are sent back to parent and are properly formatted. 2. Change handling of -w <...> slightly in capture_opts.c so that wireshark provides a good error message if there is a 'write permissions' issue on the file. (Previously the error popup said only "Child exited with status 2"). This fixes bug #2288. Add some conditionalized DEBUG_CHILD_DUMPCAP code for dumpcap debug logging to a file. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24446 f5534014-38df-0310-8fa8-9805f1628bb7
2008-02-07Removed some more "statement not reached" warnings.stig1-1/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24283 f5534014-38df-0310-8fa8-9805f1628bb7
2007-12-04Support for RPCAP features in GUI (from Boris Misenov, see Bug 1366)kukosa1-0/+129
- 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