From d1e146f2f8da303af7bbe0cec363cc15c58c37fd Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Sat, 31 Jul 2010 01:04:32 +0200 Subject: Implements IGP metric comparison for BGP routes. --- nest/route.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'nest/route.h') diff --git a/nest/route.h b/nest/route.h index 4dd4375..d062e60 100644 --- a/nest/route.h +++ b/nest/route.h @@ -173,6 +173,7 @@ struct hostentry { struct iface *iface; /* Chosen outgoing interface */ ip_addr gw; /* Chosen next hop */ byte dest; /* Chosen route destination type (RTD_...) */ + u32 igp_metric; /* Chosen route IGP metric */ }; typedef struct rte { @@ -276,6 +277,7 @@ typedef struct rta { byte flags; /* Route flags (RTF_...), now unused */ byte aflags; /* Attribute cache flags (RTAF_...) */ u16 hash_key; /* Hash over important fields */ + u32 igp_metric; /* IGP metric to next hop (for iBGP routes) */ ip_addr gw; /* Next hop */ ip_addr from; /* Advertising router */ struct hostentry *hostentry; /* Hostentry for recursive next-hops */ @@ -311,6 +313,9 @@ typedef struct rta { #define RTAF_CACHED 1 /* This is a cached rta */ +#define IGP_METRIC_UNKNOWN 0x80000000 /* Default igp_metric used when no other + protocol-specific metric is availabe */ + /* * Extended Route Attributes */ -- cgit v1.2.3