Reputation: 4423
I do alot of programming in *nix using C gcc. I know how to do a basic gethostbyname(). BUt what if I wanted to pull down the entire DNS record. More to the point, is there a function that I'm missing that allows you to specify the specific record that you want to pull? Or will I need to do this manually through a UDP socket?
Upvotes: 2
Views: 2549
Reputation: 47762
No, there is no such function in standard C or POSIX (and even the gethostbyname function, contrary to what you may think, is not a function for querying DNS - it can use any other way to get the address, like /etc/hosts or mDNS, whatever).
You might want to look at some DNS-specific libraries, like ldns, libbind or libdjbdns.
Upvotes: 3