diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2019-01-04 19:08:10 -0200 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2019-01-18 16:15:41 -0200 |
| commit | c08a21077faa595a76f87cc4b67d76623f045e0f (patch) | |
| tree | 59bd6b3dd713f05e72e44478bb0426b5b061bd29 /ripd/ripd.h | |
| parent | 241987a816b8a2bb1d2973f33624fdea62718208 (diff) | |
ripd: move global counters to the rip structure
The only sideeffect of this change is that these counters will be
reset when RIP is deconfigured and then configured again, but this
shouldn't be a problem as the RIP MIB isn't specific about this.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ripd/ripd.h')
| -rw-r--r-- | ripd/ripd.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ripd/ripd.h b/ripd/ripd.h index bc0451d88f..a75e43d5df 100644 --- a/ripd/ripd.h +++ b/ripd/ripd.h @@ -169,6 +169,15 @@ struct rip { /* For distribute-list container */ struct distribute_ctx *distribute_ctx; + + /* Counters for SNMP. */ + struct { + /* RIP route changes. */ + long route_changes; + + /* RIP queries. */ + long queries; + } counters; }; /* RIP routing table entry which belong to rip_packet. */ @@ -474,10 +483,6 @@ extern struct zebra_privs_t ripd_privs; /* Master thread strucutre. */ extern struct thread_master *master; -/* RIP statistics for SNMP. */ -extern long rip_global_route_changes; -extern long rip_global_queries; - DECLARE_HOOK(rip_ifaddr_add, (struct connected * ifc), (ifc)) DECLARE_HOOK(rip_ifaddr_del, (struct connected * ifc), (ifc)) |
