hostname_to_ip: Returns the IP addresses associated with a hostname.
Description
takes in a vector of hostnames and returns the IP addresses from
each hostname's DNS entries. Compatible with both IPv4 and IPv6 addresses.
Usage
hostname_to_ip(hostnames)
Arguments
hostnames
a vector of hostnames.
Value
a list the length of hostnames, containing the IP addresses from
each hostname's DNS entries. In the event that a hostname cannot be resolved,
the list element will consist of a length-1 character vector containing
"Not resolved".
See Also
ip_to_hostname for the opposite functionality - resolving
IP addresses to their associated hostname(s) - and ip_to_numeric
for converting IP addresses retrieved from hostname_to_ip into their
numeric representation.