handle IPv6 addresses in inet_ntop and inet_pton