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.




 
MODULE DNSQuery;
IMPORT
  IO:Address,
  Out := NPCT:Console;
 
PROCEDURE Do() RAISES Address.UnknownHostException;
VAR
  ip: Address.Inet;
BEGIN
  ip := Address.GetByName("www.kame.net");
  Out.String(ip.ToString());Out.Ln
END Do;
 
BEGIN
  Do;
END DNSQuery.
 