aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/sock.h9
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
72struct cgroup; 73struct 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 */
2225static inline bool sk_fullsock(const struct sock *sk)
2226{
2227 return (1 << sk->sk_state) & ~(TCPF_TIME_WAIT | TCPF_NEW_SYN_RECV);
2228}
2229
2221void sock_enable_timestamp(struct sock *sk, int flag); 2230void sock_enable_timestamp(struct sock *sk, int flag);
2222int sock_get_timestamp(struct sock *, struct timeval __user *); 2231int sock_get_timestamp(struct sock *, struct timeval __user *);
2223int sock_get_timestampns(struct sock *, struct timespec __user *); 2232int sock_get_timestampns(struct sock *, struct timespec __user *);