diff options
Diffstat (limited to 'include/net/route.h')
-rw-r--r-- | include/net/route.h | 56 |
1 files changed, 11 insertions, 45 deletions
diff --git a/include/net/route.h b/include/net/route.h index 486508ce0..338e158fd 100644 --- a/include/net/route.h +++ b/include/net/route.h @@ -13,6 +13,7 @@ * Alan Cox : Reformatted. Added ip_rt_local() * Alan Cox : Support for TCP parameters. * Alexey Kuznetsov: Major changes for new routing code. + * Mike McLagan : Routing by source * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -28,25 +29,6 @@ #include <linux/rtnetlink.h> #define RT_HASH_DIVISOR 256 -#define RT_CACHE_MAX_SIZE 256 - -/* - * Maximal time to live for unused entry. - */ -#define RT_CACHE_TIMEOUT (HZ*300) - -/* - * Cache invalidations can be delayed by: - */ -#define RT_FLUSH_DELAY (5*HZ) - -#define RT_REDIRECT_NUMBER 9 -#define RT_REDIRECT_LOAD (HZ/50) /* 20 msec */ -#define RT_REDIRECT_SILENCE (RT_REDIRECT_LOAD<<(RT_REDIRECT_NUMBER+1)) -/* 20sec */ - -#define RT_ERROR_LOAD (1*HZ) - /* * Prevents LRU trashing, entries considered equivalent, @@ -56,6 +38,15 @@ #include <linux/route.h> +#define RTO_ONLINK 0x01 +#define RTO_TPROXY 0x80000000 + +#ifdef CONFIG_IP_TRANSPARENT_PROXY +#define RTO_CONN RTO_TPROXY +#else +#define RTO_CONN 0 +#endif + struct rt_key { __u32 dst; @@ -94,20 +85,15 @@ struct rtable __u32 rt_src_map; __u32 rt_dst_map; #endif - - /* ICMP statistics */ - unsigned long last_error; - unsigned long errors; }; #ifdef __KERNEL__ extern void ip_rt_init(void); extern void ip_rt_redirect(u32 old_gw, u32 dst, u32 new_gw, u32 src, u8 tos, struct device *dev); -extern void ip_rt_check_expire(void); extern void ip_rt_advice(struct rtable **rp, int advice); extern void rt_cache_flush(int how); -extern int ip_route_output(struct rtable **, u32 dst, u32 src, u8 tos, int oif); +extern int ip_route_output(struct rtable **, u32 dst, u32 src, u32 tos, int oif); extern int ip_route_input(struct sk_buff*, u32 dst, u32 src, u8 tos, struct device *devin); extern unsigned short ip_rt_frag_needed(struct iphdr *iph, unsigned short new_mtu); extern void ip_rt_send_redirect(struct sk_buff *skb); @@ -144,26 +130,6 @@ extern __inline__ int ip_route_connect(struct rtable **rp, u32 dst, u32 src, u32 return ip_route_output(rp, dst, src, tos, oif); } -extern __inline__ void ip_ll_header(struct sk_buff *skb) -{ - struct rtable *rt = (struct rtable*)skb->dst; - struct device *dev = rt->u.dst.dev; - struct hh_cache *hh = rt->u.dst.hh; - int hh_len = dev->hard_header_len; - - skb->dev = dev; - skb->arp = 1; - skb->protocol = htons(ETH_P_IP); - - if (hh) { - memcpy(skb_push(skb, hh_len), hh->hh_data, hh_len); - skb->arp = hh->hh_uptodate; - } else if (dev->hard_header && - dev->hard_header(skb, dev, ETH_P_IP, NULL, NULL, 0)<0) - skb->arp = 0; - - skb->mac.raw = skb->data; -} #endif |