使用 C 查询自定义 DNS 服务器

发布于 2024-08-21 05:08:31 字数 155 浏览 2 评论 0原文

我想向我自己的 DNS 服务器而不是默认服务器进行 DNS 查询。

我可以使用哪个 api 来做到这一点?

我知道 getaddrinfo (其中 ping.exe 使用),但是我怎样才能让这个函数查询我的 dns 服务器,而不是默认的呢?

谢谢!

I want to make a DNS query to my own DNS server instead the default one.

Which api can I use to do that ?

I know getaddrinfo (which ping.exe using), but how can i make this function query my dns server, instead the default one ?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

白云不回头 2024-08-28 05:08:31

查看 adns 解析器库。

另一种选择是使用 c-ares 库,该库适用于 Windows 并允许您使用替代名称服务器。

Take a look at the adns resolver library.

Another option is to use the c-ares library, which works on Windows and allows you to use alternative nameservers.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文