diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-02-05 06:47:02 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-02-05 06:47:02 +0000 |
commit | 99a7e12f34b3661a0d1354eef83a0eef4df5e34c (patch) | |
tree | 3560aca9ca86792f9ab7bd87861ea143a1b3c7a3 /include/net/route.h | |
parent | e73a04659c0b8cdee4dd40e58630e2cf63afb316 (diff) |
Merge with Linux 2.3.38.
Diffstat (limited to 'include/net/route.h')
-rw-r--r-- | include/net/route.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/include/net/route.h b/include/net/route.h index 3a2e8e2e4..9ccfd3bea 100644 --- a/include/net/route.h +++ b/include/net/route.h @@ -25,6 +25,7 @@ #include <linux/config.h> #include <net/dst.h> +#include <net/inetpeer.h> #include <linux/in_route.h> #include <linux/rtnetlink.h> #include <linux/route.h> @@ -33,8 +34,6 @@ #warning This file is not supposed to be used outside of kernel. #endif -#define RT_HASH_DIVISOR 256 - #define RTO_ONLINK 0x01 #define RTO_TPROXY 0x80000000 @@ -53,6 +52,7 @@ struct rt_key __u8 scope; }; +struct inet_peer; struct rtable { union @@ -76,6 +76,7 @@ struct rtable /* Miscellaneous cached information */ __u32 rt_spec_dst; /* RFC1122 specific destination */ + struct inet_peer *peer; /* long-living peer info */ #ifdef CONFIG_IP_ROUTE_NAT __u32 rt_src_map; @@ -138,4 +139,15 @@ extern __inline__ int ip_route_connect(struct rtable **rp, u32 dst, u32 src, u32 return ip_route_output(rp, dst, src, tos, oif); } +extern void rt_bind_peer(struct rtable *rt, int create); + +extern __inline__ struct inet_peer *rt_get_peer(struct rtable *rt) +{ + if (rt->peer) + return rt->peer; + + rt_bind_peer(rt, 0); + return rt->peer; +} + #endif /* _ROUTE_H */ |