aboutsummaryrefslogtreecommitdiffstats
path: root/capture_ifinfo.c
AgeCommit message (Collapse)AuthorFilesLines
2013-10-18Revert SVN #52650 as per discussion on wireshark-devBill Meier1-7/+7
svn path=/trunk/; revision=52671
2013-10-16Prepend to lists rather than append as that's more efficient.Anders Broman1-7/+7
svn path=/trunk/; revision=52650
2013-07-16"man inet_pton" only says that it returns a negative value, zero or a ↵Chris Maynard1-2/+2
postive value, and not specifically -1, 0, or 1, so even though we know that's what wsutil's inet_pton will return, we shouldn't test against those exact values. svn path=/trunk/; revision=50670
2013-06-27get main_window_update out of the way... pass an update_cb to the ↵Luis Ontanon1-4/+4
capture_sync stuff ... as per the XXX comment removed from tshark.c this was a mess to keep the linker happy... I couldn't! I did this without even understanding whether calling main_window_update was realy necessary in most cases. I guess nothing or more specific update cbs would be best. svn path=/trunk/; revision=50188
2013-05-23See if this squelches a warning.Guy Harris1-1/+1
svn path=/trunk/; revision=49541
2013-05-22Pull the capture-session state information out of capture_opts and putGuy Harris1-0/+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-22wsutil/file_util.h should no longer be needed here.Guy Harris1-2/+0
svn path=/trunk/; revision=49489
2013-05-22On OS X, get the interface type from the System Configuration framework.Guy Harris1-82/+6
svn path=/trunk/; revision=49486
2013-05-21On MacOSX en1 is not necessarily wireless.Irene Rüngeler1-47/+0
svn path=/trunk/; revision=49477
2013-03-05Use explicit casts.Anders Broman1-4/+4
svn path=/trunk/; revision=48088
2012-11-22Some more if_info_t updates.Guy Harris1-2/+4
svn path=/trunk/; revision=46135
2012-11-22On UN*X, if an interface has a description, use it as the "friendlyGuy Harris1-1/+1
name". If it doesn't have a description, on OS X, use the System Configuration framework to attempt to get a "friendly name" for interfaces. If a loopback device doesn't have a friendly name, give it "Loopback" as the friendly name. Move the "turn a CFString into a mallocated C string" routine into common code, as it's used in more than one place. svn path=/trunk/; revision=46131
2012-11-19From Mike Garratt:Anders Broman1-4/+6
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-10-14Fix leak in get_interface_type as caught by cppcheck.Evan Huus1-0/+1
svn path=/trunk/; revision=45543
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-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-06-28wsutil/file_util.h is needed here.Jeff Morriss1-0/+2
svn path=/trunk/; revision=43535
2012-06-28get_interface_type() contains no GUI code, so just move it up toGuy Harris1-0/+124
capture_ifinfo.c. svn path=/trunk/; revision=43532
2011-08-05Add support for multiple interfaces to the capture options dialog.Michael Tüxen1-0/+75
Obtained from Irene Ruengeler. svn path=/trunk/; revision=38350
2010-05-28Move some code (including the optional objects) into libwsutilJeff Morriss1-1/+1
svn path=/trunk/; revision=33012
2010-05-17When dumpcap is run to get an interface list, interface capabilities, orGuy Harris1-15/+18
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-05-14Um, no, the problem with the Leopard x86 build is that we first do aGuy Harris1-2/+2
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-2/+2
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-13/+57
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-03-21Fix a comment.Guy Harris1-1/+1
svn path=/trunk/; revision=32263
2010-03-04In Wireshark and TShark, run dumpcap to get interface lists and lists ofGuy Harris1-0/+217
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