Since struct sockaddr is too small to contain an IPv6, we use struct sockaddr_in6 instead, and we cast it where needed