Skip to contentSkip to conversation

iw: print 4ADDR attribute when dumping interface

PATCH New Antonio Quartulli 1 participant 1 message Jun 18, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iw: print 4ADDR attribute when dumping interface

Print the value of the 4ADDr attribute when dumping the interface status.

---
 interface.c | 5 +++++
 1 file changed, 5 insertions(+)
interface.c +5 -0
index 712bbdc..678955d 100644
@@ -447,6 +447,11 @@ static int print_iface_handler(struct nl_msg *msg, void *arg)
 		printf("%s\tmulticast TXQ:%s\n", indent, buf);
 	}
 
+	if (tb_msg[NL80211_ATTR_4ADDR]) {
+		uint8_t use_4addr = nla_get_u8(tb_msg[NL80211_ATTR_4ADDR]);
+		printf("%s\t4addr: %d\n", indent, use_4addr);
+	}
+
 	return NL_SKIP;
 }
 
Signature · 1 line
2.17.1