Lines Matching refs:key

142                 r = dns_resource_key_equal(a->items[i].rr->key, rr->key);
214 int dns_answer_match_key(DnsAnswer *a, const DnsResourceKey *key, DnsAnswerFlags *ret_flags) {
220 assert(key);
223 r = dns_resource_key_match_rr(key, i, NULL);
278 int dns_answer_contains_key(DnsAnswer *a, const DnsResourceKey *key, DnsAnswerFlags *ret_flags) {
284 assert(key);
287 r = dns_resource_key_equal(i->key, key);
314 if (IN_SET(i->key->type, DNS_TYPE_NSEC, DNS_TYPE_NSEC3))
330 if (rr->key->type != DNS_TYPE_NSEC3)
333 p = DNS_RESOURCE_KEY_NAME(rr->key);
348 int dns_answer_find_soa(DnsAnswer *a, const DnsResourceKey *key, DnsResourceRecord **ret, DnsAnswerFlags *flags) {
353 assert(key);
356 if (key->type == DNS_TYPE_SOA)
360 r = dns_resource_key_match_soa(key, rr->key);
366 r = dns_name_endswith(DNS_RESOURCE_KEY_NAME(rr->key), DNS_RESOURCE_KEY_NAME(soa->key));
389 int dns_answer_find_cname_or_dname(DnsAnswer *a, const DnsResourceKey *key, DnsResourceRecord **ret, DnsAnswerFlags *flags) {
394 assert(key);
397 if (!dns_type_may_redirect(key->type))
401 r = dns_resource_key_match_cname_or_dname(key, rr->key, NULL);
466 int dns_answer_remove_by_key(DnsAnswer **a, const DnsResourceKey *key) {
473 assert(key);
475 /* Remove all entries matching the specified key from *a */
478 r = dns_resource_key_equal(rr->key, key);
508 r = dns_resource_key_equal(rr->key, key);
533 r = dns_resource_key_equal((*a)->items[i].rr->key, key);
638 int dns_answer_copy_by_key(DnsAnswer **a, DnsAnswer *source, const DnsResourceKey *key, DnsAnswerFlags or_flags) {
644 assert(key);
646 /* Copy all RRs matching the specified key from source into *a */
650 r = dns_resource_key_equal(rr_source->key, key);
669 int dns_answer_move_by_key(DnsAnswer **to, DnsAnswer **from, const DnsResourceKey *key, DnsAnswerFlags or_flags) {
674 assert(key);
676 r = dns_answer_copy_by_key(to, *from, key, or_flags);
680 return dns_answer_remove_by_key(from, key);
702 if (a->items[i].rr->key->class == DNS_CLASS_IN &&
703 ((a->items[i].rr->key->type == DNS_TYPE_A && in_addr_is_link_local(AF_INET, (union in_addr_union*) &a->items[i].rr->a.in_addr) != prefer_link_local) ||
704 (a->items[i].rr->key->type == DNS_TYPE_AAAA && in_addr_is_link_local(AF_INET6, (union in_addr_union*) &a->items[i].rr->aaaa.in6_addr) != prefer_link_local)))
832 if (cname->key->type != DNS_TYPE_CNAME)
838 if (rr->key->type != DNS_TYPE_DNAME)
840 if (rr->key->class != cname->key->class)
843 r = dns_name_change_suffix(cname->cname.name, rr->dname.name, DNS_RESOURCE_KEY_NAME(rr->key), &n);
849 r = dns_name_equal(n, DNS_RESOURCE_KEY_NAME(cname->key));