package tcpip

  1. Overview
  2. Docs
type error = string
val int_to_protocol : int -> protocol option
val of_cstruct : Cstruct.t -> (t * Cstruct.t, error) Stdlib.result
val header_of_cstruct : Cstruct.t -> (t * int, error) Stdlib.result

header_of_cstruct buf attempts to return t, offset where offset is the first byte of the payload in buf.

val verify_transport_checksum : proto:[ `TCP | `UDP ] -> ipv4_header:t -> transport_packet:Cstruct.t -> bool
OCaml

Innovation. Community. Security.