diff options
-rw-r--r-- | include/net/inet6_connection_sock.h | 32 | ||||
-rw-r--r-- | include/net/inet6_hashtables.h | 38 | ||||
-rw-r--r-- | include/net/inet_common.h | 48 | ||||
-rw-r--r-- | include/net/inet_connection_sock.h | 79 | ||||
-rw-r--r-- | include/net/inet_hashtables.h | 72 | ||||
-rw-r--r-- | include/net/inet_sock.h | 4 | ||||
-rw-r--r-- | include/net/inet_timewait_sock.h | 37 | ||||
-rw-r--r-- | include/net/inetpeer.h | 12 |
8 files changed, 157 insertions, 165 deletions
diff --git a/include/net/inet6_connection_sock.h b/include/net/inet6_connection_sock.h index 04642c920431..f981ba7adeed 100644 --- a/include/net/inet6_connection_sock.h +++ b/include/net/inet6_connection_sock.h | |||
@@ -22,27 +22,25 @@ struct sk_buff; | |||
22 | struct sock; | 22 | struct sock; |
23 | struct sockaddr; | 23 | struct sockaddr; |
24 | 24 | ||
25 | extern int inet6_csk_bind_conflict(const struct sock *sk, | 25 | int inet6_csk_bind_conflict(const struct sock *sk, |
26 | const struct inet_bind_bucket *tb, bool relax); | 26 | const struct inet_bind_bucket *tb, bool relax); |
27 | 27 | ||
28 | extern struct dst_entry* inet6_csk_route_req(struct sock *sk, | 28 | struct dst_entry *inet6_csk_route_req(struct sock *sk, struct flowi6 *fl6, |
29 | struct flowi6 *fl6, | 29 | const struct request_sock *req); |
30 | const struct request_sock *req); | ||
31 | 30 | ||
32 | extern struct request_sock *inet6_csk_search_req(const struct sock *sk, | 31 | struct request_sock *inet6_csk_search_req(const struct sock *sk, |
33 | struct request_sock ***prevp, | 32 | struct request_sock ***prevp, |
34 | const __be16 rport, | 33 | const __be16 rport, |
35 | const struct in6_addr *raddr, | 34 | const struct in6_addr *raddr, |
36 | const struct in6_addr *laddr, | 35 | const struct in6_addr *laddr, |
37 | const int iif); | 36 | const int iif); |
38 | 37 | ||
39 | extern void inet6_csk_reqsk_queue_hash_add(struct sock *sk, | 38 | void inet6_csk_reqsk_queue_hash_add(struct sock *sk, struct request_sock *req, |
40 | struct request_sock *req, | 39 | const unsigned long timeout); |
41 | const unsigned long timeout); | ||
42 | 40 | ||
43 | extern void inet6_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr); | 41 | void inet6_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr); |
44 | 42 | ||
45 | extern int inet6_csk_xmit(struct sk_buff *skb, struct flowi *fl); | 43 | int inet6_csk_xmit(struct sk_buff *skb, struct flowi *fl); |
46 | 44 | ||
47 | extern struct dst_entry *inet6_csk_update_pmtu(struct sock *sk, u32 mtu); | 45 | struct dst_entry *inet6_csk_update_pmtu(struct sock *sk, u32 mtu); |
48 | #endif /* _INET6_CONNECTION_SOCK_H */ | 46 | #endif /* _INET6_CONNECTION_SOCK_H */ |
diff --git a/include/net/inet6_hashtables.h b/include/net/inet6_hashtables.h index fd4ee016ba5c..f52fa88feb64 100644 --- a/include/net/inet6_hashtables.h +++ b/include/net/inet6_hashtables.h | |||
@@ -53,7 +53,7 @@ static inline int inet6_sk_ehashfn(const struct sock *sk) | |||
53 | return inet6_ehashfn(net, laddr, lport, faddr, fport); | 53 | return inet6_ehashfn(net, laddr, lport, faddr, fport); |
54 | } | 54 | } |
55 | 55 | ||
56 | extern int __inet6_hash(struct sock *sk, struct inet_timewait_sock *twp); | 56 | int __inet6_hash(struct sock *sk, struct inet_timewait_sock *twp); |
57 | 57 | ||
58 | /* | 58 | /* |
59 | * Sockets in TCP_CLOSE state are _always_ taken out of the hash, so | 59 | * Sockets in TCP_CLOSE state are _always_ taken out of the hash, so |
@@ -61,21 +61,19 @@ extern int __inet6_hash(struct sock *sk, struct inet_timewait_sock *twp); | |||
61 | * | 61 | * |
62 | * The sockhash lock must be held as a reader here. | 62 | * The sockhash lock must be held as a reader here. |
63 | */ | 63 | */ |
64 | extern struct sock *__inet6_lookup_established(struct net *net, | 64 | struct sock *__inet6_lookup_established(struct net *net, |
65 | struct inet_hashinfo *hashinfo, | 65 | struct inet_hashinfo *hashinfo, |
66 | const struct in6_addr *saddr, | 66 | const struct in6_addr *saddr, |
67 | const __be16 sport, | 67 | const __be16 sport, |
68 | const struct in6_addr *daddr, | 68 | const struct in6_addr *daddr, |
69 | const u16 hnum, | 69 | const u16 hnum, const int dif); |
70 | const int dif); | 70 | |
71 | 71 | struct sock *inet6_lookup_listener(struct net *net, | |
72 | extern struct sock *inet6_lookup_listener(struct net *net, | 72 | struct inet_hashinfo *hashinfo, |
73 | struct inet_hashinfo *hashinfo, | 73 | const struct in6_addr *saddr, |
74 | const struct in6_addr *saddr, | 74 | const __be16 sport, |
75 | const __be16 sport, | 75 | const struct in6_addr *daddr, |
76 | const struct in6_addr *daddr, | 76 | const unsigned short hnum, const int dif); |
77 | const unsigned short hnum, | ||
78 | const int dif); | ||
79 | 77 | ||
80 | static inline struct sock *__inet6_lookup(struct net *net, | 78 | static inline struct sock *__inet6_lookup(struct net *net, |
81 | struct inet_hashinfo *hashinfo, | 79 | struct inet_hashinfo *hashinfo, |
@@ -110,9 +108,9 @@ static inline struct sock *__inet6_lookup_skb(struct inet_hashinfo *hashinfo, | |||
110 | inet6_iif(skb)); | 108 | inet6_iif(skb)); |
111 | } | 109 | } |
112 | 110 | ||
113 | extern struct sock *inet6_lookup(struct net *net, struct inet_hashinfo *hashinfo, | 111 | struct sock *inet6_lookup(struct net *net, struct inet_hashinfo *hashinfo, |
114 | const struct in6_addr *saddr, const __be16 sport, | 112 | const struct in6_addr *saddr, const __be16 sport, |
115 | const struct in6_addr *daddr, const __be16 dport, | 113 | const struct in6_addr *daddr, const __be16 dport, |
116 | const int dif); | 114 | const int dif); |
117 | #endif /* IS_ENABLED(CONFIG_IPV6) */ | 115 | #endif /* IS_ENABLED(CONFIG_IPV6) */ |
118 | #endif /* _INET6_HASHTABLES_H */ | 116 | #endif /* _INET6_HASHTABLES_H */ |
diff --git a/include/net/inet_common.h b/include/net/inet_common.h index 234008782c8c..fe7994c48b75 100644 --- a/include/net/inet_common.h +++ b/include/net/inet_common.h | |||
@@ -13,30 +13,30 @@ struct sock; | |||
13 | struct sockaddr; | 13 | struct sockaddr; |
14 | struct socket; | 14 | struct socket; |
15 | 15 | ||
16 | extern int inet_release(struct socket *sock); | 16 | int inet_release(struct socket *sock); |
17 | extern int inet_stream_connect(struct socket *sock, struct sockaddr *uaddr, | 17 | int inet_stream_connect(struct socket *sock, struct sockaddr *uaddr, |
18 | int addr_len, int flags); | 18 | int addr_len, int flags); |
19 | extern int __inet_stream_connect(struct socket *sock, struct sockaddr *uaddr, | 19 | int __inet_stream_connect(struct socket *sock, struct sockaddr *uaddr, |
20 | int addr_len, int flags); | 20 | int addr_len, int flags); |
21 | extern int inet_dgram_connect(struct socket *sock, struct sockaddr *uaddr, | 21 | int inet_dgram_connect(struct socket *sock, struct sockaddr *uaddr, |
22 | int addr_len, int flags); | 22 | int addr_len, int flags); |
23 | extern int inet_accept(struct socket *sock, struct socket *newsock, int flags); | 23 | int inet_accept(struct socket *sock, struct socket *newsock, int flags); |
24 | extern int inet_sendmsg(struct kiocb *iocb, struct socket *sock, | 24 | int inet_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, |
25 | struct msghdr *msg, size_t size); | 25 | size_t size); |
26 | extern ssize_t inet_sendpage(struct socket *sock, struct page *page, int offset, | 26 | ssize_t inet_sendpage(struct socket *sock, struct page *page, int offset, |
27 | size_t size, int flags); | 27 | size_t size, int flags); |
28 | extern int inet_recvmsg(struct kiocb *iocb, struct socket *sock, | 28 | int inet_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, |
29 | struct msghdr *msg, size_t size, int flags); | 29 | size_t size, int flags); |
30 | extern int inet_shutdown(struct socket *sock, int how); | 30 | int inet_shutdown(struct socket *sock, int how); |
31 | extern int inet_listen(struct socket *sock, int backlog); | 31 | int inet_listen(struct socket *sock, int backlog); |
32 | extern void inet_sock_destruct(struct sock *sk); | 32 | void inet_sock_destruct(struct sock *sk); |
33 | extern int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len); | 33 | int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len); |
34 | extern int inet_getname(struct socket *sock, struct sockaddr *uaddr, | 34 | int inet_getname(struct socket *sock, struct sockaddr *uaddr, int *uaddr_len, |
35 | int *uaddr_len, int peer); | 35 | int peer); |
36 | extern int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); | 36 | int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); |
37 | extern int inet_ctl_sock_create(struct sock **sk, unsigned short family, | 37 | int inet_ctl_sock_create(struct sock **sk, unsigned short family, |
38 | unsigned short type, unsigned char protocol, | 38 | unsigned short type, unsigned char protocol, |
39 | struct net *net); | 39 | struct net *net); |
40 | 40 | ||
41 | static inline void inet_ctl_sock_destroy(struct sock *sk) | 41 | static inline void inet_ctl_sock_destroy(struct sock *sk) |
42 | { | 42 | { |
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h index de2c78529afa..c55aeed41ace 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h | |||
@@ -146,9 +146,9 @@ static inline void *inet_csk_ca(const struct sock *sk) | |||
146 | return (void *)inet_csk(sk)->icsk_ca_priv; | 146 | return (void *)inet_csk(sk)->icsk_ca_priv; |
147 | } | 147 | } |
148 | 148 | ||
149 | extern struct sock *inet_csk_clone_lock(const struct sock *sk, | 149 | struct sock *inet_csk_clone_lock(const struct sock *sk, |
150 | const struct request_sock *req, | 150 | const struct request_sock *req, |
151 | const gfp_t priority); | 151 | const gfp_t priority); |
152 | 152 | ||
153 | enum inet_csk_ack_state_t { | 153 | enum inet_csk_ack_state_t { |
154 | ICSK_ACK_SCHED = 1, | 154 | ICSK_ACK_SCHED = 1, |
@@ -157,11 +157,11 @@ enum inet_csk_ack_state_t { | |||
157 | ICSK_ACK_PUSHED2 = 8 | 157 | ICSK_ACK_PUSHED2 = 8 |
158 | }; | 158 | }; |
159 | 159 | ||
160 | extern void inet_csk_init_xmit_timers(struct sock *sk, | 160 | void inet_csk_init_xmit_timers(struct sock *sk, |
161 | void (*retransmit_handler)(unsigned long), | 161 | void (*retransmit_handler)(unsigned long), |
162 | void (*delack_handler)(unsigned long), | 162 | void (*delack_handler)(unsigned long), |
163 | void (*keepalive_handler)(unsigned long)); | 163 | void (*keepalive_handler)(unsigned long)); |
164 | extern void inet_csk_clear_xmit_timers(struct sock *sk); | 164 | void inet_csk_clear_xmit_timers(struct sock *sk); |
165 | 165 | ||
166 | static inline void inet_csk_schedule_ack(struct sock *sk) | 166 | static inline void inet_csk_schedule_ack(struct sock *sk) |
167 | { | 167 | { |
@@ -178,8 +178,8 @@ static inline void inet_csk_delack_init(struct sock *sk) | |||
178 | memset(&inet_csk(sk)->icsk_ack, 0, sizeof(inet_csk(sk)->icsk_ack)); | 178 | memset(&inet_csk(sk)->icsk_ack, 0, sizeof(inet_csk(sk)->icsk_ack)); |
179 | } | 179 | } |
180 | 180 | ||
181 | extern void inet_csk_delete_keepalive_timer(struct sock *sk); | 181 | void inet_csk_delete_keepalive_timer(struct sock *sk); |
182 | extern void inet_csk_reset_keepalive_timer(struct sock *sk, unsigned long timeout); | 182 | void inet_csk_reset_keepalive_timer(struct sock *sk, unsigned long timeout); |
183 | 183 | ||
184 | #ifdef INET_CSK_DEBUG | 184 | #ifdef INET_CSK_DEBUG |
185 | extern const char inet_csk_timer_bug_msg[]; | 185 | extern const char inet_csk_timer_bug_msg[]; |
@@ -241,23 +241,21 @@ static inline void inet_csk_reset_xmit_timer(struct sock *sk, const int what, | |||
241 | #endif | 241 | #endif |
242 | } | 242 | } |
243 | 243 | ||
244 | extern struct sock *inet_csk_accept(struct sock *sk, int flags, int *err); | 244 | struct sock *inet_csk_accept(struct sock *sk, int flags, int *err); |
245 | 245 | ||
246 | extern struct request_sock *inet_csk_search_req(const struct sock *sk, | 246 | struct request_sock *inet_csk_search_req(const struct sock *sk, |
247 | struct request_sock ***prevp, | 247 | struct request_sock ***prevp, |
248 | const __be16 rport, | 248 | const __be16 rport, |
249 | const __be32 raddr, | 249 | const __be32 raddr, |
250 | const __be32 laddr); | 250 | const __be32 laddr); |
251 | extern int inet_csk_bind_conflict(const struct sock *sk, | 251 | int inet_csk_bind_conflict(const struct sock *sk, |
252 | const struct inet_bind_bucket *tb, bool relax); | 252 | const struct inet_bind_bucket *tb, bool relax); |
253 | extern int inet_csk_get_port(struct sock *sk, unsigned short snum); | 253 | int inet_csk_get_port(struct sock *sk, unsigned short snum); |
254 | 254 | ||
255 | extern struct dst_entry* inet_csk_route_req(struct sock *sk, | 255 | struct dst_entry *inet_csk_route_req(struct sock *sk, struct flowi4 *fl4, |
256 | struct flowi4 *fl4, | 256 | const struct request_sock *req); |
257 | struct dst_entry *inet_csk_route_child_sock(struct sock *sk, struct sock *newsk, | ||
257 | const struct request_sock *req); | 258 | const struct request_sock *req); |
258 | extern struct dst_entry* inet_csk_route_child_sock(struct sock *sk, | ||
259 | struct sock *newsk, | ||
260 | const struct request_sock *req); | ||
261 | 259 | ||
262 | static inline void inet_csk_reqsk_queue_add(struct sock *sk, | 260 | static inline void inet_csk_reqsk_queue_add(struct sock *sk, |
263 | struct request_sock *req, | 261 | struct request_sock *req, |
@@ -266,9 +264,8 @@ static inline void inet_csk_reqsk_queue_add(struct sock *sk, | |||
266 | reqsk_queue_add(&inet_csk(sk)->icsk_accept_queue, req, sk, child); | 264 | reqsk_queue_add(&inet_csk(sk)->icsk_accept_queue, req, sk, child); |
267 | } | 265 | } |
268 | 266 | ||
269 | extern void inet_csk_reqsk_queue_hash_add(struct sock *sk, | 267 | void inet_csk_reqsk_queue_hash_add(struct sock *sk, struct request_sock *req, |
270 | struct request_sock *req, | 268 | unsigned long timeout); |
271 | unsigned long timeout); | ||
272 | 269 | ||
273 | static inline void inet_csk_reqsk_queue_removed(struct sock *sk, | 270 | static inline void inet_csk_reqsk_queue_removed(struct sock *sk, |
274 | struct request_sock *req) | 271 | struct request_sock *req) |
@@ -315,13 +312,13 @@ static inline void inet_csk_reqsk_queue_drop(struct sock *sk, | |||
315 | reqsk_free(req); | 312 | reqsk_free(req); |
316 | } | 313 | } |
317 | 314 | ||
318 | extern void inet_csk_reqsk_queue_prune(struct sock *parent, | 315 | void inet_csk_reqsk_queue_prune(struct sock *parent, |
319 | const unsigned long interval, | 316 | const unsigned long interval, |
320 | const unsigned long timeout, | 317 | const unsigned long timeout, |
321 | const unsigned long max_rto); | 318 | const unsigned long max_rto); |
322 | 319 | ||
323 | extern void inet_csk_destroy_sock(struct sock *sk); | 320 | void inet_csk_destroy_sock(struct sock *sk); |
324 | extern void inet_csk_prepare_forced_close(struct sock *sk); | 321 | void inet_csk_prepare_forced_close(struct sock *sk); |
325 | 322 | ||
326 | /* | 323 | /* |
327 | * LISTEN is a special case for poll.. | 324 | * LISTEN is a special case for poll.. |
@@ -332,15 +329,15 @@ static inline unsigned int inet_csk_listen_poll(const struct sock *sk) | |||
332 | (POLLIN | POLLRDNORM) : 0; | 329 | (POLLIN | POLLRDNORM) : 0; |
333 | } | 330 | } |
334 | 331 | ||
335 | extern int inet_csk_listen_start(struct sock *sk, const int nr_table_entries); | 332 | int inet_csk_listen_start(struct sock *sk, const int nr_table_entries); |
336 | extern void inet_csk_listen_stop(struct sock *sk); | 333 | void inet_csk_listen_stop(struct sock *sk); |
337 | 334 | ||
338 | extern void inet_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr); | 335 | void inet_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr); |
339 | 336 | ||
340 | extern int inet_csk_compat_getsockopt(struct sock *sk, int level, int optname, | 337 | int inet_csk_compat_getsockopt(struct sock *sk, int level, int optname, |
341 | char __user *optval, int __user *optlen); | 338 | char __user *optval, int __user *optlen); |
342 | extern int inet_csk_compat_setsockopt(struct sock *sk, int level, int optname, | 339 | int inet_csk_compat_setsockopt(struct sock *sk, int level, int optname, |
343 | char __user *optval, unsigned int optlen); | 340 | char __user *optval, unsigned int optlen); |
344 | 341 | ||
345 | extern struct dst_entry *inet_csk_update_pmtu(struct sock *sk, u32 mtu); | 342 | struct dst_entry *inet_csk_update_pmtu(struct sock *sk, u32 mtu); |
346 | #endif /* _INET_CONNECTION_SOCK_H */ | 343 | #endif /* _INET_CONNECTION_SOCK_H */ |
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index ef83d9e844b5..594dfeead70f 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h | |||
@@ -218,22 +218,21 @@ static inline void inet_ehash_locks_free(struct inet_hashinfo *hashinfo) | |||
218 | } | 218 | } |
219 | } | 219 | } |
220 | 220 | ||
221 | extern struct inet_bind_bucket * | 221 | struct inet_bind_bucket * |
222 | inet_bind_bucket_create(struct kmem_cache *cachep, | 222 | inet_bind_bucket_create(struct kmem_cache *cachep, struct net *net, |
223 | struct net *net, | 223 | struct inet_bind_hashbucket *head, |
224 | struct inet_bind_hashbucket *head, | 224 | const unsigned short snum); |
225 | const unsigned short snum); | 225 | void inet_bind_bucket_destroy(struct kmem_cache *cachep, |
226 | extern void inet_bind_bucket_destroy(struct kmem_cache *cachep, | 226 | struct inet_bind_bucket *tb); |
227 | struct inet_bind_bucket *tb); | 227 | |
228 | 228 | static inline int inet_bhashfn(struct net *net, const __u16 lport, | |
229 | static inline int inet_bhashfn(struct net *net, | 229 | const int bhash_size) |
230 | const __u16 lport, const int bhash_size) | ||
231 | { | 230 | { |
232 | return (lport + net_hash_mix(net)) & (bhash_size - 1); | 231 | return (lport + net_hash_mix(net)) & (bhash_size - 1); |
233 | } | 232 | } |
234 | 233 | ||
235 | extern void inet_bind_hash(struct sock *sk, struct inet_bind_bucket *tb, | 234 | void inet_bind_hash(struct sock *sk, struct inet_bind_bucket *tb, |
236 | const unsigned short snum); | 235 | const unsigned short snum); |
237 | 236 | ||
238 | /* These can have wildcards, don't try too hard. */ | 237 | /* These can have wildcards, don't try too hard. */ |
239 | static inline int inet_lhashfn(struct net *net, const unsigned short num) | 238 | static inline int inet_lhashfn(struct net *net, const unsigned short num) |
@@ -247,23 +246,22 @@ static inline int inet_sk_listen_hashfn(const struct sock *sk) | |||
247 | } | 246 | } |
248 | 247 | ||
249 | /* Caller must disable local BH processing. */ | 248 | /* Caller must disable local BH processing. */ |
250 | extern int __inet_inherit_port(struct sock *sk, struct sock *child); | 249 | int __inet_inherit_port(struct sock *sk, struct sock *child); |
251 | 250 | ||
252 | extern void inet_put_port(struct sock *sk); | 251 | void inet_put_port(struct sock *sk); |
253 | 252 | ||
254 | void inet_hashinfo_init(struct inet_hashinfo *h); | 253 | void inet_hashinfo_init(struct inet_hashinfo *h); |
255 | 254 | ||
256 | extern int __inet_hash_nolisten(struct sock *sk, struct inet_timewait_sock *tw); | 255 | int __inet_hash_nolisten(struct sock *sk, struct inet_timewait_sock *tw); |
257 | extern void inet_hash(struct sock *sk); | 256 | void inet_hash(struct sock *sk); |
258 | extern void inet_unhash(struct sock *sk); | 257 | void inet_unhash(struct sock *sk); |
259 | 258 | ||
260 | extern struct sock *__inet_lookup_listener(struct net *net, | 259 | struct sock *__inet_lookup_listener(struct net *net, |
261 | struct inet_hashinfo *hashinfo, | 260 | struct inet_hashinfo *hashinfo, |
262 | const __be32 saddr, | 261 | const __be32 saddr, const __be16 sport, |
263 | const __be16 sport, | 262 | const __be32 daddr, |
264 | const __be32 daddr, | 263 | const unsigned short hnum, |
265 | const unsigned short hnum, | 264 | const int dif); |
266 | const int dif); | ||
267 | 265 | ||
268 | static inline struct sock *inet_lookup_listener(struct net *net, | 266 | static inline struct sock *inet_lookup_listener(struct net *net, |
269 | struct inet_hashinfo *hashinfo, | 267 | struct inet_hashinfo *hashinfo, |
@@ -339,10 +337,11 @@ static inline struct sock *inet_lookup_listener(struct net *net, | |||
339 | * | 337 | * |
340 | * Local BH must be disabled here. | 338 | * Local BH must be disabled here. |
341 | */ | 339 | */ |
342 | extern struct sock * __inet_lookup_established(struct net *net, | 340 | struct sock *__inet_lookup_established(struct net *net, |
343 | struct inet_hashinfo *hashinfo, | 341 | struct inet_hashinfo *hashinfo, |
344 | const __be32 saddr, const __be16 sport, | 342 | const __be32 saddr, const __be16 sport, |
345 | const __be32 daddr, const u16 hnum, const int dif); | 343 | const __be32 daddr, const u16 hnum, |
344 | const int dif); | ||
346 | 345 | ||
347 | static inline struct sock * | 346 | static inline struct sock * |
348 | inet_lookup_established(struct net *net, struct inet_hashinfo *hashinfo, | 347 | inet_lookup_established(struct net *net, struct inet_hashinfo *hashinfo, |
@@ -399,13 +398,14 @@ static inline struct sock *__inet_lookup_skb(struct inet_hashinfo *hashinfo, | |||
399 | iph->daddr, dport, inet_iif(skb)); | 398 | iph->daddr, dport, inet_iif(skb)); |
400 | } | 399 | } |
401 | 400 | ||
402 | extern int __inet_hash_connect(struct inet_timewait_death_row *death_row, | 401 | int __inet_hash_connect(struct inet_timewait_death_row *death_row, |
403 | struct sock *sk, | 402 | struct sock *sk, u32 port_offset, |
404 | u32 port_offset, | 403 | int (*check_established)(struct inet_timewait_death_row *, |
405 | int (*check_established)(struct inet_timewait_death_row *, | 404 | struct sock *, __u16, |
406 | struct sock *, __u16, struct inet_timewait_sock **), | 405 | struct inet_timewait_sock **), |
407 | int (*hash)(struct sock *sk, struct inet_timewait_sock *twp)); | 406 | int (*hash)(struct sock *sk, |
407 | struct inet_timewait_sock *twp)); | ||
408 | 408 | ||
409 | extern int inet_hash_connect(struct inet_timewait_death_row *death_row, | 409 | int inet_hash_connect(struct inet_timewait_death_row *death_row, |
410 | struct sock *sk); | 410 | struct sock *sk); |
411 | #endif /* _INET_HASHTABLES_H */ | 411 | #endif /* _INET_HASHTABLES_H */ |
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index b21a7f06d6a4..636d203727a2 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
@@ -199,11 +199,11 @@ static inline void inet_sk_copy_descendant(struct sock *sk_to, | |||
199 | } | 199 | } |
200 | #endif | 200 | #endif |
201 | 201 | ||
202 | extern int inet_sk_rebuild_header(struct sock *sk); | 202 | int inet_sk_rebuild_header(struct sock *sk); |
203 | 203 | ||
204 | extern u32 inet_ehash_secret; | 204 | extern u32 inet_ehash_secret; |
205 | extern u32 ipv6_hash_secret; | 205 | extern u32 ipv6_hash_secret; |
206 | extern void build_ehash_secret(void); | 206 | void build_ehash_secret(void); |
207 | 207 | ||
208 | static inline unsigned int inet_ehashfn(struct net *net, | 208 | static inline unsigned int inet_ehashfn(struct net *net, |
209 | const __be32 laddr, const __u16 lport, | 209 | const __be32 laddr, const __u16 lport, |
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h index f908dfc06505..828200ab1125 100644 --- a/include/net/inet_timewait_sock.h +++ b/include/net/inet_timewait_sock.h | |||
@@ -83,9 +83,9 @@ struct inet_timewait_death_row { | |||
83 | int sysctl_max_tw_buckets; | 83 | int sysctl_max_tw_buckets; |
84 | }; | 84 | }; |
85 | 85 | ||
86 | extern void inet_twdr_hangman(unsigned long data); | 86 | void inet_twdr_hangman(unsigned long data); |
87 | extern void inet_twdr_twkill_work(struct work_struct *work); | 87 | void inet_twdr_twkill_work(struct work_struct *work); |
88 | extern void inet_twdr_twcal_tick(unsigned long data); | 88 | void inet_twdr_twcal_tick(unsigned long data); |
89 | 89 | ||
90 | struct inet_bind_bucket; | 90 | struct inet_bind_bucket; |
91 | 91 | ||
@@ -195,28 +195,27 @@ static inline __be32 sk_rcv_saddr(const struct sock *sk) | |||
195 | return sk->__sk_common.skc_rcv_saddr; | 195 | return sk->__sk_common.skc_rcv_saddr; |
196 | } | 196 | } |
197 | 197 | ||
198 | extern void inet_twsk_put(struct inet_timewait_sock *tw); | 198 | void inet_twsk_put(struct inet_timewait_sock *tw); |
199 | 199 | ||
200 | extern int inet_twsk_unhash(struct inet_timewait_sock *tw); | 200 | int inet_twsk_unhash(struct inet_timewait_sock *tw); |
201 | 201 | ||
202 | extern int inet_twsk_bind_unhash(struct inet_timewait_sock *tw, | 202 | int inet_twsk_bind_unhash(struct inet_timewait_sock *tw, |
203 | struct inet_hashinfo *hashinfo); | 203 | struct inet_hashinfo *hashinfo); |
204 | 204 | ||
205 | extern struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk, | 205 | struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk, |
206 | const int state); | 206 | const int state); |
207 | 207 | ||
208 | extern void __inet_twsk_hashdance(struct inet_timewait_sock *tw, | 208 | void __inet_twsk_hashdance(struct inet_timewait_sock *tw, struct sock *sk, |
209 | struct sock *sk, | 209 | struct inet_hashinfo *hashinfo); |
210 | struct inet_hashinfo *hashinfo); | ||
211 | 210 | ||
212 | extern void inet_twsk_schedule(struct inet_timewait_sock *tw, | 211 | void inet_twsk_schedule(struct inet_timewait_sock *tw, |
213 | struct inet_timewait_death_row *twdr, | 212 | struct inet_timewait_death_row *twdr, |
214 | const int timeo, const int timewait_len); | 213 | const int timeo, const int timewait_len); |
215 | extern void inet_twsk_deschedule(struct inet_timewait_sock *tw, | 214 | void inet_twsk_deschedule(struct inet_timewait_sock *tw, |
216 | struct inet_timewait_death_row *twdr); | 215 | struct inet_timewait_death_row *twdr); |
217 | 216 | ||
218 | extern void inet_twsk_purge(struct inet_hashinfo *hashinfo, | 217 | void inet_twsk_purge(struct inet_hashinfo *hashinfo, |
219 | struct inet_timewait_death_row *twdr, int family); | 218 | struct inet_timewait_death_row *twdr, int family); |
220 | 219 | ||
221 | static inline | 220 | static inline |
222 | struct net *twsk_net(const struct inet_timewait_sock *twsk) | 221 | struct net *twsk_net(const struct inet_timewait_sock *twsk) |
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h index 53f464d7cddc..f4e127af4e17 100644 --- a/include/net/inetpeer.h +++ b/include/net/inetpeer.h | |||
@@ -120,9 +120,9 @@ static inline void inetpeer_transfer_peer(unsigned long *to, unsigned long *from | |||
120 | } | 120 | } |
121 | } | 121 | } |
122 | 122 | ||
123 | extern void inet_peer_base_init(struct inet_peer_base *); | 123 | void inet_peer_base_init(struct inet_peer_base *); |
124 | 124 | ||
125 | void inet_initpeers(void) __init; | 125 | void inet_initpeers(void) __init; |
126 | 126 | ||
127 | #define INETPEER_METRICS_NEW (~(u32) 0) | 127 | #define INETPEER_METRICS_NEW (~(u32) 0) |
128 | 128 | ||
@@ -159,11 +159,11 @@ static inline struct inet_peer *inet_getpeer_v6(struct inet_peer_base *base, | |||
159 | } | 159 | } |
160 | 160 | ||
161 | /* can be called from BH context or outside */ | 161 | /* can be called from BH context or outside */ |
162 | extern void inet_putpeer(struct inet_peer *p); | 162 | void inet_putpeer(struct inet_peer *p); |
163 | extern bool inet_peer_xrlim_allow(struct inet_peer *peer, int timeout); | 163 | bool inet_peer_xrlim_allow(struct inet_peer *peer, int timeout); |
164 | 164 | ||
165 | extern void inetpeer_invalidate_tree(struct inet_peer_base *); | 165 | void inetpeer_invalidate_tree(struct inet_peer_base *); |
166 | extern void inetpeer_invalidate_family(int family); | 166 | void inetpeer_invalidate_family(int family); |
167 | 167 | ||
168 | /* | 168 | /* |
169 | * temporary check to make sure we dont access rid, ip_id_count, tcp_ts, | 169 | * temporary check to make sure we dont access rid, ip_id_count, tcp_ts, |