summaryrefslogtreecommitdiffstats
path: root/babeld/xroute.h
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2017-08-21 03:10:50 +0200
committerRenato Westphal <renato@opensourcerouting.org>2017-08-24 01:25:45 +0200
commit744899219f4214398a3078874a341000a372e29d (patch)
treeb33edf26332d87c734bb68f19efb3b4d37fd5a4f /babeld/xroute.h
parentbgpd: unify ipv4/ipv6 zebra-tx functions (diff)
downloadfrr-744899219f4214398a3078874a341000a372e29d.tar.xz
frr-744899219f4214398a3078874a341000a372e29d.zip
*: use zapi_route to send/receive redistributed routes as well
Some differences compared to the old API: * Now the redistributed routes are sent using address-family independent messages (ZEBRA_REDISTRIBUTE_ROUTE_ADD and ZEBRA_REDISTRIBUTE_ROUTE_DEL). This allows us to unify the ipv4/ipv6 zclient callbacks in the client daemons and thus remove a lot of duplicate code; * Now zebra sends all nexthops of the redistributed routes to the client daemons, not only the first one. This shouldn't have any noticeable performance implications and will allow us to remove an ugly exception we had for ldpd (which needs to know all nexthops of the redistributed routes). The other client daemons can simply ignore the nexthops if they want or consult just the first one (e.g. ospfd/ospf6d/ripd/ripngd). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'babeld/xroute.h')
-rw-r--r--babeld/xroute.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/babeld/xroute.h b/babeld/xroute.h
index 27899e62a..59afccb59 100644
--- a/babeld/xroute.h
+++ b/babeld/xroute.h
@@ -36,14 +36,8 @@ struct xroute_stream;
struct xroute *find_xroute(const unsigned char *prefix, unsigned char plen);
void flush_xroute(struct xroute *xroute);
-int babel_ipv4_route_add (struct zapi_ipv4 *api, struct prefix_ipv4 *prefix,
- unsigned int ifindex, struct in_addr *nexthop);
-int babel_ipv4_route_delete (struct zapi_ipv4 *api, struct prefix_ipv4 *prefix,
- unsigned int ifindex);
-int babel_ipv6_route_add (struct zapi_ipv6 *api, struct prefix_ipv6 *prefix,
- unsigned int ifindex, struct in6_addr *nexthop);
-int babel_ipv6_route_delete (struct zapi_ipv6 *api, struct prefix_ipv6 *prefix,
- unsigned int ifindex);
+int babel_route_add (struct zapi_route *api);
+int babel_route_delete (struct zapi_route *api);
int xroutes_estimate(void);
struct xroute_stream *xroute_stream(void);
struct xroute *xroute_stream_next(struct xroute_stream *stream);