fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / include / net / inet_timewait_sock.h
index 4f9f2b0..854aa8d 100644 (file)
@@ -15,7 +15,6 @@
 #ifndef _INET_TIMEWAIT_SOCK_
 #define _INET_TIMEWAIT_SOCK_
 
-#include <linux/config.h>
 
 #include <linux/list.h>
 #include <linux/module.h>
@@ -67,7 +66,7 @@ struct inet_hashinfo;
 struct inet_timewait_death_row {
        /* Short-time timewait calendar */
        int                     twcal_hand;
-       int                     twcal_jiffie;
+       unsigned long           twcal_jiffie;
        struct timer_list       twcal_timer;
        struct hlist_head       twcal_row[INET_TWDR_RECYCLE_SLOTS];
 
@@ -85,7 +84,7 @@ struct inet_timewait_death_row {
 };
 
 extern void inet_twdr_hangman(unsigned long data);
-extern void inet_twdr_twkill_work(void *data);
+extern void inet_twdr_twkill_work(struct work_struct *work);
 extern void inet_twdr_twcal_tick(unsigned long data);
 
 #if (BITS_PER_LONG == 64)
@@ -125,10 +124,10 @@ struct inet_timewait_sock {
        unsigned char           tw_rcv_wscale;
        /* Socket demultiplex comparisons on incoming packets. */
        /* these five are in inet_sock */
-       __u16                   tw_sport;
-       __u32                   tw_daddr __attribute__((aligned(INET_TIMEWAIT_ADDRCMP_ALIGN_BYTES)));
-       __u32                   tw_rcv_saddr;
-       __u16                   tw_dport;
+       __be16                  tw_sport;
+       __be32                  tw_daddr __attribute__((aligned(INET_TIMEWAIT_ADDRCMP_ALIGN_BYTES)));
+       __be32                  tw_rcv_saddr;
+       __be16                  tw_dport;
        __u16                   tw_num;
        /* And these are ours. */
        __u8                    tw_ipv6only:1;
@@ -154,7 +153,7 @@ static inline void inet_twsk_add_bind_node(struct inet_timewait_sock *tw,
 
 static inline int inet_twsk_dead_hashed(const struct inet_timewait_sock *tw)
 {
-       return tw->tw_death_node.pprev != NULL;
+       return !hlist_unhashed(&tw->tw_death_node);
 }
 
 static inline void inet_twsk_dead_node_init(struct inet_timewait_sock *tw)
@@ -191,7 +190,7 @@ static inline struct inet_timewait_sock *inet_twsk(const struct sock *sk)
        return (struct inet_timewait_sock *)sk;
 }
 
-static inline u32 inet_rcv_saddr(const struct sock *sk)
+static inline __be32 inet_rcv_saddr(const struct sock *sk)
 {
        return likely(sk->sk_state != TCP_TIME_WAIT) ?
                inet_sk(sk)->rcv_saddr : inet_twsk(sk)->tw_rcv_saddr;
@@ -201,6 +200,7 @@ static inline void inet_twsk_put(struct inet_timewait_sock *tw)
 {
        if (atomic_dec_and_test(&tw->tw_refcnt)) {
                struct module *owner = tw->tw_prot->owner;
+               twsk_destructor((struct sock *)tw);
 #ifdef SOCK_REFCNT_DEBUG
                printk(KERN_DEBUG "%s timewait_sock %p released\n",
                       tw->tw_prot->name, tw);