home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / programm / 4486 < prev    next >
Encoding:
Internet Message Format  |  1992-08-29  |  1.6 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.150507.4219@adsi.homecare.com>
  6. Date: 28 Aug 92 15:05:07 GMT
  7. Sender: markp@adsi.homecare.com (Mark Parr)
  8. Organization: Application Data Systems, Inc.
  9. Lines: 36
  10.  
  11.  
  12. I'm looking for a function that when called will return the IP address the 
  13. machine from which a user is 'rlogin'ed.
  14.  
  15. For example, if a 'who' shows the following:
  16.  
  17.      billp       tty5        Aug 28 07:55                          
  18.      brucec      tty6        Aug 28 08:44                          
  19.      jdoe        pts/0       Aug 28 09:53          (adsi)          
  20.      bob         pts/1       Aug 28 09:53          (ibm)           
  21.      smith       pts/2       Aug 28 09:53          (ibm)           
  22.  
  23. I would assume the function would work along the lines of
  24.  
  25.       function(user, tty)
  26.  
  27. Example:
  28.      
  29.       getip("smith", "pts/2") -> returns 89.0.0.1
  30.  
  31. where 89.0.0.1 is the IP address of ibm.
  32.  
  33. Does this function (or something similar) exists?
  34.  
  35. Please respond directly to me as I'll be out of town for a week and I
  36. do not want to miss a response.
  37.  
  38. Thanks, 
  39. Mark
  40.  
  41.  
  42. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  43.  | |-------------|  Application Data Systems     |  Phone: (601) 393-2046  | |
  44.  | |  Mark Parr  |  1930-B 1st Commercial Dr. N  |    Fax: (601) 393-6605  | |
  45.  | |-------------|  Southaven, MS 38671          | markp@adsi.homecare.com | |
  46. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  47.