package tcpip

  1. Overview
  2. Docs
type buffer = Cstruct.t
type ethif = Ethif.t
type ipaddr = Ipaddr.V4.t
type prefix = Ipaddr.V4.t
type error = [
  1. | `Unimplemented
  2. | `Unknown of string
]
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 io
val writev : t -> buffer -> buffer list -> unit io
val checksum : buffer -> buffer list -> int
val get_source : t -> dst:ipaddr -> ipaddr
val set_ip : t -> ipaddr -> unit io
val get_ip : t -> ipaddr list
val set_ip_netmask : t -> prefix -> unit io
val get_ip_netmasks : t -> prefix list
val set_ip_gateways : t -> ipaddr list -> unit io
val get_ip_gateways : t -> ipaddr list
type uipaddr = Ipaddr.t
val to_uipaddr : ipaddr -> uipaddr
val of_uipaddr : uipaddr -> ipaddr option
OCaml

Innovation. Community. Security.