home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / programm / 5702 < prev    next >
Encoding:
Internet Message Format  |  1992-12-15  |  1.4 KB

  1. Xref: sparky comp.unix.programmer:5702 comp.sources.wanted:5383
  2. Newsgroups: comp.unix.programmer,comp.sources.wanted
  3. Path: sparky!uunet!spool.mu.edu!yale.edu!jvnc.net!news.edu.tw!news!ccnews!CCCA!hch
  4. From: hch@CCCA.NCTU.edu.tw (Huang Chih-Hsien)
  5. Subject: Re: Get hostname from IP address
  6. Message-ID: <1992Dec15.155506.418@ccnews.nctu.edu.tw>
  7. Sender: usenet@ccnews.nctu.edu.tw
  8. Organization: National Chiao Tung University
  9. X-Newsreader: TIN [version 1.1 PL6]
  10. References: <1992Dec11.152438.18365@fwi.uva.nl>
  11. Date: Tue, 15 Dec 1992 15:55:06 GMT
  12. Lines: 22
  13.  
  14. dejesus@archimedes.nwc.navy.mil (Francisco X DeJesus) writes:
  15. >I'd like to find a utility I can call from the command-line with an
  16. >internet IP address as an argument, and have it return to me the full
  17. >hostname related to it. I've looked into the function gethostbyaddr()
  18. >but haven't been able to work. I also remember reading about a name-
  19. >resolver funtion nres_gethostbyaddr() (sp?), but can't find any
  20. >references to it on my system. I'm running SunOS 4.1.2 on a Sparc.
  21. >Will post a summary if there's interest. Thanks in advance...
  22.  
  23. If you are on a SUN, try this:
  24.  
  25. (EXAMPLE: lookup 140.111.3.21 for NCTUCCCA.edu.tw)
  26. % nslookup 
  27. > set type=ptr
  28. > 21.3.111.140.in-addr.arpa.
  29.  
  30. ---
  31. Huang, Chih-Hsien
  32. Campus Computer Communication Association Vice President
  33. TWNEWS Moderator, NCTUCCCA.edu.tw Anonymous FTP Archives Maintainer
  34. National Chiao Tung University, Hsinchu, Taiwan
  35. hch@NCTUCCCA.edu.tw
  36.