Lines Matching full:d2
100 query_dname_compare(register uint8_t* d1, register uint8_t* d2) in query_dname_compare() argument
103 log_assert(d1 && d2); in query_dname_compare()
105 lab2 = *d2++; in query_dname_compare()
118 if(*d1 != *d2 && in query_dname_compare()
119 tolower((unsigned char)*d1) != tolower((unsigned char)*d2)) { in query_dname_compare()
120 if(tolower((unsigned char)*d1) < tolower((unsigned char)*d2)) in query_dname_compare()
125 d2++; in query_dname_compare()
129 lab2 = *d2++; in query_dname_compare()
233 dname_pkt_compare(sldns_buffer* pkt, uint8_t* d1, uint8_t* d2) in dname_pkt_compare() argument
237 log_assert(pkt && d1 && d2); in dname_pkt_compare()
239 len2 = *d2++; in dname_pkt_compare()
253 if((size_t)PTR_OFFSET(len2, *d2) in dname_pkt_compare()
258 d2 = sldns_buffer_at(pkt, PTR_OFFSET(len2, *d2)); in dname_pkt_compare()
259 len2 = *d2++; in dname_pkt_compare()
272 if(tolower((unsigned char)*d1) != tolower((unsigned char)*d2)) { in dname_pkt_compare()
273 if(tolower((unsigned char)*d1) < tolower((unsigned char)*d2)) in dname_pkt_compare()
278 d2++; in dname_pkt_compare()
281 len2 = *d2++; in dname_pkt_compare()
486 dname_lab_cmp(uint8_t* d1, int labs1, uint8_t* d2, int labs2, int* mlabs) in dname_lab_cmp() argument
503 len2 = *d2++; in dname_lab_cmp()
504 d2 += len2; in dname_lab_cmp()
510 /* now at same label in d1 and d2, atlabel */ in dname_lab_cmp()
516 len2 = *d2++; in dname_lab_cmp()
524 d2 += len2; in dname_lab_cmp()
527 * if((c=memlowercmp(d1, d2, len1)) != 0) { in dname_lab_cmp()
529 * lastmlabs = atlabel; } apart from d1++,d2++ */ in dname_lab_cmp()
531 if(*d1 != *d2 && tolower((unsigned char)*d1) in dname_lab_cmp()
532 != tolower((unsigned char)*d2)) { in dname_lab_cmp()
534 tolower((unsigned char)*d2)) { in dname_lab_cmp()
538 d2 += len1; in dname_lab_cmp()
544 d2 += len1; in dname_lab_cmp()
548 d2++; in dname_lab_cmp()
679 dname_strict_subdomain(uint8_t* d1, int labs1, uint8_t* d2, int labs2) in dname_strict_subdomain() argument
682 /* check subdomain: d1: www.example.com. and d2: example.com. */ in dname_strict_subdomain()
685 if(dname_lab_cmp(d1, labs1, d2, labs2, &m) > 0) { in dname_strict_subdomain()
693 dname_strict_subdomain_c(uint8_t* d1, uint8_t* d2) in dname_strict_subdomain_c() argument
695 return dname_strict_subdomain(d1, dname_count_labels(d1), d2, in dname_strict_subdomain_c()
696 dname_count_labels(d2)); in dname_strict_subdomain_c()
700 dname_subdomain_c(uint8_t* d1, uint8_t* d2) in dname_subdomain_c() argument
703 /* check subdomain: d1: www.example.com. and d2: example.com. */ in dname_subdomain_c()
704 /* or d1: example.com. and d2: example.com. */ in dname_subdomain_c()
706 int labs2 = dname_count_labels(d2); in dname_subdomain_c()
709 if(dname_lab_cmp(d1, labs1, d2, labs2, &m) < 0) { in dname_subdomain_c()
802 dname_canon_lab_cmp(uint8_t* d1, int labs1, uint8_t* d2, int labs2, int* mlabs) in dname_canon_lab_cmp() argument
823 len2 = *d2++; in dname_canon_lab_cmp()
824 d2 += len2; in dname_canon_lab_cmp()
830 /* now at same label in d1 and d2, atlabel */ in dname_canon_lab_cmp()
836 len2 = *d2++; in dname_canon_lab_cmp()
838 if((c=memcanoncmp(d1, len1, d2, len2)) != 0) { in dname_canon_lab_cmp()
846 d2 += len2; in dname_canon_lab_cmp()
864 dname_canonical_compare(uint8_t* d1, uint8_t* d2) in dname_canonical_compare() argument
868 labs2 = dname_count_labels(d2); in dname_canonical_compare()
869 return dname_canon_lab_cmp(d1, labs1, d2, labs2, &m); in dname_canonical_compare()
872 uint8_t* dname_get_shared_topdomain(uint8_t* d1, uint8_t* d2) in dname_get_shared_topdomain() argument
877 labs2 = dname_count_labels(d2); in dname_get_shared_topdomain()
878 (void)dname_lab_cmp(d1, labs1, d2, labs2, &m); in dname_get_shared_topdomain()