From patchwork Sat Mar 23 09:39:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 10866797 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0431D15AC for ; Sat, 23 Mar 2019 10:20:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0AD52A7F7 for ; Sat, 23 Mar 2019 10:20:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BE82C2A7FB; Sat, 23 Mar 2019 10:20:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 310BA2A7F7 for ; Sat, 23 Mar 2019 10:20:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726667AbfCWKU2 (ORCPT ); Sat, 23 Mar 2019 06:20:28 -0400 Received: from s2.neomailbox.net ([5.148.176.60]:6818 "EHLO s2.neomailbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726014AbfCWKU2 (ORCPT ); Sat, 23 Mar 2019 06:20:28 -0400 X-Greylist: delayed 2393 seconds by postgrey-1.27 at vger.kernel.org; Sat, 23 Mar 2019 06:20:27 EDT From: Antonio Quartulli To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Antonio Quartulli Subject: [PATCH] iw: print 4ADDR attribute when dumping interface Date: Sat, 23 Mar 2019 10:39:14 +0100 Message-Id: <20190323093914.3281-1-a@unstable.cc> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Print the value of the 4ADDR attribute when dumping the interface status. Signed-off-by: Antonio Quartulli --- This patch was sleeping in my local repo for a while .. maybe it is useful to other people too. Cheers, interface.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/interface.c b/interface.c index 712bbdc..678955d 100644 --- a/interface.c +++ b/interface.c @@ -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; }