Lines Matching defs:he
30 print_he(struct hostent *he, int error, const char *fun, const char *name) {
34 if (he != NULL) {
36 printf("\tname = %s\n", he->h_name);
37 printf("\taddrtype = %d\n", he->h_addrtype);
38 printf("\tlength = %d\n", he->h_length);
39 c = he->h_aliases;
46 c = he->h_addr_list;
50 inet_ntop(he->h_addrtype, *c, buf, sizeof(buf));
63 struct hostent *he;
69 he = gethostbyname(argv[1]);
70 print_he(he, h_errno, "gethostbyname", argv[1]);
72 he = getipnodebyname(argv[1], AF_INET6, AI_DEFAULT|AI_ALL,
74 print_he(he, error, "getipnodebyname", argv[1]);
75 if (he != NULL)
76 freehostent(he);
78 he = getipnodebyname(argv[1], AF_INET6, AI_DEFAULT,
80 print_he(he, error, "getipnodebyname", argv[1]);
81 if (he != NULL)
82 freehostent(he);