aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/net/af_vsock.h
diff options
context:
space:
mode:
authorStefano Garzarella <sgarzare@redhat.com>2019-11-14 10:57:43 +0100
committerDavid S. Miller <davem@davemloft.net>2019-11-14 18:12:18 -0800
commitb9ca2f5ff7784d46285a8f1b14419ac4645096f7 (patch)
tree5ae7526f853fe980bfd231737cc452527917b4d5 /include/net/af_vsock.h
parentvsock: handle buffer_size sockopts in the core (diff)
downloadwireguard-linux-b9ca2f5ff7784d46285a8f1b14419ac4645096f7.tar.xz
wireguard-linux-b9ca2f5ff7784d46285a8f1b14419ac4645096f7.zip
vsock: add vsock_create_connected() called by transports
All transports call __vsock_create() with the same parameters, most of them depending on the parent socket. In order to simplify the VSOCK core APIs exposed to the transports, this patch adds the vsock_create_connected() callable from transports to create a new socket when a connection request is received. We also unexported the __vsock_create(). Suggested-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Jorgen Hansen <jhansen@vmware.com> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/af_vsock.h')
-rw-r--r--include/net/af_vsock.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/include/net/af_vsock.h b/include/net/af_vsock.h
index 4b5d16840fd4..fa1570dc9f5c 100644
--- a/include/net/af_vsock.h
+++ b/include/net/af_vsock.h
@@ -76,10 +76,7 @@ struct vsock_sock {
s64 vsock_stream_has_data(struct vsock_sock *vsk);
s64 vsock_stream_has_space(struct vsock_sock *vsk);
-struct sock *__vsock_create(struct net *net,
- struct socket *sock,
- struct sock *parent,
- gfp_t priority, unsigned short type, int kern);
+struct sock *vsock_create_connected(struct sock *parent);
/**** TRANSPORT ****/