Home | History | Annotate | Download | only in missing

Lines Matching refs:hp

514 	struct hostent *hp;
551 hp = getipnodebyname(hostname, pai->ai_family, AI_ADDRCONFIG, &h_error);
554 hp = gethostbyname2(hostname, pai->ai_family);
558 hp = gethostbyname(hostname);
567 if (hp == NULL) {
582 } else if ((hp->h_name == NULL) || (hp->h_name[0] == 0)
583 || (hp->h_addr_list[0] == NULL)) {
585 freehostent(hp);
587 hp = NULL;
591 if (hp == NULL)
595 aplist = hp->h_addr_list;
598 * hp will be overwritten if we use gethostbyname2().
601 for (naddrs = 0; hp->h_addr_list[naddrs] != NULL; naddrs++)
605 apbuf = (char *)malloc(hp->h_length * naddrs);
612 if (hp->h_addr_list[i] == NULL) {
616 memcpy(&apbuf[i * hp->h_length], hp->h_addr_list[i],
617 hp->h_length);
618 aplist[i] = &apbuf[i * hp->h_length];
623 af = hp->h_addrtype;
664 if (hp)
665 freehostent(hp);
913 struct hostent *hp = NULL;
920 hp = getipnodebyaddr(addr, afd->a_addrlen, afd->a_af, &h_error);
922 hp = gethostbyaddr(addr, afd->a_addrlen, afd->a_af);
924 if (hp && hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) {
926 GET_AI(cur, afd, hp->h_addr_list[0]);
928 GET_CANONNAME(cur, hp->h_name);
930 /* hp will be damaged if we use gethostbyaddr() */
931 if ((ap = (char *)malloc(hp->h_length)) == NULL) {
935 memcpy(ap, hp->h_addr_list[0], hp->h_length);
936 if ((cn = strdup(hp->h_name)) == NULL) {
953 if (hp)
954 freehostent(hp);
966 if (hp)
967 freehostent(hp);