qubes-mirage-firewall/config.ml

42 lines
1.2 KiB
OCaml
Raw Normal View History

2017-03-18 10:20:26 +00:00
(* Copyright (C) 2017, Thomas Leonard <thomas.leonard@unikernel.com>
2015-12-30 09:52:24 +00:00
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
2015-12-30 09:52:24 +00:00
let main =
foreign
~keys:[Functoria_key.abstract table_size]
2017-03-02 14:52:55 +00:00
~packages:[
package "vchan" ~min:"4.0.2";
2017-03-02 14:52:55 +00:00
package "cstruct";
package "astring";
package "tcpip" ~min:"3.7.0";
package "arp";
package "arp-mirage";
package "ethernet";
package "mirage-protocols";
2017-11-14 12:35:33 +00:00
package "shared-memory-ring" ~min:"3.0.0";
package "netchannel" ~min:"1.11.0" ~pin:"git+https://github.com/mirage/mirage-net-xen.git";
package "mirage-net-xen";
package "ipaddr" ~min:"3.0.0";
2017-03-02 14:52:55 +00:00
package "mirage-qubes";
package "mirage-nat" ~min:"1.2.0";
2017-03-02 14:52:55 +00:00
package "mirage-logs";
]
"Unikernel.Main" (mclock @-> job)
2015-12-30 09:52:24 +00:00
let () =
2017-03-02 14:52:55 +00:00
register "qubes-firewall" [main $ default_monotonic_clock]
~argv:no_argv