package vchan-xen
Xen Vchan implementation
Install
Dune Dependency
Authors
Maintainers
Sources
vchan-v4.0.3.tbz
sha256=881561336d1b52443512297e156586aa0ae4c8637f273b9316e873a35afabfa7
sha512=691394329b1cbd1c5c842b607fe7fd9ba5a959b501e75dfaf818d02a82d507399cba9a9e4e97c2c69ad1fec078f5f994b8dae539fef3946af6cb355b3eed5c60
Description
README
README.md
This is an implementation of the Xen "libvchan" or "vchan" communication protocol in OCaml. It allows fast inter-domain communication using shared memory.
Linux configuration
Make sure your systems are properly configured. You may need to:
sudo modprobe xen-evtchn
sudo modprobe xen-gntdev
sudo modprobe xen-gntalloc
mount -t xenfs xenfs /proc/xen
To use in Linux
To connect as a server to a client with domid 'domid' and using the string 'port' to denote the connection:
open Vchan_lwt_unix
open_server ~domid ~port ()
>>= fun (ic, oc) ->
Lwt_io.write_line oc "hello"
>>= fun () ->
Lwt_io.flush oc
>>= fun () ->
Lwt_io.close ic
>>= fun () ->
Lwt_io.close oc
To connect as a client, replace open_server
with open_client
.
To use the command-line
On both of your VMs, find their domain ids:
xenstore-read domid
On the domain with domid <server domid>
, listen for a single connection from <client domid>
on <port>
:
xencat -l <client domid> <port>
On the domain with domid <client domid>
, connect to <server domid>
:
xencat <server domid> <port>
So to transfer a file foo
from domid 1 to domid 2:
On domain 2, listen for the connection and retrieve the file:
xencat -l 1 foo > copy-of-foo
On domain 1, transmit the file:
cat foo | xencat 2 foo
Dependencies (16)
- result
- cmdliner
- sexplib
-
xenstore_transport
>= "1.0.0"
-
mirage-xen
>= "4.0.0" & < "5.0.0"
-
xenstore
>= "1.2.2"
-
mirage-flow-lwt
>= "1.0.0"
- io-page
- ppx_cstruct
- ppx_sexp_conv
- ppx_tools
-
cstruct
>= "1.9.0"
-
lwt
>= "2.5.0"
-
vchan
= version
- dune
-
ocaml
>= "4.04.0"
Dev Dependencies (1)
-
ounit
with-test
Used by (1)
-
mirage-qubes
>= "0.5" & < "0.8.0"
Conflicts
None
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page