package dns

  1. Overview
  2. Docs

Buffer handling for DNS packets

A t is an externally managed Bigarray

val create : ?alloc:(unit -> t) -> int -> t

create ?alloc b will allocate a buffer of b bytes, where the maximum size is 4096 bytes. If alloc is supplied then it will be used to allocate the memory page instead of the default malloc-based Bigarray create function.

val length : t -> int
val of_cstruct : Cstruct.t -> t
val shift : t -> int -> t
val sub : t -> int -> int -> t
OCaml

Innovation. Community. Security.