From 91e6f25bc0ac835e2724a463e495f01cff5e04ea Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 7 May 2020 09:47:23 -0400 Subject: [PATCH] zebra: remove typedef rib_update_event_t from system Signed-off-by: Donald Sharp --- zebra/rib.h | 10 +++++----- zebra/zebra_rib.c | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/zebra/rib.h b/zebra/rib.h index 83d1b7b21a..1667f17909 100644 --- a/zebra/rib.h +++ b/zebra/rib.h @@ -304,12 +304,12 @@ typedef struct rib_tables_iter_t_ { } rib_tables_iter_t; /* Events/reasons triggering a RIB update. */ -typedef enum { +enum rib_update_event { RIB_UPDATE_KERNEL, RIB_UPDATE_RMAP_CHANGE, RIB_UPDATE_OTHER, RIB_UPDATE_MAX -} rib_update_event_t; +}; extern void route_entry_copy_nexthops(struct route_entry *re, struct nexthop *nh); @@ -373,10 +373,10 @@ extern struct route_entry *rib_match_ipv4_multicast(vrf_id_t vrf_id, extern struct route_entry *rib_lookup_ipv4(struct prefix_ipv4 *p, vrf_id_t vrf_id); -extern void rib_update(rib_update_event_t event); -extern void rib_update_vrf(vrf_id_t vrf_id, rib_update_event_t event); +extern void rib_update(enum rib_update_event event); +extern void rib_update_vrf(vrf_id_t vrf_id, enum rib_update_event event); extern void rib_update_table(struct route_table *table, - rib_update_event_t event); + enum rib_update_event event); extern int rib_sweep_route(struct thread *t); extern void rib_sweep_table(struct route_table *table); extern void rib_close_table(struct route_table *table); diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index a45085973c..ae730499ab 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -3085,7 +3085,7 @@ int rib_add(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type, return rib_add_multipath(afi, safi, p, src_p, re, ng); } -static const char *rib_update_event2str(rib_update_event_t event) +static const char *rib_update_event2str(enum rib_update_event event) { const char *ret = "UNKNOWN"; @@ -3125,7 +3125,7 @@ static void rib_update_route_node(struct route_node *rn, int type) } /* Schedule routes of a particular table (address-family) based on event. */ -void rib_update_table(struct route_table *table, rib_update_event_t event) +void rib_update_table(struct route_table *table, enum rib_update_event event) { struct route_node *rn; @@ -3174,7 +3174,7 @@ void rib_update_table(struct route_table *table, rib_update_event_t event) } } -static void rib_update_handle_vrf(vrf_id_t vrf_id, rib_update_event_t event) +static void rib_update_handle_vrf(vrf_id_t vrf_id, enum rib_update_event event) { struct route_table *table; @@ -3192,7 +3192,7 @@ static void rib_update_handle_vrf(vrf_id_t vrf_id, rib_update_event_t event) rib_update_table(table, event); } -static void rib_update_handle_vrf_all(rib_update_event_t event) +static void rib_update_handle_vrf_all(enum rib_update_event event) { struct zebra_router_table *zrt; @@ -3206,13 +3206,13 @@ static void rib_update_handle_vrf_all(rib_update_event_t event) } struct rib_update_ctx { - rib_update_event_t event; + enum rib_update_event event; bool vrf_all; vrf_id_t vrf_id; }; static struct rib_update_ctx *rib_update_ctx_init(vrf_id_t vrf_id, - rib_update_event_t event) + enum rib_update_event event) { struct rib_update_ctx *ctx; @@ -3252,7 +3252,7 @@ static int rib_update_handler(struct thread *thread) static struct thread *t_rib_update_threads[RIB_UPDATE_MAX]; /* Schedule a RIB update event for specific vrf */ -void rib_update_vrf(vrf_id_t vrf_id, rib_update_event_t event) +void rib_update_vrf(vrf_id_t vrf_id, enum rib_update_event event) { struct rib_update_ctx *ctx; @@ -3272,7 +3272,7 @@ void rib_update_vrf(vrf_id_t vrf_id, rib_update_event_t event) } /* Schedule a RIB update event for all vrfs */ -void rib_update(rib_update_event_t event) +void rib_update(enum rib_update_event event) { struct rib_update_ctx *ctx; -- 2.39.5