forked from mirage/qubes-mirage-firewall
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.ml
35 lines (30 loc) · 982 Bytes
/
config.ml
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
(* Copyright (C) 2017, Thomas Leonard <thomas.leonard@unikernel.com>
See the README file for details. *)
(** Configuration for the "mirage" tool. *)
open Mirage
let table_size =
let open Functoria_key in
let info = Arg.info
~doc:"The number of NAT entries to allocate."
~docv:"ENTRIES" ["nat-table-size"]
in
let key = Arg.opt ~stage:`Both Arg.int 5_000 info in
create "nat_table_size" key
let main =
foreign
~keys:[Functoria_key.abstract table_size]
~packages:[
package "vchan";
package "cstruct";
package "tcpip" ~sublibs:["stack-direct"; "xen"; "arpv4"] ~min:"3.1.0";
package "shared-memory-ring" ~min:"3.0.0";
package "netchannel" ~min:"1.8.0";
package "mirage-net-xen" ~min:"1.7.1";
package "mirage-qubes";
package "mirage-nat";
package "mirage-logs";
]
"Unikernel.Main" (mclock @-> job)
let () =
register "qubes-firewall" [main $ default_monotonic_clock]
~argv:no_argv