aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sock.h')
-rw-r--r--include/net/sock.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index a6ba1f8871fd..4cdb9b3050f4 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -376,6 +376,17 @@ struct sock {
376 void (*sk_destruct)(struct sock *sk); 376 void (*sk_destruct)(struct sock *sk);
377}; 377};
378 378
379/*
380 * SK_CAN_REUSE and SK_NO_REUSE on a socket mean that the socket is OK
381 * or not whether his port will be reused by someone else. SK_FORCE_REUSE
382 * on a socket means that the socket will reuse everybody else's port
383 * without looking at the other's sk_reuse value.
384 */
385
386#define SK_NO_REUSE 0
387#define SK_CAN_REUSE 1
388#define SK_FORCE_REUSE 2
389
379static inline int sk_peek_offset(struct sock *sk, int flags) 390static inline int sk_peek_offset(struct sock *sk, int flags)
380{ 391{
381 if ((flags & MSG_PEEK) && (sk->sk_peek_off >= 0)) 392 if ((flags & MSG_PEEK) && (sk->sk_peek_off >= 0))