-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
opam
66 lines (61 loc) · 2.64 KB
/
opam
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
opam-version: "2.0"
maintainer: "Anil Madhavapeddy <anil@recoil.org>"
authors: "Anil Madhavapeddy <anil@recoil.org>"
homepage: "https://github.com/mirage/ocaml-vmnet"
bug-reports: "https://github.com/mirage/ocaml-vmnet/issues"
dev-repo: "git+https://github.com/mirage/ocaml-vmnet.git"
license: "ISC"
build: [
["./configure" "--prefix=%{prefix}%"]
[make]
]
install: [make "install"]
remove: ["ocamlfind" "remove" "vmnet"]
depends: [
"ocaml"
"ocamlfind" {build}
"camlp4" {build}
"type_conv" {build}
"sexplib" {< "113.24.00"}
"ipaddr" {>= "2.5.0" & < "3.0.0"}
"lwt" {>= "2.4.3" & < "4.0.0"}
"cstruct" {>= "1.4.0" & <= "1.9.0"}
"ocamlbuild" {build}
]
available: os = "macos"
post-messages: [
"This package requires the vmnet.framework plus development headers which are present in Yosemite (10.10.*) and later." {failure}
]
synopsis: "Userlevel network bridging on MacOS X"
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](http://tuntaposx.sourceforge.net/), 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](http://openmirage.org) applications that can connect to the
outside world. The bindings are also slightly complicated by the need
to interface [GCD](http://en.wikipedia.org/wiki/Grand_Central_Dispatch)
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](http://ocsigen.org/lwt) framework to
provide a monadic asynchronous I/O interface at a higher level.
Most users should use `Lwt_vmnet` to handle guest traffic."""
flags: light-uninstall
url {
src: "https://github.com/mirage/ocaml-vmnet/archive/v1.0.0.tar.gz"
checksum: [
"sha256=8f99b5b4f1d1f7712d2306e5fc929daf90cf3708071ac41fb9c0b8156c92db71"
"md5=8107ba7f2fe4f5da17908da07d22c947"
]
}