Commit 2a211b9b authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Implement xroutes_estimate.

parent dcf8e2dc
......@@ -119,6 +119,13 @@ add_xroute(unsigned char prefix[16], unsigned char plen,
return 1;
}
/* Returns an overestimate of the number of xroutes. */
int
xroutes_estimate()
{
return numxroutes;
}
void
for_all_xroutes(void (*f)(struct xroute*, void*), void *closure)
{
......
......@@ -32,5 +32,6 @@ struct xroute *find_xroute(const unsigned char *prefix, unsigned char plen);
void flush_xroute(struct xroute *xroute);
int add_xroute(unsigned char prefix[16], unsigned char plen,
unsigned short metric, unsigned int ifindex, int proto);
int xroutes_estimate(void);
void for_all_xroutes(void (*f)(struct xroute*, void*), void *closure);
int check_xroutes(int send_updates);
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