An opinionated Domain Name System (DNS) library
Library dns
Module Dns
type proto = [
| `Tcp
| `Udp

The type of supported protocols. Used by Packet.encode to decide on maximum buffer length, etc.

val max_rdata_length : int

Maximum size of resource data. This limitation is close to (2 ^ 16) - 1 (the limit of DNS-over-TCP and EDNS payload size, but slightly smaller, since an rdata must fit into this DNS message together with a DNS header, a question, and a TSIG signature (for e.g. zone transfer).

module Opcode : sig ... end


module Rcode : sig ... end

Response code

module Soa : sig ... end

Start of authority

module Ns : sig ... end

Name server

module Mx : sig ... end

Mail exchange

module Cname : sig ... end

Canonical name

module A : sig ... end

Adress record

module Aaaa : sig ... end

Quad A record

module Ptr : sig ... end

Domain name pointer

module Srv : sig ... end

Service record

module Dnskey : sig ... end

DNS keys

module Rrsig : sig ... end


module Ds : sig ... end


module Bit_map : Set.S with type elt = int

Bit Map encodings of integers, used by NSEC and NSEC3.

module Nsec : sig ... end


module Nsec3 : sig ... end


module Caa : sig ... end

Certificate authority authorization

module Tlsa : sig ... end

Transport layer security authentication

module Sshfp : sig ... end

Secure shell fingerprint

module Txt : sig ... end

Text records

module Tsig : sig ... end

Transaction signature

module Edns : sig ... end

Extensions to DNS

module Loc : sig ... end


module Rr_map : sig ... end

A map whose keys are record types and their values are the time-to-live and the record set. The relation between key and value type is restricted by the below defined GADT.

module Name_rr_map : sig ... end

Name resource record map

module Packet : sig ... end

The DNS packet.

module Tsig_op : sig ... end

Signature operations and their errors.