summaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
authorTom Herbert <tom@herbertland.com>2016-08-28 23:43:18 +0200
committerDavid S. Miller <davem@davemloft.net>2016-08-29 05:32:41 +0200
commit3203558589a597e0a10a66b258fbc5a4a6659ed0 (patch)
tree6de7c2a6beaa18df4f40bb081c7bffc51291ee4f /net/ipv4/tcp.c
parentnet: Add read_sock proto_op (diff)
downloadlinux-3203558589a597e0a10a66b258fbc5a4a6659ed0.tar.xz
linux-3203558589a597e0a10a66b258fbc5a4a6659ed0.zip
tcp: Set read_sock and peek_len proto_ops
In inet_stream_ops we set read_sock to tcp_read_sock and peek_len to tcp_peek_len (which is just a stub function that calls tcp_inq). Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index f1a9a0a8a1f3..60a438864f32 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1570,6 +1570,12 @@ int tcp_read_sock(struct sock *sk, read_descriptor_t *desc,
}
EXPORT_SYMBOL(tcp_read_sock);
+int tcp_peek_len(struct socket *sock)
+{
+ return tcp_inq(sock->sk);
+}
+EXPORT_SYMBOL(tcp_peek_len);
+
/*
* This routine copies from a sock struct into the user buffer.
*