hostnamebuf 1080 src/simh/sim_sock.c static int _sim_getaddrname (struct sockaddr *addr, size_t addrsize, char *hostnamebuf, char *portnamebuf) hostnamebuf 1090 src/simh/sim_sock.c *hostnamebuf = '\0'; hostnamebuf 1092 src/simh/sim_sock.c ret = p_getnameinfo(addr, size, hostnamebuf, NI_MAXHOST, NULL, 0, NI_NUMERICHOST); hostnamebuf 1093 src/simh/sim_sock.c if (0 == memcmp("::ffff:", hostnamebuf, 7)) /* is this a IPv4-mapped IPv6 address? */ hostnamebuf 1094 src/simh/sim_sock.c memmove(hostnamebuf, 7+hostnamebuf, /* prefer bare IPv4 address */ hostnamebuf 1095 src/simh/sim_sock.c strlen(hostnamebuf) + 7 - 1); /* length to include terminating \0 */ hostnamebuf 1099 src/simh/sim_sock.c strcpy(hostnamebuf, inet_ntoa(((struct sockaddr_in *)addr)->s_addr));