summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorArseny Krasnov <arseny.krasnov@kaspersky.com>2021-06-11 14:10:34 +0300
committerDavid S. Miller <davem@davemloft.net>2021-06-11 13:32:46 -0700
commit9942c192b256bc11cc903f89f4057bc97434dee9 (patch)
treebaa6aba80f9d5dc1ef2bb77c6d33d77d8fdda483 /include
parent19c1b90e1979c3974cd6a3ec0cbb886a84278d84 (diff)
af_vsock: implement SEQPACKET receive loop
Add receive loop for SEQPACKET. It looks like receive loop for STREAM, but there are differences: 1) It doesn't call notify callbacks. 2) It doesn't care about 'SO_SNDLOWAT' and 'SO_RCVLOWAT' values, because there is no sense for these values in SEQPACKET case. 3) It waits until whole record is received. 4) It processes and sets 'MSG_TRUNC' flag. So to avoid extra conditions for two types of socket inside one loop, two independent functions were created. Signed-off-by: Arseny Krasnov <arseny.krasnov@kaspersky.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/af_vsock.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/af_vsock.h b/include/net/af_vsock.h
index b1c717286993..4d7cf6b2aca2 100644
--- a/include/net/af_vsock.h
+++ b/include/net/af_vsock.h
@@ -135,6 +135,10 @@ struct vsock_transport {
bool (*stream_is_active)(struct vsock_sock *);
bool (*stream_allow)(u32 cid, u32 port);
+ /* SEQ_PACKET. */
+ ssize_t (*seqpacket_dequeue)(struct vsock_sock *vsk, struct msghdr *msg,
+ int flags);
+
/* Notification. */
int (*notify_poll_in)(struct vsock_sock *, size_t, bool *);
int (*notify_poll_out)(struct vsock_sock *, size_t, bool *);