package tcpip

  1. Overview
  2. Docs
type buffer = Cstruct.t
type netif = Netif.t
type ipv4addr = Ipaddr.V4.t
type error = [
  1. | `Disconnected
  2. | `Unimplemented
  3. | `Unknown of string
]
type macaddr = Macaddr.t
type 'a io = 'a Lwt.t
type t
val id : t -> netif
val connect : netif -> [ `Error of error | `Ok of t ] io
val disconnect : t -> unit io
val write : t -> buffer -> unit io
val writev : t -> buffer list -> unit io
val mac : t -> macaddr
val input : ipv4:(buffer -> unit io) -> ipv6:(buffer -> unit io) -> t -> buffer -> unit io
val query_arpv4 : t -> ipv4addr -> macaddr io
val add_ipv4 : t -> ipv4addr -> unit io