I think you can use gethostbyaddr() for this.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 1:19 PM To: [EMAIL PROTECTED] Subject: DNS lookup I need to find a way to do a DNS lookup of a list of ips (at least 250 entries), get their corresponding hostnames and produce a report. It sounds very simple, an I implemented it with "nslookup ip" (loop for 250 times). I tried "host -al" (which produces a long list of host, so that with PERL one can do a match). The problem with this is that the output did not contain any of the entries in the of ips I was looking for. Can someone please come to my aid? So say I have a file: IP Some title Some title ------------------------------------------------ 190.10.0.1 lkdklkdk dklkdlkd 190.0.2.3 dkjdjd dolkldk ------------------------------------------------ I need to produce something like this: IP Hostname Some title Some title ----------------------------------------------------------- 190.10.0.1 tiger lkdklkdk dklkdlkd 190.0.2.3 lion dkjdjd dolkldk ----------------------------------------------------------- With my current (using nslookup) takes a some time for a long list of ips. __________________ William Ampeh (x3939) Federal Reserve Board -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -------------------------------------------------------------------------------- This email may contain confidential and privileged material for the sole use of the intended recipient. If you are not the intended recipient, please contact the sender and delete all copies. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]