package vmnet

  1. Overview
  2. No Docs
Userlevel network bridging on MacOS X

Install

Dune Dependency

Authors

Maintainers

Sources

v1.1.0.tar.gz
sha256=3a6088750846cfadd9871a5bdcba697ccd9aceb66044ee3fe599b3019d80d8c2
md5=0a254aa5df0344a1cf998a8381ded0af

Description

MacOS X 10.10 (Yosemite) introduced the somewhat undocumented vmnet framework. This exposes virtual network interfaces to userland applications. There are a number of advantages of this over previous implementations:

  • Unlike tuntaposx, this is builtin to MacOS X now and so is easier to package up and distribute for end users.
  • vmnet uses the XPC sandboxing interfaces and should make it easier to drop a hard dependency on running networking applications as root.
  • Most significantly, vmnet supports bridging network traffic to the outside world, which was previously unsupported.

These OCaml bindings are constructed against the documentation contained in the <vmnet.h> header file in Yosemite, and may not be correct due to the lack of any other example code. However, they do suffice to run MirageOS applications that can connect to the outside world. The bindings are also slightly complicated by the need to interface GCD thread pools with the OCaml runtime, so please report any instabilities that you see when using this interface as a consumer.

There are two libraries provided:

  • Vmnet is the raw OCaml binding to the vmnet framework, using OCaml preemptive threads to handle synchronisation.
  • Lwt_vmnet uses the Lwt framework to provide a monadic asynchronous I/O interface at a higher level.

Most users should use Lwt_vmnet to handle guest traffic.

Published: 20 Mar 2016

Dependencies (12)

  1. cstruct-unix
  2. cstruct >= "1.9.0"
  3. lwt >= "2.4.3" & < "4.0.0"
  4. ipaddr >= "1.4.0" & < "3.0.0"
  5. sexplib >= "113.24.00"
  6. ppx_cstruct
  7. ppx_sexp_conv
  8. ppx_deriving
  9. ppx_tools
  10. ocamlbuild build
  11. ocamlfind build
  12. ocaml

Dev Dependencies

None

Used by (1)

  1. mirage-net-macosx < "1.6.0"

Conflicts

None

OCaml

Innovation. Community. Security.