get network interface IPv4 or IPv6 address