home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / programm / 4485 < prev    next >
Encoding:
Internet Message Format  |  1992-08-29  |  1.5 KB

  1. Path: sparky!uunet!gatech!rutgers!homecare!adsi!markp
  2. From: markp@adsi.homecare.com (Mark Parr)
  3. Newsgroups: comp.unix.programmer
  4. Subject: Getting the IP address of a 'rlogin'ed user
  5. Message-ID: <1992Aug28.150112.3931@adsi.homecare.com>
  6. Date: 28 Aug 92 15:01:12 GMT
  7. Sender: markp@adsi.homecare.com (Mark Parr)
  8. Organization: Application Data Systems, Inc.
  9. Lines: 28
  10.  
  11. I'm looking for a function that when called will return the IP address the 
  12. machine from which a user is 'rlogin'ed.
  13.  
  14. For example, if a 'who' shows the following:
  15.  
  16.      billp       tty5        Aug 28 07:55                          
  17.      brucec      tty6        Aug 28 08:44                          
  18.      jdoe        pts/0       Aug 28 09:53          (adsi)          
  19.      bob         pts/1       Aug 28 09:53          (ibm)           
  20.      smith       pts/2       Aug 28 09:53          (ibm)           
  21.  
  22. I would assume the function would work along the lines of
  23.  
  24.       function(user, tty)
  25.  
  26. Example:
  27.      
  28.       getip("smith", "pts/2") -> returns 89.0.0.1
  29.  
  30. where 89.0.0.1 is the IP address of ibm.
  31.  
  32. Does this function (or something similar) exists?
  33.  
  34. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  35.  | |-------------|  Application Data Systems     |  Phone: (601) 393-2046  | |
  36.  | |  Mark Parr  |  1930-B 1st Commercial Dr. N  |    Fax: (601) 393-6605  | |
  37.  | |-------------|  Southaven, MS 38671          | markp@adsi.homecare.com | |
  38. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  39.