How to resolve the algorithm DNS query step by step in the Oberon-2 programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm DNS query step by step in the Oberon-2 programming language

Table of Contents

Problem Statement

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.

Let's start with the solution:

Step by Step solution about How to resolve the algorithm DNS query step by step in the Oberon-2 programming language

Source code in the oberon-2 programming language

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.

  

You may also check:How to resolve the algorithm Create a file step by step in the Modula-3 programming language
You may also check:How to resolve the algorithm Multifactorial step by step in the Lambdatalk programming language
You may also check:How to resolve the algorithm Arrays step by step in the PureBasic programming language
You may also check:How to resolve the algorithm Hello world/Text step by step in the C3 programming language
You may also check:How to resolve the algorithm Parametric polymorphism step by step in the Visual Basic .NET programming language