summaryrefslogtreecommitdiffstats
path: root/zebra/interface.h
diff options
context:
space:
mode:
authorChristian Franke <nobody@nowhere.ws>2016-04-07 21:43:44 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-04-08 02:41:43 +0200
commit55ce4d3addcc1ba24c0c1fe2491a7aeb17a37137 (patch)
treee5f11c25ac171681734dd7586adecae575cb9e03 /zebra/interface.h
parentlib: use constant to replace magic value for length of quagga_timestamp (diff)
downloadfrr-55ce4d3addcc1ba24c0c1fe2491a7aeb17a37137.tar.xz
frr-55ce4d3addcc1ba24c0c1fe2491a7aeb17a37137.zip
zebra: count iface up/down events and keep last time of their occurrence
It is quite useful to be able to assert whether specific interfaces have flapped or also to verify that specific interfaces have not flapped. By having counters for those events and storing the last time of their occurrence, this is made possible. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Acked-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Diffstat (limited to 'zebra/interface.h')
-rw-r--r--zebra/interface.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/zebra/interface.h b/zebra/interface.h
index ed5150776..8e8387eaf 100644
--- a/zebra/interface.h
+++ b/zebra/interface.h
@@ -189,6 +189,12 @@ struct zebra_if
/* Installed addresses chains tree. */
struct route_table *ipv4_subnets;
+ /* Information about up/down changes */
+ unsigned int up_count;
+ char up_last[QUAGGA_TIMESTAMP_LEN];
+ unsigned int down_count;
+ char down_last[QUAGGA_TIMESTAMP_LEN];
+
#if defined(HAVE_RTADV)
struct rtadvconf rtadv;
#endif /* HAVE_RTADV */