Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
type t = {
client : (module Dns.Protocol.CLIENT);
servers : (Ipaddr.t * int) list;
search_domains : string list;
}
type config = [
| `Resolv_conf of string
A resolv.conf
filename
| `Static of (Ipaddr.t * int) list * string list
A list of hostname,port
of stub resolvers, and a search domain list
]
Defines the location of the stub resolvers to use for client resolution.
val create :
?client:(module Dns.Protocol.CLIENT) ->
?config:config ->
unit ->
t Lwt.t
Create a resolver instance that either uses the system /etc/resolv.conf
, or a statically specified preference
val gethostbyname :
t ->
?q_class:Dns.Packet.q_class ->
?q_type:Dns.Packet.q_type ->
string ->
Ipaddr.t list Lwt.t
Lookup a Name.t
.
val gethostbyaddr :
t ->
?q_class:Dns.Packet.q_class ->
?q_type:Dns.Packet.q_type ->
Ipaddr.V4.t ->
string list Lwt.t
Reverse lookup an IPv4 address.
val resolve :
t ->
?dnssec:bool ->
Dns.Packet.q_class ->
Dns.Packet.q_type ->
Dns.Name.t ->
Dns.Packet.t Lwt.t
Resolve a fully specified query, q_class
, q_type
and Name.t
.