Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 gethostbyname() 的情况下,它通过使用 DNS 和 /etc/hosts 或 Netbios 进行名称解析来返回 ip addr。
gethostbyaddr() 将如何工作?这个函数如何从地址获取主机名?
这取决于在框中配置主机分辨率的方式。它可以从 /etc/hostnames 或从 DNS 等获取...