package tcpip

  1. Overview
  2. Docs
type error = string
val into_cstruct : t -> Cstruct.t -> (unit, error) Pervasives.result

into_cstruct t buf attempts to write an ARP header representing t.op, and the source/destination ip/mac in t into buf at offset 0. buf should be at least 24 bytes in size for the call to succeed.

val make_cstruct : t -> Cstruct.t

given a t, construct and return an ARP header representing t.op, and the source/destination ip/mac in t. make_cstruct will allocate a new 24 bytes for the ARP header it returns.

OCaml

Innovation. Community. Security.