aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/inet6_connection_sock.h32
-rw-r--r--include/net/inet6_hashtables.h38
-rw-r--r--include/net/inet_common.h48
-rw-r--r--include/net/inet_connection_sock.h79
-rw-r--r--include/net/inet_hashtables.h72
-rw-r--r--include/net/inet_sock.h4
-rw-r--r--include/net/inet_timewait_sock.h37
-rw-r--r--include/net/inetpeer.h12
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;
22struct sock; 22struct sock;
23struct sockaddr; 23struct sockaddr;
24 24
25extern int inet6_csk_bind_conflict(const struct sock *sk, 25int 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
28extern struct dst_entry* inet6_csk_route_req(struct sock *sk, 28struct 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
32extern struct request_sock *inet6_csk_search_req(const struct sock *sk, 31struct 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
39extern void inet6_csk_reqsk_queue_hash_add(struct sock *sk, 38void 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
43extern void inet6_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr); 41void inet6_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr);
44 42
45extern int inet6_csk_xmit(struct sk_buff *skb, struct flowi *fl); 43int inet6_csk_xmit(struct sk_buff *skb, struct flowi *fl);
46 44
47extern struct dst_entry *inet6_csk_update_pmtu(struct sock *sk, u32 mtu); 45struct 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
56extern int __inet6_hash(struct sock *sk, struct inet_timewait_sock *twp); 56int __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 */
64extern struct sock *__inet6_lookup_established(struct net *net, 64struct 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 71struct sock *inet6_lookup_listener(struct net *net,
72extern 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
80static inline struct sock *__inet6_lookup(struct net *net, 78static 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
113extern struct sock *inet6_lookup(struct net *net, struct inet_hashinfo *hashinfo, 111struct 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;
13struct sockaddr; 13struct sockaddr;
14struct socket; 14struct socket;
15 15
16extern int inet_release(struct socket *sock); 16int inet_release(struct socket *sock);
17extern int inet_stream_connect(struct socket *sock, struct sockaddr *uaddr, 17int inet_stream_connect(struct socket *sock, struct sockaddr *uaddr,
18 int addr_len, int flags); 18 int addr_len, int flags);
19extern int __inet_stream_connect(struct socket *sock, struct sockaddr *uaddr, 19int __inet_stream_connect(struct socket *sock, struct sockaddr *uaddr,
20 int addr_len, int flags); 20 int addr_len, int flags);
21extern int inet_dgram_connect(struct socket *sock, struct sockaddr *uaddr, 21int inet_dgram_connect(struct socket *sock, struct sockaddr *uaddr,
22 int addr_len, int flags); 22 int addr_len, int flags);
23extern int inet_accept(struct socket *sock, struct socket *newsock, int flags); 23int inet_accept(struct socket *sock, struct socket *newsock, int flags);
24extern int inet_sendmsg(struct kiocb *iocb, struct socket *sock, 24int inet_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
25 struct msghdr *msg, size_t size); 25 size_t size);
26extern ssize_t inet_sendpage(struct socket *sock, struct page *page, int offset, 26ssize_t inet_sendpage(struct socket *sock, struct page *page, int offset,
27 size_t size, int flags); 27 size_t size, int flags);
28extern int inet_recvmsg(struct kiocb *iocb, struct socket *sock, 28int 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);
30extern int inet_shutdown(struct socket *sock, int how); 30int inet_shutdown(struct socket *sock, int how);
31extern int inet_listen(struct socket *sock, int backlog); 31int inet_listen(struct socket *sock, int backlog);
32extern void inet_sock_destruct(struct sock *sk); 32void inet_sock_destruct(struct sock *sk);
33extern int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len); 33int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len);
34extern int inet_getname(struct socket *sock, struct sockaddr *uaddr, 34int inet_getname(struct socket *sock, struct sockaddr *uaddr, int *uaddr_len,
35 int *uaddr_len, int peer); 35 int peer);
36extern int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); 36int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
37extern int inet_ctl_sock_create(struct sock **sk, unsigned short family, 37int 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
41static inline void inet_ctl_sock_destroy(struct sock *sk) 41static 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
149extern struct sock *inet_csk_clone_lock(const struct sock *sk, 149struct 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
153enum inet_csk_ack_state_t { 153enum 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
160extern void inet_csk_init_xmit_timers(struct sock *sk, 160void 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));
164extern void inet_csk_clear_xmit_timers(struct sock *sk); 164void inet_csk_clear_xmit_timers(struct sock *sk);
165 165
166static inline void inet_csk_schedule_ack(struct sock *sk) 166static 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
181extern void inet_csk_delete_keepalive_timer(struct sock *sk); 181void inet_csk_delete_keepalive_timer(struct sock *sk);
182extern void inet_csk_reset_keepalive_timer(struct sock *sk, unsigned long timeout); 182void inet_csk_reset_keepalive_timer(struct sock *sk, unsigned long timeout);
183 183
184#ifdef INET_CSK_DEBUG 184#ifdef INET_CSK_DEBUG
185extern const char inet_csk_timer_bug_msg[]; 185extern 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
244extern struct sock *inet_csk_accept(struct sock *sk, int flags, int *err); 244struct sock *inet_csk_accept(struct sock *sk, int flags, int *err);
245 245
246extern struct request_sock *inet_csk_search_req(const struct sock *sk, 246struct 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);
251extern int inet_csk_bind_conflict(const struct sock *sk, 251int 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);
253extern int inet_csk_get_port(struct sock *sk, unsigned short snum); 253int inet_csk_get_port(struct sock *sk, unsigned short snum);
254 254
255extern struct dst_entry* inet_csk_route_req(struct sock *sk, 255struct dst_entry *inet_csk_route_req(struct sock *sk, struct flowi4 *fl4,
256 struct flowi4 *fl4, 256 const struct request_sock *req);
257struct 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);
258extern struct dst_entry* inet_csk_route_child_sock(struct sock *sk,
259 struct sock *newsk,
260 const struct request_sock *req);
261 259
262static inline void inet_csk_reqsk_queue_add(struct sock *sk, 260static 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
269extern void inet_csk_reqsk_queue_hash_add(struct sock *sk, 267void 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
273static inline void inet_csk_reqsk_queue_removed(struct sock *sk, 270static 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
318extern void inet_csk_reqsk_queue_prune(struct sock *parent, 315void 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
323extern void inet_csk_destroy_sock(struct sock *sk); 320void inet_csk_destroy_sock(struct sock *sk);
324extern void inet_csk_prepare_forced_close(struct sock *sk); 321void 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
335extern int inet_csk_listen_start(struct sock *sk, const int nr_table_entries); 332int inet_csk_listen_start(struct sock *sk, const int nr_table_entries);
336extern void inet_csk_listen_stop(struct sock *sk); 333void inet_csk_listen_stop(struct sock *sk);
337 334
338extern void inet_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr); 335void inet_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr);
339 336
340extern int inet_csk_compat_getsockopt(struct sock *sk, int level, int optname, 337int 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);
342extern int inet_csk_compat_setsockopt(struct sock *sk, int level, int optname, 339int 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
345extern struct dst_entry *inet_csk_update_pmtu(struct sock *sk, u32 mtu); 342struct 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
221extern struct inet_bind_bucket * 221struct inet_bind_bucket *
222 inet_bind_bucket_create(struct kmem_cache *cachep, 222inet_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); 225void inet_bind_bucket_destroy(struct kmem_cache *cachep,
226extern void inet_bind_bucket_destroy(struct kmem_cache *cachep, 226 struct inet_bind_bucket *tb);
227 struct inet_bind_bucket *tb); 227
228 228static inline int inet_bhashfn(struct net *net, const __u16 lport,
229static 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
235extern void inet_bind_hash(struct sock *sk, struct inet_bind_bucket *tb, 234void 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. */
239static inline int inet_lhashfn(struct net *net, const unsigned short num) 238static 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. */
250extern int __inet_inherit_port(struct sock *sk, struct sock *child); 249int __inet_inherit_port(struct sock *sk, struct sock *child);
251 250
252extern void inet_put_port(struct sock *sk); 251void inet_put_port(struct sock *sk);
253 252
254void inet_hashinfo_init(struct inet_hashinfo *h); 253void inet_hashinfo_init(struct inet_hashinfo *h);
255 254
256extern int __inet_hash_nolisten(struct sock *sk, struct inet_timewait_sock *tw); 255int __inet_hash_nolisten(struct sock *sk, struct inet_timewait_sock *tw);
257extern void inet_hash(struct sock *sk); 256void inet_hash(struct sock *sk);
258extern void inet_unhash(struct sock *sk); 257void inet_unhash(struct sock *sk);
259 258
260extern struct sock *__inet_lookup_listener(struct net *net, 259struct 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
268static inline struct sock *inet_lookup_listener(struct net *net, 266static 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 */
342extern struct sock * __inet_lookup_established(struct net *net, 340struct 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
347static inline struct sock * 346static 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
402extern int __inet_hash_connect(struct inet_timewait_death_row *death_row, 401int __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
409extern int inet_hash_connect(struct inet_timewait_death_row *death_row, 409int 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
202extern int inet_sk_rebuild_header(struct sock *sk); 202int inet_sk_rebuild_header(struct sock *sk);
203 203
204extern u32 inet_ehash_secret; 204extern u32 inet_ehash_secret;
205extern u32 ipv6_hash_secret; 205extern u32 ipv6_hash_secret;
206extern void build_ehash_secret(void); 206void build_ehash_secret(void);
207 207
208static inline unsigned int inet_ehashfn(struct net *net, 208static 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
86extern void inet_twdr_hangman(unsigned long data); 86void inet_twdr_hangman(unsigned long data);
87extern void inet_twdr_twkill_work(struct work_struct *work); 87void inet_twdr_twkill_work(struct work_struct *work);
88extern void inet_twdr_twcal_tick(unsigned long data); 88void inet_twdr_twcal_tick(unsigned long data);
89 89
90struct inet_bind_bucket; 90struct 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
198extern void inet_twsk_put(struct inet_timewait_sock *tw); 198void inet_twsk_put(struct inet_timewait_sock *tw);
199 199
200extern int inet_twsk_unhash(struct inet_timewait_sock *tw); 200int inet_twsk_unhash(struct inet_timewait_sock *tw);
201 201
202extern int inet_twsk_bind_unhash(struct inet_timewait_sock *tw, 202int inet_twsk_bind_unhash(struct inet_timewait_sock *tw,
203 struct inet_hashinfo *hashinfo); 203 struct inet_hashinfo *hashinfo);
204 204
205extern struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk, 205struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk,
206 const int state); 206 const int state);
207 207
208extern void __inet_twsk_hashdance(struct inet_timewait_sock *tw, 208void __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
212extern void inet_twsk_schedule(struct inet_timewait_sock *tw, 211void 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);
215extern void inet_twsk_deschedule(struct inet_timewait_sock *tw, 214void inet_twsk_deschedule(struct inet_timewait_sock *tw,
216 struct inet_timewait_death_row *twdr); 215 struct inet_timewait_death_row *twdr);
217 216
218extern void inet_twsk_purge(struct inet_hashinfo *hashinfo, 217void 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
221static inline 220static inline
222struct net *twsk_net(const struct inet_timewait_sock *twsk) 221struct 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
123extern void inet_peer_base_init(struct inet_peer_base *); 123void inet_peer_base_init(struct inet_peer_base *);
124 124
125void inet_initpeers(void) __init; 125void 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 */
162extern void inet_putpeer(struct inet_peer *p); 162void inet_putpeer(struct inet_peer *p);
163extern bool inet_peer_xrlim_allow(struct inet_peer *peer, int timeout); 163bool inet_peer_xrlim_allow(struct inet_peer *peer, int timeout);
164 164
165extern void inetpeer_invalidate_tree(struct inet_peer_base *); 165void inetpeer_invalidate_tree(struct inet_peer_base *);
166extern void inetpeer_invalidate_family(int family); 166void 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,