Lines Matching full:rr

16 	new_rrs->rr = NULL;  in ldns_dnssec_rrs_new()
28 ldns_rr_free(rrs->rr); in ldns_dnssec_rrs_free_internal()
48 ldns_dnssec_rrs_add_rr(ldns_dnssec_rrs *rrs, ldns_rr *rr) in ldns_dnssec_rrs_add_rr() argument
52 if (!rrs || !rr) { in ldns_dnssec_rrs_add_rr()
58 cmp = ldns_rr_compare(rrs->rr, rr); in ldns_dnssec_rrs_add_rr()
61 return ldns_dnssec_rrs_add_rr(rrs->next, rr); in ldns_dnssec_rrs_add_rr()
64 new_rrs->rr = rr; in ldns_dnssec_rrs_add_rr()
68 /* put the current old rr in the new next, put the new in ldns_dnssec_rrs_add_rr()
69 rr in the current container */ in ldns_dnssec_rrs_add_rr()
71 new_rrs->rr = rrs->rr; in ldns_dnssec_rrs_add_rr()
73 rrs->rr = rr; in ldns_dnssec_rrs_add_rr()
76 /* Silently ignore equal rr's */ in ldns_dnssec_rrs_add_rr()
88 if (rrs->rr) { in ldns_dnssec_rrs_print_fmt()
89 ldns_rr_print_fmt(out, fmt, rrs->rr); in ldns_dnssec_rrs_print_fmt()
168 ldns_dnssec_rrsets_new_frm_rr(ldns_rr *rr) in ldns_dnssec_rrsets_new_frm_rr() argument
175 rr_type = ldns_rr_get_type(rr); in ldns_dnssec_rrsets_new_frm_rr()
178 rr_type = ldns_rdf2rr_type(ldns_rr_rrsig_typecovered(rr)); in ldns_dnssec_rrsets_new_frm_rr()
184 new_rrsets->rrs->rr = rr; in ldns_dnssec_rrsets_new_frm_rr()
187 new_rrsets->signatures->rr = rr; in ldns_dnssec_rrsets_new_frm_rr()
194 ldns_dnssec_rrsets_add_rr(ldns_dnssec_rrsets *rrsets, ldns_rr *rr) in ldns_dnssec_rrsets_add_rr() argument
201 if (!rrsets || !rr) { in ldns_dnssec_rrsets_add_rr()
205 rr_type = ldns_rr_get_type(rr); in ldns_dnssec_rrsets_add_rr()
209 rr_type = ldns_rdf2rr_type(ldns_rr_rrsig_typecovered(rr)); in ldns_dnssec_rrsets_add_rr()
215 rrsets->rrs->rr = rr; in ldns_dnssec_rrsets_add_rr()
219 rrsets->signatures->rr = rr; in ldns_dnssec_rrsets_add_rr()
227 result = ldns_dnssec_rrsets_add_rr(rrsets->next, rr); in ldns_dnssec_rrsets_add_rr()
229 new_rrsets = ldns_dnssec_rrsets_new_frm_rr(rr); in ldns_dnssec_rrsets_add_rr()
234 replace field of current with data from new rr */ in ldns_dnssec_rrsets_add_rr()
242 rrsets->rrs->rr = rr; in ldns_dnssec_rrsets_add_rr()
247 rrsets->signatures->rr = rr; in ldns_dnssec_rrsets_add_rr()
255 result = ldns_dnssec_rrs_add_rr(rrsets->signatures, rr); in ldns_dnssec_rrsets_add_rr()
258 rrsets->signatures->rr = rr; in ldns_dnssec_rrsets_add_rr()
262 result = ldns_dnssec_rrs_add_rr(rrsets->rrs, rr); in ldns_dnssec_rrsets_add_rr()
265 rrsets->rrs->rr = rr; in ldns_dnssec_rrsets_add_rr()
285 ldns_rr_get_type(rrsets->rrs->rr) != LDNS_RR_TYPE_SOA in ldns_dnssec_rrsets_print_soa_fmt()
343 ldns_dnssec_name_new_frm_rr(ldns_rr *rr) in ldns_dnssec_name_new_frm_rr() argument
347 new_name->name = ldns_rr_owner(rr); in ldns_dnssec_name_new_frm_rr()
348 if(ldns_dnssec_name_add_rr(new_name, rr) != LDNS_STATUS_OK) { in ldns_dnssec_name_new_frm_rr()
451 ldns_rr *rr) in ldns_dnssec_name_add_rr() argument
459 if (!name || !rr) { in ldns_dnssec_name_add_rr()
463 rr_type = ldns_rr_get_type(rr); in ldns_dnssec_name_add_rr()
466 typecovered = ldns_rdf2rr_type(ldns_rr_rrsig_typecovered(rr)); in ldns_dnssec_name_add_rr()
472 name->nsec = rr; in ldns_dnssec_name_add_rr()
476 result = ldns_dnssec_rrs_add_rr(name->nsec_signatures, rr); in ldns_dnssec_name_add_rr()
479 name->nsec_signatures->rr = rr; in ldns_dnssec_name_add_rr()
482 /* it's a 'normal' RR, add it to the right rrset */ in ldns_dnssec_name_add_rr()
484 result = ldns_dnssec_rrsets_add_rr(name->rrsets, rr); in ldns_dnssec_name_add_rr()
487 result = ldns_dnssec_rrsets_add_rr(name->rrsets, rr); in ldns_dnssec_name_add_rr()
584 rr_is_rrsig_covering(ldns_rr* rr, ldns_rr_type t) in rr_is_rrsig_covering() argument
586 return ldns_rr_get_type(rr) == LDNS_RR_TYPE_RRSIG in rr_is_rrsig_covering()
587 && ldns_rdf2rr_type(ldns_rr_rrsig_typecovered(rr)) == t; in rr_is_rrsig_covering()
724 ldns_rr_rdf(rr, 3)));
982 ldns_dnssec_zone_find_nsec3_original(ldns_dnssec_zone *zone, ldns_rr *rr) { argument
986 if (ldns_rr_get_type(rr) == LDNS_RR_TYPE_NSEC3 && ! zone->_nsec3params){
988 ldns_dnssec_zone_hashed_names_from_nsec3(zone, rr);
993 hashed_name = ldns_dname_label(ldns_rr_owner(rr), 0);
1003 ldns_dnssec_zone_add_rr(ldns_dnssec_zone *zone, ldns_rr *rr) argument
1010 if (!zone || !rr) {
1021 if (ldns_rr_get_type(rr) == LDNS_RR_TYPE_RRSIG) {
1022 type_covered = ldns_rdf2rr_type(ldns_rr_rrsig_typecovered(rr));
1024 if (ldns_rr_get_type(rr) == LDNS_RR_TYPE_NSEC3 ||
1026 cur_node = ldns_dnssec_zone_find_nsec3_original(zone, rr);
1031 cur_node = ldns_rbtree_search(zone->names, ldns_rr_owner(rr));
1035 cur_name = ldns_dnssec_name_new_frm_rr(rr);
1042 cur_node->key = ldns_rr_owner(rr);
1048 result = ldns_dnssec_name_add_rr(cur_name, rr);
1050 if (ldns_rr_get_type(rr) == LDNS_RR_TYPE_SOA) {
1355 * Iterate over the RR's in the ldns_dnssec_zone in canonical order.
1356 * There are three possible paths through the RR's in a ldns_dnssec_name.
1378 * 2.3. Then the signatures of the NSEC RR, followed by
1380 * followed by the NSEC rr.
1390 * Then all signatures of the NSEC3 RR, followed by the NSEC3
1402 ldns_rr *rr = i->rrs->rr; local
1404 return rr;
1600 zone_digester_update(zone_digester *zd, ldns_rr *rr) argument
1613 if ((st = ldns_rr2buffer_wire_canonical(&buf, rr, LDNS_SECTION_ANSWER)))
1628 ldns_rr *rr = NULL; local
1635 if (!(rr = ldns_rr_new_frm_type(LDNS_RR_TYPE_ZONEMD)))
1641 ldns_rr_set_owner(rr, rdf);
1642 ldns_rr_set_class(rr, ldns_rr_get_class(soa));
1643 ldns_rr_set_ttl(rr, ldns_rr_ttl(soa));
1647 ldns_rr_set_rdf(rr, rdf, 0);
1651 ldns_rr_set_rdf(rr, rdf, 1);
1655 ldns_rr_set_rdf(rr, rdf, 2);
1662 ldns_rr_set_rdf(rr, rdf, 3);
1664 return rr;
1668 ldns_rr_free(rr);
1734 ldns_rr *rr; local
1741 for ( rr = dnssec_zone_rr_iter_first(&rr_iter, zone)
1742 ; rr && !st
1743 ; rr = dnssec_zone_rr_iter_next(&rr_iter)) {
1745 if (ldns_rr_get_type(rr) == LDNS_RR_TYPE_ZONEMD
1746 && !ldns_dname_compare(ldns_rr_owner(rr), apex_name))
1749 if (ldns_rr_get_type(rr) == LDNS_RR_TYPE_RRSIG
1751 ldns_rr_rrsig_typecovered(rr))
1752 && !ldns_dname_compare(ldns_rr_owner(rr), apex_name))
1754 st = zone_digester_update(zd, rr);
1806 if (!soa || !soa->rrs || !soa->rrs->rr)
1809 soa_rr = soa->rrs->rr;
1816 if (!rrs->rr
1817 || ldns_rr_get_type(rrs->rr) != LDNS_RR_TYPE_ZONEMD
1818 || ldns_rr_rd_count(rrs->rr) < 4)
1823 != ldns_rdf2native_int32(ldns_rr_rdf(rrs->rr, 0)))
1828 ldns_rdf2native_int8(ldns_rr_rdf(rrs->rr, 1)),
1829 ldns_rdf2native_int8(ldns_rr_rdf(rrs->rr, 2)));
1844 if (!rrs->rr
1845 || ldns_rr_get_type(rrs->rr) != LDNS_RR_TYPE_ZONEMD
1846 || ldns_rr_rd_count(rrs->rr) < 4)
1851 != ldns_rdf2native_int32(ldns_rr_rdf(rrs->rr, 0)))
1855 ldns_rdf2native_int8(ldns_rr_rdf(rrs->rr, 1)))
1859 == ldns_rdf2native_int8(ldns_rr_rdf(rrs->rr,2))
1861 == ldns_rdf_size(ldns_rr_rdf(rrs->rr, 3))
1863 , ldns_rdf_data(ldns_rr_rdf(rrs->rr, 3))
1869 == ldns_rdf2native_int8(ldns_rr_rdf(rrs->rr,2))
1871 == ldns_rdf_size(ldns_rr_rdf(rrs->rr, 3))
1873 , ldns_rdf_data(ldns_rr_rdf(rrs->rr, 3))
1886 ldns_rr *rr = NULL; local
1897 (*rrs)->rr = ldns_rr_list_pop_rr(rr_list);
1899 ldns_rr_list_push_rr(new_rrs, (*rrs)->rr);
1901 while ((rr = ldns_rr_list_pop_rr(rr_list))) {
1904 if ((st = ldns_dnssec_rrs_add_rr(*rrs, rr))) {
1905 ldns_rr_list_push_rr(rr_list, rr);
1908 ldns_rr_list_push_rr(new_rrs, rr);
1941 if (!soa_rrset || !soa_rrset->rrs || !soa_rrset->rrs->rr)
1943 soa_rr = soa_rrset->rrs->rr;