Is there an easy way, on *nix platforms(Linux specifically) to get the IP address of a hostname, while supplying a custom DNS server to use in place of the system’s configured one? I want to access this information from a C program.
Is there an easy way, on *nix platforms(Linux specifically) to get the IP address
Share
You will need to use your own resolver, directly sending DNS packets, instead of relying on the system’s resolver and
gethostbyname. You would probably want to use a library, such as adns.