package tcpip

  1. Overview
  2. Docs

Parameters

Signature

include Mirage_protocols_lwt.ICMPV4
include Mirage_device.S with type 'a io = 'a Lwt.t
type 'a io = 'a Lwt.t
type t
val disconnect : t -> unit io
type ipaddr = Ipaddr.V4.t

The type for IP addresses.

type buffer = Cstruct.t

The type for buffers.

type error

The type for ICMP errors.

val pp_error : error Fmt.t

pp_error is the pretty-printer for errors.

val input : t -> src:ipaddr -> dst:ipaddr -> buffer -> unit io

input t src dst buffer reacts to the ICMP message in buffer.

val write : t -> dst:ipaddr -> buffer -> (unit, error) Stdlib.result io

write t dst buffer sends the ICMP message in buffer to dst over IP.

val connect : I.t -> t io
OCaml

Innovation. Community. Security.