dns-forward-lwt-unix

Lwt implementation for the `dns-forward` library
IN THIS PACKAGE
type t
type clock
type message_cb = ?src:address -> ?dst:address -> buf:Cstruct.t -> unit -> unit Lwt.t

A callback called per message, which permits recording and analysis. If an address is unknown (e.g. it is selected by the kernel when routing the packets) then the corresponding argument will be omitted

val create : ?local_names_cb:( Dns.Packet.question -> Dns.Packet.rr list option Lwt.t ) -> ?message_cb:message_cb -> Dns_forward.Config.t -> clock -> t Lwt.t

Construct a resolver given some configuration

val destroy : t -> unit Lwt.t

Destroy and free all resources associated with the resolver

Process a query by first checking whether the name can be satisfied locally via the local_names_cb and failing that, sending it to upstream servers according to the resolver configuration. The call will block forever if no server with a timeout is chosen; the client should be prepared to timeout and cancel the thread.