Name: ocaml-vchan
Owner: MirageOS
Description: Pure OCaml implementation of the "vchan" shared-memory communication protocol
Created: 2013-08-23 13:40:00.0
Updated: 2017-10-27 19:50:14.0
Pushed: 2018-03-03 00:34:57.0
Homepage: null
Size: 689
Language: OCaml
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is an implementation of the Xen “libvchan” or “vchan” communication protocol in OCaml. It allows fast inter-domain communication using shared memory.
Make sure your systems are properly configured. You may need to:
modprobe xen-evtchn
modprobe xen-gntdev
modprobe xen-gntalloc
t -t xenfs xenfs /proc/xen
To connect as a server to a client with domid 'domid' and using the string 'port' to denote the connection:
Vchan_lwt_unix
_server ~domid ~port ()
fun (ic, oc) ->
io.write_line oc "hello"
fun () ->
io.flush oc
fun () ->
io.close ic
fun () ->
io.close oc
To connect as a client, replace `open_server
with ``
open_client```.
On both of your VMs, find their domain ids:
tore-read domid
On the domain with domid `<server domid>
`, listen for a single connection from
xencat -l
he domain with domid ```<client domid>```, connect to ```<server domid>```:
xencat
o transfer a file ```foo``` from domid 1 to domid 2:
omain 2, listen for the connection and retrieve the file:
xencat -l 1 foo > copy-of-foo
omain 1, transmit the file:
cat foo | xencat 2 foo