summaryrefslogtreecommitdiff
path: root/zebra/rib.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2016-08-24 02:20:47 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-09-01 07:20:18 -0400
commit3b1098beed5c294746a9203b5de3c9da82c25d76 (patch)
tree3699ec6b1ddfce59ed491c795731b1b6d305f497 /zebra/rib.h
parent616368ed1ea8165beb2b1ba137b474ee794046d5 (diff)
zebra: Refactor rib_add_ipv[4|6] to a common function
rib_add_ipv[4|6] both were essentially the same function combine and refactor everywhere. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/rib.h')
-rw-r--r--zebra/rib.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/zebra/rib.h b/zebra/rib.h
index 8b70de7a03..e51e1277bf 100644
--- a/zebra/rib.h
+++ b/zebra/rib.h
@@ -338,10 +338,11 @@ extern int rib_uninstall_kernel (struct route_node *rn, struct rib *rib);
/* NOTE:
* All rib_add_ipv[46]* functions will not just add prefix into RIB, but
* also implicitly withdraw equal prefix of same type. */
-extern int rib_add_ipv4 (int type, u_short instance, int flags, struct prefix_ipv4 *p,
- struct in_addr *gate, struct in_addr *src,
- ifindex_t ifindex, vrf_id_t vrf_id, u_int32_t table_id,
- u_int32_t, u_int32_t, u_char, safi_t);
+extern int rib_add (afi_t afi, safi_t safi, vrf_id_t vrf_id, int type,
+ u_short instance, int flags, struct prefix *p,
+ union g_addr *gate, union g_addr *src,
+ ifindex_t ifindex, u_int32_t table_id,
+ u_int32_t, u_int32_t, u_char);
extern int rib_add_ipv4_multipath (struct prefix_ipv4 *, struct rib *, safi_t);