- if(sockaddr->addresslen == sizeof(struct sockaddr_in)) {
- //ipv4
- inet_ntop(AF_INET, (void *)(&((struct sockaddr_in *)sockaddr->address)->sin_addr), auth->host, HOSTLEN);
- } else {
- //ipv6
- inet_ntop(AF_INET6, (void *)(&((struct sockaddr_in6 *)sockaddr->address)->sin6_addr), auth->host, HOSTLEN);
- }
+ iodns_print_address(sockaddr, auth->conn->socket->ipv6, auth->host, HOSTLEN);