X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=include%2Fnet%2Froute.h;h=749e4dfe5ff3323dcaaa3eaa94c3130e3e058628;hb=5ec553a90448b3edbd26c1acc72464f877614bfa;hp=7f93ac0e089983a0ceed7e4a11c153f2210ce794;hpb=beb8d13bed80f8388f1a9a107d07ddd342e627e8;p=linux-2.6-omap-h63xx.git diff --git a/include/net/route.h b/include/net/route.h index 7f93ac0e089..749e4dfe5ff 100644 --- a/include/net/route.h +++ b/include/net/route.h @@ -53,27 +53,26 @@ struct rtable union { struct dst_entry dst; - struct rtable *rt_next; } u; + /* Cache lookup keys */ + struct flowi fl; + struct in_device *idev; unsigned rt_flags; __u16 rt_type; __u16 rt_multipath_alg; - __u32 rt_dst; /* Path destination */ - __u32 rt_src; /* Path source */ + __be32 rt_dst; /* Path destination */ + __be32 rt_src; /* Path source */ int rt_iif; /* Info on neighbour */ - __u32 rt_gateway; - - /* Cache lookup keys */ - struct flowi fl; + __be32 rt_gateway; /* Miscellaneous cached information */ - __u32 rt_spec_dst; /* RFC1122 specific destination */ + __be32 rt_spec_dst; /* RFC1122 specific destination */ struct inet_peer *peer; /* long-living peer info */ }; @@ -109,18 +108,18 @@ extern struct ip_rt_acct *ip_rt_acct; struct in_device; extern int ip_rt_init(void); -extern void ip_rt_redirect(u32 old_gw, u32 dst, u32 new_gw, - u32 src, struct net_device *dev); +extern void ip_rt_redirect(__be32 old_gw, __be32 dst, __be32 new_gw, + __be32 src, struct net_device *dev); extern void ip_rt_advice(struct rtable **rp, int advice); extern void rt_cache_flush(int how); extern int __ip_route_output_key(struct rtable **, const struct flowi *flp); extern int ip_route_output_key(struct rtable **, struct flowi *flp); extern int ip_route_output_flow(struct rtable **rp, struct flowi *flp, struct sock *sk, int flags); -extern int ip_route_input(struct sk_buff*, u32 dst, u32 src, u8 tos, struct net_device *devin); +extern int ip_route_input(struct sk_buff*, __be32 dst, __be32 src, u8 tos, struct net_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); -extern unsigned inet_addr_type(u32 addr); +extern unsigned inet_addr_type(__be32 addr); extern void ip_rt_multicast_event(struct in_device *); extern int ip_rt_ioctl(unsigned int cmd, void __user *arg); extern void ip_rt_get_source(u8 *src, struct rtable *rt); @@ -144,9 +143,10 @@ static inline char rt_tos2priority(u8 tos) return ip_tos2prio[IPTOS_TOS(tos)>>1]; } -static inline int ip_route_connect(struct rtable **rp, u32 dst, - u32 src, u32 tos, int oif, u8 protocol, - u16 sport, u16 dport, struct sock *sk) +static inline int ip_route_connect(struct rtable **rp, __be32 dst, + __be32 src, u32 tos, int oif, u8 protocol, + __be16 sport, __be16 dport, struct sock *sk, + int flags) { struct flowi fl = { .oif = oif, .nl_u = { .ip4_u = { .daddr = dst, @@ -168,11 +168,11 @@ static inline int ip_route_connect(struct rtable **rp, u32 dst, *rp = NULL; } security_sk_classify_flow(sk, &fl); - return ip_route_output_flow(rp, &fl, sk, 0); + return ip_route_output_flow(rp, &fl, sk, flags); } static inline int ip_route_newports(struct rtable **rp, u8 protocol, - u16 sport, u16 dport, struct sock *sk) + __be16 sport, __be16 dport, struct sock *sk) { if (sport != (*rp)->fl.fl_ip_sport || dport != (*rp)->fl.fl_ip_dport) {