package tcpip

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Icmpv4_packet.MarshalSource

Sourcetype error = string
Sourceval into_cstruct : t -> Cstruct.t -> payload:Cstruct.t -> (unit, error) result

into_cstruct t buf ~payload generates an ICMPv4 header from t and writes it into buf at offset 0. payload is used to calculate the ICMPv4 header checksum, but is not included in the generated buffer. into_cstruct may fail if the buffer is of insufficient size.

Sourceval make_cstruct : t -> payload:Cstruct.t -> Cstruct.t

make_cstruct t ~payload allocates, fills, and returns a Cstruct.t with the header information from t. The payload is used to calculate the ICMPv4 header checksum, but is not included in the generated buffer. make_cstruct allocates 8 bytes for the ICMPv4 header.

OCaml

Innovation. Community. Security.