aboutsummaryrefslogtreecommitdiffstats
path: root/pcap-util.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2002-06-27 22:39:16 +0000
committerGerald Combs <gerald@wireshark.org>2002-06-27 22:39:16 +0000
commit83dc23831a86172318115027725328c34e5a1908 (patch)
tree90c491f1d8e926ce4d24eff770454df4226ba9b7 /pcap-util.c
parentc2df675f3f0d43ed924ca61454651c22c3fc0bc1 (diff)
Update tethereal to handle the "<description> : <device ID>" interface
names that are generated under Windows. Note in pcap-util.c that we may want to separate interface device names and descriptions in the future. svn path=/trunk/; revision=5770
Diffstat (limited to 'pcap-util.c')
-rw-r--r--pcap-util.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/pcap-util.c b/pcap-util.c
index a847c17004..2fad29f087 100644
--- a/pcap-util.c
+++ b/pcap-util.c
@@ -1,7 +1,7 @@
/* pcap-util.c
* Utility routines for packet capture
*
- * $Id: pcap-util.c,v 1.7 2002/05/18 02:41:45 gerald Exp $
+ * $Id: pcap-util.c,v 1.8 2002/06/27 22:39:16 gerald Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -390,7 +390,7 @@ search_for_if_cb(gpointer data, gpointer user_data)
if (strcmp((char *)data, search_user_data->name) == 0)
search_user_data->found = TRUE;
}
-#else
+#else /* Windows */
#define MAX_WIN_IF_NAME_LEN 511
GList *
get_interface_list(int *err, char *err_str) {
@@ -415,7 +415,14 @@ get_interface_list(int *err, char *err_str) {
* ASCII "\0"), a double UNICODE "\0", followed by the descriptions
* of the adapters, in ASCII format, separated by a single ASCII
* "\0" . The string is terminated by a double ASCII "\0".
+ *
+ * We prepend the device name with a description to make it easier
+ * for users to choose the interface they want. This requires that
+ * we split out the device name later on in tethereal.c and gtk/main.c.
+ * It might be useful to have separate structures for raw names and
+ * descriptions at some point.
*/
+
names = (wchar_t *)pcap_lookupdev(err_str);
i = done = 0;