IPv6 support
fix strncpy usage
can't use the terneries in that way because the result in different types then.
fix makros for access to addrinfo structure.