package dns-stub

  1. Overview
  2. Docs

Parameters

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

Signature

val metrics : [ `Authoritative_answers | `Authoritative_errors | `Decoding_errors | `On_update | `Queries | `Reserved_answers | `Resolver_answers | `Resolver_nodata | `Resolver_nodomain | `Resolver_notimp | `Resolver_queries | `Resolver_servfail | `Tcp_connections | `Tcp_queries | `Udp_queries ] -> unit
module H : 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.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.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.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.t -> Cstruct.t -> Cstruct.t option Lwt.t
val create : ?cache_size:int -> ?edns:[ `Auto | `Manual of Dns.Edns.t | `None ] -> ?nameservers:string list -> ?timeout:int64 -> ?on_update: (old:Dns_trie.t -> ?authenticated_key:[ `raw ] Domain_name.t -> update_source:Ipaddr.t -> Dns_trie.t -> unit Lwt.t) -> Dns_server.Primary.s -> happy_eyeballs:H.t -> S.t -> t Lwt.t
OCaml

Innovation. Community. Security.