Revision 62e64905 nest/route.h
nest/route.h | ||
---|---|---|
390 | 390 |
#define RTC_MULTICAST 2 |
391 | 391 |
#define RTC_ANYCAST 3 /* IPv6 Anycast */ |
392 | 392 |
|
393 |
#define RTD_UNICAST 0 /* Next hop is neighbor router */ |
|
393 |
#define RTD_NONE 0 /* Undefined next hop */ |
|
394 |
#define RTD_UNICAST 1 /* Next hop is neighbor router */ |
|
394 | 395 |
#define RTD_BLACKHOLE 2 /* Silently drop packets */ |
395 | 396 |
#define RTD_UNREACHABLE 3 /* Reject as unreachable */ |
396 | 397 |
#define RTD_PROHIBIT 4 /* Administratively prohibited */ |
397 |
#define RTD_NONE 6 /* Invalid RTD */ |
|
398 | 398 |
|
399 | 399 |
/* Flags for net->n.flags, used by kernel syncer */ |
400 | 400 |
#define KRF_INSTALLED 0x80 /* This route should be installed in the kernel */ |
... | ... | |
408 | 408 |
|
409 | 409 |
/* Route has regular, reachable nexthop (i.e. not RTD_UNREACHABLE and like) */ |
410 | 410 |
static inline int rte_is_reachable(rte *r) |
411 |
{ uint d = r->attrs->dest; return (d == RTD_UNICAST); }
|
|
411 |
{ return r->attrs->dest == RTD_UNICAST; }
|
|
412 | 412 |
|
413 | 413 |
|
414 | 414 |
/* |
... | ... | |
523 | 523 |
struct nexthop *nexthop_merge(struct nexthop *x, struct nexthop *y, int rx, int ry, int max, linpool *lp); |
524 | 524 |
static inline void nexthop_link(struct rta *a, struct nexthop *from) |
525 | 525 |
{ memcpy(&a->nh, from, nexthop_size(from)); } |
526 |
void nexthop_insert(struct nexthop *n, struct nexthop *y); |
|
526 |
void nexthop_insert(struct nexthop **n, struct nexthop *y);
|
|
527 | 527 |
int nexthop_is_sorted(struct nexthop *x); |
528 | 528 |
|
529 | 529 |
void rta_init(void); |
Also available in: Unified diff