package tcpip

  1. Overview
  2. Docs
include V1.ICMP with type 'a io = 'a Lwt.t with type buffer = Cstruct.t with type ipaddr = Ipaddr.V4.t
include V1.DEVICE with type 'a io = 'a Lwt.t
type 'a io = 'a Lwt.t

The type for potentially blocking I/O operation

type t

The type representing the internal state of the device

type error

The type for errors signalled by the device

type id

This type is no longer used and will be removed once other * modules stop using it in their type signatures.

val disconnect : t -> unit io

Disconnect from the device. While this might take some time to complete, it can never result in an error.

type ipaddr = Ipaddr.V4.t
type buffer = Cstruct.t
val pp_error : Format.formatter -> error -> unit

pretty-print an error.

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 io

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

OCaml

Innovation. Community. Security.