From 23ac9e9a9eefe13918ee7f21a1d0f271a44d9efd Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Sun, 31 May 2009 15:24:27 +0200 Subject: Changes pipes to transfer all routes between routing table, not just optimal routes. --- nest/route.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'nest/route.h') diff --git a/nest/route.h b/nest/route.h index 43cfa9d..e55ae1d 100644 --- a/nest/route.h +++ b/nest/route.h @@ -146,6 +146,7 @@ typedef struct network { typedef struct rte { struct rte *next; net *net; /* Network this RTE belongs to */ + struct proto *sender; /* Protocol instance that sent the route to the routing table */ struct rta *attrs; /* Attributes of this route */ byte flags; /* Flags (REF_...) */ byte pflags; /* Protocol-specific flags */ @@ -178,6 +179,10 @@ typedef struct rte { #define REF_COW 1 /* Copy this rte on write */ +/* Types of route announcement, also used as flags */ +#define RA_OPTIMAL 1 /* Announcement of optimal route change */ +#define RA_ANY 2 /* Announcement of any route change */ + struct config; void rt_init(void); @@ -191,6 +196,7 @@ static inline net *net_get(rtable *tab, ip_addr addr, unsigned len) { return (ne rte *rte_find(net *net, struct proto *p); rte *rte_get_temp(struct rta *); void rte_update(rtable *tab, net *net, struct proto *p, rte *new); +void rte_update2(rtable *tab, net *net, struct proto *p, struct proto *src, rte *new); void rte_discard(rtable *tab, rte *old); void rte_dump(rte *); void rte_free(rte *); @@ -230,7 +236,7 @@ void rt_show(struct rt_show_data *); typedef struct rta { struct rta *next, **pprev; /* Hash chain */ - struct proto *proto; /* Protocol instance */ + struct proto *proto; /* Protocol instance that originally created the route */ unsigned uc; /* Use count */ byte source; /* Route source (RTS_...) */ byte scope; /* Route scope (SCOPE_... -- see ip.h) */ -- cgit v1.2.3