This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]