Commit dcf8e2dc authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Implement installed_routes_estimate.

parent 82578ef4
......@@ -134,6 +134,13 @@ find_installed_route(const unsigned char *prefix, unsigned char plen)
return NULL;
}
/* Returns an overestimate of the number of installed routes. */
int
installed_routes_estimate(void)
{
return route_slots;
}
static int
resize_route_table(int new_slots)
{
......
......@@ -69,6 +69,7 @@ struct route *find_route(const unsigned char *prefix, unsigned char plen,
struct neighbour *neigh, const unsigned char *nexthop);
struct route *find_installed_route(const unsigned char *prefix,
unsigned char plen);
int installed_routes_estimate(void);
void flush_route(struct route *route);
void flush_all_routes(void);
void flush_neighbour_routes(struct neighbour *neigh);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment