From c10421d3d4b5f23dc953c887332bdb6e80ae0540 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 3 Apr 1999 13:05:18 +0000 Subject: More changes to the kernel syncer. o Now compatible with filtering. o Learning of kernel routes supported only on CONFIG_SELF_CONSCIOUS systems (on the others it's impossible to get it semantically correct). o Learning now stores all of its routes in a separate fib and selects the ones the kernel really uses for forwarding packets. o Better treatment of CONFIG_AUTO_ROUTES ports. o Lots of internal changes. --- nest/route.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'nest/route.h') diff --git a/nest/route.h b/nest/route.h index 0de5455..5fcae2b 100644 --- a/nest/route.h +++ b/nest/route.h @@ -140,18 +140,20 @@ typedef struct rte { struct { } bgp; #endif - struct { /* Routes internally generated by krt sync */ - int src; /* Alleged route source (see krt.h) */ - } krt_sync; + struct { /* Routes generated by krt sync (both temporary and inherited ones) */ + s8 src; /* Alleged route source (see krt.h) */ + u8 proto; /* Kernel source protocol ID */ + u8 type; /* Kernel route type */ + u8 seen; /* Seen during last scan */ + u32 metric; /* Kernel metric */ + } krt; } u; } rte; -#define REF_CHOSEN 1 /* Currently chosen route */ - extern rtable master_table; void rt_init(void); -void rt_setup(rtable *, char *); +void rt_setup(pool *, rtable *, char *); net *net_find(rtable *tab, unsigned tos, ip_addr addr, unsigned len); net *net_get(rtable *tab, unsigned tos, ip_addr addr, unsigned len); rte *rte_find(net *net, struct proto *p); -- cgit v1.2.3