Bluetooth: Add extfeatures to struct hci_dev
[pandora-kernel.git] / include / net / route.h
index 16eb59c..db7b343 100644 (file)
@@ -52,7 +52,7 @@ struct rtable {
        int                     rt_genid;
        unsigned                rt_flags;
        __u16                   rt_type;
-       __u8                    rt_tos;
+       __u8                    rt_key_tos;
 
        __be32                  rt_dst; /* Path destination     */
        __be32                  rt_src; /* Path source          */
@@ -137,35 +137,33 @@ static inline struct rtable *ip_route_output(struct net *net, __be32 daddr,
        return ip_route_output_key(net, &fl4);
 }
 
-static inline struct rtable *ip_route_output_ports(struct net *net, struct sock *sk,
+static inline struct rtable *ip_route_output_ports(struct net *net, struct flowi4 *fl4,
+                                                  struct sock *sk,
                                                   __be32 daddr, __be32 saddr,
                                                   __be16 dport, __be16 sport,
                                                   __u8 proto, __u8 tos, int oif)
 {
-       struct flowi4 fl4;
-
-       flowi4_init_output(&fl4, oif, sk ? sk->sk_mark : 0, tos,
+       flowi4_init_output(fl4, oif, sk ? sk->sk_mark : 0, tos,
                           RT_SCOPE_UNIVERSE, proto,
                           sk ? inet_sk_flowi_flags(sk) : 0,
                           daddr, saddr, dport, sport);
        if (sk)
-               security_sk_classify_flow(sk, flowi4_to_flowi(&fl4));
-       return ip_route_output_flow(net, &fl4, sk);
+               security_sk_classify_flow(sk, flowi4_to_flowi(fl4));
+       return ip_route_output_flow(net, fl4, sk);
 }
 
-static inline struct rtable *ip_route_output_gre(struct net *net,
+static inline struct rtable *ip_route_output_gre(struct net *net, struct flowi4 *fl4,
                                                 __be32 daddr, __be32 saddr,
                                                 __be32 gre_key, __u8 tos, int oif)
 {
-       struct flowi4 fl4 = {
-               .flowi4_oif = oif,
-               .daddr = daddr,
-               .saddr = saddr,
-               .flowi4_tos = tos,
-               .flowi4_proto = IPPROTO_GRE,
-               .fl4_gre_key = gre_key,
-       };
-       return ip_route_output_key(net, &fl4);
+       memset(fl4, 0, sizeof(*fl4));
+       fl4->flowi4_oif = oif;
+       fl4->daddr = daddr;
+       fl4->saddr = saddr;
+       fl4->flowi4_tos = tos;
+       fl4->flowi4_proto = IPPROTO_GRE;
+       fl4->fl4_gre_key = gre_key;
+       return ip_route_output_key(net, fl4);
 }
 
 extern int ip_route_input_common(struct sk_buff *skb, __be32 dst, __be32 src,
@@ -191,7 +189,7 @@ extern unsigned             inet_addr_type(struct net *net, __be32 addr);
 extern unsigned                inet_dev_addr_type(struct net *net, const struct net_device *dev, __be32 addr);
 extern void            ip_rt_multicast_event(struct in_device *);
 extern int             ip_rt_ioctl(struct net *, unsigned int cmd, void __user *arg);
-extern void            ip_rt_get_source(u8 *src, struct rtable *rt);
+extern void            ip_rt_get_source(u8 *src, struct sk_buff *skb, struct rtable *rt);
 extern int             ip_rt_dump(struct sk_buff *skb,  struct netlink_callback *cb);
 
 struct in_ifaddr;
@@ -292,14 +290,14 @@ static inline struct rtable *ip_route_newports(struct flowi4 *fl4, struct rtable
        return rt;
 }
 
-extern void rt_bind_peer(struct rtable *rt, int create);
+extern void rt_bind_peer(struct rtable *rt, __be32 daddr, int create);
 
-static inline struct inet_peer *rt_get_peer(struct rtable *rt)
+static inline struct inet_peer *rt_get_peer(struct rtable *rt, __be32 daddr)
 {
        if (rt->peer)
                return rt->peer;
 
-       rt_bind_peer(rt, 0);
+       rt_bind_peer(rt, daddr, 0);
        return rt->peer;
 }