A set of helper subroutines to support parts of the Netdisco application.
There are no default exports, however the
:all tag will export all subroutines.
Given an IP address (either IPv4 or IPv6), return the canonical hostname.
undef if no PTR record exists for the IP.
Given a host name will return the first IPv4 address.
undef if no A record exists for the name.
This method uses a fully asynchronous and high-performance pure-perl stub resolver
Given a reference to an array of hashes will resolve the
IPv6 address in the
device key of each hash into its hostname which will be inserted in the
dns key of the hash.
Optionally provide a set of timeout values in seconds which is also the number of resolver attempts. The default is
Returns the supplied reference to an array of hashes with dns values for addresses which resolved.