qubes-mirage-firewall/my_nat.mli

18 lines
512 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 = [
| `Rewrite
| `Redirect of Ipaddr.t * int
]
val create : (module Mirage_nat.S with type t = 'a) -> 'a -> t
2017-03-02 14:52:55 +00:00
val reset : t -> unit Lwt.t
2017-03-05 16:31:04 +00:00
val translate : t -> Nat_packet.t -> Nat_packet.t option Lwt.t
2017-03-02 14:52:55 +00:00
val add_nat_rule_and_translate : t -> xl_host:Ipaddr.t ->
2017-03-05 16:31:04 +00:00
action -> Nat_packet.t -> (Nat_packet.t, string) result Lwt.t