aboutsummaryrefslogtreecommitdiffstats
path: root/capture_opts.h
AgeCommit message (Collapse)AuthorFilesLines
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-02Fix ui/iface_lists.c - type attribute is not copiedRoland Knall1-0/+1
temp is a clone of the local if_info, but the type attribute is not copied correctly Additionally, the if_type member is exposed via the capture options Change-Id: Id53f0dfd1e127921e1b89bbf78cb431ee257a96c Reviewed-on: https://code.wireshark.org/review/404 Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2013-11-26Add a comment about the "default options".Guy Harris1-0/+19
svn path=/trunk/; revision=53590
2013-10-23Bugfix "Restart the running live capture" when using multiple files makes a ↵Michael Mann1-0/+1
long filename. Bug 2274 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2274) Yes this solution leaks memory, but I think the handful of bytes leaked is worth fixing this nuisance. Won't backport until leak is fixed though. svn path=/trunk/; revision=52793
2013-08-29Handle the 2GiB boundary case of the max filesize autostop condition ↵Chris Maynard1-2/+2
properly so that we avoid overflow conditions and so that we ensure we don't capture more than 2GiB. Also, document the max filesize autostop value of 2GIB as well as indicating that it's truly GiB and not GB. This fixes the problem reported on ask: http://ask.wireshark.org/questions/23891/wireshark-wont-run-with-multiple-capture-files #BACKPORT(1.10) ... not sure about 1.8? svn path=/trunk/; revision=51576
2013-08-01add --capture-comment to tsharkMartin Kaiser1-1/+9
make sure that getopt() does not permute tshark's argv[] array svn path=/trunk/; revision=51089
2013-07-27Clean up indentation.Guy Harris1-1/+1
svn path=/trunk/; revision=50953
2013-07-27command line option --capture-comment for dumpcapMartin Kaiser1-0/+2
svn path=/trunk/; revision=50945
2013-07-27add capture_comment to the capture_options structureMartin Kaiser1-0/+3
svn path=/trunk/; revision=50943
2013-06-04From Mike Garratt:Anders Broman1-0/+1
Friendly Names support causing unnecessary delay when Wireshark starts. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8034 svn path=/trunk/; revision=49752
2013-05-22Pull the capture-session state information out of capture_opts and putGuy Harris1-20/+1
it into a separate capture_session structure. capture_opts should contain only user-specified option information (and stuff directly derived from it, such as the "capturing from a pipe" flag). svn path=/trunk/; revision=49493
2013-05-22Rename capture_opts_trim_iface() toGuy Harris1-2/+3
capture_opts_default_iface_if_necessary(), to reflect what it actually does. svn path=/trunk/; revision=49491
2013-05-22On OS X, get the interface type from the System Configuration framework.Guy Harris1-12/+0
svn path=/trunk/; revision=49486
2013-03-13Add interface options preferences.Irene Rüngeler1-1/+1
svn path=/trunk/; revision=48275
2013-03-07Add buffersize and snap length to the preferences.Irene Rüngeler1-0/+1
svn path=/trunk/; revision=48163
2013-02-28Add a #define for the default capture buffer size and use it.Jeff Morriss1-0/+3
svn path=/trunk/; revision=47942
2012-11-21On error, have capture_opts_trim_iface() return the exit status thatGuy Harris1-1/+1
should be used (on success, have it return 0). Exit with that exit status; if the problem is that we couldn't get the interface list or if there are no interfaces in that list, return 2, as that's not a command-line syntax error. svn path=/trunk/; revision=46108
2012-11-19From Mike Garratt:Anders Broman1-1/+3
Friendly Names for interfaces on Windows Notes on the changes the patch covers: * if_info_t struct: addition of friendly_name * Dumpcap Interface list format changes: + Win32: "dumpcap -D" shows friendly_name in place of descript if known + All: machine interface "dumpcap -D -Z none" includes friendly_name in the list in addition to the existing parameters * interface_options struct: addition of console_display_name + When an interface name is displayed in a console, it will typically be the console_display_name (instead of name). + console_display_name is used as the basis of the autogenerated temp filenames + console_display_name is typically set to the friendly_name if known, otherwise it is set to the interface name * Enhancements to capture_opts_add_iface_opt() (the function which process -i options). + Can now specify the interface using its name and friendly_name + Interface name matching is case insenstive + Name matching first attempts exact matching, then falls back to prefix matching (e.g. dumpcap -i local) + Validates interface names, instead of blindly sending them off to winpcap/libpcap + Interface specification by number is still supported. * capture_opts_trim_iface() has been refactored: + Instead of repeating a decent chunk of the cost in capture_opts_add_iface_opt(), it calls capture_opts_trim_iface() to specify the interface. * introduction of capture_win_ifnames.[ch] (windows only code) + Implements static function GetInterfaceFriendlyNameFromDeviceGuid() - a windows version independant function to convert an interface guid into its friendly name. Uses published api functions on windows vista and higher, but falls back to unpublished API functions on older windows releases. + void get_windows_interface_friendlyname(/* IN */ char *interface_devicename, /* OUT */char **interface_friendlyname); - extracts the GUID from the interface_devicename, then uses GetInterfaceFriendlyNameFromDeviceGuid() to do the resolution * Auto temp filename generation: + Now uses wireshark_pcapng_* or wireshark_pcap_* depending on file format + Basis temp filename format on console_display_name + Win32: if console_display_name is a windows interface guid, extracts numbers from GUID here (instead of in interface option processing) GUI CHANGES: * Dialog that displays when you click the "Manage Interfaces" button (within Capture Options dialog) has been renamed from "Add new interfaces" to "Interface Management" * ui/gtk/capture_dlg.c: new_interfaces_w variable renamed to interface_management_w * Win32: Local Interfaces tab on Interface Management dialog, shows includes friendly name as far left column * Interface Management dialog defaults to larger size on win32 - so it fits without resizing local interfaces tab * Interface Management dialog now saves preferences when you click the apply button (local hidden interfaces was not persisting across restarts) * Tweaks: "Interface Details" dialog (Interface list->Capture Interfaces -> Details): + "Friendly Name" renamed to "NDIS Friendly Name" + Added "OS Friendly Name" to the top of the list * Win32: The "Capture Interfaces" dialog now shows the friendly name instead of device guid * Welcome screen: + The height of the interface list scrollbox dynamically adjusts & updates to the number visible interfaces. Up to 10 interfaces can be listed without a scroll bar, the minimum height is for 2 interfaces. + Win32: now shows just the Friendly Name if known - in place of "Interfacename_Guid:(Description)" svn path=/trunk/; revision=46083
2012-08-01It looks like we haven't inserted anything into the cap_settings_historyGerald Combs1-12/+0
hash table since r40715. Remove it and its associated functions. C++-ize iface_lists.h. svn path=/trunk/; revision=44197
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-03-21scan_local_interfaces() isn't in capture_opts.c; don't declare it inGuy Harris1-3/+0
capture_opts.h. (It arguably belongs somewhere other than in a file in ui/gtk, but, if so, move it there, e.g. to something in ui.) svn path=/trunk/; revision=41712
2012-03-12capture_opts_add_iface_opt() is not used outside capture_opts.c; make itGuy Harris1-3/+0
static. svn path=/trunk/; revision=41494
2012-01-25Actually, you only have monitor mode support if you have pcap_create() -Guy Harris1-0/+2
without pcap_create() and pcap_activate() you don't have any API to turn it on. svn path=/trunk/; revision=40725
2012-01-25Fix error when building QtShark:Bill Meier1-2/+2
...\capture_opts.h(94) : error C2461: 'remote_host' : constructor syntax missing formal parameters svn path=/trunk/; revision=40723
2012-01-25Third try. This time pipes and stdin are supported and theMichael Tüxen1-0/+90
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-90/+0
svn path=/trunk/; revision=40695
2012-01-24Second try. This time pipes and stdin are supported.Michael Tüxen1-0/+90
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-83/+0
stdin and pipes. svn path=/trunk/; revision=39498
2011-10-20Use a global list containing all interfaces and only changeMichael Tüxen1-0/+83
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-59/+1
specifc. This finalizes the change of the infrastructure. This patch is based on work by Irene Ruengeler. svn path=/trunk/; revision=37794
2011-05-31Get rid of has_cfilter to simplify the handling of multiple interfaces.Michael Tüxen1-1/+0
svn path=/trunk/; revision=37478
2011-05-16Make remote capturing settings a per interface thing. You can nowMichael Tüxen1-1/+12
configure that you want to capture on multiple remote interfaces on mulitple hosts. Improve some #ifdef mess in dumpcap. svn path=/trunk/; revision=37178
2011-05-16Make pcap samping a per interface setting.Michael Tüxen1-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). svn path=/trunk/; revision=37176
2011-05-16* Fix a bug when printing a pointer.Michael Tüxen1-1/+0
* Remove number_of_ifaces, since ifaces->len can be used instead. svn path=/trunk/; revision=37174
2011-05-13Get -L and -d working with multiple interface. Internally get some functionsMichael Tüxen1-1/+1
using the array of interface data. Improve output of -L by printing the interface name. svn path=/trunk/; revision=37120
2011-05-12Add support for handling multiple interfaces as command lineMichael Tüxen1-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). svn path=/trunk/; revision=37082
2011-04-11Back out Jeff Morris's change to make the autostop file size 64-bit - itGuy Harris1-1/+1
didn't change the GUI code for setting the autostop file size, and that broke the build. svn path=/trunk/; revision=36552
2011-04-11Jeff Morris's change to make the autostop file size 64-bit. Fixes bugGuy Harris1-1/+1
5691. svn path=/trunk/; revision=36551
2011-03-01Make HAVE_PCAP_REMOTE and HAVE_PCAP_SETSAMPLING independentMichael Tüxen1-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). svn path=/trunk/; revision=36112
2010-08-28As mentioned on the users-mailinglist[1], it could be useful to have groups ↵Sake Blok1-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 svn path=/trunk/; revision=33978
2010-07-01From Petr Lautrbach: when capturing, return the exit status of dumpcap,Guy Harris1-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. svn path=/trunk/; revision=33393
2010-05-27Make -q not a capture option again - it's used by tshark even when notGuy Harris1-1/+0
capturing, and thus even when we build without pcap. svn path=/trunk/; revision=32988
2010-05-26Add a -q flag to dumpcap, to squelch its reporting of the packet count,Guy Harris1-0/+1
and add support for SIGINFO, so, if your OS supports SIGINFO, you can get the packet count by typing ^T. svn path=/trunk/; revision=32958
2010-05-14Um, no, the problem with the Leopard x86 build is that we first do aGuy Harris1-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. svn path=/trunk/; revision=32801
2010-05-14See whether the Leopard x86 buildbot is upset because of the nameGuy Harris1-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. svn path=/trunk/; revision=32799
2010-05-13Fetch an indication of whether the interface supports capturing inGuy Harris1-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. svn path=/trunk/; revision=32789
2010-05-07As with the list of data link types, so with the list of interfaces; moveGuy Harris1-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. svn path=/trunk/; revision=32714
2010-05-07For TShark and Wireshark, get the list of link-layer types for anGuy Harris1-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. svn path=/trunk/; revision=32710
2010-05-07Beginnings of monitor mode support with libpcap 1.x.Guy Harris1-0/+3
svn path=/trunk/; revision=32702