aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2005-06-19 01:48:55 -0400
committerDavid S. Miller <davem@davemloft.net>2005-06-19 01:48:55 -0400
commit2ad69c55a282315e6119cf7fd744f26a925bdfd2 (patch)
tree85350a384e5c1c6646bd8f9e75c6f11c1f6752ff
parent0e87506fcc734647c7b2497eee4eb81e785c857a (diff)
[NET] rename struct tcp_listen_opt to struct listen_sock
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/net/request_sock.h16
-rw-r--r--net/core/request_sock.c4
-rw-r--r--net/ipv4/tcp.c2
-rw-r--r--net/ipv4/tcp_diag.c2
-rw-r--r--net/ipv4/tcp_ipv4.c4
-rw-r--r--net/ipv4/tcp_timer.c2
-rw-r--r--net/ipv6/tcp_ipv6.c4
7 files changed, 17 insertions, 17 deletions
diff --git a/include/net/request_sock.h b/include/net/request_sock.h
index 38943ed04e73..72fd6f5e86b1 100644
--- a/include/net/request_sock.h
+++ b/include/net/request_sock.h
@@ -78,11 +78,11 @@ static inline void reqsk_free(struct request_sock *req)
78 78
79extern int sysctl_max_syn_backlog; 79extern int sysctl_max_syn_backlog;
80 80
81/** struct tcp_listen_opt - listen state 81/** struct listen_sock - listen state
82 * 82 *
83 * @max_qlen_log - log_2 of maximal queued SYNs/REQUESTs 83 * @max_qlen_log - log_2 of maximal queued SYNs/REQUESTs
84 */ 84 */
85struct tcp_listen_opt { 85struct listen_sock {
86 u8 max_qlen_log; 86 u8 max_qlen_log;
87 /* 3 bytes hole, try to use */ 87 /* 3 bytes hole, try to use */
88 int qlen; 88 int qlen;
@@ -111,15 +111,15 @@ struct request_sock_queue {
111 struct request_sock *rskq_accept_head; 111 struct request_sock *rskq_accept_head;
112 struct request_sock *rskq_accept_tail; 112 struct request_sock *rskq_accept_tail;
113 rwlock_t syn_wait_lock; 113 rwlock_t syn_wait_lock;
114 struct tcp_listen_opt *listen_opt; 114 struct listen_sock *listen_opt;
115}; 115};
116 116
117extern int reqsk_queue_alloc(struct request_sock_queue *queue, 117extern int reqsk_queue_alloc(struct request_sock_queue *queue,
118 const int nr_table_entries); 118 const int nr_table_entries);
119 119
120static inline struct tcp_listen_opt *reqsk_queue_yank_listen_sk(struct request_sock_queue *queue) 120static inline struct listen_sock *reqsk_queue_yank_listen_sk(struct request_sock_queue *queue)
121{ 121{
122 struct tcp_listen_opt *lopt; 122 struct listen_sock *lopt;
123 123
124 write_lock_bh(&queue->syn_wait_lock); 124 write_lock_bh(&queue->syn_wait_lock);
125 lopt = queue->listen_opt; 125 lopt = queue->listen_opt;
@@ -203,7 +203,7 @@ static inline struct sock *reqsk_queue_get_child(struct request_sock_queue *queu
203static inline int reqsk_queue_removed(struct request_sock_queue *queue, 203static inline int reqsk_queue_removed(struct request_sock_queue *queue,
204 struct request_sock *req) 204 struct request_sock *req)
205{ 205{
206 struct tcp_listen_opt *lopt = queue->listen_opt; 206 struct listen_sock *lopt = queue->listen_opt;
207 207
208 if (req->retrans == 0) 208 if (req->retrans == 0)
209 --lopt->qlen_young; 209 --lopt->qlen_young;
@@ -213,7 +213,7 @@ static inline int reqsk_queue_removed(struct request_sock_queue *queue,
213 213
214static inline int reqsk_queue_added(struct request_sock_queue *queue) 214static inline int reqsk_queue_added(struct request_sock_queue *queue)
215{ 215{
216 struct tcp_listen_opt *lopt = queue->listen_opt; 216 struct listen_sock *lopt = queue->listen_opt;
217 const int prev_qlen = lopt->qlen; 217 const int prev_qlen = lopt->qlen;
218 218
219 lopt->qlen_young++; 219 lopt->qlen_young++;
@@ -240,7 +240,7 @@ static inline void reqsk_queue_hash_req(struct request_sock_queue *queue,
240 u32 hash, struct request_sock *req, 240 u32 hash, struct request_sock *req,
241 unsigned timeout) 241 unsigned timeout)
242{ 242{
243 struct tcp_listen_opt *lopt = queue->listen_opt; 243 struct listen_sock *lopt = queue->listen_opt;
244 244
245 req->expires = jiffies + timeout; 245 req->expires = jiffies + timeout;
246 req->retrans = 0; 246 req->retrans = 0;
diff --git a/net/core/request_sock.c b/net/core/request_sock.c
index 1258333ca007..78fd60a46bf2 100644
--- a/net/core/request_sock.c
+++ b/net/core/request_sock.c
@@ -21,9 +21,9 @@
21int reqsk_queue_alloc(struct request_sock_queue *queue, 21int reqsk_queue_alloc(struct request_sock_queue *queue,
22 const int nr_table_entries) 22 const int nr_table_entries)
23{ 23{
24 const int lopt_size = sizeof(struct tcp_listen_opt) + 24 const int lopt_size = sizeof(struct listen_sock) +
25 nr_table_entries * sizeof(struct request_sock *); 25 nr_table_entries * sizeof(struct request_sock *);
26 struct tcp_listen_opt *lopt = kmalloc(lopt_size, GFP_KERNEL); 26 struct listen_sock *lopt = kmalloc(lopt_size, GFP_KERNEL);
27 27
28 if (lopt == NULL) 28 if (lopt == NULL)
29 return -ENOMEM; 29 return -ENOMEM;
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index b85a46dd40a0..3a4c52e77e01 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -499,7 +499,7 @@ int tcp_listen_start(struct sock *sk)
499static void tcp_listen_stop (struct sock *sk) 499static void tcp_listen_stop (struct sock *sk)
500{ 500{
501 struct tcp_sock *tp = tcp_sk(sk); 501 struct tcp_sock *tp = tcp_sk(sk);
502 struct tcp_listen_opt *lopt; 502 struct listen_sock *lopt;
503 struct request_sock *acc_req; 503 struct request_sock *acc_req;
504 struct request_sock *req; 504 struct request_sock *req;
505 int i; 505 int i;
diff --git a/net/ipv4/tcp_diag.c b/net/ipv4/tcp_diag.c
index c3328fa48837..634befc07921 100644
--- a/net/ipv4/tcp_diag.c
+++ b/net/ipv4/tcp_diag.c
@@ -514,7 +514,7 @@ static int tcpdiag_dump_reqs(struct sk_buff *skb, struct sock *sk,
514 struct tcpdiag_entry entry; 514 struct tcpdiag_entry entry;
515 struct tcpdiagreq *r = NLMSG_DATA(cb->nlh); 515 struct tcpdiagreq *r = NLMSG_DATA(cb->nlh);
516 struct tcp_sock *tp = tcp_sk(sk); 516 struct tcp_sock *tp = tcp_sk(sk);
517 struct tcp_listen_opt *lopt; 517 struct listen_sock *lopt;
518 struct rtattr *bc = NULL; 518 struct rtattr *bc = NULL;
519 struct inet_sock *inet = inet_sk(sk); 519 struct inet_sock *inet = inet_sk(sk);
520 int j, s_j; 520 int j, s_j;
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 1745dc8d25e6..485ca9cb1707 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -874,7 +874,7 @@ static struct request_sock *tcp_v4_search_req(struct tcp_sock *tp,
874 __u16 rport, 874 __u16 rport,
875 __u32 raddr, __u32 laddr) 875 __u32 raddr, __u32 laddr)
876{ 876{
877 struct tcp_listen_opt *lopt = tp->accept_queue.listen_opt; 877 struct listen_sock *lopt = tp->accept_queue.listen_opt;
878 struct request_sock *req, **prev; 878 struct request_sock *req, **prev;
879 879
880 for (prev = &lopt->syn_table[tcp_v4_synq_hash(raddr, rport, lopt->hash_rnd)]; 880 for (prev = &lopt->syn_table[tcp_v4_synq_hash(raddr, rport, lopt->hash_rnd)];
@@ -898,7 +898,7 @@ static struct request_sock *tcp_v4_search_req(struct tcp_sock *tp,
898static void tcp_v4_synq_add(struct sock *sk, struct request_sock *req) 898static void tcp_v4_synq_add(struct sock *sk, struct request_sock *req)
899{ 899{
900 struct tcp_sock *tp = tcp_sk(sk); 900 struct tcp_sock *tp = tcp_sk(sk);
901 struct tcp_listen_opt *lopt = tp->accept_queue.listen_opt; 901 struct listen_sock *lopt = tp->accept_queue.listen_opt;
902 u32 h = tcp_v4_synq_hash(inet_rsk(req)->rmt_addr, inet_rsk(req)->rmt_port, lopt->hash_rnd); 902 u32 h = tcp_v4_synq_hash(inet_rsk(req)->rmt_addr, inet_rsk(req)->rmt_port, lopt->hash_rnd);
903 903
904 reqsk_queue_hash_req(&tp->accept_queue, h, req, TCP_TIMEOUT_INIT); 904 reqsk_queue_hash_req(&tp->accept_queue, h, req, TCP_TIMEOUT_INIT);
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index d97d191149c1..b127b4498565 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -464,7 +464,7 @@ out_unlock:
464static void tcp_synack_timer(struct sock *sk) 464static void tcp_synack_timer(struct sock *sk)
465{ 465{
466 struct tcp_sock *tp = tcp_sk(sk); 466 struct tcp_sock *tp = tcp_sk(sk);
467 struct tcp_listen_opt *lopt = tp->accept_queue.listen_opt; 467 struct listen_sock *lopt = tp->accept_queue.listen_opt;
468 int max_retries = tp->syn_retries ? : sysctl_tcp_synack_retries; 468 int max_retries = tp->syn_retries ? : sysctl_tcp_synack_retries;
469 int thresh = max_retries; 469 int thresh = max_retries;
470 unsigned long now = jiffies; 470 unsigned long now = jiffies;
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 84091daad6b5..2414937f2a83 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -401,7 +401,7 @@ static struct request_sock *tcp_v6_search_req(struct tcp_sock *tp,
401 struct in6_addr *laddr, 401 struct in6_addr *laddr,
402 int iif) 402 int iif)
403{ 403{
404 struct tcp_listen_opt *lopt = tp->accept_queue.listen_opt; 404 struct listen_sock *lopt = tp->accept_queue.listen_opt;
405 struct request_sock *req, **prev; 405 struct request_sock *req, **prev;
406 406
407 for (prev = &lopt->syn_table[tcp_v6_synq_hash(raddr, rport, lopt->hash_rnd)]; 407 for (prev = &lopt->syn_table[tcp_v6_synq_hash(raddr, rport, lopt->hash_rnd)];
@@ -1267,7 +1267,7 @@ static struct sock *tcp_v6_hnd_req(struct sock *sk,struct sk_buff *skb)
1267static void tcp_v6_synq_add(struct sock *sk, struct request_sock *req) 1267static void tcp_v6_synq_add(struct sock *sk, struct request_sock *req)
1268{ 1268{
1269 struct tcp_sock *tp = tcp_sk(sk); 1269 struct tcp_sock *tp = tcp_sk(sk);
1270 struct tcp_listen_opt *lopt = tp->accept_queue.listen_opt; 1270 struct listen_sock *lopt = tp->accept_queue.listen_opt;
1271 u32 h = tcp_v6_synq_hash(&tcp6_rsk(req)->rmt_addr, inet_rsk(req)->rmt_port, lopt->hash_rnd); 1271 u32 h = tcp_v6_synq_hash(&tcp6_rsk(req)->rmt_addr, inet_rsk(req)->rmt_port, lopt->hash_rnd);
1272 1272
1273 reqsk_queue_hash_req(&tp->accept_queue, h, req, TCP_TIMEOUT_INIT); 1273 reqsk_queue_hash_req(&tp->accept_queue, h, req, TCP_TIMEOUT_INIT);