Lines Matching refs:item
12 static DnsAnswerItem *dns_answer_item_free(DnsAnswerItem *item) { in dns_answer_item_free() argument
13 if (!item) in dns_answer_item_free()
16 dns_resource_record_unref(item->rr); in dns_answer_item_free()
17 dns_resource_record_unref(item->rrsig); in dns_answer_item_free()
19 return mfree(item); in dns_answer_item_free()
112 _cleanup_(dns_answer_item_unrefp) DnsAnswerItem *item = NULL; in dns_answer_add_raw()
123 item = new(DnsAnswerItem, 1); in dns_answer_add_raw()
124 if (!item) in dns_answer_add_raw()
127 *item = (DnsAnswerItem) { in dns_answer_add_raw()
135 r = ordered_set_put(a->items, item); in dns_answer_add_raw()
139 TAKE_PTR(item); in dns_answer_add_raw()
144 DnsAnswerItem *item; in dns_answer_add_raw_all() local
147 DNS_ANSWER_FOREACH_ITEM(item, source) { in dns_answer_add_raw_all()
150 item->rr, in dns_answer_add_raw_all()
151 item->ifindex, in dns_answer_add_raw_all()
152 item->flags, in dns_answer_add_raw_all()
153 item->rrsig); in dns_answer_add_raw_all()
213 DnsAnswerItem *item; in dns_answer_add_all() local
216 DNS_ANSWER_FOREACH_ITEM(item, b) { in dns_answer_add_all()
217 r = dns_answer_add(a, item->rr, item->ifindex, item->flags, item->rrsig); in dns_answer_add_all()
493 DnsAnswerItem *item; in dns_answer_remove_by_key() local
502 DNS_ANSWER_FOREACH_ITEM(item, *a) { in dns_answer_remove_by_key()
503 r = dns_resource_key_equal(item->rr->key, key); in dns_answer_remove_by_key()
507 dns_answer_item_unref(ordered_set_remove((*a)->items, item)); in dns_answer_remove_by_key()
523 DnsAnswerItem *item; in dns_answer_remove_by_rr() local
532 DNS_ANSWER_FOREACH_ITEM(item, *a) { in dns_answer_remove_by_rr()
533 r = dns_resource_record_equal(item->rr, rr); in dns_answer_remove_by_rr()
537 dns_answer_item_unref(ordered_set_remove((*a)->items, item)); in dns_answer_remove_by_rr()
553 DnsAnswerItem *item; in dns_answer_remove_by_answer_keys() local
558 DNS_ANSWER_FOREACH_ITEM(item, b) { in dns_answer_remove_by_answer_keys()
560 …if (prev && dns_resource_key_equal(item->rr->key, prev)) /* Skip this one, we already looked at it… in dns_answer_remove_by_answer_keys()
563 r = dns_answer_remove_by_key(a, item->rr->key); in dns_answer_remove_by_answer_keys()
571 DNS_RESOURCE_KEY_REPLACE(prev, dns_resource_key_ref(item->rr->key)); in dns_answer_remove_by_answer_keys()
584 DnsAnswerItem *item; in dns_answer_copy_by_key() local
592 DNS_ANSWER_FOREACH_ITEM(item, source) { in dns_answer_copy_by_key()
594 r = dns_resource_key_equal(item->rr->key, key); in dns_answer_copy_by_key()
600 … r = dns_answer_add_extend(a, item->rr, item->ifindex, item->flags|or_flags, rrsig ?: item->rrsig); in dns_answer_copy_by_key()
630 DnsAnswerItem **p, *item; in dns_answer_order_by_scope() local
645 DNS_ANSWER_FOREACH_ITEM(item, a) in dns_answer_order_by_scope()
646 if (dns_resource_record_is_link_local_address(item->rr) == prefer_link_local) in dns_answer_order_by_scope()
647 *p++ = dns_answer_item_ref(item); in dns_answer_order_by_scope()
650 DNS_ANSWER_FOREACH_ITEM(item, a) in dns_answer_order_by_scope()
651 if (dns_resource_record_is_link_local_address(item->rr) != prefer_link_local) in dns_answer_order_by_scope()
652 *p++ = dns_answer_item_ref(item); in dns_answer_order_by_scope()
717 DnsAnswerItem *item; in dns_answer_dump() local
722 DNS_ANSWER_FOREACH_ITEM(item, answer) { in dns_answer_dump()
727 t = dns_resource_record_to_string(item->rr); in dns_answer_dump()
735 fprintf(f, " ttl=%" PRIu32, item->rr->ttl); in dns_answer_dump()
737 if (item->ifindex != 0) in dns_answer_dump()
738 fprintf(f, " ifindex=%i", item->ifindex); in dns_answer_dump()
739 if (item->rrsig) in dns_answer_dump()
741 if (item->flags & DNS_ANSWER_AUTHENTICATED) in dns_answer_dump()
743 if (item->flags & DNS_ANSWER_CACHEABLE) in dns_answer_dump()
745 if (item->flags & DNS_ANSWER_SHARED_OWNER) in dns_answer_dump()
747 if (item->flags & DNS_ANSWER_CACHE_FLUSH) in dns_answer_dump()
749 if (item->flags & DNS_ANSWER_GOODBYE) in dns_answer_dump()
751 if (item->flags & DNS_ANSWER_SECTION_ANSWER) in dns_answer_dump()
753 if (item->flags & DNS_ANSWER_SECTION_AUTHORITY) in dns_answer_dump()
755 if (item->flags & DNS_ANSWER_SECTION_ADDITIONAL) in dns_answer_dump()
800 DnsAnswerItem **p, *item; in dns_answer_randomize() local
813 DNS_ANSWER_FOREACH_ITEM(item, a) in dns_answer_randomize()
814 *p++ = dns_answer_item_ref(item); in dns_answer_randomize()