• Home
  • Raw
  • Download

Lines Matching refs:hp

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