All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] iwmon: Print WSC AuthorizedMACs extended attributes
@ 2019-12-05  3:22 Andrew Zaborowski
  2019-12-05  3:22 ` [PATCH 2/7] iwmon: Update to use NL80211_ATTR_SOCKET_OWNER Andrew Zaborowski
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Andrew Zaborowski @ 2019-12-05  3:22 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 1179 bytes --]

---
 monitor/nlmon.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/monitor/nlmon.c b/monitor/nlmon.c
index 4c0e045f..82acb533 100644
--- a/monitor/nlmon.c
+++ b/monitor/nlmon.c
@@ -2763,9 +2763,25 @@ static void print_wsc_wfa_ext_version2(unsigned int level, const char *label,
 	print_attr(level, "%s: %x.%x", label, bytes[0] >> 4, bytes[0] & 0xf);
 }
 
+static void print_wsc_wfa_ext_authorized_macs(unsigned int level,
+						const char *label,
+						const void *data, uint16_t size)
+{
+	if (size > 30 || size % 6 != 0) {
+		printf("malformed packet\n");
+		return;
+	}
+
+	for (; size; size -= 6, data += 6)
+		print_attr(level, "%s: %s", label, util_address_to_string(data));
+}
+
 static struct attr_entry wsc_wfa_ext_attr_entry[] = {
 	{ WSC_WFA_EXTENSION_VERSION2,			"Version2",
 		ATTR_CUSTOM,	{ .function = print_wsc_wfa_ext_version2 } },
+	{ WSC_WFA_EXTENSION_AUTHORIZED_MACS,		"Authorized MAC",
+		ATTR_CUSTOM,
+		{ .function = print_wsc_wfa_ext_authorized_macs } },
 	{ WSC_WFA_EXTENSION_NETWORK_KEY_SHAREABLE,
 						"Network Key Shareable",
 		ATTR_CUSTOM,	{ .function = print_wsc_bool } },
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-12-14  1:56 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-05  3:22 [PATCH 1/7] iwmon: Print WSC AuthorizedMACs extended attributes Andrew Zaborowski
2019-12-05  3:22 ` [PATCH 2/7] iwmon: Update to use NL80211_ATTR_SOCKET_OWNER Andrew Zaborowski
2019-12-05  3:22 ` [PATCH 3/7] wsc: Declare the credentials structure in wsc.h Andrew Zaborowski
2019-12-09  3:49   ` Denis Kenzior
2019-12-05  3:22 ` [PATCH 4/7] wsc: Refactor to separate station-specific code Andrew Zaborowski
2019-12-09  4:40   ` Denis Kenzior
2019-12-14  1:56     ` Andrew Zaborowski
2019-12-05  3:22 ` [PATCH 5/7] wsc: Refactor to make the DBus interface reusable Andrew Zaborowski
2019-12-05  3:22 ` [PATCH 6/7] wsc: Accept extra IEs in wsc_start_enrollee Andrew Zaborowski
2019-12-09  5:03   ` Denis Kenzior
2019-12-05  3:22 ` [PATCH 7/7] doc: Generalize wsc-api method descriptions Andrew Zaborowski
2019-12-09  5:10   ` Denis Kenzior
2019-12-09  3:47 ` [PATCH 1/7] iwmon: Print WSC AuthorizedMACs extended attributes Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.