summaryrefslogtreecommitdiff
path: root/nest/route.h
diff options
context:
space:
mode:
authorJan Moskyto Matejka <mq@ucw.cz>2016-02-10 13:26:07 +0100
committerJan Moskyto Matejka <mq@ucw.cz>2016-02-10 13:26:07 +0100
commit9a74622ca1994669cdb3bac0bb2f6df2febd2744 (patch)
treebbc275b7b10fd6194f3195c9991a5c1d2f4dcf72 /nest/route.h
parent1bb3ecb2a5369bc1992514da3cf5ef59dca46416 (diff)
Updated RTA hashes to 32-bit values.
... and reworked the hashes a bit. Also added mem_hash function which just computes a hash of given memory block.
Diffstat (limited to 'nest/route.h')
-rw-r--r--nest/route.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/nest/route.h b/nest/route.h
index b68f614f..22fca331 100644
--- a/nest/route.h
+++ b/nest/route.h
@@ -345,22 +345,22 @@ struct rte_src {
typedef struct rta {
struct rta *next, **pprev; /* Hash chain */
+ u32 uc; /* Use count */
+ u32 hash_key; /* Hash over important fields */
+ struct mpnh *nexthops; /* Next-hops for multipath routes */
+ struct ea_list *eattrs; /* Extended Attribute chain */
struct rte_src *src; /* Route source that created the route */
- unsigned uc; /* Use count */
+ struct hostentry *hostentry; /* Hostentry for recursive next-hops */
+ struct iface *iface; /* Outgoing interface */
+ ip_addr gw; /* Next hop */
+ ip_addr from; /* Advertising router */
+ u32 igp_metric; /* IGP metric to next hop (for iBGP routes) */
byte source; /* Route source (RTS_...) */
byte scope; /* Route scope (SCOPE_... -- see ip.h) */
byte cast; /* Casting type (RTC_...) */
byte dest; /* Route destination type (RTD_...) */
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 */
- struct iface *iface; /* Outgoing interface */
- struct mpnh *nexthops; /* Next-hops for multipath routes */
- struct ea_list *eattrs; /* Extended Attribute chain */
} rta;
#define RTS_DUMMY 0 /* Dummy route to be removed soon */