]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/net/inet_hashtables.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6-omap-h63xx.git] / include / net / inet_hashtables.h
index f50f959683400b78df241e061f64138c0f7a9ff9..98e0bb3014feac529f6e2fb4d1e34c41ef8ecb49 100644 (file)
@@ -14,7 +14,6 @@
 #ifndef _INET_HASHTABLES_H
 #define _INET_HASHTABLES_H
 
-#include <linux/config.h>
 
 #include <linux/interrupt.h>
 #include <linux/ipv6.h>
@@ -26,6 +25,7 @@
 #include <linux/wait.h>
 
 #include <net/inet_connection_sock.h>
+#include <net/inet_sock.h>
 #include <net/route.h>
 #include <net/sock.h>
 #include <net/tcp_states.h>
@@ -125,31 +125,9 @@ struct inet_hashinfo {
        rwlock_t                        lhash_lock ____cacheline_aligned;
        atomic_t                        lhash_users;
        wait_queue_head_t               lhash_wait;
-       spinlock_t                      portalloc_lock;
        kmem_cache_t                    *bind_bucket_cachep;
-       int                             port_rover;
 };
 
-static inline unsigned int inet_ehashfn(const __u32 laddr, const __u16 lport,
-                              const __u32 faddr, const __u16 fport)
-{
-       unsigned int h = (laddr ^ lport) ^ (faddr ^ fport);
-       h ^= h >> 16;
-       h ^= h >> 8;
-       return h;
-}
-
-static inline int inet_sk_ehashfn(const struct sock *sk)
-{
-       const struct inet_sock *inet = inet_sk(sk);
-       const __u32 laddr = inet->rcv_saddr;
-       const __u16 lport = inet->num;
-       const __u32 faddr = inet->daddr;
-       const __u16 fport = inet->dport;
-
-       return inet_ehashfn(laddr, lport, faddr, fport);
-}
-
 static inline struct inet_ehash_bucket *inet_ehash_bucket(
        struct inet_hashinfo *hashinfo,
        unsigned int hash)
@@ -436,4 +414,7 @@ static inline struct sock *inet_lookup(struct inet_hashinfo *hashinfo,
 
        return sk;
 }
+
+extern int inet_hash_connect(struct inet_timewait_death_row *death_row,
+                            struct sock *sk);
 #endif /* _INET_HASHTABLES_H */