Search Linux Wireless

[PATCHv2] iw: print the ssid when requesting device info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The GET_INTERFACE command receives also the ssid as part of the reply.
This patch makes iw print the ssid together with the other information
when issuing the "iw dev $vif info" command.

Signed-off-by: Antonio Quartulli <ordex@xxxxxxxxxxxxx>
---
v2:
 - use print_ssid_escaped()


 interface.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/interface.c b/interface.c
index 810c2b9..28626dc 100644
--- a/interface.c
+++ b/interface.c
@@ -294,6 +294,12 @@ static int print_iface_handler(struct nl_msg *msg, void *arg)
 		mac_addr_n2a(mac_addr, nla_data(tb_msg[NL80211_ATTR_MAC]));
 		printf("%s\taddr %s\n", indent, mac_addr);
 	}
+	if (tb_msg[NL80211_ATTR_SSID]) {
+		printf("%s\tssid ", indent);
+		print_ssid_escaped(nla_len(tb_msg[NL80211_ATTR_SSID]),
+				   nla_data(tb_msg[NL80211_ATTR_SSID]));
+		printf("\n");
+	}
 	if (tb_msg[NL80211_ATTR_IFTYPE])
 		printf("%s\ttype %s\n", indent, iftype_name(nla_get_u32(tb_msg[NL80211_ATTR_IFTYPE])));
 	if (!wiphy && tb_msg[NL80211_ATTR_WIPHY])
-- 
1.8.0

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux