package dns-server

  1. Overview
  2. Docs

DNS Server implementation

module Authentication : sig ... end

Authentication, stored in a Dns_trie with privileges to operations embedded in the name.

type t = private {
  1. data : Dns_trie.t;
  2. auth : Authentication.t;
  3. rng : int -> Cstruct.t;
  4. tsig_verify : Dns.Tsig_op.verify;
  5. tsig_sign : Dns.Tsig_op.sign;
}

The state of a DNS server.

val text : 'a Domain_name.t -> Dns_trie.t -> (string, [> `Msg of string ]) result

text name trie results in a string representation (zonefile) of the trie.

handle_question t question handles the DNS query question by looking it up in the trie of t.

val handle_tsig : ?mac:Cstruct.t -> t -> Ptime.t -> Dns.Packet.t -> Cstruct.t -> (([ `raw ] Domain_name.t * Dns.Tsig.t * Cstruct.t * Dns.Dnskey.t) option, Dns.Tsig_op.e * Cstruct.t option) result

handle_tsig ~mac t now packet buffer verifies the tsig signature if present, returning the keyname, tsig, mac, and used key.

module Primary : sig ... end
module Secondary : sig ... end
OCaml

Innovation. Community. Security.