ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: [Ethereal-dev] interface options patch III

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Nathan Jennings <njen@xxxxxxxxxxxxx>
Date: Tue, 09 Sep 2003 11:50:54 -0400
Hello,

Attached patch removes OS supplied (Windows) description from what should be a device-only list (column).

-Nathan
--- ../ethereal-0.9.14/gtk/capture_prefs.c	Tue Sep  9 11:12:36 2003
+++ gtk/capture_prefs.c	Tue Sep  9 11:34:04 2003
@@ -805,6 +805,7 @@
 	int		err;
 	char	err_str[PCAP_ERRBUF_SIZE];
 	gchar	*text[1];
+	gchar	*os_desc;
 	guint	i;
 	guint	nitems;
 	
@@ -825,6 +826,9 @@
 		/* should never happen, but just in case */
 		if (text[0] == NULL)
 			continue;
+		/* remove OS description if present */
+		if ((os_desc = strrchr(text[0], ' ')) != NULL)
+			text[0] = os_desc++;
 		gtk_clist_append(GTK_CLIST(clist), text);
 		/* fill "new" options CList with previously saved values */
 		ifopts_new_options_add(GTK_CLIST(new_clist), text[0]);