home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.programmer:5678 comp.sources.wanted:5360
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!spool.mu.edu!umn.edu!csus.edu!beach.csulb.edu!nic.csu.net!nic.csu.net!nntp
- Newsgroups: comp.unix.programmer,comp.sources.wanted
- Subject: Re: Get hostname from IP address
- Message-ID: <1992Dec13.212509.3512@nic.csu.net>
- From: oleg@gd.cs.csufresno.edu
- Date: 13 Dec 92 21:25:08 PST
- Sender: oleg@gd.cs.csufresno.edu
- References: <Bz2FFM.D4z@avalon.nwc.navy.mil> <2564@eagle.ukc.ac.uk>
- Organization: Computer Science Departement of California State University in Fresno
- Nntp-Posting-Host: gd.cs.csufresno.edu
- Lines: 18
-
- In article <2564@eagle.ukc.ac.uk> smmat@ukc.ac.uk (S.M.M.Al-Taher) writes:
- >In article <Bz2FFM.D4z@avalon.nwc.navy.mil> dejesus@archimedes.nwc.navy.mil (Francisco X DeJesus) writes:
- >>I'd like to find a utility I can call from the command-line with an
- >>internet IP address as an argument, and have it return to me the full
- >>hostname related to it. I've looked into the function gethostbyaddr()
- >>but haven't been able to work. I also remember reading about a name-
- >>resolver funtion nres_gethostbyaddr() (sp?), but can't find any
- >>references to it on my system. I'm running SunOS 4.1.2 on a Sparc.
- >
- >A while back I also wanted to be able to get host names from the IP address,
- >and used the gethostbyaddr function. I've put together the following code:
- >
- What's wrong with dig -x address?
-
- Oleg
-
-
-
-