package tcpip

  1. Overview
  2. Docs

Parameters

module N : V1_LWT.ETHIF

Signature

type buffer = Cstruct.t
type ethif = N.t
type ipv4addr = Ipaddr.V4.t
type error = [
  1. | `Unimplemented
  2. | `Unknown of string
]
type 'a io = 'a Lwt.t
type t
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.