forked from osmocom/wireshark
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
This commit is contained in:
parent
141200fa86
commit
e67439118e
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue