Added options to force IPv4 or IPv6