Lines Matching refs:dnsMsg

1688     const DnsMessage *dnsMsg;  in TestHostReg()  local
1727 dnsMsg = sDnsMessages.GetHead(); in TestHostReg()
1728dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 3, /* Addnl */ 0); in TestHostReg()
1729 dnsMsg->ValidateAsProbeFor(host, /* aUnicastRequest */ (probeCount == 0)); in TestHostReg()
1730 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestHostReg()
1741 dnsMsg = sDnsMessages.GetHead(); in TestHostReg()
1742dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 3, /* Auth */ 0, /* Addnl */ 1); in TestHostReg()
1743 dnsMsg->Validate(host, kInAnswerSection); in TestHostReg()
1744 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestHostReg()
1757 dnsMsg = sDnsMessages.GetHead(); in TestHostReg()
1758 VerifyOrQuit(dnsMsg != nullptr); in TestHostReg()
1759 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 3, /* Auth */ 0, /* Addnl */ 1); in TestHostReg()
1760 dnsMsg->Validate(host, kInAnswerSection); in TestHostReg()
1772 dnsMsg = sDnsMessages.GetHead(); in TestHostReg()
1773 VerifyOrQuit(dnsMsg != nullptr); in TestHostReg()
1774 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 3, /* Auth */ 0, /* Addnl */ 1); in TestHostReg()
1775 dnsMsg->Validate(host, kInAnswerSection); in TestHostReg()
1787 dnsMsg = sDnsMessages.GetHead(); in TestHostReg()
1788 VerifyOrQuit(dnsMsg != nullptr); in TestHostReg()
1789 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 0, /* Auth */ 0, /* Addnl */ 1); in TestHostReg()
1790 VerifyOrQuit(dnsMsg->mAdditionalRecords.ContainsNsec(hostFullName, ResourceRecord::kTypeAaaa)); in TestHostReg()
1807 dnsMsg = sDnsMessages.GetHead(); in TestHostReg()
1808dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 2, /* Auth */ 0, /* Addnl */ 1); in TestHostReg()
1809 dnsMsg->Validate(host, kInAnswerSection); in TestHostReg()
1810 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestHostReg()
1827 dnsMsg = sDnsMessages.GetHead(); in TestHostReg()
1828 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 3, /* Auth */ 0, /* Addnl */ 1); in TestHostReg()
1829 dnsMsg->Validate(host, kInAnswerSection); in TestHostReg()
1830 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestHostReg()
1846 dnsMsg = sDnsMessages.GetHead(); in TestHostReg()
1847dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 1); in TestHostReg()
1848 dnsMsg->Validate(host, kInAnswerSection); in TestHostReg()
1849 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestHostReg()
1868 dnsMsg = sDnsMessages.GetHead(); in TestHostReg()
1869dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 1); in TestHostReg()
1870 dnsMsg->Validate(host, kInAnswerSection); in TestHostReg()
1871 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestHostReg()
1885 dnsMsg = sDnsMessages.GetHead(); in TestHostReg()
1886 VerifyOrQuit(dnsMsg != nullptr); in TestHostReg()
1887 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 1); in TestHostReg()
1888 dnsMsg->Validate(host, kInAnswerSection); in TestHostReg()
1901 dnsMsg = sDnsMessages.GetHead(); in TestHostReg()
1902dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 0); in TestHostReg()
1903 dnsMsg->Validate(host, kInAnswerSection, kGoodBye); in TestHostReg()
1904 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestHostReg()
1954 dnsMsg = sDnsMessages.GetHead(); in TestHostReg()
1955dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 0); in TestHostReg()
1956 dnsMsg->Validate(host, kInAnswerSection, kGoodBye); in TestHostReg()
1957 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestHostReg()
1989 const DnsMessage *dnsMsg; in TestKeyReg() local
2047 dnsMsg = sDnsMessages.GetHead(); in TestKeyReg()
2048dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 1, /* Addnl */ 0); in TestKeyReg()
2049 dnsMsg->ValidateAsProbeFor(key, /* aUnicastRequest */ (probeCount == 0)); in TestKeyReg()
2050 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestKeyReg()
2061 dnsMsg = sDnsMessages.GetHead(); in TestKeyReg()
2062dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 1); in TestKeyReg()
2063 dnsMsg->Validate(key, kInAnswerSection); in TestKeyReg()
2064 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestKeyReg()
2077 dnsMsg = sDnsMessages.GetHead(); in TestKeyReg()
2078 VerifyOrQuit(dnsMsg != nullptr); in TestKeyReg()
2079dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 1); in TestKeyReg()
2080 dnsMsg->Validate(key, kInAnswerSection); in TestKeyReg()
2092 dnsMsg = sDnsMessages.GetHead(); in TestKeyReg()
2093 VerifyOrQuit(dnsMsg != nullptr); in TestKeyReg()
2094dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 1); in TestKeyReg()
2095 dnsMsg->Validate(key, kInAnswerSection); in TestKeyReg()
2107 dnsMsg = sDnsMessages.GetHead(); in TestKeyReg()
2108 VerifyOrQuit(dnsMsg != nullptr); in TestKeyReg()
2109dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 0, /* Auth */ 0, /* Addnl */ 1); in TestKeyReg()
2110 VerifyOrQuit(dnsMsg->mAdditionalRecords.ContainsNsec(fullName, ResourceRecord::kTypeKey)); in TestKeyReg()
2127 dnsMsg = sDnsMessages.GetHead(); in TestKeyReg()
2128dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 1); in TestKeyReg()
2129 dnsMsg->Validate(key, kInAnswerSection); in TestKeyReg()
2130 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestKeyReg()
2151 dnsMsg = sDnsMessages.GetHead(); in TestKeyReg()
2152dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 1); in TestKeyReg()
2153 dnsMsg->Validate(key, kInAnswerSection); in TestKeyReg()
2154 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestKeyReg()
2170 dnsMsg = sDnsMessages.GetHead(); in TestKeyReg()
2171dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 0); in TestKeyReg()
2172 dnsMsg->Validate(key, kInAnswerSection, kGoodBye); in TestKeyReg()
2173 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestKeyReg()
2196 const DnsMessage *dnsMsg; in TestServiceReg() local
2240 dnsMsg = sDnsMessages.GetHead(); in TestServiceReg()
2241dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 2, /* Addnl */ 0); in TestServiceReg()
2242 dnsMsg->ValidateAsProbeFor(service, /* aUnicastRequest */ (probeCount == 0)); in TestServiceReg()
2243 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestServiceReg()
2254 dnsMsg = sDnsMessages.GetHead(); in TestServiceReg()
2255dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 4, /* Auth */ 0, /* Addnl */ 1); in TestServiceReg()
2256dnsMsg->Validate(service, kInAnswerSection, kCheckSrv | kCheckTxt | kCheckPtr | kCheckServicesPtr); in TestServiceReg()
2257 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestServiceReg()
2270 dnsMsg = sDnsMessages.GetHead(); in TestServiceReg()
2271 VerifyOrQuit(dnsMsg != nullptr); in TestServiceReg()
2272 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 1); in TestServiceReg()
2273 dnsMsg->Validate(service, kInAnswerSection, kCheckSrv); in TestServiceReg()
2285 dnsMsg = sDnsMessages.GetHead(); in TestServiceReg()
2286 VerifyOrQuit(dnsMsg != nullptr); in TestServiceReg()
2287 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 1); in TestServiceReg()
2288 dnsMsg->Validate(service, kInAnswerSection, kCheckTxt); in TestServiceReg()
2300 dnsMsg = sDnsMessages.GetHead(); in TestServiceReg()
2301 VerifyOrQuit(dnsMsg != nullptr); in TestServiceReg()
2302 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 2, /* Auth */ 0, /* Addnl */ 1); in TestServiceReg()
2303 dnsMsg->Validate(service, kInAnswerSection, kCheckSrv | kCheckTxt); in TestServiceReg()
2315 dnsMsg = sDnsMessages.GetHead(); in TestServiceReg()
2316 VerifyOrQuit(dnsMsg != nullptr); in TestServiceReg()
2317 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 2); in TestServiceReg()
2318 dnsMsg->Validate(service, kInAnswerSection, kCheckPtr); in TestServiceReg()
2319 dnsMsg->Validate(service, kInAdditionalSection, kCheckSrv | kCheckTxt); in TestServiceReg()
2331 dnsMsg = sDnsMessages.GetHead(); in TestServiceReg()
2332 VerifyOrQuit(dnsMsg != nullptr); in TestServiceReg()
2333 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 0); in TestServiceReg()
2334 dnsMsg->Validate(service, kInAnswerSection, kCheckServicesPtr); in TestServiceReg()
2351 dnsMsg = sDnsMessages.GetHead(); in TestServiceReg()
2352dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 1); in TestServiceReg()
2353 dnsMsg->Validate(service, kInAnswerSection, kCheckSrv); in TestServiceReg()
2354 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestServiceReg()
2374 dnsMsg = sDnsMessages.GetHead(); in TestServiceReg()
2375dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 1); in TestServiceReg()
2376 dnsMsg->Validate(service, kInAnswerSection, kCheckTxt); in TestServiceReg()
2377 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestServiceReg()
2398 dnsMsg = sDnsMessages.GetHead(); in TestServiceReg()
2399dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 2, /* Auth */ 0, /* Addnl */ 1); in TestServiceReg()
2400 dnsMsg->Validate(service, kInAnswerSection, kCheckSrv | kCheckTxt); in TestServiceReg()
2401 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestServiceReg()
2420 dnsMsg = sDnsMessages.GetHead(); in TestServiceReg()
2421dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 1); in TestServiceReg()
2422 dnsMsg->Validate(service, kInAnswerSection, kCheckSrv); in TestServiceReg()
2423 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestServiceReg()
2442 dnsMsg = sDnsMessages.GetHead(); in TestServiceReg()
2443dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 3, /* Auth */ 0, /* Addnl */ 1); in TestServiceReg()
2444 dnsMsg->Validate(service, kInAnswerSection, kCheckSrv | kCheckTxt | kCheckPtr); in TestServiceReg()
2445 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestServiceReg()
2460 dnsMsg = sDnsMessages.GetHead(); in TestServiceReg()
2461dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 3, /* Auth */ 0, /* Addnl */ 0); in TestServiceReg()
2462 dnsMsg->Validate(service, kInAnswerSection, kCheckSrv | kCheckTxt | kCheckPtr, kGoodBye); in TestServiceReg()
2463 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestServiceReg()
2489 const DnsMessage *dnsMsg; in TestUnregisterBeforeProbeFinished() local
2559 dnsMsg = sDnsMessages.GetHead(); in TestUnregisterBeforeProbeFinished()
2564dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 3, /* Addnl */ 0); in TestUnregisterBeforeProbeFinished()
2565 dnsMsg->ValidateAsProbeFor(host, /* aUnicastRequest */ (probeCount == 0)); in TestUnregisterBeforeProbeFinished()
2568dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 2, /* Addnl */ 0); in TestUnregisterBeforeProbeFinished()
2569 dnsMsg->ValidateAsProbeFor(service, /* aUnicastRequest */ (probeCount == 0)); in TestUnregisterBeforeProbeFinished()
2572dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 1, /* Addnl */ 0); in TestUnregisterBeforeProbeFinished()
2573 dnsMsg->ValidateAsProbeFor(key, /* aUnicastRequest */ (probeCount == 0)); in TestUnregisterBeforeProbeFinished()
2577 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestUnregisterBeforeProbeFinished()
2622 const DnsMessage *dnsMsg; in TestServiceSubTypeReg() local
2667 dnsMsg = sDnsMessages.GetHead(); in TestServiceSubTypeReg()
2668dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 2, /* Addnl */ 0); in TestServiceSubTypeReg()
2669 dnsMsg->ValidateAsProbeFor(service, /* aUnicastRequest */ (probeCount == 0)); in TestServiceSubTypeReg()
2670 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestServiceSubTypeReg()
2681 dnsMsg = sDnsMessages.GetHead(); in TestServiceSubTypeReg()
2682dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 7, /* Auth */ 0, /* Addnl */ 1); in TestServiceSubTypeReg()
2683dnsMsg->Validate(service, kInAnswerSection, kCheckSrv | kCheckTxt | kCheckPtr | kCheckServicesPtr); in TestServiceSubTypeReg()
2687 dnsMsg->ValidateSubType(service.mSubTypeLabels[index], service); in TestServiceSubTypeReg()
2690 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestServiceSubTypeReg()
2703 dnsMsg = sDnsMessages.GetHead(); in TestServiceSubTypeReg()
2704 VerifyOrQuit(dnsMsg != nullptr); in TestServiceSubTypeReg()
2705 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 1); in TestServiceSubTypeReg()
2706 dnsMsg->Validate(service, kInAnswerSection, kCheckSrv); in TestServiceSubTypeReg()
2718 dnsMsg = sDnsMessages.GetHead(); in TestServiceSubTypeReg()
2719 VerifyOrQuit(dnsMsg != nullptr); in TestServiceSubTypeReg()
2720 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 1); in TestServiceSubTypeReg()
2721 dnsMsg->Validate(service, kInAnswerSection, kCheckTxt); in TestServiceSubTypeReg()
2733 dnsMsg = sDnsMessages.GetHead(); in TestServiceSubTypeReg()
2734 VerifyOrQuit(dnsMsg != nullptr); in TestServiceSubTypeReg()
2735 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 2, /* Auth */ 0, /* Addnl */ 1); in TestServiceSubTypeReg()
2736 dnsMsg->Validate(service, kInAnswerSection, kCheckSrv | kCheckTxt); in TestServiceSubTypeReg()
2748 dnsMsg = sDnsMessages.GetHead(); in TestServiceSubTypeReg()
2749 VerifyOrQuit(dnsMsg != nullptr); in TestServiceSubTypeReg()
2750 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 2); in TestServiceSubTypeReg()
2751 dnsMsg->Validate(service, kInAnswerSection, kCheckPtr); in TestServiceSubTypeReg()
2752 dnsMsg->Validate(service, kInAdditionalSection, kCheckSrv | kCheckTxt); in TestServiceSubTypeReg()
2764 dnsMsg = sDnsMessages.GetHead(); in TestServiceSubTypeReg()
2765 VerifyOrQuit(dnsMsg != nullptr); in TestServiceSubTypeReg()
2766 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 0); in TestServiceSubTypeReg()
2767 dnsMsg->Validate(service, kInAnswerSection, kCheckServicesPtr); in TestServiceSubTypeReg()
2784 dnsMsg = sDnsMessages.GetHead(); in TestServiceSubTypeReg()
2785 VerifyOrQuit(dnsMsg != nullptr); in TestServiceSubTypeReg()
2786dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 2); in TestServiceSubTypeReg()
2787 dnsMsg->ValidateSubType(service.mSubTypeLabels[index], service); in TestServiceSubTypeReg()
2788 dnsMsg->Validate(service, kInAdditionalSection, kCheckSrv | kCheckTxt); in TestServiceSubTypeReg()
2820 dnsMsg = sDnsMessages.GetHead(); in TestServiceSubTypeReg()
2821dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 2); in TestServiceSubTypeReg()
2822 dnsMsg->ValidateSubType(service.mSubTypeLabels[3], service); in TestServiceSubTypeReg()
2823 dnsMsg->Validate(service, kInAdditionalSection, kCheckSrv | kCheckTxt); in TestServiceSubTypeReg()
2824 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestServiceSubTypeReg()
2844 dnsMsg = sDnsMessages.GetHead(); in TestServiceSubTypeReg()
2845dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 0); in TestServiceSubTypeReg()
2846 dnsMsg->ValidateSubType(kSubTypes1[0], service, kGoodBye); in TestServiceSubTypeReg()
2847 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestServiceSubTypeReg()
2866 dnsMsg = sDnsMessages.GetHead(); in TestServiceSubTypeReg()
2867dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 6, /* Auth */ 0, /* Addnl */ 1); in TestServiceSubTypeReg()
2868 dnsMsg->Validate(service, kInAnswerSection, kCheckSrv | kCheckTxt | kCheckPtr); in TestServiceSubTypeReg()
2872 dnsMsg->ValidateSubType(service.mSubTypeLabels[index], service); in TestServiceSubTypeReg()
2875 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestServiceSubTypeReg()
2901 dnsMsg = sDnsMessages.GetHead(); in TestServiceSubTypeReg()
2902dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 3, /* Auth */ 0, /* Addnl */ 2); in TestServiceSubTypeReg()
2904 dnsMsg->ValidateSubType(kSubTypes1[3], service, kGoodBye); in TestServiceSubTypeReg()
2905 dnsMsg->ValidateSubType(kSubTypes2[1], service); in TestServiceSubTypeReg()
2906 dnsMsg->ValidateSubType(kSubTypes2[3], service); in TestServiceSubTypeReg()
2907 dnsMsg->Validate(service, kInAdditionalSection, kCheckSrv | kCheckTxt); in TestServiceSubTypeReg()
2909 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestServiceSubTypeReg()
2924 dnsMsg = sDnsMessages.GetHead(); in TestServiceSubTypeReg()
2925dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 7, /* Auth */ 0, /* Addnl */ 0); in TestServiceSubTypeReg()
2926 dnsMsg->Validate(service, kInAnswerSection, kCheckSrv | kCheckTxt | kCheckPtr, kGoodBye); in TestServiceSubTypeReg()
2930 dnsMsg->ValidateSubType(service.mSubTypeLabels[index], service, kGoodBye); in TestServiceSubTypeReg()
2933 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestServiceSubTypeReg()
2955 const DnsMessage *dnsMsg; in TestHostOrServiceAndKeyReg() local
3028 dnsMsg = sDnsMessages.GetHead(); in TestHostOrServiceAndKeyReg()
3030dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 2, /* Addnl */ 0); in TestHostOrServiceAndKeyReg()
3034 dnsMsg->ValidateAsProbeFor(host, /* aUnicastRequest */ true); in TestHostOrServiceAndKeyReg()
3038 dnsMsg->ValidateAsProbeFor(service, /* aUnicastRequest */ true); in TestHostOrServiceAndKeyReg()
3041 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestHostOrServiceAndKeyReg()
3059 dnsMsg = sDnsMessages.GetHead(); in TestHostOrServiceAndKeyReg()
3060dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 3, /* Addnl */ 0); in TestHostOrServiceAndKeyReg()
3064 dnsMsg->ValidateAsProbeFor(host, /* aUnicastRequest */ false); in TestHostOrServiceAndKeyReg()
3068 dnsMsg->ValidateAsProbeFor(service, /* aUnicastRequest */ false); in TestHostOrServiceAndKeyReg()
3071 dnsMsg->ValidateAsProbeFor(key, /* aUnicastRequest */ (probeCount == 0)); in TestHostOrServiceAndKeyReg()
3072 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestHostOrServiceAndKeyReg()
3087 dnsMsg = sDnsMessages.GetHead(); in TestHostOrServiceAndKeyReg()
3091dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 3, /* Auth */ 0, /* Addnl */ 1); in TestHostOrServiceAndKeyReg()
3092 dnsMsg->Validate(host, kInAnswerSection); in TestHostOrServiceAndKeyReg()
3096dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 5, /* Auth */ 0, /* Addnl */ 1); in TestHostOrServiceAndKeyReg()
3097dnsMsg->Validate(service, kInAnswerSection, kCheckSrv | kCheckTxt | kCheckPtr | kCheckServicesPtr); in TestHostOrServiceAndKeyReg()
3100 dnsMsg->Validate(key, kInAnswerSection); in TestHostOrServiceAndKeyReg()
3101 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestHostOrServiceAndKeyReg()
3123 dnsMsg = sDnsMessages.GetHead(); in TestHostOrServiceAndKeyReg()
3127dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 2, /* Auth */ 0, /* Addnl */ 1); in TestHostOrServiceAndKeyReg()
3128 dnsMsg->Validate(host, kInAnswerSection, kGoodBye); in TestHostOrServiceAndKeyReg()
3132dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 3, /* Auth */ 0, /* Addnl */ 1); in TestHostOrServiceAndKeyReg()
3133dnsMsg->Validate(service, kInAnswerSection, kCheckSrv | kCheckTxt | kCheckPtr, kGoodBye); in TestHostOrServiceAndKeyReg()
3136 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestHostOrServiceAndKeyReg()
3167 dnsMsg = sDnsMessages.GetHead(); in TestHostOrServiceAndKeyReg()
3171dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 2, /* Auth */ 0, /* Addnl */ 1); in TestHostOrServiceAndKeyReg()
3172 dnsMsg->Validate(host, kInAnswerSection); in TestHostOrServiceAndKeyReg()
3176dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 4, /* Auth */ 0, /* Addnl */ 1); in TestHostOrServiceAndKeyReg()
3177dnsMsg->Validate(service, kInAnswerSection, kCheckSrv | kCheckTxt | kCheckPtr | kCheckServicesPtr); in TestHostOrServiceAndKeyReg()
3180 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestHostOrServiceAndKeyReg()
3194 dnsMsg = sDnsMessages.GetHead(); in TestHostOrServiceAndKeyReg()
3195dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 1); in TestHostOrServiceAndKeyReg()
3196 dnsMsg->Validate(key, kInAnswerSection, kGoodBye); in TestHostOrServiceAndKeyReg()
3197 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestHostOrServiceAndKeyReg()
3217 dnsMsg = sDnsMessages.GetHead(); in TestHostOrServiceAndKeyReg()
3218dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 1); in TestHostOrServiceAndKeyReg()
3219 dnsMsg->Validate(key, kInAnswerSection); in TestHostOrServiceAndKeyReg()
3220 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestHostOrServiceAndKeyReg()
3241 dnsMsg = sDnsMessages.GetHead(); in TestHostOrServiceAndKeyReg()
3242dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 1); in TestHostOrServiceAndKeyReg()
3243 dnsMsg->Validate(key, kInAnswerSection, kGoodBye); in TestHostOrServiceAndKeyReg()
3244 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestHostOrServiceAndKeyReg()
3262 dnsMsg = dnsMsg->GetNext(); in TestHostOrServiceAndKeyReg()
3263 VerifyOrQuit(dnsMsg != nullptr); in TestHostOrServiceAndKeyReg()
3267dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 0); in TestHostOrServiceAndKeyReg()
3268 dnsMsg->Validate(key, kInAnswerSection, kGoodBye); in TestHostOrServiceAndKeyReg()
3272dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 2, /* Auth */ 0, /* Addnl */ 0); in TestHostOrServiceAndKeyReg()
3273 dnsMsg->Validate(host, kInAnswerSection, kGoodBye); in TestHostOrServiceAndKeyReg()
3277dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 3, /* Auth */ 0, /* Addnl */ 0); in TestHostOrServiceAndKeyReg()
3278dnsMsg->Validate(service, kInAnswerSection, kCheckSrv | kCheckTxt | kCheckPtr, kGoodBye); in TestHostOrServiceAndKeyReg()
3282 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestHostOrServiceAndKeyReg()
3313 const DnsMessage *dnsMsg; in TestQuery() local
3425 dnsMsg = sDnsMessages.GetHead(); in TestQuery()
3432dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 5, /* Ans */ 0, /* Auth */ 13, /* Addnl */ 0); in TestQuery()
3434 dnsMsg->ValidateAsProbeFor(host1, /* aUnicastRequest */ (probeCount == 0)); in TestQuery()
3435 dnsMsg->ValidateAsProbeFor(host2, /* aUnicastRequest */ (probeCount == 0)); in TestQuery()
3436 dnsMsg->ValidateAsProbeFor(service1, /* aUnicastRequest */ (probeCount == 0)); in TestQuery()
3437 dnsMsg->ValidateAsProbeFor(service2, /* aUnicastRequest */ (probeCount == 0)); in TestQuery()
3438 dnsMsg->ValidateAsProbeFor(service3, /* aUnicastRequest */ (probeCount == 0)); in TestQuery()
3439 dnsMsg->ValidateAsProbeFor(key1, /* aUnicastRequest */ (probeCount == 0)); in TestQuery()
3440 dnsMsg->ValidateAsProbeFor(key2, /* aUnicastRequest */ (probeCount == 0)); in TestQuery()
3442 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestQuery()
3460 dnsMsg = sDnsMessages.GetHead(); in TestQuery()
3462dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 21, /* Auth */ 0, /* Addnl */ 5); in TestQuery()
3464 dnsMsg->Validate(host1, kInAnswerSection); in TestQuery()
3465 dnsMsg->Validate(host2, kInAnswerSection); in TestQuery()
3466dnsMsg->Validate(service1, kInAnswerSection, kCheckSrv | kCheckTxt | kCheckPtr | kCheckServicesPtr… in TestQuery()
3467dnsMsg->Validate(service2, kInAnswerSection, kCheckSrv | kCheckTxt | kCheckPtr | kCheckServicesPtr… in TestQuery()
3468dnsMsg->Validate(service2, kInAnswerSection, kCheckSrv | kCheckTxt | kCheckPtr | kCheckServicesPtr… in TestQuery()
3469 dnsMsg->Validate(key1, kInAnswerSection); in TestQuery()
3470 dnsMsg->Validate(key2, kInAnswerSection); in TestQuery()
3474 dnsMsg->ValidateSubType(service1.mSubTypeLabels[index], service1); in TestQuery()
3479 dnsMsg->ValidateSubType(service3.mSubTypeLabels[index], service3); in TestQuery()
3482 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestQuery()
3499 dnsMsg = sDnsMessages.GetHead(); in TestQuery()
3500 VerifyOrQuit(dnsMsg != nullptr); in TestQuery()
3501 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestQuery()
3503 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 2, /* Auth */ 0, /* Addnl */ 9); in TestQuery()
3505 dnsMsg->Validate(service1, kInAnswerSection, kCheckPtr); in TestQuery()
3506 dnsMsg->Validate(service3, kInAnswerSection, kCheckPtr); in TestQuery()
3507 dnsMsg->Validate(service1, kInAdditionalSection, kCheckSrv | kCheckTxt); in TestQuery()
3508 dnsMsg->Validate(service3, kInAdditionalSection, kCheckSrv | kCheckTxt); in TestQuery()
3509 dnsMsg->Validate(host1, kInAdditionalSection); in TestQuery()
3510 dnsMsg->Validate(host2, kInAdditionalSection); in TestQuery()
3520 dnsMsg = sDnsMessages.GetHead(); in TestQuery()
3521 VerifyOrQuit(dnsMsg != nullptr); in TestQuery()
3522 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestQuery()
3524 dnsMsg->ValidateHeader(kUnicastResponse, /* Q */ 0, /* Ans */ 2, /* Auth */ 0, /* Addnl */ 9); in TestQuery()
3526 dnsMsg->Validate(service1, kInAnswerSection, kCheckPtr); in TestQuery()
3527 dnsMsg->Validate(service3, kInAnswerSection, kCheckPtr); in TestQuery()
3528 dnsMsg->Validate(service1, kInAdditionalSection, kCheckSrv | kCheckTxt); in TestQuery()
3529 dnsMsg->Validate(service3, kInAdditionalSection, kCheckSrv | kCheckTxt); in TestQuery()
3530 dnsMsg->Validate(host1, kInAdditionalSection); in TestQuery()
3531 dnsMsg->Validate(host2, kInAdditionalSection); in TestQuery()
3549 dnsMsg = sDnsMessages.GetHead(); in TestQuery()
3550 VerifyOrQuit(dnsMsg != nullptr); in TestQuery()
3551 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestQuery()
3553 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 2, /* Auth */ 0, /* Addnl */ 9); in TestQuery()
3555 dnsMsg->Validate(service1, kInAnswerSection, kCheckPtr); in TestQuery()
3556 dnsMsg->Validate(service3, kInAnswerSection, kCheckPtr); in TestQuery()
3557 dnsMsg->Validate(service1, kInAdditionalSection, kCheckSrv | kCheckTxt); in TestQuery()
3558 dnsMsg->Validate(service3, kInAdditionalSection, kCheckSrv | kCheckTxt); in TestQuery()
3559 dnsMsg->Validate(host1, kInAdditionalSection); in TestQuery()
3560 dnsMsg->Validate(host2, kInAdditionalSection); in TestQuery()
3570 dnsMsg = sDnsMessages.GetHead(); in TestQuery()
3571 VerifyOrQuit(dnsMsg != nullptr); in TestQuery()
3572 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestQuery()
3574 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 2, /* Auth */ 0, /* Addnl */ 9); in TestQuery()
3576 dnsMsg->ValidateSubType("_s", service1); in TestQuery()
3577 dnsMsg->ValidateSubType("_s", service3); in TestQuery()
3578 dnsMsg->Validate(service1, kInAdditionalSection, kCheckSrv | kCheckTxt); in TestQuery()
3579 dnsMsg->Validate(service3, kInAdditionalSection, kCheckSrv | kCheckTxt); in TestQuery()
3580 dnsMsg->Validate(host1, kInAdditionalSection); in TestQuery()
3581 dnsMsg->Validate(host2, kInAdditionalSection); in TestQuery()
3601 dnsMsg = sDnsMessages.GetHead(); in TestQuery()
3602 VerifyOrQuit(dnsMsg != nullptr); in TestQuery()
3603 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestQuery()
3605 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 5); in TestQuery()
3606 dnsMsg->ValidateSubType("_r", service1); in TestQuery()
3607 dnsMsg->Validate(service1, kInAdditionalSection, kCheckSrv | kCheckTxt); in TestQuery()
3608 dnsMsg->Validate(host1, kInAdditionalSection); in TestQuery()
3640 dnsMsg = sDnsMessages.GetHead(); in TestQuery()
3641 VerifyOrQuit(dnsMsg != nullptr); in TestQuery()
3642 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestQuery()
3644 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 4); in TestQuery()
3646 dnsMsg->Validate(service1, kInAnswerSection, kCheckSrv); in TestQuery()
3647 dnsMsg->Validate(host1, kInAdditionalSection); in TestQuery()
3662 dnsMsg = sDnsMessages.GetHead(); in TestQuery()
3663 VerifyOrQuit(dnsMsg != nullptr); in TestQuery()
3664 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestQuery()
3669 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 4, /* Auth */ 0, /* Addnl */ 2); in TestQuery()
3671 dnsMsg->Validate(service1, kInAnswerSection, kCheckSrv); in TestQuery()
3672 dnsMsg->Validate(host1, kInAnswerSection); in TestQuery()
3690 dnsMsg = sDnsMessages.GetHead(); in TestQuery()
3691 VerifyOrQuit(dnsMsg != nullptr); in TestQuery()
3692 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestQuery()
3696 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 4); in TestQuery()
3697 dnsMsg->Validate(service3, kInAnswerSection, kCheckPtr); in TestQuery()
3698 dnsMsg->Validate(service3, kInAdditionalSection, kCheckSrv | kCheckTxt); in TestQuery()
3699 dnsMsg->Validate(host2, kInAdditionalSection); in TestQuery()
3728 dnsMsg = sDnsMessages.GetHead(); in TestQuery()
3729 VerifyOrQuit(dnsMsg != nullptr); in TestQuery()
3730 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestQuery()
3734 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 4); in TestQuery()
3735 dnsMsg->Validate(service3, kInAnswerSection, kCheckPtr); in TestQuery()
3736 dnsMsg->Validate(service3, kInAdditionalSection, kCheckSrv | kCheckTxt); in TestQuery()
3737 dnsMsg->Validate(host2, kInAdditionalSection); in TestQuery()
3751 dnsMsg = sDnsMessages.GetHead(); in TestQuery()
3752 VerifyOrQuit(dnsMsg != nullptr); in TestQuery()
3753 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestQuery()
3758 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 4); in TestQuery()
3759 dnsMsg->Validate(service3, kInAnswerSection, kCheckPtr); in TestQuery()
3760 dnsMsg->Validate(service3, kInAdditionalSection, kCheckSrv | kCheckTxt); in TestQuery()
3761 dnsMsg->Validate(host2, kInAdditionalSection); in TestQuery()
3778 dnsMsg = sDnsMessages.GetHead(); in TestQuery()
3779 VerifyOrQuit(dnsMsg != nullptr); in TestQuery()
3780 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestQuery()
3782dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 5, /* Auth */ 0, /* Addnl */ 0); in TestQuery()
3783 dnsMsg->Validate(service1, kInAnswerSection, kCheckSrv | kCheckTxt | kCheckPtr, kGoodBye); in TestQuery()
3787 dnsMsg->ValidateSubType(service1.mSubTypeLabels[index], service1, kGoodBye); in TestQuery()
3807 dnsMsg = sDnsMessages.GetHead(); in TestQuery()
3808 VerifyOrQuit(dnsMsg != nullptr); in TestQuery()
3809 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestQuery()
3811 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 5, /* Auth */ 0, /* Addnl */ 0); in TestQuery()
3812 dnsMsg->Validate(service1, kInAnswerSection, kCheckSrv | kCheckTxt | kCheckPtr, kGoodBye); in TestQuery()
3816 dnsMsg->ValidateSubType(service1.mSubTypeLabels[index], service1, kGoodBye); in TestQuery()
3835 const DnsMessage *dnsMsg; in TestMultiPacket() local
3880 dnsMsg = sDnsMessages.GetHead(); in TestMultiPacket()
3881dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 2, /* Addnl */ 0); in TestMultiPacket()
3882 dnsMsg->ValidateAsProbeFor(service, /* aUnicastRequest */ (probeCount == 0)); in TestMultiPacket()
3883 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestMultiPacket()
3894 dnsMsg = sDnsMessages.GetHead(); in TestMultiPacket()
3895dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 7, /* Auth */ 0, /* Addnl */ 1); in TestMultiPacket()
3896dnsMsg->Validate(service, kInAnswerSection, kCheckSrv | kCheckTxt | kCheckPtr | kCheckServicesPtr); in TestMultiPacket()
3900 dnsMsg->ValidateSubType(service.mSubTypeLabels[index], service); in TestMultiPacket()
3903 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestMultiPacket()
3916 dnsMsg = sDnsMessages.GetHead(); in TestMultiPacket()
3917 VerifyOrQuit(dnsMsg != nullptr); in TestMultiPacket()
3918 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 2); in TestMultiPacket()
3919 dnsMsg->Validate(service, kInAnswerSection, kCheckPtr); in TestMultiPacket()
3920 dnsMsg->Validate(service, kInAdditionalSection, kCheckSrv | kCheckTxt); in TestMultiPacket()
3937 dnsMsg = sDnsMessages.GetHead(); in TestMultiPacket()
3938 VerifyOrQuit(dnsMsg != nullptr); in TestMultiPacket()
3939 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 2); in TestMultiPacket()
3940 dnsMsg->Validate(service, kInAnswerSection, kCheckPtr); in TestMultiPacket()
3941 dnsMsg->Validate(service, kInAdditionalSection, kCheckSrv | kCheckTxt); in TestMultiPacket()
3959 dnsMsg = sDnsMessages.GetHead(); in TestMultiPacket()
3960 VerifyOrQuit(dnsMsg != nullptr); in TestMultiPacket()
3961 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 2); in TestMultiPacket()
3962 dnsMsg->Validate(service, kInAnswerSection, kCheckPtr); in TestMultiPacket()
3963 dnsMsg->Validate(service, kInAdditionalSection, kCheckSrv | kCheckTxt); in TestMultiPacket()
3996 dnsMsg = sDnsMessages.GetHead(); in TestMultiPacket()
3997 VerifyOrQuit(dnsMsg != nullptr); in TestMultiPacket()
3998 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 0); in TestMultiPacket()
3999 dnsMsg->Validate(service, kInAnswerSection, kCheckServicesPtr); in TestMultiPacket()
4019 dnsMsg = sDnsMessages.GetHead(); in TestMultiPacket()
4020 VerifyOrQuit(dnsMsg != nullptr); in TestMultiPacket()
4021 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 0); in TestMultiPacket()
4022 dnsMsg->Validate(service, kInAnswerSection, kCheckServicesPtr); in TestMultiPacket()
4056 const DnsMessage *dnsMsg; in TestResponseAggregation() local
4117 dnsMsg = sDnsMessages.GetHead(); in TestResponseAggregation()
4118dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 2, /* Addnl */ 0); in TestResponseAggregation()
4119 dnsMsg->ValidateAsProbeFor(tcpService, /* aUnicastRequest */ (probeCount == 0)); in TestResponseAggregation()
4120 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestResponseAggregation()
4131 dnsMsg = sDnsMessages.GetHead(); in TestResponseAggregation()
4132dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 4, /* Auth */ 0, /* Addnl */ 1); in TestResponseAggregation()
4133dnsMsg->Validate(tcpService, kInAnswerSection, kCheckSrv | kCheckTxt | kCheckPtr | kCheckServicesP… in TestResponseAggregation()
4135 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestResponseAggregation()
4154 dnsMsg = sDnsMessages.GetHead(); in TestResponseAggregation()
4155dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 2, /* Addnl */ 0); in TestResponseAggregation()
4156 dnsMsg->ValidateAsProbeFor(udpService, /* aUnicastRequest */ (probeCount == 0)); in TestResponseAggregation()
4157 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestResponseAggregation()
4168 dnsMsg = sDnsMessages.GetHead(); in TestResponseAggregation()
4169dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 4, /* Auth */ 0, /* Addnl */ 1); in TestResponseAggregation()
4170dnsMsg->Validate(udpService, kInAnswerSection, kCheckSrv | kCheckTxt | kCheckPtr | kCheckServicesP… in TestResponseAggregation()
4171 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestResponseAggregation()
4186 dnsMsg = sDnsMessages.GetHead(); in TestResponseAggregation()
4187 VerifyOrQuit(dnsMsg != nullptr); in TestResponseAggregation()
4188 dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 2, /* Auth */ 0, /* Addnl */ 4); in TestResponseAggregation()
4189 dnsMsg->Validate(tcpService, kInAnswerSection, kCheckPtr); in TestResponseAggregation()
4190 dnsMsg->Validate(tcpService, kInAdditionalSection, kCheckSrv | kCheckTxt); in TestResponseAggregation()
4191 dnsMsg->Validate(udpService, kInAnswerSection, kCheckPtr); in TestResponseAggregation()
4192 dnsMsg->Validate(udpService, kInAdditionalSection, kCheckSrv | kCheckTxt); in TestResponseAggregation()
4193 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestResponseAggregation()
4210 const DnsMessage *dnsMsg; in TestQuestionUnicastDisallowed() local
4248 dnsMsg = sDnsMessages.GetHead(); in TestQuestionUnicastDisallowed()
4249dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 1, /* Addnl */ 0); in TestQuestionUnicastDisallowed()
4250 dnsMsg->ValidateAsProbeFor(host, /* aUnicastRequest */ false); in TestQuestionUnicastDisallowed()
4251 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestQuestionUnicastDisallowed()
4262 dnsMsg = sDnsMessages.GetHead(); in TestQuestionUnicastDisallowed()
4263dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 1); in TestQuestionUnicastDisallowed()
4264 dnsMsg->Validate(host, kInAnswerSection); in TestQuestionUnicastDisallowed()
4265 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestQuestionUnicastDisallowed()
4291 const DnsMessage *dnsMsg; in TestTxMessageSizeLimit() local
4370 dnsMsg = sDnsMessages.GetHead(); in TestTxMessageSizeLimit()
4377dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 4, /* Addnl */ 0); in TestTxMessageSizeLimit()
4378 dnsMsg->ValidateAsProbeFor(host, /* aUnicastRequest */ (probeCount == 0)); in TestTxMessageSizeLimit()
4379 dnsMsg->ValidateAsProbeFor(hostKey, /* aUnicastRequest */ (probeCount == 0)); in TestTxMessageSizeLimit()
4381 dnsMsg = dnsMsg->GetNext(); in TestTxMessageSizeLimit()
4382 VerifyOrQuit(dnsMsg != nullptr); in TestTxMessageSizeLimit()
4384dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 3, /* Addnl */ 0); in TestTxMessageSizeLimit()
4385 dnsMsg->ValidateAsProbeFor(service, /* aUnicastRequest */ (probeCount == 0)); in TestTxMessageSizeLimit()
4386 dnsMsg->ValidateAsProbeFor(serviceKey, /* aUnicastRequest */ (probeCount == 0)); in TestTxMessageSizeLimit()
4388 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestTxMessageSizeLimit()
4407 dnsMsg = sDnsMessages.GetHead(); in TestTxMessageSizeLimit()
4409dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 4, /* Auth */ 0, /* Addnl */ 1); in TestTxMessageSizeLimit()
4410 dnsMsg->Validate(host, kInAnswerSection); in TestTxMessageSizeLimit()
4411 dnsMsg->Validate(hostKey, kInAnswerSection); in TestTxMessageSizeLimit()
4413 dnsMsg = dnsMsg->GetNext(); in TestTxMessageSizeLimit()
4414 VerifyOrQuit(dnsMsg != nullptr); in TestTxMessageSizeLimit()
4416dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 4, /* Auth */ 0, /* Addnl */ 4); in TestTxMessageSizeLimit()
4417 dnsMsg->Validate(service, kInAnswerSection, kCheckSrv | kCheckTxt | kCheckPtr); in TestTxMessageSizeLimit()
4418 dnsMsg->Validate(serviceKey, kInAnswerSection); in TestTxMessageSizeLimit()
4420 dnsMsg = dnsMsg->GetNext(); in TestTxMessageSizeLimit()
4421 VerifyOrQuit(dnsMsg != nullptr); in TestTxMessageSizeLimit()
4423dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 0); in TestTxMessageSizeLimit()
4424 dnsMsg->Validate(service, kInAnswerSection, kCheckServicesPtr); in TestTxMessageSizeLimit()
4426 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestTxMessageSizeLimit()
4444 const DnsMessage *dnsMsg; in TestHostConflict() local
4486 dnsMsg = sDnsMessages.GetHead(); in TestHostConflict()
4487dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 2, /* Addnl */ 0); in TestHostConflict()
4488 dnsMsg->ValidateAsProbeFor(host, /* aUnicastRequest */ true); in TestHostConflict()
4489 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestHostConflict()
4556 dnsMsg = sDnsMessages.GetHead(); in TestHostConflict()
4557dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 2, /* Addnl */ 0); in TestHostConflict()
4558 dnsMsg->ValidateAsProbeFor(host, /* aUnicastRequest */ (probeCount == 0)); in TestHostConflict()
4559 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestHostConflict()
4570 dnsMsg = sDnsMessages.GetHead(); in TestHostConflict()
4571dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 2, /* Auth */ 0, /* Addnl */ 1); in TestHostConflict()
4572 dnsMsg->Validate(host, kInAnswerSection); in TestHostConflict()
4573 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestHostConflict()
4602 const DnsMessage *dnsMsg; in TestServiceConflict() local
4648 dnsMsg = sDnsMessages.GetHead(); in TestServiceConflict()
4649dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 2, /* Addnl */ 0); in TestServiceConflict()
4650 dnsMsg->ValidateAsProbeFor(service, /* aUnicastRequest */ true); in TestServiceConflict()
4651 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestServiceConflict()
4718 dnsMsg = sDnsMessages.GetHead(); in TestServiceConflict()
4719dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 2, /* Addnl */ 0); in TestServiceConflict()
4720 dnsMsg->ValidateAsProbeFor(service, /* aUnicastRequest */ (probeCount == 0)); in TestServiceConflict()
4721 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestServiceConflict()
4732 dnsMsg = sDnsMessages.GetHead(); in TestServiceConflict()
4733dnsMsg->ValidateHeader(kMulticastResponse, /* Q */ 0, /* Ans */ 4, /* Auth */ 0, /* Addnl */ 1); in TestServiceConflict()
4734dnsMsg->Validate(service, kInAnswerSection, kCheckSrv | kCheckTxt | kCheckPtr | kCheckServicesPtr); in TestServiceConflict()
4735 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestServiceConflict()
5017 const DnsMessage *dnsMsg; in TestBrowser() local
5049 dnsMsg = sDnsMessages.GetHead(); in TestBrowser()
5050dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 0, /* Addnl */ 0); in TestBrowser()
5051 dnsMsg->ValidateAsQueryFor(browser); in TestBrowser()
5052 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestBrowser()
5219 dnsMsg = sDnsMessages.GetHead(); in TestBrowser()
5220 dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 0, /* Addnl */ 0); in TestBrowser()
5221 dnsMsg->ValidateAsQueryFor(browser); in TestBrowser()
5222 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestBrowser()
5257 dnsMsg = sDnsMessages.GetHead(); in TestBrowser()
5258dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 0, /* Addnl */ 0); in TestBrowser()
5259 dnsMsg->ValidateAsQueryFor(browser); in TestBrowser()
5260 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestBrowser()
5332 dnsMsg = sDnsMessages.GetHead(); in TestBrowser()
5333 dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 0, /* Addnl */ 0); in TestBrowser()
5334 dnsMsg->ValidateAsQueryFor(browser); in TestBrowser()
5335 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestBrowser()
5366 dnsMsg = sDnsMessages.GetHead(); in TestBrowser()
5367dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 0); in TestBrowser()
5368 dnsMsg->ValidateAsQueryFor(browser); in TestBrowser()
5369 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestBrowser()
5391 const DnsMessage *dnsMsg; in TestSrvResolver() local
5423 dnsMsg = sDnsMessages.GetHead(); in TestSrvResolver()
5424dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 0, /* Addnl */ 0); in TestSrvResolver()
5425 dnsMsg->ValidateAsQueryFor(resolver); in TestSrvResolver()
5426 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestSrvResolver()
5622 dnsMsg = sDnsMessages.GetHead(); in TestSrvResolver()
5623 dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 0, /* Addnl */ 0); in TestSrvResolver()
5624 dnsMsg->ValidateAsQueryFor(resolver); in TestSrvResolver()
5625 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestSrvResolver()
5660 dnsMsg = sDnsMessages.GetHead(); in TestSrvResolver()
5661dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 0, /* Addnl */ 0); in TestSrvResolver()
5662 dnsMsg->ValidateAsQueryFor(resolver); in TestSrvResolver()
5663 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestSrvResolver()
5797 dnsMsg = sDnsMessages.GetHead(); in TestSrvResolver()
5801 VerifyOrQuit(dnsMsg != nullptr); in TestSrvResolver()
5802dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 0, /* Addnl */ 0); in TestSrvResolver()
5803 dnsMsg->ValidateAsQueryFor(resolver); in TestSrvResolver()
5804 dnsMsg = dnsMsg->GetNext(); in TestSrvResolver()
5807 VerifyOrQuit(dnsMsg == nullptr); in TestSrvResolver()
5824 const DnsMessage *dnsMsg; in TestTxtResolver() local
5856 dnsMsg = sDnsMessages.GetHead(); in TestTxtResolver()
5857dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 0, /* Addnl */ 0); in TestTxtResolver()
5858 dnsMsg->ValidateAsQueryFor(resolver); in TestTxtResolver()
5859 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestTxtResolver()
6052 dnsMsg = sDnsMessages.GetHead(); in TestTxtResolver()
6053 dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 0, /* Addnl */ 0); in TestTxtResolver()
6054 dnsMsg->ValidateAsQueryFor(resolver); in TestTxtResolver()
6055 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestTxtResolver()
6090 dnsMsg = sDnsMessages.GetHead(); in TestTxtResolver()
6091dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 0, /* Addnl */ 0); in TestTxtResolver()
6092 dnsMsg->ValidateAsQueryFor(resolver); in TestTxtResolver()
6093 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestTxtResolver()
6218 dnsMsg = sDnsMessages.GetHead(); in TestTxtResolver()
6222 VerifyOrQuit(dnsMsg != nullptr); in TestTxtResolver()
6223dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 0, /* Addnl */ 0); in TestTxtResolver()
6224 dnsMsg->ValidateAsQueryFor(resolver); in TestTxtResolver()
6225 dnsMsg = dnsMsg->GetNext(); in TestTxtResolver()
6228 VerifyOrQuit(dnsMsg == nullptr); in TestTxtResolver()
6246 const DnsMessage *dnsMsg; in TestIp6AddrResolver() local
6277 dnsMsg = sDnsMessages.GetHead(); in TestIp6AddrResolver()
6278dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 0, /* Addnl */ 0); in TestIp6AddrResolver()
6279 dnsMsg->ValidateAsQueryFor(resolver); in TestIp6AddrResolver()
6280 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestIp6AddrResolver()
6546 dnsMsg = sDnsMessages.GetHead(); in TestIp6AddrResolver()
6547 dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 0, /* Addnl */ 0); in TestIp6AddrResolver()
6548 dnsMsg->ValidateAsQueryFor(resolver); in TestIp6AddrResolver()
6549 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestIp6AddrResolver()
6584 dnsMsg = sDnsMessages.GetHead(); in TestIp6AddrResolver()
6585dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 0, /* Addnl */ 0); in TestIp6AddrResolver()
6586 dnsMsg->ValidateAsQueryFor(resolver); in TestIp6AddrResolver()
6587 VerifyOrQuit(dnsMsg->GetNext() == nullptr); in TestIp6AddrResolver()
6726 dnsMsg = sDnsMessages.GetHead(); in TestIp6AddrResolver()
6730 VerifyOrQuit(dnsMsg != nullptr); in TestIp6AddrResolver()
6731dnsMsg->ValidateHeader(kMulticastQuery, /* Q */ 1, /* Ans */ 0, /* Auth */ 0, /* Addnl */ 0); in TestIp6AddrResolver()
6732 dnsMsg->ValidateAsQueryFor(resolver); in TestIp6AddrResolver()
6733 dnsMsg = dnsMsg->GetNext(); in TestIp6AddrResolver()
6736 VerifyOrQuit(dnsMsg == nullptr); in TestIp6AddrResolver()
6766 const DnsMessage *dnsMsg; in TestPassiveCache() local
7092 const DnsMessage *dnsMsg; in TestLegacyUnicastResponse() local
7155 dnsMsg = sDnsMessages.GetHead(); in TestLegacyUnicastResponse()
7156 VerifyOrQuit(dnsMsg == nullptr); in TestLegacyUnicastResponse()
7170 dnsMsg = sDnsMessages.GetHead(); in TestLegacyUnicastResponse()
7171 VerifyOrQuit(dnsMsg != nullptr); in TestLegacyUnicastResponse()
7172dnsMsg->ValidateHeader(kLegacyUnicastResponse, /* Q */ 1, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 3… in TestLegacyUnicastResponse()
7173 dnsMsg->Validate(service, kInAnswerSection, kCheckSrv); in TestLegacyUnicastResponse()
7174 dnsMsg->Validate(host, kInAdditionalSection); in TestLegacyUnicastResponse()
7188 dnsMsg = sDnsMessages.GetHead(); in TestLegacyUnicastResponse()
7189 VerifyOrQuit(dnsMsg != nullptr); in TestLegacyUnicastResponse()
7190dnsMsg->ValidateHeader(kLegacyUnicastResponse, /* Q */ 1, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 1… in TestLegacyUnicastResponse()
7191 dnsMsg->Validate(service, kInAnswerSection, kCheckTxt); in TestLegacyUnicastResponse()
7205 dnsMsg = sDnsMessages.GetHead(); in TestLegacyUnicastResponse()
7206 VerifyOrQuit(dnsMsg != nullptr); in TestLegacyUnicastResponse()
7207dnsMsg->ValidateHeader(kLegacyUnicastResponse, /* Q */ 1, /* Ans */ 2, /* Auth */ 0, /* Addnl */ 3… in TestLegacyUnicastResponse()
7208 dnsMsg->Validate(service, kInAnswerSection, kCheckSrv | kCheckTxt); in TestLegacyUnicastResponse()
7209 dnsMsg->Validate(host, kInAdditionalSection); in TestLegacyUnicastResponse()
7223 dnsMsg = sDnsMessages.GetHead(); in TestLegacyUnicastResponse()
7224 VerifyOrQuit(dnsMsg != nullptr); in TestLegacyUnicastResponse()
7225dnsMsg->ValidateHeader(kLegacyUnicastResponse, /* Q */ 1, /* Ans */ 1, /* Auth */ 0, /* Addnl */ 4… in TestLegacyUnicastResponse()
7226 dnsMsg->Validate(service, kInAnswerSection, kCheckPtr); in TestLegacyUnicastResponse()
7227 dnsMsg->Validate(service, kInAdditionalSection, kCheckSrv | kCheckTxt); in TestLegacyUnicastResponse()
7228 dnsMsg->Validate(host, kInAdditionalSection); in TestLegacyUnicastResponse()
7241 dnsMsg = sDnsMessages.GetHead(); in TestLegacyUnicastResponse()
7242 VerifyOrQuit(dnsMsg != nullptr); in TestLegacyUnicastResponse()
7243dnsMsg->ValidateHeader(kLegacyUnicastResponse, /* Q */ 1, /* Ans */ 0, /* Auth */ 0, /* Addnl */ 1… in TestLegacyUnicastResponse()
7244 VerifyOrQuit(dnsMsg->mAdditionalRecords.ContainsNsec(hostFullName, ResourceRecord::kTypeAaaa)); in TestLegacyUnicastResponse()