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