Lines Matching defs:host
58 struct hostent **host)
69 if (ai == NULL || host == NULL) {
84 *host = ares_malloc(sizeof(**host));
85 if (!(*host)) {
88 memset(*host, 0, sizeof(**host));
110 (*host)->h_aliases = aliases;
128 (*host)->h_addr_list = ares_malloc((naddrs + 1) * sizeof(char *));
129 if (!(*host)->h_addr_list) {
133 memset((*host)->h_addr_list, 0, (naddrs + 1) * sizeof(char *));
136 (*host)->h_name = ares_strdup(ai->cnames->name);
137 if ((*host)->h_name == NULL && ai->cnames->name) {
141 (*host)->h_name = ares_strdup(ai->name);
142 if ((*host)->h_name == NULL && ai->name) {
147 (*host)->h_addrtype = (HOSTENT_ADDRTYPE_TYPE)family;
150 (*host)->h_length = sizeof(struct in_addr);
154 (*host)->h_length = sizeof(struct ares_in6_addr);
158 addrs = ares_malloc(naddrs * (size_t)(*host)->h_length);
168 (*host)->h_addr_list[i] = addrs + (i * (size_t)(*host)->h_length);
171 (*host)->h_addr_list[i],
173 (size_t)(*host)->h_length);
177 (*host)->h_addr_list[i],
179 (size_t)(*host)->h_length);
190 ares_free_hostent(*host);
191 *host = NULL;
198 ares_free_hostent(*host);
199 *host = NULL;