Learn R Programming

iptools (version 0.7.2)

ip_to_hostname: Return the hostname associated with particular IP addresses

Description

the opposite, in some ways, of hostname_to_ip, ip_to_hostname consumes a vector of IP addresses and provides a list of the hostnames that those IPs resolve to. Compatible with both IPv4 and IPv6 addresses.

Usage

ip_to_hostname(ip_addresses)

Arguments

ip_addresses

a vector of IP addresses.

Value

a list, each entry containing a vector of hostnames for the equivalent input IP address (mostly, this will only be one hostname but not always). If the IP cannot be resolved, the list element will be the string "Invalid IP address".

See Also

hostname_to_ip, for the reverse operation.

Examples

Run this code
# NOT RUN {
ip_to_hostname("162.243.111.4")
[[1]]
[1] "dds.ec"
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab