Lines Matching refs:he
32 print_he(struct hostent *he, int error, const char *fun, const char *name) {
36 if (he != NULL) {
38 printf("\tname = %s\n", he->h_name);
39 printf("\taddrtype = %d\n", he->h_addrtype);
40 printf("\tlength = %d\n", he->h_length);
41 c = he->h_aliases;
48 c = he->h_addr_list;
52 inet_ntop(he->h_addrtype, *c, buf, sizeof(buf));
65 struct hostent *he;
71 he = gethostbyname(argv[1]);
72 print_he(he, h_errno, "gethostbyname", argv[1]);
74 he = getipnodebyname(argv[1], AF_INET6, AI_DEFAULT|AI_ALL,
76 print_he(he, error, "getipnodebyname", argv[1]);
77 if (he != NULL)
78 freehostent(he);
80 he = getipnodebyname(argv[1], AF_INET6, AI_DEFAULT,
82 print_he(he, error, "getipnodebyname", argv[1]);
83 if (he != NULL)
84 freehostent(he);