home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.programmer:5702 comp.sources.wanted:5383
- Newsgroups: comp.unix.programmer,comp.sources.wanted
- Path: sparky!uunet!spool.mu.edu!yale.edu!jvnc.net!news.edu.tw!news!ccnews!CCCA!hch
- From: hch@CCCA.NCTU.edu.tw (Huang Chih-Hsien)
- Subject: Re: Get hostname from IP address
- Message-ID: <1992Dec15.155506.418@ccnews.nctu.edu.tw>
- Sender: usenet@ccnews.nctu.edu.tw
- Organization: National Chiao Tung University
- X-Newsreader: TIN [version 1.1 PL6]
- References: <1992Dec11.152438.18365@fwi.uva.nl>
- Date: Tue, 15 Dec 1992 15:55:06 GMT
- Lines: 22
-
- 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.
- >Will post a summary if there's interest. Thanks in advance...
-
- If you are on a SUN, try this:
-
- (EXAMPLE: lookup 140.111.3.21 for NCTUCCCA.edu.tw)
- % nslookup
- > set type=ptr
- > 21.3.111.140.in-addr.arpa.
-
- ---
- Huang, Chih-Hsien
- Campus Computer Communication Association Vice President
- TWNEWS Moderator, NCTUCCCA.edu.tw Anonymous FTP Archives Maintainer
- National Chiao Tung University, Hsinchu, Taiwan
- hch@NCTUCCCA.edu.tw
-