Sovite.DNS (sovite v0.6.0)

Copy Markdown View Source

DNS lookups through a pluggable Sovite.DNS.Resolver.

Summary

Types

A resolver module and the options passed to it on every lookup.

Functions

Returns the default resolver: Sovite.DNS.InetRes with no options.

Looks up records of type for name with the given resolver.

Looks up records and whether DNSSEC authenticated them. Resolvers without Sovite.DNS.Resolver.lookup_secure/3 never authenticate.

Returns whether resolver validates DNSSEC, by asking for the root zone's NS records, which are signed: a validating resolver that is trusted authenticates them. DANE (RFC 7672) needs one.

Types

resolver()

@type resolver() :: {module(), keyword()}

A resolver module and the options passed to it on every lookup.

Functions

default_resolver()

@spec default_resolver() :: resolver()

Returns the default resolver: Sovite.DNS.InetRes with no options.

lookup(arg, name, type)

Looks up records of type for name with the given resolver.

See Sovite.DNS.Resolver for the data each record type returns.

lookup_secure(arg, name, type)

Looks up records and whether DNSSEC authenticated them. Resolvers without Sovite.DNS.Resolver.lookup_secure/3 never authenticate.

validating?(resolver)

@spec validating?(resolver()) ::
  {:ok, boolean()} | {:error, Sovite.DNS.Resolver.error()}

Returns whether resolver validates DNSSEC, by asking for the root zone's NS records, which are signed: a validating resolver that is trusted authenticates them. DANE (RFC 7672) needs one.