package mirage-protocols

  1. Overview
  2. Docs

Module type Mirage_protocols.ICMPSource

ICMP module

include Mirage_device.S
Sourcetype +'a io

The type for potentially blocking I/O operation

Sourcetype t

The type representing the internal state of the device

Sourceval disconnect : t -> unit io

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

Sourcetype ipaddr

The type for IP addresses.

Sourcetype buffer

The type for buffers.

Sourcetype error

The type for ICMP errors.

Sourceval pp_error : error Fmt.t

pp_error is the pretty-printer for errors.

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

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

Sourceval write : t -> dst:ipaddr -> ?ttl:int -> buffer -> (unit, error) result io

write t dst ~ttl buffer sends the ICMP message in buffer to dst over IP. Passes the time-to-live (ttl) to the IP stack if given.