Displaying 3 results from an estimated 3 matches for "libnbd_internal_supports_vsock".
2019 Oct 18
4
Re: [PATCH libnbd 2/2] api: Add support for AF_VSOCK.
...enarios (mismatch in kernel vs. headers compiled against,
for instance) where compilation says AF_VSOCK exists but where all
attempts at vsock fail? If so, is there anything that we should check
dynamically, rather than just compile-time presence of AF_VSOCK? But if
nothing else, having:
int
libnbd_internal_supports_vsock(struct nbd_handle*h)
{
#ifdef AF_VSOCK
return 1;
#else
return 0;
}
is worth having.
Otherwise, the idea is pretty cool!
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
2019 Oct 18
0
Re: [PATCH libnbd 2/2] api: Add support for AF_VSOCK.
...tent socket and determine if it returns ENODEV or ECONNREFUSED
(and if it returns something else - erm?!) Note that the socket(2)
syscall doesn't fail because creating a server socket is perfectly
valid whether in a host or guest context.
Rich.
> But if nothing else, having:
> int
> libnbd_internal_supports_vsock(struct nbd_handle*h)
> {
> #ifdef AF_VSOCK
> return 1;
> #else
> return 0;
> }
>
> is worth having.
>
> Otherwise, the idea is pretty cool!
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc. +1-919-301-3226
> Virtualizatio...
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