diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2018-05-09 06:35:01 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2018-10-27 20:16:12 +0200 |
commit | b745780b5f56e9770c5ba0785bafd17b2239c6cc (patch) | |
tree | 87e54690683b69d058a6f08b18116de2936278c6 /ripd/ripd.h | |
parent | ripd: retrofit the 'route' command to the new northbound model (diff) | |
download | frr-b745780b5f56e9770c5ba0785bafd17b2239c6cc.tar.xz frr-b745780b5f56e9770c5ba0785bafd17b2239c6cc.zip |
ripd: retrofit the 'timer basic' command to the new northbound model
Trivial conversion. Use the northbound 'apply_finish()' callback so
we'll call rip_event() only once even if we change the three RIP timers
at the same time.
Convert the timers to uint32_t to match their representation in the
YANG model.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ripd/ripd.h')
-rw-r--r-- | ripd/ripd.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/ripd/ripd.h b/ripd/ripd.h index 5ac2be9ab..c8bc68c09 100644 --- a/ripd/ripd.h +++ b/ripd/ripd.h @@ -60,11 +60,6 @@ #define INADDR_RIP_GROUP 0xe0000009 /* 224.0.0.9 */ #endif -/* RIP timers */ -#define RIP_UPDATE_TIMER_DEFAULT 30 -#define RIP_TIMEOUT_TIMER_DEFAULT 180 -#define RIP_GARBAGE_TIMER_DEFAULT 120 - /* RIP peer timeout value. */ #define RIP_PEER_TIMER_DEFAULT 180 @@ -132,9 +127,9 @@ struct rip { struct thread *t_triggered_interval; /* RIP timer values. */ - unsigned long update_time; - unsigned long timeout_time; - unsigned long garbage_time; + uint32_t update_time; + uint32_t timeout_time; + uint32_t garbage_time; /* RIP default metric. */ uint8_t default_metric; @@ -412,6 +407,7 @@ extern int rip_enable_network_delete(struct prefix *p); extern int rip_enable_if_add(const char *ifname); extern int rip_enable_if_delete(const char *ifname); +extern void rip_event(enum rip_event, int); extern void rip_ecmp_disable(void); extern int rip_create_socket(void); |