package dns-resolver

  1. Overview
  2. Docs
DNS resolver business logic

Install

dune-project
 Dependency

Authors

Maintainers

Sources

dns-10.2.5.tbz
sha256=23af091a6e4c13322b7f9094577e6d72dfcd5e23c4ec00fa3520edb4ff9f5fef
sha512=36b2e4eef2fd9f27bdafba10a86b078cb37e4cd461b363a57b71ca9bd7493ec2388cd9e44c374f1c2a65b73e0dd16c959aed7bd0f91151b3027737b44d4c9332

doc/dns-resolver.mirage/Dns_resolver_mirage/Make/index.html

Module Dns_resolver_mirage.MakeSource

Parameters

Signature

Sourcetype t
Sourceval resolver : S.t -> ?root:bool -> ?timer:int -> ?udp:bool -> ?tcp:bool -> ?tls:Tls.Config.server -> ?port:int -> ?tls_port:int -> Dns_resolver.t -> t

resolver stack ~root ~timer ~udp ~tcp ~tls ~port ~tls_port resolver registers a caching resolver on the provided protocols udp, tcp, tls using port for udp and tcp (defaults to 53), tls_port for tls (defaults to 853) using the resolver configuration. The timer is in milliseconds and defaults to 500 milliseconds.

include Dns_resolver_mirage_shared.S with type t := t
Sourceval resolve_external : t -> (Ipaddr.t * int) -> string -> [ `Close | `Data of int32 * string ] Lwt.t

resolve_external t (ip, port) data resolves for (ip, port) the query data and returns a pair of the minimum TTL and a response.

Sourceval primary_data : t -> Dns_trie.t

primary_data t is the DNS trie of the primary for the resolver t.

Sourceval update_primary_data : t -> Dns_trie.t -> unit

update_primary_data t data updates the primary for the resolver t with the DNS trie data. Any 'notify's to secondaries are discarded - secondary name servers are not supported in this setup.

Sourceval update_tls : t -> Tls.Config.server -> unit

update_tls t tls_config updates the tls configuration to tls_config. If the resolver wasn't already listening for TLS connections it will start listening.

queries t returns the stream of resolved DNS queries and their replies.