home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / aix / 12884 < prev    next >
Encoding:
Internet Message Format  |  1992-12-28  |  866 b 

  1. Path: sparky!uunet!spool.mu.edu!wupost!wugate.wustl.edu!buchanan
  2. From: buchanan@wupost.wustl.edu (Paul Buchanan)
  3. Newsgroups: comp.unix.aix
  4. Subject: User's IP address
  5. Date: 28 Dec 1992 15:37:04 -0600
  6. Organization: Washington University in Saint Louis, MO USA
  7. Lines: 10
  8. Message-ID: <buchanan.725578362@wugate.wustl.edu>
  9. NNTP-Posting-Host: wugate.wustl.edu
  10.  
  11. I have an application that needs to find the IP address for remote
  12. users (it basically adds or deletes certain privileges based on the
  13. user's subnet address).  It seemed like the easiest way was to find
  14. the terminal entry in /etc/utmp and, if a host name was present,
  15. resolve it back to the IP address with gethostbyname().  But the
  16. name has been truncated to 16 characters and frequently doesn't leave
  17. enough to resolve.  Any other way to find the IP address?
  18.  
  19. Paul Buchanan
  20. Washington University in St. Louis
  21.