package mirage-nat

  1. Overview
  2. Docs
type t

A TCP channel is identified by the source and destination ports.

A UDP channel is identified by the source and destination ports.

module ICMP : Mirage_nat.SUBTABLE with type t := t and type transport_channel = Cstruct.uint16

An ICMP query is identified by the ICMP ID.

val reset : t -> unit

Remove all entries from the table.

val remove_connections : t -> Ipaddr.V4.t -> Mirage_nat.ports

Remove all connections from and to the given IP address.

val is_port_free : t -> [ `Udp | `Tcp | `Icmp ] -> src:Ipaddr.V4.t -> dst:Ipaddr.V4.t -> src_port:int -> dst_port:int -> bool

is_port_free t protocol ~src ~dst ~src_port ~dst_port is true if it is not taken yet.

OCaml

Innovation. Community. Security.