]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/net/if_inet6.h
ipv6: Replace inet6_ifaddr->dead with state
[net-next-2.6.git] / include / net / if_inet6.h
index 13f9fc086d54ad484b62c62bc9e6db0bf6d9c99e..f95ff8d9aa474a42f0810f92e830886e1a5fb160 100644 (file)
 
 #ifdef __KERNEL__
 
+enum {
+       INET6_IFADDR_STATE_DAD,
+       INET6_IFADDR_STATE_POSTDAD,
+       INET6_IFADDR_STATE_UP,
+       INET6_IFADDR_STATE_DEAD,
+};
+
 struct inet6_ifaddr {
        struct in6_addr         addr;
        __u32                   prefix_len;
@@ -40,6 +47,9 @@ struct inet6_ifaddr {
        __u32                   prefered_lft;
        atomic_t                refcnt;
        spinlock_t              lock;
+       spinlock_t              state_lock;
+
+       int                     state;
 
        __u8                    probes;
        __u8                    flags;
@@ -62,8 +72,6 @@ struct inet6_ifaddr {
        struct inet6_ifaddr     *ifpub;
        int                     regen_count;
 #endif
-
-       int                     dead;
        struct rcu_head         rcu;
 };