• Home
  • Raw
  • Download

Lines Matching refs:host

47                            struct hostent **host)  in ares__addrinfo2hostent()  argument
55 if (ai == NULL || host == NULL) in ares__addrinfo2hostent()
58 *host = ares_malloc(sizeof(**host)); in ares__addrinfo2hostent()
59 if (!(*host)) in ares__addrinfo2hostent()
63 memset(*host, 0, sizeof(**host)); in ares__addrinfo2hostent()
94 (*host)->h_aliases = aliases; in ares__addrinfo2hostent()
114 (*host)->h_addr_list = ares_malloc((naddrs + 1) * sizeof(char *)); in ares__addrinfo2hostent()
115 if (!(*host)->h_addr_list) in ares__addrinfo2hostent()
120 memset((*host)->h_addr_list, 0, (naddrs + 1) * sizeof(char *)); in ares__addrinfo2hostent()
124 (*host)->h_name = ares_strdup(ai->cnames->name); in ares__addrinfo2hostent()
125 if ((*host)->h_name == NULL && ai->cnames->name) in ares__addrinfo2hostent()
132 (*host)->h_name = ares_strdup(ai->name); in ares__addrinfo2hostent()
133 if ((*host)->h_name == NULL && ai->name) in ares__addrinfo2hostent()
139 (*host)->h_addrtype = family; in ares__addrinfo2hostent()
140 (*host)->h_length = (family == AF_INET)? in ares__addrinfo2hostent()
145 addrs = ares_malloc(naddrs * (*host)->h_length); in ares__addrinfo2hostent()
157 (*host)->h_addr_list[i] = addrs + (i * (*host)->h_length); in ares__addrinfo2hostent()
160 memcpy((*host)->h_addr_list[i], in ares__addrinfo2hostent()
162 (*host)->h_length); in ares__addrinfo2hostent()
166 memcpy((*host)->h_addr_list[i], in ares__addrinfo2hostent()
168 (*host)->h_length); in ares__addrinfo2hostent()
183 ares_free_hostent(*host); in ares__addrinfo2hostent()
184 *host = NULL; in ares__addrinfo2hostent()
191 ares_free_hostent(*host); in ares__addrinfo2hostent()
192 *host = NULL; in ares__addrinfo2hostent()