linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / include / net / ip6_route.h
index 96b0e66..1f2e428 100644 (file)
@@ -7,23 +7,6 @@
 #define IP6_RT_PRIO_KERN       512
 #define IP6_RT_FLOW_MASK       0x00ff
 
-struct route_info {
-       __u8                    type;
-       __u8                    length;
-       __u8                    prefix_len;
-#if defined(__BIG_ENDIAN_BITFIELD)
-       __u8                    reserved_h:3,
-                               route_pref:2,
-                               reserved_l:3;
-#elif defined(__LITTLE_ENDIAN_BITFIELD)
-       __u8                    reserved_l:3,
-                               route_pref:2,
-                               reserved_h:3;
-#endif
-       __u32                   lifetime;
-       __u8                    prefix[0];      /* 0,8 or 16 */
-};
-
 #ifdef __KERNEL__
 
 #include <net/flow.h>
@@ -104,14 +87,11 @@ extern struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
 extern struct rt6_info *       rt6_get_dflt_router(struct in6_addr *addr,
                                                    struct net_device *dev);
 extern struct rt6_info *       rt6_add_dflt_router(struct in6_addr *gwaddr,
-                                                   struct net_device *dev,
-                                                   unsigned int pref);
+                                                   struct net_device *dev);
 
 extern void                    rt6_purge_dflt_routers(void);
 
-extern int                     rt6_route_rcv(struct net_device *dev,
-                                             u8 *opt, int len,
-                                             struct in6_addr *gwaddr);
+extern void                    rt6_reset_dflt_pointer(struct rt6_info *rt);
 
 extern void                    rt6_redirect(struct in6_addr *dest,
                                             struct in6_addr *saddr,
@@ -139,22 +119,16 @@ extern rwlock_t rt6_lock;
 /*
  *     Store a destination cache entry in a socket
  */
-static inline void __ip6_dst_store(struct sock *sk, struct dst_entry *dst,
-                                  struct in6_addr *daddr)
+static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst,
+                                    struct in6_addr *daddr)
 {
        struct ipv6_pinfo *np = inet6_sk(sk);
        struct rt6_info *rt = (struct rt6_info *) dst;
 
-       sk_setup_caps(sk, dst);
+       write_lock(&sk->sk_dst_lock);
+       __sk_dst_set(sk, dst);
        np->daddr_cache = daddr;
        np->dst_cookie = rt->rt6i_node ? rt->rt6i_node->fn_sernum : 0;
-}
-
-static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst,
-                                struct in6_addr *daddr)
-{
-       write_lock(&sk->sk_dst_lock);
-       __ip6_dst_store(sk, dst, daddr);
        write_unlock(&sk->sk_dst_lock);
 }