RE: How to find client's IP address (or name)

"Kapoor, Nishikant" <nishikant.x.kapoor-CDGYnrjxVPGpp/[email protected]> Tue, 1 Mar 2005 11:15:40 -0600
Newsgroups gmane.user-groups.linux.delhi.devel,gmane.user-groups.linux.delhi
Message-ID <B4448B75FF74124ABB5793D8BFBEEA3901B473EE@exccpgo04.corp.xcelenergy.com>
> I have a very basic server written in C. It creates a socket, 
> binds it to a port and listens for client's requests. I am 
> trying to find the IP address of the client when the client 
> attempts to make a connection. Does anyone know how to do 
> that? (I was hoping to have client structure filled in when 
> client establishes connection, but that doesn't seem to be the case.)
> 
> Here is the trimmed code (can send complete code if you so desire).
[snipped]

Never mind. I guess I was looking for 

      client = (char *)inet_ntoa(clntAddr.sin_addr);

Thanks,
Nishi