All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/4] nlmon: print Mobility Domain element
@ 2021-09-21 20:44 James Prestwood
  0 siblings, 0 replies; only message in thread
From: James Prestwood @ 2021-09-21 20:44 UTC (permalink / raw)
  To: iwd

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

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

diff --git a/monitor/nlmon.c b/monitor/nlmon.c
index 4cf2b856..ec7fc03a 100644
--- a/monitor/nlmon.c
+++ b/monitor/nlmon.c
@@ -2235,6 +2235,30 @@ static void print_fast_bss_transition(unsigned int level, const char *label,
 	}
 }
 
+static void print_mobility_domain(unsigned int level, const char *label,
+					const void *data, uint16_t size)
+{
+	uint16_t mdid;
+	bool ft_over_ds;
+	bool resource_req;
+
+	print_attr(level, "%s", label);
+
+	if (ie_parse_mobility_domain_from_data(data - 2, size + 2, &mdid,
+					&ft_over_ds, &resource_req) < 0) {
+		print_attr(level + 1, "error parsing");
+		return;
+	}
+
+	print_attr(level + 1, "MDID: %04x", mdid);
+
+	if (ft_over_ds)
+		print_attr(level + 1, "FT-over-DS bit set");
+
+	if (resource_req)
+		print_attr(level + 1, "Resource Request Protocol bit set");
+}
+
 static struct attr_entry ie_entry[] = {
 	{ IE_TYPE_SSID,				"SSID",
 		ATTR_CUSTOM,	{ .function = print_ie_ssid } },
@@ -2295,6 +2319,8 @@ static struct attr_entry ie_entry[] = {
 		ATTR_CUSTOM,	{ .function = print_measurement_report } },
 	{ IE_TYPE_FAST_BSS_TRANSITION,		"Fast BSS Transition",
 		ATTR_CUSTOM,	{ .function = print_fast_bss_transition } },
+	{ IE_TYPE_MOBILITY_DOMAIN,		"Mobility Domain",
+		ATTR_CUSTOM,	{ .function = print_mobility_domain } },
 	{ },
 };
 
-- 
2.31.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-21 20:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-21 20:44 [PATCH 3/4] nlmon: print Mobility Domain element James Prestwood

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.