How does ping resolve ip addresses?
ICMP (the protocol) may operate above IP, alongside TCP but a ping
program itself almost certainly still uses the normal methods for name resolution, be that DNS, hosts file or resolv.conf
.
For example, the ping
program located here calls on gethostbyname()
to turn DNS names into IP addresses.