From patchwork Mon Jun 18 04:20:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 10469349 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.web.codeaurora.org (Postfix) with ESMTP id DFBBA6020C for ; Mon, 18 Jun 2018 04:21:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF1E1288E8 for ; Mon, 18 Jun 2018 04:21:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C1BF828995; Mon, 18 Jun 2018 04:21:08 +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 50953288E8 for ; Mon, 18 Jun 2018 04:21:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753772AbeFREVG (ORCPT ); Mon, 18 Jun 2018 00:21:06 -0400 Received: from s2.neomailbox.net ([5.148.176.60]:15608 "EHLO s2.neomailbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752890AbeFREVF (ORCPT ); Mon, 18 Jun 2018 00:21:05 -0400 From: Antonio Quartulli To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Antonio Quartulli Subject: [PATCH] iw: print 4ADDR attribute when dumping interface Date: Mon, 18 Jun 2018 12:20:47 +0800 Message-Id: <20180618042047.30608-1-a@unstable.cc> 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 --- 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; }