3 #include <sys/socket.h> 4 #include <netinet/in.h> 10 struct sockaddr_in sa;
11 socklen_t dummy =
sizeof sa;
13 if (getpeername(s,(
struct sockaddr *) &sa,&dummy) == -1)
return -1;
void byte_copy(void *, unsigned int, const void *)
int socket_remote4(int s, char ip[4], uint16 *port)
void uint16_unpack_big(const char *, uint16 *)