connectaddr 999 src/simh/sim_sock.c SOCKET sim_accept_conn_ex (SOCKET master, char **connectaddr, int opt_flags) connectaddr 1022 src/simh/sim_sock.c if (connectaddr != NULL) { connectaddr 1023 src/simh/sim_sock.c *connectaddr = (char *)calloc(1, NI_MAXHOST+1); connectaddr 1025 src/simh/sim_sock.c p_getnameinfo((struct sockaddr *)&clientname, size, *connectaddr, NI_MAXHOST, NULL, 0, NI_NUMERICHOST); connectaddr 1026 src/simh/sim_sock.c if (*connectaddr) connectaddr 1027 src/simh/sim_sock.c if (0 == memcmp("::ffff:", *connectaddr, 7)) /* is this a IPv4-mapped IPv6 address? */ connectaddr 1028 src/simh/sim_sock.c memmove(*connectaddr, 7+*connectaddr, /* prefer bare IPv4 address */ connectaddr 1029 src/simh/sim_sock.c strlen(*connectaddr) - 7 + 1); /* length to include terminating \0 */ connectaddr 1031 src/simh/sim_sock.c strcpy(*connectaddr, inet_ntoa(((struct sockaddr_in *)&connectaddr)->s_addr)); connectaddr 107 src/simh/sim_sock.h (SOCKET master, char **connectaddr, int opt_flags); connectaddr 108 src/simh/sim_sock.h # define sim_accept_conn(master, connectaddr) \ connectaddr 109 src/simh/sim_sock.h sim_accept_conn_ex(master, connectaddr, 0)