Add support for AF_VSOCK.
commit7ce9feeff4426df02d289e10179276e2cd2de13b
authorRichard W.M. Jones <rjones@redhat.com>
Fri, 18 Oct 2019 13:42:40 +0000 (18 14:42 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Fri, 18 Oct 2019 17:05:33 +0000 (18 18:05 +0100)
treefa36ff997eb43cbf27051deefa2e6f2e230bc46f
parent89ca84077e6804d4e28bdc2502d87d42602b10dc
Add support for AF_VSOCK.

On platforms which support it (only Linux currently) nbdkit can act as
a vsock server.  Guests running on the host see a raw NBD socket which
they can connect to by opening an AF_VSOCK connection.  (Although only
libnbd supports this).

The current limitations are:

 * There is no access control.  Any guest which has vsock enabled can
   open the socket.

 * nbdkit can only listen on either TCP/IP or AF_VSOCK, not both at
   the same time.  (The same currently applies to TCP/IP vs AF_UNIX so
   this is not a new restriction).

 * Lacks a test because you cannot use vsock to communicate host to
   host.

See: https://wiki.qemu.org/Features/VirtioVsock

Thanks: Stefan Hajnoczi and Eric Blake
configure.ac
docs/nbdkit-service.pod
docs/nbdkit.pod
docs/synopsis.txt
server/internal.h
server/main.c
server/options.h
server/sockets.c