How to resolve the algorithm DNS query step by step in the NetRexx programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm DNS query step by step in the NetRexx 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 NetRexx programming language

Source code in the netrexx programming language

/* NetRexx */
options replace format comments java crossref symbols nobinary

ir = InetAddress
addresses = InetAddress[] InetAddress.getAllByName('www.kame.net')
loop ir over addresses
  if ir <= Inet4Address then do
    say 'IPv4 :' ir.getHostAddress
    end
  if ir <= Inet6Address then do
    say 'IPv6 :' ir.getHostAddress
    end
  end ir

  

You may also check:How to resolve the algorithm Shell one-liner step by step in the Common Lisp programming language
You may also check:How to resolve the algorithm Cumulative standard deviation step by step in the Perl programming language
You may also check:How to resolve the algorithm Soundex step by step in the PL/I programming language
You may also check:How to resolve the algorithm FizzBuzz step by step in the LIL programming language
You may also check:How to resolve the algorithm Count the coins step by step in the Ring programming language