[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1439297784-1962-2-git-send-email-razor@blackwall.org>
Date: Tue, 11 Aug 2015 15:56:23 +0300
From: Nikolay Aleksandrov <razor@...ckwall.org>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, stephen@...workplumber.org,
Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
Subject: [PATCH iproute2 net-next 1/2] iplink: bridge: add ageing_time, stp_state and priority when showing attributes
From: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
When showing bridge attributes, show also ageing_time, stp_state and
priority if available.
Signed-off-by: Nikolay Aleksandrov <nikolay@...ulusnetworks.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists