search for: bind_vsock

Displaying 5 results from an estimated 5 matches for "bind_vsock".

2019 Oct 18
2
[PATCH nbdkit] 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 Nov 04
3
[PATCH nbdkit 0/3] server: Fix crash on close.
This fixes the long-standing crash on close when nbdkit exits. I did try first to fix threads so we're using a proper thread pool, but that's difficult to implement. So this does the minimal change needed to fix the crash instead. There are still two segfaults that happen during running the test suite. One is deliberately caused (tests/test-captive.sh). The other appears to be an
2019 Oct 18
0
[PATCH nbdkit] Add support for AF_VSOCK.
...r/internal.h b/server/internal.h index 167da59..5e11e1a 100644 --- a/server/internal.h +++ b/server/internal.h @@ -454,6 +454,8 @@ extern int *bind_unix_socket (size_t *) __attribute__((__nonnull__ (1))); extern int *bind_tcpip_socket (size_t *) __attribute__((__nonnull__ (1))); +extern int *bind_vsock (size_t *) + __attribute__((__nonnull__ (1))); extern void accept_incoming_connections (int *socks, size_t nr_socks) __attribute__((__nonnull__ (1))); extern void free_listening_sockets (int *socks, size_t nr_socks) diff --git a/server/main.c b/server/main.c index 5623149..115fa98 100644 ---...
2019 Oct 18
1
[PATCH nbdkit v2] Add support for AF_VSOCK.
v1 was discussed here: https://www.redhat.com/archives/libguestfs/2019-October/thread.html#00100 v2: - Bind to VMADDR_CID_ANY (instead of HOST) and update the documentation accordingly. - Don't bother with SOCK_CLOEXEC fallback path that can never be used. Rich.
2019 Oct 18
2
Re: [PATCH nbdkit] Add support for AF_VSOCK.
...t + listen_stdin + run + vsock > 1) is any easier to write, but not quite, since we DO allow port and vsock. So keeping the list of pairs seems to be the best we can do. > @@ -247,6 +252,74 @@ bind_tcpip_socket (size_t *nr_socks) > return socks; > } > > +int * > +bind_vsock (size_t *nr_socks) > +{ > +#ifdef AF_VSOCK > + uint32_t vsock_port; > + int sock; > + int *ret; > + struct sockaddr_vm addr; > + > + if (port == NULL) > + vsock_port = 10809; > + else { > + /* --port parameter must be numeric for vsock, unless > +...