[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1454932527-30569-4-git-send-email-razor@blackwall.org>
Date: Mon, 8 Feb 2016 12:55:09 +0100
From: Nikolay Aleksandrov <razor@...ckwall.org>
To: netdev@...r.kernel.org
Cc: roopa@...ulusnetworks.com, stephen@...workplumber.org,
Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
Subject: [PATCH iproute2 03/21] iplink: bridge: export read-only timers
From: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
Netlink already provides hello_timer, tcn_timer, topology_change_timer
and gc_timer, so let's make them visible.
Signed-off-by: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
---
include/utils.h | 1 -
ip/iplink_bridge.c | 16 ++++++++++++++++
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/include/utils.h b/include/utils.h
index 7310f4e0e5db..f109521a904e 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -175,7 +175,6 @@ static inline __u32 nl_mgrp(__u32 group)
return group ? (1 << (group - 1)) : 0;
}
-
int print_timestamp(FILE *fp);
void print_nlmsg_timestamp(FILE *fp, const struct nlmsghdr *n);
diff --git a/ip/iplink_bridge.c b/ip/iplink_bridge.c
index d9a725b0be0f..8504be5625fa 100644
--- a/ip/iplink_bridge.c
+++ b/ip/iplink_bridge.c
@@ -196,6 +196,22 @@ static void bridge_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
if (tb[IFLA_BR_TOPOLOGY_CHANGE_DETECTED])
fprintf(f, "topology_change_detected %u ",
rta_getattr_u8(tb[IFLA_BR_TOPOLOGY_CHANGE_DETECTED]));
+
+ if (tb[IFLA_BR_HELLO_TIMER])
+ fprintf(f, "hello_timer %llu ",
+ rta_getattr_u64(tb[IFLA_BR_HELLO_TIMER]));
+
+ if (tb[IFLA_BR_TCN_TIMER])
+ fprintf(f, "tcn_timer %llu ",
+ rta_getattr_u64(tb[IFLA_BR_TCN_TIMER]));
+
+ if (tb[IFLA_BR_TOPOLOGY_CHANGE_TIMER])
+ fprintf(f, "topology_change_timer %llu ",
+ rta_getattr_u64(tb[IFLA_BR_TOPOLOGY_CHANGE_TIMER]));
+
+ if (tb[IFLA_BR_GC_TIMER])
+ fprintf(f, "gc_timer %llu ",
+ rta_getattr_u64(tb[IFLA_BR_GC_TIMER]));
}
static void bridge_print_help(struct link_util *lu, int argc, char **argv,
--
2.4.3
Powered by blists - more mailing lists