(resolve fqdn)
(resolve4 fqdn)
(resolve6 fqdn)
This procedure looks up the FQDN passed as a string by calling getaddrinfo() and returns a list of found IP addresses (A and AAAA records). If no IP adresses are found, the empty list () is returned.
The variant resolve4 returns a list of IPv4 addresses (A records), the variant resolve6 a list of IPv6 addresses (AAAA records).
A list of IP addresses (or the empty list).
> (resolve "www.inlab.net")
(2a00:1158:3::ba 37.200.99.14)
> (resolve4 "www.inlab.net")
(37.200.99.14)
> (resolve6 "www.inlab.net")
(2a00:1158:3::ba)
> (resolve "unknown.nowhere")
()
>