diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-07-31 01:04:32 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-07-31 01:04:32 +0200 |
commit | d1e146f2f8da303af7bbe0cec363cc15c58c37fd (patch) | |
tree | 7179724c7752d0c3ae5801736f8071b71243c60e /nest/route.h | |
parent | ac3ac49a71d4b290cfb28aecafc8ac4a69df7a64 (diff) |
Implements IGP metric comparison for BGP routes.
Diffstat (limited to 'nest/route.h')
-rw-r--r-- | nest/route.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nest/route.h b/nest/route.h index 4dd43750..d062e600 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 */ |