package dns-stub

  1. Overview
  2. Docs

Parameters

module R : Mirage_random.S
module P : Mirage_clock.PCLOCK
module C : Mirage_clock.MCLOCK

Signature

val metrics : [ `Authoritative_answers | `Authoritative_errors | `Decoding_errors | `On_update | `Queries | `Recursive_answers | `Recursive_connections | `Recursive_queries | `Reserved_answers | `Resolver_answers | `Resolver_nodata | `Resolver_nodomain | `Resolver_notimp | `Resolver_queries | `Resolver_servfail | `Tcp_connections | `Tcp_queries | `Udp_queries ] -> unit
module IM : sig ... end
module Client : sig ... end
module Dns_flow : sig ... end
type t = {
  1. client : Client.t;
  2. reserved : Dns_server.t;
  3. mutable server : Dns_server.t;
  4. on_update : old:Dns_trie.t -> ?authenticated_key:[ `raw ] Domain_name.t -> update_source:Ipaddr.V4.t -> Dns_trie.t -> unit Lwt.t;
}
val query_server : Dns_server.t -> Dns.Packet.Question.t -> Dns.Packet.data -> (?additional:Dns.Name_rr_map.t -> [> `Answer of Dns.Packet.Answer.t | `Rcode_error of Dns.Rcode.t * Dns.Opcode.t * Dns.Packet.Answer.t option ] -> 'a) -> 'a option
val tsig_decode_sign : Dns_server.t -> Dns.proto -> Dns.Packet.t -> Cstruct.t -> ([> `Rcode_error of Dns.Rcode.t * Dns.Opcode.t * 'a option ] -> 'b) -> ([ `raw ] Domain_name.t option * (Dns.Packet.data -> Cstruct.t option), 'b) Stdlib.result
val axfr_server : Dns_server.t -> Dns.proto -> Dns.Packet.t -> Dns.Packet.Question.t -> Cstruct.t -> ([> `Rcode_error of Dns.Rcode.t * Dns.Opcode.t * 'a option ] -> Cstruct.t) -> Cstruct.t option
val update_server : t -> Dns.proto -> Ipaddr.V4.t -> Dns.Packet.t -> Dns.Packet.Question.t -> Dns.Packet.Update.t -> Cstruct.t -> ([> `Rcode_error of Dns.Rcode.t * Dns.Opcode.t * 'a option ] -> Cstruct.t) -> Cstruct.t option Lwt.t
val server : t -> Dns.proto -> Ipaddr.V4.t -> Dns.Packet.t -> Cstruct.t -> (?additional:Dns.Name_rr_map.t -> [> `Answer of Dns.Packet.Answer.t | `Rcode_error of Dns.Rcode.t * Dns.Opcode.t * Dns.Packet.Answer.t option ] -> Cstruct.t) -> Cstruct.t option Lwt.t
val resolve : t -> Dns.Packet.Question.t -> Dns.Packet.data -> ([> `Answer of Dns.Name_rr_map.t * Dns.Name_rr_map.t | `Rcode_error of Dns.Rcode.t * Dns.Opcode.t * (Dns.Name_rr_map.t * Dns.Name_rr_map.t) option ] -> 'a) -> 'a option Lwt.t
val handle : t -> Dns.proto -> Ipaddr.V4.t -> Cstruct.t -> Cstruct.t option Lwt.t
val create : ?nameserver:Ipaddr.V4.t -> ?size:int -> ?on_update: (old:Dns_trie.t -> ?authenticated_key:[ `raw ] Domain_name.t -> update_source:Ipaddr.V4.t -> Dns_trie.t -> unit Lwt.t) -> Dns_server.Primary.s -> Client.Transport.stack -> t
OCaml

Innovation. Community. Security.