diff --git a/zebra/rib.h b/zebra/rib.h index de7697ee44..83d1b7b21a 100644 --- a/zebra/rib.h +++ b/zebra/rib.h @@ -276,7 +276,7 @@ struct rtadv { * Structure that is hung off of a route_table that holds information about * the table. */ -typedef struct rib_table_info_t_ { +struct rib_table_info { /* * Back pointer to zebra_vrf. @@ -284,8 +284,7 @@ typedef struct rib_table_info_t_ { struct zebra_vrf *zvrf; afi_t afi; safi_t safi; - -} rib_table_info_t; +}; enum rib_tables_iter_state { RIB_TABLES_ITER_S_INIT, @@ -412,9 +411,9 @@ extern void zebra_rib_evaluate_rn_nexthops(struct route_node *rn, uint32_t seq); /* * rib_table_info */ -static inline rib_table_info_t *rib_table_info(struct route_table *table) +static inline struct rib_table_info *rib_table_info(struct route_table *table) { - return (rib_table_info_t *)route_table_get_info(table); + return (struct rib_table_info *)route_table_get_info(table); } /* diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c index 143354b166..cc8cab1ff5 100644 --- a/zebra/zebra_dplane.c +++ b/zebra/zebra_dplane.c @@ -1530,7 +1530,7 @@ int dplane_ctx_route_init(struct zebra_dplane_ctx *ctx, enum dplane_op_e op, { int ret = EINVAL; const struct route_table *table = NULL; - const rib_table_info_t *info; + const struct rib_table_info *info; const struct prefix *p, *src_p; struct zebra_ns *zns; struct zebra_vrf *zvrf; diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index fc5128b678..f24552c80b 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -2092,7 +2092,7 @@ static unsigned nexthop_active_check(struct route_node *rn, * in every case. */ if (!family) { - rib_table_info_t *info; + struct rib_table_info *info; info = srcdest_rnode_table_info(rn); family = info->afi; diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index f89656201c..a45085973c 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -125,7 +125,7 @@ _rnode_zlog(const char *_func, vrf_id_t vrf_id, struct route_node *rn, va_end(ap); if (rn) { - rib_table_info_t *info = srcdest_rnode_table_info(rn); + struct rib_table_info *info = srcdest_rnode_table_info(rn); srcdest_rnode2str(rn, buf, sizeof(buf)); if (info->safi == SAFI_MULTICAST) @@ -420,7 +420,7 @@ void rib_install_kernel(struct route_node *rn, struct route_entry *re, struct route_entry *old) { struct nexthop *nexthop; - rib_table_info_t *info = srcdest_rnode_table_info(rn); + struct rib_table_info *info = srcdest_rnode_table_info(rn); struct zebra_vrf *zvrf = vrf_info_lookup(re->vrf_id); const struct prefix *p, *src_p; enum zebra_dplane_result ret; @@ -503,7 +503,7 @@ void rib_install_kernel(struct route_node *rn, struct route_entry *re, void rib_uninstall_kernel(struct route_node *rn, struct route_entry *re) { struct nexthop *nexthop; - rib_table_info_t *info = srcdest_rnode_table_info(rn); + struct rib_table_info *info = srcdest_rnode_table_info(rn); struct zebra_vrf *zvrf = vrf_info_lookup(re->vrf_id); if (info->safi != SAFI_UNICAST) { @@ -546,7 +546,7 @@ void rib_uninstall_kernel(struct route_node *rn, struct route_entry *re) /* Uninstall the route from kernel. */ static void rib_uninstall(struct route_node *rn, struct route_entry *re) { - rib_table_info_t *info = srcdest_rnode_table_info(rn); + struct rib_table_info *info = srcdest_rnode_table_info(rn); rib_dest_t *dest = rib_dest_from_rnode(rn); struct nexthop *nexthop; @@ -3133,13 +3133,14 @@ void rib_update_table(struct route_table *table, rib_update_event_t event) struct zebra_vrf *zvrf; struct vrf *vrf; - zvrf = table->info ? ((rib_table_info_t *)table->info)->zvrf - : NULL; + zvrf = table->info + ? ((struct rib_table_info *)table->info)->zvrf + : NULL; vrf = zvrf ? zvrf->vrf : NULL; zlog_debug("%s: %s VRF %s Table %u event %s", __func__, table->info ? afi2str( - ((rib_table_info_t *)table->info)->afi) + ((struct rib_table_info *)table->info)->afi) : "Unknown", VRF_LOGNAME(vrf), zvrf ? zvrf->table_id : 0, rib_update_event2str(event)); @@ -3425,7 +3426,7 @@ unsigned long rib_score_proto(uint8_t proto, unsigned short instance) void rib_close_table(struct route_table *table) { struct route_node *rn; - rib_table_info_t *info; + struct rib_table_info *info; rib_dest_t *dest; if (!table) diff --git a/zebra/zebra_router.c b/zebra/zebra_router.c index ea2b6752b3..ab426ae603 100644 --- a/zebra/zebra_router.c +++ b/zebra/zebra_router.c @@ -93,7 +93,7 @@ struct route_table *zebra_router_get_table(struct zebra_vrf *zvrf, { struct zebra_router_table finder; struct zebra_router_table *zrt; - rib_table_info_t *info; + struct rib_table_info *info; memset(&finder, 0, sizeof(finder)); finder.afi = afi; @@ -133,7 +133,7 @@ void zebra_router_show_table_summary(struct vty *vty) vty_out(vty, "---------------------------------------------------------------------------\n"); RB_FOREACH (zrt, zebra_router_table_head, &zrouter.tables) { - rib_table_info_t *info = route_table_get_info(zrt->table); + struct rib_table_info *info = route_table_get_info(zrt->table); vty_out(vty, "%-16s%5d %9d %7s %15s %8d %10lu\n", info->zvrf->vrf->name, zrt->ns_id, info->zvrf->vrf->vrf_id, diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index b809b75812..7a0329a774 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -357,7 +357,8 @@ static void vty_show_ip_route_detail(struct vty *vty, struct route_node *rn, const char *mcast_info = ""; if (mcast) { - rib_table_info_t *info = srcdest_rnode_table_info(rn); + struct rib_table_info *info = + srcdest_rnode_table_info(rn); mcast_info = (info->safi == SAFI_MULTICAST) ? " using Multicast RIB" : " using Unicast RIB"; @@ -978,7 +979,7 @@ static void do_show_ip_route_all(struct vty *vty, struct zebra_vrf *zvrf, unsigned short ospf_instance_id) { struct zebra_router_table *zrt; - rib_table_info_t *info; + struct rib_table_info *info; RB_FOREACH (zrt, zebra_router_table_head, &zrouter.tables) { @@ -1832,8 +1833,8 @@ static void vty_show_ip_route_summary(struct vty *vty, if (!use_json) vty_out(vty, "%-20s %-20s %s (vrf %s)\n", "Route Source", "Routes", "FIB", - zvrf_name(((rib_table_info_t *)route_table_get_info( - table)) + zvrf_name(((struct rib_table_info *) + route_table_get_info(table)) ->zvrf)); for (i = 0; i < ZEBRA_ROUTE_MAX; i++) { @@ -1980,8 +1981,8 @@ static void vty_show_ip_route_summary_prefix(struct vty *vty, if (!use_json) vty_out(vty, "%-20s %-20s %s (vrf %s)\n", "Route Source", "Prefix Routes", "FIB", - zvrf_name(((rib_table_info_t *)route_table_get_info( - table)) + zvrf_name(((struct rib_table_info *) + route_table_get_info(table)) ->zvrf)); for (i = 0; i < ZEBRA_ROUTE_MAX; i++) {