[INET]: Generalise the TCP sock ID lookup routines
And also some TIME_WAIT functions.
[acme@toy net-2.6.14]$ grep built-in /tmp/before.size /tmp/after.size
/tmp/before.size: 282955 13122 9312 305389 4a8ed net/ipv4/built-in.o
/tmp/after.size: 281566 13122 9312 304000 4a380 net/ipv4/built-in.o
[acme@toy net-2.6.14]$
I kept them still inlined, will uninline at some point to see what
would be the performance difference.
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h
index ce11704..020f280 100644
--- a/include/net/inet_timewait_sock.h
+++ b/include/net/inet_timewait_sock.h
@@ -17,6 +17,7 @@
#include <linux/config.h>
+#include <linux/ip.h>
#include <linux/list.h>
#include <linux/types.h>
@@ -32,6 +33,7 @@
#endif
struct inet_bind_bucket;
+struct inet_hashinfo;
/*
* This is a TIME_WAIT sock. It works around the memory consumption
@@ -139,4 +141,11 @@
kmem_cache_free(tw->tw_prot->twsk_slab, tw);
}
}
+
+extern void __inet_twsk_kill(struct inet_timewait_sock *tw,
+ struct inet_hashinfo *hashinfo);
+
+extern void __inet_twsk_hashdance(struct inet_timewait_sock *tw,
+ struct sock *sk,
+ struct inet_hashinfo *hashinfo);
#endif /* _INET_TIMEWAIT_SOCK_ */