Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!att!linac!midway!msuinfo!convex.cl.msu.edu!jap From: jap@convex.cl.msu.edu (Joe Porkka) Newsgroups: comp.unix.wizards Subject: Re: Given a filedescriptor, how can I find source IP?? Message-ID: <1991Mar23.041824.3130@msuinfo.cl.msu.edu> Date: 23 Mar 91 04:18:24 GMT References: <1991Mar22.201818.25515@msuinfo.cl.msu.edu> Sender: news@msuinfo.cl.msu.edu Organization: Michigan State University Lines: 18 jap@convex.cl.msu.edu (Joe Porkka) writes: >Well, the subject says it all... >On a SUN, I am trying to track down the address of the machine >that telneted to me. The reason is that I want to be able >to open another connection going back the other way. >Any ideas??? Remember boys and girls, "getpeername()" only works on sockets. I guess I was not clear - the program does not open a socket - it inherits some filedescriptors (0 1 and 2). Sombody already suggested that I place a program between inetd and telnetd, but I was hoping to not have to resort to such yuck - I would rather not modify the system.