search for: d62b0f5

Displaying 3 results from an estimated 3 matches for "d62b0f5".

2019 Oct 18
5
[PATCH libnbd 0/2] api: Add support for AF_VSOCK.
This is a series of patches to libnbd and nbdkit adding AF_VSOCK support. On the host side it allows you to start an nbdkit instance which listens on a virtio-vsock socket: $ ./nbdkit -fv --vsock memory 1G ... nbdkit: debug: bound to vsock 2:10809 On the guest side you can then use libnbd to connect to the server: $ ./run nbdsh -c 'h.connect_vsock(2, 10809)' -c
2019 Oct 18
0
[PATCH libnbd 1/2] states: Don't assume socket address family is always AF_UNIX.
Get the address family from h->connaddr instead. This should make no difference to existing code. --- generator/states-connect.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generator/states-connect.c b/generator/states-connect.c index 04e894c..d62b0f5 100644 --- a/generator/states-connect.c +++ b/generator/states-connect.c @@ -51,7 +51,8 @@ STATE_MACHINE { int fd; assert (!h->sock); - fd = socket (AF_UNIX, SOCK_STREAM|SOCK_NONBLOCK|SOCK_CLOEXEC, 0); + fd = socket (h->connaddr.ss_family, + SOCK_STREAM|SOCK_NONBLOCK|S...
2019 Oct 18
0
[PATCH libnbd 2/2] api: Add support for AF_VSOCK.
...kAddr - | CmdConnectUnix | CmdConnectTCP + | CmdConnectUnix | CmdConnectVSock | CmdConnectTCP | CmdConnectCommand | CmdConnectSA | CmdConnectSocket | CmdIssue -> () ) events; diff --git a/generator/states-connect.c b/generator/states-connect.c index d62b0f5..e4658a7 100644 --- a/generator/states-connect.c +++ b/generator/states-connect.c @@ -37,6 +37,10 @@ #include <sys/socket.h> #include <sys/un.h> +#ifdef HAVE_LINUX_VM_SOCKETS_H +#include <linux/vm_sockets.h> +#endif + /* Disable Nagle's algorithm on the socket, but don...