Displaying 10 results from an estimated 10 matches for "have_linux_vm_sockets_h".
2019 Oct 18
0
[PATCH nbdkit] Add support for AF_VSOCK.
...ng_sockets (int *socks, size_t nr_socks)
diff --git a/server/main.c b/server/main.c
index 5623149..115fa98 100644
--- a/server/main.c
+++ b/server/main.c
@@ -45,6 +45,11 @@
#include <syslog.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/socket.h>
+
+#ifdef HAVE_LINUX_VM_SOCKETS_H
+#include <linux/vm_sockets.h>
+#endif
#include <pthread.h>
@@ -85,6 +90,7 @@ bool tls_verify_peer; /* --tls-verify-peer */
char *unixsocket; /* -U */
const char *user, *group; /* -u & -g */
bool verbose; /* -v */
+bool vsock;...
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
4
Re: [PATCH libnbd 2/2] api: Add support for AF_VSOCK.
...his is Linux-only (and for that matter, depends on kernel vsock
support), we probably need "supports_vsock" as an additional function.
> +++ 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't fail. */
> static void
> disable_nagle (int sock)
> @@ -118,6 +122,24 @@ STATE_MACHINE {
> SET_NEXT_STATE (%^CONNECT.START);
> return 0;
>...
2019 Oct 18
0
Re: [PATCH libnbd 2/2] api: Add support for AF_VSOCK.
...e can just check AF_VSOCK the
same way that libnbd does, ie with a configure test for the header and
checking if AF_VSOCK is defined.
> >+++ 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't fail. */
> > static void
> > disable_nagle (int sock)
> >@@ -118,6 +122,24 @@ STATE_MACHINE {
> > SET_NEXT_STATE (%^CONNECT...
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 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 2/2] api: Add support for AF_VSOCK.
...| 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't fail. */
static void
disable_nagle (int sock)
@@ -118,6 +122,24 @@ STATE_MACHINE {
SET_NEXT_STATE (%^CONNECT.START);
return 0;
+ CONNECT_VSOCK.START:
+#ifdef AF_VSOCK
+ struct so...
2020 Aug 15
3
[PATCH EXPERIMENTAL nbdkit 0/2] Port to Windows using mingw.
The patches following do indeed allow you to compile nbdkit.exe, but
it does not actually work yet. I'm posting this experimental series
more as a work in progress and to get feedback.
Note this does not require Windows itself to build or test. You can
cross-compile it using mingw64-* packages on Fedora or Debian, and
test it [spoiler alert: it fails] using Wine.
Rich.
2020 Aug 18
15
[PATCH nbdkit 0/9] Port to Windows.
Also available here:
https://github.com/rwmjones/nbdkit/tree/2020-windows-mingw
This is the port to Windows using native Windows APIs (not MSYS or
Cygwin).
This patch series is at the point where it basically now works. I can
run the server with the memory plugin, and access it remotely using
guestfish, creating filesystems and so on without any apparent
problems.
Nevertheless there are many
2020 Aug 20
15
[PATCH nbdkit 0/13] Port to Windows without using a separate library.
Also available here:
https://github.com/rwmjones/nbdkit/tree/2020-windows-mingw-nolib
After a lot of work I have made the port to Windows work without using
a separate library. Instead, on Windows only, we build an "import
library" (library of stubs) which resolves references to nbdkit_*
functions in the main program and fixes up the plugin, basically the
first technique outlined in