在哪里可以找到C ++ DNS库? [英] Where can I find a C++ DNS Library?

查看:226
本文介绍了在哪里可以找到C ++ DNS库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道DNS通常由操作系统处理,但是我的工作假定DNS已经在目标系统上被破坏(这是诊断DNS配置错误的工具)。因此,我需要自己实现DNS,以检查从系统返回的已知好的DNS服务器的结果。



您可以使用NSLookup或Dig工具来手动指定DNS服务器地址,但是出现Windows API调用(例如GetAddressByName )不允许我指定要查询的服务器,并改用系统配置的目标。



我试图在DNS上查找RFC,但不幸的是,他们对我来说很清楚,他们使HTTP规范看起来像是最清晰和最准确的规范。



我也不想重新发明别人以前已经做过的事情。

解决方案

您可以尝试: http:// 25thc。 com /〜william / projects / dns.c.html 。另请参阅需要在C中构建简单的DNS解析器



实际上,Google搜索DNS解析器C显示了几种可能性。


I know DNS is typically handled by the operating system, but I'm working under the assumption that DNS has been broken on the target system (this is a tool to diagnose DNS misconfiguration). I therefore need to implement DNS myself, to check the results I get back from the system against a known good DNS server.

You can do this with the NSLookup or Dig tools, specifying a DNS server address manually, but it appears the Windows API calls for doing this (e.g. GetAddressByName) don't allow me to specify a server to query, and use the system's configured target instead.

I tried to look for the RFCs on DNS, but unfortunately they are clear as mud to me -- they make the HTTP spec look like the clearest and most well written spec ever produced.

I also don't want to reinvent something that someone else has already done several times before.

解决方案

You might try: http://25thandclement.com/~william/projects/dns.c.html . Also, see Need To Build Simple DNS Resolver in C

Actually, a Google search of "DNS resolver C" reveals several possibilities.

这篇关于在哪里可以找到C ++ DNS库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆