Commit ae024ecc authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Define diversity_kind.

parent 24fd8d0b
...@@ -43,6 +43,7 @@ struct route *routes = NULL; ...@@ -43,6 +43,7 @@ struct route *routes = NULL;
int numroutes = 0, maxroutes = 0; int numroutes = 0, maxroutes = 0;
int kernel_metric = 0; int kernel_metric = 0;
int allow_duplicates = -1; int allow_duplicates = -1;
int diversity_kind = DIVERSITY_NONE;
int diversity_factor = 256; /* in units of 1/256 */ int diversity_factor = 256; /* in units of 1/256 */
struct route * struct route *
......
...@@ -40,10 +40,15 @@ route_metric(const struct route *route) ...@@ -40,10 +40,15 @@ route_metric(const struct route *route)
return MIN(m, INFINITY); return MIN(m, INFINITY);
} }
#define DIVERSITY_NONE 0
#define DIVERSITY_INTERFACE_1 1
#define DIVERSITY_CHANNEL_1 2
#define DIVERSITY_CHANNEL_INF 3
extern struct route *routes; extern struct route *routes;
extern int numroutes, maxroutes; extern int numroutes, maxroutes;
extern int kernel_metric, allow_duplicates; extern int kernel_metric, allow_duplicates;
extern int diversity_factor; extern int diversity_kind, diversity_factor;
struct route *find_route(const unsigned char *prefix, unsigned char plen, struct route *find_route(const unsigned char *prefix, unsigned char plen,
struct neighbour *neigh, const unsigned char *nexthop); struct neighbour *neigh, const unsigned char *nexthop);
......
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