package tcpip

  1. Overview
  2. Docs
include Mirage_protocols_lwt.ICMPV4
type 'a io = 'a Lwt.t
type t
val disconnect : t -> unit io
type ipaddr = Ipaddr.V4.t
type buffer = Cstruct.t
type error
val pp_error : error Fmt.t
val input : t -> src:ipaddr -> dst:ipaddr -> buffer -> unit io
val write : t -> dst:ipaddr -> buffer -> (unit, error) Pervasives.result io
val connect : unit -> t io
val listen : t -> ipaddr -> (buffer -> unit io) -> unit io

listen t addr fn attempts to create an unprivileged listener on IP address addr. * It will take any incoming ICMP packets and process them with the provided fn.

OCaml

Innovation. Community. Security.