package tcpip

  1. Overview
  2. Docs
type error = Ipv4.error
val pp_error : error Fmt.t
type buffer = Cstruct.t
type ethif = Ethif.t
type ipaddr = Ipaddr.V4.t
type prefix = Ipaddr.V4.Prefix.t
type 'a io = 'a Lwt.t
type t = Ipv4.t
val disconnect : t -> unit io
type callback = src:ipaddr -> dst:ipaddr -> buffer -> unit io
val input : t -> tcp:callback -> udp:callback -> default:(proto:int -> callback) -> buffer -> unit io
val allocate_frame : t -> dst:ipaddr -> proto:[ `ICMP | `TCP | `UDP ] -> buffer * int
val write : t -> buffer -> buffer -> (unit, error) Pervasives.result io
val writev : t -> buffer -> buffer list -> (unit, error) Pervasives.result io
val checksum : buffer -> buffer list -> int
val pseudoheader : t -> dst:ipaddr -> proto:[< `TCP | `UDP ] -> int -> buffer
val src : t -> dst:ipaddr -> ipaddr
val set_ip : t -> ipaddr -> unit io
val get_ip : t -> ipaddr list
type uipaddr = Ipaddr.t
val to_uipaddr : ipaddr -> uipaddr
val of_uipaddr : uipaddr -> ipaddr option
val mtu : t -> int
OCaml

Innovation. Community. Security.