DNS is an internet service that maps domain names, like rosettacode.org, to IP addresses, like 66.220.0.231.

Use DNS to resolve www.kame.net to both IPv4 and IPv6 addresses. Print these addresses.




(import java.net.InetAddress java.net.Inet4Address java.net.Inet6Address)
 
(doseq [addr (InetAddress/getAllByName "www.kame.net")] 
  (cond
    (instance? Inet4Address addr) (println "IPv4:" (.getHostAddress addr))
    (instance? Inet6Address addr) (println "IPv6:" (.getHostAddress addr))))