aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2009-11-11 00:43:23 +0000
committerGerald Combs <gerald@wireshark.org>2009-11-11 00:43:23 +0000
commit7b7d48d2a7fc8e457a6f4d3a84d68e0a3363bf9d (patch)
tree3f7599530ab295b88ffed8722fbd5e2a70ad6728 /gtk
parentfdbdedf2b400a4dca1ea6d7d91709ea725e53c5a (diff)
Check for vmnet interfaces everywhere, not just Windows and OS X. Make
the "vmnet" check case-insensitive. Look for "vmxnet" as well. Clarify vmnet (host) vs vmxnet (guest). svn path=/trunk/; revision=30929
Diffstat (limited to 'gtk')
-rw-r--r--gtk/capture_if_dlg.c42
1 files changed, 22 insertions, 20 deletions
diff --git a/gtk/capture_if_dlg.c b/gtk/capture_if_dlg.c
index fc44642de8..2f14070a60 100644
--- a/gtk/capture_if_dlg.c
+++ b/gtk/capture_if_dlg.c
@@ -70,11 +70,12 @@
#ifdef HAVE_AIRPCAP
#include "../image/toolbar/capture_airpcap_16.xpm"
#endif
+
#ifdef _WIN32
#include "../image/toolbar/capture_ethernet_16.xpm"
-
#include "../image/toolbar/modem_16.xpm"
#endif
+
#include "../image/toolbar/network_virtual_16.xpm"
/* new buttons to be used instead of labels for 'Capture','Prepare',' */
@@ -348,12 +349,7 @@ GtkWidget * capture_get_if_icon(const if_info_t* if_info _U_)
return pixbuf_to_widget(network_wireless_pb_data);
}
- /* TODO: find a better icon! */
- if ( if_info->description && strstr(if_info->description,"VMware") != NULL ) {
- return xpm_to_widget(network_virtual_16_xpm);
- }
-
- if ( if_info->description && strstr(if_info->description,"Bluetooth") != NULL ) {
+ if ( if_info->description && strstr(if_info->description, "Bluetooth") != NULL ) {
return pixbuf_to_widget(network_bluetooth_pb_data);
}
#elif defined(__APPLE__)
@@ -384,17 +380,6 @@ GtkWidget * capture_get_if_icon(const if_info_t* if_info _U_)
*/
/*
- * TODO: find a better icon!
- * These devices have an IFT_ of IFT_ETHER, so we have to check the name.
- * XXX - are these supposed to be for VMware interfaces on the host
- * machine, for talking to the guest, or for VMware-supplied interfaces
- * on the guest machine, or both?
- */
- if ( strncmp(if_info->name,"vmnet",5) == 0) {
- return xpm_to_widget(network_virtual_16_xpm);
- }
-
- /*
* XXX - there's currently no support for raw Bluetooth capture,
* and IP-over-Bluetooth devices just look like fake Ethernet
* devices. There's also Bluetooth modem support, but that'll
@@ -416,8 +401,6 @@ GtkWidget * capture_get_if_icon(const if_info_t* if_info _U_)
g_free(wireless_path);
}
- /* XXX - "vmnet" again, for VMware interfaces? */
-
/*
* Bluetooth devices.
*
@@ -429,6 +412,25 @@ GtkWidget * capture_get_if_icon(const if_info_t* if_info _U_)
}
#endif
+ /*
+ * TODO: find a better icon!
+ * Bridge, NAT, or host-only interfaces on VMWare hosts have the name
+ * vmnet[0-9]+ or VMnet[0-9+ on Windows. Guests might use a native
+ * (LANCE or E1000) driver or the vmxnet driver. These devices have an
+ * IFT_ of IFT_ETHER, so we have to check the name.
+ */
+ if ( g_ascii_strncasecmp(if_info->name, "vmnet", 5) == 0) {
+ return xpm_to_widget(network_virtual_16_xpm);
+ }
+
+ if ( g_ascii_strncasecmp(if_info->name, "vmxnet", 6) == 0) {
+ return xpm_to_widget(network_virtual_16_xpm);
+ }
+
+ if ( if_info->description && strstr(if_info->description, "VMware") != NULL ) {
+ return xpm_to_widget(network_virtual_16_xpm);
+ }
+
return pixbuf_to_widget(network_wired_pb_data);
}