This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
How do I get the IP-adr from connect's parameters?
- From: Bård Lutzow-Holm Myrstad <baardm at ifi dot uio dot no>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 21 Mar 2002 13:51:11 +0100 (MET)
- Subject: How do I get the IP-adr from connect's parameters?
Hi everybody!
This is maybe a stupid question:
I try to get the IP-address of the server/receiver from the parameters of
the connect/accept socket calls.
int connect(int fd, const struct sockaddr *addr, socklen_t addrlen)
int accept(int fd, struct sockaddr *addr, socklen_t* addrlen)
I'm sure it's just a matter of converting in the right way, but I don't
find how! Any suggestions?
Thanks!