在Linux下,将域名解析为IP地址
================代码片段========================
for(; *pptr!=NULL; pptr++)
printf(" address:%s\n", inet_ntop(pHostEntry->h_addrtype, *pptr, sIp, 18));
printf(" first address: %s\n", inet_ntop(pHostEntry->h_addrtype, pHostEntry->h_addr, sIp, 18));
inet_ntop(pHostEntry->h_addrtype, pHostEntry->h_addr, sIp, 18);