Lines Matching defs:bn
48 EtcHostsItemByName *bn;
55 while ((bn = hashmap_steal_first(m->etc_hosts_by_name))) {
56 free(bn->name);
57 free(bn->items);
58 free(bn);
149 EtcHostsItemByName *bn;
151 bn = hashmap_get(m->etc_hosts_by_name, *n);
152 if (!bn) {
157 bn = new0(EtcHostsItemByName, 1);
158 if (!bn)
161 bn->name = strdup(*n);
162 if (!bn->name) {
163 free(bn);
167 r = hashmap_put(m->etc_hosts_by_name, bn->name, bn);
169 free(bn->name);
170 free(bn);
176 if (!GREEDY_REALLOC(bn->items, bn->n_allocated, bn->n_items+1))
179 bn->items[bn->n_items++] = item;
329 EtcHostsItemByName *bn;
402 bn = hashmap_get(m->etc_hosts_by_name, name);
403 if (!bn)
406 r = dns_answer_reserve(answer, bn->n_items);
431 for (i = 0; i < bn->n_items; i++) {
434 if ((found_a && bn->items[i]->family != AF_INET) &&
435 (found_aaaa && bn->items[i]->family != AF_INET6))
438 r = dns_resource_record_new_address(&rr, bn->items[i]->family, &bn->items[i]->address, bn->name);