diff options
-rw-r--r-- | include/net/sock.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index f10832ca2e90..e0360f5a53e9 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -67,6 +67,7 @@ | |||
67 | #include <linux/atomic.h> | 67 | #include <linux/atomic.h> |
68 | #include <net/dst.h> | 68 | #include <net/dst.h> |
69 | #include <net/checksum.h> | 69 | #include <net/checksum.h> |
70 | #include <net/tcp_states.h> | ||
70 | #include <linux/net_tstamp.h> | 71 | #include <linux/net_tstamp.h> |
71 | 72 | ||
72 | struct cgroup; | 73 | struct cgroup; |
@@ -2218,6 +2219,14 @@ static inline struct sock *skb_steal_sock(struct sk_buff *skb) | |||
2218 | return NULL; | 2219 | return NULL; |
2219 | } | 2220 | } |
2220 | 2221 | ||
2222 | /* This helper checks if a socket is a full socket, | ||
2223 | * ie _not_ a timewait or request socket. | ||
2224 | */ | ||
2225 | static inline bool sk_fullsock(const struct sock *sk) | ||
2226 | { | ||
2227 | return (1 << sk->sk_state) & ~(TCPF_TIME_WAIT | TCPF_NEW_SYN_RECV); | ||
2228 | } | ||
2229 | |||
2221 | void sock_enable_timestamp(struct sock *sk, int flag); | 2230 | void sock_enable_timestamp(struct sock *sk, int flag); |
2222 | int sock_get_timestamp(struct sock *, struct timeval __user *); | 2231 | int sock_get_timestamp(struct sock *, struct timeval __user *); |
2223 | int sock_get_timestampns(struct sock *, struct timespec __user *); | 2232 | int sock_get_timestampns(struct sock *, struct timespec __user *); |