diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-12-14 02:15:52 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-01-03 16:10:38 -0500 |
commit | 8292a17a399ffb7c5c8b083db4ad994e090055f7 (patch) | |
tree | 1544436169ba1dc2eface34664a203c2c17a8d65 /include | |
parent | ca304b6104ffdd120bb6687a88a0625e58bc71cd (diff) |
[ICSK]: Rename struct tcp_func to struct inet_connection_sock_af_ops
And move it to struct inet_connection_sock. DCCP will use it in the
upcoming changesets.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/tcp.h | 2 | ||||
-rw-r--r-- | include/net/inet_connection_sock.h | 26 | ||||
-rw-r--r-- | include/net/tcp.h | 50 | ||||
-rw-r--r-- | include/net/transp_v6.h | 2 |
4 files changed, 28 insertions, 52 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 0e1da6602e05..4e1434007f44 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -295,8 +295,6 @@ struct tcp_sock { | |||
295 | 295 | ||
296 | struct sk_buff_head out_of_order_queue; /* Out of order segments go here */ | 296 | struct sk_buff_head out_of_order_queue; /* Out of order segments go here */ |
297 | 297 | ||
298 | struct tcp_func *af_specific; /* Operations which are AF_INET{4,6} specific */ | ||
299 | |||
300 | __u32 rcv_wnd; /* Current receiver window */ | 298 | __u32 rcv_wnd; /* Current receiver window */ |
301 | __u32 rcv_wup; /* rcv_nxt on last window update sent */ | 299 | __u32 rcv_wup; /* rcv_nxt on last window update sent */ |
302 | __u32 write_seq; /* Tail(+1) of data held in tcp send buffer */ | 300 | __u32 write_seq; /* Tail(+1) of data held in tcp send buffer */ |
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h index ccc81a1c550c..9e20d201e951 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #ifndef _INET_CONNECTION_SOCK_H | 15 | #ifndef _INET_CONNECTION_SOCK_H |
16 | #define _INET_CONNECTION_SOCK_H | 16 | #define _INET_CONNECTION_SOCK_H |
17 | 17 | ||
18 | #include <linux/compiler.h> | ||
18 | #include <linux/ip.h> | 19 | #include <linux/ip.h> |
19 | #include <linux/string.h> | 20 | #include <linux/string.h> |
20 | #include <linux/timer.h> | 21 | #include <linux/timer.h> |
@@ -29,6 +30,29 @@ struct inet_bind_bucket; | |||
29 | struct inet_hashinfo; | 30 | struct inet_hashinfo; |
30 | struct tcp_congestion_ops; | 31 | struct tcp_congestion_ops; |
31 | 32 | ||
33 | /* | ||
34 | * Pointers to address related TCP functions | ||
35 | * (i.e. things that depend on the address family) | ||
36 | */ | ||
37 | struct inet_connection_sock_af_ops { | ||
38 | int (*queue_xmit)(struct sk_buff *skb, int ipfragok); | ||
39 | void (*send_check)(struct sock *sk, int len, | ||
40 | struct sk_buff *skb); | ||
41 | int (*rebuild_header)(struct sock *sk); | ||
42 | int (*conn_request)(struct sock *sk, struct sk_buff *skb); | ||
43 | struct sock *(*syn_recv_sock)(struct sock *sk, struct sk_buff *skb, | ||
44 | struct request_sock *req, | ||
45 | struct dst_entry *dst); | ||
46 | int (*remember_stamp)(struct sock *sk); | ||
47 | __u16 net_header_len; | ||
48 | int (*setsockopt)(struct sock *sk, int level, int optname, | ||
49 | char __user *optval, int optlen); | ||
50 | int (*getsockopt)(struct sock *sk, int level, int optname, | ||
51 | char __user *optval, int __user *optlen); | ||
52 | void (*addr2sockaddr)(struct sock *sk, struct sockaddr *); | ||
53 | int sockaddr_len; | ||
54 | }; | ||
55 | |||
32 | /** inet_connection_sock - INET connection oriented sock | 56 | /** inet_connection_sock - INET connection oriented sock |
33 | * | 57 | * |
34 | * @icsk_accept_queue: FIFO of established children | 58 | * @icsk_accept_queue: FIFO of established children |
@@ -37,6 +61,7 @@ struct tcp_congestion_ops; | |||
37 | * @icsk_retransmit_timer: Resend (no ack) | 61 | * @icsk_retransmit_timer: Resend (no ack) |
38 | * @icsk_rto: Retransmit timeout | 62 | * @icsk_rto: Retransmit timeout |
39 | * @icsk_ca_ops Pluggable congestion control hook | 63 | * @icsk_ca_ops Pluggable congestion control hook |
64 | * @icsk_af_ops Operations which are AF_INET{4,6} specific | ||
40 | * @icsk_ca_state: Congestion control state | 65 | * @icsk_ca_state: Congestion control state |
41 | * @icsk_retransmits: Number of unrecovered [RTO] timeouts | 66 | * @icsk_retransmits: Number of unrecovered [RTO] timeouts |
42 | * @icsk_pending: Scheduled timer event | 67 | * @icsk_pending: Scheduled timer event |
@@ -55,6 +80,7 @@ struct inet_connection_sock { | |||
55 | struct timer_list icsk_delack_timer; | 80 | struct timer_list icsk_delack_timer; |
56 | __u32 icsk_rto; | 81 | __u32 icsk_rto; |
57 | struct tcp_congestion_ops *icsk_ca_ops; | 82 | struct tcp_congestion_ops *icsk_ca_ops; |
83 | struct inet_connection_sock_af_ops *icsk_af_ops; | ||
58 | __u8 icsk_ca_state; | 84 | __u8 icsk_ca_state; |
59 | __u8 icsk_retransmits; | 85 | __u8 icsk_retransmits; |
60 | __u8 icsk_pending; | 86 | __u8 icsk_pending; |
diff --git a/include/net/tcp.h b/include/net/tcp.h index d78025f9fbea..83b117a25c2a 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -225,53 +225,6 @@ extern atomic_t tcp_sockets_allocated; | |||
225 | extern int tcp_memory_pressure; | 225 | extern int tcp_memory_pressure; |
226 | 226 | ||
227 | /* | 227 | /* |
228 | * Pointers to address related TCP functions | ||
229 | * (i.e. things that depend on the address family) | ||
230 | */ | ||
231 | |||
232 | struct tcp_func { | ||
233 | int (*queue_xmit) (struct sk_buff *skb, | ||
234 | int ipfragok); | ||
235 | |||
236 | void (*send_check) (struct sock *sk, | ||
237 | struct tcphdr *th, | ||
238 | int len, | ||
239 | struct sk_buff *skb); | ||
240 | |||
241 | int (*rebuild_header) (struct sock *sk); | ||
242 | |||
243 | int (*conn_request) (struct sock *sk, | ||
244 | struct sk_buff *skb); | ||
245 | |||
246 | struct sock * (*syn_recv_sock) (struct sock *sk, | ||
247 | struct sk_buff *skb, | ||
248 | struct request_sock *req, | ||
249 | struct dst_entry *dst); | ||
250 | |||
251 | int (*remember_stamp) (struct sock *sk); | ||
252 | |||
253 | __u16 net_header_len; | ||
254 | |||
255 | int (*setsockopt) (struct sock *sk, | ||
256 | int level, | ||
257 | int optname, | ||
258 | char __user *optval, | ||
259 | int optlen); | ||
260 | |||
261 | int (*getsockopt) (struct sock *sk, | ||
262 | int level, | ||
263 | int optname, | ||
264 | char __user *optval, | ||
265 | int __user *optlen); | ||
266 | |||
267 | |||
268 | void (*addr2sockaddr) (struct sock *sk, | ||
269 | struct sockaddr *); | ||
270 | |||
271 | int sockaddr_len; | ||
272 | }; | ||
273 | |||
274 | /* | ||
275 | * The next routines deal with comparing 32 bit unsigned ints | 228 | * The next routines deal with comparing 32 bit unsigned ints |
276 | * and worry about wraparound (automatic with unsigned arithmetic). | 229 | * and worry about wraparound (automatic with unsigned arithmetic). |
277 | */ | 230 | */ |
@@ -405,8 +358,7 @@ extern void tcp_parse_options(struct sk_buff *skb, | |||
405 | * TCP v4 functions exported for the inet6 API | 358 | * TCP v4 functions exported for the inet6 API |
406 | */ | 359 | */ |
407 | 360 | ||
408 | extern void tcp_v4_send_check(struct sock *sk, | 361 | extern void tcp_v4_send_check(struct sock *sk, int len, |
409 | struct tcphdr *th, int len, | ||
410 | struct sk_buff *skb); | 362 | struct sk_buff *skb); |
411 | 363 | ||
412 | extern int tcp_v4_conn_request(struct sock *sk, | 364 | extern int tcp_v4_conn_request(struct sock *sk, |
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h index 4e86f2de6638..61f724c1036f 100644 --- a/include/net/transp_v6.h +++ b/include/net/transp_v6.h | |||
@@ -44,7 +44,7 @@ extern int datagram_send_ctl(struct msghdr *msg, | |||
44 | /* | 44 | /* |
45 | * address family specific functions | 45 | * address family specific functions |
46 | */ | 46 | */ |
47 | extern struct tcp_func ipv4_specific; | 47 | extern struct inet_connection_sock_af_ops ipv4_specific; |
48 | 48 | ||
49 | extern int inet6_destroy_sock(struct sock *sk); | 49 | extern int inet6_destroy_sock(struct sock *sk); |
50 | 50 | ||