X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Fnet%2Finet_hashtables.h;h=98e0bb3014feac529f6e2fb4d1e34c41ef8ecb49;hb=2683e88413977a7f382106f8e8b3b684a597c761;hp=07840baa934125280a97a3261fcb25da1840588e;hpb=8e33ba49765484bc6de3a2f8143733713fa93bc1;p=linux-2.6-omap-h63xx.git diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index 07840baa934..98e0bb3014f 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h @@ -14,7 +14,6 @@ #ifndef _INET_HASHTABLES_H #define _INET_HASHTABLES_H -#include #include #include @@ -26,6 +25,7 @@ #include #include +#include #include #include #include @@ -128,26 +128,6 @@ struct inet_hashinfo { kmem_cache_t *bind_bucket_cachep; }; -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) @@ -434,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 */