aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2012-09-26 20:40:34 +0000
committerGuy Harris <guy@alum.mit.edu>2012-09-26 20:40:34 +0000
commite67439118ef8bcbb143dc693c78defb8d6f8c50b (patch)
tree28cbfdd10b577eaf62968e229d331cd4ddaf66d0 /ui
parent141200fa86aca8ebda35da3620775252930ffd89 (diff)
Add the so-called "friendly name", as provided by NDIS; at least with
the tests I've done, if it's present at all, it's just a UTF-16 version of the "vendor description" field, it's not the "friendly name" that shows up in the Control Panel. svn path=/trunk/; revision=45158
Diffstat (limited to 'ui')
-rw-r--r--ui/gtk/capture_if_details_dlg_win32.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/ui/gtk/capture_if_details_dlg_win32.c b/ui/gtk/capture_if_details_dlg_win32.c
index 533d20840f..ba143e8919 100644
--- a/ui/gtk/capture_if_details_dlg_win32.c
+++ b/ui/gtk/capture_if_details_dlg_win32.c
@@ -1934,6 +1934,8 @@ capture_if_details_general(GtkWidget *table, GtkWidget *main_vb, guint *row, LPA
unsigned int physical_medium;
int i;
unsigned char values[100];
+ guint16 wvalues[100];
+ char *utf8value;
int length;
unsigned short ushort_value;
int entries = 0;
@@ -1952,6 +1954,18 @@ capture_if_details_general(GtkWidget *table, GtkWidget *main_vb, guint *row, LPA
}
add_string_to_table(table, row, "Vendor description", string_buff);
+ /* Friendly name */
+ length = sizeof(wvalues);
+ if (wpcap_packet_request(adapter, OID_GEN_FRIENDLY_NAME, FALSE /* !set */, (char *)wvalues, &length)) {
+ utf8value = g_utf16_to_utf8(wvalues, -1, NULL, NULL, NULL);
+ g_snprintf(string_buff, DETAILS_STR_MAX, "%s", utf8value);
+ g_free(utf8value);
+ entries++;
+ } else {
+ g_snprintf(string_buff, DETAILS_STR_MAX, "-");
+ }
+ add_string_to_table(table, row, "Friendly name", string_buff);
+
/* Interface */
add_string_to_table(table, row, "Interface", iface);