package dns

  1. Overview
  2. Docs

The default DNS server using the standard DNS protocol

type context = Packet.t
val query_of_context : context -> Packet.t

Projects a context into its associated query

val parse : Cstruct.t -> context option

DNS wire format parser function.

  • parameter buf

    message buffer

  • returns

    parsed packet and context

val marshal : ?alloc:(unit -> Cstruct.t) -> context -> Packet.t -> Cstruct.t option

DNS wire format marshal function.

  • parameter alloc

    allocator

  • parameter _q

    context

  • parameter response

    answer packet

  • returns

    buffer to write

OCaml

Innovation. Community. Security.