Extcap: display a USB icon when adding a USBPcap interface
authorPascal Quantin <pascal.quantin@gmail.com>
Fri, 27 Mar 2015 06:50:42 +0000 (07:50 +0100)
committerPascal Quantin <pascal.quantin@gmail.com>
Fri, 27 Mar 2015 16:56:41 +0000 (16:56 +0000)
Change-Id: Ibe78b115eb6e7e737a5dc9c8a7937b82d8cf76a8
Reviewed-on: https://code.wireshark.org/review/7830
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
extcap.c

index 82ae1fe8caad8a7e09030e4ac3bf78638c535e36..82928e81cae62af869b7afc045fbf6b6894be547 100644 (file)
--- a/extcap.c
+++ b/extcap.c
@@ -308,7 +308,16 @@ static gboolean interfaces_cb(const gchar *extcap, gchar *output, void *data,
         if_info->name = g_strdup(int_iter->call);
         if_info->friendly_name = g_strdup(int_iter->display);
 
-        if_info->type = IF_EXTCAP;
+#ifdef WIN32
+        if (strncmp(if_info->friendly_name, "USBPcap", 7) == 0)
+        {
+            if_info->type = IF_USB;
+        }
+        else
+#endif
+        {
+            if_info->type = IF_EXTCAP;
+        }
 
         if_info->extcap = g_strdup(extcap);
         *il = g_list_append(*il, if_info);