Client Ip Address

I have a UNIX daemon program which takes client connections via TCP/IP sockets.

What I need to know is if there is any way of getting the IP address of the client socket once a connection has been made... or do I have to code my client to send it manually ?

Thanks.

man 2 accept

the second argument to this function is a pointer to struct sockaddr. after this function returns, you should be able to find the ip address of client.