I'm using c-ares for my DNS queries. The problem is, i don't know how to get NS values. I didn't find any examples and docs are not enought for me :(
Man page for ares_parse_ns_reply provides only function description. I've already created my channel and figure out how to make gethostbyname queries:
// ...
status = ares_init_options(&channel, &options, optmask);
if (status != ARES_SUCCESS) {
printf("ares_init_options: %s\n", ares_strerror(status));
return EXIT_FAILURE;
}
// ...
ares_gethostbyname(channel, "stackoverflow.com", AF_INET, callback, NULL);
// ...
But what do i do next to get MX/NS/AAAA records ?