diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ip.h | 4 | ||||
-rw-r--r-- | include/linux/ipv6.h | 2 | ||||
-rw-r--r-- | include/linux/tcp.h | 6 | ||||
-rw-r--r-- | include/net/request_sock.h | 34 | ||||
-rw-r--r-- | include/net/sock.h | 4 | ||||
-rw-r--r-- | include/net/tcp.h | 30 | ||||
-rw-r--r-- | include/net/tcp_ecn.h | 6 |
7 files changed, 43 insertions, 43 deletions
diff --git a/include/linux/ip.h b/include/linux/ip.h index d5b7c907204e..31e7cedd9f84 100644 --- a/include/linux/ip.h +++ b/include/linux/ip.h | |||
@@ -109,7 +109,7 @@ struct ip_options { | |||
109 | #define optlength(opt) (sizeof(struct ip_options) + opt->optlen) | 109 | #define optlength(opt) (sizeof(struct ip_options) + opt->optlen) |
110 | 110 | ||
111 | struct inet_request_sock { | 111 | struct inet_request_sock { |
112 | struct open_request req; | 112 | struct request_sock req; |
113 | u32 loc_addr; | 113 | u32 loc_addr; |
114 | u32 rmt_addr; | 114 | u32 rmt_addr; |
115 | u16 rmt_port; | 115 | u16 rmt_port; |
@@ -123,7 +123,7 @@ struct inet_request_sock { | |||
123 | struct ip_options *opt; | 123 | struct ip_options *opt; |
124 | }; | 124 | }; |
125 | 125 | ||
126 | static inline struct inet_request_sock *inet_rsk(const struct open_request *sk) | 126 | static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk) |
127 | { | 127 | { |
128 | return (struct inet_request_sock *)sk; | 128 | return (struct inet_request_sock *)sk; |
129 | } | 129 | } |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 98acdbf3d446..6fcd6a0ade24 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -201,7 +201,7 @@ struct tcp6_request_sock { | |||
201 | int iif; | 201 | int iif; |
202 | }; | 202 | }; |
203 | 203 | ||
204 | static inline struct tcp6_request_sock *tcp6_rsk(const struct open_request *sk) | 204 | static inline struct tcp6_request_sock *tcp6_rsk(const struct request_sock *sk) |
205 | { | 205 | { |
206 | return (struct tcp6_request_sock *)sk; | 206 | return (struct tcp6_request_sock *)sk; |
207 | } | 207 | } |
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 86771b37b80d..fb54292a15aa 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -236,7 +236,7 @@ struct tcp_request_sock { | |||
236 | __u32 snt_isn; | 236 | __u32 snt_isn; |
237 | }; | 237 | }; |
238 | 238 | ||
239 | static inline struct tcp_request_sock *tcp_rsk(const struct open_request *req) | 239 | static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req) |
240 | { | 240 | { |
241 | return (struct tcp_request_sock *)req; | 241 | return (struct tcp_request_sock *)req; |
242 | } | 242 | } |
@@ -393,8 +393,8 @@ struct tcp_sock { | |||
393 | struct tcp_listen_opt *listen_opt; | 393 | struct tcp_listen_opt *listen_opt; |
394 | 394 | ||
395 | /* FIFO of established children */ | 395 | /* FIFO of established children */ |
396 | struct open_request *accept_queue; | 396 | struct request_sock *accept_queue; |
397 | struct open_request *accept_queue_tail; | 397 | struct request_sock *accept_queue_tail; |
398 | 398 | ||
399 | unsigned int keepalive_time; /* time before keep alive takes place */ | 399 | unsigned int keepalive_time; /* time before keep alive takes place */ |
400 | unsigned int keepalive_intvl; /* time interval between keep alive probes */ | 400 | unsigned int keepalive_intvl; /* time interval between keep alive probes */ |
diff --git a/include/net/request_sock.h b/include/net/request_sock.h index 9502f5587931..08a8fd1d1610 100644 --- a/include/net/request_sock.h +++ b/include/net/request_sock.h | |||
@@ -19,28 +19,28 @@ | |||
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <net/sock.h> | 20 | #include <net/sock.h> |
21 | 21 | ||
22 | struct open_request; | 22 | struct request_sock; |
23 | struct sk_buff; | 23 | struct sk_buff; |
24 | struct dst_entry; | 24 | struct dst_entry; |
25 | struct proto; | 25 | struct proto; |
26 | 26 | ||
27 | struct or_calltable { | 27 | struct request_sock_ops { |
28 | int family; | 28 | int family; |
29 | kmem_cache_t *slab; | 29 | kmem_cache_t *slab; |
30 | int obj_size; | 30 | int obj_size; |
31 | int (*rtx_syn_ack)(struct sock *sk, | 31 | int (*rtx_syn_ack)(struct sock *sk, |
32 | struct open_request *req, | 32 | struct request_sock *req, |
33 | struct dst_entry *dst); | 33 | struct dst_entry *dst); |
34 | void (*send_ack)(struct sk_buff *skb, | 34 | void (*send_ack)(struct sk_buff *skb, |
35 | struct open_request *req); | 35 | struct request_sock *req); |
36 | void (*send_reset)(struct sk_buff *skb); | 36 | void (*send_reset)(struct sk_buff *skb); |
37 | void (*destructor)(struct open_request *req); | 37 | void (*destructor)(struct request_sock *req); |
38 | }; | 38 | }; |
39 | 39 | ||
40 | /* struct open_request - mini sock to represent a connection request | 40 | /* struct request_sock - mini sock to represent a connection request |
41 | */ | 41 | */ |
42 | struct open_request { | 42 | struct request_sock { |
43 | struct open_request *dl_next; /* Must be first member! */ | 43 | struct request_sock *dl_next; /* Must be first member! */ |
44 | u16 mss; | 44 | u16 mss; |
45 | u8 retrans; | 45 | u8 retrans; |
46 | u8 __pad; | 46 | u8 __pad; |
@@ -49,29 +49,29 @@ struct open_request { | |||
49 | u32 rcv_wnd; /* rcv_wnd offered first time */ | 49 | u32 rcv_wnd; /* rcv_wnd offered first time */ |
50 | u32 ts_recent; | 50 | u32 ts_recent; |
51 | unsigned long expires; | 51 | unsigned long expires; |
52 | struct or_calltable *class; | 52 | struct request_sock_ops *rsk_ops; |
53 | struct sock *sk; | 53 | struct sock *sk; |
54 | }; | 54 | }; |
55 | 55 | ||
56 | static inline struct open_request *tcp_openreq_alloc(struct or_calltable *class) | 56 | static inline struct request_sock *reqsk_alloc(struct request_sock_ops *ops) |
57 | { | 57 | { |
58 | struct open_request *req = kmem_cache_alloc(class->slab, SLAB_ATOMIC); | 58 | struct request_sock *req = kmem_cache_alloc(ops->slab, SLAB_ATOMIC); |
59 | 59 | ||
60 | if (req != NULL) | 60 | if (req != NULL) |
61 | req->class = class; | 61 | req->rsk_ops = ops; |
62 | 62 | ||
63 | return req; | 63 | return req; |
64 | } | 64 | } |
65 | 65 | ||
66 | static inline void tcp_openreq_fastfree(struct open_request *req) | 66 | static inline void __reqsk_free(struct request_sock *req) |
67 | { | 67 | { |
68 | kmem_cache_free(req->class->slab, req); | 68 | kmem_cache_free(req->rsk_ops->slab, req); |
69 | } | 69 | } |
70 | 70 | ||
71 | static inline void tcp_openreq_free(struct open_request *req) | 71 | static inline void reqsk_free(struct request_sock *req) |
72 | { | 72 | { |
73 | req->class->destructor(req); | 73 | req->rsk_ops->destructor(req); |
74 | tcp_openreq_fastfree(req); | 74 | __reqsk_free(req); |
75 | } | 75 | } |
76 | 76 | ||
77 | #endif /* _REQUEST_SOCK_H */ | 77 | #endif /* _REQUEST_SOCK_H */ |
diff --git a/include/net/sock.h b/include/net/sock.h index 6919276af8af..e593af5b1ecc 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -484,7 +484,7 @@ extern void sk_stream_kill_queues(struct sock *sk); | |||
484 | 484 | ||
485 | extern int sk_wait_data(struct sock *sk, long *timeo); | 485 | extern int sk_wait_data(struct sock *sk, long *timeo); |
486 | 486 | ||
487 | struct or_calltable; | 487 | struct request_sock_ops; |
488 | 488 | ||
489 | /* Networking protocol blocks we attach to sockets. | 489 | /* Networking protocol blocks we attach to sockets. |
490 | * socket layer -> transport layer interface | 490 | * socket layer -> transport layer interface |
@@ -549,7 +549,7 @@ struct proto { | |||
549 | kmem_cache_t *slab; | 549 | kmem_cache_t *slab; |
550 | unsigned int obj_size; | 550 | unsigned int obj_size; |
551 | 551 | ||
552 | struct or_calltable *rsk_prot; | 552 | struct request_sock_ops *rsk_prot; |
553 | 553 | ||
554 | struct module *owner; | 554 | struct module *owner; |
555 | 555 | ||
diff --git a/include/net/tcp.h b/include/net/tcp.h index d438ba566b89..6663086a5e35 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -641,7 +641,7 @@ struct tcp_func { | |||
641 | 641 | ||
642 | struct sock * (*syn_recv_sock) (struct sock *sk, | 642 | struct sock * (*syn_recv_sock) (struct sock *sk, |
643 | struct sk_buff *skb, | 643 | struct sk_buff *skb, |
644 | struct open_request *req, | 644 | struct request_sock *req, |
645 | struct dst_entry *dst); | 645 | struct dst_entry *dst); |
646 | 646 | ||
647 | int (*remember_stamp) (struct sock *sk); | 647 | int (*remember_stamp) (struct sock *sk); |
@@ -785,8 +785,8 @@ extern enum tcp_tw_status tcp_timewait_state_process(struct tcp_tw_bucket *tw, | |||
785 | unsigned len); | 785 | unsigned len); |
786 | 786 | ||
787 | extern struct sock * tcp_check_req(struct sock *sk,struct sk_buff *skb, | 787 | extern struct sock * tcp_check_req(struct sock *sk,struct sk_buff *skb, |
788 | struct open_request *req, | 788 | struct request_sock *req, |
789 | struct open_request **prev); | 789 | struct request_sock **prev); |
790 | extern int tcp_child_process(struct sock *parent, | 790 | extern int tcp_child_process(struct sock *parent, |
791 | struct sock *child, | 791 | struct sock *child, |
792 | struct sk_buff *skb); | 792 | struct sk_buff *skb); |
@@ -836,12 +836,12 @@ extern int tcp_v4_conn_request(struct sock *sk, | |||
836 | struct sk_buff *skb); | 836 | struct sk_buff *skb); |
837 | 837 | ||
838 | extern struct sock * tcp_create_openreq_child(struct sock *sk, | 838 | extern struct sock * tcp_create_openreq_child(struct sock *sk, |
839 | struct open_request *req, | 839 | struct request_sock *req, |
840 | struct sk_buff *skb); | 840 | struct sk_buff *skb); |
841 | 841 | ||
842 | extern struct sock * tcp_v4_syn_recv_sock(struct sock *sk, | 842 | extern struct sock * tcp_v4_syn_recv_sock(struct sock *sk, |
843 | struct sk_buff *skb, | 843 | struct sk_buff *skb, |
844 | struct open_request *req, | 844 | struct request_sock *req, |
845 | struct dst_entry *dst); | 845 | struct dst_entry *dst); |
846 | 846 | ||
847 | extern int tcp_v4_do_rcv(struct sock *sk, | 847 | extern int tcp_v4_do_rcv(struct sock *sk, |
@@ -855,7 +855,7 @@ extern int tcp_connect(struct sock *sk); | |||
855 | 855 | ||
856 | extern struct sk_buff * tcp_make_synack(struct sock *sk, | 856 | extern struct sk_buff * tcp_make_synack(struct sock *sk, |
857 | struct dst_entry *dst, | 857 | struct dst_entry *dst, |
858 | struct open_request *req); | 858 | struct request_sock *req); |
859 | 859 | ||
860 | extern int tcp_disconnect(struct sock *sk, int flags); | 860 | extern int tcp_disconnect(struct sock *sk, int flags); |
861 | 861 | ||
@@ -1683,7 +1683,7 @@ static inline int tcp_full_space(const struct sock *sk) | |||
1683 | return tcp_win_from_space(sk->sk_rcvbuf); | 1683 | return tcp_win_from_space(sk->sk_rcvbuf); |
1684 | } | 1684 | } |
1685 | 1685 | ||
1686 | static inline void tcp_acceptq_queue(struct sock *sk, struct open_request *req, | 1686 | static inline void tcp_acceptq_queue(struct sock *sk, struct request_sock *req, |
1687 | struct sock *child) | 1687 | struct sock *child) |
1688 | { | 1688 | { |
1689 | struct tcp_sock *tp = tcp_sk(sk); | 1689 | struct tcp_sock *tp = tcp_sk(sk); |
@@ -1707,11 +1707,11 @@ struct tcp_listen_opt | |||
1707 | int qlen_young; | 1707 | int qlen_young; |
1708 | int clock_hand; | 1708 | int clock_hand; |
1709 | u32 hash_rnd; | 1709 | u32 hash_rnd; |
1710 | struct open_request *syn_table[TCP_SYNQ_HSIZE]; | 1710 | struct request_sock *syn_table[TCP_SYNQ_HSIZE]; |
1711 | }; | 1711 | }; |
1712 | 1712 | ||
1713 | static inline void | 1713 | static inline void |
1714 | tcp_synq_removed(struct sock *sk, struct open_request *req) | 1714 | tcp_synq_removed(struct sock *sk, struct request_sock *req) |
1715 | { | 1715 | { |
1716 | struct tcp_listen_opt *lopt = tcp_sk(sk)->listen_opt; | 1716 | struct tcp_listen_opt *lopt = tcp_sk(sk)->listen_opt; |
1717 | 1717 | ||
@@ -1745,23 +1745,23 @@ static inline int tcp_synq_is_full(struct sock *sk) | |||
1745 | return tcp_synq_len(sk) >> tcp_sk(sk)->listen_opt->max_qlen_log; | 1745 | return tcp_synq_len(sk) >> tcp_sk(sk)->listen_opt->max_qlen_log; |
1746 | } | 1746 | } |
1747 | 1747 | ||
1748 | static inline void tcp_synq_unlink(struct tcp_sock *tp, struct open_request *req, | 1748 | static inline void tcp_synq_unlink(struct tcp_sock *tp, struct request_sock *req, |
1749 | struct open_request **prev) | 1749 | struct request_sock **prev) |
1750 | { | 1750 | { |
1751 | write_lock(&tp->syn_wait_lock); | 1751 | write_lock(&tp->syn_wait_lock); |
1752 | *prev = req->dl_next; | 1752 | *prev = req->dl_next; |
1753 | write_unlock(&tp->syn_wait_lock); | 1753 | write_unlock(&tp->syn_wait_lock); |
1754 | } | 1754 | } |
1755 | 1755 | ||
1756 | static inline void tcp_synq_drop(struct sock *sk, struct open_request *req, | 1756 | static inline void tcp_synq_drop(struct sock *sk, struct request_sock *req, |
1757 | struct open_request **prev) | 1757 | struct request_sock **prev) |
1758 | { | 1758 | { |
1759 | tcp_synq_unlink(tcp_sk(sk), req, prev); | 1759 | tcp_synq_unlink(tcp_sk(sk), req, prev); |
1760 | tcp_synq_removed(sk, req); | 1760 | tcp_synq_removed(sk, req); |
1761 | tcp_openreq_free(req); | 1761 | reqsk_free(req); |
1762 | } | 1762 | } |
1763 | 1763 | ||
1764 | static __inline__ void tcp_openreq_init(struct open_request *req, | 1764 | static __inline__ void tcp_openreq_init(struct request_sock *req, |
1765 | struct tcp_options_received *rx_opt, | 1765 | struct tcp_options_received *rx_opt, |
1766 | struct sk_buff *skb) | 1766 | struct sk_buff *skb) |
1767 | { | 1767 | { |
diff --git a/include/net/tcp_ecn.h b/include/net/tcp_ecn.h index 94ad970e844a..64980ee8c92a 100644 --- a/include/net/tcp_ecn.h +++ b/include/net/tcp_ecn.h | |||
@@ -39,7 +39,7 @@ static inline void TCP_ECN_send_syn(struct sock *sk, struct tcp_sock *tp, | |||
39 | } | 39 | } |
40 | 40 | ||
41 | static __inline__ void | 41 | static __inline__ void |
42 | TCP_ECN_make_synack(struct open_request *req, struct tcphdr *th) | 42 | TCP_ECN_make_synack(struct request_sock *req, struct tcphdr *th) |
43 | { | 43 | { |
44 | if (inet_rsk(req)->ecn_ok) | 44 | if (inet_rsk(req)->ecn_ok) |
45 | th->ece = 1; | 45 | th->ece = 1; |
@@ -112,13 +112,13 @@ static inline int TCP_ECN_rcv_ecn_echo(struct tcp_sock *tp, struct tcphdr *th) | |||
112 | } | 112 | } |
113 | 113 | ||
114 | static inline void TCP_ECN_openreq_child(struct tcp_sock *tp, | 114 | static inline void TCP_ECN_openreq_child(struct tcp_sock *tp, |
115 | struct open_request *req) | 115 | struct request_sock *req) |
116 | { | 116 | { |
117 | tp->ecn_flags = inet_rsk(req)->ecn_ok ? TCP_ECN_OK : 0; | 117 | tp->ecn_flags = inet_rsk(req)->ecn_ok ? TCP_ECN_OK : 0; |
118 | } | 118 | } |
119 | 119 | ||
120 | static __inline__ void | 120 | static __inline__ void |
121 | TCP_ECN_create_request(struct open_request *req, struct tcphdr *th) | 121 | TCP_ECN_create_request(struct request_sock *req, struct tcphdr *th) |
122 | { | 122 | { |
123 | if (sysctl_tcp_ecn && th->ece && th->cwr) | 123 | if (sysctl_tcp_ecn && th->ece && th->cwr) |
124 | inet_rsk(req)->ecn_ok = 1; | 124 | inet_rsk(req)->ecn_ok = 1; |