On Tue, 01 Mar 2005 Kapoor,Nishikant wrote :
>[Sorry for cross posting].
>
>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).
>
>Tanks,
>Nishi
>
>

Hi Nishi,

To know the client IP and port through that client is connected to your  
system you can use the  netstat command.
Before trying it better follow the manual.

--
Subhamoy
_______________________________________________
ilugd mailinglist -- [email protected]
http://frodo.hserus.net/mailman/listinfo/ilugd
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi 
http://www.mail-archive.com/[email protected]/

Reply via email to