DNS lookup in c/c++ [closed]

二次信任 提交于 2019-12-11 06:37:11

问题


I must write a C/C++ program which works a little bit like dig and nslookup: it must know IP addresses of any site. It should do things like the dig www.example.com MX +short command does. I can't imagine how can this be done. Any ideas?


回答1:


Use any resolver library you like. Popular libraries include UDNS and adns. You could also just modify the source code to dig (which is part of the bind distribution).



来源:https://stackoverflow.com/questions/12328093/dns-lookup-in-c-c

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!