mirror of
https://github.com/mirage/qubes-mirage-firewall.git
synced 2024-10-01 01:05:39 -04:00
34 lines
893 B
OCaml
34 lines
893 B
OCaml
(* 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"] ~min:"3.1.0";
|
|
package "mirage-net-xen";
|
|
package "mirage-qubes";
|
|
package "mirage-nat" ~sublibs:["hashtable"];
|
|
package "mirage-logs";
|
|
]
|
|
"Unikernel.Main" (mclock @-> job)
|
|
|
|
let () =
|
|
register "qubes-firewall" [main $ default_monotonic_clock]
|
|
~argv:no_argv
|