Lines Matching defs:rhe

157     struct resolv_hostent *rhe;
179 rhe = resolv_copy_hostent_ares(ctx, &he, AF_INET, &attl, 2);
181 fail_if(rhe == NULL);
182 fail_if(strcmp(rhe->name, name));
183 fail_if(strcmp(rhe->aliases[0], alias_1));
184 fail_if(strcmp(rhe->aliases[1], alias_2));
185 fail_if(rhe->aliases[2] != NULL);
186 fail_if(rhe->family != AF_INET);
187 fail_if(memcmp(rhe->addr_list[0]->ipaddr, &addr_1, sizeof(addr_1)));
188 fail_if(rhe->addr_list[0]->ttl != ttl_1);
189 fail_if(memcmp(rhe->addr_list[1]->ipaddr, &addr_2, sizeof(addr_2)));
190 fail_if(rhe->addr_list[1]->ttl != ttl_2);
191 fail_if(rhe->addr_list[2] != NULL);
193 talloc_zfree(rhe);
195 rhe = resolv_copy_hostent(ctx, &he);
196 fail_if(rhe == NULL);
197 fail_if(strcmp(rhe->name, name));
198 fail_if(strcmp(rhe->aliases[0], alias_1));
199 fail_if(strcmp(rhe->aliases[1], alias_2));
200 fail_if(rhe->aliases[2] != NULL);
201 fail_if(rhe->family != AF_INET);
202 fail_if(memcmp(rhe->addr_list[0]->ipaddr, &addr_2, sizeof(addr_1)));
203 fail_if(rhe->addr_list[0]->ttl != RESOLV_DEFAULT_TTL);
204 fail_if(memcmp(rhe->addr_list[1]->ipaddr, &addr_1, sizeof(addr_2)));
205 fail_if(rhe->addr_list[1]->ttl != RESOLV_DEFAULT_TTL);
206 fail_if(rhe->addr_list[2] != NULL);
208 talloc_free(rhe);
217 struct resolv_hostent *rhe;
225 rhe = test_create_rhostent(ctx, "www.example.com", "1.2.3.4");
226 fail_if(rhe == NULL);
228 str_addr = resolv_get_string_address_index(ctx, rhe, 0);
233 ptr_addr = resolv_get_string_ptr_address(ctx, rhe->family,
234 rhe->addr_list[0]->ipaddr);
239 talloc_free(rhe);
241 rhe = test_create_rhostent(ctx, "www6.example.com", "2607:f8b0:400c:c03::6a");
242 fail_if(rhe == NULL);
244 str_addr = resolv_get_string_address_index(ctx, rhe, 0);
249 ptr_addr = resolv_get_string_ptr_address(ctx, rhe->family,
250 rhe->addr_list[0]->ipaddr);
256 talloc_free(rhe);