Lines Matching refs:pack2
562 static int _dnsPacket_isEqualDomainName(DnsPacket* pack1, DnsPacket* pack2) { in _dnsPacket_isEqualDomainName() argument
565 const uint8_t* p2 = pack2->cursor; in _dnsPacket_isEqualDomainName()
566 const uint8_t* end2 = pack2->end; in _dnsPacket_isEqualDomainName()
579 pack2->cursor = p2; in _dnsPacket_isEqualDomainName()
600 static int _dnsPacket_isEqualBytes(DnsPacket* pack1, DnsPacket* pack2, int numBytes) { in _dnsPacket_isEqualBytes() argument
602 const uint8_t* p2 = pack2->cursor; in _dnsPacket_isEqualBytes()
604 if (p1 + numBytes > pack1->end || p2 + numBytes > pack2->end) return 0; in _dnsPacket_isEqualBytes()
609 pack2->cursor += numBytes; in _dnsPacket_isEqualBytes()
613 static int _dnsPacket_isEqualQR(DnsPacket* pack1, DnsPacket* pack2) { in _dnsPacket_isEqualQR() argument
615 if (!_dnsPacket_isEqualDomainName(pack1, pack2) || in _dnsPacket_isEqualQR()
616 !_dnsPacket_isEqualBytes(pack1, pack2, 2 + 2)) in _dnsPacket_isEqualQR()
622 static int _dnsPacket_isEqualRR(DnsPacket* pack1, DnsPacket* pack2) { in _dnsPacket_isEqualRR() argument
625 if (!_dnsPacket_isEqualQR(pack1, pack2) || !_dnsPacket_isEqualBytes(pack1, pack2, 4)) return 0; in _dnsPacket_isEqualRR()
629 rdlength2 = _dnsPacket_readInt16(pack2); in _dnsPacket_isEqualRR()
630 if (rdlength1 != rdlength2 || !_dnsPacket_isEqualBytes(pack1, pack2, rdlength1)) return 0; in _dnsPacket_isEqualRR()
635 static int _dnsPacket_isEqualQuery(DnsPacket* pack1, DnsPacket* pack2) { in _dnsPacket_isEqualQuery() argument
640 _dnsPacket_rewind(pack2); in _dnsPacket_isEqualQuery()
643 if ((pack1->base[2] & 1) != (pack2->base[2] & 1)) { in _dnsPacket_isEqualQuery()
648 if (pack1->base[3] != pack2->base[3]) { in _dnsPacket_isEqualQuery()
655 _dnsPacket_skip(pack2, 4); in _dnsPacket_isEqualQuery()
659 count2 = _dnsPacket_readInt16(pack2); in _dnsPacket_isEqualQuery()
667 _dnsPacket_skip(pack2, 4); in _dnsPacket_isEqualQuery()
671 arcount2 = _dnsPacket_readInt16(pack2); in _dnsPacket_isEqualQuery()
679 if (!_dnsPacket_isEqualQR(pack1, pack2)) { in _dnsPacket_isEqualQuery()
687 if (!_dnsPacket_isEqualRR(pack1, pack2)) { in _dnsPacket_isEqualQuery()
878 DnsPacket pack1[1], pack2[1]; in entry_equals() local
884 _dnsPacket_init(pack2, e2->query, e2->querylen); in entry_equals()
886 return _dnsPacket_isEqualQuery(pack1, pack2); in entry_equals()