How might I perform DNS lookups using C/C++ on Lin

2020-02-12 03:11发布

How do I get similar functionality to the host command using a c api (or any other language for that matter)? I need more information than just an IP address given by gethostbyname(); specifically, the SMTP-related data.

标签: c linux smtp dns
7条回答
SAY GOODBYE
2楼-- · 2020-02-12 03:43

I know that the question is old, but I have long searched a dns library, and all answers here just stubs me. I think libraries like adns/udns have written not for human beings. And FireDNS for a long time have not working download links.

I have found poslib as the best dns library with very easy interface.

查看更多
登录 后发表回答