~ubuntu-branches/ubuntu/utopic/babeld/utopic

« back to all changes in this revision

Viewing changes to xroute.c

  • Committer: Package Import Robot
  • Author(s): Stéphane Glondu
  • Date: 2011-12-08 20:49:12 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20111208204912-oiizndrm9va3aplf
Tags: 1.3.0-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
#include "xroute.h"
37
37
#include "util.h"
38
38
#include "configuration.h"
39
 
#include "network.h"
 
39
#include "interface.h"
40
40
#include "local.h"
41
41
 
42
 
struct xroute *xroutes;
43
 
int numxroutes = 0;
44
 
int maxxroutes = 0;
 
42
static struct xroute *xroutes;
 
43
static int numxroutes = 0, maxxroutes = 0;
45
44
 
46
45
struct xroute *
47
46
find_xroute(const unsigned char *prefix, unsigned char plen)
120
119
    return 1;
121
120
}
122
121
 
 
122
/* Returns an overestimate of the number of xroutes. */
 
123
int
 
124
xroutes_estimate()
 
125
{
 
126
    return numxroutes;
 
127
}
 
128
 
 
129
void
 
130
for_all_xroutes(void (*f)(struct xroute*, void*), void *closure)
 
131
{
 
132
    int i;
 
133
 
 
134
    for(i = 0; i < numxroutes; i++)
 
135
        (*f)(&xroutes[i], closure);
 
136
}
 
137
 
123
138
int
124
139
check_xroutes(int send_updates)
125
140
{