diff options
author | Arnaldo Carvalho de Melo <acme@ghostprotocols.net> | 2005-08-09 23:07:13 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 18:40:29 -0400 |
commit | 2d8c4ce51903636ce0f60addc8134aa50ab8fa76 (patch) | |
tree | 1ea4d4faf831b832489b30b13d8910777020feed /include/net/tcp.h | |
parent | ff21d5774b4a186c98be6398eacde75d896db804 (diff) |
[INET]: Generalise tcp_bind_hash & tcp_inherit_port
This required moving tcp_bucket_cachep to inet_hashinfo.
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r-- | include/net/tcp.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index 6c6c879e7e87..9eb8ff7c911e 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -51,14 +51,10 @@ extern struct inet_hashinfo tcp_hashinfo; | |||
51 | #define tcp_lhash_users (tcp_hashinfo.lhash_users) | 51 | #define tcp_lhash_users (tcp_hashinfo.lhash_users) |
52 | #define tcp_lhash_wait (tcp_hashinfo.lhash_wait) | 52 | #define tcp_lhash_wait (tcp_hashinfo.lhash_wait) |
53 | #define tcp_portalloc_lock (tcp_hashinfo.portalloc_lock) | 53 | #define tcp_portalloc_lock (tcp_hashinfo.portalloc_lock) |
54 | 54 | #define tcp_bucket_cachep (tcp_hashinfo.bind_bucket_cachep) | |
55 | extern kmem_cache_t *tcp_bucket_cachep; | ||
56 | 55 | ||
57 | extern int tcp_port_rover; | 56 | extern int tcp_port_rover; |
58 | 57 | ||
59 | extern void tcp_bind_hash(struct sock *sk, struct inet_bind_bucket *tb, | ||
60 | unsigned short snum); | ||
61 | |||
62 | #if (BITS_PER_LONG == 64) | 58 | #if (BITS_PER_LONG == 64) |
63 | #define TCP_ADDRCMP_ALIGN_BYTES 8 | 59 | #define TCP_ADDRCMP_ALIGN_BYTES 8 |
64 | #else | 60 | #else |
@@ -549,9 +545,6 @@ DECLARE_SNMP_STAT(struct tcp_mib, tcp_statistics); | |||
549 | #define TCP_ADD_STATS_BH(field, val) SNMP_ADD_STATS_BH(tcp_statistics, field, val) | 545 | #define TCP_ADD_STATS_BH(field, val) SNMP_ADD_STATS_BH(tcp_statistics, field, val) |
550 | #define TCP_ADD_STATS_USER(field, val) SNMP_ADD_STATS_USER(tcp_statistics, field, val) | 546 | #define TCP_ADD_STATS_USER(field, val) SNMP_ADD_STATS_USER(tcp_statistics, field, val) |
551 | 547 | ||
552 | extern void tcp_put_port(struct sock *sk); | ||
553 | extern void tcp_inherit_port(struct sock *sk, struct sock *child); | ||
554 | |||
555 | extern void tcp_v4_err(struct sk_buff *skb, u32); | 548 | extern void tcp_v4_err(struct sk_buff *skb, u32); |
556 | 549 | ||
557 | extern void tcp_shutdown (struct sock *sk, int how); | 550 | extern void tcp_shutdown (struct sock *sk, int how); |
@@ -1268,7 +1261,7 @@ static __inline__ void tcp_set_state(struct sock *sk, int state) | |||
1268 | sk->sk_prot->unhash(sk); | 1261 | sk->sk_prot->unhash(sk); |
1269 | if (inet_sk(sk)->bind_hash && | 1262 | if (inet_sk(sk)->bind_hash && |
1270 | !(sk->sk_userlocks & SOCK_BINDPORT_LOCK)) | 1263 | !(sk->sk_userlocks & SOCK_BINDPORT_LOCK)) |
1271 | tcp_put_port(sk); | 1264 | inet_put_port(&tcp_hashinfo, sk); |
1272 | /* fall through */ | 1265 | /* fall through */ |
1273 | default: | 1266 | default: |
1274 | if (oldstate==TCP_ESTABLISHED) | 1267 | if (oldstate==TCP_ESTABLISHED) |