本文介绍了linux的gethostbyname函数的独立源码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在哪里可以获得 gethostbyname
的源代码,它可以在不链接其他 linux 库(只是套接字)的情况下使用?
Where i can get source code of gethostbyname
which can be used without linking other libs(just sockets) for linux?
我发现了这个:https://github.com/gnif/ARMT/blob/master/common/CDNS.cc
但这不起作用,解析时出错
But this doesn't work, error when resolving
谢谢!
推荐答案
单个 .c 文件中的非阻塞 DNS 解析器库.支持存根和递归模式."
"A non-blocking DNS resolver library in a single .c file. Supports both stub and recursive modes."
http://25thandclement.com/~william/projects/dns.c.html
这篇关于linux的gethostbyname函数的独立源码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!