jfroebe has asked for the wisdom of the Perl Monks concerning the following question:
I need to retrieve all ip addresses for a specified host. In C, this would be easy as I would just run gethostbyname() and loop through the HOSTRECs obtaining all ip addresses that were registered with the name service (dns, hosts, ldap, etc.). The Socket retrieves the first HOSTREC and the IO::Socket modules perform the basically the same thing but seem to require or implement connections to the remote site.
All I want to do is obtain all the ip addresses from from the HOSTRECs that are produced by gethostbyname() (c version not Socket:: version)
This must have been asked before but the only references I've seen deal with obtaining the ip addresses of the local machine.
thanks
Jason
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: host with multiple ip addresses
by pg (Canon) on Dec 03, 2003 at 19:54 UTC | |
|
Re: host with multiple ip addresses
by mpeppler (Vicar) on Dec 03, 2003 at 19:55 UTC |