How can I obtain multiple IP addresses from one hostname?

Giganews Newsgroups
Subject: How can I obtain multiple IP addresses from one hostname?
Posted by:  Fumio Kawamata (fum…@my.email.ne.jp)
Date: Sun, 30 Oct 2005

Hello.

I can obtain one IP address from one hostname as below.

    IPAddress:=MyStack.ResolveHost(HostName, ID_DEFAULT_IP_VERSION);

Some host returns multiple IP addresses as below.

    C:\>nslookup nm01mta.dion.ne.jp
    Server:  aterm-220389
    Address:  192.168.0.1

    Name:    nm01mta.dion.ne.jp
    Addresses:  211.5.2.78, 211.5.2.79, 211.5.2.80, 211.5.2.81
              211.5.2.82, 211.5.2.83, 211.5.2.84, 211.5.2.69, 211.5.2.70
              211.5.2.71, 211.5.2.72, 211.5.2.73, 211.5.2.74, 211.5.2.75
              211.5.2.76, 211.5.2.77

How can I obtain multiple IP addresses from one hostname?
Does anyone know the function what I should use?

I am using
  - Windows XP Professional Service Pack 2
  - Delphi 6 Professional Update Pack 2
  - Indy Version 10.0.52.

Regards.

Fumio Kawamata

Replies