Module dnsutil

DNS resolving utility functions.

Introduced in: 15 Nov 2002 by Magnus Ahltorp <ahltorp@nada.kth.se>

Authors: Magnus Ahltorp (ahltorp@nada.kth.se).

Description

DNS resolving utility functions. Mainly used from the sipdst module. Functions to resolve domain SRV- or NAPTR records, and to do ENUM resolving.

Data Types

naptrrecord()

naptrrecord() = #naptrrecord{}

no description

srventry()

srventry() = #srventry{}

These records are entirely internal to this module

Function Index

enumlookup/1 Do ENUM (RFC2916 and 2916bis) lookup on a E.164 number in the default configured list of ENUM domains.
enumlookup/2 Do ENUM (RFC2916 and 2916bis) lookup on a E.164 number in a set of domains.
get_ip_port/2 Simply look up the hostname supplied and return a list of #sipdns_hostport records with the IP addresses the Host resolved to, together with the IP address as supplied to this function.
siplookup/1 Look up where to send SIP requests for a domain name.

Function Details

enumlookup/1

enumlookup(Number::In) -> Result | none

Do ENUM (RFC2916 and 2916bis) lookup on a E.164 number in the default configured list of ENUM domains. Uses enumlookup/2 below.

enumlookup/2

enumlookup(Number, DomainList) -> Result | none

Do ENUM (RFC2916 and 2916bis) lookup on a E.164 number in a set of domains. Returns a single value which is the result of ENUM regexp rewrite of the best NAPTR found as a string.

get_ip_port/2

get_ip_port(Host, Port) -> AddrList | {error, Reason}

Simply look up the hostname supplied and return a list of #sipdns_hostport records with the IP addresses the Host resolved to, together with the IP address as supplied to this function.

siplookup/1

siplookup(Domain) -> SRVList | {error, Reason}

Look up where to send SIP requests for a domain name. Ultimately return a list of {Proto, Host, Port} and/or {error, E} entrys. Proto is tcp, udp or tls. Never tcp6, udp6 or tls6 since we do not resolve Host into an address.


Generated by EDoc, Oct 17 2007, 16:48:23.