getaddrinfo(),gethostbyname(),getnetbyaddr(),getservbyname(),getprotobyname()对比总结
1.gethostbyname()原理:查询 /etc/hosts 等文件及DNSorNIS服务器The domain name queriescarriedoutbygethostbyname()andgethostbyaddr()useacombinationofanyorallofthenameservernamed(8),abrokenoutlinefrom/etc/hosts,andth