diff options
Diffstat (limited to 'include/net/inet_hashtables.h')
-rw-r--r-- | include/net/inet_hashtables.h | 72 |
1 files changed, 36 insertions, 36 deletions
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 */ |