From: Nikolay Aleksandrov <razor@blackwall.org>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, stephen@networkplumber.org,
Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Subject: [PATCH iproute2 net-next 1/2] iplink: bridge: add ageing_time, stp_state and priority when showing attributes
Date: Tue, 11 Aug 2015 15:56:23 +0300 [thread overview]
Message-ID: <1439297784-1962-2-git-send-email-razor@blackwall.org> (raw)
In-Reply-To: <1439297784-1962-1-git-send-email-razor@blackwall.org>
From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
When showing bridge attributes, show also ageing_time, stp_state and
priority if available.
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
---
ip/iplink_bridge.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/ip/iplink_bridge.c b/ip/iplink_bridge.c
index 297160c490fd..2a0bf6e147d0 100644
--- a/ip/iplink_bridge.c
+++ b/ip/iplink_bridge.c
@@ -109,6 +109,18 @@ static void bridge_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
if (tb[IFLA_BR_MAX_AGE])
fprintf(f, "max_age %u ",
rta_getattr_u32(tb[IFLA_BR_MAX_AGE]));
+
+ if (tb[IFLA_BR_AGEING_TIME])
+ fprintf(f, "ageing_time %u ",
+ rta_getattr_u32(tb[IFLA_BR_AGEING_TIME]));
+
+ if (tb[IFLA_BR_STP_STATE])
+ fprintf(f, "stp_state %u ",
+ rta_getattr_u32(tb[IFLA_BR_STP_STATE]));
+
+ if (tb[IFLA_BR_PRIORITY])
+ fprintf(f, "priority %u ",
+ rta_getattr_u16(tb[IFLA_BR_PRIORITY]));
}
struct link_util bridge_link_util = {
--
2.4.3
next prev parent reply other threads:[~2015-08-11 12:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-11 12:56 [PATCH iproute2 net-next 0/2] iplink: bridge: add vlan filtering support and show more attributes Nikolay Aleksandrov
2015-08-11 12:56 ` Nikolay Aleksandrov [this message]
2015-08-12 16:14 ` [PATCH iproute2 net-next 1/2] iplink: bridge: add ageing_time, stp_state and priority when showing attributes Stephen Hemminger
2015-08-11 12:56 ` [PATCH iproute2 net-next 2/2] iplink: bridge: add support for IFLA_BR_VLAN_FILTERING attribute Nikolay Aleksandrov
2015-08-12 16:21 ` Stephen Hemminger
2015-08-12 18:42 ` Nikolay Aleksandrov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1439297784-1962-2-git-send-email-razor@blackwall.org \
--to=razor@blackwall.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=nikolay@cumulusnetworks.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).