qubes-mirage-firewall/my_nat.mli

19 lines
543 B
OCaml
Raw Normal View History

2017-03-02 14:52:55 +00:00
(* Copyright (C) 2015, Thomas Leonard <thomas.leonard@unikernel.com>
See the README file for details. *)
(* Abstract over NAT interface (todo: remove this) *)
type t
type action = [
2017-03-10 16:09:36 +00:00
| `NAT
| `Redirect of Mirage_nat.endpoint
2017-03-02 14:52:55 +00:00
]
val create : max_entries:int -> t Lwt.t
2017-03-02 14:52:55 +00:00
val reset : t -> unit Lwt.t
val remove_connections : t -> Ipaddr.V4.t -> unit
2017-03-05 16:31:04 +00:00
val translate : t -> Nat_packet.t -> Nat_packet.t option Lwt.t
val add_nat_rule_and_translate : t ->
xl_host:Ipaddr.V4.t -> action -> Nat_packet.t -> (Nat_packet.t, string) result Lwt.t