Lines Matching defs:hp
175 const HEADER *hp;
208 hp = &answer->hdr;
209 ancount = ntohs(hp->ancount);
210 qdcount = ntohs(hp->qdcount);
466 gethostbyname_r(const char *name, struct hostent *hp, char *buf, size_t buflen,
477 memcpy(hp, res, sizeof *hp);
478 *result = hp;
485 struct hostent *hp;
494 hp = gethostbyname_internal(name, AF_INET6, res);
495 if (hp) {
497 return hp;
500 hp = gethostbyname_internal(name, AF_INET, res);
502 return hp;
508 struct hostent *hp;
513 hp = gethostbyname_internal(name, af, res);
515 return hp;
524 struct hostent *hp;
630 hp = NULL;
632 if (nsdispatch(&hp, dtab, NSDB_HOSTS, "gethostbyname",
637 return hp;
646 struct hostent *hp;
687 hp = NULL;
689 if (nsdispatch(&hp, dtab, NSDB_HOSTS, "gethostbyaddr",
693 return hp;
800 struct hostent *hp;
810 hp = NULL;
817 hp = _gethtbyname2(name, AF_INET6);
818 if (hp==NULL)
819 hp = _gethtbyname2(name, AF_INET);
823 hp = _gethtbyname2(name, af);
825 *((struct hostent **)rv) = hp;
826 if (hp == NULL) {
977 map_v4v6_hostent(struct hostent *hp, char **bpp, char *ep)
981 assert(hp != NULL);
985 if (hp->h_addrtype != AF_INET || hp->h_length != INADDRSZ)
987 hp->h_addrtype = AF_INET6;
988 hp->h_length = IN6ADDRSZ;
989 for (ap = hp->h_addr_list; *ap; ap++) {
1031 char *hp;
1037 hp = ap[j];
1039 ap[j+1] = hp;
1062 struct hostent *hp;
1100 hp = getanswer(buf, n, name, type, res);
1103 if (hp == NULL)
1112 *((struct hostent **)rv) = hp;
1123 struct hostent *hp;
1182 hp = getanswer(buf, n, qbuf, T_PTR, res);
1184 if (hp == NULL) {
1195 hp->h_addrtype = af;
1196 hp->h_length = len;
1203 hp->h_addrtype = AF_INET6;
1204 hp->h_length = IN6ADDRSZ;
1208 *((struct hostent **)rv) = hp;