]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: remove typedef rib_update_event_t from system
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 7 May 2020 13:47:23 +0000 (09:47 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 8 May 2020 12:10:49 +0000 (08:10 -0400)
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/rib.h
zebra/zebra_rib.c

index 83d1b7b21a7e60c3a61c4bdc7ba7be4be4c9e5c0..1667f179096627e1b9f708041cfedcfcc2fde20c 100644 (file)
@@ -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);
index a45085973ca5886be3afde9b70412c7849c90e7c..ae730499aba2f51f185bf0723e49e4256c25d905 100644 (file)
@@ -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;