package tcpip

  1. Overview
  2. Docs
type buffer = buffer
type ethif
type ipv4addr = ipv4addr
type error = [
  1. | `Unimplemented
  2. | `Unknown of string
]
type 'a io = 'a io
type t = ipv4
val id : t -> ethif
val connect : ethif -> [ `Error of error | `Ok of t ] io
val disconnect : t -> unit io
type callback = src:ipv4addr -> dst:ipv4addr -> buffer -> unit io
val input : tcp:callback -> udp:callback -> default:(proto:int -> callback) -> t -> buffer -> unit io
val allocate_frame : proto:[< `ICMP | `TCP | `UDP ] -> dest_ip:ipv4addr -> t -> (buffer * int) io
val write : t -> buffer -> buffer -> unit io
val writev : t -> buffer -> buffer list -> unit io
val set_ipv4 : t -> ipv4addr -> unit io
val get_ipv4 : t -> ipv4addr
val set_ipv4_netmask : t -> ipv4addr -> unit io
val get_ipv4_netmask : t -> ipv4addr
val set_ipv4_gateways : t -> ipv4addr list -> unit io
val get_ipv4_gateways : t -> ipv4addr list
OCaml

Innovation. Community. Security.