package tcpip

  1. Overview
  2. Docs
type buffer = Cstruct.t
type ipv4
type ipv4addr = Ipaddr.V4.t
type ipv4input = direct_ipv4_input
type error = [
  1. | `Unknown of string
]
type 'a io = 'a Lwt.t
type t
val id : t -> ipv4
val connect : ipv4 -> [ `Error of error | `Ok of t ] io
val disconnect : t -> unit io
type callback = src:ipv4addr -> dst:ipv4addr -> src_port:int -> buffer -> unit io
val input : listeners:(dst_port:int -> callback option) -> t -> ipv4input
val write : ?source_port:int -> dest_ip:ipv4addr -> dest_port:int -> t -> buffer -> unit io
OCaml

Innovation. Community. Security.