3 #include "../src/common.c"
5 void printhostent(struct hostent
*hp
) {
7 pc_stringfromipv4(hp
->h_addr_list
[0], ipbuf
);
8 printf("alias: %p, len: %d, name: %s, addrlist: %p, addrtype: %d, ip: %s\n",
17 int main(int argc
, char**argv
) {
19 if(argc
== 1) return 1;
20 ret
= gethostbyname(argv
[1]);
21 if(ret
) printhostent(ret
);